// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lparser.c
// Function: assignment
static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {
  expdesc e;
  check_condition(ls, vkisvar(lh->v.k), "syntax error");
  if (testnext(ls, ',')) {  /* assignment -> ',' suffixedexp assignment */
    struct LHS_assign nv;
    nv.prev = lh;
    suffixedexp(ls, &nv.v);
    if (nv.v.k != VINDEXED)
      check_conflict(ls, lh, &nv.v);
    checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS,
                    "C levels");
    assignment(ls, &nv, nvars+1);
  }
  else {  /* assignment -> '=' explist */
    int nexps;
    checknext(ls, '=');
    nexps = explist(ls, &e);
    if (nexps != nvars) {
      adjust_assign(ls, nvars, nexps, &e);
      if (nexps > nvars)
        ls->fs->freereg -= nexps - nvars;  /* remove extra values */
    }
    else {
      luaK_setoneret(ls->fs, &e);  /* close last expression */
      luaK_storevar(ls->fs, &lh->v, &e);
      return;  /* avoid default */
    }
  }
  init_exp(&e, VNONRELOC, ls->fs->freereg-1);  /* default assignment */
  luaK_storevar(ls->fs, &lh->v, &e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl 0x8(%rsi), %eax
addl $-0x8, %eax
cmpl $0x3, %eax
jae 0xefb6
movl %edx, %ebp
movq %rsi, %rbx
cmpl $0x2c, 0x10(%r14)
jne 0xef2b
movq %r14, %rdi
callq 0x17a92
leaq 0x10(%rsp), %r15
movq %rbx, -0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0xe193
movl (%r15), %eax
cmpl $0xa, %eax
je 0xef00
movq 0x30(%r14), %r15
movb 0x3c(%r15), %cl
movzbl %cl, %edx
xorl %edi, %edi
movq %rbx, %rsi
cmpl $0xa, 0x8(%rsi)
jne 0xeecd
movzbl 0x13(%rsi), %r8d
cmpl %r8d, %eax
jne 0xeea9
movzbl 0x12(%rsi), %r8d
cmpl %r8d, 0x18(%rsp)
jne 0xeea9
movb $0x8, 0x13(%rsi)
movb %cl, 0x12(%rsi)
movl $0x1, %edi
cmpl $0x8, %eax
jne 0xeecd
movswl 0x10(%rsi), %r8d
cmpl %r8d, 0x18(%rsp)
jne 0xeecd
movw %dx, 0x10(%rsi)
movq (%rsi), %rsi
movl $0x1, %edi
testq %rsi, %rsi
jne 0xee81
jmp 0xeed9
movq (%rsi), %rsi
testq %rsi, %rsi
jne 0xee81
testl %edi, %edi
je 0xef00
xorl %ecx, %ecx
cmpl $0x8, %eax
setne %cl
leal (%rcx,%rcx,4), %esi
movl 0x18(%rsp), %ecx
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x161bd
movq %r15, %rdi
movl $0x1, %esi
callq 0x164fc
movq 0x38(%r14), %rax
movzwl 0xc6(%rax), %eax
addl %ebp, %eax
cmpl $0xc9, %eax
jge 0xefc5
incl %ebp
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0xee1d
jmp 0xef7b
movq %r14, %rdi
movl $0x3d, %esi
callq 0xd6fa
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xe932
movq 0x30(%r14), %rdi
cmpl %eax, %ebp
jne 0xef5d
leaq 0x8(%rsp), %rsi
callq 0x167fe
movq 0x30(%r14), %rdi
jmp 0xef9a
movl %eax, %r15d
leaq 0x8(%rsp), %rcx
movl %ebp, %esi
movl %eax, %edx
callq 0xeda2
subl %r15d, %ebp
jge 0xef7b
movq 0x30(%r14), %rax
addb %bpl, 0x3c(%rax)
movq 0x30(%r14), %rdi
movzbl 0x3c(%rdi), %eax
decl %eax
movq $-0x1, 0x18(%rsp)
movl $0x7, 0x8(%rsp)
movl %eax, 0x10(%rsp)
addq $0x8, %rbx
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x16bc4
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13cb1(%rip), %rsi     # 0x22c6e
movq %r14, %rdi
callq 0x1790e
movq 0x30(%r14), %rdi
leaq 0x13abc(%rip), %rdx     # 0x22a8c
movl $0xc8, %esi
callq 0xca81
nop