// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/lparser.c
// Function: luaY_parser
LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
                       Dyndata *dyd, const char *name, int firstchar) {
  LexState lexstate;
  FuncState funcstate;
  LClosure *cl = luaF_newLclosure(L, 1);  /* create main closure */
  setclLvalue(L, L->top, cl);  /* anchor it (to avoid being collected) */
  luaD_inctop(L);
  lexstate.h = luaH_new(L);  /* create table for scanner */
  sethvalue(L, L->top, lexstate.h);  /* anchor it */
  luaD_inctop(L);
  funcstate.f = cl->p = luaF_newproto(L);
  funcstate.f->source = luaS_new(L, name);  /* create and anchor TString */
  lua_assert(iswhite(funcstate.f));  /* do not need barrier here */
  lexstate.buff = buff;
  lexstate.dyd = dyd;
  dyd->actvar.n = dyd->gt.n = dyd->label.n = 0;
  luaX_setinput(L, &lexstate, z, funcstate.f->source, firstchar);
  mainfunc(&lexstate, &funcstate);
  lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs);
  /* all scopes should be correctly finished */
  lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0);
  L->top--;  /* remove scanner's table */
  return cl;  /* closure is on the stack, too */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movl $0x1, %esi
callq 0x9b15
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl $0x46, 0x8(%rax)
movq %rbx, %rdi
callq 0x87e7
movq %rbx, %rdi
callq 0xfa85
leaq 0x48(%rsp), %r15
movq %rax, 0x50(%r15)
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movl $0x45, 0x8(%rcx)
movq %rbx, %rdi
callq 0x87e7
movq %rbx, %rdi
callq 0x9cc0
movq %rax, 0x18(%r14)
leaq 0xb8(%rsp), %r12
movq %rax, (%r12)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xf52a
movq (%r12), %rcx
movq %rax, 0x68(%rcx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x48(%r15)
movq %rbp, 0x58(%r15)
xorl %r13d, %r13d
movl %r13d, 0x28(%rbp)
movl %r13d, 0x18(%rbp)
movl %r13d, 0x8(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movl 0x4(%rsp), %r8d
callq 0x16e94
movq 0x30(%r15), %rax
movq 0x58(%r15), %rcx
movq %rax, 0x8(%r12)
movq %r15, 0x10(%r12)
movq %r12, 0x30(%r15)
movaps 0x156d9(%rip), %xmm0    # 0x218e0
movups %xmm0, 0x20(%r12)
movl %r13d, 0x30(%r12)
movl %r13d, 0x38(%r12)
movb %r13b, 0x3c(%r12)
movl 0x8(%rcx), %eax
movl %eax, 0x34(%r12)
movq %r13, 0x18(%r12)
movq (%r12), %rax
movq 0x60(%r15), %rdx
movq %rdx, 0x68(%rax)
movb $0x2, %dl
movb %dl, 0xc(%rax)
leaq 0x30(%rsp), %rsi
movb %r13b, 0x12(%rsi)
movb %r13b, 0x10(%rsi)
movl 0x28(%rcx), %edi
movl %edi, 0x8(%rsi)
movl 0x18(%rcx), %ecx
movl %ecx, 0xc(%rsi)
movb %r13b, 0x11(%rsi)
movq %r13, (%rsi)
movq %rsi, 0x18(%r12)
movb %dl, 0xb(%rax)
leaq 0x18(%rsp), %rdx
movq $-0x1, 0x10(%rdx)
movl $0x8, (%rdx)
movl %r13d, 0x8(%rdx)
movq 0x68(%r15), %rsi
movq %r12, %rdi
callq 0xc2d2
movq %r15, %rdi
callq 0x16f0a
movq %r15, %rdi
callq 0xc3c2
cmpl $0x121, 0x10(%r15)      # imm = 0x121
jne 0xc2c3
leaq 0x48(%rsp), %rdi
callq 0xc404
addq $-0x10, 0x10(%rbx)
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rsp), %rdi
movl $0x121, %esi            # imm = 0x121
callq 0xe6ef