LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: read_fat32
static int read_fat32(struct ufat *uf, ufat_cluster_t index,
		      ufat_cluster_t *out)
{
	const unsigned int shift = uf->dev->log2_block_size - 2;
	const unsigned int b = index >> shift;
	const unsigned int r = index & ((1 << shift) - 1);
	int i = ufat_cache_open(uf, uf->bpb.fat_start + b, 0);
	uint32_t raw;

	if (i < 0)
		return i;

	raw = r32(ufat_cache_data(uf, i) + r * 4) & UFAT_CLUSTER_MASK;

	if (raw >= 0xffffff8) {
		*out = UFAT_CLUSTER_EOC;
		return 0;
	}

	if (raw == 0xffffff7) {
		*out = UFAT_CLUSTER_BAD;
		return 0;
	}

	*out = raw;
	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movl (%rax), %eax
subl $0x2, %eax
movl %eax, 0x14(%rsp)
movl 0x24(%rsp), %eax
movl 0x14(%rsp), %ecx
shrl %cl, %eax
movl %eax, 0x10(%rsp)
movl 0x24(%rsp), %eax
movl 0x14(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rsi
movl 0x10(%rsp), %eax
addq %rax, %rsi
xorl %edx, %edx
callq 0x2660
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jge 0x2f6c
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x2fe8
movq 0x28(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x2900
movq %rax, %rdi
movl 0xc(%rsp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rdi
callq 0x3920
andl $0xfffffff, %eax        # imm = 0xFFFFFFF
movl %eax, 0x4(%rsp)
cmpl $0xffffff8, 0x4(%rsp)   # imm = 0xFFFFFF8
jb 0x2fb6
movq 0x18(%rsp), %rax
movl $0xffffff8, (%rax)      # imm = 0xFFFFFF8
movl $0x0, 0x34(%rsp)
jmp 0x2fe8
cmpl $0xffffff7, 0x4(%rsp)   # imm = 0xFFFFFF7
jne 0x2fd5
movq 0x18(%rsp), %rax
movl $0xffffff7, (%rax)      # imm = 0xFFFFFF7
movl $0x0, 0x34(%rsp)
jmp 0x2fe8
movl 0x4(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: ufat_write_fat
int ufat_write_fat(struct ufat *uf, ufat_cluster_t index,
		   ufat_cluster_t in)
{
	if (index >= uf->bpb.num_clusters)
		return -UFAT_ERR_INVALID_CLUSTER;

	switch (uf->bpb.type) {
	case UFAT_TYPE_FAT12: return write_fat12(uf, index, in);
	case UFAT_TYPE_FAT16: return write_fat16(uf, index, in);
	case UFAT_TYPE_FAT32: return write_fat32(uf, index, in);
	}

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x50(%rcx), %eax
jb 0x3029
movl $0xfffffffb, 0x24(%rsp) # imm = 0xFFFFFFFB
jmp 0x30a2
movq 0x18(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0xc(%rsp)
subl $0xc, %eax
je 0x3052
jmp 0x303c
movl 0xc(%rsp), %eax
subl $0x10, %eax
je 0x306a
jmp 0x3047
movl 0xc(%rsp), %eax
subl $0x20, %eax
je 0x3082
jmp 0x309a
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x30b0
movl %eax, 0x24(%rsp)
jmp 0x30a2
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x31b0
movl %eax, 0x24(%rsp)
jmp 0x30a2
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
callq 0x3280
movl %eax, 0x24(%rsp)
jmp 0x30a2
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: write_fat12
static int write_fat12(struct ufat *uf, ufat_cluster_t index,
		       ufat_cluster_t in)
{
	unsigned int offset = (index >> 1) * 3;
	int err;

	if (index & 1) {
		err = write_fat_byte(uf, offset + 1,
				     (in & 0xf) << 4, 0xf0);
		if (err < 0)
			return err;

		return write_fat_byte(uf, offset + 2,
				      (in & 0xff0) >> 4, 0xff);
	}

	err = write_fat_byte(uf, offset, in & 0xff, 0xff);
	if (err < 0)
		return err;

	return write_fat_byte(uf, offset + 1, (in & 0xf00) >> 8, 0x0f);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movl 0x14(%rsp), %eax
shrl %eax
imull $0x3, %eax, %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3140
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
addl $0x1, %esi
movl 0x10(%rsp), %eax
andl $0xf, %eax
shll $0x4, %eax
movl $0xf0, %ecx
movzbl %al, %edx
callq 0x3a80
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jge 0x3115
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x319d
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
addl $0x2, %esi
movl 0x10(%rsp), %eax
andl $0xff0, %eax            # imm = 0xFF0
shrl $0x4, %eax
movl $0xff, %ecx
movzbl %al, %edx
callq 0x3a80
movl %eax, 0x24(%rsp)
jmp 0x319d
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x10(%rsp), %eax
andl $0xff, %eax
movl $0xff, %ecx
movzbl %al, %edx
callq 0x3a80
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jge 0x3174
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x319d
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
addl $0x1, %esi
movl 0x10(%rsp), %eax
andl $0xf00, %eax            # imm = 0xF00
shrl $0x8, %eax
movl $0xf, %ecx
movzbl %al, %edx
callq 0x3a80
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: write_fat16
static int write_fat16(struct ufat *uf, ufat_cluster_t index,
		       ufat_cluster_t in)
{
	const unsigned int shift = uf->dev->log2_block_size - 1;
	const unsigned int b = index >> shift;
	const unsigned int r = index & ((1 << shift) - 1);
	int i = ufat_cache_open(uf, uf->bpb.fat_start + b, 0);

	if (i < 0)
		return i;

	ufat_cache_write(uf, i);
	w16(ufat_cache_data(uf, i) + r * 2, in & 0xffff);

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
shrl %cl, %eax
movl %eax, 0x8(%rsp)
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rsi
movl 0x8(%rsp), %eax
addq %rax, %rsi
xorl %edx, %edx
callq 0x2660
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x3228
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x3269
movq 0x18(%rsp), %rdi
movl (%rsp), %esi
callq 0x3b70
movq 0x18(%rsp), %rdi
movl (%rsp), %esi
callq 0x2900
movq %rax, %rdi
movl 0x4(%rsp), %eax
shll %eax
movl %eax, %eax
addq %rax, %rdi
movl 0x10(%rsp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movzwl %ax, %esi
callq 0x3bb0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: write_fat32
static int write_fat32(struct ufat *uf, ufat_cluster_t index,
		       ufat_cluster_t in)
{
	const unsigned int shift = uf->dev->log2_block_size - 2;
	const unsigned int b = index >> shift;
	const unsigned int r = index & ((1 << shift) - 1);
	int i = ufat_cache_open(uf, uf->bpb.fat_start + b, 0);

	if (i < 0)
		return i;

	ufat_cache_write(uf, i);
	w32(ufat_cache_data(uf, i) + r * 4, in);

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl (%rax), %eax
subl $0x2, %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
shrl %cl, %eax
movl %eax, 0x8(%rsp)
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rsi
movl 0x8(%rsp), %eax
addq %rax, %rsi
xorl %edx, %edx
callq 0x2660
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x32f8
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x3332
movq 0x18(%rsp), %rdi
movl (%rsp), %esi
callq 0x3b70
movq 0x18(%rsp), %rdi
movl (%rsp), %esi
callq 0x2900
movq %rax, %rdi
movl 0x4(%rsp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x3bf0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: ufat_free_chain
int ufat_free_chain(struct ufat *uf, ufat_cluster_t c)
{
	while (UFAT_CLUSTER_IS_PTR(c)) {
		ufat_cluster_t next;
		int i = ufat_read_fat(uf, c, &next);

		if (i < 0)
			return i;

		i = ufat_write_fat(uf, c, UFAT_CLUSTER_FREE);
		if (i < 0)
			return i;

		c = next;
	}

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
xorl %eax, %eax
cmpl $0x2, 0x14(%rsp)
movb %al, 0xb(%rsp)
jb 0x3369
cmpl $0xffffff0, 0x14(%rsp)  # imm = 0xFFFFFF0
setb %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x3373
jmp 0x33ca
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
leaq 0x10(%rsp), %rdx
callq 0x2b80
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x339b
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x33d2
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
xorl %edx, %edx
callq 0x3000
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x33c0
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x33d2
movl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x334d
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: ufat_alloc_chain
int ufat_alloc_chain(struct ufat *uf, unsigned int count, ufat_cluster_t *out)
{
	ufat_cluster_t chain = UFAT_CLUSTER_EOC;

	while (count) {
		int err = alloc_cluster(uf, &chain, chain);

		if (err < 0) {
			ufat_free_chain(uf, chain);
			return err;
		}

		count--;
	}

	*out = chain;
	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffff8, 0x4(%rsp)   # imm = 0xFFFFFF8
cmpl $0x0, 0x14(%rsp)
je 0x3441
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %edx
leaq 0x4(%rsp), %rsi
callq 0x3460
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x3434
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x3340
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x3454
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x33fa
movl 0x4(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: alloc_cluster
static int alloc_cluster(struct ufat *uf, ufat_cluster_t *out,
			 ufat_cluster_t tail)
{
	const unsigned int total = uf->bpb.num_clusters - 2;
	unsigned int i;

	for (i = 0; i < total; i++) {
		const ufat_cluster_t idx = uf->alloc_ptr + 2;
		ufat_cluster_t c;

		uf->alloc_ptr = (uf->alloc_ptr + 1) % total;

		/* Never use this cluster index in a FAT12 system */
		if (idx == 0xff0 && uf->bpb.type == UFAT_TYPE_FAT12)
			continue;

		if (!ufat_read_fat(uf, idx, &c) && c == UFAT_CLUSTER_FREE) {
			int err = ufat_write_fat(uf, idx, tail);

			if (err < 0)
				return err;

			*out = idx;
			return 0;
		}
	}

	return -UFAT_ERR_NO_CLUSTERS;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movl 0x50(%rax), %eax
subl $0x2, %eax
movl %eax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x18(%rsp), %eax
jae 0x3543
movq 0x28(%rsp), %rax
movl 0x78(%rax), %eax
addl $0x2, %eax
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movl 0x78(%rax), %eax
addl $0x1, %eax
xorl %edx, %edx
divl 0x18(%rsp)
movq 0x28(%rsp), %rax
movl %edx, 0x78(%rax)
cmpl $0xff0, 0x10(%rsp)      # imm = 0xFF0
jne 0x34d6
movq 0x28(%rsp), %rax
cmpl $0xc, 0x28(%rax)
jne 0x34d6
jmp 0x3533
movq 0x28(%rsp), %rdi
movl 0x10(%rsp), %esi
leaq 0xc(%rsp), %rdx
callq 0x2b80
cmpl $0x0, %eax
jne 0x3531
cmpl $0x0, 0xc(%rsp)
jne 0x3531
movq 0x28(%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0x1c(%rsp), %edx
callq 0x3000
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jge 0x351c
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x354b
movl 0x10(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x34(%rsp)
jmp 0x354b
jmp 0x3533
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x3489
movl $0xfffffff1, 0x34(%rsp) # imm = 0xFFFFFFF1
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: log2_exact
static int log2_exact(unsigned int e, unsigned int *ret)
{
	unsigned int count = 0;

	if (!e)
		return -1;

	while (e > 1) {
		if (e & 1)
			return -1;

		e >>= 1;
		count++;
	}

	*ret = count;
	return 0;
}

// Assembly:
movl %edi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
cmpl $0x0, -0x8(%rsp)
jne 0x3982
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x39cb
jmp 0x3984
cmpl $0x1, -0x8(%rsp)
jbe 0x39b8
movl -0x8(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x39a1
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x39cb
movl -0x8(%rsp), %eax
shrl %eax
movl %eax, -0x8(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x3984
movl -0x14(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: read_fat_byte
static int read_fat_byte(struct ufat *uf, unsigned int offset, uint8_t *out)
{
	ufat_block_t b = offset >> uf->dev->log2_block_size;
	unsigned int r = offset & ((1 << uf->dev->log2_block_size) - 1);
	int idx;

	idx = ufat_cache_open(uf, uf->bpb.fat_start + b, 0);
	if (idx < 0)
		return idx;

	*out = ufat_cache_data(uf, idx)[r];
	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx), %ecx
shrl %cl, %eax
movl %eax, %eax
movq %rax, 0x10(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rsi
addq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x2660
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jge 0x3a48
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x3a6c
movq 0x28(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x2900
movl 0xc(%rsp), %ecx
movb (%rax,%rcx), %cl
movq 0x18(%rsp), %rax
movb %cl, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat.c
// Function: write_fat_byte
static int write_fat_byte(struct ufat *uf, unsigned int offset,
			  uint8_t byte, uint8_t mask)
{
	ufat_block_t b = offset >> uf->dev->log2_block_size;
	unsigned int r = offset & ((1 << uf->dev->log2_block_size) - 1);
	int idx;
	uint8_t *data;

	idx = ufat_cache_open(uf, uf->bpb.fat_start + b, 0);
	if (idx < 0)
		return idx;

	data = ufat_cache_data(uf, idx);
	ufat_cache_write(uf, idx);

	data[r] = (data[r] & ~mask) | (byte & mask);
	return 0;
}

// Assembly:
subq $0x38, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movb %cl, 0x23(%rsp)
movb %al, 0x22(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx), %ecx
shrl %cl, %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rsi
addq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x2660
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jge 0x3aff
movl 0x10(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x3b5b
movq 0x28(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x2900
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x3b70
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movzbl 0x22(%rsp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movzbl 0x23(%rsp), %ecx
movzbl 0x22(%rsp), %edx
andl %edx, %ecx
orl %ecx, %eax
movb %al, %dl
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movb %dl, (%rax,%rcx)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_open_root
void ufat_open_root(struct ufat *uf, struct ufat_directory *dir)
{
	if (uf->bpb.root_cluster)
		dir->start = cluster_to_block(&uf->bpb, uf->bpb.root_cluster);
	else
		dir->start = uf->bpb.root_start;

	dir->uf = uf;
	dir->cur_block = dir->start;
	dir->cur_pos = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x68(%rax)
je 0x3c6d
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movq 0x10(%rsp), %rax
movl 0x68(%rax), %esi
callq 0x3cb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x3c7f
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x8(%rax)
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_open_subdir
int ufat_open_subdir(struct ufat *uf, struct ufat_directory *dir,
		     const struct ufat_dirent *ent)
{
	if (!(ent->attributes & UFAT_ATTR_DIRECTORY))
		return -UFAT_ERR_NOT_DIRECTORY;

	if (ent->dirent_block == UFAT_BLOCK_NONE || !ent->first_cluster) {
		ufat_open_root(uf, dir);
		return 0;
	}

	dir->uf = uf;
	dir->start = cluster_to_block(&uf->bpb, ent->first_cluster);
	dir->cur_block = dir->start;
	dir->cur_pos = 0;

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x2c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x3d10
movl $0xfffffff9, 0x24(%rsp) # imm = 0xFFFFFFF9
jmp 0x3d94
movq 0x8(%rsp), %rax
cmpq $-0x1, (%rax)
je 0x3d26
movq 0x8(%rsp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0x3d3f
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3c30
movl $0x0, 0x24(%rsp)
jmp 0x3d94
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rdi
addq $0x28, %rdi
movq 0x8(%rsp), %rax
movl 0x3c(%rax), %esi
callq 0x3cb0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x8(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: format_name
static int format_name(const struct ufat_lfn_parser *lfn,
		       const struct ufat_dirent *inf,
		       char *lfn_buf, int max_len)
{
	if (ufat_lfn_ok(lfn))
		return ufat_ucs2_to_utf8(lfn->buf, lfn->len,
					 lfn_buf, max_len);

	return ufat_format_short(inf->short_name,
				 inf->short_ext,
				 lfn_buf, max_len);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movq 0x18(%rsp), %rdi
callq 0x4030
cmpl $0x0, %eax
je 0x409b
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rax
movl 0x10(%rax), %esi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x7360
movl %eax, 0x24(%rsp)
jmp 0x40bf
movq 0x10(%rsp), %rdi
addq $0x1c, %rdi
movq 0x10(%rsp), %rsi
addq $0x25, %rsi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x79e0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_dir_delete
int ufat_dir_delete(struct ufat *uf, struct ufat_dirent *ent)
{
	int err;

	if (ent->dirent_block == UFAT_BLOCK_NONE || ent->short_name[0] == '.')
		return -UFAT_ERR_IMMUTABLE;

	if (ent->attributes & UFAT_ATTR_DIRECTORY) {
		err = verify_empty_dir(uf, ent);
		if (err < 0)
			return err;
	}

	err = delete_entry(uf, ent);
	if (err < 0)
		return err;

	return ufat_free_chain(uf, ent->first_cluster);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $-0x1, (%rax)
je 0x40f7
movq 0x10(%rsp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x2e, %eax
jne 0x4101
movl $0xfffffff7, 0x24(%rsp) # imm = 0xFFFFFFF7
jmp 0x4171
movq 0x10(%rsp), %rax
movl 0x2c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4137
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4180
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4135
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x4171
jmp 0x4137
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4230
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x415b
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x4171
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x3c(%rax), %esi
callq 0x3340
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: verify_empty_dir
static int verify_empty_dir(struct ufat *uf, struct ufat_dirent *ent)
{
	struct ufat_directory dir;
	int err;

	err = ufat_open_subdir(uf, &dir, ent);
	if (err < 0)
		return err;

	for (;;) {
		struct ufat_dirent e;

		err = ufat_dir_read(&dir, &e, NULL, 0);
		if (err < 0)
			return err;

		if (err)
			break;

		if (e.short_name[0] != '.')
			return -UFAT_ERR_DIRECTORY_NOT_EMPTY;
	}

	return 0;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rsi
callq 0x3ce0
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
jge 0x41bd
movl 0x4c(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x4217
jmp 0x41bf
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x3dd0
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
jge 0x41ea
movl 0x4c(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x4217
cmpl $0x0, 0x4c(%rsp)
je 0x41f3
jmp 0x420c
movsbl 0x1c(%rsp), %eax
cmpl $0x2e, %eax
je 0x420a
movl $0xfffffff6, 0x84(%rsp) # imm = 0xFFFFFFF6
jmp 0x4217
jmp 0x41bf
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: delete_entry
static int delete_entry(struct ufat *uf, struct ufat_dirent *ent)
{
	static const uint8_t del_marker = 0xe5;
	struct ufat_directory dir;

	dir.uf = uf;

	if (ent->lfn_block == UFAT_BLOCK_NONE) {
		dir.cur_block = ent->dirent_block;
		dir.cur_pos = ent->dirent_pos;
	} else {
		dir.cur_block = ent->lfn_block;
		dir.cur_pos = ent->lfn_pos;
	}

	for (;;) {
		int err;

		err = ufat_write_raw_dirent(&dir, &del_marker, 1);
		if (err < 0)
			return err;

		if (dir.cur_block == ent->dirent_block &&
		    dir.cur_pos == ent->dirent_pos)
			break;

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

	return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
cmpq $-0x1, 0x10(%rax)
jne 0x426f
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x18(%rsp)
jmp 0x4289
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0x18(%rsp)
jmp 0x428b
leaq 0x10(%rsp), %rdi
leaq 0x7eaa(%rip), %rsi      # 0xc141
movl $0x1, %edx
callq 0x5fc0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x42b6
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x4300
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x42d5
movl 0x18(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x42d5
jmp 0x42f8
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x60e0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x42f6
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x4300
jmp 0x428b
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_dir_create
int ufat_dir_create(struct ufat_directory *dir, struct ufat_dirent *ent,
		    const char *name)
{
	struct ufat_dirent check;
	int err;

	if (!ufat_lfn_is_legal(name))
		return -UFAT_ERR_ILLEGAL_NAME;

	if (!ufat_dir_find(dir, name, &check))
		return -UFAT_ERR_FILE_EXISTS;

	err = create_empty_dir(dir, &ent->first_cluster, ent);
	if (err < 0)
		return err;

	ent->file_size = 0;
	ent->attributes = (ent->attributes & UFAT_ATTR_USER) |
		UFAT_ATTR_DIRECTORY;

	err = insert_dirent(dir, ent, name);
	if (err < 0) {
		ufat_free_chain(dir->uf, ent->first_cluster);
		return err;
	}

	return 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x6ab0
cmpl $0x0, %eax
jne 0x433f
movl $0xfffffff5, 0x74(%rsp) # imm = 0xFFFFFFF5
jmp 0x43fa
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x4410
cmpl $0x0, %eax
jne 0x4365
movl $0xfffffff4, 0x74(%rsp) # imm = 0xFFFFFFF4
jmp 0x43fa
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq $0x3c, %rsi
movq 0x60(%rsp), %rdx
callq 0x44b0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4392
movl 0xc(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x43fa
movq 0x60(%rsp), %rax
movl $0x0, 0x40(%rax)
movq 0x60(%rsp), %rax
movl 0x2c(%rax), %ecx
andl $0x27, %ecx
orl $0x10, %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x2c(%rax)
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x4690
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x43f2
movq 0x68(%rsp), %rax
movq (%rax), %rdi
movq 0x60(%rsp), %rax
movl 0x3c(%rax), %esi
callq 0x3340
movl 0xc(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x43fa
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_dir_find
int ufat_dir_find(struct ufat_directory *dir,
		  const char *target, struct ufat_dirent *inf)
{
	ufat_dir_rewind(dir);

	for (;;) {
		char name[UFAT_LFN_MAX_UTF8];
		int err = ufat_dir_read(dir, inf, name, sizeof(name));

		if (err)
			return err;

		if (ufat_compare_name(target, name, 0) >= 0)
			break;
	}

	return 0;
}

// Assembly:
subq $0x338, %rsp            # imm = 0x338
movq %rdi, 0x328(%rsp)
movq %rsi, 0x320(%rsp)
movq %rdx, 0x318(%rsp)
movq 0x328(%rsp), %rdi
callq 0x3da0
movq 0x328(%rsp), %rdi
movq 0x318(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movl $0x300, %ecx            # imm = 0x300
callq 0x3dd0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x4473
movl 0xc(%rsp), %eax
movl %eax, 0x334(%rsp)
jmp 0x449b
movq 0x320(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x7050
cmpl $0x0, %eax
jl 0x448e
jmp 0x4490
jmp 0x443c
movl $0x0, 0x334(%rsp)
movl 0x334(%rsp), %eax
addq $0x338, %rsp            # imm = 0x338
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_dir_mkfile
int ufat_dir_mkfile(struct ufat_directory *dir, struct ufat_dirent *ent,
		    const char *name)
{
	struct ufat_dirent check;
	int err;

	if (!ufat_lfn_is_legal(name))
		return -UFAT_ERR_ILLEGAL_NAME;

	if (!ufat_dir_find(dir, name, &check))
		return -UFAT_ERR_FILE_EXISTS;

	ent->file_size = 0;
	ent->first_cluster = 0;
	ent->attributes &= UFAT_ATTR_USER;

	err = insert_dirent(dir, ent, name);
	if (err < 0)
		return err;

	return 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x6ab0
cmpl $0x0, %eax
jne 0x494c
movl $0xfffffff5, 0x74(%rsp) # imm = 0xFFFFFFF5
jmp 0x49c6
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x4410
cmpl $0x0, %eax
jne 0x496f
movl $0xfffffff4, 0x74(%rsp) # imm = 0xFFFFFFF4
jmp 0x49c6
movq 0x60(%rsp), %rax
movl $0x0, 0x40(%rax)
movq 0x60(%rsp), %rax
movl $0x0, 0x3c(%rax)
movq 0x60(%rsp), %rax
movl 0x2c(%rax), %ecx
andl $0x27, %ecx
movl %ecx, 0x2c(%rax)
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x4690
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x49be
movl 0xc(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x49c6
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_dir_find_path
int ufat_dir_find_path(struct ufat_directory *dir,
		       const char *path, struct ufat_dirent *ent,
		       const char **path_out)
{
	int at_root = 1;

	ufat_dir_rewind(dir);

	while (*path) {
		int len = 0;

		/* Ignore blank components */
		if (*path == '/' || *path == '\\') {
			path++;
			continue;
		}

		/* Descend if necessary */
		if (!at_root) {
			int err = ufat_open_subdir(dir->uf, dir, ent);

			if (err < 0)
				return err;
		}

		/* Search for this component */
		for (;;) {
			char name[UFAT_LFN_MAX_UTF8];
			int err = ufat_dir_read(dir, ent,
						name, sizeof(name));

			if (err < 0)
				return err;

			if (err) {
				if (path_out)
					*path_out = path;
				return 1;
			}

			len = ufat_compare_name(path, name, 1);
			if (len >= 0)
				break;
		}

		/* Skip over this component */
		path += len;
		if (*path)
			path++;
		at_root = 0;
	}

	if (at_root) {
		/* Pseudo-dirent for root directory */
		memset(ent, 0, sizeof(*ent));
		ent->dirent_block = UFAT_BLOCK_NONE;
		ent->attributes = UFAT_ATTR_DIRECTORY;
	}

	return 0;
}

// Assembly:
subq $0x348, %rsp            # imm = 0x348
movq %rdi, 0x338(%rsp)
movq %rsi, 0x330(%rsp)
movq %rdx, 0x328(%rsp)
movq %rcx, 0x320(%rsp)
movl $0x1, 0x31c(%rsp)
movq 0x338(%rsp), %rdi
callq 0x3da0
movq 0x330(%rsp), %rax
cmpb $0x0, (%rax)
je 0x4b9f
movl $0x0, 0x318(%rsp)
movq 0x330(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x4a4b
movq 0x330(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x4a61
movq 0x330(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x330(%rsp)
jmp 0x4a0f
cmpl $0x0, 0x31c(%rsp)
jne 0x4ab1
movq 0x338(%rsp), %rax
movq (%rax), %rdi
movq 0x338(%rsp), %rsi
movq 0x328(%rsp), %rdx
callq 0x3ce0
movl %eax, 0x314(%rsp)
cmpl $0x0, 0x314(%rsp)
jge 0x4aaf
movl 0x314(%rsp), %eax
movl %eax, 0x344(%rsp)
jmp 0x4be6
jmp 0x4ab1
jmp 0x4ab3
movq 0x338(%rsp), %rdi
movq 0x328(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movl $0x300, %ecx            # imm = 0x300
callq 0x3dd0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4aed
movl 0xc(%rsp), %eax
movl %eax, 0x344(%rsp)
jmp 0x4be6
cmpl $0x0, 0xc(%rsp)
je 0x4b22
cmpq $0x0, 0x320(%rsp)
je 0x4b12
movq 0x330(%rsp), %rcx
movq 0x320(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, 0x344(%rsp)
jmp 0x4be6
movq 0x330(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x7050
movl %eax, 0x318(%rsp)
cmpl $0x0, 0x318(%rsp)
jl 0x4b4c
jmp 0x4b51
jmp 0x4ab3
movl 0x318(%rsp), %ecx
movq 0x330(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x330(%rsp)
movq 0x330(%rsp), %rax
cmpb $0x0, (%rax)
je 0x4b8f
movq 0x330(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x330(%rsp)
movl $0x0, 0x31c(%rsp)
jmp 0x4a0f
cmpl $0x0, 0x31c(%rsp)
je 0x4bdb
movq 0x328(%rsp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x2100
movq 0x328(%rsp), %rax
movq $-0x1, (%rax)
movq 0x328(%rsp), %rax
movl $0x10, 0x2c(%rax)
movl $0x0, 0x344(%rsp)
movl 0x344(%rsp), %eax
addq $0x348, %rsp            # imm = 0x348
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_get_filename
int ufat_get_filename(struct ufat *uf,
		      const struct ufat_dirent *ent,
		      char *name_buf, int max_len)
{
	struct ufat_lfn_parser lfn;

	ufat_lfn_reset(&lfn);

	if (ent->lfn_block != UFAT_BLOCK_NONE) {
		struct ufat_directory dir;

		dir.uf = uf;
		dir.cur_block = ent->lfn_block;
		dir.cur_pos = ent->lfn_pos;

		while (!(dir.cur_block == ent->dirent_block &&
			 dir.cur_pos == ent->dirent_pos) &&
		       dir.cur_block != UFAT_BLOCK_NONE) {
			uint8_t data[UFAT_DIRENT_SIZE];
			int err;

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

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

			ufat_lfn_parse(&lfn, data,
				       dir.cur_block, dir.cur_pos);
		}
	}

	return format_name(&lfn, ent, name_buf, max_len);
}

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x288(%rsp)
movq %rsi, 0x280(%rsp)
movq %rdx, 0x278(%rsp)
movl %ecx, 0x274(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x4010
movq 0x280(%rsp), %rax
cmpq $-0x1, 0x10(%rax)
je 0x4d1a
movq 0x288(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x280(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x280(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq 0x280(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x4c99
movl 0x40(%rsp), %ecx
movq 0x280(%rsp), %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, 0xb(%rsp)
je 0x4ca6
cmpq $-0x1, 0x48(%rsp)
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x4cb0
jmp 0x4d18
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x6380
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4cd7
movl 0xc(%rsp), %eax
movl %eax, 0x294(%rsp)
jmp 0x4d42
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x60e0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4cfb
movl 0xc(%rsp), %eax
movl %eax, 0x294(%rsp)
jmp 0x4d42
leaq 0x10(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl 0x40(%rsp), %ecx
leaq 0x58(%rsp), %rdi
callq 0x7150
jmp 0x4c70
jmp 0x4d1a
movq 0x280(%rsp), %rsi
movq 0x278(%rsp), %rdx
movl 0x274(%rsp), %ecx
leaq 0x58(%rsp), %rdi
callq 0x4050
movl %eax, 0x294(%rsp)
movl 0x294(%rsp), %eax
addq $0x298, %rsp            # imm = 0x298
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_dir.c
// Function: ufat_move
int ufat_move(struct ufat_dirent *ent, struct ufat_directory *dst,
	      const char *new_name)
{
	struct ufat_dirent new_ent;
	int err;

	if (!ufat_lfn_is_legal(new_name))
		return -UFAT_ERR_ILLEGAL_NAME;

	if (!ufat_dir_find(dst, new_name, &new_ent))
		return -UFAT_ERR_FILE_EXISTS;

	if (ent->short_name[0] == '.' || ent->dirent_block == UFAT_BLOCK_NONE)
		return -UFAT_ERR_IMMUTABLE;

	memcpy(&new_ent, ent, sizeof(new_ent));
	err = insert_dirent(dst, &new_ent, new_name);
	if (err < 0)
		return err;

	err = delete_entry(dst->uf, ent);
	if (err < 0) {
		delete_entry(dst->uf, &new_ent);
		return err;
	}

	return 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x6ab0
cmpl $0x0, %eax
jne 0x4d8f
movl $0xfffffff5, 0x74(%rsp) # imm = 0xFFFFFFF5
jmp 0x4e56
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x4410
cmpl $0x0, %eax
jne 0x4db5
movl $0xfffffff4, 0x74(%rsp) # imm = 0xFFFFFFF4
jmp 0x4e56
movq 0x68(%rsp), %rax
movsbl 0x1c(%rax), %eax
cmpl $0x2e, %eax
je 0x4dce
movq 0x68(%rsp), %rax
cmpq $-0x1, (%rax)
jne 0x4dd8
movl $0xfffffff7, 0x74(%rsp) # imm = 0xFFFFFFF7
jmp 0x4e56
movq 0x68(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movl $0x48, %edx
callq 0x2140
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %rsi
callq 0x4690
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4e15
movl 0xc(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x4e56
movq 0x60(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %rsi
callq 0x4230
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x4e4e
movq 0x60(%rsp), %rax
movq (%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4230
movl 0xc(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x4e56
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_file.c
// Function: ufat_open_file
int ufat_open_file(struct ufat *uf, struct ufat_file *f,
		   const struct ufat_dirent *ent)
{
	if (ent->attributes & UFAT_ATTR_DIRECTORY)
		return -UFAT_ERR_NOT_FILE;

	f->uf = uf;
	f->dirent_block = ent->dirent_block;
	f->dirent_pos = ent->dirent_pos;
	f->start = ent->first_cluster;
	f->file_size = ent->file_size;
	f->prev_cluster = 0;
	f->cur_cluster = f->start;
	f->cur_pos = 0;

	return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x20(%rsp), %rax
movl 0x2c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4f29
movl $0xfffffff8, -0x4(%rsp) # imm = 0xFFFFFFF8
jmp 0x4fa7
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x20(%rsp), %rax
movq (%rax), %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rsp), %rax
movl 0x8(%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rsp), %rax
movl 0x3c(%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rsp), %rax
movl 0x40(%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x1c(%rax)
movq -0x18(%rsp), %rax
movl 0x14(%rax), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rsp), %rax
movl $0x0, 0x24(%rax)
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_file.c
// Function: advance_ptr
static int advance_ptr(struct ufat_file *f, ufat_size_t nbytes)
{
	const unsigned int log2_cluster_size =
		f->uf->dev->log2_block_size +
		f->uf->bpb.log2_blocks_per_cluster;
	ufat_size_t end_pos;
	unsigned int nclusters;
	ufat_cluster_t c = f->cur_cluster;
	ufat_cluster_t prev = f->prev_cluster;

	end_pos = f->cur_pos + nbytes;

	nclusters = (end_pos >> log2_cluster_size) -
		(f->cur_pos >> log2_cluster_size);

	while (nclusters) {
		ufat_cluster_t next;
		int i;

		i = ufat_read_fat(f->uf, c, &next);
		if (i < 0)
			return i;

		prev = c;
		c = next;
		nclusters--;
	}

	f->prev_cluster = prev;
	f->cur_cluster = c;
	f->cur_pos += nbytes;

	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movq 0x28(%rsp), %rcx
movq (%rcx), %rcx
addl 0x2c(%rcx), %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rax
movl 0x1c(%rax), %eax
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movl 0x24(%rax), %eax
addl 0x24(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl 0x20(%rsp), %ecx
shrl %cl, %eax
movq 0x28(%rsp), %rcx
movl 0x24(%rcx), %edx
movl 0x20(%rsp), %ecx
shrl %cl, %edx
movl %edx, %ecx
subl %ecx, %eax
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x50f0
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movl 0x14(%rsp), %esi
leaq 0xc(%rsp), %rdx
callq 0x2b80
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jge 0x50d3
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x511f
movl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x50a1
movl 0x10(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl 0x14(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x20(%rax)
movl 0x24(%rsp), %ecx
movq 0x28(%rsp), %rax
addl 0x24(%rax), %ecx
movl %ecx, 0x24(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_file.c
// Function: ufat_file_read
int ufat_file_read(struct ufat_file *f, void *buf, ufat_size_t size)
{
	ufat_size_t total;
	int len;

	if (size > f->file_size - f->cur_pos)
		size = f->file_size - f->cur_pos;
	total = size;

	/* Read partial block ends */
	len = read_block_fragment(f, buf, size);
	if (len < 0)
		return len;

	buf = (char*)buf + len;
	size -= len;

	/* Read contiguous blocks within a cluster */
	for (;;) {
		len = read_blocks(f, buf, size);

		if (len < 0)
			return len;

		if (!len)
			break;

		buf = (char*)buf + len;
		size -= len;
	}

	/* Read remaining block fragment */
	len = read_block_fragment(f, buf, size);
	if (len < 0)
		return len;

	return total;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x18(%rsp), %rcx
movl 0x18(%rcx), %ecx
movq 0x18(%rsp), %rdx
subl 0x24(%rdx), %ecx
cmpl %ecx, %eax
jbe 0x516e
movq 0x18(%rsp), %rax
movl 0x18(%rax), %eax
movq 0x18(%rsp), %rcx
subl 0x24(%rcx), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x5250
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jge 0x51a1
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x5244
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movl 0x4(%rsp), %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x53f0
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jge 0x51e9
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x5244
cmpl $0x0, 0x4(%rsp)
jne 0x51f2
jmp 0x5214
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movl 0x4(%rsp), %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
jmp 0x51c1
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x5250
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jge 0x523c
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x5244
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]ufat/ufat_file.c
// Function: read_block_fragment
static int read_block_fragment(struct ufat_file *f, 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;
	const ufat_block_t cur_block =
		cluster_to_block(bpb, f->cur_cluster) +
		((f->cur_pos >> log2_block_size) &
		 ((1 << bpb->log2_blocks_per_cluster) - 1));
	int i;

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

	if (!UFAT_CLUSTER_IS_PTR(f->cur_cluster))
		return -UFAT_ERR_INVALID_CLUSTER;

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

	memcpy(buf, ufat_cache_data(f->uf, i) + offset, size);
	i = advance_ptr(f, size);
	if (i < 0)
		return i;

	return size;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
addq $0x28, %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movl 0x24(%rax), %eax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x28(%rsp), %eax
subl 0x24(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rax
movl 0x20(%rax), %esi
callq 0x5dc0
movq 0x48(%rsp), %rcx
movl 0x24(%rcx), %edx
movl 0x2c(%rsp), %ecx
shrl %cl, %edx
movl %edx, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl 0x10(%rsp), %ecx
subl $0x1, %edx
andl %edx, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x20(%rsp), %eax
jbe 0x530c
movl 0x20(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x28(%rsp), %eax
subl $0x1, %eax
andl 0x3c(%rsp), %eax
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
jne 0x532f
movl $0x0, 0x54(%rsp)
jmp 0x53de
movq 0x48(%rsp), %rax
cmpl $0x2, 0x20(%rax)
jb 0x5348
movq 0x48(%rsp), %rax
cmpl $0xffffff0, 0x20(%rax)  # imm = 0xFFFFFF0
jb 0x5355
movl $0xfffffffb, 0x54(%rsp) # imm = 0xFFFFFFFB
jmp 0x53de
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x2660
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0x537e
movl 0x14(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x53de
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movl 0x14(%rsp), %esi
callq 0x5df0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl 0x24(%rsp), %eax
addq %rax, %rsi
movl 0x3c(%rsp), %eax
movl %eax, %edx
callq 0x2140
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x5030
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0x53d6
movl 0x14(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x53de
movl 0x3c(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
movl 0x24(%rax), %eax
xorl $-0x1, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jbe 0x55e3
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x56f0
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x5613
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x56e6
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movl (%rsp), %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x5890
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x5659
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x56e6
cmpl $0x0, (%rsp)
jne 0x5661
jmp 0x5681
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movl (%rsp), %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
jmp 0x5631
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0x56f0
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x56a6
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x56e6
movq 0x18(%rsp), %rax
movl 0x24(%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jbe 0x56de
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x24(%rax), %esi
callq 0x5a30
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x56dc
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x56e6
jmp 0x56de
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop