// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/lparser.c
// Function: funcargs
static void funcargs (LexState *ls, expdesc *f) {
  FuncState *fs = ls->fs;
  expdesc args;
  int base, nparams;
  int line = ls->linenumber;
  switch (ls->t.token) {
    case '(': {  /* funcargs -> `(' [ explist1 ] `)' */
      if (line != ls->lastline)
        luaX_syntaxerror(ls,"ambiguous syntax (function call x new statement)");
      luaX_next(ls);
      if (ls->t.token == ')')  /* arg list is empty? */
        args.k = VVOID;
      else {
        explist1(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");
      return;
    }
  }
  lua_assert(f->k == VNONRELOC);
  base = f->u.s.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)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x40(%rbp)
subl $0x28, %eax
je 0x127e8
jmp 0x127c7
movl -0x40(%rbp), %eax
subl $0x7b, %eax
je 0x12857
jmp 0x127d5
movl -0x40(%rbp), %eax
subl $0x11e, %eax            # imm = 0x11E
je 0x12866
jmp 0x12886
movl -0x3c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x12804
movq -0x8(%rbp), %rdi
leaq 0x192fe(%rip), %rsi     # 0x2bafd
callq 0x1e620
movq -0x8(%rbp), %rdi
callq 0x1e820
movq -0x8(%rbp), %rax
cmpl $0x29, 0x10(%rax)
jne 0x12820
movl $0x0, -0x30(%rbp)
jmp 0x1283f
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x12d10
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1c840
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %ecx
movl $0x29, %esi
movl $0x28, %edx
callq 0x10be0
jmp 0x1289b
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x11920
jmp 0x1289b
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0x30(%rbp), %rsi
callq 0x118d0
movq -0x8(%rbp), %rdi
callq 0x1e820
jmp 0x1289b
movq -0x8(%rbp), %rdi
leaq 0x1929d(%rip), %rsi     # 0x2bb2e
callq 0x1e620
jmp 0x1292d
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $0xd, -0x30(%rbp)
je 0x128b1
cmpl $0xe, -0x30(%rbp)
jne 0x128ba
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
jmp 0x128df
cmpl $0x0, -0x30(%rbp)
je 0x128cd
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1cb50
movq -0x18(%rbp), %rax
movl 0x3c(%rax), %eax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movl $0x1c, %esi
movl $0x2, %r8d
callq 0x1c1a0
movq -0x48(%rbp), %rdi
movl %eax, %edx
movl $0xd, %esi
callq 0x11890
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x1dbb0
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x3c(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)