LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_tdata_reinit
prof_tdata_t *
prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata)
{
	uint64_t thr_uid = tdata->thr_uid;
	uint64_t thr_discrim = tdata->thr_discrim + 1;
	char *thread_name = (tdata->thread_name != NULL) ?
	    prof_thread_name_alloc(tsd_tsdn(tsd), tdata->thread_name) : NULL;
	bool active = tdata->active;

	prof_tdata_detach(tsd, tdata);
	return (prof_tdata_init_impl(tsd, thr_uid, thr_discrim, thread_name,
	    active));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %r15
testq %r15, %r15
je 0x2f066
movq %r15, %rdi
callq 0xb190
testq %rax, %rax
je 0x2f066
leaq 0x1(%rax), %r12
cmpq $0x1000, %r12           # imm = 0x1000
jbe 0x2f0c8
movq %r12, %rdi
callq 0x10c91
movl %eax, %ebp
leaq 0x1d62f(%rip), %rax     # 0x4c5b0
movq (%rax), %rax
movq (%rax), %rsi
testq %rsi, %rsi
jne 0x2efa4
xorl %esi, %esi
lock
xaddq %rsi, (%rax)
testq %rsi, %rsi
jne 0x2efa4
xorl %edi, %edi
xorl %esi, %esi
callq 0x1acc9
movq %rax, %rsi
movq %r14, %rdi
movq %r12, %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0xccb3
testq %rax, %rax
je 0x2f066
movq %rax, %r13
leaq 0x1e109(%rip), %rbp     # 0x4d0d0
movq (%rbp), %rax
notq %rax
andq %r13, %rax
cmpq %rax, %r13
jne 0x2efed
movq %r13, %rdi
callq 0x2e203
movq %rax, %rsi
movq (%rbp), %rax
notq %rax
andq %r13, %rax
jmp 0x2eff0
movq (%rax), %rsi
cmpq %rax, %r13
jne 0x2f008
movq %r14, %rdi
movq %rsi, %rbp
movq %r13, %rsi
callq 0x2e344
movq %rbp, %rsi
jmp 0x2f04f
movq %r13, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x1dfa7(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
jne 0x2f042
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x2f04f
movl %ecx, %eax
leaq 0xc675(%rip), %rcx      # 0x3b6c0
movq (%rcx,%rax,8), %rax
lock
xaddq %rax, 0x90(%rsi)
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xb340
movq (%rbx), %rdi
callq 0xb5a0
cmpb $0x1, 0x20(%rbx)
jne 0x2f08e
leaq 0x40(%rbx), %rdi
callq 0x378a7
testq %rax, %rax
je 0x2f096
movb $0x0, 0x20(%rbx)
movq $0x0, 0x20(%r14)
movq (%rbx), %rdi
callq 0xb380
movq $0x0, 0x20(%r14)
movq (%rbx), %rdi
callq 0xb380
leaq 0x1e1ab(%rip), %r15     # 0x4d258
movq %r15, %rdi
callq 0xb5a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f20e
movq %r15, %rdi
callq 0xb380
shrq $0x3, %rax
leaq 0xcd6d(%rip), %rcx      # 0x3be40
movzbl (%rcx,%rax), %ebp
jmp 0x2ef7a
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_reset
void
prof_reset(tsd_t *tsd, size_t lg_sample)
{
	prof_tdata_t *next;

	assert(lg_sample < (sizeof(uint64_t) << 3));

	malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_mtx);
	malloc_mutex_lock(tsd_tsdn(tsd), &tdatas_mtx);

	lg_prof_sample = lg_sample;

	next = NULL;
	do {
		prof_tdata_t *to_destroy = tdata_tree_iter(&tdatas, next,
		    prof_tdata_reset_iter, (void *)tsd);
		if (to_destroy != NULL) {
			next = tdata_tree_next(&tdatas, to_destroy);
			prof_tdata_destroy_locked(tsd, to_destroy, false);
		} else
			next = NULL;
	} while (next != NULL);

	malloc_mutex_unlock(tsd_tsdn(tsd), &tdatas_mtx);
	malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_mtx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1e11a(%rip), %rdi     # 0x4d208
callq 0xb5a0
leaq 0x1e15e(%rip), %rdi     # 0x4d258
callq 0xb5a0
movq %r14, 0x1e1a2(%rip)     # 0x4d2a8
xorl %r14d, %r14d
leaq 0x1e1a0(%rip), %r15     # 0x4d2b0
movq 0x1e199(%rip), %rsi     # 0x4d2b0
testq %r14, %r14
je 0x2f126
movq %r14, %rdi
callq 0x2fc1b
jmp 0x2f12e
movq %rsi, %rdi
callq 0x2fc79
testq %rax, %rax
je 0x2f1a1
movq 0x30(%rax), %rcx
andq $-0x2, %rcx
je 0x2f15b
movq %rcx, %r14
movq 0x28(%rcx), %rcx
testq %rcx, %rcx
jne 0x2f13d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f20e
testq %r14, %r14
jne 0x2f110
jmp 0x2f1a1
movq 0x8(%rax), %rcx
movq %r15, %rsi
xorl %r14d, %r14d
movq (%rsi), %rdx
xorl %esi, %esi
cmpq 0x8(%rdx), %rcx
seta %sil
sbbl $0x0, %esi
jne 0x2f188
movq 0x10(%rax), %rdi
xorl %esi, %esi
cmpq 0x10(%rdx), %rdi
seta %sil
sbbl $0x0, %esi
testl %esi, %esi
js 0x2f198
je 0x2f149
movq 0x30(%rdx), %rdx
andq $-0x2, %rdx
jmp 0x2f168
leaq 0x28(%rdx), %rsi
movq %rdx, %r14
jmp 0x2f165
leaq 0x1e0b0(%rip), %rdi     # 0x4d258
callq 0xb380
leaq 0x1e054(%rip), %rdi     # 0x4d208
popq %rbx
popq %r14
popq %r15
jmp 0xb380
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_active_get
bool
prof_active_get(tsdn_t *tsdn)
{
	bool prof_active_current;

	malloc_mutex_lock(tsdn, &prof_active_mtx);
	prof_active_current = prof_active;
	malloc_mutex_unlock(tsdn, &prof_active_mtx);
	return (prof_active_current);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x1d9d7(%rip), %rbx     # 0x4d2b8
movq %rbx, %rdi
callq 0xb5a0
movb 0x1da18(%rip), %bpl     # 0x4d308
movq %rbx, %rdi
callq 0xb380
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_active_set
bool
prof_active_set(tsdn_t *tsdn, bool active)
{
	bool prof_active_old;

	malloc_mutex_lock(tsdn, &prof_active_mtx);
	prof_active_old = prof_active;
	prof_active = active;
	malloc_mutex_unlock(tsdn, &prof_active_mtx);
	return (prof_active_old);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
leaq 0x1d9aa(%rip), %r14     # 0x4d2b8
movq %r14, %rdi
callq 0xb5a0
movb 0x1d9eb(%rip), %bpl     # 0x4d308
movb %bl, 0x1d9e5(%rip)      # 0x4d308
movq %r14, %rdi
callq 0xb380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_thread_name_set
bool
prof_thread_active_init_set(tsdn_t *tsdn, bool active_init)
{
	bool active_init_old;

	malloc_mutex_lock(tsdn, &prof_thread_active_init_mtx);
	active_init_old = prof_thread_active_init;
	prof_thread_active_init = active_init;
	malloc_mutex_unlock(tsdn, &prof_thread_active_init_mtx);
	return (active_init_old);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
leaq 0x1d9d1(%rip), %r14     # 0x4d310
movq %r14, %rdi
callq 0xb5a0
movb 0x1da12(%rip), %bpl     # 0x4d360
movb %bl, 0x1da0c(%rip)      # 0x4d360
movq %r14, %rdi
callq 0xb380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_gdump_get
bool
prof_gdump_get(tsdn_t *tsdn)
{
	bool prof_gdump_current;

	malloc_mutex_lock(tsdn, &prof_gdump_mtx);
	prof_gdump_current = prof_gdump_val;
	malloc_mutex_unlock(tsdn, &prof_gdump_mtx);
	return (prof_gdump_current);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x1d9fb(%rip), %rbx     # 0x4d368
movq %rbx, %rdi
callq 0xb5a0
movb 0x1da3c(%rip), %bpl     # 0x4d3b8
movq %rbx, %rdi
callq 0xb380
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_gdump_set
bool
prof_gdump_set(tsdn_t *tsdn, bool gdump)
{
	bool prof_gdump_old;

	malloc_mutex_lock(tsdn, &prof_gdump_mtx);
	prof_gdump_old = prof_gdump_val;
	prof_gdump_val = gdump;
	malloc_mutex_unlock(tsdn, &prof_gdump_mtx);
	return (prof_gdump_old);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
leaq 0x1d9ce(%rip), %r14     # 0x4d368
movq %r14, %rdi
callq 0xb5a0
movb 0x1da0f(%rip), %bpl     # 0x4d3b8
movb %bl, 0x1da09(%rip)      # 0x4d3b8
movq %r14, %rdi
callq 0xb380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_prefork0
void
prof_prefork0(tsdn_t *tsdn)
{

	if (opt_prof) {
		unsigned i;

		malloc_mutex_prefork(tsdn, &prof_dump_mtx);
		malloc_mutex_prefork(tsdn, &bt2gctx_mtx);
		malloc_mutex_prefork(tsdn, &tdatas_mtx);
		for (i = 0; i < PROF_NTDATA_LOCKS; i++)
			malloc_mutex_prefork(tsdn, &tdata_locks[i]);
		for (i = 0; i < PROF_NCTX_LOCKS; i++)
			malloc_mutex_prefork(tsdn, &gctx_locks[i]);
	}
}

// Assembly:
cmpb $0x1, 0x1d7db(%rip)     # 0x4d1a0
jne 0x2fa35
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1d833(%rip), %rsi     # 0x4d208
callq 0x2e48e
leaq 0x1d9df(%rip), %rsi     # 0x4d3c0
movq %rbx, %rdi
callq 0x2e48e
leaq 0x1d868(%rip), %rsi     # 0x4d258
movq %rbx, %rdi
callq 0x2e48e
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e48e
addq $0x50, %r14
cmpq $0x5000, %r14           # imm = 0x5000
jne 0x2f9fb
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e48e
addq $0x50, %r14
cmpq $0x14000, %r14          # imm = 0x14000
jne 0x2fa16
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_prefork1
void
prof_prefork1(tsdn_t *tsdn)
{

	if (opt_prof) {
		malloc_mutex_prefork(tsdn, &prof_active_mtx);
		malloc_mutex_prefork(tsdn, &prof_dump_seq_mtx);
		malloc_mutex_prefork(tsdn, &prof_gdump_mtx);
		malloc_mutex_prefork(tsdn, &next_thr_uid_mtx);
		malloc_mutex_prefork(tsdn, &prof_thread_active_init_mtx);
	}
}

// Assembly:
cmpb $0x1, 0x1d763(%rip)     # 0x4d1a0
jne 0x2fa8c
pushq %rbx
movq %rdi, %rbx
leaq 0x1d86e(%rip), %rsi     # 0x4d2b8
callq 0x2e48e
leaq 0x1d762(%rip), %rsi     # 0x4d1b8
movq %rbx, %rdi
callq 0x2e48e
leaq 0x1d903(%rip), %rsi     # 0x4d368
movq %rbx, %rdi
callq 0x2e48e
leaq 0x1d9a4(%rip), %rsi     # 0x4d418
movq %rbx, %rdi
callq 0x2e48e
leaq 0x1d88d(%rip), %rsi     # 0x4d310
movq %rbx, %rdi
popq %rbx
jmp 0x2e48e
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_postfork_parent
void
prof_postfork_parent(tsdn_t *tsdn)
{

	if (opt_prof) {
		unsigned i;

		malloc_mutex_postfork_parent(tsdn,
		    &prof_thread_active_init_mtx);
		malloc_mutex_postfork_parent(tsdn, &next_thr_uid_mtx);
		malloc_mutex_postfork_parent(tsdn, &prof_gdump_mtx);
		malloc_mutex_postfork_parent(tsdn, &prof_dump_seq_mtx);
		malloc_mutex_postfork_parent(tsdn, &prof_active_mtx);
		for (i = 0; i < PROF_NCTX_LOCKS; i++)
			malloc_mutex_postfork_parent(tsdn, &gctx_locks[i]);
		for (i = 0; i < PROF_NTDATA_LOCKS; i++)
			malloc_mutex_postfork_parent(tsdn, &tdata_locks[i]);
		malloc_mutex_postfork_parent(tsdn, &tdatas_mtx);
		malloc_mutex_postfork_parent(tsdn, &bt2gctx_mtx);
		malloc_mutex_postfork_parent(tsdn, &prof_dump_mtx);
	}
}

// Assembly:
cmpb $0x1, 0x1d70c(%rip)     # 0x4d1a0
jne 0x2fb53
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1d868(%rip), %rsi     # 0x4d310
callq 0x2e496
leaq 0x1d964(%rip), %rsi     # 0x4d418
movq %rbx, %rdi
callq 0x2e496
leaq 0x1d8a5(%rip), %rsi     # 0x4d368
movq %rbx, %rdi
callq 0x2e496
leaq 0x1d6e6(%rip), %rsi     # 0x4d1b8
movq %rbx, %rdi
callq 0x2e496
leaq 0x1d7d7(%rip), %rsi     # 0x4d2b8
movq %rbx, %rdi
callq 0x2e496
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e496
addq $0x50, %r14
cmpq $0x14000, %r14          # imm = 0x14000
jne 0x2faec
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e496
addq $0x50, %r14
cmpq $0x5000, %r14           # imm = 0x5000
jne 0x2fb07
leaq 0x1d732(%rip), %rsi     # 0x4d258
movq %rbx, %rdi
callq 0x2e496
leaq 0x1d88b(%rip), %rsi     # 0x4d3c0
movq %rbx, %rdi
callq 0x2e496
leaq 0x1d6c4(%rip), %rsi     # 0x4d208
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e496
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: je_prof_postfork_child
void
prof_postfork_child(tsdn_t *tsdn)
{

	if (opt_prof) {
		unsigned i;

		malloc_mutex_postfork_child(tsdn, &prof_thread_active_init_mtx);
		malloc_mutex_postfork_child(tsdn, &next_thr_uid_mtx);
		malloc_mutex_postfork_child(tsdn, &prof_gdump_mtx);
		malloc_mutex_postfork_child(tsdn, &prof_dump_seq_mtx);
		malloc_mutex_postfork_child(tsdn, &prof_active_mtx);
		for (i = 0; i < PROF_NCTX_LOCKS; i++)
			malloc_mutex_postfork_child(tsdn, &gctx_locks[i]);
		for (i = 0; i < PROF_NTDATA_LOCKS; i++)
			malloc_mutex_postfork_child(tsdn, &tdata_locks[i]);
		malloc_mutex_postfork_child(tsdn, &tdatas_mtx);
		malloc_mutex_postfork_child(tsdn, &bt2gctx_mtx);
		malloc_mutex_postfork_child(tsdn, &prof_dump_mtx);
	}
}

// Assembly:
cmpb $0x1, 0x1d645(%rip)     # 0x4d1a0
jne 0x2fc1a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1d7a1(%rip), %rsi     # 0x4d310
callq 0x2e49e
leaq 0x1d89d(%rip), %rsi     # 0x4d418
movq %rbx, %rdi
callq 0x2e49e
leaq 0x1d7de(%rip), %rsi     # 0x4d368
movq %rbx, %rdi
callq 0x2e49e
leaq 0x1d61f(%rip), %rsi     # 0x4d1b8
movq %rbx, %rdi
callq 0x2e49e
leaq 0x1d710(%rip), %rsi     # 0x4d2b8
movq %rbx, %rdi
callq 0x2e49e
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e49e
addq $0x50, %r14
cmpq $0x14000, %r14          # imm = 0x14000
jne 0x2fbb3
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e49e
addq $0x50, %r14
cmpq $0x5000, %r14           # imm = 0x5000
jne 0x2fbce
leaq 0x1d66b(%rip), %rsi     # 0x4d258
movq %rbx, %rdi
callq 0x2e49e
leaq 0x1d7c4(%rip), %rsi     # 0x4d3c0
movq %rbx, %rdi
callq 0x2e49e
leaq 0x1d5fd(%rip), %rsi     # 0x4d208
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e49e
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/quarantine.c
// Function: je_quarantine_alloc_hook_work
void
quarantine_alloc_hook_work(tsd_t *tsd)
{
	quarantine_t *quarantine;

	if (!tsd_nominal(tsd))
		return;

	quarantine = quarantine_init(tsd_tsdn(tsd), LG_MAXOBJS_INIT);
	/*
	 * Check again whether quarantine has been initialized, because
	 * quarantine_init() may have triggered recursive initialization.
	 */
	if (tsd_quarantine_get(tsd) == NULL)
		tsd_quarantine_set(tsd, quarantine);
	else
		idalloctm(tsd_tsdn(tsd), quarantine, NULL, true, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, (%rdi)
je 0x2fcc8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rdi, %rbx
movl $0xa, %esi
callq 0x10ce0
movq %rax, %r14
cmpq $0x0, 0x50(%rbx)
je 0x2fd94
movq %rax, %r15
leaq 0x1d3e3(%rip), %r13     # 0x4d0d0
movq (%r13), %rax
notq %rax
andq %r15, %rax
cmpq %rax, %r15
je 0x2fd9d
movq (%rax), %r12
cmpq %rax, %r15
je 0x2fdb7
movq %r15, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x1d2a3(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x2fdd8
movl %ecx, %eax
leaq 0xb97e(%rip), %rcx      # 0x3b6c0
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x90(%r12)
movq (%r13), %rdx
notq %rdx
andq %r15, %rdx
subq %rdx, %r15
je 0x2fdc4
shrq $0xc, %r15
leaq 0x1d253(%rip), %rax     # 0x4cfc0
movq %r15, %rcx
subq (%rax), %rcx
testb $0x2, 0x78(%rdx,%rcx,8)
movq (%rdx), %rsi
movq %rbx, %rdi
movq %r14, %rcx
jne 0x2fdec
movq %r15, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xd9f4
movq %r14, 0x50(%rbx)
jmp 0x2fcbe
movq %r14, %rdi
callq 0x2e203
movq %rax, %r12
movq (%r13), %rax
notq %rax
andq %r15, %rax
jmp 0x2fd03
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e344
jmp 0x2fd46
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10a30
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x2fd46
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xda57
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/quarantine.c
// Function: je_quarantine_cleanup
void
quarantine_cleanup(tsd_t *tsd)
{
	quarantine_t *quarantine;

	if (!config_fill)
		return;

	quarantine = tsd_quarantine_get(tsd);
	if (quarantine != NULL) {
		quarantine_drain(tsd_tsdn(tsd), quarantine, 0);
		idalloctm(tsd_tsdn(tsd), quarantine, NULL, true, true);
		tsd_quarantine_set(tsd, NULL);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x50(%rdi), %r14
testq %r14, %r14
je 0x30295
movq %rdi, %rbx
cmpq $0x0, (%r14)
je 0x301e9
cmpq $0x0, 0x8(%r14)
je 0x301e9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x302f0
jmp 0x301cf
leaq 0x1cee0(%rip), %r12     # 0x4d0d0
movq (%r12), %rax
notq %rax
andq %r14, %rax
cmpq %rax, %r14
je 0x302a1
movq (%rax), %r15
cmpq %rax, %r14
je 0x302bb
movq %r14, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x1cda0(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x302d5
movl %ecx, %eax
leaq 0xb47b(%rip), %rcx      # 0x3b6c0
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x90(%r15)
movq (%r12), %rdx
notq %rdx
andq %r14, %rdx
movq %r14, %r8
subq %rdx, %r8
je 0x302c8
shrq $0xc, %r8
leaq 0x1cd4e(%rip), %rax     # 0x4cfc0
movq %r8, %rcx
subq (%rax), %rcx
testb $0x2, 0x78(%rdx,%rcx,8)
movq (%rdx), %rsi
movq %rbx, %rdi
movq %r14, %rcx
jne 0x302e9
callq 0xd9f4
movq $0x0, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x2e203
movq %rax, %r15
movq (%r12), %rax
notq %rax
andq %r14, %rax
jmp 0x30206
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e344
jmp 0x30249
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10a30
jmp 0x3028d
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x30249
callq 0xda57
jmp 0x3028d
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/quarantine.c
// Function: quarantine_drain_one
static void
quarantine_drain_one(tsdn_t *tsdn, quarantine_t *quarantine)
{
	quarantine_obj_t *obj = &quarantine->objs[quarantine->first];
	assert(obj->usize == isalloc(tsdn, obj->ptr, config_prof));
	idalloctm(tsdn, obj->ptr, NULL, false, true);
	quarantine->curbytes -= obj->usize;
	quarantine->curobjs--;
	quarantine->first = (quarantine->first + 1) & ((ZU(1) <<
	    quarantine->lg_maxobjs) - 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rsi), %rax
shlq $0x4, %rax
leaq (%rsi,%rax), %r14
addq $0x20, %r14
movq (%r14), %rcx
leaq 0x1cdbf(%rip), %rax     # 0x4d0d0
movq (%rax), %rdx
notq %rdx
andq %rcx, %rdx
movq %rcx, %r8
subq %rdx, %r8
je 0x30373
shrq $0xc, %r8
leaq 0x1cc93(%rip), %rax     # 0x4cfc0
movq %r8, %rsi
subq (%rax), %rsi
testb $0x2, 0x78(%rdx,%rsi,8)
movq (%rdx), %rsi
jne 0x3037d
callq 0xd9f4
movq 0x8(%r14), %rax
subq %rax, (%rbx)
decq 0x8(%rbx)
movq 0x10(%rbx), %rax
movb 0x18(%rbx), %cl
movq $-0x1, %rdx
shlq %cl, %rdx
incq %rax
notq %rdx
andq %rax, %rdx
movq %rdx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rcx, %rsi
callq 0x10a30
jmp 0x30342
callq 0xda57
jmp 0x30342
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/tcache.c
// Function: je_tcache_alloc_small_hard
void *
tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache,
    tcache_bin_t *tbin, szind_t binind, bool *tcache_success)
{
	void *ret;

	arena_tcache_fill_small(tsdn, arena, tbin, binind, config_prof ?
	    tcache->prof_accumbytes : 0);
	if (config_prof)
		tcache->prof_accumbytes = 0;
	ret = tcache_alloc_easy(tbin, tcache_success);

	return (ret);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rcx, %rbx
movq %rcx, %rdx
movl %r8d, %ecx
xorl %r8d, %r8d
callq 0xc864
movl 0x10(%rbx), %ecx
testq %rcx, %rcx
je 0x35abc
movb $0x1, (%r14)
movq 0x18(%rbx), %rax
movq %rcx, %rdx
shlq $0x3, %rdx
negq %rdx
movq (%rax,%rdx), %rax
decl %ecx
movl %ecx, 0x10(%rbx)
cmpl 0x8(%rbx), %ecx
jl 0x35acb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movb $0x0, (%r14)
xorl %eax, %eax
jmp 0x35ab4
movl %ecx, 0x8(%rbx)
jmp 0x35ab4
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/tcache.c
// Function: je_tcaches_create
bool
tcaches_create(tsd_t *tsd, unsigned *r_ind)
{
	arena_t *arena;
	tcache_t *tcache;
	tcaches_t *elm;

	if (tcaches == NULL) {
		tcaches = base_alloc(tsd_tsdn(tsd), sizeof(tcache_t *) *
		    (MALLOCX_TCACHE_MAX+1));
		if (tcaches == NULL)
			return (true);
	}

	if (tcaches_avail == NULL && tcaches_past > MALLOCX_TCACHE_MAX)
		return (true);
	arena = arena_ichoose(tsd, NULL);
	if (unlikely(arena == NULL))
		return (true);
	tcache = tcache_create(tsd_tsdn(tsd), arena);
	if (tcache == NULL)
		return (true);

	if (tcaches_avail != NULL) {
		elm = tcaches_avail;
		tcaches_avail = tcaches_avail->next;
		elm->tcache = tcache;
		*r_ind = (unsigned)(elm - tcaches);
	} else {
		elm = &tcaches[tcaches_past];
		elm->tcache = tcache;
		*r_ind = tcaches_past;
		tcaches_past++;
	}

	return (false);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x17470(%rip)     # 0x4d488
jne 0x36033
movl $0x7ff0, %esi           # imm = 0x7FF0
movq %r14, %rdi
callq 0xf880
movq %rax, 0x1745a(%rip)     # 0x4d488
testq %rax, %rax
je 0x3608a
cmpq $0x0, 0x17455(%rip)     # 0x4d490
movb $0x1, %bpl
jne 0x3604c
cmpl $0xffd, 0x1744e(%rip)   # imm = 0xFFD
ja 0x360ad
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x360b4
movq %r14, %rdi
callq 0x10eca
testq %rax, %rax
je 0x360ad
movq 0x17427(%rip), %rcx     # 0x4d490
testq %rcx, %rcx
je 0x3608f
movq (%rcx), %rdx
movq %rdx, 0x17418(%rip)     # 0x4d490
movq %rax, (%rcx)
subq 0x17406(%rip), %rcx     # 0x4d488
shrq $0x3, %rcx
movl %ecx, (%rbx)
jmp 0x360ab
movb $0x1, %bpl
jmp 0x360ad
movq 0x173f2(%rip), %rcx     # 0x4d488
movl 0x173fc(%rip), %edx     # 0x4d498
movq %rax, (%rcx,%rdx,8)
movl %edx, (%rbx)
leal 0x1(%rdx), %eax
movl %eax, 0x173ed(%rip)     # 0x4d498
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl $0x1, %esi
callq 0x1af15
testq %rax, %rax
je 0x360ad
movq %rax, %rsi
jmp 0x36055
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/tcache.c
// Function: je_tcache_boot
bool
tcache_boot(tsdn_t *tsdn)
{
	unsigned i;

	/*
	 * If necessary, clamp opt_lg_tcache_max, now that large_maxclass is
	 * known.
	 */
	if (opt_lg_tcache_max < 0 || (ZU(1) << opt_lg_tcache_max) < SMALL_MAXCLASS)
		tcache_maxclass = SMALL_MAXCLASS;
	else if ((ZU(1) << opt_lg_tcache_max) > large_maxclass)
		tcache_maxclass = large_maxclass;
	else
		tcache_maxclass = (ZU(1) << opt_lg_tcache_max);

	nhbins = size2index(tcache_maxclass) + 1;

	/* Initialize tcache_bin_info. */
	tcache_bin_info = (tcache_bin_info_t *)base_alloc(tsdn, nhbins *
	    sizeof(tcache_bin_info_t));
	if (tcache_bin_info == NULL)
		return (true);
	stack_nelms = 0;
	for (i = 0; i < NBINS; i++) {
		if ((arena_bin_info[i].nregs << 1) <= TCACHE_NSLOTS_SMALL_MIN) {
			tcache_bin_info[i].ncached_max =
			    TCACHE_NSLOTS_SMALL_MIN;
		} else if ((arena_bin_info[i].nregs << 1) <=
		    TCACHE_NSLOTS_SMALL_MAX) {
			tcache_bin_info[i].ncached_max =
			    (arena_bin_info[i].nregs << 1);
		} else {
			tcache_bin_info[i].ncached_max =
			    TCACHE_NSLOTS_SMALL_MAX;
		}
		stack_nelms += tcache_bin_info[i].ncached_max;
	}
	for (; i < nhbins; i++) {
		tcache_bin_info[i].ncached_max = TCACHE_NSLOTS_LARGE;
		stack_nelms += tcache_bin_info[i].ncached_max;
	}

	return (false);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x162f8(%rip), %rcx     # 0x4c428
cmpq $0xd, %rcx
jle 0x36225
movl $0x1, %edi
shlq %cl, %rdi
leaq 0x16e57(%rip), %rax     # 0x4cfa0
movq (%rax), %rax
cmpq %rax, %rdi
cmovaeq %rax, %rdi
movq %rdi, 0x17346(%rip)     # 0x4d4a0
cmpq $0x1000, %rdi           # imm = 0x1000
ja 0x36235
decq %rdi
shrq $0x3, %rdi
leaq 0x5ccb(%rip), %rax      # 0x3be40
movzbl (%rax,%rdi), %esi
incl %esi
movl %esi, 0x172ff(%rip)     # 0x4d480
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0xf880
movq %rax, 0x172e4(%rip)     # 0x4d478
testq %rax, %rax
je 0x3621d
leaq 0x1643c(%rip), %rdx     # 0x4c5e0
addq $0x20, %rdx
xorl %esi, %esi
xorl %ecx, %ecx
movl (%rdx), %edi
addl %edi, %edi
cmpl $0x14, %edi
ja 0x361c3
movl $0x14, (%rax,%rsi,4)
movl $0x14, %edi
jmp 0x361dc
cmpl $0xc8, %edi
ja 0x361d0
movl %edi, (%rax,%rsi,4)
jmp 0x361dc
movl $0xc8, (%rax,%rsi,4)
movl $0xc8, %edi
addl %edi, %ecx
incq %rsi
addq $0x40, %rdx
cmpq $0x27, %rsi
jne 0x361ac
movl %ecx, 0x17293(%rip)     # 0x4d484
cmpl $0x28, 0x17288(%rip)    # 0x4d480
jb 0x3621d
movl $0x27, %edx
movl $0x14, (%rax,%rdx,4)
addl $0x14, %ecx
incq %rdx
movl 0x1726e(%rip), %esi     # 0x4d480
cmpq %rsi, %rdx
jb 0x361ff
movl %ecx, 0x17267(%rip)     # 0x4d484
testq %rax, %rax
sete %al
popq %rbx
retq
movq $0x3800, 0x17270(%rip) # imm = 0x3800
movl $0x3800, %edi           # imm = 0x3800
callq 0x111e7
movl %eax, %esi
jmp 0x36179
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/tsd.c
// Function: je_malloc_tsd_boot0
tsd_t *
malloc_tsd_boot0(void)
{
	tsd_t *tsd;

	ncleanups = 0;
	if (tsd_boot0())
		return (NULL);
	tsd = tsd_fetch();
	*tsd_arenas_tdata_bypassp_get(tsd) = true;
	return (tsd);
}

// Assembly:
pushq %rbx
movl $0x0, 0x17182(%rip)     # 0x4d4d0
leaq 0x1717f(%rip), %rdi     # 0x4d4d4
leaq -0xec(%rip), %rsi       # 0x36270
callq 0xb220
testl %eax, %eax
je 0x36369
xorl %ebx, %ebx
jmp 0x3639a
movb $0x1, 0x17140(%rip)     # 0x4d4b0
movq %fs:0x0, %rax
leaq -0x68(%rax), %rbx
movl %fs:-0x68, %eax
testl %eax, %eax
je 0x3639f
cmpl $0x2, %eax
je 0x363ad
movb $0x1, %fs:-0x24
movq %rbx, %rax
popq %rbx
retq
movl $0x1, %fs:-0x68
jmp 0x363b9
movl $0x3, %fs:-0x68
movl 0x17115(%rip), %edi     # 0x4d4d4
movq %rbx, %rsi
callq 0xb5b0
testl %eax, %eax
je 0x36391
leaq 0x5e2f(%rip), %rdi      # 0x3c201
callq 0x3645c
leaq 0x16142(%rip), %rax     # 0x4c520
cmpb $0x1, (%rax)
jne 0x36391
callq 0xb070
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/util.c
// Function: je_buferror
int
buferror(int err, char *buf, size_t buflen)
{

#ifdef _WIN32
	FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0,
	    (LPSTR)buf, (DWORD)buflen, NULL);
	return (0);
#elif defined(__GLIBC__) && defined(_GNU_SOURCE)
	char *b = strerror_r(err, buf, buflen);
	if (b != buf) {
		strncpy(buf, b, buflen);
		buf[buflen-1] = '\0';
	}
	return (0);
#else
	return (strerror_r(err, buf, buflen));
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0xb360
cmpq %r14, %rax
je 0x364e0
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0xb0a0
movb $0x0, -0x1(%r14,%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/witness.c
// Function: je_witness_lock_error
void
witness_lock_error(const witness_list_t *witnesses, const witness_t *witness)
{
	witness_t *w;

	malloc_printf("<jemalloc>: Lock rank order reversal:");
	ql_foreach(w, witnesses, link) {
		malloc_printf(" %s(%u)", w->name, w->rank);
	}
	malloc_printf(" %s(%u)\n", witness->name, witness->rank);
	abort();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x74ee(%rip), %rdi      # 0x3ea76
xorl %eax, %eax
callq 0x374a4
movq (%r14), %r12
testq %r12, %r12
je 0x375c0
leaq 0x74fe(%rip), %r15      # 0x3ea9c
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x374a4
movq 0x18(%r12), %r12
cmpq (%r14), %r12
je 0x375c0
testq %r12, %r12
jne 0x3759e
movq (%rbx), %rsi
movl 0x8(%rbx), %edx
leaq 0x74ed(%rip), %rdi      # 0x3eaba
xorl %eax, %eax
callq 0x374a4
callq 0xb070
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/witness.c
// Function: je_witness_lockless_error
void
witness_lockless_error(const witness_list_t *witnesses)
{
	witness_t *w;

	malloc_printf("<jemalloc>: Should not own any locks:");
	ql_foreach(w, witnesses, link) {
		malloc_printf(" %s(%u)", w->name, w->rank);
	}
	malloc_printf("\n");
	abort();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x74ca(%rip), %rdi      # 0x3eae6
xorl %eax, %eax
callq 0x374a4
movq (%rbx), %r15
testq %r15, %r15
je 0x37651
leaq 0x746a(%rip), %r14      # 0x3ea9c
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x374a4
movq 0x18(%r15), %r15
cmpq (%rbx), %r15
je 0x37651
testq %r15, %r15
jne 0x37632
leaq 0x211f(%rip), %rdi      # 0x39777
xorl %eax, %eax
callq 0x374a4
callq 0xb070
// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/ckh.c
// Function: je_ckh_delete
void
ckh_delete(tsd_t *tsd, ckh_t *ckh)
{

	assert(ckh != NULL);

#ifdef CKH_VERBOSE
	malloc_printf(
	    "%s(%p): ngrows: %"FMTu64", nshrinks: %"FMTu64","
	    " nshrinkfails: %"FMTu64", ninserts: %"FMTu64","
	    " nrelocs: %"FMTu64"\n", __func__, ckh,
	    (unsigned long long)ckh->ngrows,
	    (unsigned long long)ckh->nshrinks,
	    (unsigned long long)ckh->nshrinkfails,
	    (unsigned long long)ckh->ninserts,
	    (unsigned long long)ckh->nrelocs);
#endif

	idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, true, true);
	if (config_debug)
		memset(ckh, JEMALLOC_FREE_JUNK, sizeof(ckh_t));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x28(%rsi), %rbx
leaq 0x15932(%rip), %r12     # 0x4d0d0
movq (%r12), %rax
notq %rax
andq %rbx, %rax
cmpq %rax, %rbx
je 0x37846
movq (%rax), %r15
cmpq %rax, %rbx
je 0x37860
movq %rbx, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x157f2(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x37883
movl %ecx, %eax
leaq 0x3ecd(%rip), %rcx      # 0x3b6c0
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x90(%r15)
movq (%r12), %rdx
notq %rdx
andq %rbx, %rdx
movq %rbx, %r8
subq %rdx, %r8
je 0x3786d
shrq $0xc, %r8
leaq 0x157a0(%rip), %rax     # 0x4cfc0
movq %r8, %rcx
subq (%rax), %rcx
testb $0x2, 0x78(%rdx,%rcx,8)
movq (%rdx), %rsi
movq %r14, %rdi
movq %rbx, %rcx
jne 0x37897
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd9f4
movq %rbx, %rdi
callq 0x2e203
movq %rax, %r15
movq (%r12), %rax
notq %rax
andq %rbx, %rax
jmp 0x377b4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2e344
jmp 0x377f7
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10a30
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x377f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xda57
// File: /workspace/github_c_makefile_star2_O3/keiranrowan[P]tiny-core/./src/wc.c
// Function: help
void help() {
	printf("wc [-w|-c|-l] [FILE]...\n");
	printf("    -w = Print word count\n");
	printf("    -c = Print character count\n");
	printf("    -l = Print line count\n");
}

// Assembly:
pushq %rax
leaq 0xb46(%rip), %rdi       # 0x2030
callq 0x1030
leaq 0xb52(%rip), %rdi       # 0x2048
callq 0x1030
leaq 0xb60(%rip), %rdi       # 0x2062
callq 0x1030
leaq 0xb73(%rip), %rdi       # 0x2081
popq %rax
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/arch/amd64.c
// Function: amd64_regfile_pp
void amd64_regfile_pp(regfile_amd64_t *regfile)
{
	printf("\tRegisters:\n");
	char *gpr_string[] = {"rdi",
	                     "rsi",
	                     "rsp",
	                     "rbp",
	                     "rbx",
	                     "rdx",
	                     "rcx",
	                     "rax",
	                     "r8 ",
	                     "r9 ",
	                     "r10",
	                     "r11",
	                     "r12",
	                     "r13",
	                     "r14",
	                     "r15",
	                     "rflags",
	                     "rip"};

	for (int x=0; x<18; x++)
	{
		printf("\t  %s: %" PRIx64 "\n", gpr_string[x], ((uint64_t *)&(regfile->gpr))[x]);
	}
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1a95(%rip), %rdi      # 0x515b
callq 0x30c0
leaq 0x1a96(%rip), %r15      # 0x5168
leaq 0x1a76(%rip), %r14      # 0x514f
xorl %r12d, %r12d
movslq (%r12,%r15), %rsi
addq %r15, %rsi
movq (%rbx,%r12,2), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3130
addq $0x4, %r12
cmpq $0x48, %r12
jne 0x36dc
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3080
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/arch/amd64_syscall.c
// Function: amd64_syscall_pp
int amd64_syscall_pp(regfile_amd64_t *regfile, uint64_t rvalue, bool print_details)
{
	const uint64_t syscall_id = regfile->gpr.reg_rax;
	if (syscall_id >= sizeof(syscall_infos)/sizeof(struct_syscall_info))
	{
		// Unrecognized syscall ID. Return.
		printf("syscall %lu", syscall_id);
		return -1;
	}
	const struct_syscall_info *syscall_info = &syscall_infos[syscall_id];

	if (!print_details)
	{
		// Just print what syscall is this. Job done!
		printf("syscall %s (%lu)", syscall_info->sys_name, syscall_id);
		return 0;
	}
	
	// Print arguments and rvalue.
	printf("%s(", syscall_info->sys_name);
	assert(syscall_info->nargs <= sizeof(args_offset)/sizeof(uint64_t));
	unsigned int arg_idx;
	for (arg_idx = 0; arg_idx < syscall_info->nargs; arg_idx++)
	{
		if (arg_idx != 0) printf(", ");
		printf("0x%lx", ((uint64_t *)&regfile->gpr)[args_offset[arg_idx]]);
	}
	printf(") = 0x%lx", rvalue);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x38(%rdi), %rax
cmpq $0x14f, %rax            # imm = 0x14F
jb 0x3742
leaq 0x1a82(%rip), %rdi      # 0x51b0
movq %rax, %rsi
xorl %eax, %eax
callq 0x3130
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x37f8
movq %rsi, %r15
movq %rax, %rcx
shlq $0x4, %rcx
leaq 0x51bd(%rip), %rbx      # 0x8910
movq 0x8(%rcx,%rbx), %rsi
testb %dl, %dl
je 0x37e5
movq %rdi, %r14
addq %rcx, %rbx
leaq 0x1a60(%rip), %rdi      # 0x51cd
xorl %eax, %eax
callq 0x3130
movl (%rbx), %r13d
cmpq $0x6, %r13
ja 0x3809
movq %r15, (%rsp)
testq %r13, %r13
je 0x37cf
shlq $0x3, %r13
leaq 0x26db(%rip), %rbp      # 0x5e70
leaq 0x1ac6(%rip), %r15      # 0x5262
leaq 0x1ab8(%rip), %r12      # 0x525b
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x37b4
movq %r12, %rdi
xorl %eax, %eax
callq 0x3130
movq (%rbx,%rbp), %rax
movq (%r14,%rax,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3130
addq $0x8, %rbx
cmpq %rbx, %r13
jne 0x37a5
leaq 0x1a88(%rip), %rdi      # 0x525e
xorl %ebp, %ebp
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x3130
jmp 0x37f8
leaq 0x19d0(%rip), %rdi      # 0x51bc
xorl %ebp, %ebp
movq %rax, %rdx
xorl %eax, %eax
callq 0x3130
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19c1(%rip), %rdi      # 0x51d1
leaq 0x19f6(%rip), %rsi      # 0x520d
leaq 0x1a04(%rip), %rcx      # 0x5222
movl $0x185, %edx            # imm = 0x185
callq 0x3160
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: create_folder
int create_folder(char *name, char *output, uint32_t max_size)
{
	DIR *dir = opendir(name);
	char *resolved_name = realpath(name, output);
	if (errno == ENOENT)
		mkdir(name, S_IRWXU|S_IRWXG|S_IROTH);
	else
		return -1;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31e0
callq 0x3090
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x2, (%rcx)
jne 0x38ab
movq %rbx, %rdi
movl $0x1fc, %esi            # imm = 0x1FC
callq 0x30b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: term_dir
int term_dir(char *path, int size)
{
	int path_len = strlen(path);
	// check if directory terminates with '/'
	if (path[path_len-1] != '/')
	{
		if (path_len > MAX_PATH-1) return -1;

		path[path_len] = '/';
		path[path_len+1] = 0;
	}
	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3120
movq %rax, %rdx
shlq $0x20, %rdx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
addq %rdx, %rsi
sarq $0x20, %rsi
xorl %ecx, %ecx
cmpb $0x2f, (%rbx,%rsi)
je 0x390a
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0xff, %eax
jg 0x390a
movq %rdx, %rax
sarq $0x20, %rax
movb $0x2f, (%rbx,%rax)
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rdx, %rax
sarq $0x20, %rax
movb $0x0, (%rbx,%rax)
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: join_path
int join_path(char *dir_path, char *filename, int size)
{
	if (!term_dir(dir_path, size))
	{
		int dir_len;
		int file_len;

		dir_len = strlen(dir_path);
		file_len = strlen(filename);

		if (dir_len + file_len >= size) return -1;
		strncat(dir_path, filename, size);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x30e0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x395c
movq %r14, %rdi
callq 0x3120
movq %rax, %r15
movq %rbx, %rdi
callq 0x3120
movq %rax, %rcx
addl %r15d, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ebp, %ecx
jge 0x395c
movslq %ebp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3180
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: close_trace
void close_trace(peekaboo_trace_t *trace_ptr)
{
	fflush(trace_ptr->insn_trace);
	fflush(trace_ptr->bytes_map);
	fflush(trace_ptr->regfile);
	fflush(trace_ptr->memfile);
	fflush(trace_ptr->memrefs);
	//fflush(trace_ptr->metafile);

	fclose(trace_ptr->insn_trace);
	fclose(trace_ptr->bytes_map);
	fclose(trace_ptr->regfile);
	fclose(trace_ptr->memfile);
	fclose(trace_ptr->memrefs);
	//fclose(trace_ptr->metafile);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3210
movq 0x8(%rbx), %rdi
callq 0x3210
movq 0x10(%rbx), %rdi
callq 0x3210
movq 0x20(%rbx), %rdi
callq 0x3210
movq 0x18(%rbx), %rdi
callq 0x3210
movq (%rbx), %rdi
callq 0x30f0
movq 0x8(%rbx), %rdi
callq 0x30f0
movq 0x10(%rbx), %rdi
callq 0x30f0
movq 0x20(%rbx), %rdi
callq 0x30f0
movq 0x18(%rbx), %rdi
popq %rbx
jmp 0x30f0
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: create_trace
peekaboo_trace_t *create_trace(char *name)
{
	char dir_path[MAX_PATH];
	peekaboo_trace_t *trace_ptr;

	if (create_folder(name, dir_path, MAX_PATH)) 
	{
		return NULL;
	}

	trace_ptr = (peekaboo_trace_t *)malloc(sizeof(peekaboo_trace_t));
	if (!trace_ptr) PEEKABOO_DIE("libpeekaboo: Unable to malloc trace instance.\n");

	create_trace_file(dir_path, "insn.trace", MAX_PATH, &trace_ptr->insn_trace);
	create_trace_file(dir_path, "regfile", MAX_PATH, &trace_ptr->regfile);
	create_trace_file(dir_path, "memfile", MAX_PATH, &trace_ptr->memfile);
	create_trace_file(dir_path, "memrefs", MAX_PATH, &trace_ptr->memrefs);
	create_trace_file(dir_path, "metafile", MAX_PATH, &trace_ptr->metafile);

	/* Since version 2, insn.bytemap is shared by all threads. So we do not create
	 * here.
	 */
	//create_trace_file(dir_path, "insn.bytemap", MAX_PATH, &trace_ptr->bytes_map);


	return trace_ptr;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsp, %rsi
callq 0x3060
testl %eax, %eax
je 0x3a43
xorl %ebx, %ebx
jmp 0x3ad6
movl $0x40, %edi
callq 0x3200
testq %rax, %rax
je 0x3ae4
movq %rax, %rbx
leaq 0x24ba(%rip), %rsi      # 0x5f1a
movq %rsp, %r14
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
movq %rax, %rcx
callq 0x3030
leaq 0x10(%rbx), %rcx
leaq 0x24a7(%rip), %rsi      # 0x5f25
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x3030
leaq 0x20(%rbx), %rcx
leaq 0x2497(%rip), %rsi      # 0x5f2d
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x3030
leaq 0x18(%rbx), %rcx
leaq 0x2487(%rip), %rsi      # 0x5f35
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x3030
movq %rbx, %rcx
addq $0x28, %rcx
leaq 0x2474(%rip), %rsi      # 0x5f3d
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x3030
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
callq 0x32a0
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: load_bytes_map
void load_bytes_map(peekaboo_trace_t *trace)
{
	fseek(trace->bytes_map, 0, SEEK_END);
	size_t bytesmap_size = ftell(trace->bytes_map);
	size_t num_maps = bytesmap_size / sizeof(bytes_map_t);

	trace->internal->bytes_map_buf = malloc(bytesmap_size);
	trace->internal->bytes_map_size = bytesmap_size;

	rewind(trace->bytes_map);
	printf("Found %lu instructions in bytemap...\n", num_maps);
	if (fread(trace->internal->bytes_map_buf, sizeof(bytes_map_t), num_maps, trace->bytes_map) != num_maps)
	{
		PEEKABOO_DIE("libpeekaboo: BYTES MAP READ ERROR!\n");
	}
	printf("\n");
	return ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x3230
movq 0x8(%rbx), %rdi
callq 0x31c0
movq %rax, %r15
movq %rax, %r14
shrq $0x5, %r14
movq %rax, %rdi
callq 0x3200
movq 0x38(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq %r15, 0x20(%rcx)
movq 0x8(%rbx), %rdi
callq 0x3140
leaq 0x240e(%rip), %rdi      # 0x5f46
movq %r14, %rsi
xorl %eax, %eax
callq 0x3130
movq 0x8(%rbx), %rcx
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x30d0
cmpq %r14, %rax
jne 0x3b6f
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x3080
callq 0x32c5
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: find_bytes_map
bytes_map_t *find_bytes_map(uint64_t pc, peekaboo_trace_t *trace)
{
	bytes_map_t *bytes_map_buf = trace->internal->bytes_map_buf;
	size_t map_size = trace->internal->bytes_map_size;
	size_t num_maps = map_size / sizeof(bytes_map_t);
	int x;
	for (x=0; x<num_maps; x++)
	{
		if ((bytes_map_buf+x)->pc == pc)
			return bytes_map_buf+x;
	}

	return NULL;
}

// Assembly:
movq 0x38(%rsi), %rax
movq 0x20(%rax), %rcx
cmpq $0x20, %rcx
jb 0x3b98
movq 0x18(%rax), %rax
shrq $0x5, %rcx
cmpq %rdi, (%rax)
je 0x3b9a
addq $0x20, %rax
decq %rcx
jne 0x3b8a
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: get_addr
uint64_t get_addr(size_t id, peekaboo_trace_t *trace)
{
	if (!id) PEEKABOO_DIE("libpeekaboo: Error. Instruction index 0 is not accepted.\n");

	uint64_t addr = 0;
	size_t ptr_size = get_ptr_size(trace);

	fseek(trace->insn_trace, (id-1) * ptr_size, SEEK_SET);
	size_t fread_bytes = fread(&addr, ptr_size, 1, trace->insn_trace);
	return addr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x3c0f
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movq (%rbx), %rdi
movq 0x38(%rbx), %rax
movq 0x8(%rax), %r15
decq %rsi
imulq %r15, %rsi
xorl %edx, %edx
callq 0x3230
movq (%rbx), %rcx
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x30d0
movq (%r14), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x32ea
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: get_num_mem
size_t get_num_mem(size_t id, peekaboo_trace_t *trace)
{
	if (!id) PEEKABOO_DIE("libpeekaboo: Error. Instruction index 0 is not accepted.\n");

	size_t num_mem = 0;
	fseek(trace->memrefs, (id-1) * sizeof(memref_t), SEEK_SET);
	size_t fread_bytes = fread(&num_mem, sizeof(memref_t), 1, trace->memrefs);
	return num_mem;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3c61
movq %rsi, %rbx
movq %rsp, %r14
movq $0x0, (%r14)
movq 0x18(%rsi), %rax
leaq -0x4(,%rdi,4), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x3230
movq 0x18(%rbx), %rcx
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x30d0
movq (%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x330f
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: free_peekaboo_trace
void free_peekaboo_trace(peekaboo_trace_t *trace_ptr)
{
	fclose(trace_ptr->bytes_map);
	fclose(trace_ptr->insn_trace);
	fclose(trace_ptr->regfile);
	fclose(trace_ptr->memfile);
	fclose(trace_ptr->memrefs);
	if (trace_ptr->memrefs_offsets)	fclose(trace_ptr->memrefs_offsets);
	free(trace_ptr->internal->bytes_map_buf);
	free(trace_ptr->internal);
	free(trace_ptr);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x30f0
movq (%rbx), %rdi
callq 0x30f0
movq 0x10(%rbx), %rdi
callq 0x30f0
movq 0x20(%rbx), %rdi
callq 0x30f0
movq 0x18(%rbx), %rdi
callq 0x30f0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4233
callq 0x30f0
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x3070
movq 0x38(%rbx), %rdi
callq 0x3070
movq %rbx, %rdi
popq %rbx
jmp 0x3070
// File: /workspace/github_c_makefile_star2_O3/melynx[P]peekaboo/libpeekaboo/libpeekaboo.c
// Function: free_peekaboo_insn
void free_peekaboo_insn(peekaboo_insn_t *insn_ptr)
{
	if (insn_ptr != NULL)
	{
		if (insn_ptr->regfile != NULL)
		{
			free(insn_ptr->regfile);
			insn_ptr->regfile = NULL;
		}
		free(insn_ptr);
		insn_ptr = NULL;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x44b9
pushq %rbx
movq %rdi, %rbx
movq 0x130(%rdi), %rdi
testq %rdi, %rdi
je 0x44b0
callq 0x3070
movq %rbx, %rdi
popq %rbx
jmp 0x3070
retq
// File: /workspace/github_c_makefile_star2_O3/sadistech[P]nesromtool2/./src/nrt/util.c
// Function: nrt_validate_file
void nrt_validate_file(FILE *rom, nrt_error *error) {
  nrt_header *header = NRT_HEADER_ALLOC;
  char msg[256] = "";

  if (! fread(header, 1, sizeof(nrt_header), rom) ) {
    nrt_append_error(error, "Failed to read header from file.");
    return;
  }

  if (! nrt_validate_header_magic_word(header)) {
    sprintf(msg, "Magic word does not match: %s", header->magic_word);
    nrt_append_error(error, msg);
  }

  if (! nrt_validate_header_prg_count(header)) {
    sprintf(msg, "PRG count is invalid: %d", header->prg_count);
    nrt_append_error(error, msg);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %rbx
movq %rdi, %r15
movl $0x10, %edi
callq 0x2240
movq %rax, %r14
movq %rsp, %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x2180
movl $0x1, %esi
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rcx
callq 0x20c0
testq %rax, %rax
je 0x2d07
movq %r14, %rdi
callq 0x2da1
testb %al, %al
jne 0x2cca
leaq 0x4395(%rip), %rsi      # 0x7044
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2c0a
movq %r14, %rdi
callq 0x2dba
testb %al, %al
jne 0x2cfa
movzbl 0x4(%r14), %edx
leaq 0x4380(%rip), %rsi      # 0x7062
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2320
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c0a
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4315(%rip), %rsi      # 0x7023
movq %rbx, %rdi
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
jmp 0x2c0a
nop
// File: /workspace/github_c_makefile_star2_O3/sadistech[P]nesromtool2/./src/nrt/tile.c
// Function: nrt_tile_to_bitmap
void nrt_tile_to_bitmap(nrt_tile *tile, nrt_tile_bitmap *bitmap) {
  int i, j;

  // iterate over each byte (row of pixels)
  for (i = 0; i < NRT_TILE_CHANNEL_SIZE; i++) {
    // now, let's iterate over the bits in the row and write the pixels
    for (j = 0; j < 8; j++) {
      int pixel_offset = (i * NRT_TILE_WIDTH_PX) + j;
      bitmap->pixels[pixel_offset] = nrt_get_tile_pixel(i, j, tile);
    }
  }
}

// Assembly:
xorl %eax, %eax
movl $0x7, %ecx
xorl %edx, %edx
movsbl (%rdi,%rax), %r8d
movzbl 0x8(%rdi,%rax), %r9d
xorl %r10d, %r10d
btl %ecx, %r8d
setb %r10b
xorl %r8d, %r8d
btl %ecx, %r9d
setb %r8b
leal (%r10,%r8,2), %r8d
movb %r8b, (%rsi,%rdx)
incq %rdx
decl %ecx
cmpq $0x8, %rdx
jne 0x2e21
incq %rax
addq $0x8, %rsi
cmpq $0x8, %rax
jne 0x2e1a
retq
// File: /workspace/github_c_makefile_star2_O3/sadistech[P]nesromtool2/./src/nrt/tile.c
// Function: nrt_bitmap_to_tile
void nrt_bitmap_to_tile(nrt_tile_bitmap *bitmap, nrt_tile *tile) {
  // iterate over the bitmap pixels
  int x, y;
  int pixel;

  for (y = 0; y < NRT_TILE_HEIGHT_PX; y++) {
    for (x = 0; x < NRT_TILE_WIDTH_PX; x++) {
      // shift the current byte over first
      tile->chan_a[y] <<= 1;
      tile->chan_b[y] <<= 1;

      // write the bit to each channel
      pixel = bitmap->pixels[x + (y * NRT_TILE_WIDTH_PX)];
      tile->chan_a[y] += pixel & 1;
      tile->chan_b[y] += pixel >> 1 & 1;
    }
  }
}

// Assembly:
xorl %eax, %eax
movb (%rsi,%rax), %cl
movb 0x8(%rsi,%rax), %dl
xorl %r8d, %r8d
addb %cl, %cl
movb %cl, (%rsi,%rax)
addb %dl, %dl
movb %dl, 0x8(%rsi,%rax)
movb (%rdi,%r8), %r9b
movl %r9d, %r10d
andb $0x1, %r10b
orb %r10b, %cl
movb %cl, (%rsi,%rax)
shrb %r9b
andb $0x1, %r9b
orb %r9b, %dl
movb %dl, 0x8(%rsi,%rax)
incq %r8
cmpq $0x8, %r8
jne 0x2e97
incq %rax
addq $0x8, %rdi
cmpq $0x8, %rax
jne 0x2e8d
retq