// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/lparser.c
// Function: statement
static void statement (LexState *ls) {
  int line = ls->linenumber;  /* may be needed for error messages */
  enterlevel(ls);
  switch (ls->t.token) {
    case ';': {  /* stat -> ';' (empty statement) */
      luaX_next(ls);  /* skip ';' */
      break;
    }
    case TK_IF: {  /* stat -> ifstat */
      ifstat(ls, line);
      break;
    }
    case TK_WHILE: {  /* stat -> whilestat */
      whilestat(ls, line);
      break;
    }
    case TK_DO: {  /* stat -> DO block END */
      luaX_next(ls);  /* skip DO */
      block(ls);
      check_match(ls, TK_END, TK_DO, line);
      break;
    }
    case TK_FOR: {  /* stat -> forstat */
      forstat(ls, line);
      break;
    }
    case TK_REPEAT: {  /* stat -> repeatstat */
      repeatstat(ls, line);
      break;
    }
    case TK_FUNCTION: {  /* stat -> funcstat */
      funcstat(ls, line);
      break;
    }
    case TK_LOCAL: {  /* stat -> localstat */
      luaX_next(ls);  /* skip LOCAL */
      if (testnext(ls, TK_FUNCTION))  /* local function? */
        localfunc(ls);
      else
        localstat(ls);
      break;
    }
    case TK_DBCOLON: {  /* stat -> label */
      luaX_next(ls);  /* skip double colon */
      labelstat(ls, str_checkname(ls), line);
      break;
    }
    case TK_RETURN: {  /* stat -> retstat */
      luaX_next(ls);  /* skip RETURN */
      retstat(ls);
      break;
    }
    case TK_BREAK:   /* stat -> breakstat */
    case TK_GOTO: {  /* stat -> 'goto' NAME */
      gotostat(ls, luaK_jump(ls->fs));
      break;
    }
    default: {  /* stat -> func | assignment */
      exprstat(ls);
      break;
    }
  }
  lua_assert(ls->fs->f->maxstacksize >= ls->fs->freereg &&
             ls->fs->freereg >= ls->fs->nactvar);
  ls->fs->freereg = ls->fs->nactvar;  /* free registers */
  leavelevel(ls);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12410
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x10(%rbp)
subl $0x3b, %eax
je 0x1229f
jmp 0x121f4
movl -0x10(%rbp), %eax
subl $0x102, %eax            # imm = 0x102
je 0x123a0
jmp 0x12204
movl -0x10(%rbp), %eax
subl $0x103, %eax            # imm = 0x103
je 0x122cf
jmp 0x12214
movl -0x10(%rbp), %eax
subl $0x108, %eax            # imm = 0x108
je 0x122fc
jmp 0x12224
movl -0x10(%rbp), %eax
subl $0x109, %eax            # imm = 0x109
je 0x1231e
jmp 0x12234
movl -0x10(%rbp), %eax
subl $0x10a, %eax            # imm = 0x10A
je 0x123a0
jmp 0x12244
movl -0x10(%rbp), %eax
subl $0x10b, %eax            # imm = 0x10B
je 0x122ad
jmp 0x12250
movl -0x10(%rbp), %eax
subl $0x10d, %eax            # imm = 0x10D
je 0x1232f
jmp 0x12260
movl -0x10(%rbp), %eax
subl $0x111, %eax            # imm = 0x111
je 0x1230d
jmp 0x12270
movl -0x10(%rbp), %eax
subl $0x112, %eax            # imm = 0x112
je 0x1238c
jmp 0x12280
movl -0x10(%rbp), %eax
subl $0x116, %eax            # imm = 0x116
je 0x122be
jmp 0x1228c
movl -0x10(%rbp), %eax
subl $0x120, %eax            # imm = 0x120
je 0x12361
jmp 0x123c2
movq -0x8(%rbp), %rdi
callq 0x24650
jmp 0x123cb
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x12470
jmp 0x123cb
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x12500
jmp 0x123cb
movq -0x8(%rbp), %rdi
callq 0x24650
movq -0x8(%rbp), %rdi
callq 0x125c0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl $0x106, %esi            # imm = 0x106
movl $0x103, %edx            # imm = 0x103
callq 0x12600
jmp 0x123cb
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x126a0
jmp 0x123cb
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x12760
jmp 0x123cb
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x12820
jmp 0x123cb
movq -0x8(%rbp), %rdi
callq 0x24650
movq -0x8(%rbp), %rdi
movl $0x109, %esi            # imm = 0x109
callq 0x12890
cmpl $0x0, %eax
je 0x12356
movq -0x8(%rbp), %rdi
callq 0x128d0
jmp 0x1235f
movq -0x8(%rbp), %rdi
callq 0x12950
jmp 0x123cb
movq -0x8(%rbp), %rdi
callq 0x24650
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12af0
movq -0x18(%rbp), %rdi
movq %rax, %rsi
movl -0xc(%rbp), %edx
callq 0x12a00
jmp 0x123cb
movq -0x8(%rbp), %rdi
callq 0x24650
movq -0x8(%rbp), %rdi
callq 0x12b30
jmp 0x123cb
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x21ec0
movq -0x20(%rbp), %rdi
movl %eax, %esi
callq 0x12c50
jmp 0x123cb
movq -0x8(%rbp), %rdi
callq 0x12cf0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x3a(%rax), %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x3c(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movw 0xc6(%rax), %cx
addw $-0x1, %cx
movw %cx, 0xc6(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)