LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_file.c
// Function: ufat_file_write
int ufat_file_write(struct ufat_file *f, const void *buf, ufat_size_t len)
{
	const ufat_size_t max_write = ~f->cur_pos;
	ufat_size_t total;
	int i;

	if (len > max_write)
		len = max_write;
	total = len;

	/* Write a partial block fragment */
	i = write_block_fragment(f, buf, len);
	if (i < 0)
		return i;

	buf = (const char*)buf + i;
	len -= i;

	/* Write complete blocks */
	for (;;) {
		i = write_blocks(f, buf, len);

		if (i < 0)
			return i;

		if (!i)
			break;

		buf = (const char*)buf + i;
		len -= i;
	}

	/* Write a partial block fragment */
	i = write_block_fragment(f, buf, len);
	if (i < 0)
		return i;

	if (f->cur_pos > f->file_size) {
		i = set_size(f, f->cur_pos);
		if (i < 0)
			return i;
	}

	return total;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl 0x24(%rdi), %ebx
notl %ebx
cmpl %edx, %ebx
cmovael %edx, %ebx
movl %ebx, %edx
callq 0x32f4
testl %eax, %eax
js 0x32e5
movl %eax, %ecx
addq %rcx, %r15
movq %r15, 0x8(%rsp)
movl %ebx, 0x14(%rsp)
movl %ebx, %edx
subl %eax, %edx
movq (%r14), %r12
movq (%r12), %rax
movl (%rax), %r13d
movb 0x2c(%r12), %cl
movl $0x1, %eax
shll %cl, %eax
movq %r14, %rbx
movl 0x24(%r14), %esi
movl %r13d, %ecx
shrl %cl, %esi
leal -0x1(%rax), %r14d
andl %esi, %r14d
subl %r14d, %eax
movl %edx, %ebp
shrl %cl, %ebp
cmpl %eax, %ebp
cmovael %eax, %ebp
testl %ebp, %ebp
je 0x32bc
leaq 0x2c(%r12), %r15
movl %edx, 0x4(%rsp)
movq %rbx, %rdi
callq 0x35a8
testl %eax, %eax
js 0x32e5
movl 0x20(%rbx), %eax
movb (%r15), %cl
addl $-0x2, %eax
shll %cl, %eax
movl %r14d, %r14d
addq 0x48(%r12), %r14
addq %rax, %r14
movl %ebp, %r15d
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1a6d
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq 0x8(%rsp), %r14
movq %r14, %rcx
callq *0x10(%rdi)
testl %eax, %eax
js 0x32ad
incl 0xc(%r12)
addl %ebp, 0x14(%r12)
movl %r13d, %ecx
shll %cl, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2edb
testl %eax, %eax
cmovsl %eax, %ebp
testl %ebp, %ebp
js 0x32b4
je 0x32b8
movl %ebp, %eax
addq %rax, %r14
movq %r14, 0x8(%rsp)
movl 0x4(%rsp), %edx
subl %ebp, %edx
movq (%rbx), %r12
movq (%r12), %rax
movl (%rax), %r13d
leaq 0x2c(%r12), %r15
movb 0x2c(%r12), %cl
movl $0x1, %eax
shll %cl, %eax
movl 0x24(%rbx), %esi
movl %r13d, %ecx
shrl %cl, %esi
leal -0x1(%rax), %r14d
andl %esi, %r14d
subl %r14d, %eax
movl %edx, %ebp
shrl %cl, %ebp
cmpl %eax, %ebp
cmovael %eax, %ebp
testl %ebp, %ebp
jne 0x31e5
jmp 0x32bc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x32e5
movl %ebp, %eax
jmp 0x32e5
movl 0x4(%rsp), %edx
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x32f4
testl %eax, %eax
js 0x32e5
movl 0x24(%rbx), %esi
cmpl 0x18(%rbx), %esi
jbe 0x32e1
movq %rbx, %rdi
callq 0x33d1
testl %eax, %eax
js 0x32e5
movl 0x14(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_file.c
// Function: write_block_fragment
static int write_block_fragment(struct ufat_file *f, const char *buf,
				ufat_size_t size)
{
	const struct ufat_bpb *bpb = &f->uf->bpb;
	const unsigned int log2_block_size = f->uf->dev->log2_block_size;
	const unsigned int block_size = 1 << log2_block_size;
	const unsigned int offset = f->cur_pos & (block_size - 1);
	const unsigned int remainder = block_size - offset;
	ufat_block_t cur_block;
	int i;

	if (size > remainder)
		size = remainder;
	size &= (block_size - 1);
	if (!size)
		return 0;

	i = ensure_room(f);
	if (i < 0)
		return i;

	cur_block =
		cluster_to_block(bpb, f->cur_cluster) +
		((f->cur_pos >> log2_block_size) &
		 ((1 << bpb->log2_blocks_per_cluster) - 1));

	i = ufat_cache_open(f->uf, cur_block, 0);
	if (i < 0)
		return i;

	ufat_cache_write(f->uf, i);
	memcpy(ufat_cache_data(f->uf, i) + offset, buf, size);

	i = advance_ptr(f, size);
	if (i < 0)
		return i;

	return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
movq (%r13), %rax
movl (%rax), %ebp
movl $0x1, %ebx
movl %ebp, %ecx
shll %cl, %ebx
leal -0x1(%rbx), %eax
movl 0x24(%rdi), %r12d
andl %eax, %r12d
subl %r12d, %ebx
cmpl %edx, %ebx
cmovael %edx, %ebx
andl %eax, %ebx
je 0x33c0
movq %rsi, %r15
movq %rdi, %r14
callq 0x35a8
testl %eax, %eax
js 0x33c2
movl 0x20(%r14), %edx
movb 0x2c(%r13), %al
addl $-0x2, %edx
movl %eax, %ecx
shll %cl, %edx
addq 0x48(%r13), %rdx
movl 0x24(%r14), %edi
movl %ebp, %ecx
shrl %cl, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %esi
notl %esi
andl %edi, %esi
addq %rdx, %rsi
movq (%r14), %rdi
xorl %edx, %edx
callq 0x1ab8
testl %eax, %eax
js 0x33c2
movq (%r14), %rdx
incl 0x20(%rdx)
movl %eax, %ecx
shlq $0x4, %rcx
orb $0x1, 0x80(%rdx,%rcx)
movq (%rdx), %rcx
movb (%rcx), %cl
shll %cl, %eax
addq %rdx, %rax
movl %r12d, %ecx
leaq (%rcx,%rax), %rdi
addq $0x180, %rdi            # imm = 0x180
movl %ebx, %edx
movq %r15, %rsi
callq 0x1160
movq %r14, %rdi
movl %ebx, %esi
callq 0x2edb
testl %eax, %eax
cmovsl %eax, %ebx
movl %ebx, %eax
jmp 0x33c2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_file.c
// Function: set_size
static int set_size(struct ufat_file *f, ufat_size_t s)
{
	int idx = ufat_cache_open(f->uf, f->dirent_block, 0);

	if (idx < 0)
		return idx;

	ufat_cache_write(f->uf, idx);
	w32(ufat_cache_data(f->uf, idx) +
	    f->dirent_pos * UFAT_DIRENT_SIZE + 0x1c, s);

	f->file_size = s;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x1ab8
testl %eax, %eax
js 0x3420
movq (%r14), %rdx
incl 0x20(%rdx)
movl %eax, %ecx
shlq $0x4, %rcx
orb $0x1, 0x80(%rdx,%rcx)
movq (%rdx), %rcx
movb (%rcx), %cl
shll %cl, %eax
addq %rdx, %rax
movl 0x10(%r14), %ecx
shll $0x5, %ecx
movl %ebp, 0x19c(%rcx,%rax)
movl %ebp, 0x18(%r14)
jmp 0x3422
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_file.c
// Function: ufat_file_truncate
int ufat_file_truncate(struct ufat_file *f)
{
	const unsigned int
		cluster_size = 1 << (f->uf->bpb.log2_blocks_per_cluster +
				     f->uf->dev->log2_block_size);
	int err;

	err = set_size(f, f->cur_pos);
	if (err < 0)
		return err;

	if (!f->file_size) {
		ufat_cluster_t old_start = f->start;

		err = set_start(f, 0);
		if (err < 0)
			return err;

		if (UFAT_CLUSTER_IS_PTR(old_start)) {
			err = ufat_free_chain(f->uf, old_start);
			if (err < 0)
				return err;
		}

		f->cur_cluster = 0;
		return 0;
	}

	if (f->file_size & (cluster_size - 1)) {
		ufat_cluster_t tail;

		err = ufat_read_fat(f->uf, f->cur_cluster, &tail);
		if (err < 0)
			return err;

		err = ufat_write_fat(f->uf, f->cur_cluster, UFAT_CLUSTER_EOC);
		if (err < 0)
			return err;

		if (UFAT_CLUSTER_IS_PTR(tail))
			return ufat_free_chain(f->uf, tail);

		return 0;
	}

	if (UFAT_CLUSTER_IS_PTR(f->cur_cluster)) {
		err = ufat_write_fat(f->uf, f->prev_cluster, UFAT_CLUSTER_EOC);
		if (err < 0)
			return err;

		ufat_free_chain(f->uf, f->cur_cluster);
		f->cur_cluster = 0;
		return 0;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rcx
movl (%rcx), %r14d
addl 0x2c(%rax), %r14d
movl 0x24(%rdi), %esi
callq 0x33d1
testl %eax, %eax
js 0x3524
movl 0x18(%rbx), %eax
testl %eax, %eax
je 0x34b6
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r14d, %ecx
shll %cl, %edx
notl %edx
testl %edx, %eax
je 0x34ed
movq (%rbx), %rdi
movl 0x20(%rbx), %esi
leaq 0xc(%rsp), %rdx
callq 0x1f33
testl %eax, %eax
js 0x3524
movq (%rbx), %rdi
movl 0x20(%rbx), %esi
movl $0xffffff8, %edx        # imm = 0xFFFFFF8
callq 0x2127
testl %eax, %eax
js 0x3524
movl 0xc(%rsp), %esi
leal -0x2(%rsi), %eax
xorl %ebp, %ebp
cmpl $0xfffffed, %eax        # imm = 0xFFFFFED
ja 0x3526
movq (%rbx), %rdi
callq 0x22bc
jmp 0x3524
movl 0x14(%rbx), %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3531
testl %eax, %eax
js 0x3524
leal -0x2(%r14), %eax
cmpl $0xfffffed, %eax        # imm = 0xFFFFFED
ja 0x34e2
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x22bc
testl %eax, %eax
js 0x3524
movl $0x0, 0x20(%rbx)
xorl %ebp, %ebp
jmp 0x3526
movl 0x20(%rbx), %eax
addl $-0x2, %eax
xorl %ebp, %ebp
cmpl $0xfffffed, %eax        # imm = 0xFFFFFED
ja 0x3526
movq (%rbx), %rdi
movl 0x1c(%rbx), %esi
movl $0xffffff8, %edx        # imm = 0xFFFFFF8
callq 0x2127
testl %eax, %eax
js 0x3524
movq (%rbx), %rdi
movl 0x20(%rbx), %esi
callq 0x22bc
movl $0x0, 0x20(%rbx)
jmp 0x3526
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_file.c
// Function: set_start
static int set_start(struct ufat_file *f, ufat_cluster_t s)
{
	int idx = ufat_cache_open(f->uf, f->dirent_block, 0);
	uint8_t *data;

	if (idx < 0)
		return idx;

	ufat_cache_write(f->uf, idx);
	data = ufat_cache_data(f->uf, idx) + f->dirent_pos * UFAT_DIRENT_SIZE;
	w16(data + 0x14, s >> 16);
	w16(data + 0x1a, s & 0xffff);

	f->start = s;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x1ab8
testl %eax, %eax
js 0x359f
movq (%r14), %rdx
incl 0x20(%rdx)
movl %eax, %ecx
shlq $0x4, %rcx
orb $0x1, 0x80(%rdx,%rcx)
movq (%rdx), %rcx
movb (%rcx), %cl
shll %cl, %eax
addq %rdx, %rax
movl 0x10(%r14), %ecx
shll $0x5, %ecx
movl %ebx, %edx
shrl $0x10, %edx
movb %dl, 0x194(%rcx,%rax)
movl %ebx, %edx
shrl $0x18, %edx
movb %dl, 0x195(%rcx,%rax)
movb %bl, 0x19a(%rcx,%rax)
movb %bh, 0x19b(%rcx,%rax)
movl %ebx, 0x14(%r14)
jmp 0x35a1
movl %eax, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_file.c
// Function: ensure_room
static int ensure_room(struct ufat_file *f)
{
	ufat_cluster_t c;
	int err;

	if (UFAT_CLUSTER_IS_PTR(f->cur_cluster))
		return 0;

	err = ufat_alloc_chain(f->uf, 1, &c);
	if (err < 0)
		return err;

	if (UFAT_CLUSTER_IS_PTR(f->prev_cluster))
		err = ufat_write_fat(f->uf, f->prev_cluster, c);
	else
		err = set_start(f, c);

	if (err < 0) {
		ufat_free_chain(f->uf, c);
		return err;
	}

	f->cur_cluster = c;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl 0x20(%rdi), %eax
addl $-0x2, %eax
xorl %ebp, %ebp
cmpl $0xfffffee, %eax        # imm = 0xFFFFFEE
jb 0x361b
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
callq 0x231a
testl %eax, %eax
js 0x35ee
movl 0x1c(%rbx), %esi
leal -0x2(%rsi), %eax
cmpl $0xfffffed, %eax        # imm = 0xFFFFFED
ja 0x35f2
movq (%rbx), %rdi
movl 0x4(%rsp), %edx
callq 0x2127
jmp 0x35fe
movl %eax, %ebp
jmp 0x361b
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x3531
movl %eax, %ebp
testl %eax, %eax
js 0x360f
movl 0x4(%rsp), %eax
movl %eax, 0x20(%rbx)
xorl %ebp, %ebp
jmp 0x361b
movq (%rbx), %rdi
movl 0x4(%rsp), %esi
callq 0x22bc
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_write_raw_dirent
int ufat_write_raw_dirent(struct ufat_directory *dir,
			  const uint8_t *data, unsigned int len)
{
	int idx;

	if (dir->cur_block == UFAT_BLOCK_NONE)
		return -UFAT_ERR_IO;

	idx = ufat_cache_open(dir->uf, dir->cur_block, 0);
	if (idx < 0)
		return idx;

	ufat_cache_write(dir->uf, idx);
	memcpy(ufat_cache_data(dir->uf, idx) +
	       dir->cur_pos * UFAT_DIRENT_SIZE,
	       data, len);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x10(%rdi), %rsi
cmpq $-0x1, %rsi
je 0x3689
movl %edx, %ebp
movq %rdi, %r15
movq (%rdi), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x1ab8
testl %eax, %eax
js 0x3690
movq (%r15), %rdx
incl 0x20(%rdx)
movl %eax, %ecx
shlq $0x4, %rcx
orb $0x1, 0x80(%rdx,%rcx)
movq (%rdx), %rcx
movb (%rcx), %cl
shll %cl, %eax
addq %rdx, %rax
movl 0x8(%r15), %ecx
shll $0x5, %ecx
leaq (%rcx,%rax), %rdi
addq $0x180, %rdi            # imm = 0x180
movl %ebp, %edx
movq %r14, %rsi
callq 0x1160
jmp 0x3692
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x3692
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_advance_raw_dirent
int ufat_advance_raw_dirent(struct ufat_directory *dir, int can_alloc)
{
	/* Advance the dirent pointer and check for a block overrun */
	dir->cur_pos++;
	if (dir->cur_pos * UFAT_DIRENT_SIZE >=
	    (1u << dir->uf->dev->log2_block_size)) {
		dir->cur_pos = 0;

		if (dir->cur_block < dir->uf->bpb.cluster_start) {
			/* FAT12/16 root directory */
			dir->cur_block++;
			if (dir->cur_block >= dir->uf->bpb.cluster_start)
				dir->cur_block = UFAT_BLOCK_NONE;

			return 0;
		}

		return advance_block_in_chain(dir, can_alloc);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl 0x8(%rdi), %eax
incl %eax
movl %eax, 0x8(%rdi)
shll $0x5, %eax
movq (%rdi), %r14
movq (%r14), %rcx
movb (%rcx), %cl
shrl %cl, %eax
xorl %ebp, %ebp
testl %eax, %eax
je 0x37a5
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
movq 0x10(%rdi), %rax
movq 0x48(%r14), %rdx
movq %rax, %r15
subq %rdx, %r15
jae 0x36fe
incq %rax
cmpq %rdx, %rax
movq $-0x1, %rcx
cmovbq %rax, %rcx
movq %rcx, 0x10(%rbx)
jmp 0x37a5
movl %esi, %r12d
movb 0x2c(%r14), %cl
shrq %cl, %r15
incq %rax
movq %rax, %rsi
subq %rdx, %rsi
shrq %cl, %rsi
leal 0x2(%rsi), %ecx
movl %ecx, 0xc(%rsp)
cmpl %esi, %r15d
je 0x3750
addl $0x2, %r15d
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x1f33
testl %eax, %eax
js 0x37a3
movl 0xc(%rsp), %eax
addl $-0x2, %eax
cmpl $0xfffffed, %eax        # imm = 0xFFFFFED
ja 0x3758
movb 0x2c(%r14), %cl
shll %cl, %eax
addq 0x48(%r14), %rax
movq %rax, 0x10(%rbx)
xorl %ebp, %ebp
jmp 0x37a5
testl %r12d, %r12d
je 0x37b4
movq (%rbx), %rdi
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
callq 0x231a
testl %eax, %eax
js 0x37a3
movq (%rbx), %rdi
movl 0xc(%rsp), %esi
callq 0x38e2
movq (%rbx), %rdi
movl 0xc(%rsp), %edx
testl %eax, %eax
js 0x37be
movl %r15d, %esi
callq 0x2127
testl %eax, %eax
js 0x37c4
movl 0xc(%rsp), %eax
movb 0x2c(%r14), %cl
addl $-0x2, %eax
jmp 0x374a
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, 0x10(%rbx)
jmp 0x3754
movl %eax, %ebp
movl %edx, %esi
jmp 0x37cd
movl %eax, %ebp
movq (%rbx), %rdi
movl 0xc(%rsp), %esi
callq 0x22bc
jmp 0x37a5
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_read_raw_dirent
int ufat_read_raw_dirent(struct ufat_directory *dir, uint8_t *data)
{
	int idx;

	if (dir->cur_block == UFAT_BLOCK_NONE)
		return 1;

	idx = ufat_cache_open(dir->uf, dir->cur_block, 0);
	if (idx < 0)
		return idx;

	memcpy(data, ufat_cache_data(dir->uf, idx) +
	       dir->cur_pos * UFAT_DIRENT_SIZE,
	       UFAT_DIRENT_SIZE);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq 0x10(%rdi), %rsi
cmpq $-0x1, %rsi
je 0x3828
movq %rdi, %r15
movq (%rdi), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x1ab8
testl %eax, %eax
js 0x382f
movq (%r15), %rdx
movq (%rdx), %rcx
movb (%rcx), %cl
shll %cl, %eax
addq %rdx, %rax
movl 0x8(%r15), %ecx
shll $0x5, %ecx
movups 0x180(%rcx,%rax), %xmm0
movups 0x190(%rcx,%rax), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
jmp 0x3831
movl $0x1, %ebx
jmp 0x3831
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_allocate_raw_dirent
int ufat_allocate_raw_dirent(struct ufat_directory *dir, unsigned int count)
{
	ufat_block_t empty_start = UFAT_BLOCK_NONE;
	unsigned int empty_pos = 0;
	unsigned int empty_count = 0;

	ufat_dir_rewind(dir);

	for (;;) {
		uint8_t data[UFAT_DIRENT_SIZE];
		int err;

		err = ufat_read_raw_dirent(dir, data);
		if (err < 0)
			return err;

		/* Check to see if this raw dirent is empty. Keep track
		 * of contiguous chains of empty dirents.
		 */
		if (!data[0] || data[0] == 0xe5) {
			if (!empty_count) {
				empty_start = dir->cur_block;
				empty_pos = dir->cur_pos;
			}

			empty_count++;
		} else {
			empty_count = 0;
		}

		/* Is this chain long enough? */
		if (empty_count >= count)
			break;

		err = ufat_advance_raw_dirent(dir, 1);
		if (err < 0)
			return err;

		if (dir->cur_block == UFAT_BLOCK_NONE)
			return -UFAT_ERR_DIRECTORY_FULL;
	}

	/* Reposition at the start of the empty chain */
	dir->cur_block = empty_start;
	dir->cur_pos = empty_pos;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2567
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x37d4
testl %eax, %eax
js 0x38d3
movq $-0x1, %r15
xorl %r12d, %r12d
movq %rsp, %r14
xorl %r13d, %r13d
movzbl (%rsp), %eax
cmpl $0xe5, %eax
je 0x387f
testl %eax, %eax
jne 0x3891
testl %r12d, %r12d
jne 0x388c
movq 0x10(%rbx), %r15
movl 0x8(%rbx), %r13d
incl %r12d
jmp 0x3894
xorl %r12d, %r12d
cmpl %ebp, %r12d
jae 0x38c2
movq %rbx, %rdi
movl $0x1, %esi
callq 0x369f
testl %eax, %eax
js 0x38d3
cmpq $-0x1, 0x10(%rbx)
je 0x38ce
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37d4
testl %eax, %eax
jns 0x3870
jmp 0x38d3
movq %r15, 0x10(%rbx)
movl %r13d, 0x8(%rbx)
xorl %eax, %eax
jmp 0x38d3
movl $0xfffffff2, %eax       # imm = 0xFFFFFFF2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_init_dirent_cluster
int ufat_init_dirent_cluster(struct ufat *uf, ufat_cluster_t c)
{
	const struct ufat_bpb *bpb = &uf->bpb;
	const ufat_block_t start = cluster_to_block(bpb, c);
	const unsigned int count =
		1 << bpb->log2_blocks_per_cluster;
	const unsigned int block_size = 1 << uf->dev->log2_block_size;
	int i;

	for (i = count - 1; i >= 0; i--) {
		int idx = ufat_cache_open(uf, start + i, 1);

		if (idx < 0)
			return idx;

		ufat_cache_write(uf, idx);
		memset(ufat_cache_data(uf, idx), 0, block_size);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movb 0x2c(%rdi), %cl
addl $-0x2, %ebx
shll %cl, %ebx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
shll %cl, %r12d
notl %r12d
movq (%rdi), %rax
movb (%rax), %cl
movl $0x1, %r15d
shlq %cl, %r15
leaq 0x80(%rdi), %rax
movq %rax, (%rsp)
leaq 0x180(%rdi), %r13
addq 0x48(%rdi), %rbx
xorl %ebp, %ebp
leaq (%rbx,%r12), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x1ab8
testl %eax, %eax
js 0x3979
incl 0x20(%r14)
movl %eax, %ecx
shlq $0x4, %rcx
movq (%rsp), %rdx
orb $0x1, (%rdx,%rcx)
movq (%r14), %rcx
movb (%rcx), %cl
shll %cl, %eax
addq %r13, %rax
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1110
leaq -0x1(%r12), %rax
testq %r12, %r12
movq %rax, %r12
jg 0x392c
jmp 0x397b
movl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_parse_dirent
void ufat_parse_dirent(ufat_fat_type_t type,
		       const uint8_t *data, struct ufat_dirent *inf)
{
	sn_copy(data, inf->short_name, 8);
	sn_copy(data + 0x08, inf->short_ext, 3);

	inf->attributes = data[0x0b];
	inf->create_time = r16(data + 0x0e);
	inf->create_date = r16(data + 0x10);
	inf->access_date = r16(data + 0x12);
	inf->modify_time = r16(data + 0x16);
	inf->modify_date = r16(data + 0x18);
	inf->file_size = r32(data + 0x1c);
	inf->first_cluster = r16(data + 0x1a);

	if (type == UFAT_TYPE_FAT32) {
		uint32_t high = r16(data + 0x14);

		inf->first_cluster |= high << 16;
	}
}

// Assembly:
xorl %eax, %eax
movb (%rsi,%rax), %cl
cmpb $0x21, %cl
jb 0x39a8
movb %cl, 0x1c(%rdx,%rax)
incq %rax
cmpq $0x8, %rax
jne 0x398e
movl $0x8, %eax
movb $0x0, 0x1c(%rdx,%rax)
xorl %eax, %eax
movb 0x8(%rsi,%rax), %cl
cmpb $0x21, %cl
jb 0x39ca
movb %cl, 0x25(%rdx,%rax)
incq %rax
cmpq $0x3, %rax
jne 0x39af
movl $0x3, %eax
movb $0x0, 0x25(%rdx,%rax)
movzbl 0xb(%rsi), %eax
movl %eax, 0x2c(%rdx)
movzwl 0xe(%rsi), %eax
movw %ax, 0x32(%rdx)
movzwl 0x10(%rsi), %eax
movw %ax, 0x30(%rdx)
movzwl 0x12(%rsi), %eax
movw %ax, 0x38(%rdx)
movzwl 0x16(%rsi), %eax
movw %ax, 0x36(%rdx)
movzwl 0x18(%rsi), %eax
movw %ax, 0x34(%rdx)
movl 0x1c(%rsi), %eax
movl %eax, 0x40(%rdx)
movzwl 0x1a(%rsi), %eax
movl %eax, 0x3c(%rdx)
cmpl $0x20, %edi
jne 0x3a1c
movzwl 0x14(%rsi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movl %ecx, 0x3c(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_lfn_is_legal
int ufat_lfn_is_legal(const char *name)
{
	if (!*name)
		return 0;

	if (name[0] == '.') {
		if (!name[1])
			return 0;
		if (name[1] == '.' && !name[2])
			return 0;
	}

	while (*name) {
		if (*name == '\\' || *name == '/' || *name < ' ')
			return 0;

		name++;
	}

	return 1;
}

// Assembly:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x3b10
cmpl $0x2e, %eax
jne 0x3af5
movzbl 0x1(%rdi), %eax
testl %eax, %eax
je 0x3b10
cmpl $0x2e, %eax
jne 0x3af5
cmpb $0x0, 0x2(%rdi)
je 0x3b17
xorl %eax, %eax
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0x3b11
cmpl $0x2f, %ecx
je 0x3b10
cmpl $0x5c, %ecx
je 0x3b10
incq %rdi
cmpb $0x20, %cl
jge 0x3af7
retq
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_short_first
void ufat_short_first(const char *long_name,
		      char *short_name, char *ext_text)
{
	int len = strlen(long_name);
	int ext = len;
	int i, j;

	while (ext >= 0 && long_name[ext] != '.')
		ext--;

	if (ext > 0)
		ext++;
	else
		ext = len;

	j = 0;
	for (i = ext; j < 3 && long_name[i]; i++) {
		char c = long_name[i];

		if (is_legal_dos_char(c))
			ext_text[j++] = toupper(c);
	}
	ext_text[j] = 0;

	j = 0;
	for (i = 0; j < 8 && i < ext; i++) {
		char c = long_name[i];

		if (is_legal_dos_char(c))
			short_name[j++] = toupper(c);
	}
	short_name[j] = 0;

	if (!j) {
		for (i = 0; i < 8; i++)
			short_name[i] = '~';
		short_name[8] = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
callq 0x10d0
testl %eax, %eax
js 0x3b5c
movl %eax, %edx
movl %edx, %ecx
cmpb $0x2e, (%r14,%rcx)
je 0x3b52
leal -0x1(%rdx), %ecx
testl %edx, %edx
movl %ecx, %edx
jg 0x3b3e
jmp 0x3b5c
leal 0x1(%rdx), %ecx
testl %edx, %edx
cmovel %eax, %ecx
movl %ecx, %eax
movq %rax, 0x10(%rsp)
movslq %eax, %r12
leaq (%r14,%r12), %rbx
xorl %ebp, %ebp
movsbq (%rbx), %r13
testq %r13, %r13
je 0x3b9c
movl %r13d, %edi
callq 0x3c29
testl %eax, %eax
je 0x3b94
callq 0x1030
movq (%rax), %rax
movb (%rax,%r13,4), %al
movslq %ebp, %rcx
incl %ebp
movb %al, (%r15,%rcx)
incq %rbx
cmpl $0x3, %ebp
jl 0x3b6a
movslq %ebp, %rax
movb $0x0, (%r15,%rax)
cmpl $0x0, 0x10(%rsp)
jle 0x3c04
xorl %r15d, %r15d
movl $0x1, %ebx
movsbl -0x1(%r14,%rbx), %ebp
movl %ebp, %edi
callq 0x3c29
testl %eax, %eax
je 0x3be1
movslq %ebp, %r13
callq 0x1030
movq (%rax), %rax
movb (%rax,%r13,4), %al
movslq %r15d, %rcx
incl %r15d
movq 0x8(%rsp), %rdx
movb %al, (%rdx,%rcx)
cmpl $0x7, %r15d
jg 0x3bf3
leaq 0x1(%rbx), %rax
cmpq %r12, %rbx
movq %rax, %rbx
jl 0x3bb3
movslq %r15d, %rax
movq 0x8(%rsp), %rcx
movb $0x0, (%rcx,%rax)
testl %r15d, %r15d
jne 0x3c1a
movabsq $0x7e7e7e7e7e7e7e7e, %rax # imm = 0x7E7E7E7E7E7E7E7E
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movb $0x0, 0x8(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: is_legal_dos_char
static int is_legal_dos_char(char c)
{
	return isalnum(c) ||
		(c >= '!' && c <= ')') ||
		(c == '-') ||
		(c == '@') ||
		(c >= '^' && c <= '`') ||
		(c == '{' || c == '}' || c == '~');
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x1200
movq %rax, %rcx
leal -0x21(%rbx), %edx
movl $0x1, %eax
cmpb $0x9, %dl
jb 0x3c77
movq (%rcx), %rcx
movslq %ebx, %rdx
movzwl (%rcx,%rdx,2), %ecx
andl $0x8, %ecx
jne 0x3c77
movsbl %bl, %ecx
cmpl $0x2d, %ecx
je 0x3c77
cmpl $0x40, %ecx
je 0x3c77
leal -0x5e(%rbx), %edx
cmpb $0x3, %dl
jb 0x3c77
cmpl $0x7b, %ecx
je 0x3c77
cmpl $0x7d, %ecx
je 0x3c77
xorl %eax, %eax
cmpb $0x7e, %bl
sete %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_short_next
void ufat_short_next(char *short_name)
{
	int len = strlen(short_name);
	int tilde = strlen(short_name);
	unsigned int suffix_num;
	int i;

	while (tilde >= 0 && short_name[tilde] != '~')
		tilde--;
	if (tilde < 0)
		tilde = len;
	else
		tilde++;

	suffix_num = atoi(short_name + tilde) + 1;
	short_name[8] = 0;

	i = 7;
	while (suffix_num && i >= 0) {
		short_name[i] = (suffix_num % 10) + '0';
		suffix_num /= 10;
		i--;
	}

	if (i >= 0)
		short_name[i--] = '~';

	while (i >= tilde)
		short_name[i--] = '~';
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10d0
movq %rax, %r14
testl %r14d, %r14d
js 0x3ca8
movl %r14d, %eax
movl %eax, %ecx
cmpb $0x7e, (%rbx,%rcx)
je 0x3ca3
leal -0x1(%rax), %ecx
testl %eax, %eax
movl %ecx, %eax
jg 0x3c90
jmp 0x3ca8
incl %eax
movl %eax, %r14d
movslq %r14d, %rdi
addq %rbx, %rdi
callq 0x11c0
movb $0x0, 0x8(%rbx)
movl $0x7, %ecx
incl %eax
je 0x3d06
movl $0x7, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %eax, %r8d
movq %rcx, %rsi
movl %eax, %eax
imulq %rdx, %rax
shrq $0x23, %rax
leal (%rax,%rax), %edi
leal (%rdi,%rdi,4), %edi
movl %r8d, %r9d
subl %edi, %r9d
orb $0x30, %r9b
movb %r9b, (%rbx,%rcx)
addq $-0x1, %rcx
setb %dil
cmpl $0xa, %r8d
jb 0x3d01
testb %dil, %dil
jne 0x3cca
testq %rsi, %rsi
je 0x3d3d
movl %ecx, %eax
decl %ecx
movb $0x7e, (%rbx,%rax)
movl %ecx, %edx
subl %r14d, %edx
jge 0x3d1d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movslq %ecx, %rax
subq %rdx, %rax
addq %rax, %rbx
incq %rdx
movq %rbx, %rdi
movl $0x7e, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1110
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x3d0e
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_short_exists
int ufat_short_exists(struct ufat_directory *dir, const char *short_name,
		      const char *short_ext)
{
	struct ufat_dirent ent;

	ufat_dir_rewind(dir);
	for (;;) {
		int err = ufat_dir_read(dir, &ent, NULL, 0);

		if (err < 0)
			return err;

		if (err)
			break;

		if (ufat_compare_name(short_name, ent.short_name, 0) >= 0 &&
		    ufat_compare_name(short_ext, ent.short_ext, 0) >= 0)
			return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x2567
movq %rsp, %rsi
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2577
testl %eax, %eax
js 0x3dc4
leaq 0x25(%rsp), %r12
leaq 0x1c(%rsp), %r13
movq %rsp, %rbp
testl %eax, %eax
jne 0x3dbb
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x3dd3
testl %eax, %eax
js 0x3da6
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3dd3
testl %eax, %eax
jns 0x3dbf
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2577
testl %eax, %eax
jns 0x3d80
jmp 0x3dc4
xorl %eax, %eax
jmp 0x3dc4
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_compare_name
int ufat_compare_name(const char *search_name, const char *dir_name,
		      int component_only)
{
	int m = 0;

	while (search_name[m]) {
		int dc = dir_name[m];
		int sc = search_name[m];

		if (component_only && (sc == '/' || sc == '\\'))
			break;

		if (!dc)
			return -1;

		if (sc >= 'a' && sc <= 'z')
			sc -= 32;

		if (dc >= 'a' && dc <= 'z')
			dc -= 32;

		if (sc != dc)
			return -1;

		m++;
	}

	if (dir_name[m])
		return -1;

	return m;
}

// Assembly:
xorl %ecx, %ecx
movsbl (%rdi,%rcx), %r9d
testl %r9d, %r9d
je 0x3e2a
movsbl (%rsi,%rcx), %r8d
testl %edx, %edx
je 0x3df7
cmpb $0x2f, %r9b
je 0x3e2a
movzbl %r9b, %eax
cmpl $0x5c, %eax
je 0x3e2a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %r8b, %r8b
je 0x3e29
leal -0x61(%r9), %r10d
leal -0x20(%r9), %r11d
cmpb $0x1a, %r10b
cmovael %r9d, %r11d
leal -0x61(%r8), %r9d
leal -0x20(%r8), %r10d
cmpb $0x1a, %r9b
cmovael %r8d, %r10d
incq %rcx
cmpl %r10d, %r11d
je 0x3dd5
retq
movl %ecx, %edx
xorl %eax, %eax
cmpb (%rsi,%rdx), %al
sbbl %eax, %eax
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_lfn_parse
void ufat_lfn_parse(struct ufat_lfn_parser *s, const uint8_t *data,
		    ufat_block_t blk, unsigned int pos)
{
	const int fr_seq = data[0];
	uint16_t frag_data[13];
	int fr_pos;
	int fr_len;
	int i;

	fr_pos = ((fr_seq & 0x3f) - 1) * 13;
	fr_len = 13;
	if (fr_pos + fr_len > UFAT_LFN_MAX_CHARS)
		fr_len = UFAT_LFN_MAX_CHARS - fr_pos;

	/* Check against expected sequence number and checksum */
	if (fr_seq & 0x40) {
		s->start_block = blk;
		s->start_pos = pos;
		s->seq = fr_seq & 0x3f;
		s->len = fr_pos + fr_len;
		s->short_checksum = data[0x0d];
	} else if (fr_seq != s->seq ||
		   s->short_checksum != data[0x0d]) {
		ufat_lfn_reset(s);
		return;
	}
	s->seq--;

	/* Unpack and copy fragment */
	for (i = 0; i < 5; i++)
		frag_data[i] = r16(data + 0x01 + i * 2);
	for (i = 0; i < 6; i++)
		frag_data[i + 5] = r16(data + 0x0e + i * 2);
	frag_data[11] = r16(data + 0x1c);
	frag_data[12] = r16(data + 0x1e);

	for (i = 0; i < fr_len; i++)
		s->buf[fr_pos + i] = frag_data[i];
}

// Assembly:
movq %rdx, %rax
movzbl (%rsi), %r8d
movl %r8d, %r9d
andl $0x3f, %r9d
leal (%r9,%r9,2), %edx
leal (%r9,%rdx,4), %r10d
movl $0x10c, %r11d           # imm = 0x10C
subl %r10d, %r11d
cmpl $0x14, %r9d
movl $0xd, %edx
cmovael %r11d, %edx
testb $0x40, %r8b
jne 0x3e81
cmpl %r8d, 0x14(%rdi)
jne 0x3e79
movb 0xc(%rdi), %al
movl %r8d, %r9d
cmpb 0xd(%rsi), %al
je 0x3e9b
movl $0xffffffff, 0x14(%rdi) # imm = 0xFFFFFFFF
retq
movq %rax, (%rdi)
movl %ecx, 0x8(%rdi)
movl %r9d, 0x14(%rdi)
leal (%r10,%rdx), %eax
addl $-0xd, %eax
movl %eax, 0x10(%rdi)
movb 0xd(%rsi), %al
movb %al, 0xc(%rdi)
subq $0x28, %rsp
decl %r9d
movl %r9d, 0x14(%rdi)
movzwl 0x9(%rsi), %eax
movw %ax, 0x8(%rsp)
movq 0x1(%rsi), %rax
movq %rax, (%rsp)
movq 0xe(%rsi), %rax
movq %rax, 0xa(%rsp)
movl 0x16(%rsi), %eax
movl %eax, 0x12(%rsp)
movzwl 0x1c(%rsi), %eax
movw %ax, 0x16(%rsp)
movzwl 0x1e(%rsi), %eax
movw %ax, 0x18(%rsp)
testl %edx, %edx
jle 0x3efd
andl $0x3f, %r8d
leaq (%r8,%r8,4), %rax
leaq (%rax,%rax,4), %rax
addq %r8, %rax
addq %rax, %rdi
addq $-0x2, %rdi
addl %edx, %edx
movq %rsp, %rsi
callq 0x1160
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_ucs2_to_utf8
int ufat_ucs2_to_utf8(const uint16_t *src, int src_len,
		      char *dst, int dst_len)
{
	int i;
	int j = 0;

	for (i = 0; i < src_len && src[i]; i++) {
		uint16_t c = src[i];

		if (c >= 0x800) {
			if (j + 3 >= dst_len)
				return -UFAT_ERR_BAD_ENCODING;

			dst[j++] = 0xe0 | (c >> 12);
			dst[j++] = 0x80 | ((c >> 6) & 0x3f);
			dst[j++] = 0x80 | (c & 0x3f);
		} else if (c >= 0x80) {
			if (j + 2 >= dst_len)
				return -UFAT_ERR_BAD_ENCODING;

			dst[j++] = 0xc0 | c >> 6;
			dst[j++] = 0x80 | (c & 0x3f);
		} else {
			if (j + 1 >= dst_len)
				return -UFAT_ERR_BAD_ENCODING;

			dst[j++] = c;
		}
	}

	if (j >= dst_len)
		return -UFAT_ERR_NAME_TOO_LONG;

	dst[j] = 0;
	return 0;
}

// Assembly:
pushq %rbx
testl %esi, %esi
jle 0x3fbf
movl %esi, %eax
xorl %esi, %esi
xorl %r10d, %r10d
movzwl (%rdi,%rsi,2), %r9d
testw %r9w, %r9w
je 0x3fc2
movzwl %r9w, %r11d
cmpl $0x800, %r11d           # imm = 0x800
jb 0x3f6b
leal 0x3(%r10), %r8d
cmpl %ecx, %r8d
jge 0x3fda
movl %r11d, %ebx
shrl $0xc, %ebx
orb $-0x20, %bl
movslq %r10d, %r10
movb %bl, (%rdx,%r10)
shrl $0x6, %r11d
andb $0x3f, %r11b
orb $-0x80, %r11b
movb %r11b, 0x1(%rdx,%r10)
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, 0x2(%rdx,%r10)
jmp 0x3fae
cmpl $0x80, %r11d
jb 0x3f9e
leal 0x2(%r10), %r8d
cmpl %ecx, %r8d
jge 0x3fda
movl %r9d, %r11d
shrl $0x6, %r11d
orb $-0x40, %r11b
movslq %r10d, %r10
movb %r11b, (%rdx,%r10)
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, 0x1(%rdx,%r10)
jmp 0x3fae
leal 0x1(%r10), %r8d
cmpl %ecx, %r8d
jge 0x3fda
movslq %r10d, %r10
movb %r9b, (%rdx,%r10)
incq %rsi
movl %r8d, %r10d
cmpq %rsi, %rax
jne 0x3f12
jmp 0x3fcf
xorl %r10d, %r10d
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
movl %r10d, %r8d
cmpl %ecx, %r10d
jge 0x3fdf
movslq %r8d, %rax
movb $0x0, (%rdx,%rax)
xorl %eax, %eax
jmp 0x3fdf
movl $0xfffffff3, %eax       # imm = 0xFFFFFFF3
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_short_checksum
uint8_t ufat_short_checksum(const char *short_name, const char *short_ext)
{
	uint8_t sum = 0;
	int i;

	for (i = 0; short_name[i]; i++)
		sum = cksum_next(sum, short_name[i]);
	for (; i < 8; i++)
		sum = cksum_next(sum, ' ');

	for (i = 0; short_ext[i]; i++)
		sum = cksum_next(sum, short_ext[i]);
	for (; i < 3; i++)
		sum = cksum_next(sum, ' ');

	return sum;
}

// Assembly:
movb (%rdi), %dl
xorl %ecx, %ecx
xorl %eax, %eax
testb %dl, %dl
je 0x4004
rorb %al
addb %dl, %al
movb 0x1(%rdi,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x3feb
leaq -0x1(%rcx), %rdx
cmpq $0x6, %rdx
ja 0x400f
addl $-0x8, %ecx
rorb %al
addb $0x20, %al
incl %ecx
jne 0x4007
movb (%rsi), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x4030
rorb %al
addb %dl, %al
movb 0x1(%rsi,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x4017
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rdx
ja 0x403b
addl $-0x3, %ecx
rorb %al
addb $0x20, %al
incl %ecx
jne 0x4033
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_utf8_to_ucs2
int ufat_utf8_to_ucs2(const char *src, uint16_t *dst)
{
	int len = 0;
	int i;

	while (*src && len < UFAT_LFN_MAX_CHARS) {
		unsigned int c = *src;

		if ((c & 0xf0) == 0xf0)
			return -UFAT_ERR_ILLEGAL_NAME;

		if ((c & 0xe0) == 0xe0) {
			unsigned int b = src[1];
			unsigned int a = src[2];

			if ((a & 0xc0) != 0xc0 ||
			    (b & 0xc0) != 0xc0)
				return -UFAT_ERR_BAD_ENCODING;

			dst[len++] = ((c & 0xf) << 12) |
				((b & 0x3f) << 6) |
				(a & 0x3f);
			src += 3;
		} else if ((c & 0xc0) == 0xc0) {
			unsigned int b = src[1];

			if ((b & 0xc0) != 0xc0)
				return -UFAT_ERR_BAD_ENCODING;

			dst[len++] = ((c & 0x1f) << 6) | (b & 0x3f);
			src += 2;
		} else if (c & 0x80) {
			return -UFAT_ERR_BAD_ENCODING;
		} else {
			dst[len++] = c;
			src++;
		}
	}

	if (*src)
		return -UFAT_ERR_NAME_TOO_LONG;

	/* Pad out to full length */
	for (i = len; i < UFAT_LFN_MAX_CHARS; i++)
		dst[i] = 0;

	return len;
}

// Assembly:
pushq %rbx
movb (%rdi), %dl
testb %dl, %dl
je 0x4127
xorl %eax, %eax
movl $0xfffffff3, %ebx       # imm = 0xFFFFFFF3
movsbl %dl, %ecx
movl %ecx, %r8d
notl %r8d
testb $-0x10, %r8b
je 0x4147
testb $-0x20, %r8b
jne 0x40b3
movzbl 0x2(%rdi), %edx
movl %edx, %r8d
notl %r8d
testb $-0x40, %r8b
jne 0x4153
movsbl 0x1(%rdi), %r8d
movl %r8d, %r9d
andl $0xc0, %r9d
cmpl $0xc0, %r9d
jne 0x4153
shll $0xc, %ecx
andl $0x3f, %r8d
shll $0x6, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
orl %r8d, %edx
movl $0x3, %r8d
jmp 0x40ec
testb $-0x40, %r8b
jne 0x40e0
movzbl 0x1(%rdi), %edx
movl %edx, %r8d
notl %r8d
testb $-0x40, %r8b
jne 0x414e
andl $0x1f, %ecx
shll $0x6, %ecx
andl $0x3f, %edx
orl %ecx, %edx
movl $0x2, %r8d
jmp 0x40ec
testb %dl, %dl
js 0x414e
movl $0x1, %r8d
movl %ecx, %edx
movw %dx, (%rsi,%rax,2)
leaq 0x1(%rax), %rcx
movb (%rdi,%r8), %dl
testb %dl, %dl
je 0x410e
addq %r8, %rdi
cmpq $0xfe, %rax
movq %rcx, %rax
jb 0x404e
movl $0xfffffffa, %ebx       # imm = 0xFFFFFFFA
testb %dl, %dl
jne 0x4153
leaq -0x1(%rcx), %rax
movl %ecx, %ebx
cmpq $0xfd, %rax
jbe 0x4129
jmp 0x4153
xorl %ebx, %ebx
movl %ebx, %eax
leaq (%rsi,%rax,2), %rdi
movl $0xfe, %eax
subl %ebx, %eax
leaq 0x2(,%rax,2), %rdx
xorl %esi, %esi
callq 0x1110
jmp 0x4153
movl $0xfffffff5, %ebx       # imm = 0xFFFFFFF5
jmp 0x4153
movl $0xfffffff3, %ebx       # imm = 0xFFFFFFF3
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_format_short
int ufat_format_short(const char *name, const char *ext,
		      char *out, int max_len)
{
	int i = 0;

	while (*name) {
		if (i >= max_len)
			return -UFAT_ERR_NAME_TOO_LONG;

		out[i++] = *(name++);
	}

	if (*ext) {
		if (i >= max_len)
			return -UFAT_ERR_NAME_TOO_LONG;
		out[i++] = '.';

		while (*ext) {
			if (i >= max_len)
				return -UFAT_ERR_NAME_TOO_LONG;
			out[i++] = *(ext++);
		}
	}

	if (i >= max_len)
		return -UFAT_ERR_NAME_TOO_LONG;

	out[i] = 0;
	return 0;
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x41df
xorl %r10d, %r10d
testl %ecx, %ecx
movl $0x0, %r9d
cmovgl %ecx, %r9d
cmpq %r10, %r9
je 0x4238
leaq 0x1(%r10), %r8
movb %al, (%rdx,%r10)
movb 0x1(%rdi,%r10), %al
movq %r8, %r10
testb %al, %al
jne 0x41c4
jmp 0x41e2
xorl %r8d, %r8d
cmpb $0x0, (%rsi)
je 0x4224
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
cmpl %ecx, %r8d
jge 0x4237
movl %r8d, %edi
movb $0x2e, (%rdx,%rdi)
movb (%rsi), %r9b
incl %r8d
testb %r9b, %r9b
je 0x4224
addq %rdx, %rdi
movl $0x1, %r10d
cmpl %ecx, %r8d
jge 0x4237
movb %r9b, (%rdi,%r10)
movb (%rsi,%r10), %r9b
incl %r8d
incq %r10
testb %r9b, %r9b
jne 0x420c
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
cmpl %ecx, %r8d
jge 0x4237
movslq %r8d, %rax
movb $0x0, (%rdx,%rax)
xorl %eax, %eax
retq
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_update_attributes
int ufat_update_attributes(struct ufat *uf, struct ufat_dirent *ent)
{
	int idx = ufat_cache_open(uf, ent->dirent_block, 0);
	uint8_t *data;
	struct ufat_dirent old;

	if (idx < 0)
		return idx;

	data = ufat_cache_data(uf, idx) + ent->dirent_pos * UFAT_DIRENT_SIZE;
	ufat_parse_dirent(uf->bpb.type, data, &old);

	if (!(old.attributes & UFAT_ATTR_DIRECTORY))
		old.attributes = (old.attributes & ~UFAT_ATTR_USER) |
			(ent->attributes & UFAT_ATTR_USER);

	old.create_date = ent->create_date;
	old.create_time = ent->create_time;
	old.modify_date = ent->modify_date;
	old.modify_time = ent->modify_time;
	old.access_date = ent->access_date;

	ufat_cache_write(uf, idx);
	ufat_pack_dirent(&old, data);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
xorl %edx, %edx
callq 0x1ab8
movl %eax, %ebp
testl %eax, %eax
js 0x42fb
movq (%rbx), %rax
movb (%rax), %cl
movl %ebp, %eax
shll %cl, %eax
addq %rbx, %rax
movl 0x8(%r14), %ecx
shll $0x5, %ecx
leaq (%rcx,%rax), %r15
addq $0x180, %r15            # imm = 0x180
movl 0x28(%rbx), %edi
leaq 0x8(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x398c
movl 0x2c(%r12), %eax
testb $0x10, %al
jne 0x42ae
andl $-0x38, %eax
movl 0x2c(%r14), %ecx
andl $0x27, %ecx
orl %eax, %ecx
movl %ecx, 0x34(%rsp)
movzwl 0x30(%r14), %eax
leaq 0x8(%rsp), %rdi
movw %ax, 0x30(%rdi)
movzwl 0x32(%r14), %eax
movw %ax, 0x32(%rdi)
movzwl 0x34(%r14), %eax
movw %ax, 0x34(%rdi)
movzwl 0x36(%r14), %eax
movw %ax, 0x36(%rdi)
movzwl 0x38(%r14), %eax
movw %ax, 0x38(%rdi)
incl 0x20(%rbx)
movl %ebp, %eax
shlq $0x4, %rax
orb $0x1, 0x80(%rbx,%rax)
movq %r15, %rsi
callq 0x3a1d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_mkfs.c
// Function: init_fat12
static int init_fat12(struct ufat_device *dev, const struct fs_layout *fl)
{
	const unsigned int block_size = 1 << dev->log2_block_size;
	unsigned int minor_byte = 0;
	unsigned int cluster_pair = 0;
	ufat_block_t i;
	ufat_block_t block;

	for (i = 0, block = 0; i < fl->fat_blocks * 2; i++, block++) {
		uint8_t buf[block_size];
		unsigned int j;

		if (block == fl->fat_blocks) {
			block = 0;
			minor_byte = 0;
			cluster_pair = 0;
		}

		memset(buf, 0, block_size);

		for (j = 0; j < block_size; j++) {
			uint32_t pair_data = 0;

			if ((cluster_pair << 1) >= fl->clusters)
				pair_data = 0xff7ff7;
			else if ((cluster_pair << 1) + 1 >= fl->clusters)
				pair_data = 0xff7000;

			buf[j] = pair_data >> (minor_byte << 3);

			if (++minor_byte >= 3) {
				minor_byte = 0;
				cluster_pair++;
			}
		}

		if (block == 0) {
			buf[0] = MEDIA_DISK;
			buf[1] = 0x8f;
			buf[2] = 0xff;
		}

		if (dev->write(dev, fl->reserved_blocks + i, 1, buf) < 0)
			return -UFAT_ERR_IO;
	}

	return 0;
}

// Assembly:
movq 0x18(%rsi), %rax
shlq %rax
testq %rax, %rax
je 0x4765
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r8
movq %rdi, -0x40(%rbp)
movb (%rdi), %cl
movl $0x1, %r15d
shlq %cl, %r15
leaq 0xf(%r15), %rax
andq $-0x10, %rax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
xorl %ecx, %ecx
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r13, -0x58(%rbp)
movq %rsp, -0x50(%rbp)
movq %rsp, %r12
subq -0x38(%rbp), %r12
movq %r12, %rsp
movq 0x18(%r8), %rax
movq %rcx, -0x30(%rbp)
movq %rax, -0x48(%rbp)
cmpq %rax, %rcx
movl $0x0, %eax
cmovel %eax, %ebx
cmovel %eax, %r14d
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r8, %r13
callq 0x1110
movq %r13, %r9
movl 0x28(%r13), %eax
xorl %edx, %edx
movl %r14d, %ecx
movl %ebx, %esi
movl $0xff7ff7, %r10d        # imm = 0xFF7FF7
leal 0x1(%rcx), %r14d
cmpl $0x3, %r14d
sbbl $-0x1, %ebx
xorl %edi, %edi
cmpl $0x3, %r14d
leal 0x1(%rsi,%rsi), %r8d
cmovael %edi, %r14d
cmpl %eax, %r8d
jb 0x46d9
movl $0xff7000, %edi         # imm = 0xFF7000
addl %esi, %esi
cmpl %eax, %esi
cmovael %r10d, %edi
shll $0x3, %ecx
shrl %cl, %edi
movb %dil, (%r12,%rdx)
incq %rdx
movl %r14d, %ecx
movl %ebx, %esi
cmpq %rdx, %r15
jne 0x46b5
movq -0x30(%rbp), %rax
cmpq -0x48(%rbp), %rax
movl $0x0, %ecx
cmovneq %rax, %rcx
movq %rcx, -0x30(%rbp)
testq %rcx, %rcx
jne 0x471e
movw $0x8ff8, (%r12)         # imm = 0x8FF8
movb $-0x1, 0x2(%r12)
movq 0x8(%r9), %rsi
movq -0x58(%rbp), %r13
addq %r13, %rsi
movl $0x1, %edx
movq -0x40(%rbp), %rdi
movq %r12, %rcx
movq %r9, %r12
callq *0x10(%rdi)
testl %eax, %eax
movq -0x50(%rbp), %rsp
js 0x4768
incq %r13
movq -0x30(%rbp), %rcx
incq %rcx
movq 0x18(%r12), %rax
addq %rax, %rax
cmpq %rax, %r13
movq %r12, %r8
jb 0x4664
xorl %eax, %eax
jmp 0x476d
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_mkfs.c
// Function: init_fat16
static int init_fat16(struct ufat_device *dev, const struct fs_layout *fl)
{
	const unsigned int block_size = 1 << dev->log2_block_size;
	ufat_block_t i;
	ufat_block_t block;
	ufat_cluster_t c;

	for (i = 0, block = 0, c = 0; i < fl->fat_blocks * 2; i++, block++) {
		uint8_t buf[block_size];
		unsigned int j;

		if (block == fl->fat_blocks) {
			block = 0;
			c = 0;
		}

		memset(buf, 0, block_size);

		for (j = 0; j < block_size; j += 2) {
			if (c >= fl->clusters)
				w16(buf + j, 0xfff7);

			c++;
		}

		if (block == 0) {
			w16(buf, 0xff00 | MEDIA_DISK);
			w16(buf + 2, 0xfff8);
		}

		if (dev->write(dev, fl->reserved_blocks + i, 1, buf) < 0)
			return -UFAT_ERR_IO;
	}

	return 0;
}

// Assembly:
movq 0x18(%rsi), %rax
shlq %rax
testq %rax, %rax
je 0x487b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x40(%rbp)
movb (%rdi), %cl
movl $0x1, %r15d
shlq %cl, %r15
leaq 0xf(%r15), %rax
andq $-0x10, %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %ecx, %ecx
movq %rsi, -0x30(%rbp)
movq %r13, -0x58(%rbp)
movq %rsp, -0x50(%rbp)
movq %rsp, %r12
subq -0x38(%rbp), %r12
movq %r12, %rsp
movq 0x18(%rsi), %rbx
movq %rcx, -0x48(%rbp)
cmpq %rbx, %rcx
movl $0x0, %eax
cmovel %eax, %r14d
movq %r12, %rdi
movq %rsi, %r13
xorl %esi, %esi
movq %r15, %rdx
callq 0x1110
movq %r13, %rdx
movl 0x28(%r13), %eax
xorl %ecx, %ecx
cmpl %eax, %r14d
jb 0x480f
movw $0xfff7, (%r12,%rcx)    # imm = 0xFFF7
incl %r14d
addq $0x2, %rcx
cmpq %r15, %rcx
jb 0x4803
movq -0x48(%rbp), %rax
cmpq %rbx, %rax
movl $0x0, %ebx
cmovneq %rax, %rbx
testq %rbx, %rbx
jne 0x4838
movl $0xfff8fff8, (%r12)     # imm = 0xFFF8FFF8
movq 0x8(%rdx), %rsi
movq -0x58(%rbp), %r13
addq %r13, %rsi
movl $0x1, %edx
movq -0x40(%rbp), %rdi
movq %r12, %rcx
callq *0x10(%rdi)
testl %eax, %eax
movq -0x50(%rbp), %rsp
js 0x487e
incq %r13
incq %rbx
movq -0x30(%rbp), %rsi
movq 0x18(%rsi), %rax
addq %rax, %rax
movq %rbx, %rcx
cmpq %rax, %r13
jb 0x47c4
xorl %eax, %eax
jmp 0x4883
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/dlbeer[P]ufat/ufat_mkfs.c
// Function: init_fat32
static int init_fat32(struct ufat_device *dev, const struct fs_layout *fl)
{
	const unsigned int block_size = 1 << dev->log2_block_size;
	ufat_block_t i;
	ufat_block_t block;
	ufat_cluster_t c;

	for (i = 0, block = 0, c = 0; i < fl->fat_blocks * 2; i++, block++) {
		uint8_t buf[block_size];
		unsigned int j;

		if (block == fl->fat_blocks) {
			block = 0;
			c = 0;
		}

		memset(buf, 0, block_size);

		for (j = 0; j < block_size; j += 4) {
			if (c >= fl->clusters)
				w32(buf + j, 0xfffffff7);

			c++;
		}

		if (block == 0) {
			w32(buf + 0, 0xffffff00 | MEDIA_DISK);
			w32(buf + 4, 0xfffffff8);
			w32(buf + 8, 0xfffffff8);
		}

		if (dev->write(dev, fl->reserved_blocks + i, 1, buf) < 0)
			return -UFAT_ERR_IO;
	}

	return 0;
}

// Assembly:
movq 0x18(%rsi), %rax
shlq %rax
testq %rax, %rax
je 0x49a1
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x40(%rbp)
movb (%rdi), %cl
movl $0x1, %r15d
shlq %cl, %r15
leaq 0xf(%r15), %rax
andq $-0x10, %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %ecx, %ecx
movq %rsi, -0x30(%rbp)
movq %r13, -0x58(%rbp)
movq %rsp, -0x50(%rbp)
movq %rsp, %r12
subq -0x38(%rbp), %r12
movq %r12, %rsp
movq 0x18(%rsi), %rbx
movq %rcx, -0x48(%rbp)
cmpq %rbx, %rcx
movl $0x0, %eax
cmovel %eax, %r14d
movq %r12, %rdi
movq %rsi, %r13
xorl %esi, %esi
movq %r15, %rdx
callq 0x1110
movq %r13, %rdx
movl 0x28(%r13), %eax
xorl %ecx, %ecx
cmpl %eax, %r14d
jb 0x4926
movl $0xfffffff7, (%r12,%rcx) # imm = 0xFFFFFFF7
incl %r14d
addq $0x4, %rcx
cmpq %r15, %rcx
jb 0x4919
movq -0x48(%rbp), %rax
cmpq %rbx, %rax
movl $0x0, %ebx
cmovneq %rax, %rbx
testq %rbx, %rbx
jne 0x495e
movabsq $-0x700000008, %rax     # imm = 0xFFFFFFF8FFFFFFF8
movq %rax, (%r12)
movl $0xfffffff8, 0x8(%r12)  # imm = 0xFFFFFFF8
movq 0x8(%rdx), %rsi
movq -0x58(%rbp), %r13
addq %r13, %rsi
movl $0x1, %edx
movq -0x40(%rbp), %rdi
movq %r12, %rcx
callq *0x10(%rdi)
testl %eax, %eax
movq -0x50(%rbp), %rsp
js 0x49a4
incq %r13
incq %rbx
movq -0x30(%rbp), %rsi
movq 0x18(%rsi), %rax
addq %rax, %rax
movq %rbx, %rcx
cmpq %rax, %r13
jb 0x48da
xorl %eax, %eax
jmp 0x49a9
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq