// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cqueue_step_cont
static int cqueue_step_cont(lua_State *L) {
#endif
	int nargs = lua_gettop(L);
	struct callinfo I = CALLINFO_INITIALIZER;
	struct cqueue *Q = cqueue_checkself(L, 1);
	struct thread *T = Q->thread.current;
	if (!T) {
		luaL_error(L, "cqueue not yielded");
		NOTREACHED;
	}
	if (lua_islightuserdata(L, 2) && lua_touserdata(L, 2) == CQUEUE__POLL) {
		luaL_error(L, "cannot resume a coroutine passing internal cqueues._POLL value as first parameter");
		NOTREACHED;
	}
	/* move arguments onto resumed stack */
	lua_xmove(L, T->L, nargs-1);

	cqueue_enter(L, &I, 1);

	switch(cqueue_process_threads(L, Q, &I)) {
	case LUA_OK:
		break;
	case LUA_YIELD:
		/* clear everything off the stack except for cqueue object; `I` now invalid */
		lua_settop(L, 1);
#if LUA_VERSION_NUM >= 502
		/* move arguments onto 'main' stack to return them from this yield */
		nargs = lua_gettop(Q->thread.current->L);
		lua_xmove(Q->thread.current->L, L, nargs);
		return lua_yieldk(L, nargs, 0, cqueue_step_cont);
#else
		lua_pushliteral(L, "yielded");
		/* move arguments onto 'main' stack to return them from this yield */
		nargs = lua_gettop(Q->thread.current->L);
		lua_xmove(Q->thread.current->L, L, nargs);
		return nargs+1;
#endif
	default:
		goto oops;
	}

	lua_pushboolean(L, 1);

	return 1;
oops:
	Q->thread.current = NULL;
	lua_pushboolean(L, 0);
	return 1 + err_pushinfo(L, &I);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf9b0
movl %eax, -0x24(%rbp)
movq 0x34b0e(%rip), %rax     # 0x48094
movq %rax, -0x3c(%rbp)
movq 0x34b0b(%rip), %rax     # 0x4809c
movq %rax, -0x34(%rbp)
movq 0x34b08(%rip), %rax     # 0x480a4
movq %rax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x13920
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x218(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x135dd
movq -0x10(%rbp), %rdi
leaq 0x34e36(%rip), %rsi     # 0x48409
movb $0x0, %al
callq 0xfe70
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0xf280
cmpl $0x2, %eax
jne 0x1361f
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x104b0
movq 0x48953(%rip), %rcx     # 0x5bf58
cmpq %rcx, %rax
jne 0x1361f
movq -0x10(%rbp), %rdi
leaq 0x34e07(%rip), %rsi     # 0x4841c
movb $0x0, %al
callq 0xfe70
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movl -0x24(%rbp), %edx
decl %edx
callq 0x10380
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
movq %rsi, -0x70(%rbp)
movl $0x1, %edx
callq 0x12ff0
movq -0x70(%rbp), %rdx
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x13d50
movl %eax, %ecx
movl %ecx, -0x64(%rbp)
testl %eax, %eax
je 0x13670
jmp 0x13666
movl -0x64(%rbp), %eax
subl $0x1, %eax
je 0x13672
jmp 0x136cc
jmp 0x136ce
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x107f0
movq -0x48(%rbp), %rax
movq 0x218(%rax), %rax
movq (%rax), %rdi
callq 0xf9b0
movl %eax, -0x24(%rbp)
movq -0x48(%rbp), %rax
movq 0x218(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x10380
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0x162(%rip), %rcx      # 0x13560
callq 0xf0b0
movl %eax, -0x4(%rbp)
jmp 0x13712
jmp 0x136e5
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x109d0
movl $0x1, -0x4(%rbp)
jmp 0x13712
movq -0x48(%rbp), %rax
movq $0x0, 0x218(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x109d0
movq -0x10(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x13720
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)