LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: integrity_walker
static void integrity_walker(void* ptr, size_t size, int used, void* user)
{
	block_header_t* block = block_from_ptr(ptr);
	integrity_t* integ = tlsf_cast(integrity_t*, user);
	const int this_prev_status = block_is_prev_free(block) ? 1 : 0;
	const int this_status = block_is_free(block) ? 1 : 0;
	const size_t this_block_size = block_size(block);

	int status = 0;

	if(integ->prev_status != this_prev_status) {
		fprintf(stderr, "%p ps %d != %d\n", ptr,
		    integ->prev_status, this_prev_status);
		fail(ptr);
	}

	if(size != this_block_size) {
		fprintf(stderr, "%p size %d != %d\n", ptr,
		    integ->prev_status, this_prev_status);
		fail(ptr);
	}

	tlsf_insist(integ->prev_status == this_prev_status && "prev status incorrect");
	tlsf_insist(size == this_block_size && "block size incorrect");

	integ->prev_status = this_status;
	integ->status += status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq -0x8(%rdi), %r12
movl %r12d, %ebp
shrl %ebp
andl $0x1, %ebp
movq %r12, %r13
andq $-0x4, %r13
movl (%rcx), %ecx
cmpl %ebp, %ecx
jne 0x1cdd8
cmpq %r15, %r13
jne 0x1cdf8
cmpl %ebp, (%rbx)
jne 0x1ce3b
andl $0x1, %r12d
movl %r12d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe211(%rip), %rax      # 0x2aff0
movq (%rax), %rdi
leaq 0x68aa(%rip), %rsi      # 0x23693
movq %r14, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3320
jmp 0x1cdb9
movq 0xe1f1(%rip), %rax      # 0x2aff0
movq (%rax), %rdi
movl (%rbx), %ecx
leaq 0x6898(%rip), %rsi      # 0x236a3
movq %r14, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3320
cmpl %ebp, (%rbx)
jne 0x1ce3b
leaq 0x6907(%rip), %rdi      # 0x2372a
leaq 0x65a5(%rip), %rsi      # 0x233cf
leaq 0x68c6(%rip), %rcx      # 0x236f7
movl $0x288, %edx            # imm = 0x288
callq 0x31e0
leaq 0x6873(%rip), %rdi      # 0x236b5
leaq 0x6586(%rip), %rsi      # 0x233cf
leaq 0x68a7(%rip), %rcx      # 0x236f7
movl $0x287, %edx            # imm = 0x287
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: block_next
static block_header_t* block_next(const block_header_t* block)
{
	block_header_t* next = offset_to_block(block_to_ptr(block),
		block_size(block) - block_header_overhead);
	tlsf_assert(!block_is_last(block));
	return next;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpq $0x3, %rax
jbe 0x1ce70
andq $-0x4, %rax
addq %rdi, %rax
addq $0x8, %rax
retq
pushq %rax
leaq 0x68e4(%rip), %rdi      # 0x2375c
leaq 0x6550(%rip), %rsi      # 0x233cf
leaq 0x68ec(%rip), %rcx      # 0x23772
movl $0xf8, %edx
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: mapping_insert
static void mapping_insert(size_t size, int* fli, int* sli)
{
	int fl, sl;
	if (size < SMALL_BLOCK_SIZE)
	{
		/* Store small blocks in first list. */
		fl = 0;
		sl = tlsf_cast(int, size) / (SMALL_BLOCK_SIZE / SL_INDEX_COUNT);
	}
	else
	{
		fl = tlsf_fls_sizet(size);
		sl = tlsf_cast(int, size >> (fl - SL_INDEX_COUNT_LOG2)) ^ (1 << SL_INDEX_COUNT_LOG2);
		fl -= (FL_INDEX_SHIFT - 1);
	}
	*fli = fl;
	*sli = sl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq $0xff, %rdi
ja 0x1ceaf
shrl $0x3, %r14d
xorl %eax, %eax
jmp 0x1cec4
movq %r14, %rdi
callq 0x1d718
leal -0x5(%rax), %ecx
shrq %cl, %r14
xorl $0x20, %r14d
addl $-0x7, %eax
movl %eax, (%r15)
movl %r14d, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: tlsf_malloc
void* tlsf_malloc(tlsf_pool tlsf, size_t size)
{
	pool_t* pool = tlsf_cast(pool_t*, tlsf);
	const size_t adjust = adjust_request_size(size, ALIGN_SIZE);
	block_header_t* block = block_locate_free(pool, adjust);
	return block_prepare_used(pool, block, adjust);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x1(%rsi), %rax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
ja 0x1d0db
addq $0x7, %rsi
movabsq $0x1fffffff8, %rax      # imm = 0x1FFFFFFF8
andq %rsi, %rax
cmpq $0x19, %rax
pushq $0x18
popq %r14
cmovaeq %rax, %r14
jmp 0x1d0de
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d14c
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1d251
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: adjust_request_size
static size_t adjust_request_size(size_t size, size_t align)
{
	size_t adjust = 0;
	if (size && size < block_size_max)
	{
		const size_t aligned = align_up(size, align);
		adjust = tlsf_max(aligned, block_size_min);
	}
	return adjust;
}

// Assembly:
decq %rdi
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq %rax, %rdi
ja 0x1d129
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x1d12c
addq %rsi, %rdi
negq %rsi
andq %rdi, %rsi
cmpq $0x19, %rsi
pushq $0x18
popq %rax
cmovaeq %rsi, %rax
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x668c(%rip), %rdi      # 0x237c0
leaq 0x6294(%rip), %rsi      # 0x233cf
leaq 0x678a(%rip), %rcx      # 0x238cc
movl $0x115, %edx            # imm = 0x115
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: block_locate_free
static block_header_t* block_locate_free(pool_t* pool, size_t size)
{
	int fl = 0, sl = 0;
	block_header_t* block = 0;

	if (size)
	{
		mapping_search(size, &fl, &sl);
		block = search_suitable_block(pool, &fl, &sl);
	}

	if (block)
	{
		tlsf_assert(block_size(block) >= size);
		remove_free_block(pool, block, fl, sl);
	}

	return block;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
andl $0x0, 0x4(%rsp)
andl $0x0, (%rsp)
testq %rsi, %rsi
je 0x1d201
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
cmpq $0x20, %rsi
jb 0x1d18a
movq %r14, %rdi
callq 0x1d718
leal -0x5(%rax), %ecx
pushq $-0x1
popq %rdi
shll %cl, %edi
notl %edi
addq %r14, %rdi
leaq 0x4(%rsp), %r15
movq %rsp, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ce90
movl (%r15), %edx
movb (%r12), %cl
movslq %edx, %rax
movl 0x24(%rbx,%rax,4), %esi
shrl %cl, %esi
shll %cl, %esi
testl %esi, %esi
jne 0x1d1d0
movl 0x20(%rbx), %eax
incb %dl
movl %edx, %ecx
shrl %cl, %eax
shll %cl, %eax
testl %eax, %eax
je 0x1d201
bsfl %eax, %edx
movl 0x24(%rbx,%rdx,4), %esi
movq %rdx, %rax
testl %esi, %esi
je 0x1d232
bsfl %esi, %ecx
shlq $0x8, %rax
addq %rbx, %rax
movq 0x88(%rax,%rcx,8), %r15
testq %r15, %r15
je 0x1d201
movq 0x8(%r15), %rax
andq $-0x4, %rax
cmpq %r14, %rax
jb 0x1d213
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d736
jmp 0x1d204
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x66d2(%rip), %rdi      # 0x238ec
leaq 0x61ae(%rip), %rsi      # 0x233cf
leaq 0x66de(%rip), %rcx      # 0x23906
movl $0x238, %edx            # imm = 0x238
callq 0x31e0
leaq 0x6701(%rip), %rdi      # 0x2393a
leaq 0x618f(%rip), %rsi      # 0x233cf
leaq 0x672c(%rip), %rcx      # 0x23973
movl $0x171, %edx            # imm = 0x171
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: block_prepare_used
static void* block_prepare_used(pool_t* pool, block_header_t* block, size_t size)
{
	void* p = 0;
	if (block)
	{
		block_trim_free(pool, block, size);
		block_mark_as_used(block);
		p = block_to_ptr(block);
	}
	return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x1d2aa
movq %rsi, %rbx
movq 0x8(%rsi), %rax
testb $0x1, %al
je 0x1d2b5
andq $-0x4, %rax
leaq 0x20(%rdx), %rcx
cmpq %rcx, %rax
jb 0x1d29c
movq %rdi, %r14
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x1d7d5
movq %rax, %r15
movq %rbx, %rdi
callq 0x1d098
orb $0x2, 0x8(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1cfc5
movq %rbx, %rdi
callq 0x1d705
addq $0x10, %rbx
jmp 0x1d2ac
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6786(%rip), %rdi      # 0x23a42
leaq 0x610c(%rip), %rsi      # 0x233cf
leaq 0x67a5(%rip), %rcx      # 0x23a6f
movl $0x202, %edx            # imm = 0x202
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: align_ptr
static void* align_ptr(const void* ptr, size_t align)
{
	const tlsfptr_t aligned =
		(tlsf_cast(tlsfptr_t, ptr) + (align - 1)) & ~(align - 1);
	tlsf_assert(0 == (align & (align - 1)) && "must align to a power of two");
	return tlsf_cast(void*, aligned);
}

// Assembly:
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x1d419
leaq (%rsi,%rdi), %rax
decq %rax
negq %rsi
andq %rax, %rsi
movq %rsi, %rax
retq
pushq %rax
leaq 0x639f(%rip), %rdi      # 0x237c0
leaq 0x5fa7(%rip), %rsi      # 0x233cf
leaq 0x676e(%rip), %rcx      # 0x23b9d
movl $0x123, %edx            # imm = 0x123
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: tlsf_free
void tlsf_free(tlsf_pool tlsf, void* ptr)
{
	/* Don't attempt to free a NULL pointer. */
	if (ptr)
	{
		pool_t* pool = tlsf_cast(pool_t*, tlsf);
		block_header_t* block = block_from_ptr(ptr);
		block_mark_as_free(block);
		block = block_merge_prev(pool, block);
		block = block_merge_next(pool, block);
		block_insert(pool, block);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x1d461
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x10(%rsi), %r15
movq %r15, %rdi
callq 0x1d4e5
testb $0x2, -0x8(%r14)
jne 0x1d467
movq %r15, %r14
jmp 0x1d48c
popq %rbx
popq %r14
popq %r15
retq
movq (%r15), %r14
testq %r14, %r14
je 0x1d4a7
testb $0x1, 0x8(%r14)
je 0x1d4c6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d875
movq %r14, %rdi
movq %r15, %rsi
callq 0x1d8bb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d4f8
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1cfc5
leaq 0x6715(%rip), %rdi      # 0x23bc3
leaq 0x5f1a(%rip), %rsi      # 0x233cf
leaq 0x6733(%rip), %rcx      # 0x23bef
movl $0x1e6, %edx            # imm = 0x1E6
callq 0x31e0
leaq 0x675f(%rip), %rdi      # 0x23c2c
leaq 0x5efb(%rip), %rsi      # 0x233cf
leaq 0x6714(%rip), %rcx      # 0x23bef
movl $0x1e7, %edx            # imm = 0x1E7
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: block_merge_next
static block_header_t* block_merge_next(pool_t* pool, block_header_t* block)
{
	block_header_t* next = block_next(block);
	tlsf_assert(next && "next physical block can't be null");

	if (block_is_free(next))
	{
		tlsf_assert(!block_is_last(block) && "previous block can't be last!");
		block_remove(pool, next);
		block = block_absorb(block, next);
	}

	return block;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x1ce5a
testq %rax, %rax
je 0x1d53f
movq %rax, %r14
testb $0x1, 0x8(%rax)
je 0x1d536
cmpq $0x3, 0x8(%rbx)
jbe 0x1d55e
movq %r15, %rdi
movq %r14, %rsi
callq 0x1d875
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d8bb
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x67a5(%rip), %rdi      # 0x23ceb
leaq 0x5e82(%rip), %rsi      # 0x233cf
leaq 0x67c3(%rip), %rcx      # 0x23d17
movl $0x1f3, %edx            # imm = 0x1F3
callq 0x31e0
leaq 0x67ef(%rip), %rdi      # 0x23d54
leaq 0x5e63(%rip), %rsi      # 0x233cf
leaq 0x67a4(%rip), %rcx      # 0x23d17
movl $0x1f7, %edx            # imm = 0x1F7
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: remove_free_block
static void remove_free_block(pool_t* pool, block_header_t* block, int fl, int sl)
{
	block_header_t* prev = block->prev_free;
	block_header_t* next = block->next_free;
	tlsf_assert(prev && "prev_free field can not be null");
	tlsf_assert(next && "next_free field can not be null");
	next->prev_free = prev;
	prev->next_free = next;

	/* If this block is the head of the free list, set new head. */
	if (pool->blocks[fl][sl] == block)
	{
		pool->blocks[fl][sl] = next;

		/* If the new head is null, clear the bitmap. */
		if (next == &pool->block_null)
		{
			pool->sl_bitmap[fl] &= ~(1 << sl);

			/* If the second bitmap is now empty, clear the fl bitmap. */
			if (!pool->sl_bitmap[fl])
			{
				pool->fl_bitmap &= ~(1 << fl);
			}
		}
	}
}

// Assembly:
pushq %rax
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x1d797
movq 0x10(%rsi), %r8
testq %r8, %r8
je 0x1d7b6
movq %rax, 0x18(%r8)
movq %r8, 0x10(%rax)
movslq %edx, %rax
movq %rax, %r9
shlq $0x8, %r9
addq %rdi, %r9
movslq %ecx, %r10
cmpq %rsi, 0x88(%r9,%r10,8)
jne 0x1d795
leaq (%r9,%r10,8), %rsi
addq $0x88, %rsi
movq %r8, (%rsi)
cmpq %rdi, %r8
jne 0x1d795
pushq $-0x2
popq %rsi
movl %esi, %r8d
roll %cl, %r8d
andl %r8d, 0x24(%rdi,%rax,4)
jne 0x1d795
movl %edx, %ecx
roll %cl, %esi
andl %esi, 0x20(%rdi)
popq %rax
retq
leaq 0x6213(%rip), %rdi      # 0x239b1
leaq 0x5c2a(%rip), %rsi      # 0x233cf
leaq 0x622f(%rip), %rcx      # 0x239db
movl $0x17e, %edx            # imm = 0x17E
callq 0x31e0
leaq 0x625b(%rip), %rdi      # 0x23a18
leaq 0x5c0b(%rip), %rsi      # 0x233cf
leaq 0x6210(%rip), %rcx      # 0x239db
movl $0x17f, %edx            # imm = 0x17F
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: block_split
static block_header_t* block_split(block_header_t* block, size_t size)
{
	/* Calculate the amount of space left in the remaining block. */
	block_header_t* remaining =
		offset_to_block(block_to_ptr(block), size - block_header_overhead);

	const size_t remain_size = block_size(block) - (size + block_header_overhead);

	tlsf_assert(block_to_ptr(remaining) == align_ptr(block_to_ptr(remaining), ALIGN_SIZE)
		&& "remaining block not aligned properly");

	tlsf_assert(block_size(block) == remain_size + size + block_header_overhead);
	block_set_size(remaining, remain_size);
	tlsf_assert(block_size(remaining) >= block_size_min && "block split with invalid size");

	block_set_size(block, size);
	block_mark_as_free(remaining);

	return remaining;
}

// Assembly:
pushq %rbx
leaq (%rdi,%rsi), %rax
addq $0x18, %rax
leaq (%rdi,%rsi), %rcx
addq $0x1f, %rcx
andq $-0x8, %rcx
cmpq %rcx, %rax
jne 0x1d837
movq 0x8(%rdi), %rax
andq $-0x4, %rax
subq %rsi, %rax
addq $-0x8, %rax
movq 0x10(%rdi,%rsi), %rcx
andl $0x3, %ecx
orq %rax, %rcx
movq %rcx, 0x10(%rdi,%rsi)
cmpq $0x17, %rax
jbe 0x1d856
leaq (%rdi,%rsi), %rbx
addq $0x8, %rbx
movq 0x8(%rdi), %rax
andl $0x3, %eax
orq %rsi, %rax
movq %rax, 0x8(%rdi)
movq %rbx, %rdi
callq 0x1d4e5
movq %rbx, %rax
popq %rbx
retq
leaq 0x626a(%rip), %rdi      # 0x23aa8
leaq 0x5b8a(%rip), %rsi      # 0x233cf
leaq 0x62d0(%rip), %rcx      # 0x23b1c
movl $0x1ca, %edx            # imm = 0x1CA
callq 0x31e0
leaq 0x62f5(%rip), %rdi      # 0x23b52
leaq 0x5b6b(%rip), %rsi      # 0x233cf
leaq 0x62b1(%rip), %rcx      # 0x23b1c
movl $0x1ce, %edx            # imm = 0x1CE
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/cogbee[P]vmir-latest/tlsf/tlsf.c
// Function: block_absorb
static block_header_t* block_absorb(block_header_t* prev, block_header_t* block)
{
	tlsf_assert(!block_is_last(prev) && "previous block can't be last!");
	/* Note: Leaves flags untouched. */
	prev->size += block_size(block) + block_header_overhead;
	block_link_next(prev);
	return prev;
}

// Assembly:
pushq %rbx
movq 0x8(%rdi), %rax
cmpq $0x3, %rax
jbe 0x1d8e6
movq %rdi, %rbx
movq 0x8(%rsi), %rcx
andq $-0x4, %rcx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x8(%rdi)
callq 0x1d098
movq %rbx, %rax
popq %rbx
retq
leaq 0x6385(%rip), %rdi      # 0x23c72
leaq 0x5adb(%rip), %rsi      # 0x233cf
leaq 0x63af(%rip), %rcx      # 0x23caa
movl $0x1d9, %edx            # imm = 0x1D9
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/example.c
// Function: main
int main() {
	long ret;
	struct lfq_ctx ctx;
	lfq_init(&ctx, 1);
	lfq_enqueue(&ctx,(void *)1);
	lfq_enqueue(&ctx,(void *)3);
	lfq_enqueue(&ctx,(void *)5);
	lfq_enqueue(&ctx,(void *)8);
	lfq_enqueue(&ctx,(void *)4);
	lfq_enqueue(&ctx,(void *)6);
	
	while ( (ret = (long)lfq_dequeue(&ctx)) != 0 )
		printf("lfq_dequeue %ld\n", ret);
	
	lfq_clean(&ctx);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
andq $-0x40, %rsp
subq $0xc0, %rsp
movq %rsp, %rbx
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x1204
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x146d
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x146d
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x146d
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x146d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x146d
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x146d
leaq 0xe2f(%rip), %r14       # 0x2004
movq %rbx, %rdi
callq 0x1501
testq %rax, %rax
je 0x11f1
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
jmp 0x11d5
movq %rsp, %rdi
callq 0x12d5
xorl %eax, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: timing_beh
BEH_DECL(timing_beh)
{
	char* s;

	DBUG_ENTER("timing_beh");
	s = cons_to_str(NOW);
	DBUG_PRINT("", ("[timestamp] %s", s));
	fprintf(stderr, "[timestamp] %s\n", s);
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0xacc5(%rip), %rax      # 0xd004
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0xffba(%rip), %r15      # 0x12308
movq (%r15), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x19, 0xc(%rdi)
leaq 0xc9fb(%rip), %r14      # 0xed64
movq %r14, 0x10(%rdi)
leaq 0xfdbc(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xc63d
movq 0x50(%rbx), %rdi
movq 0x58(%rbx), %rsi
callq 0x31f5
movq %rax, %rdi
callq 0x4ccc
movq %rax, %rbx
leaq 0x10510(%rip), %rax     # 0x128b0
cmpl $0x0, (%rax)
je 0x23db
movq (%r15), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0xbdb8
testl %eax, %eax
je 0x23db
movq (%r15), %rax
movq 0x50(%rax), %rax
movl $0x1b, 0xc(%rax)
leaq 0xac3e(%rip), %rdi      # 0xd00f
movq %rbx, %rsi
xorl %eax, %eax
callq 0xc6b4
movq 0xfc16(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0xac32(%rip), %rsi      # 0xd01e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2160
leaq 0x8(%rsp), %rdi
movl $0x1d, 0xc(%rdi)
callq 0xc7b6
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: countdown_ring_0_beh
BEH_DECL(countdown_ring_0_beh)
{
	CONS* m = WHAT;
	CONS* first = MINE;
	int m_int = MK_INT(m);

	DBUG_ENTER("countdown_ring_0_beh");
	if (m_int <= 0) {
		BECOME(sink_beh, NIL);
		SEND(timing_actor, NIL);
	} else {
		SEND(first, NUMBER(m_int - 1));
	}
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0xa8ca
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0xa7bf
movq %rax, %rdi
callq 0x2d1f
movq %rax, %r15
movq %r14, %r12
shrq $0x2, %r12
leaq 0xabe1(%rip), %rax      # 0xd02e
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0xfeae(%rip), %rax      # 0x12308
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x2f, 0xc(%rdi)
leaq 0xc8ef(%rip), %rcx      # 0xed64
movq %rcx, 0x10(%rdi)
leaq 0xfcb0(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xc63d
testl %r12d, %r12d
jle 0x24ae
movabsq $0x3fffffffc, %rax      # imm = 0x3FFFFFFFC
addq %rax, %r14
andq %rax, %r14
orq $0x3, %r14
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x24da
movq 0x30(%rbx), %rdi
callq 0xa7bf
leaq 0x892(%rip), %rsi       # 0x2d50
leaq 0xfdb3(%rip), %r14      # 0x12278
movq %rax, %rdi
movq %r14, %rdx
callq 0x30da
movq 0xfe81(%rip), %rsi      # 0x12358
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3a58
movq %rsp, %rdi
movl $0x36, 0xc(%rdi)
callq 0xc7b6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: countdown_ring_beh
BEH_DECL(countdown_ring_beh)
{
	CONS* m = WHAT;
	CONS* next = MINE;

	DBUG_ENTER("countdown_ring_beh");
	SEND(next, m);
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0xa8ca
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0xa7bf
movq %rax, %rdi
callq 0x2d1f
movq %rax, %r15
leaq 0xab11(%rip), %rax      # 0xd043
movq %rsp, %r12
movq %rax, (%r12)
leaq 0xfdc8(%rip), %rax      # 0x12308
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%r12)
movl $0x43, 0xc(%r12)
leaq 0xc805(%rip), %rcx      # 0xed64
movq %rcx, 0x10(%r12)
leaq 0xfbc5(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%r12)
movq %rax, 0x20(%r12)
movq %r12, %rdi
callq 0xc63d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a58
movl $0x45, 0xc(%r12)
movq %r12, %rdi
callq 0xc7b6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: ring_link_beh
BEH_DECL(ring_link_beh)
{
	CONS* next = MINE;
	CONS* first = WHAT;

	DBUG_ENTER("countdown_ring_beh");
	SEND(next, first);
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0xa7bf
movq %rax, %rdi
callq 0x2d1f
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0xa8ca
movq %rax, %r15
leaq 0xa814(%rip), %rax      # 0xd043
movq %rsp, %r12
movq %rax, (%r12)
leaq 0xfacb(%rip), %rax      # 0x12308
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%r12)
movl $0x82, 0xc(%r12)
leaq 0xc508(%rip), %rcx      # 0xed64
movq %rcx, 0x10(%r12)
leaq 0xf8c8(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%r12)
movq %rax, 0x20(%r12)
movq %r12, %rdi
callq 0xc63d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3a58
movl $0x84, 0xc(%r12)
movq %r12, %rdi
callq 0xc7b6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: ring_seed_beh
BEH_DECL(ring_seed_beh)
{
	static int thresh = 1 << 10;
	CONS* n = MINE;
	CONS* first = WHAT;
	CONS* next;
	int n_int = MK_INT(n);

	DBUG_ENTER("ring_seed_beh");
	if (n_int >= thresh) {
		thresh <<= 1;
		TRACE(fprintf(stderr, "%d:", n_int));
		SEND(timing_actor, NIL);
	}
	next = ACTOR(ring_seed_beh, NUMBER(n_int + 1));
	BECOME(ring_link_beh, next);
	SEND(first, first);
	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0xa7bf
movq %rax, %rdi
callq 0x2d1f
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0xa8ca
movq %rax, %r14
shrq $0x2, %r15
leaq 0xa7fc(%rip), %rax      # 0xd0d8
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0xfa1d(%rip), %rax      # 0x12308
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x96, 0xc(%rdi)
leaq 0xc45e(%rip), %rcx      # 0xed64
movq %rcx, 0x10(%rdi)
leaq 0xf81f(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xc63d
movl 0xf81c(%rip), %eax      # 0x12140
cmpl %r15d, %eax
jle 0x2998
shlq $0x20, %r15
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %r15, %rdx
sarq $0x1e, %rdx
orq $0x3, %rdx
leaq -0xa4(%rip), %rsi       # 0x28a5
movq %rbx, %rdi
callq 0x397b
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0xa7bf
leaq -0x16a(%rip), %rsi      # 0x27fa
movq %rax, %rdi
movq %r15, %rdx
callq 0x30da
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x3a58
leaq 0x8(%rsp), %rdi
movl $0x9f, 0xc(%rdi)
callq 0xc7b6
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
addl %eax, %eax
movl %eax, 0xf7a0(%rip)      # 0x12140
movq 0xf651(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0xa735(%rip), %rsi      # 0xd0e6
movl %r15d, %edx
xorl %eax, %eax
callq 0x2160
movq 0xf996(%rip), %rsi      # 0x12358
leaq 0xf8af(%rip), %rdx      # 0x12278
movq %rbx, %rdi
callq 0x3a58
jmp 0x2929
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: erlang_challenge
void
erlang_challenge(int n, int m)
{
	CONFIG* cfg;
	int cnt;

	DBUG_ENTER("erlang_challenge");
	cfg = new_configuration(10);
	timing_actor = CFG_ACTOR(cfg, timing_beh, NIL);
	if (n <= 0) {
		CONS* ring;

		TRACE(printf("Seeding unbounded growth message ring.\n"));
		ring = CFG_ACTOR(cfg, ring_seed_beh, NUMBER(0));
		CFG_SEND(cfg, ring, ring);
	} else {
		CONS* countdown;

		TRACE(printf("Sending %d messages around a ring of %d processes.\n", m, n));
		countdown = CFG_ACTOR(cfg, countdown_builder_beh, NUMBER(n));
		CFG_SEND(cfg, countdown, cons(countdown, NUMBER(m)));
	}
	CFG_SEND(cfg, timing_actor, NIL);
	for (cnt = 1; cnt < 1000000; ++cnt) {
		int max = 1000000;
		int rem;

		rem = run_configuration(cfg, max);
/*		TRACE(printf("+ %d messages...\n", (max - rem))); */
		TRACE(fputc('.', stderr));
		if (cfg->q_count <= 0) {
			/* queue empty */
			break;
		}
	}
	TRACE(printf("< %dM messages delivered.\n", cnt));
	report_actor_usage(cfg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movl %edi, %r14d
leaq 0xa6fe(%rip), %rax      # 0xd0ea
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0xf90f(%rip), %rax      # 0x12308
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0xb1, 0xc(%rdi)
leaq 0xc350(%rip), %rcx      # 0xed64
movq %rcx, 0x10(%rdi)
leaq 0xf711(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xc63d
pushq $0xa
popq %rdi
callq 0x32d4
movq %rax, %rbx
leaq -0x712(%rip), %rsi      # 0x232c
leaq 0xf833(%rip), %rdx      # 0x12278
movq %rax, %rdi
callq 0x397b
movq %rax, 0xf904(%rip)      # 0x12358
testl %r14d, %r14d
jle 0x2aa4
leaq 0xa69b(%rip), %rdi      # 0xd0fb
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x20e0
movl %r14d, %eax
leaq 0x3(,%rax,4), %rdx
leaq -0x4d6(%rip), %rsi      # 0x25a8
movq %rbx, %rdi
callq 0x397b
movq %rax, %r14
movslq %ebp, %rax
leaq 0x3(,%rax,4), %rsi
movq %r14, %rdi
callq 0xa728
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x2ac8
leaq 0xa6f7(%rip), %rdi      # 0xd1a2
callq 0x20a0
leaq -0x212(%rip), %rsi      # 0x28a5
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x397b
movq %rbx, %rdi
movq %rax, %rsi
movq %rax, %rdx
callq 0x3a58
movq 0xf881(%rip), %rsi      # 0x12358
leaq 0xf79a(%rip), %rdx      # 0x12278
movq %rbx, %rdi
callq 0x3a58
pushq $0x1
popq %rbp
movq 0xf508(%rip), %r15      # 0x11ff8
pushq $0x2e
popq %r14
cmpl $0xf4240, %ebp          # imm = 0xF4240
je 0x2b1e
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x40ab
movq (%r15), %rsi
movl %r14d, %edi
callq 0x2120
cmpl $0x0, 0x28(%rbx)
jle 0x2b1e
incl %ebp
jmp 0x2af4
leaq 0xa60a(%rip), %rdi      # 0xd12f
movl %ebp, %esi
xorl %eax, %eax
callq 0x20e0
movq %rbx, %rdi
callq 0x4c0a
movq %rsp, %rdi
movl $0xd0, 0xc(%rdi)
callq 0xc7b6
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/echallenge.c
// Function: main
int
main(int argc, char** argv)
{
	int c;
	int n = 0;
	int m = 100;

	DBUG_ENTER("main");
	DBUG_PROCESS(argv[0]);
	while ((c = getopt(argc, argv, "n:m:#:V")) != EOF) {
		switch(c) {
		case 'n':	n = atoi(optarg);		break;
		case 'm':	m = atoi(optarg);		break;
		case '#':	DBUG_PUSH(optarg);		break;
		case 'V':	banner();				exit(EXIT_SUCCESS);
		case '?':							usage();
		default:							usage();
		}
	}
	banner();

	erlang_challenge(n, m);	/* this test involves running the dispatch loop */

	report_cons_stats();
	DBUG_RETURN (exit(EXIT_SUCCESS), 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xa5c5(%rip), %rax      # 0xd18a
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0xf734(%rip), %r13      # 0x12308
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0xf0, 0xc(%rdi)
leaq 0xc174(%rip), %rcx      # 0xed64
movq %rcx, 0x10(%rdi)
leaq 0xf535(%rip), %rcx      # 0x12130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xc63d
movq (%r13), %rax
movq 0x18(%rax), %rcx
testq %rcx, %rcx
jne 0x2c1f
movq 0xf3dc(%rip), %rcx      # 0x11ff8
movq (%rcx), %rcx
movq %rcx, 0x18(%rax)
callq 0x20b0
movq (%r13), %rcx
movl %eax, 0x10(%rcx)
movq (%rbx), %rax
movq %rax, 0x8(%rcx)
pushq $0x64
popq %rax
movl %eax, 0xc(%rsp)
xorl %r15d, %r15d
leaq 0xa548(%rip), %r12      # 0xd18f
movq 0xf38a(%rip), %r14      # 0x11fd8
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x21c0
cmpl $0x23, %eax
jne 0x2c79
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0xf6, 0xc(%rax)
movq (%r14), %rdi
callq 0xbf11
jmp 0x2c4e
cmpl $0x6d, %eax
je 0x2c90
cmpl $0x6e, %eax
jne 0x2c9e
movq (%r14), %rdi
callq 0x21e0
movl %eax, %r15d
jmp 0x2c4e
movq (%r14), %rdi
callq 0x21e0
movl %eax, 0xc(%rsp)
jmp 0x2c4e
cmpl $-0x1, %eax
je 0x2cb9
cmpl $0x3f, %eax
je 0x2cb4
cmpl $0x56, %eax
jne 0x2cb4
callq 0x2b88
jmp 0x2ce0
callq 0x2b60
callq 0x2b88
movl %r15d, %edi
movl 0xc(%rsp), %esi
callq 0x29d6
callq 0x2b50
leaq 0x10(%rsp), %rdi
movl $0x101, 0xc(%rdi)       # imm = 0x101
callq 0xc7b6
xorl %edi, %edi
callq 0x2200
nop
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/rra/rra2wav.c
// Function: filter
static void
filter(FILE *in,FILE *out)
    {
    int i,j,amp;
    int skipSamples;
    RRA *h;

    h = newRRAHeader();
    
    readRRAHeader(in,h,0);

    skipSamples = Skip * h->sampleRate;

    writeWaveHeader(out,h->sampleRate,h->channels,
        h->bitsPerSample,h->samples - h->skip - skipSamples);

    amp = readRRAAmplitude(in,out,h->bitsPerSample,discardComment);
    for (i = 0; !feof(in) && i < h->samples; ++i)
        for (j = 0; !feof(in) && j < h->channels; ++j)
            {
            if (i >= (h->skip + skipSamples) * h->channels)
                writeByteInt(out,amp * Amplitude,h->bitsPerSample/8);
            amp = readRRAAmplitude(in,out,h->bitsPerSample,discardComment);
            }

    fclose(in);
    fclose(out);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2718
movq %rax, %r15
movq $0x0, -0x30(%rbp)
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2a7d
movl 0x4(%r15), %esi
cvtsi2sd %esi, %xmm0
mulsd 0x5b69(%rip), %xmm0     # 0x7188
movl (%r15), %edx
cvttsd2si %xmm0, %edi
movl 0x8(%r15), %ecx
movl 0xc(%r15), %r8d
movl 0x10(%r15), %eax
movl %edi, -0x34(%rbp)
addl %edi, %eax
subl %eax, %r8d
movq %rbx, %rdi
callq 0x2265
movl 0x8(%r15), %edx
leaq 0x1859(%rip), %rcx      # 0x2ea6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f52
movl %eax, %r13d
movq %r14, %rdi
callq 0x1170
testl %eax, %eax
jne 0x16fc
movq -0x30(%rbp), %rax
cmpl 0xc(%r15), %eax
jge 0x16fc
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1170
testl %eax, %eax
jne 0x16ed
movl (%r15), %eax
cmpl %eax, %r12d
jge 0x16ed
movl 0x10(%r15), %ecx
addl -0x34(%rbp), %ecx
imull %eax, %ecx
cmpl %ecx, -0x30(%rbp)
jl 0x16cf
cvtsi2sd %r13d, %xmm0
mulsd 0x5abc(%rip), %xmm0     # 0x7168
cvttsd2si %xmm0, %ecx
movl 0x8(%r15), %eax
cltd
pushq $0x8
popq %rsi
idivl %esi
movl %ecx, -0x38(%rbp)
movslq %eax, %rdx
leaq -0x38(%rbp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0x1240
movl 0x8(%r15), %edx
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x17c6(%rip), %rcx      # 0x2ea6
callq 0x2f52
movl %eax, %r13d
incl %r12d
jmp 0x167c
movq -0x30(%rbp), %rax
incl %eax
movq %rax, -0x30(%rbp)
jmp 0x165b
movq %r14, %rdi
callq 0x10a0
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10a0
nop
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv11.c
// Function: reconnect
void
reconnect(Ten11 *ten11)
{
	ten11->fd = dial(host, port);
	while (ten11->fd == -1) {
		sleep(5);
		ten11->fd = dial(host, port);
	}
	nodelay(ten11->fd);
	printf("%sconnected to PDP-10\n", re);
	re = "re";
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10da2(%rip), %rdi     # 0x13388
movl 0x10da4(%rip), %esi     # 0x13390
callq 0x6d0c
pushq $0x5
popq %rbp
movl %eax, 0x4(%rbx)
cmpl $-0x1, %eax
jne 0x2617
movl %ebp, %edi
callq 0x2310
movq 0x10d7e(%rip), %rdi     # 0x13388
movl 0x10d80(%rip), %esi     # 0x13390
callq 0x6d0c
jmp 0x25f4
movl %eax, %edi
callq 0x6ec5
movq 0x10bab(%rip), %rsi     # 0x131d0
leaq 0x49d8(%rip), %rdi      # 0x7004
xorl %eax, %eax
callq 0x20f0
leaq 0x49e1(%rip), %rax      # 0x701b
movq %rax, 0x10b8f(%rip)     # 0x131d0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv11.c
// Function: dumpmem
void
dumpmem(word start, word end)
{
	start >>= 1;
	end >>= 1;
	for(; start != end; start++)
		printf("%06o: %06o\n", start<<1, memory[start]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
shrl %r14d
shrl %ebx
leaq 0x1085d(%rip), %r12     # 0x133a0
leaq 0x4561(%rip), %r15      # 0x70ab
cmpw %r14w, %bx
je 0x2b6a
movzwl %r14w, %esi
addl %esi, %esi
movzwl (%rsi,%r12), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x20f0
incl %r14d
jmp 0x2b4a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv11.c
// Function: usage
void
usage(void)
{
	fprintf(stderr, "usage: %s [-p port] [-l listenport] [-s time(ms)] [-d] server\n", argv0);
	fprintf(stderr, "\tserver: host running pdp-10\n");
	fprintf(stderr, "\t-p: pdp-10 port; default 1110\n");
	fprintf(stderr, "\t-l: tv11 listen port; default 11100\n");
	fprintf(stderr, "\t-s: sleep (ms); default=0\n");
	fprintf(stderr, "\t-d: write debug log\n");
	exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x10467(%rip), %r14     # 0x12ff8
movq (%r14), %rdi
movq 0x9735d(%rip), %rdx     # 0x99ef8
leaq 0x4523(%rip), %rsi      # 0x70c5
xorl %eax, %eax
callq 0x2190
movq (%r14), %rcx
leaq 0x4551(%rip), %rdi      # 0x7104
pushq $0x1d
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x22e0
movq (%r14), %rcx
leaq 0x4557(%rip), %rdi      # 0x7122
pushq $0x1f
popq %rsi
movq %rbx, %rdx
callq 0x22e0
movq (%r14), %rcx
leaq 0x4562(%rip), %rdi      # 0x7142
pushq $0x25
popq %rsi
movq %rbx, %rdx
callq 0x22e0
movq (%r14), %rcx
leaq 0x4573(%rip), %rdi      # 0x7168
pushq $0x1b
popq %rsi
movq %rbx, %rdx
callq 0x22e0
movq (%r14), %rcx
leaq 0x457a(%rip), %rdi      # 0x7184
pushq $0x15
popq %rsi
movq %rbx, %rdx
callq 0x22e0
xorl %edi, %edi
callq 0x22c0
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: vswinfo
void
vswinfo(TV *tv)
{
	int i, j;
	int osw;
	printf("Video switch:\n");
	for(i = 0; i < NUMOUTPUTS; i++)
		printf("%o|%o -> %o\n", tv->vswsect[0][i], tv->vswsect[1][i], i);
	printf("frame buffer output:\n");
	for(i = 0; i < NUMFBUFFERS; i++)
		for(j = 0; j < tv->buffers[i].nosw; j++){
			osw = tv->buffers[i].osw[j];
			printf("%o %o: %o %o\n", i, j, osw, tv->omap[osw]);
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc5f1(%rip), %rdi      # 0xf4ba
callq 0x2070
leaq 0xc519(%rip), %r14      # 0xf3ee
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0x2f02
movzbl 0x8088c(%rbx,%r15), %esi
movzbl 0x808ac(%rbx,%r15), %edx
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x20f0
incq %r15
jmp 0x2ed8
leaq 0xc5bf(%rip), %rdi      # 0xf4c8
callq 0x2070
leaq 0x8(%rbx), %rax
movq %rax, (%rsp)
leaq 0x800c(%rbx), %rbp
leaq 0xc4d7(%rip), %r14      # 0xf3fb
xorl %r15d, %r15d
cmpq $0x10, %r15
je 0x2f75
imulq $0x8088, %r15, %r13     # imm = 0x8088
addq (%rsp), %r13
xorl %r12d, %r12d
movslq 0x8084(%r13), %rax
cmpq %rax, %r12
jge 0x2f69
movslq (%rbp,%r12,4), %rcx
movl 0x80a60(%rbx,%rcx,4), %r8d
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x20f0
incq %r12
jmp 0x2f3b
incq %r15
addq $0x8088, %rbp           # imm = 0x8088
jmp 0x2f27
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: alu
static word
alu(int op, word a, word b)
{
	switch(op){
	case ALU_SETC:	a = ~b; break;
	case ALU_NOR:	a = ~(a|b); break;
	case ALU_ANDC:	a = a&~b; break;
	case ALU_SETZ:	a = 0; break;
	case ALU_NAND:	a = ~(a&b); break;
	case ALU_COMP:	a = ~a; break;
	case ALU_XOR:	a ^= b; break;
	case ALU_ANDCSD: a = ~a&b; break;
	case ALU_ORCSD:	a = a|~b; break;
	case ALU_EQV:	a = ~(a^b); break;
	case ALU_SAME:	break;
	case ALU_AND:	a &= b; break;
	case ALU_ORSCD:	a = ~a|b; break;
	case ALU_SETO:	a = ~0; break;
	case ALU_IOR:	a |= b; break;
	case ALU_SET:	a = b; break;
	default: a = 0;	/* can't happen */
	}
	return a;
}

// Assembly:
cmpl $0xf, %edi
ja 0x3234
movl %edx, %eax
movl %edi, %ecx
leaq 0x3fc5(%rip), %rdx      # 0x71ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
orl %esi, %eax
jmp 0x3256
xorl %eax, %eax
retq
notl %esi
orl %esi, %eax
retq
notl %eax
orl %eax, %esi
jmp 0x3251
xorl %eax, %esi
notl %esi
jmp 0x3251
movw $0xffff, %ax            # imm = 0xFFFF
retq
notl %eax
andl %eax, %esi
movl %esi, %eax
retq
andl %esi, %eax
notl %eax
retq
notl %esi
andl %esi, %eax
retq
xorl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: sendbuf
void
sendbuf(TV *tv, FBuffer *buffer)
{
	int i;
	for(i = 0; i < buffer->nosw; i++)
		if(buffer->osw[i] >= 0)
			sendfb(tv, buffer->osw[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x8084(%rbx), %rax
cmpq %rax, %r15
jge 0x3294
movl 0x8004(%rbx,%r15,4), %esi
testl %esi, %esi
js 0x328f
movq %r14, %rdi
callq 0x344a
incq %r15
jmp 0x326f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: sendupdate
void
sendupdate(TV *tv, FBuffer *buffer, uint16 addr)
{
	uint8 buf[7];
	int i;
	int osw;
	int n1, n2;
	word w1, w2;
	word bw1, bw2;

	/* Don't tell screen to update anything not visible */
	if(addr >= (TVHI-TVLO)/2)
		return;

	msgheader(buf, MSG_WD, 5);
	w2b(buf+3, addr);

//	printf("sending update of %o: %o\n", addr, tv->curbuf->fb[addr]);

	/* Again do the mixing thing for no reason */
	for(i = 0; i < buffer->nosw; i++){
		osw = buffer->osw[i];
		if(osw < 0 || tv->omap[osw] < 0)
			continue;
		n1 = dpymap[0][tv->vswsect[0][osw]];
		n2 = dpymap[1][tv->vswsect[1][osw]];
		w1 = n1 < 0 ? 0 : tv->buffers[n1].fb[addr];
		w2 = n2 < 0 ? 0 : tv->buffers[n2].fb[addr];
		bw1 = n1 < 0 ? 0 : tv->buffers[n1].mask;
		bw2 = n2 < 0 ? 0 : tv->buffers[n2].mask;
		w2b(buf+5, w1^bw1 | w2^bw2);
		writen(tv->cons[tv->omap[osw]].fd, buf, 7);
	}
}

// Assembly:
cmpw $0x3fd7, %dx            # imm = 0x3FD7
ja 0x33da
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9(%rsp), %rax
movw $0x5, (%rax)
movb $0x3, 0x2(%rax)
movb %dl, 0x3(%rax)
movzwl %dx, %eax
movb %ah, 0xd(%rsp)
leaq 0x8(%rdi), %r12
leaq (%rdi,%rax,2), %r13
addq $0x8, %r13
leaq 0x808e0(%rdi), %rax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
leaq 0x3f7d(%rip), %rdi      # 0x7270
movslq 0x8084(%rbx), %rax
cmpq %rax, %r15
jge 0x33cc
movslq 0x8004(%rbx,%r15,4), %rdx
testq %rdx, %rdx
js 0x33c4
movslq 0x80a60(%r14,%rdx,4), %rax
testq %rax, %rax
js 0x33c4
movzbl 0x8088c(%r14,%rdx), %ecx
movslq (%rdi,%rcx,4), %rsi
testq %rsi, %rsi
js 0x3346
imulq $0x8088, %rsi, %rcx     # imm = 0x8088
movzwl (%r13,%rcx), %ecx
jmp 0x3348
xorl %ecx, %ecx
movzbl 0x808ac(%r14,%rdx), %edx
movq %rdi, %rbp
movl 0x40(%rdi,%rdx,4), %edi
testl %edi, %edi
js 0x336b
imulq $0x8088, %rdi, %rdx     # imm = 0x8088
movzwl (%r13,%rdx), %edx
jmp 0x336d
xorl %edx, %edx
testl %esi, %esi
js 0x3383
imulq $0x8088, %rsi, %rsi     # imm = 0x8088
movzwl 0x8000(%r12,%rsi), %esi
jmp 0x3385
xorl %esi, %esi
testl %edi, %edi
js 0x339b
imulq $0x8088, %rdi, %rdi     # imm = 0x8088
movzwl 0x8000(%r12,%rdi), %edi
jmp 0x339d
xorl %edi, %edi
xorl %ecx, %esi
xorl %edx, %edi
orl %esi, %edi
movw %di, 0xe(%rsp)
imulq $0xc, %rax, %rax
movq 0x10(%rsp), %rcx
movl (%rcx,%rax), %edi
leaq 0x9(%rsp), %rsi
pushq $0x7
popq %rdx
callq 0x6cc7
movq %rbp, %rdi
incq %r15
jmp 0x32f3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: updatevsw
static void
updatevsw(TV *tv)
{
	int i, j, n;
	for(i = 0; i < NUMFBUFFERS; i++){
		n = 0;
		for(j = 0; j < NUMOUTPUTS; j++)
			if(dpymap[0][tv->vswsect[0][j]] == i ||
			   dpymap[1][tv->vswsect[1][j]] == i)
				tv->buffers[i].osw[n++] = j;
		tv->buffers[i].nosw = n;
	}
}

// Assembly:
leaq 0x8(%rdi), %rax
xorl %ecx, %ecx
leaq 0x3e88(%rip), %rdx      # 0x7270
cmpq $0x10, %rcx
je 0x3449
xorl %esi, %esi
imulq $0x8088, %rcx, %r8      # imm = 0x8088
leaq (%rax,%r8), %r9
xorl %r10d, %r10d
cmpq $0x20, %rsi
je 0x343c
movzbl 0x8088c(%rdi,%rsi), %r11d
movl (%rdx,%r11,4), %r11d
cmpq %r11, %rcx
je 0x3429
movzbl 0x808ac(%rdi,%rsi), %r11d
movl 0x40(%rdx,%r11,4), %r11d
cmpq %r11, %rcx
jne 0x3437
movslq %r10d, %r11
incl %r10d
movl %esi, 0x8004(%r9,%r11,4)
incq %rsi
jmp 0x33fe
movl %r10d, 0x8084(%rax,%r8)
incq %rcx
jmp 0x33e8
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: sendfb
void
sendfb(TV *tv, int osw)
{
	TVcon *con = &tv->cons[tv->omap[osw]];
	if(tv->omap[osw] < 0)
		return;
	uint8 *b = largebuf;
	msgheader(b, MSG_FB, 1+8+WIDTH*HEIGHT/8);
	b += 3;
	w2b(b, 0);
	w2b(b+2, 0);
	w2b(b+4, WIDTH/16);
	w2b(b+6, HEIGHT);
	b += 8;
	packfb(tv, b, con->dpy, 0, 0, WIDTH/16, HEIGHT);
	writen(con->fd, largebuf, 3+8+WIDTH*HEIGHT/8);
}

// Assembly:
movslq %esi, %rax
movslq 0x80a60(%rdi,%rax,4), %rax
testq %rax, %rax
js 0x34c3
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
imulq $0xc, %rax, %r15
movw $0x7fb9, 0x96bc1(%rip)  # imm = 0x7FB9
leaq 0x96bba(%rip), %r14     # 0x9a030
movb $0x2, 0x96bb5(%rip)     # 0x9a032
movabsq $0x1c6002400000000, %rax # imm = 0x1C6002400000000
movq %rax, 0x96ba5(%rip)     # 0x9a033
movl 0x808e4(%rdi,%r15), %esi
pushq $0x24
popq %r8
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1c6, %r9d            # imm = 0x1C6
callq 0x3813
movl 0x808e0(%rbx,%r15), %edi
movq %r14, %rsi
movl $0x7fbb, %edx           # imm = 0x7FBB
popq %rbx
popq %r14
popq %r15
jmp 0x6cc7
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: dati_tv
int
dati_tv(Bus *bus, void *dev)
{
	TV *tv = dev;
	word *creg;
	FBuffer *curbuf;

	creg = tv->ten11->cycle ? &tv->creg10 : &tv->creg11;
	curbuf = (*creg & BUFMASK) < NUMFBUFFERS ? &tv->buffers[*creg & BUFMASK] : nil;
	int waddr = bus->addr>>1;
	if(bus->addr >= TVLO && bus->addr < 0160000){
		if(curbuf == nil)
			return 0;
		/* In Buffer */
		if((bus->addr&~1) == CSA)
			bus->data = curbuf->csa;
		else{
			waddr -= TVLO>>1;
			bus->data = curbuf->fb[waddr];
		}
		return 0;
	}
	switch(bus->addr){
	case CREG:
		bus->data = *creg;
		return 0;
	case CREG+2:
		/* unused, read only as side effect */
		bus->data = 0;
		return 0;
	case KMS:
		bus->data = tv->kms&~037 | tv->kma_hi>>16 & 3;
		return 0;
	case KMA:
		bus->data = tv->kma_hi | tv->kma_lo;
		return 0;
	case VSW:
	case ASW:
		/* write only */
		bus->data = 0;
		return 0;
	}
	return 1;
}

// Assembly:
movq (%rsi), %rax
xorl %ecx, %ecx
cmpl $0x0, (%rax)
setne %cl
movzwl 0x80888(%rsi,%rcx,2), %ecx
movl 0x8(%rdi), %edx
leal -0x6000(%rdx), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
ja 0x36cb
andl $0x1f, %ecx
xorl %eax, %eax
cmpw $0xf, %cx
ja 0x3737
imulq $0x8088, %rcx, %rax     # imm = 0x8088
addq %rsi, %rax
addq $0x8, %rax
movl %edx, %ecx
andl $0xfffe, %ecx           # imm = 0xFFFE
cmpl $0xdffe, %ecx           # imm = 0xDFFE
jne 0x3717
movzwl 0x7ffe(%rax), %ecx
jmp 0x3731
pushq $0x1
popq %rax
leal -0x3e824(%rdx), %r8d
cmpl $0x6, %r8d
ja 0x3703
leaq 0x3b66(%rip), %rdx      # 0x7248
movslq (%rdx,%r8,4), %r8
addq %rdx, %r8
jmpq *%r8
movl 0x808cc(%rsi), %eax
andl $-0x20, %eax
movzwl 0x808d2(%rsi), %ecx
andl $0x3, %ecx
orl %eax, %ecx
jmp 0x3731
cmpl $0x3e830, %edx          # imm = 0x3E830
je 0x3713
cmpl $0x3f1b8, %edx          # imm = 0x3F1B8
jne 0x3737
xorl %ecx, %ecx
jmp 0x3731
shrl %edx
movl %edx, %ecx
movzwl -0x6000(%rax,%rcx,2), %ecx
jmp 0x3731
movl 0x808d4(%rsi), %ecx
orl 0x808d0(%rsi), %ecx
movw %cx, 0xc(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: inittv
void
inittv(TV *tv)
{
	TVcon *con;
	int i;
	for(con = tv->cons; con < &tv->cons[NUMCONNECTIONS]; con++){
		con->fd = -1;
		con->dpy = -1;
		con->kbd = -1;
	}
	for(i = 0; i < NUMOUTPUTS; i++)
		tv->omap[i] = -1;
	pthread_mutex_init(&lock, nil);
	pthread_mutex_init(&kblock, nil);
	pthread_cond_init(&kbcond, nil);
}

// Assembly:
movl $0x808e0, %eax          # imm = 0x808E0
cmpq $0x80a60, %rax          # imm = 0x80A60
jae 0x377c
orq $-0x1, (%rdi,%rax)
orl $-0x1, 0x8(%rdi,%rax)
addq $0xc, %rax
jmp 0x3764
xorl %eax, %eax
cmpq $0x20, %rax
je 0x3791
orl $-0x1, 0x80a60(%rdi,%rax,4)
incq %rax
jmp 0x377e
pushq %rax
leaq 0x96817(%rip), %rdi     # 0x99fb0
xorl %esi, %esi
callq 0x2320
leaq 0x96831(%rip), %rdi     # 0x99fd8
xorl %esi, %esi
callq 0x2320
leaq 0x9684b(%rip), %rdi     # 0x9a000
xorl %esi, %esi
popq %rax
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: packfb
static void
packfb(TV *tv, uint8 *dst, int osw, int x, int y, int w, int h)
{
	int stride;
	int n1, n2;
	word *src1, *src2;
	word bw1, bw2;

	stride = WIDTH/16;

	/* We mix the outputs of both sections for the final output.
	 * This feature does not seem to be used by the TV system
	 * but it's theoretically capable of doing something like this.
	 * External video input is not supported here of course. */
	n1 = dpymap[0][tv->vswsect[0][osw]];
	n2 = dpymap[1][tv->vswsect[1][osw]];
//printf("inbuf: %d %d\n", n1, n2);
	src1 = n1 < 0 ? nullfb : &tv->buffers[n1].fb[stride*y + x];
	src2 = n2 < 0 ? nullfb : &tv->buffers[n2].fb[stride*y + x];
	bw1 = n1 < 0 ? 0 : tv->buffers[n1].mask;
	bw2 = n2 < 0 ? 0 : tv->buffers[n2].mask;
	for(y = 0; y < h; y++){
		for(x = 0; x < w; x++){
			/* We mix with an OR */
			w2b(dst, src1[x]^bw1 | src2[x]^bw2);
			dst += 2;
		}
		src1 += stride;
		src2 += stride;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movslq %esi, %rax
movzbl 0x8088c(%rdi,%rax), %esi
leaq 0x3a47(%rip), %r10      # 0x7270
movslq (%r10,%rsi,4), %r14
movzbl 0x808ac(%rdi,%rax), %eax
movslq 0x40(%r10,%rax,4), %r11
leaq 0x8(%rdi), %r10
imulq $0x8088, %r14, %rsi     # imm = 0x8088
imull $0x24, %ecx, %ecx
addl %edx, %ecx
imulq $0x8088, %r11, %rbx     # imm = 0x8088
testq %r11, %r11
leaq 0x3b95(%rip), %rdx      # 0x73f0
leaq 0x8(%rdi,%rbx), %rax
leaq (%rax,%rcx,2), %rax
cmovsq %rdx, %rax
addq %rsi, %rdi
addq $0x8, %rdi
leaq (%rdi,%rcx,2), %rcx
testq %r14, %r14
cmovsq %rdx, %rcx
js 0x3887
movzwl 0x8000(%r10,%rsi), %edx
jmp 0x3889
xorl %edx, %edx
xorl %esi, %esi
testl %r11d, %r11d
js 0x389b
movzwl 0x8000(%r10,%rbx), %edi
jmp 0x389d
xorl %edi, %edi
testl %r8d, %r8d
cmovlel %esi, %r8d
testl %r9d, %r9d
cmovlel %esi, %r9d
addl %r8d, %r8d
leaq 0x96786(%rip), %r10     # 0x9a03b
cmpl %r9d, %esi
je 0x38ee
xorl %r11d, %r11d
cmpq %r11, %r8
je 0x38df
movzwl (%rcx,%r11), %ebx
xorw %dx, %bx
movzwl (%rax,%r11), %ebp
xorw %di, %bp
orl %ebx, %ebp
movw %bp, (%r10,%r11)
addq $0x2, %r11
jmp 0x38bd
addq $0x48, %rcx
addq $0x48, %rax
incl %esi
addq %r11, %r10
jmp 0x38b5
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: closetv
void
closetv(TV *tv)
{
	uint8 buf[3];
	int i;
	for(i = 0; i < NUMCONNECTIONS; i++)
		if(tv->cons[i].fd >= 0){
			msgheader(buf, MSG_CLOSE, 1);
			writen(tv->cons[i].fd, buf, 3);
			/* wait for close */
			read(tv->cons[i].fd, buf, 1);
			/* this will cause the handletv thread
			 * to close the connection...if it makes
			 * it that far */
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0xd(%rsp), %r14
pushq $0x3
popq %rbp
pushq $0x1
popq %r15
cmpq $0x180, %r12            # imm = 0x180
je 0x396e
movl 0x808e0(%rbx,%r12), %edi
testl %edi, %edi
js 0x3968
movw $0x1, 0xd(%rsp)
movb $0x4, 0xf(%rsp)
movq %r14, %rsi
movl %ebp, %edx
callq 0x6cc7
movl 0x808e0(%rbx,%r12), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2160
addq $0xc, %r12
jmp 0x392a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq