// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/lparser.c
// Function: funcargs
static void funcargs (LexState *ls, expdesc *f, int line) {
  FuncState *fs = ls->fs;
  expdesc args;
  int base, nparams;
  switch (ls->t.token) {
    case '(': {  /* funcargs -> '(' [ explist ] ')' */
      luaX_next(ls);
      if (ls->t.token == ')')  /* arg list is empty? */
        args.k = VVOID;
      else {
        explist(ls, &args);
        luaK_setmultret(fs, &args);
      }
      check_match(ls, ')', '(', line);
      break;
    }
    case '{': {  /* funcargs -> constructor */
      constructor(ls, &args);
      break;
    }
    case TK_STRING: {  /* funcargs -> STRING */
      codestring(ls, &args, ls->t.seminfo.ts);
      luaX_next(ls);  /* must use 'seminfo' before 'next' */
      break;
    }
    default: {
      luaX_syntaxerror(ls, "function arguments expected");
    }
  }
  lua_assert(f->k == VNONRELOC);
  base = f->u.info;  /* base register for call */
  if (hasmultret(args.k))
    nparams = LUA_MULTRET;  /* open call */
  else {
    if (args.k != VVOID)
      luaK_exp2nextreg(fs, &args);  /* close last argument */
    nparams = fs->freereg - (base+1);
  }
  init_exp(f, VCALL, luaK_codeABC(fs, OP_CALL, base, nparams+1, 2));
  luaK_fixline(fs, line);
  fs->freereg = base+1;  /* call remove function and arguments and leaves
                            (unless changed) one result */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x44(%rbp)
subl $0x28, %eax
je 0x14579
jmp 0x14560
movl -0x44(%rbp), %eax
subl $0x7b, %eax
je 0x145cc
jmp 0x1456a
movl -0x44(%rbp), %eax
subl $0x125, %eax            # imm = 0x125
je 0x145db
jmp 0x145fb
movq -0x8(%rbp), %rdi
callq 0x24650
movq -0x8(%rbp), %rax
cmpl $0x29, 0x10(%rax)
jne 0x14595
movl $0x0, -0x38(%rbp)
jmp 0x145b4
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x14930
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22670
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %ecx
movl $0x29, %esi
movl $0x28, %edx
callq 0x12600
jmp 0x1460b
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x13700
jmp 0x1460b
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0x38(%rbp), %rsi
callq 0x136b0
movq -0x8(%rbp), %rdi
callq 0x24650
jmp 0x1460b
movq -0x8(%rbp), %rdi
leaq 0x20836(%rip), %rsi     # 0x34e3c
callq 0x24390
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0xd, -0x38(%rbp)
je 0x14621
cmpl $0xe, -0x38(%rbp)
jne 0x1462a
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
jmp 0x14650
cmpl $0x0, -0x38(%rbp)
je 0x1463d
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x22950
movq -0x20(%rbp), %rax
movzbl 0x3c(%rax), %eax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movl $0x24, %esi
movl $0x2, %r8d
callq 0x21d20
movq -0x50(%rbp), %rdi
movl %eax, %edx
movl $0xd, %esi
callq 0x11b90
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x23b30
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x3c(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)