// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rdi), %rbx
movl 0x4(%rdi), %ebp
movl 0x10(%rdi), %eax
cmpl $0x11e, %eax            # imm = 0x11E
je 0xc572
cmpl $0x7b, %eax
je 0xc563
cmpl $0x28, %eax
jne 0xc5a1
cmpl 0x8(%r15), %ebp
je 0xc54a
leaq 0xf591(%rip), %rsi      # 0x1bad3
movq %r15, %rdi
callq 0x13085
movq %r15, %rdi
callq 0x1315f
cmpl $0x29, 0x10(%r15)
jne 0xc5bc
movl $0x0, 0x8(%rsp)
jmp 0xc5dc
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0xbac1
jmp 0xc5f0
movq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0x11bc5
movq $-0x1, 0x18(%rsp)
movl $0x4, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1315f
movl 0x8(%r14), %r15d
jmp 0xc606
leaq 0xf55c(%rip), %rsi      # 0x1bb04
movq %r15, %rdi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x13085
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xc887
movq %rbx, %rdi
movq %r12, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11de4
movq %r15, %rdi
movl $0x29, %esi
movl $0x28, %edx
movl %ebp, %ecx
callq 0xb610
movl 0x8(%rsp), %eax
movl 0x8(%r14), %r15d
leal -0xd(%rax), %edx
xorl %ecx, %ecx
cmpl $0x2, %edx
jb 0xc619
testl %eax, %eax
je 0xc613
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x11f51
movl 0x3c(%rbx), %ecx
subl %r15d, %ecx
movq %rbx, %rdi
movl $0x1c, %esi
movl %r15d, %edx
movl $0x2, %r8d
callq 0x11983
movq $-0x1, 0x10(%r14)
movl $0xd, (%r14)
movl %eax, 0x8(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x12b94
incl %r15d
movl %r15d, 0x3c(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq