LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/almk277[P]ROSE/lib/mm.c
// Function: mm_pool_alloc
void mm_pool_alloc(struct mm_pool_struct *pool)
{
	const unsigned size = pool->el_size;
	unsigned poolsize = pool->size;
	char *mem = malloc(size * poolsize);
#ifdef TEST
	++alloc_count;
#endif
	if(unlikely(mem == NULL)) {
		poolsize = MM_MIN_SIZE;
		mem = malloc(size * MM_MIN_SIZE);
		if(unlikely(mem == NULL)) {
			if(mm_on_error)
				mem = mm_on_error(pool);
			else {
				fputs(__FILE__ ": ERROR: Out of memory", stderr);
				exit(1);
			}
		}
	}

	pool->head = mem;
	for(--poolsize; poolsize != 0; --poolsize, mem += size)
		*(void **)mem = mem + size;
	*(void **)mem = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
movl %eax, %eax
movl %eax, %edi
callq 0x1130
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5171
movl $0x4, -0x10(%rbp)
movl -0xc(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x1130
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x516f
cmpq $0x0, 0x47f8(%rip)      # 0x9930
je 0x514d
movq 0x47ef(%rip), %rax      # 0x9930
movq -0x8(%rbp), %rdi
callq *%rax
movq %rax, -0x18(%rbp)
jmp 0x516d
movq 0x3e9c(%rip), %rax      # 0x8ff0
movq (%rax), %rsi
leaq 0x127d(%rip), %rdi      # 0x63db
callq 0x10e0
movl $0x1, %edi
callq 0x1150
jmp 0x516f
jmp 0x5171
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x51b7
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x5185
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/almk277[P]ROSE/lib/loader.c
// Function: add
static int add(const char *path, int length)
{
	StdPath *sp;
	if(length == 0 || length > 255)
		return 0;
	sp = mm_alloc(StdPath);
	sp->length = length;
	memcpy(sp->buffer, path, length);
	if(path[length - 1] != '/')
		sp->buffer[sp->length++] = '/';
	SIMPLEQ_INSERT_TAIL(&stdpath_list, sp, pe);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x521e
cmpl $0xff, -0x14(%rbp)
jle 0x522a
movl $0x0, -0x4(%rbp)
jmp 0x52c3
leaq 0x3ecf(%rip), %rdi      # 0x9100
callq 0x5520
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x1120
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x528c
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rdx
movb (%rdx), %cl
movb %cl, %sil
addb $0x1, %sil
movb %sil, (%rdx)
movzbl %cl, %ecx
movb $0x2f, 0x1(%rax,%rcx)
jmp 0x528e
movq -0x20(%rbp), %rax
movq $0x0, 0x108(%rax)
movq -0x20(%rbp), %rcx
movq 0x3e50(%rip), %rax      # 0x90f8
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x3e3c(%rip)      # 0x90f8
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/almk277[P]ROSE/lib/loader.c
// Function: loader_add_dirs_from_env
void loader_add_dirs_from_env()
{
	const char *rosepath = getenv("ROSEPATH");
	if(rosepath) {
		const char *start, *end;
		for(start = rosepath, end = strchr(rosepath, ':'); end;
				start = end + 1, end = strchr(start, ':')) {
			add(start, end - start);
		}
		add(start, strlen(start));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x1117(%rip), %rdi      # 0x63f6
callq 0x1030
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5362
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3a, %esi
callq 0x10b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5346
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
callq 0x5200
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3a, %esi
callq 0x10b0
movq %rax, -0x18(%rbp)
jmp 0x5309
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10a0
movq -0x20(%rbp), %rdi
movl %eax, %esi
callq 0x5200
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/almk277[P]ROSE/lib/loader.c
// Function: loader_add_dir_from_file
int loader_add_dir_from_file(const char *fname)
{
	const char *slash = strrchr(fname, '/');
	return slash ?
		add(fname, slash - fname + 1) : /* cut out last path component */
		add("./", 2);                   /* use current directory */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x10d0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x53b4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, %esi
callq 0x5200
movl %eax, -0x14(%rbp)
jmp 0x53c8
leaq 0x1044(%rip), %rdi      # 0x63ff
movl $0x2, %esi
callq 0x5200
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/almk277[P]ROSE/lib/loader.c
// Function: loader_find_module
FILE *loader_find_module(Symbol *name)
{
	StdPath *ent;
	const int flen = strlen(name);
	SIMPLEQ_FOREACH(ent, &stdpath_list, pe) {
		FILE *f;
		static const char suffix[] = ".rmd";
		char *const buf = ent->buffer;
		const int dlen = ent->length;
		const int len = dlen + flen;
		if(len + sizeof suffix > 255)
			continue;
		strcpy(buf + dlen, name);
		memcpy(buf + len, suffix, sizeof suffix);
		f = fopen(buf, "rb");
		if(f)
			return f;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10a0
movl %eax, -0x1c(%rbp)
movq 0x3cf1(%rip), %rax      # 0x90f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x54a9
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
movslq -0x38(%rbp), %rax
addq $0x5, %rax
cmpq $0xff, %rax
jbe 0x543f
jmp 0x5495
movq -0x30(%rbp), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x1070
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl 0xfa1(%rip), %edx       # 0x6402
movl %edx, (%rax,%rcx)
movb 0xf9c(%rip), %dl        # 0x6406
movb %dl, 0x4(%rax,%rcx)
movq -0x30(%rbp), %rdi
leaq 0xb98(%rip), %rsi       # 0x6011
callq 0x1140
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5493
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x54b1
jmp 0x5495
movq -0x18(%rbp), %rax
movq 0x108(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5403
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/almk277[P]ROSE/lib/loader.c
// Function: loader_print_pathes
void loader_print_pathes()
{
	StdPath *ent;
	SIMPLEQ_FOREACH(ent, &stdpath_list, pe) {
		fwrite(ent->buffer, ent->length, 1, stdout);
		putchar('\n');
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x3c21(%rip), %rax      # 0x90f0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x551a
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %esi
movq 0x3ad6(%rip), %rax      # 0x8fc8
movq (%rax), %rcx
movl $0x1, %edx
callq 0x1160
movl $0xa, %edi
callq 0x1050
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x54d3
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/stv0g[P]c11-queues/spsc_ub_test_default.c
// Function: thread_func_push
int thread_func_push(void *ctx)
{
	struct spsc_ub_queue *q = (struct spsc_ub_queue *) ctx;

	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();

	/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();

	for (int iter = 0; iter != iter_count; ++iter) {
		for (size_t i = 0; i != batch_size; i += 1) {
			void *ptr = (void *) i;
			spsc_ub_queue_push(q, ptr);	//FIXME
		}
	}
	thrd_yield();

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1080
movl %eax, %eax
movq %rax, -0x40(%rbp)
callq 0x11f0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movl %eax, %edi
callq 0x1070
callq 0x10e0
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movslq %edx, %rax
movq %rax, -0x18(%rbp)
movl 0x2e39(%rip), %eax      # 0x408c
cmpl $0x0, %eax
jne 0x125f
callq 0x12e0
jmp 0x124d
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x1281
pause
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1267
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x1312d00, %rax        # imm = 0x1312D00
je 0x12d3
movq $0x0, -0x30(%rbp)
cmpq $0xa, -0x30(%rbp)
je 0x12c6
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x16f0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x129c
jmp 0x12c8
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1288
callq 0x12e0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/stv0g[P]c11-queues/spsc_ub_test_default.c
// Function: thread_func_pull
int thread_func_pull(void *ctx)
{
	struct spsc_ub_queue *q = (struct spsc_ub_queue *) ctx;

	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();

	/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();

	for (int iter = 0; iter != iter_count; ++iter) {
		for (size_t i = 0; i != batch_size; i += 1) {
			void *ptr;
			while (!spsc_ub_queue_pull(q, &ptr)){
				continue;
			}	//FIXME
		}
	}
	thrd_yield(); // queue empty
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1080
movl %eax, %eax
movq %rax, -0x40(%rbp)
callq 0x11f0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movl %eax, %edi
callq 0x1070
callq 0x10e0
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movslq %edx, %rax
movq %rax, -0x18(%rbp)
movl 0x2d49(%rip), %eax      # 0x408c
cmpl $0x0, %eax
jne 0x134f
callq 0x12e0
jmp 0x133d
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x1371
pause
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1357
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x1312d00, %rax        # imm = 0x1312D00
je 0x13cf
movq $0x0, -0x30(%rbp)
cmpq $0xa, -0x30(%rbp)
je 0x13c2
jmp 0x1395
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1760
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x13b0
jmp 0x13b2
jmp 0x1395
jmp 0x13b4
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x138c
jmp 0x13c4
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1378
callq 0x12e0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stv0g[P]c11-queues/spsc_ub_test_default.c
// Function: main
int main()
{
	struct spsc_ub_queue queue;
	thrd_t threads[thread_count + 1];
	int ret;
	
	spsc_ub_queue_init(&queue, batch_size * iter_count, &memtype_heap);

	printf("spsc_ub_queue_init successful\n");
	//for (int i = 0; i != thread_count; ++i)
	thrd_create(&threads[0], thread_func_push, &queue);
	thrd_create(&threads[1], thread_func_pull, &queue);

	sleep(1);

	uint64_t start = rdtscp();
	g_start = 1;

	//for (int i = 0; i != thread_count; ++i)
	thrd_join(threads[0], NULL);
	thrd_join(threads[1], NULL);

	uint64_t end = rdtscp();
	
	printf("cycles/op = %lu\n", (end - start) / (batch_size * iter_count * 2 * thread_count));

	if (queue._tail->_next != NULL)
		printf("slots in use? There is something wrong with the test\n");
	
	ret = spsc_ub_queue_destroy(&queue);
	if (ret)
		printf("Failed to destroy queue: %d", ret);
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movl $0x0, -0x14(%rbp)
movq %rsp, %rax
movq %rax, -0x188(%rbp)
leaq 0x297d(%rip), %rdx      # 0x3d80
leaq -0x180(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
movl $0xbebc200, %esi        # imm = 0xBEBC200
callq 0x1610
leaq 0xbfe(%rip), %rdi       # 0x2020
xorl %eax, %eax
movl %eax, -0x1c4(%rbp)
movb %al, -0x1b1(%rbp)
callq 0x1050
movq -0x1d0(%rbp), %rdx
leaq -0x243(%rip), %rsi      # 0x1200
leaq -0x1b0(%rbp), %rdi
callq 0x1580
movq -0x1d0(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
leaq -0x174(%rip), %rsi      # 0x12f0
callq 0x1580
movl $0x1, %edi
callq 0x10d0
rdtscp
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %rcx
movl -0x1c4(%rbp), %eax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x198(%rbp)
movl $0x1, 0x2bed(%rip)      # 0x408c
movq -0x1b0(%rbp), %rdi
movl %eax, %esi
movq %rsi, -0x1c0(%rbp)
callq 0x15c0
movq -0x1c0(%rbp), %rsi
movq -0x1a8(%rbp), %rdi
callq 0x15c0
rdtscp
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movq -0x198(%rbp), %rcx
subq %rcx, %rax
movabsq $-0x543388ee7b9e3103, %rcx # imm = 0xABCC77118461CEFD
mulq %rcx
movb -0x1b1(%rbp), %al
movq %rdx, %rsi
shrq $0x1c, %rsi
leaq 0xb2d(%rip), %rdi       # 0x203f
callq 0x1050
movq -0x138(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1532
leaq 0xb25(%rip), %rdi       # 0x2050
movb $0x0, %al
callq 0x1050
leaq -0x180(%rbp), %rdi
callq 0x17d0
movl %eax, -0x18c(%rbp)
cmpl $0x0, -0x18c(%rbp)
je 0x1561
movl -0x18c(%rbp), %esi
leaq 0xb2c(%rip), %rdi       # 0x2086
movb $0x0, %al
callq 0x1050
movl $0x0, -0x14(%rbp)
movq -0x188(%rbp), %rax
movq %rax, %rsp
movl -0x14(%rbp), %eax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: luaopen__cqueues_condition
int luaopen__cqueues_condition(lua_State *L) {
	lua_pushnil(L); /* initial upvalue */
	cqs_newmetatable(L, CQS_CONDITION, cond_methods, cond_metatable, 1);
	lua_pushvalue(L, -1); /* push self as replacement upvalue */
	cqs_setmetaupvalue(L, -2, 1); /* insert self as 1st upvalue  */

	/* capture metatable here, too. */
	luaL_newlibtable(L, cond_globals);
	lua_pushvalue(L, -2);
	luaL_setfuncs(L, cond_globals, 1);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfa10
movq -0x8(%rbp), %rdi
leaq 0x372f4(%rip), %rsi     # 0x480c4
leaq 0x483d9(%rip), %rdx     # 0x591b0
leaq 0x48432(%rip), %rcx     # 0x59210
movl $0x1, %r8d
callq 0x10e50
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xfa50
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x1, %edx
callq 0x10f70
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x10330
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xfa50
movq -0x8(%rbp), %rdi
leaq 0x4840d(%rip), %rsi     # 0x59240
movl $0x1, %edx
callq 0x10390
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_newmetatable
static inline void cqs_newmetatable(lua_State *L, const char *name, const luaL_Reg *methods, const luaL_Reg *metamethods, int nup) {
	int i;

	luaL_newmetatable(L, name);
	for (i = 0; i < nup; i++) /* copy upvalues */
		lua_pushvalue(L, -nup - 1);
	luaL_setfuncs(L, metamethods, nup);

	lua_createtable(L, 0, cqs_regcount(methods));
	for (i = 0; i < nup; i++) /* copy upvalues */
		lua_pushvalue(L, -nup - 2);
	luaL_setfuncs(L, methods, nup);
	lua_setfield(L, -2, "__index");

	for (i = 0; i < nup; i++) /* remove the upvalues */
		lua_remove(L, -2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x102d0
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x10ea4
movq -0x8(%rbp), %rdi
xorl %esi, %esi
subl -0x24(%rbp), %esi
subl $0x1, %esi
callq 0xfa50
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10e80
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x10390
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x11650
movq -0x30(%rbp), %rdi
movl %eax, %edx
xorl %esi, %esi
callq 0x10330
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x10efd
movq -0x8(%rbp), %rdi
xorl %esi, %esi
subl -0x24(%rbp), %esi
subl $0x2, %esi
callq 0xfa50
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10ed9
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x10390
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x3727e(%rip), %rdx     # 0x4819b
callq 0xf580
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x10f5d
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xf0f0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10f29
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_setmetaupvalue
static inline void cqs_setmetaupvalue(lua_State *L, int tindex, int n) {
	tindex = lua_absindex(L, tindex);

	lua_pushvalue(L, -1);
	cqs_setfuncsupvalue(L, tindex, n);

	lua_getfield(L, tindex, "__index");
	lua_pushvalue(L, -2);
	cqs_setfuncsupvalue(L, -2, n);
	lua_pop(L, 1); /* pop __index */

	lua_pop(L, 1); /* pop upvalue */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xf2a0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xfa50
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x11b30
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x371df(%rip), %rdx     # 0x4819b
callq 0xf200
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xfa50
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x11b30
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cqs_sigmask
cqs_error_t cqs_sigmask(int how, const sigset_t *set, sigset_t *oset) {
	if (oset)
		sigemptyset(oset);

#if (defined _REENTRANT || defined _THREAD_SAFE) && _POSIX_THREADS > 0
	return pthread_sigmask(how, set, oset);
#else
	return sigprocmask(how, set, oset)? errno : 0;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x11033
movq -0x18(%rbp), %rdi
callq 0x10150
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf390
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cstack_self
static struct cstack *cstack_self(lua_State *L) {
	static const int index = 47;
	struct cstack *CS;

	lua_rawgetp(L, LUA_REGISTRYINDEX, CQS_UNIQUE_LIGHTUSERDATA_MASK(&index));

	CS = lua_touserdata(L, -1);

	lua_pop(L, 1);

	if (CS)
		return CS;

	CS = lua_newuserdata(L, sizeof *CS);
	memset(CS, 0, sizeof *CS);

	LIST_INIT(&CS->cqueues);

	lua_rawsetp(L, LUA_REGISTRYINDEX, CQS_UNIQUE_LIGHTUSERDATA_MASK(&index));

	return CS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0x36fa4(%rip), %rdx     # 0x48090
callq 0xf070
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x104b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
cmpq $0x0, -0x18(%rbp)
je 0x11122
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1116c
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0xfbe0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xf7d0
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0x36f31(%rip), %rdx     # 0x48090
callq 0xf180
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_requiref
static void cqs_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb) {
	luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED");
	lua_getfield(L, -1, modname);
	lua_remove(L, -2);

	if (lua_isnil(L, -1)) {
		lua_pop(L, 1);
		luaL_requiref(L, modname, openf, glb);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0x36e34(%rip), %rdx     # 0x481cb
callq 0x105a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf200
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xf0f0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf280
cmpl $0x0, %eax
jne 0x11404
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0xfec0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_pushnils
static inline void cqs_pushnils(lua_State *L, int n) {
	int i;

	luaL_checkstack(L, n, "too many arguments");

	for (i = 0; i < n; i++)
		lua_pushnil(L);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x36da6(%rip), %rdx     # 0x481d3
callq 0xfdb0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x11455
movq -0x8(%rbp), %rdi
callq 0xfa10
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x11439
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: luaopen__cqueues_debug
int luaopen__cqueues_debug(lua_State *L) {
	luaL_newlib(L, dbg_globals);

	lua_pushinteger(L, INT_MAX);
	lua_setfield(L, -2, "INT_MAX");

	lua_pushinteger(L, LONG_MAX);
	lua_setfield(L, -2, "LONG_MAX");

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movsd 0x36b88(%rip), %xmm0    # 0x48000
movl $0x88, %esi
callq 0x106d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x10330
movq -0x8(%rbp), %rdi
leaq 0x4b9d3(%rip), %rsi     # 0x5ce70
xorl %edx, %edx
callq 0x10390
movq -0x8(%rbp), %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0xf9a0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x36cb6(%rip), %rdx     # 0x48178
callq 0xf580
movq -0x8(%rbp), %rdi
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
callq 0xf9a0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x36c96(%rip), %rdx     # 0x48180
callq 0xf580
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: auxlib_tostring
static int auxlib_tostring(lua_State *L) {
	luaL_checkany(L, 1);

	if (luaL_getmetafield(L, 1, "__tostring")) {
		lua_insert(L, 1);
		lua_settop(L, 2);
		lua_callk(L, 1, 1, 0, &auxlib_tostringk);

		return auxlib_tostringk(L, LUA_OK, 0);
	} else {
		luaL_tolstring(L, 1, NULL);

		return 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x10780
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x36c5f(%rip), %rdx     # 0x48189
callq 0xfed0
cmpl $0x0, %eax
je 0x11581
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xf0f0
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x107f0
movq -0x10(%rbp), %rdi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x4a(%rip), %r8         # 0x115b0
movl %edx, %esi
callq 0xf6f0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x115b0
movl %eax, -0x4(%rbp)
jmp 0x1159a
movq -0x10(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xfdc0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: auxlib_tostringk
LUA_KFUNCTION(auxlib_tostringk) {
	if (luaL_getmetafield(L, 1, "__tostring")) {
		lua_pushfstring(L, "%s: %p", luaL_typename(L, 1), lua_topointer(L, 1));
	} else {
		luaL_tolstring(L, 1, NULL);
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x36bb6(%rip), %rdx     # 0x48189
callq 0xfed0
cmpl $0x0, %eax
je 0x11633
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xf280
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0xfb30
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x101d0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq %rax, %rcx
leaq 0x36b6a(%rip), %rsi     # 0x48194
movb $0x0, %al
callq 0x10130
jmp 0x11645
movq -0x8(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xfdc0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cond_wait
static int cond_wait(lua_State *L) {
	cond_checkself(L, 1);

	lua_pushlightuserdata(L, CQUEUE__POLL);
	lua_insert(L, 1);

	return lua_yield(L, lua_gettop(L));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x118a0
movq -0x8(%rbp), %rdi
movq 0x4a8a3(%rip), %rsi     # 0x5bf58
callq 0x102a0
movq -0x8(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xf0f0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf9b0
movq -0x10(%rbp), %rdi
movl %eax, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xf0b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cond_signal
static int cond_signal(lua_State *L) {
	struct condition *cv = cond_checkself(L, 1);
	int i, n = luaL_optint(L, 2, INT_MAX);
	struct wakecb *cb;
	int error;

	for (i = 0; i < n && !TAILQ_EMPTY(&cv->waiting); i++) {
		cb = TAILQ_FIRST(&cv->waiting);
		wakecb_del(cb);

		if ((error = cb->fn(cb)))
			goto error;
	}

	lua_pushinteger(L, i);

	return 1;
error:
	lua_pushnil(L);
	lua_pushstring(L, cqs_strerror(error));
	lua_pushinteger(L, error);

	return 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x118a0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0xf450
movl %eax, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x20(%rbp), %ecx
movb %al, -0xad(%rbp)
jge 0x11762
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
sete %al
xorb $-0x1, %al
movb %al, -0xad(%rbp)
movb -0xad(%rbp), %al
testb $0x1, %al
jne 0x1176e
jmp 0x117a8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x11a20
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rdi
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x1179b
jmp 0x117be
jmp 0x1179d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1173e
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf9a0
movl $0x1, -0x4(%rbp)
jmp 0x11828
movq -0x10(%rbp), %rdi
callq 0xfa10
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0xbc(%rbp)
leaq -0xac(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0xbc(%rbp), %edi
leaq -0xac(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0xfcc0
movq -0x10(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0xf9a0
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_checkudata
static inline void *cqs_checkudata(lua_State *L, int index, int upvalue, const char *tname) {
	void *ud;

	if (!(ud = cqs_testudata(L, index, upvalue))) {
		index = lua_absindex(L, index);

		luaL_argerror(L, index, lua_pushfstring(L, "%s expected, got %s", tname, luaL_typename(L, index)));

		NOTREACHED;
	}

	return ud;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x11980
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x11973
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xf2a0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xf280
movq -0x48(%rbp), %rdi
movl %eax, %esi
callq 0xfb30
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq %rax, %rcx
leaq 0x36a69(%rip), %rsi     # 0x483c6
movb $0x0, %al
callq 0x10130
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq %rax, %rdx
callq 0xf440
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_testudata
static inline void *cqs_testudata(lua_State *L, int index, int upvalue) {
	void *ud = lua_touserdata(L, index);
	int eq;

	if (!ud || !lua_getmetatable(L, index))
		return NULL;

	eq = lua_rawequal(L, -1, lua_upvalueindex(upvalue));
	lua_pop(L, 1);

	return (eq)? ud : NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x104b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x119ba
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xf990
cmpl $0x0, %eax
jne 0x119c4
movq $0x0, -0x8(%rbp)
jmp 0x11a0b
movq -0x10(%rbp), %rdi
movl $0xfff0b9d8, %edx       # imm = 0xFFF0B9D8
subl -0x18(%rbp), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf730
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
cmpl $0x0, -0x24(%rbp)
je 0x119fb
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x11a03
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x11a03
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_setfuncsupvalue
static inline void cqs_setfuncsupvalue(lua_State *L, int tindex, int n) {
	tindex = lua_absindex(L, tindex);

	lua_pushnil(L);
	while (lua_next(L, tindex)) {
		if (lua_iscfunction(L, -1)) {
			lua_pushvalue(L, -3);
			lua_setupvalue(L, -2, n);
		}

		lua_pop(L, 1); /* pop field value (leaving key) */
	}

	lua_pop(L, 1); /* pop upvalue */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xf2a0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfa10
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x10920
cmpl $0x0, %eax
je 0x11bad
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf140
cmpl $0x0, %eax
je 0x11b9d
movq -0x8(%rbp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0xfa50
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf3b0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
jmp 0x11b5a
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x107f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cond_new
static int cond_new(lua_State *L) {
	_Bool lifo = lua_toboolean(L, 1);
	struct condition *cv;

	cv = lua_newuserdata(L, sizeof *cv);
	cv->lifo = lifo;
	TAILQ_INIT(&cv->waiting);
	luaL_setmetatable(L, CQS_CONDITION);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xf590
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0xfbe0
movq %rax, -0x18(%rbp)
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
leaq 0x3648a(%rip), %rsi     # 0x480c4
callq 0x10340
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cond_type
static int cond_type(lua_State *L) {
	if (cond_testself(L, 1)) {
		lua_pushstring(L, "condition");
	} else {
		lua_pushnil(L);
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x11cd0
cmpq $0x0, %rax
je 0x11c82
movq -0x8(%rbp), %rdi
leaq 0x3647b(%rip), %rsi     # 0x480f6
callq 0xfcc0
jmp 0x11c8b
movq -0x8(%rbp), %rdi
callq 0xfa10
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.h
// Function: cqs_interpose
static inline int cqs_interpose(lua_State *L, const char *mt) {
	lua_settop(L, 2);

	luaL_getmetatable(L, mt);
	lua_getfield(L, -1, "__index");

	lua_pushvalue(L, 1); /* push method name */
	lua_gettable(L, -2);  /* push old method */

	lua_pushvalue(L, 1); /* push method name */
	lua_pushvalue(L, 2); /* push new method */
	lua_settable(L, -4);  /* replace old method */

	return 1; /* return old method */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x107f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0xf200
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x3645b(%rip), %rdx     # 0x4819b
callq 0xf200
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xfa50
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x10ad0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xfa50
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0xfa50
movq -0x8(%rbp), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0x103b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cqueue_cancelfd
static cqs_error_t cqueue_cancelfd(struct cqueue *Q, int fd) {
	struct fileno *fileno;
	int error = 0, _error;

	if (!(fileno = fileno_find(Q, fd)))
		return 0;

	if ((_error = fileno_signal(Q, fileno, POLLIN|POLLOUT|POLLPRI)))
		error = _error;
	if ((_error = fileno_ctl(Q, fileno, 0)))
		error = _error;

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x11e30
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x11dd5
movl $0x0, -0x4(%rbp)
jmp 0x11e18
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x7, %edx
callq 0x11e60
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0x11df5
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x11f00
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0x11e12
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: fileno_signal
static cqs_error_t fileno_signal(struct cqueue *Q, struct fileno *fileno, short events) {
	struct event *event;
	int error = 0, _error;

	LIST_FOREACH(event, &fileno->events, fle) {
		/* XXX: If POLLPRI should we always mark as pending? */
		if (event->events & events)
			event->pending = 1;

		thread_move(event->thread, &Q->thread.pending);

		if ((_error = cqueue_tryalert(Q)))
			error = _error;
	}

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x11eef
movq -0x20(%rbp), %rax
movswl 0x4(%rax), %eax
movswl -0x12(%rbp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x11eac
movq -0x20(%rbp), %rax
movb $0x1, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x208, %rsi            # imm = 0x208
addq $0x8, %rsi
callq 0x120f0
movq -0x8(%rbp), %rdi
callq 0x121a0
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0x11edf
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x11ee1
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x11e8a
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: fileno_ctl
static int fileno_ctl(struct cqueue *Q, struct fileno *fileno, short events) {
	int error;

	if ((error = kpoll_ctl(&Q->kp, fileno->fd, &fileno->state, events, fileno)))
		return error; /* XXX: Should we call fileno_signal? */

	LIST_REMOVE(fileno, le);

	if (fileno->state)
		LIST_INSERT_HEAD(&Q->fileno.polling, fileno, le);
	else
		LIST_INSERT_HEAD(&Q->fileno.inactive, fileno, le);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rdx
addq $0x4, %rdx
movw -0x1a(%rbp), %ax
movq -0x18(%rbp), %r8
movswl %ax, %ecx
callq 0x123e0
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
je 0x11f4c
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x12046
jmp 0x11f4e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x11f6d
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpw $0x0, 0x4(%rax)
je 0x11fe5
jmp 0x11f8d
movq -0x10(%rbp), %rax
movq 0x1a8(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rax, 0x30(%rcx)
cmpq $0x0, %rax
je 0x11fbd
movq -0x18(%rbp), %rcx
addq $0x30, %rcx
movq -0x10(%rbp), %rax
movq 0x1a8(%rax), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1a8(%rax)
movq -0x10(%rbp), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x1203f
jmp 0x11fe7
movq -0x10(%rbp), %rax
movq 0x1b8(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rax, 0x30(%rcx)
cmpq $0x0, %rax
je 0x12017
movq -0x18(%rbp), %rcx
addq $0x30, %rcx
movq -0x10(%rbp), %rax
movq 0x1b8(%rax), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x10(%rbp), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
addq $0x18, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x1203f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: thread_move
static void thread_move(struct thread *T, struct threads *list) {
	if (T->threads != list) {
		LIST_REMOVE(T, le);
		LIST_INSERT_HEAD(list, T, le);
		T->threads = list;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x10(%rbp), %rax
je 0x1218f
jmp 0x12110
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x1212f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rcx, (%rax)
jmp 0x12144
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
je 0x1216c
movq -0x8(%rbp), %rcx
addq $0x28, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cqueue_tryalert
static cqs_error_t cqueue_tryalert(struct cqueue *Q) {
	if (!cstack_isrunning(Q->cstack, Q) || LIST_EMPTY(&Q->thread.pending)) {
		return kpoll_alert(&Q->kp);
	} else {
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12200
testb $0x1, %al
jne 0x121c6
jmp 0x121d4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x210(%rax)
jne 0x121e2
movq -0x10(%rbp), %rdi
callq 0x12250
movl %eax, -0x4(%rbp)
jmp 0x121e9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cstack_isrunning
static _Bool cstack_isrunning(const struct cstack *CS, const struct cqueue *Q) {
	struct stackinfo *info;

	for (info = CS->running; info; info = info->running) {
		if (info->Q == Q)
			return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x12242
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x12232
movb $0x1, -0x1(%rbp)
jmp 0x12246
jmp 0x12234
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x12218
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: kpoll_alert
static int kpoll_alert(struct kpoll *kp) {
	int error;

	if (kp->alert.pending)
		return 0;

	/* initialization may have been delayed */
	if ((error = alert_init(kp)))
		return error;
#if ENABLE_PORTS
	if (0 != port_send(kp->fd, POLLIN, &kp->alert)) {
		if (errno != EBUSY)
			return errno;
	}
#elif HAVE_EVENTFD
	static const uint64_t one = 1;

	while (-1 == write(kp->alert.fd[0], &one, sizeof one)) {
		if (errno == EAGAIN) {
			break;
		} else if (errno != EINTR) {
			return errno;
		}
	}
#else
	while (-1 == write(kp->alert.fd[1], "!", 1)) {
		if (errno == EAGAIN) {
			break;
		} else if (errno != EINTR) {
			return errno;
		}
	}
#endif
	if ((error = alert_rearm(kp)))
		return error;

	kp->alert.pending = 1;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x19c(%rax)
je 0x12275
movl $0x0, -0x4(%rbp)
jmp 0x12311
movq -0x10(%rbp), %rdi
callq 0x12320
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x12291
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x12311
jmp 0x12293
movq -0x10(%rbp), %rax
movl 0x190(%rax), %edi
leaq 0x35de4(%rip), %rsi     # 0x48088
movl $0x8, %edx
callq 0xf4f0
movq %rax, %rcx
movq $-0x1, %rax
cmpq %rcx, %rax
jne 0x122e3
callq 0xf0a0
cmpl $0xb, (%rax)
jne 0x122c9
jmp 0x122e3
callq 0xf0a0
cmpl $0x4, (%rax)
je 0x122df
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x12311
jmp 0x122e1
jmp 0x12293
movq -0x10(%rbp), %rdi
callq 0x12390
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x122fc
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x12311
movq -0x10(%rbp), %rax
movl $0x1, 0x19c(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: alert_init
static int alert_init(struct kpoll *kp) {
#if ENABLE_PORTS
	(void)kp;
	return 0;
#elif HAVE_EVENTFD
	if (kp->alert.fd[0] != -1)
		return 0;

	if (-1 == (kp->alert.fd[0] = eventfd(0, O_CLOEXEC|O_NONBLOCK)))
		return errno;

	return alert_rearm(kp);
#else
	int error;

	if (kp->alert.fd[0] != -1)
		return 0;

	if ((error = cqs_pipe(kp->alert.fd, O_CLOEXEC|O_NONBLOCK)))
		return error;

	return alert_rearm(kp);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x190(%rax)
je 0x12342
movl $0x0, -0x4(%rbp)
jmp 0x1237b
xorl %edi, %edi
movl $0x80800, %esi          # imm = 0x80800
callq 0x10120
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x190(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x1236f
callq 0xf0a0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1237b
movq -0x10(%rbp), %rdi
callq 0x12390
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/cqueues.c
// Function: cqueue_attach
static int cqueue_attach(lua_State *L) {
	struct callinfo I;
	struct cqueue *Q;
	int error;

	lua_settop(L, 2);

	Q = cqueue_enter(L, &I, 1);
	luaL_checktype(L, 2, LUA_TTHREAD);

	thread_add(L, Q, &I, 2);

	if ((error = cqueue_tryalert(Q)))
		goto error;

	lua_pushvalue(L, 1); /* return self */

	return 1;
error:
	lua_pushnil(L);
	lua_pushstring(L, cqs_strerror(error));
	lua_pushinteger(L, error);

	return 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x107f0
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x12ff0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf740
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movl $0x2, %ecx
callq 0x16c10
movq -0x30(%rbp), %rdi
callq 0x121a0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x1274f
jmp 0x12766
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xfa50
movl $0x1, -0x4(%rbp)
jmp 0x127d0
movq -0x10(%rbp), %rdi
callq 0xfa10
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0xc4(%rbp)
leaq -0xb4(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xf7d0
movl -0xc4(%rbp), %edi
leaq -0xb4(%rbp), %rsi
movl $0x80, %edx
callq 0xf270
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0xfcc0
movq -0x10(%rbp), %rdi
movslq -0x34(%rbp), %rsi
callq 0xf9a0
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)