' Wave-1 inline-asm slice: `{ var }` binding plus multi-block temp-name race.
' Two inline asm blocks read and write LOCAL variables via { var }. Each
' bound variable's address is passed in a Win64 argument register (rcx, rdx,
' r8, r9 in order of first appearance within the block) and { var } becomes
' a memory operand on that register. Both blocks are assembled to per-block
' unique temp objects (_inline_asm_0.obj, _inline_asm_1.obj, ...) so neither
' overwrites the other. Expected exit code: 0
FUNCTION PBMAIN() AS LONG
  LOCAL a AS LONG
  LOCAL b AS QUAD
  LOCAL c AS DWORD

  a = 7
  b = 100
  c = 5

  ' Block 1 (#ASM): c = a + b + c = 7 + 100 + 5 = 112
  #ASM
    mov eax, {a}
    add rax, {b}
    add eax, {c}
    mov {c}, eax
  #ENDASM

  ' Block 2 (#ASM): a = c * 2 = 224
  #ASM
    mov eax, {c}
    add eax, eax
    mov {a}, eax
  #ENDASM

  IF c = 112 AND a = 224 AND b = 100 THEN
    PRINT "inline asm binding OK"
    PBMAIN = 0
  ELSE
    PRINT "inline asm binding FAIL: a="; a; " b="; b; " c="; c
    PBMAIN = 1
  END IF
END FUNCTION
