// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cqueue_pause
static int cqueue_pause(lua_State *L) {
	struct cqueue *Q = cqueue_checkself(L, 1);
	sigset_t block;
	fd_set rfds;
	int index, error;

	if ((error = cqs_sigmask(SIG_SETMASK, NULL, &block)))
		goto error;

	for (index = 2; index <= lua_gettop(L); index++) {
		sigdelset(&block, luaL_checkint(L, index));
	}

	/* FD_SETSIZE unsigned on FreeBSD. */
	if (Q->kp.fd < 0 || Q->kp.fd >= (int)FD_SETSIZE)
		return luaL_error(L, "cqueue:pause: fd %d outside allowable range 0..%d", Q->kp.fd, (int)(FD_SETSIZE - 1));

	FD_ZERO(&rfds);
	FD_SET(Q->kp.fd, &rfds);

	if (-1 == cqs_pselect(Q->kp.fd + 1, &rfds, NULL, NULL, f2ts(cqueue_timeout_(Q)), &block, &error)) {
		if (error != EINTR)
			goto error;
	}

	return 0;
error:
	return luaL_error(L, "cqueue:pause: %s", cqs_strerror(error));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x13920
movq %rax, -0x18(%rbp)
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0x98(%rbp), %rdx
callq 0x106b0
movl %eax, -0x120(%rbp)
cmpl $0x0, %eax
je 0x12c06
jmp 0x12dab
movl $0x2, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
movl %eax, -0x1d4(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf9b0
movl %eax, %ecx
movl -0x1d4(%rbp), %eax
cmpl %ecx, %eax
jg 0x12c5f
movq -0x10(%rbp), %rdi
movl -0x11c(%rbp), %esi
callq 0x10c70
movl %eax, %esi
leaq -0x98(%rbp), %rdi
callq 0x101a0
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x12c10
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x12c74
movq -0x18(%rbp), %rax
cmpl $0x400, (%rax)          # imm = 0x400
jl 0x12c97
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %edx
leaq 0x3585a(%rip), %rsi     # 0x484df
movl $0x3ff, %ecx            # imm = 0x3FF
movb $0x0, %al
callq 0xfe70
movl %eax, -0x124(%rbp)
jmp 0x12c99
leaq -0x118(%rbp), %rax
movq %rax, -0x138(%rbp)
movl $0x0, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
cmpq $0x10, %rax
jae 0x12ce3
movq -0x138(%rbp), %rax
movl -0x12c(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0x12cb1
jmp 0x12ce5
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x118(%rbp,%rax,8), %rcx
movq %rcx, -0x118(%rbp,%rax,8)
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x1d8(%rbp)
movq $0x0, -0x148(%rbp)
movq $0x0, -0x140(%rbp)
movq -0x18(%rbp), %rdi
callq 0x130f0
leaq -0x148(%rbp), %rdi
callq 0x17290
movl -0x1d8(%rbp), %edi
movq %rax, %r8
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x98(%rbp), %r9
leaq -0x120(%rbp), %rax
movq %rcx, %rdx
movq %rax, (%rsp)
callq 0x17220
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x12da2
cmpl $0x4, -0x120(%rbp)
je 0x12da0
jmp 0x12dab
jmp 0x12da2
movl $0x0, -0x4(%rbp)
jmp 0x12e0a
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl -0x120(%rbp), %eax
movl %eax, -0x1e4(%rbp)
leaq -0x1cc(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0x1e4(%rbp), %edi
leaq -0x1cc(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0x1e0(%rbp), %rdi
movq %rax, %rdx
leaq 0x35714(%rip), %rsi     # 0x48511
movb $0x0, %al
callq 0xfe70
movl %eax, -0x14c(%rbp)
movl -0x4(%rbp), %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopw %cs:(%rax,%rax)