// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: collectargs
static int collectargs (char **argv, int *args) {
  int i;
  for (i = 1; argv[i] != NULL; i++) {
    if (argv[i][0] != '-')  /* not an option? */
        return i;
    switch (argv[i][1]) {  /* option */
      case '-':
        noextrachars(argv[i]);
        return (argv[i+1] != NULL ? i+1 : 0);
      case '\0':
        return i;
      case 'E':
        args[has_E] = 1;
        break;
      case 'i':
        noextrachars(argv[i]);
        args[has_i] = 1;  /* go through */
      case 'v':
        noextrachars(argv[i]);
        args[has_v] = 1;
        break;
      case 'e':
        args[has_e] = 1;  /* go through */
      case 'l':  /* both options need an argument */
        if (argv[i][2] == '\0') {  /* no concatenated argument? */
          i++;  /* try next 'argv' */
          if (argv[i] == NULL || argv[i][0] == '-')
            return -(i - 1);  /* no next argument or it is another option */
        }
        break;
      default:  /* invalid option; return its index... */
        return -i;  /* ...as a negative value */
    }
  }
  return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl $0x1, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x7d56
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x7b7a
movl -0x1c(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x7d5e
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x20(%rsp)
testl %eax, %eax
je 0x7c4f
jmp 0x7b9a
movl -0x20(%rsp), %eax
subl $0x2d, %eax
je 0x7bf3
jmp 0x7ba5
movl -0x20(%rsp), %eax
subl $0x45, %eax
je 0x7c5c
jmp 0x7bb4
movl -0x20(%rsp), %eax
subl $0x65, %eax
je 0x7cce
jmp 0x7bc3
movl -0x20(%rsp), %eax
subl $0x69, %eax
je 0x7c6d
jmp 0x7bd2
movl -0x20(%rsp), %eax
subl $0x6c, %eax
je 0x7cda
jmp 0x7be1
movl -0x20(%rsp), %eax
subl $0x76, %eax
je 0x7c9c
jmp 0x7d38
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x7c17
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x7d5e
movq -0x10(%rsp), %rax
movl -0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x7c3a
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x7c42
xorl %eax, %eax
movl %eax, -0x24(%rsp)
jmp 0x7c42
movl -0x24(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x7d5e
movl -0x1c(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x7d5e
movq -0x18(%rsp), %rax
movl $0x1, 0xc(%rax)
jmp 0x7d44
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x7c91
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x7d5e
movq -0x18(%rsp), %rax
movl $0x1, (%rax)
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x7cc0
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x7d5e
movq -0x18(%rsp), %rax
movl $0x1, 0x4(%rax)
jmp 0x7d44
movq -0x18(%rsp), %rax
movl $0x1, 0x8(%rax)
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x7d36
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x7d23
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7d34
movl -0x1c(%rsp), %ecx
subl $0x1, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x4(%rsp)
jmp 0x7d5e
jmp 0x7d36
jmp 0x7d44
xorl %eax, %eax
subl -0x1c(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x7d5e
jmp 0x7d46
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x7b42
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)