// File: /workspace/github_c_makefile_star2_O0/Edilbert[P]BS9/bs9.c
// Function: ScanArguments
int ScanArguments(char *p, char *args, int ptr[], int nargs)
{
   int l,n;
   char sym[ML];

   if (df) fprintf(df,"Scan Args %d <%s>\n",nargs,p);
   n = 0;
   ptr[0] = 0;
   while (*p && n < nargs)
   {
      if (df) fprintf(df,"Arg #%d <%s>\n",n,p);
      p = SkipSpace(p);
      if (*p == ')') break; // end of list
      if (nargs == MAXARGS) p = GetSymbol(p,sym);
      else                  p = GetMacroArg(p,sym);
      l = strlen(sym);
      if (l) memmove(args+ptr[n],sym,l+1);
      else   args[ptr[n]] = 0;
      ++n;
      ptr[n] = ptr[n-1] + l + 1;
      p = SkipSpace(p);
      if (*p == ')') break; // end of list
      if (*p != ',' && n < nargs-1 && nargs < MAXARGS)
      {
         ++ErrNum;
         ErrorMsg("Syntax error in macro definition '%c'\n",*p);
         exit(1);
      }
      if (*p == ',') ++p;
   }
   return n;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movl %ecx, 0x11c(%rsp)
cmpq $0x0, 0x1ce02(%rip)     # 0x289f0
je 0xbc14
movq 0x1cdf9(%rip), %rdi     # 0x289f0
movl 0x11c(%rsp), %edx
movq 0x130(%rsp), %rcx
leaq 0x5697(%rip), %rsi      # 0x112a4
movb $0x0, %al
callq 0x21e0
movl $0x0, 0x114(%rsp)
movq 0x120(%rsp), %rax
movl $0x0, (%rax)
movq 0x130(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xf(%rsp)
je 0xbc58
movl 0x114(%rsp), %eax
cmpl 0x11c(%rsp), %eax
setl %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xbc65
jmp 0xbe6a
cmpq $0x0, 0x1cd83(%rip)     # 0x289f0
je 0xbc93
movq 0x1cd7a(%rip), %rdi     # 0x289f0
movl 0x114(%rsp), %edx
movq 0x130(%rsp), %rcx
leaq 0x562b(%rip), %rsi      # 0x112b7
movb $0x0, %al
callq 0x21e0
movq 0x130(%rsp), %rdi
callq 0x2830
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
jne 0xbcbd
jmp 0xbe6a
cmpl $0xa, 0x11c(%rsp)
jne 0xbce3
movq 0x130(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2aa0
movq %rax, 0x130(%rsp)
jmp 0xbcfd
movq 0x130(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2b90
movq %rax, 0x130(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x20f0
movl %eax, 0x118(%rsp)
cmpl $0x0, 0x118(%rsp)
je 0xbd50
movq 0x128(%rsp), %rdi
movq 0x120(%rsp), %rax
movslq 0x114(%rsp), %rcx
movslq (%rax,%rcx,4), %rax
addq %rax, %rdi
leaq 0x10(%rsp), %rsi
movl 0x118(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x2260
jmp 0xbd70
movq 0x128(%rsp), %rax
movq 0x120(%rsp), %rcx
movslq 0x114(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
movb $0x0, (%rax,%rcx)
movl 0x114(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x114(%rsp)
movq 0x120(%rsp), %rax
movl 0x114(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl 0x118(%rsp), %edx
addl $0x1, %edx
movq 0x120(%rsp), %rax
movslq 0x114(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x130(%rsp), %rdi
callq 0x2830
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
jne 0xbde0
jmp 0xbe6a
movq 0x130(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0xbe41
movl 0x114(%rsp), %eax
movl 0x11c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xbe41
cmpl $0xa, 0x11c(%rsp)
jge 0xbe41
movl 0x1cbf7(%rip), %eax     # 0x28a0c
addl $0x1, %eax
movl %eax, 0x1cbee(%rip)     # 0x28a0c
movq 0x130(%rsp), %rax
movsbl (%rax), %esi
leaq 0x5495(%rip), %rdi      # 0x112c5
movb $0x0, %al
callq 0x3150
movl $0x1, %edi
callq 0x22b0
movq 0x130(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xbe65
movq 0x130(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x130(%rsp)
jmp 0xbc2d
movl 0x114(%rsp), %eax
addq $0x138, %rsp            # imm = 0x138
retq
nopl (%rax)