LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: recover_from
static int recover_from(struct dhara_journal *j,
			dhara_error_t write_err,
			dhara_error_t *err)
{
	const dhara_page_t old_head = j->head;

	if (write_err != DHARA_E_BAD_BLOCK) {
		dhara_set_error(err, write_err);
		return -1;
	}

	/* Advance to the next free page */
	j->bb_current++;
	if (skip_block(j, err) < 0)
		return -1;

	/* Are we already in the middle of a recovery? */
	if (dhara_journal_in_recovery(j)) {
		restart_recovery(j, old_head);
		dhara_set_error(err, DHARA_E_RECOVER);
		return -1;
	}

	/* Were we block aligned? No recovery required! */
	if (is_aligned(old_head, j->nand->log2_ppb)) {
		dhara_nand_mark_bad(j->nand, old_head >> j->nand->log2_ppb);
		return 0;
	}

	j->recover_root = j->root;
	j->recover_next =
		j->recover_root & ~((1 << j->nand->log2_ppb) - 1);

	/* Are we holding buffered metadata? Dump it first. */
	if (!is_aligned(old_head, j->log2_ppc) &&
	    dump_meta(j, err) < 0)
		return -1;

	j->flags |= DHARA_JOURNAL_F_RECOVERY;
	dhara_set_error(err, DHARA_E_RECOVER);
	return -1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
movl 0x24(%rax), %eax
movl %eax, 0x4(%rsp)
cmpl $0x1, 0x14(%rsp)
je 0x3980
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x3ae0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x3aca
movq 0x18(%rsp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3dd0
cmpl $0x0, %eax
jge 0x39af
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x3aca
movq 0x18(%rsp), %rdi
callq 0x3c70
cmpl $0x0, %eax
je 0x39e8
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x4000
movq 0x8(%rsp), %rdi
movl $0x4, %esi
callq 0x3ae0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x3aca
movl 0x4(%rsp), %edi
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %esi
callq 0x3280
cmpl $0x0, %eax
je 0x3a2e
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
shrl %cl, %esi
callq 0x4e10
movl $0x0, 0x24(%rsp)
jmp 0x3aca
movq 0x18(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x30(%rax)
movq 0x18(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, (%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl (%rsp), %ecx
subl $0x1, %eax
xorl $-0x1, %eax
andl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x2c(%rax)
movl 0x4(%rsp), %edi
movq 0x18(%rsp), %rax
movzbl 0x10(%rax), %esi
callq 0x3280
cmpl $0x0, %eax
jne 0x3aa4
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x40d0
cmpl $0x0, %eax
jge 0x3aa4
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x3aca
movq 0x18(%rsp), %rax
movzbl 0x12(%rax), %ecx
orl $0x4, %ecx
movb %cl, 0x12(%rax)
movq 0x8(%rsp), %rdi
movl $0x4, %esi
callq 0x3ae0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: dhara_journal_copy
int dhara_journal_copy(struct dhara_journal *j,
		       dhara_page_t p, const uint8_t *meta,
		       dhara_error_t *err)
{
	dhara_error_t my_err;
	int i;

	for (i = 0; i < DHARA_MAX_RETRIES; i++) {
		if (!(prepare_head(j, &my_err) ||
		      dhara_nand_copy(j->nand, p, j->head, &my_err)))
			return push_meta(j, meta, err);

		if (recover_from(j, my_err, err) < 0)
			return -1;
	}

	dhara_set_error(err, DHARA_E_TOO_BAD);
	return -1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
cmpl $0x8, 0x8(%rsp)
jge 0x3baf
movq 0x28(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x35a0
cmpl $0x0, %eax
jne 0x3b7b
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
movq 0x28(%rsp), %rax
movl 0x24(%rax), %edx
leaq 0xc(%rsp), %rcx
callq 0x53f0
cmpl $0x0, %eax
jne 0x3b7b
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x3720
movl %eax, 0x34(%rsp)
jmp 0x3bc6
movq 0x28(%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x3940
cmpl $0x0, %eax
jge 0x3b9d
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x3bc6
jmp 0x3b9f
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x3b1f
movq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0x3ae0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: dhara_journal_next_recoverable
dhara_page_t dhara_journal_next_recoverable(struct dhara_journal *j)
{
	const dhara_page_t n = j->recover_next;

	if (!dhara_journal_in_recovery(j))
		return DHARA_PAGE_NONE;

	if (j->flags & DHARA_JOURNAL_F_ENUM_DONE)
		return DHARA_PAGE_NONE;

	if (j->recover_next == j->recover_root)
		j->flags |= DHARA_JOURNAL_F_ENUM_DONE;
	else
		j->recover_next = next_upage(j, j->recover_next);

	return n;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x2c(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0x3c70
cmpl $0x0, %eax
jne 0x3bfe
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x3c60
movq 0x8(%rsp), %rax
movzbl 0x12(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3c19
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x3c60
movq 0x8(%rsp), %rax
movl 0x2c(%rax), %eax
movq 0x8(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jne 0x3c3c
movq 0x8(%rsp), %rax
movzbl 0x12(%rax), %ecx
orl $0x8, %ecx
movb %cl, 0x12(%rax)
jmp 0x3c58
movq 0x8(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x2c(%rax), %esi
callq 0x33c0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x2c(%rax)
movl 0x4(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: cp_free
static int cp_free(struct dhara_journal *j, dhara_page_t first_user)
{
	const int count = 1 << j->log2_ppc;
	int i;

	for (i = 0; i < count; i++)
		if (!dhara_nand_is_free(j->nand, first_user + i))
			return 0;

	return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movzbl 0x10(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x3d46
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movl 0x14(%rsp), %esi
addl 0xc(%rsp), %esi
callq 0x5230
cmpl $0x0, %eax
jne 0x3d37
movl $0x0, 0x24(%rsp)
jmp 0x3d4e
jmp 0x3d39
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x3d09
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: skip_block
static int skip_block(struct dhara_journal *j, dhara_error_t *err)
{
	const dhara_block_t next = next_block(j->nand,
		j->head >> j->nand->log2_ppb);

	/* We can't roll onto the same block as the tail */
	if ((j->tail_sync >> j->nand->log2_ppb) == next) {
		dhara_set_error(err, DHARA_E_JOURNAL_FULL);
		return -1;
	}

	j->head = next << j->nand->log2_ppb;
	if (!j->head)
		roll_stats(j);

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movl 0x24(%rax), %esi
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
shrl %cl, %esi
callq 0x32b0
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
movl 0x1c(%rax), %eax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shrl %cl, %eax
cmpl 0xc(%rsp), %eax
jne 0x3e3a
movq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0x3ae0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x3e73
movl 0xc(%rsp), %eax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x24(%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x3e6b
movq 0x18(%rsp), %rdi
callq 0x3da0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: finish_recovery
static void finish_recovery(struct dhara_journal *j)
{
	/* We just recovered the last page. Mark the recovered
	 * block as bad.
	 */
	dhara_nand_mark_bad(j->nand,
		j->recover_root >> j->nand->log2_ppb);

	/* If we had to dump metadata, and the page on which we
	 * did this also went bad, mark it bad too.
	 */
	if (j->flags & DHARA_JOURNAL_F_BAD_META)
		dhara_nand_mark_bad(j->nand,
			j->recover_meta >> j->nand->log2_ppb);

	/* Was the tail on this page? Skip it forward */
	clear_recovery(j);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
movl 0x30(%rax), %esi
movq (%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
shrl %cl, %esi
callq 0x4e10
movq (%rsp), %rax
movzbl 0x12(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3fa5
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
movl 0x34(%rax), %esi
movq (%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
shrl %cl, %esi
callq 0x4e10
movq (%rsp), %rdi
callq 0x2e50
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: restart_recovery
static void restart_recovery(struct dhara_journal *j, dhara_page_t old_head)
{
	/* Mark the current head bad immediately, unless we're also
	 * using it to hold our dumped metadata (it will then be marked
	 * bad at the end of recovery).
	 */
	if ((j->recover_meta == DHARA_PAGE_NONE) ||
	    !align_eq(j->recover_meta, old_head, j->nand->log2_ppb))
		dhara_nand_mark_bad(j->nand, old_head >> j->nand->log2_ppb);
	else
		j->flags |= DHARA_JOURNAL_F_BAD_META;

	/* Start recovery again. Reset the source enumeration to
	 * the start of the original bad block, and reset the
	 * destination enumeration to the newly found good
	 * block.
	 */
	j->flags &= ~DHARA_JOURNAL_F_ENUM_DONE;
	j->recover_next =
		j->recover_root & ~((1 << j->nand->log2_ppb) - 1);

	j->root = j->recover_root;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
cmpl $-0x1, 0x34(%rax)
je 0x403a
movq 0x10(%rsp), %rax
movl 0x34(%rax), %edi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %edx
callq 0x3120
cmpl $0x0, %eax
jne 0x405b
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
shrl %cl, %esi
callq 0x4e10
jmp 0x406a
movq 0x10(%rsp), %rax
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
movq 0x10(%rsp), %rax
movzbl 0x12(%rax), %ecx
andl $-0x9, %ecx
movb %cl, 0x12(%rax)
movq 0x10(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl 0x8(%rsp), %ecx
subl $0x1, %eax
xorl $-0x1, %eax
andl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x2c(%rax)
movq 0x10(%rsp), %rax
movl 0x30(%rax), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x28(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/dhara/journal.c
// Function: dump_meta
static int dump_meta(struct dhara_journal *j, dhara_error_t *err)
{
	int i;

	/* We've just begun recovery on a new erasable block, but we
	 * have buffered metadata from the failed block.
	 */
	for (i = 0; i < DHARA_MAX_RETRIES; i++) {
		dhara_error_t my_err;

		/* Try to dump metadata on this page */
		if (!(prepare_head(j, &my_err) ||
		      dhara_nand_prog(j->nand, j->head,
				      j->page_buf, &my_err))) {
			j->recover_meta = j->head;
			j->head = next_upage(j, j->head);
			if (!j->head)
				roll_stats(j);
			hdr_clear_user(j->page_buf, j->nand->log2_page_size);
			return 0;
		}

		/* Report fatal errors */
		if (my_err != DHARA_E_BAD_BLOCK) {
			dhara_set_error(err, my_err);
			return -1;
		}

		j->bb_current++;
		dhara_nand_mark_bad(j->nand, j->head >> j->nand->log2_ppb);

		if (skip_block(j, err) < 0)
			return -1;
	}

	dhara_set_error(err, DHARA_E_TOO_BAD);
	return -1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x8, 0xc(%rsp)
jge 0x4218
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x35a0
cmpl $0x0, %eax
jne 0x4198
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movl 0x24(%rax), %esi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rcx
callq 0x5050
cmpl $0x0, %eax
jne 0x4198
movq 0x18(%rsp), %rax
movl 0x24(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x34(%rax)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x24(%rax), %esi
callq 0x33c0
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x24(%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x4172
movq 0x18(%rsp), %rdi
callq 0x3da0
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %esi
callq 0x2c40
movl $0x0, 0x24(%rsp)
jmp 0x422f
cmpl $0x1, 0x8(%rsp)
je 0x41b7
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x3ae0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x422f
movq 0x18(%rsp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movl 0x24(%rax), %esi
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl 0x1(%rax), %ecx
shrl %cl, %esi
callq 0x4e10
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3dd0
cmpl $0x0, %eax
jge 0x4206
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x422f
jmp 0x4208
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x40e6
movq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0x3ae0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/map.c
// Function: main
int main(void)
{
	for (int i = 0; i < 1000; i++) {
		printf("--------------------------------"
		       "--------------------------------\n");
		printf("Seed: %d\n", i);
		srandom(i);
		test();
	}

	sim_dump();
	return 0;
}

// Assembly:
pushq %rax
movl $0x0, 0x4(%rsp)
movl $0x0, (%rsp)
cmpl $0x3e8, (%rsp)          # imm = 0x3E8
jge 0x42f0
leaq 0x1df6(%rip), %rdi      # 0x60b6
movb $0x0, %al
callq 0x1050
movl (%rsp), %esi
leaq 0x1e27(%rip), %rdi      # 0x60f8
movb $0x0, %al
callq 0x1050
movl (%rsp), %edi
callq 0x1040
callq 0x4300
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x42b0
callq 0x5610
xorl %eax, %eax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/map.c
// Function: shuffle
static void shuffle(int seed)
{
	int i;

	srandom(seed);
	for (i = 0; i < NUM_SECTORS; i++)
		sector_list[i] = i;

	for (i = NUM_SECTORS - 1; i > 0; i--) {
		const int j = random() % i;
		const int tmp = sector_list[i];

		sector_list[i] = sector_list[j];
		sector_list[j] = tmp;
	}
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl 0x14(%rsp), %edi
callq 0x1040
movl $0x0, 0x10(%rsp)
cmpl $0xc8, 0x10(%rsp)
jge 0x4763
movl 0x10(%rsp), %edx
movslq 0x10(%rsp), %rcx
leaq 0x492d(%rip), %rax      # 0x9080
movl %edx, (%rax,%rcx,4)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x4739
movl $0xc7, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x47d8
callq 0x10b0
movslq 0x10(%rsp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0xc(%rsp)
movslq 0x10(%rsp), %rcx
leaq 0x48ed(%rip), %rax      # 0x9080
movl (%rax,%rcx,4), %eax
movl %eax, 0x8(%rsp)
movslq 0xc(%rsp), %rcx
leaq 0x48da(%rip), %rax      # 0x9080
movl (%rax,%rcx,4), %edx
movslq 0x10(%rsp), %rcx
leaq 0x48cb(%rip), %rax      # 0x9080
movl %edx, (%rax,%rcx,4)
movl 0x8(%rsp), %edx
movslq 0xc(%rsp), %rcx
leaq 0x48b8(%rip), %rax      # 0x9080
movl %edx, (%rax,%rcx,4)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x476b
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/map.c
// Function: mt_write
static void mt_write(struct dhara_map *m, dhara_sector_t s, int seed)
{
	const size_t page_size = 1 << m->journal.nand->log2_page_size;
	uint8_t buf[page_size];
	dhara_error_t err;

	seq_gen(seed, buf, sizeof(buf));
	if (dhara_map_write(m, s, buf, &err) < 0)
		dabort("map_write", err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movb (%rax), %cl
movl $0x1, %eax
shll %cl, %eax
cltq
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq %rsp, %rax
movq %rax, -0x20(%rbp)
movq %rdx, %rax
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %rsi
subq %rax, %rsi
movq %rsi, -0x38(%rbp)
movq %rsi, %rsp
movq %rdx, -0x28(%rbp)
movl -0x10(%rbp), %edi
callq 0x5820
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x2c(%rbp), %rcx
callq 0x16e0
cmpl $0x0, %eax
jge 0x485f
movl -0x2c(%rbp), %esi
leaq 0x1933(%rip), %rdi      # 0x618d
callq 0x5930
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/map.c
// Function: mt_check
static void mt_check(struct dhara_map *m)
{
	int count;

	sim_freeze();
	count = check_recurse(m, m->journal.head,
		dhara_journal_root(&m->journal), 0, 0);
	sim_thaw();

	assert(m->count == count);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
callq 0x55f0
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movl 0x24(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4cd0
movq (%rsp), %rdi
movl 0x8(%rsp), %esi
movl %eax, %edx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x4a60
movl %eax, 0xc(%rsp)
callq 0x5600
movq 0x10(%rsp), %rax
movl 0x3c(%rax), %eax
cmpl 0xc(%rsp), %eax
jne 0x48cb
jmp 0x48ea
leaq 0x18c5(%rip), %rdi      # 0x6197
leaq 0x18d0(%rip), %rsi      # 0x61a9
movl $0x68, %edx
leaq 0x18d0(%rip), %rcx      # 0x61b5
callq 0x1060
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/map.c
// Function: mt_assert
static void mt_assert(struct dhara_map *m, dhara_sector_t s, int seed)
{
	const size_t page_size = 1 << m->journal.nand->log2_page_size;
	uint8_t buf[page_size];
	dhara_error_t err;

	if (dhara_map_read(m, s, buf, &err) < 0)
		dabort("map_read", err);

	seq_assert(seed, buf, sizeof(buf));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movb (%rax), %cl
movl $0x1, %eax
shll %cl, %eax
cltq
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x38(%rbp)
movq %rdx, %rsp
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x2c(%rbp), %rcx
callq 0x15f0
cmpl $0x0, %eax
jge 0x4977
movl -0x2c(%rbp), %esi
leaq 0x1938(%rip), %rdi      # 0x62aa
callq 0x5930
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
movl -0x10(%rbp), %edi
callq 0x5880
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: sim_reset
void sim_reset(void)
{
	int i;

	memset(&stats, 0, sizeof(stats));
	memset(blocks, 0, sizeof(blocks));
	memset(pages, 0x55, sizeof(pages));

	for (i = 0; i < NUM_BLOCKS; i++)
		blocks[i].next_page = PAGES_PER_BLOCK;
}

// Assembly:
pushq %rax
leaq 0x4678(%rip), %rdi      # 0x93a0
xorl %esi, %esi
movl $0x28, %edx
callq 0x1070
leaq 0x4695(%rip), %rdi      # 0x93d0
xorl %esi, %esi
movl $0x54c, %edx            # imm = 0x54C
callq 0x1070
leaq 0x4bd2(%rip), %rdi      # 0x9920
movl $0x55, %esi
movl $0x71000, %edx          # imm = 0x71000
callq 0x1070
movl $0x0, 0x4(%rsp)
cmpl $0x71, 0x4(%rsp)
jge 0x4d93
movslq 0x4(%rsp), %rcx
leaq 0x4658(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x8, 0x4(%rax)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4d65
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: dhara_nand_is_bad
int dhara_nand_is_bad(const struct dhara_nand *n, dhara_block_t bno)
{
	if (bno >= NUM_BLOCKS) {
		fprintf(stderr, "sim: NAND_is_bad called on "
			"invalid block: %d\n", bno);
		abort();
	}

	if (!stats.frozen)
		stats.is_bad++;
	return blocks[bno].flags & BLOCK_BAD_MARK;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
cmpl $0x71, 0xc(%rsp)
jb 0x4dd5
movq 0x423d(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl 0xc(%rsp), %edx
leaq 0x1553(%rip), %rsi      # 0x631c
movb $0x0, %al
callq 0x1090
callq 0x1030
cmpl $0x0, 0x45c4(%rip)      # 0x93a0
jne 0x4ded
movl 0x45c0(%rip), %eax      # 0x93a4
addl $0x1, %eax
movl %eax, 0x45b7(%rip)      # 0x93a4
movl 0xc(%rsp), %eax
movl %eax, %ecx
leaq 0x45d6(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x1, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: dhara_nand_mark_bad
void dhara_nand_mark_bad(const struct dhara_nand *n, dhara_block_t bno)
{
	if (bno >= NUM_BLOCKS) {
		fprintf(stderr, "sim: NAND_mark_bad called on "
			"invalid block: %d\n", bno);
		abort();
	}

	if (!stats.frozen)
		stats.mark_bad++;
	blocks[bno].flags |= BLOCK_BAD_MARK;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
cmpl $0x71, 0xc(%rsp)
jb 0x4e45
movq 0x41cd(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl 0xc(%rsp), %edx
leaq 0x1511(%rip), %rsi      # 0x634a
movb $0x0, %al
callq 0x1090
callq 0x1030
cmpl $0x0, 0x4554(%rip)      # 0x93a0
jne 0x4e5d
movl 0x4554(%rip), %eax      # 0x93a8
addl $0x1, %eax
movl %eax, 0x454b(%rip)      # 0x93a8
movl 0xc(%rsp), %eax
movl %eax, %ecx
leaq 0x4566(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
orl $0x1, %ecx
movl %ecx, (%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: dhara_nand_erase
int dhara_nand_erase(const struct dhara_nand *n, dhara_block_t bno,
		     dhara_error_t *err)
{
	uint8_t *blk = pages + (bno << LOG2_BLOCK_SIZE);

	if (bno >= NUM_BLOCKS) {
		fprintf(stderr, "sim: NAND_erase called on "
			"invalid block: %d\n", bno);
		abort();
	}

	if (blocks[bno].flags & BLOCK_BAD_MARK) {
		fprintf(stderr, "sim: NAND_erase called on "
			"block which is marked bad: %d\n", bno);
		abort();
	}

	if (!stats.frozen)
		stats.erase++;
	blocks[bno].next_page = 0;

	timebomb_tick(bno);

	if (blocks[bno].flags & BLOCK_FAILED) {
		if (!stats.frozen)
			stats.erase_fail++;
		seq_gen(bno * 57 + 29, blk, BLOCK_SIZE);
		dhara_set_error(err, DHARA_E_BAD_BLOCK);
		return -1;
	}

	memset(blk, 0xff, BLOCK_SIZE);
	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movl 0x14(%rsp), %eax
shll $0xc, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x4a7c(%rip), %rax      # 0x9920
addq %rcx, %rax
movq %rax, (%rsp)
cmpl $0x71, 0x14(%rsp)
jb 0x4ed3
movq 0x413f(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl 0x14(%rsp), %edx
leaq 0x14b3(%rip), %rsi      # 0x637a
movb $0x0, %al
callq 0x1090
callq 0x1030
movl 0x14(%rsp), %eax
movl %eax, %ecx
leaq 0x44f0(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4f12
movq 0x4100(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl 0x14(%rsp), %edx
leaq 0x14a1(%rip), %rsi      # 0x63a7
movb $0x0, %al
callq 0x1090
callq 0x1030
cmpl $0x0, 0x4487(%rip)      # 0x93a0
jne 0x4f2a
movl 0x448b(%rip), %eax      # 0x93ac
addl $0x1, %eax
movl %eax, 0x4482(%rip)      # 0x93ac
movl 0x14(%rsp), %eax
movl %eax, %ecx
leaq 0x4499(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movl 0x14(%rsp), %edi
callq 0x4fe0
movl 0x14(%rsp), %eax
movl %eax, %ecx
leaq 0x4475(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4fb3
cmpl $0x0, 0x442d(%rip)      # 0x93a0
jne 0x4f84
movl 0x4435(%rip), %eax      # 0x93b0
addl $0x1, %eax
movl %eax, 0x442c(%rip)      # 0x93b0
imull $0x39, 0x14(%rsp), %edi
addl $0x1d, %edi
movq (%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x5820
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x5030
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fce
movq (%rsp), %rdi
movl $0xff, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x1070
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: timebomb_tick
static void timebomb_tick(dhara_block_t blk)
{
	struct block_status *b = &blocks[blk];

	if (b->timebomb) {
		b->timebomb--;
		if (!b->timebomb)
			b->flags |= BLOCK_FAILED;
	}
}

// Assembly:
movl %edi, -0x4(%rsp)
movl -0x4(%rsp), %eax
movl %eax, %ecx
leaq 0x43df(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x502f
movq -0x10(%rsp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x502d
movq -0x10(%rsp), %rax
movl (%rax), %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
jmp 0x502f
retq
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: dhara_nand_is_free
int dhara_nand_is_free(const struct dhara_nand *n, dhara_page_t p)
{
	const int bno = p >> LOG2_PAGES_PER_BLOCK;
	const int pno = p & ((1 << LOG2_PAGES_PER_BLOCK) - 1);

	if ((bno < 0) || (bno >= NUM_BLOCKS)) {
		fprintf(stderr, "sim: NAND_is_free called on "
			"invalid block: %d\n", bno);
		abort();
	}

	if (!stats.frozen)
		stats.is_erased++;
	return blocks[bno].next_page <= pno;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl 0xc(%rsp), %eax
shrl $0x3, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
andl $0x7, %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x8(%rsp)
jl 0x5261
cmpl $0x71, 0x8(%rsp)
jl 0x5282
movq 0x3d90(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl 0x8(%rsp), %edx
leaq 0x121e(%rip), %rsi      # 0x6494
movb $0x0, %al
callq 0x1090
callq 0x1030
cmpl $0x0, 0x4117(%rip)      # 0x93a0
jne 0x529a
movl 0x4123(%rip), %eax      # 0x93b4
addl $0x1, %eax
movl %eax, 0x411a(%rip)      # 0x93b4
movslq 0x8(%rsp), %rcx
leaq 0x412a(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl 0x4(%rsp), %eax
setle %al
andb $0x1, %al
movzbl %al, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: dhara_nand_read
int dhara_nand_read(const struct dhara_nand *n, dhara_page_t p,
		    size_t offset, size_t length,
		    uint8_t *data, dhara_error_t *err)
{
	const int bno = p >> LOG2_PAGES_PER_BLOCK;
	uint8_t *page = pages + (p << LOG2_PAGE_SIZE);

	if ((bno < 0) || (bno >= NUM_BLOCKS)) {
		fprintf(stderr, "sim: NAND_read called on "
			"invalid block: %d\n", bno);
		abort();
	}

	if ((offset > PAGE_SIZE) || (length > PAGE_SIZE) ||
	    (offset + length > PAGE_SIZE)) {
		fprintf(stderr, "sim: NAND_read called on "
			"invalid range: offset = %ld, length = %ld\n",
			offset, length);
		abort();
	}

	if (!stats.frozen) {
		stats.read++;
		stats.read_bytes += length;
	}

	memcpy(data, page + offset, length);
	return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movl 0x3c(%rsp), %eax
shrl $0x3, %eax
movl %eax, 0x14(%rsp)
movl 0x3c(%rsp), %eax
shll $0x9, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x4612(%rip), %rax      # 0x9920
addq %rcx, %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
jl 0x5324
cmpl $0x71, 0x14(%rsp)
jl 0x5345
movq 0x3ccd(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl 0x14(%rsp), %edx
leaq 0x118a(%rip), %rsi      # 0x64c3
movb $0x0, %al
callq 0x1090
callq 0x1030
cmpq $0x200, 0x30(%rsp)      # imm = 0x200
ja 0x536d
cmpq $0x200, 0x28(%rsp)      # imm = 0x200
ja 0x536d
movq 0x30(%rsp), %rax
addq 0x28(%rsp), %rax
cmpq $0x200, %rax            # imm = 0x200
jbe 0x5394
movq 0x3c84(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
leaq 0x1167(%rip), %rsi      # 0x64ef
movb $0x0, %al
callq 0x1090
callq 0x1030
cmpl $0x0, 0x4005(%rip)      # 0x93a0
jne 0x53c1
movl 0x401d(%rip), %eax      # 0x93c0
addl $0x1, %eax
movl %eax, 0x4014(%rip)      # 0x93c0
movq 0x28(%rsp), %rcx
movslq 0x400c(%rip), %rax      # 0x93c4
addq %rcx, %rax
movl %eax, 0x4003(%rip)      # 0x93c4
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x10a0
xorl %eax, %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: dhara_nand_copy
int dhara_nand_copy(const struct dhara_nand *n,
		    dhara_page_t src, dhara_page_t dst,
		    dhara_error_t *err)
{
	uint8_t buf[PAGE_SIZE];

	if ((dhara_nand_read(n, src, 0, PAGE_SIZE, buf, err) < 0) ||
	    (dhara_nand_prog(n, dst, buf, err) < 0))
		return -1;

	return 0;
}

// Assembly:
subq $0x228, %rsp            # imm = 0x228
movq %rdi, 0x218(%rsp)
movl %esi, 0x214(%rsp)
movl %edx, 0x210(%rsp)
movq %rcx, 0x208(%rsp)
movq 0x218(%rsp), %rdi
movl 0x214(%rsp), %esi
movq %rsp, %r8
movq 0x208(%rsp), %r9
xorl %eax, %eax
movl %eax, %edx
movl $0x200, %ecx            # imm = 0x200
callq 0x52d0
cmpl $0x0, %eax
jl 0x5466
movq 0x218(%rsp), %rdi
movl 0x210(%rsp), %esi
movq %rsp, %rdx
movq 0x208(%rsp), %rcx
callq 0x5050
cmpl $0x0, %eax
jge 0x5473
movl $0xffffffff, 0x224(%rsp) # imm = 0xFFFFFFFF
jmp 0x547e
movl $0x0, 0x224(%rsp)
movl 0x224(%rsp), %eax
addq $0x228, %rsp            # imm = 0x228
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: sim_inject_bad
void sim_inject_bad(int count)
{
	int i;

	for (i = 0; i < count; i++) {
		const int bno = random() % NUM_BLOCKS;

		blocks[bno].flags |= BLOCK_BAD_MARK | BLOCK_FAILED;
	}
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x5536
callq 0x10b0
movl $0x71, %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0xc(%rsp)
movslq 0xc(%rsp), %rcx
leaq 0x3eb5(%rip), %rax      # 0x93d0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
orl $0x3, %ecx
movl %ecx, (%rax)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x54f0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: sim_inject_timebombs
void sim_inject_timebombs(int count, int max_ttl)
{
	int i;

	for (i = 0; i < count; i++)
		sim_set_timebomb(random() % NUM_BLOCKS,
				 random() % max_ttl + 1);
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x55de
callq 0x10b0
movl $0x71, %ecx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0x8(%rsp)
callq 0x10b0
movl 0x8(%rsp), %edi
movslq 0x10(%rsp), %rcx
cqto
idivq %rcx
addq $0x1, %rdx
movl %edx, %esi
callq 0x54b0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5594
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: sim_dump
void sim_dump(void)
{
	int i;

	printf("NAND operation counts:\n");
	printf("    is_bad:         %d\n", stats.is_bad);
	printf("    mark_bad        %d\n", stats.mark_bad);
	printf("    erase:          %d\n", stats.erase);
	printf("    erase failures: %d\n", stats.erase_fail);
	printf("    is_erased:      %d\n", stats.is_erased);
	printf("    prog:           %d\n", stats.prog);
	printf("    prog failures:  %d\n", stats.prog_fail);
	printf("    read:           %d\n", stats.read);
	printf("    read (bytes):   %d\n", stats.read_bytes);
	printf("\n");

	printf("Block status:\n");
	i = 0;
	while (i < NUM_BLOCKS) {
		int j = NUM_BLOCKS - i;
		int k;

		if (j > 64)
			j = 64;

		printf("    ");
		for (k = 0; k < j; k++)
			fputc(rep_status(&blocks[i + k]), stdout);
		fputc('\n', stdout);

		i += j;
	}
}

// Assembly:
subq $0x18, %rsp
leaq 0xf18(%rip), %rdi       # 0x6533
movb $0x0, %al
callq 0x1050
movl 0x3d7c(%rip), %esi      # 0x93a4
leaq 0xf1c(%rip), %rdi       # 0x654b
movb $0x0, %al
callq 0x1050
movl 0x3d6c(%rip), %esi      # 0x93a8
leaq 0xf20(%rip), %rdi       # 0x6563
movb $0x0, %al
callq 0x1050
movl 0x3d5c(%rip), %esi      # 0x93ac
leaq 0xf24(%rip), %rdi       # 0x657b
movb $0x0, %al
callq 0x1050
movl 0x3d4c(%rip), %esi      # 0x93b0
leaq 0xf28(%rip), %rdi       # 0x6593
movb $0x0, %al
callq 0x1050
movl 0x3d3c(%rip), %esi      # 0x93b4
leaq 0xf2c(%rip), %rdi       # 0x65ab
movb $0x0, %al
callq 0x1050
movl 0x3d2c(%rip), %esi      # 0x93b8
leaq 0xf30(%rip), %rdi       # 0x65c3
movb $0x0, %al
callq 0x1050
movl 0x3d1c(%rip), %esi      # 0x93bc
leaq 0xf34(%rip), %rdi       # 0x65db
movb $0x0, %al
callq 0x1050
movl 0x3d0c(%rip), %esi      # 0x93c0
leaq 0xf38(%rip), %rdi       # 0x65f3
movb $0x0, %al
callq 0x1050
movl 0x3cfc(%rip), %esi      # 0x93c4
leaq 0xf3c(%rip), %rdi       # 0x660b
movb $0x0, %al
callq 0x1050
leaq 0xdb5(%rip), %rdi       # 0x6492
movb $0x0, %al
callq 0x1050
leaq 0xf38(%rip), %rdi       # 0x6623
movb $0x0, %al
callq 0x1050
movl $0x0, 0x14(%rsp)
cmpl $0x71, 0x14(%rsp)
jge 0x57a2
movl $0x71, %eax
subl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x40, 0x10(%rsp)
jle 0x5721
movl $0x40, 0x10(%rsp)
leaq 0xf0a(%rip), %rdi       # 0x6632
movb $0x0, %al
callq 0x1050
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x577d
movl 0x14(%rsp), %eax
addl 0xc(%rsp), %eax
cltq
leaq 0x3c7e(%rip), %rdi      # 0x93d0
imulq $0xc, %rax, %rax
addq %rax, %rdi
callq 0x57b0
movsbl %al, %edi
movq 0x3870(%rip), %rax      # 0x8fd8
movq (%rax), %rsi
callq 0x1080
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5737
movq 0x3854(%rip), %rax      # 0x8fd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x1080
movl 0x10(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x56fa
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/sim.c
// Function: rep_status
static char rep_status(const struct block_status *b)
{
	switch (b->flags & (BLOCK_FAILED | BLOCK_BAD_MARK)) {
	case BLOCK_FAILED:
		return 'b';

	case BLOCK_BAD_MARK:
		return '?';

	case BLOCK_BAD_MARK | BLOCK_FAILED:
		return 'B';
	}

	if (b->next_page)
		return ':';

	return '.';
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl (%rax), %eax
andl $0x3, %eax
movl %eax, -0x14(%rsp)
subl $0x1, %eax
je 0x57e7
jmp 0x57ca
movl -0x14(%rsp), %eax
subl $0x2, %eax
je 0x57e0
jmp 0x57d5
movl -0x14(%rsp), %eax
subl $0x3, %eax
je 0x57ee
jmp 0x57f5
movb $0x62, -0x1(%rsp)
jmp 0x580c
movb $0x3f, -0x1(%rsp)
jmp 0x580c
movb $0x42, -0x1(%rsp)
jmp 0x580c
movq -0x10(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x5807
movb $0x3a, -0x1(%rsp)
jmp 0x580c
movb $0x2e, -0x1(%rsp)
movb -0x1(%rsp), %al
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/util.c
// Function: seq_gen
void seq_gen(unsigned int seed, uint8_t *buf, size_t length)
{
	size_t i;

	srandom(seed);
	for (i = 0; i < length; i++)
		buf[i] = random();
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl 0x24(%rsp), %edi
callq 0x1040
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x5874
callq 0x10b0
movb %al, %dl
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x5844
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/util.c
// Function: seq_assert
void seq_assert(unsigned int seed, const uint8_t *buf, size_t length)
{
	size_t i;

	srandom(seed);
	for (i = 0; i < length; i++) {
		const uint8_t expect = random();

		if (buf[i] != expect) {
			fprintf(stderr, "seq_assert: mismatch at %ld in "
				"sequence %d: 0x%02x (expected 0x%02x)\n",
				i, seed, buf[i], expect);
			abort();
		}
	}
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl 0x24(%rsp), %edi
callq 0x1040
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x591d
callq 0x10b0
movb %al, 0x7(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x7(%rsp), %ecx
cmpl %ecx, %eax
je 0x590b
movq 0x3721(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
movl 0x24(%rsp), %ecx
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rsi
movzbl (%rax,%rsi), %r8d
movzbl 0x7(%rsp), %r9d
leaq 0xd38(%rip), %rsi       # 0x6637
movb $0x0, %al
callq 0x1090
callq 0x1030
jmp 0x590d
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x58a4
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/PARKINHYO[P]BlackjackGame/shm/./common.h
// Function: get_suit_id
int get_suit_id(char suit)
{
	unsigned i;
	for (i = 0; i < sizeof (suit_codes); ++i)
		if (suit == suit_codes[i])
			return i;
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0x4, %rax
jae 0x1347
movsbl -0x5(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x2022(%rip), %rcx      # 0x334c
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x133a
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x134e
jmp 0x133c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1311
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/PARKINHYO[P]BlackjackGame/shm/./common.h
// Function: get_value_id
int get_value_id(char value)
{
	unsigned i;
	for (i = 0; i < sizeof (value_codes); ++i)
		if (value == value_codes[i])
			return i;
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0xe, %rax
jae 0x13a7
movsbl -0x5(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x1fc6(%rip), %rcx      # 0x3350
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x139a
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x13ae
jmp 0x139c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1371
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/PARKINHYO[P]BlackjackGame/shm/./common.h
// Function: calc_sum
int calc_sum(const int hand_values[], int ncards)
{
	int i;
	int sum = 0;

	for (i = 0; i < ncards; ++i)
		if (hand_values[i] < 10)
			sum += hand_values[i];
		else
			sum += 10;

	for (i = 0; i < ncards; ++i)
		if (hand_values[i] == 1)
			if (sum + 10 <= 21)
				sum += 10;

	return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1418
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
cmpl $0xa, (%rax,%rcx,4)
jge 0x1402
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x140b
movl -0x14(%rbp), %eax
addl $0xa, %eax
movl %eax, -0x14(%rbp)
jmp 0x140d
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x13d9
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1458
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x144b
movl -0x14(%rbp), %eax
addl $0xa, %eax
cmpl $0x15, %eax
jg 0x1449
movl -0x14(%rbp), %eax
addl $0xa, %eax
movl %eax, -0x14(%rbp)
jmp 0x144b
jmp 0x144d
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x141f
movl -0x14(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/PARKINHYO[P]BlackjackGame/shm/./common.h
// Function: display_state
int display_state(int hand_values[], int hand_suits[], int ncards)
{
	int i;
	int sum = calc_sum(hand_values, ncards);
	for (i = 0; i < ncards; ++i)
	{
		if (i > 0)
			printf(", ");
		printf("%s-%s", values[hand_values[i]], suits[hand_suits[i]]);
	}
	printf(" Sum: %d", sum);
	if (sum > 21){
		printf("; BUSTED");
		printf("\n");
		return 1;
		}
	else if (sum == 21){
		printf("\n");
		return 1;
	}
	printf("\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x13c0
movl %eax, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x14ec
cmpl $0x0, -0x20(%rbp)
jle 0x14a5
leaq 0x1bb0(%rip), %rdi      # 0x304e
movb $0x0, %al
callq 0x1080
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x3c58(%rip), %rax      # 0x5110
movq (%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x3c21(%rip), %rax      # 0x50f0
movq (%rax,%rcx,8), %rdx
leaq 0x1b77(%rip), %rdi      # 0x3051
movb $0x0, %al
callq 0x1080
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1489
movl -0x24(%rbp), %esi
leaq 0x1b61(%rip), %rdi      # 0x3057
movb $0x0, %al
callq 0x1080
cmpl $0x15, -0x24(%rbp)
jle 0x1528
leaq 0x1b56(%rip), %rdi      # 0x3060
movb $0x0, %al
callq 0x1080
leaq 0x1dbe(%rip), %rdi      # 0x32d6
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x155c
cmpl $0x15, -0x24(%rbp)
jne 0x1545
leaq 0x1da1(%rip), %rdi      # 0x32d6
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x155c
jmp 0x1547
leaq 0x1d88(%rip), %rdi      # 0x32d6
movb $0x0, %al
callq 0x1080
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/PARKINHYO[P]BlackjackGame/shm/shm_server.c
// Function: set_shutdown
void *set_shutdown ()
{
        printf("[SIGNAL] : Got shutdown signal\n");
        shmctl( gnShmID1, IPC_RMID, 0 );
        printf("[SIGNAL] : Shared meory segment marked for deletion\n");;
        semctl( gnSemID1, IPC_RMID, 0 );
        printf("[SIGNAL] : Semapore segment marked for deletion\n");
        exit (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1aee(%rip), %rdi      # 0x3069
movb $0x0, %al
callq 0x1080
movl 0x3c08(%rip), %edi      # 0x5190
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1100
leaq 0x1aef(%rip), %rdi      # 0x3089
movb $0x0, %al
callq 0x1080
movl 0x3bed(%rip), %edi      # 0x5194
xorl %edx, %edx
movl %edx, %esi
movb $0x0, %al
callq 0x1120
leaq 0x1b05(%rip), %rdi      # 0x30be
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x1170
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/PARKINHYO[P]BlackjackGame/shm/shm_server.c
// Function: init_cards
void init_cards()
{
	int i;

	for (i = 0; i < 52; ++i)
	{
		card_values[i] = (i % 13) + 1;
		card_suits[i] = i / 13;
	}

	srand(time(NULL));
	/* srand(1); */
	for (i = 0; i < 52; ++i)
	{
		int cv, cs;
		int j = rand() % 52;

		cv = card_values[i];
		card_values[i] = card_values[j];
		card_values[j] = cv;

		cs = card_suits[i];
		card_suits[i] = card_suits[j];
		card_suits[j] = cs;
	}

	ncard = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x34, -0x4(%rbp)
jge 0x1627
movl -0x4(%rbp), %eax
movl $0xd, %ecx
cltd
idivl %ecx
addl $0x1, %edx
movslq -0x4(%rbp), %rcx
leaq 0x3ba2(%rip), %rax      # 0x51a0
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
movl $0xd, %ecx
cltd
idivl %ecx
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x3c57(%rip), %rax      # 0x5270
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x15df
xorl %eax, %eax
movl %eax, %edi
callq 0x10d0
movl %eax, %edi
callq 0x1090
movl $0x0, -0x4(%rbp)
cmpl $0x34, -0x4(%rbp)
jge 0x16e2
callq 0x11b0
movl $0x34, %ecx
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x3b3d(%rip), %rax      # 0x51a0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x3b2c(%rip), %rax      # 0x51a0
movl (%rax,%rcx,4), %edx
movslq -0x4(%rbp), %rcx
leaq 0x3b1e(%rip), %rax      # 0x51a0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %edx
movslq -0x10(%rbp), %rcx
leaq 0x3b0d(%rip), %rax      # 0x51a0
movl %edx, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x3bcf(%rip), %rax      # 0x5270
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x3bbe(%rip), %rax      # 0x5270
movl (%rax,%rcx,4), %edx
movslq -0x4(%rbp), %rcx
leaq 0x3bb0(%rip), %rax      # 0x5270
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %edx
movslq -0x10(%rbp), %rcx
leaq 0x3b9f(%rip), %rax      # 0x5270
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x163e
movl $0x0, 0x3c54(%rip)      # 0x5340
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/robertdavidgraham[P]wc2/wcstream.c
// Function: main
int main()
{
    for (;;) {
        char buf[65536];
        size_t length;
        size_t i;

        length = read(STDIN_FILENO, buf, sizeof(buf));
        if (length <= 0)
            break;
        for (i=0; i<length; i++) {
            size_t count;

            count = write(STDOUT_FILENO, buf+i, 1);
            if (count <= 0)
                exit(1);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10030, %rsp          # imm = 0x10030
movl $0x0, -0x4(%rbp)
leaq -0x10010(%rbp), %rsi
xorl %edi, %edi
movl $0x10000, %edx          # imm = 0x10000
callq 0x1040
movq %rax, -0x10018(%rbp)
cmpq $0x0, -0x10018(%rbp)
ja 0x1198
jmp 0x1206
movq $0x0, -0x10020(%rbp)
movq -0x10020(%rbp), %rax
cmpq -0x10018(%rbp), %rax
jae 0x1201
leaq -0x10010(%rbp), %rsi
addq -0x10020(%rbp), %rsi
movl $0x1, %edi
movl $0x1, %edx
callq 0x1030
movq %rax, -0x10028(%rbp)
cmpq $0x0, -0x10028(%rbp)
ja 0x11eb
movl $0x1, %edi
callq 0x1050
jmp 0x11ed
movq -0x10020(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10020(%rbp)
jmp 0x11a3
jmp 0x1172
xorl %eax, %eax
addq $0x10030, %rsp          # imm = 0x10030
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/antonblanchard[P]will-it-scale/tests/pipe1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	int fd[2];

	assert(pipe(fd) == 0);

	while (1) {
		char c = 0;
		int ret;

		do {
			ret = write(fd[WRITE], &c, 1);
		} while (ret != 1 && errno == EINTR);

		do {
			ret = read(fd[READ], &c, 1);
		} while (ret != 1 && errno == EINTR);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x2130
cmpl $0x0, %eax
jne 0x2fd0
jmp 0x2fef
leaq 0x12a1(%rip), %rdi      # 0x4278
leaq 0x12a8(%rip), %rsi      # 0x4286
movl $0xf, %edx
leaq 0x12aa(%rip), %rcx      # 0x4294
callq 0x2110
jmp 0x2ff1
movb $0x0, -0x19(%rbp)
movl -0x14(%rbp), %edi
leaq -0x19(%rbp), %rsi
movl $0x1, %edx
callq 0x20c0
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x20(%rbp)
movb %al, -0x21(%rbp)
je 0x3022
callq 0x2070
cmpl $0x4, (%rax)
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x2ff5
jmp 0x302b
movl -0x18(%rbp), %edi
leaq -0x19(%rbp), %rsi
movl $0x1, %edx
callq 0x2140
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x20(%rbp)
movb %al, -0x22(%rbp)
je 0x3058
callq 0x2070
cmpl $0x4, (%rax)
sete %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0x302b
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x2ff1
// File: /workspace/github_c_makefile_star2_O0/rpeepz[P]ft_ssl/srcs/rsa/asn1_helper.c
// Function: byte_len
char		byte_len(__uint64_t n)
{
	char	len;

	len = 0;
	while (n)
	{
		len++;
		n >>= 8;
	}
	return (len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1b99
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x1b7c
movb -0x9(%rbp), %al
popq %rbp
retq
nop