// File: /workspace/github_c_makefile_star2_O0/kieselsteini[P]PiXL-old/lua53.c
// Function: lua_resume
LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) {
  int status;
  unsigned short oldnny = L->nny;  /* save "number of non-yieldable" calls */
  lua_lock(L);
  if (L->status == LUA_OK) {  /* may be starting a coroutine */
    if (L->ci != &L->base_ci)  /* not in base level? */
      return resume_error(L, "cannot resume non-suspended coroutine", nargs);
  }
  else if (L->status != LUA_YIELD)
    return resume_error(L, "cannot resume dead coroutine", nargs);
  L->nCcalls = (from) ? from->nCcalls + 1 : 1;
  if (L->nCcalls >= LUAI_MAXCCALLS)
    return resume_error(L, "C stack overflow", nargs);
  luai_userstateresume(L, nargs);
  L->nny = 0;  /* allow yields */
  api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs);
  status = luaD_rawrunprotected(L, resume, &nargs);
  if (status == -1)  /* error calling 'lua_resume'? */
    status = LUA_ERRRUN;
  else {  /* continue running after recoverable errors */
    while (errorstatus(status) && recover(L, status)) {
      /* unroll continuation */
      status = luaD_rawrunprotected(L, unroll, &status);
    }
    if (errorstatus(status)) {  /* unrecoverable error? */
      L->status = cast_byte(status);  /* mark thread as 'dead' */
      seterrorobj(L, status, L->top);  /* push error message */
      L->ci->top = L->top;
    }
    else lua_assert(status == L->status);  /* normal end or yield */
  }
  L->nny = oldnny;  /* restore 'nny' */
  L->nCcalls--;
  lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0));
  lua_unlock(L);
  return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movw 0xc4(%rax), %ax
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xc(%rax), %eax
cmpl $0x0, %eax
jne 0x19d11
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
addq $0x60, %rcx
cmpq %rcx, %rax
je 0x19d0f
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x3bd41(%rip), %rsi     # 0x55a43
callq 0x19e90
movl %eax, -0x4(%rbp)
jmp 0x19e82
jmp 0x19d3b
movq -0x10(%rbp), %rax
movzbl 0xc(%rax), %eax
cmpl $0x1, %eax
je 0x19d39
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x3bd3d(%rip), %rsi     # 0x55a69
callq 0x19e90
movl %eax, -0x4(%rbp)
jmp 0x19e82
jmp 0x19d3b
cmpq $0x0, -0x18(%rbp)
je 0x19d55
movq -0x18(%rbp), %rax
movzwl 0xc6(%rax), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x19d5f
movl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x19d5f
movl -0x28(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc6(%rax)
movq -0x10(%rbp), %rax
movzwl 0xc6(%rax), %eax
cmpl $0xc8, %eax
jl 0x19d9d
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %edx
leaq 0x3bcf6(%rip), %rsi     # 0x55a86
callq 0x19e90
movl %eax, -0x4(%rbp)
jmp 0x19e82
movq -0x10(%rbp), %rax
movw $0x0, 0xc4(%rax)
movq -0x10(%rbp), %rdi
leaq 0x1bb(%rip), %rsi       # 0x19f70
leaq -0x1c(%rbp), %rdx
callq 0x6ac0
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x19dd3
movl $0x2, -0x20(%rbp)
jmp 0x19e57
jmp 0x19dd5
xorl %eax, %eax
cmpl $0x1, -0x20(%rbp)
movb %al, -0x29(%rbp)
jle 0x19df5
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x1a090
cmpl $0x0, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x19dfe
jmp 0x19e17
movq -0x10(%rbp), %rdi
leaq 0x347(%rip), %rsi       # 0x1a150
leaq -0x20(%rbp), %rdx
callq 0x6ac0
movl %eax, -0x20(%rbp)
jmp 0x19dd5
cmpl $0x1, -0x20(%rbp)
jle 0x19e53
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x14280
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x19e55
jmp 0x19e55
jmp 0x19e57
movw -0x22(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc4(%rax)
movq -0x10(%rbp), %rax
movw 0xc6(%rax), %cx
addw $-0x1, %cx
movw %cx, 0xc6(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)