LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/ufat_ent.c
// Function: sn_copy
static void sn_copy(const uint8_t *src, char *dst, int len)
{
	int i;

	for (i = 0; i < len && src[i] > ' '; i++)
		dst[i] = src[i];

	dst[i] = 0;
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
cmpq %rax, %rdx
je 0x325a
movb (%rdi,%rax), %cl
cmpb $0x21, %cl
jb 0x3257
movb %cl, (%rsi,%rax)
incq %rax
jmp 0x3242
movq %rax, %rdx
movb $0x0, (%rsi,%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3351
cmpl $0x2e, %eax
jne 0x3336
movzbl 0x1(%rdi), %eax
testl %eax, %eax
je 0x3351
cmpl $0x2e, %eax
jne 0x3336
cmpb $0x0, 0x2(%rdi)
je 0x3356
xorl %eax, %eax
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0x3352
cmpl $0x2f, %ecx
je 0x3351
cmpl $0x5c, %ecx
je 0x3351
incq %rdi
cmpb $0x20, %cl
jge 0x3338
retq
pushq $0x1
popq %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10d0
cmpl $-0x1, %eax
pushq $-0x1
popq %rcx
cmovll %eax, %ecx
movl %eax, %edx
movq %rbx, 0x10(%rsp)
testl %edx, %edx
js 0x339a
movl %edx, %esi
cmpb $0x2e, (%r14,%rsi)
je 0x3398
decl %edx
jmp 0x3387
movl %edx, %ecx
leal 0x1(%rcx), %edx
testl %ecx, %ecx
cmovgl %edx, %eax
movslq %eax, %r13
leaq (%r14,%r13), %rbp
xorl %r15d, %r15d
movslq %r15d, %rbx
cmpl $0x2, %r15d
jg 0x33e8
movsbq (%rbp), %r12
testq %r12, %r12
je 0x33e8
movl %r12d, %edi
callq 0x3466
testl %eax, %eax
je 0x33e3
callq 0x1030
movq (%rax), %rax
movb (%rax,%r12,4), %al
leal 0x1(%rbx), %r15d
movq 0x8(%rsp), %rcx
movb %al, (%rcx,%rbx)
incq %rbp
jmp 0x33ac
movq 0x8(%rsp), %rax
movb $0x0, (%rax,%rbx)
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq %r12d, %rbx
cmpl $0x7, %r12d
jg 0x3435
cmpq %r13, %r15
jge 0x3435
movsbl (%r14,%r15), %ebp
movl %ebp, %edi
callq 0x3466
testl %eax, %eax
je 0x3430
movslq %ebp, %r12
callq 0x1030
movq (%rax), %rax
movb (%rax,%r12,4), %al
leal 0x1(%rbx), %r12d
movq 0x10(%rsp), %rcx
movb %al, (%rcx,%rbx)
incq %r15
jmp 0x33f7
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rbx)
testl %ebx, %ebx
jne 0x3457
xorl %eax, %eax
cmpq $0x8, %rax
je 0x3453
movb $0x7e, (%rcx,%rax)
incq %rax
jmp 0x3444
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_O2/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
pushq $0x1
popq %rax
cmpb $0x9, %dl
jb 0x34b2
movq (%rcx), %rcx
movslq %ebx, %rdx
movzwl (%rcx,%rdx,2), %ecx
andl $0x8, %ecx
jne 0x34b2
movsbl %bl, %ecx
cmpl $0x2d, %ecx
je 0x34b2
cmpl $0x40, %ecx
je 0x34b2
leal -0x5e(%rbx), %edx
cmpb $0x3, %dl
jb 0x34b2
cmpl $0x7b, %ecx
je 0x34b2
cmpl $0x7d, %ecx
je 0x34b2
xorl %eax, %eax
cmpb $0x7e, %bl
sete %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpl $-0x1, %eax
pushq $-0x1
popq %rcx
cmovll %eax, %ecx
movl %eax, %edx
testl %edx, %edx
js 0x34dd
movl %edx, %esi
cmpb $0x7e, (%rbx,%rsi)
je 0x34db
decl %edx
jmp 0x34cb
movl %edx, %ecx
leal 0x1(%rcx), %edx
testl %ecx, %ecx
cmovsl %eax, %edx
movslq %edx, %r14
leaq (%rbx,%r14), %rdi
callq 0x11c0
incl %eax
movb $0x0, 0x8(%rbx)
pushq $0x6
popq %rcx
pushq $0xa
popq %rsi
leaq 0x1(%rcx), %rdi
testl %eax, %eax
je 0x351a
testl %edi, %edi
js 0x351a
xorl %edx, %edx
divl %esi
orb $0x30, %dl
movl %edi, %edi
movb %dl, (%rbx,%rdi)
decq %rcx
jmp 0x34fd
testl %edi, %edi
js 0x3526
movl %edi, %eax
movb $0x7e, (%rbx,%rax)
jmp 0x3532
pushq $-0x1
popq %rcx
jmp 0x3532
movb $0x7e, (%rbx,%rcx)
decq %rcx
cmpq %r14, %rcx
jge 0x352b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1ec3
leaq 0x25(%rsp), %r12
leaq 0x1c(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1ed0
testl %eax, %eax
js 0x35a6
jne 0x35a4
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x35b5
testl %eax, %eax
js 0x3568
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x35b5
testl %eax, %eax
js 0x3568
pushq $0x1
popq %rax
jmp 0x35a6
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x1
popq %rax
movsbl (%rdi,%rcx), %r9d
testl %r9d, %r9d
je 0x360b
movsbl (%rsi,%rcx), %r8d
testl %edx, %edx
je 0x35dd
cmpb $0x2f, %r9b
je 0x360b
movzbl %r9b, %r10d
cmpl $0x5c, %r10d
je 0x360b
testb %r8b, %r8b
je 0x360a
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 0x35ba
retq
movl %ecx, %edx
xorl %eax, %eax
cmpb (%rsi,%rdx), %al
sbbl %eax, %eax
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movzbl (%rsi), %r8d
movl %r8d, %r9d
andl $0x3f, %r9d
imull $0xd, %r9d, %r10d
movl $0x10c, %r11d           # imm = 0x10C
subl %r10d, %r11d
cmpl $0x14, %r9d
movl $0xd, %eax
cmovael %r11d, %eax
testb $0x40, %r8b
jne 0x3658
cmpl %r8d, 0x14(%rdi)
jne 0x3653
movb 0xc(%rdi), %cl
movl %r8d, %r9d
cmpb 0xd(%rsi), %cl
je 0x3673
orl $-0x1, 0x14(%rdi)
retq
addl $-0xd, %r10d
movq %rdx, (%rdi)
movl %ecx, 0x8(%rdi)
movl %r9d, 0x14(%rdi)
addl %eax, %r10d
movl %r10d, 0x10(%rdi)
movb 0xd(%rsi), %cl
movb %cl, 0xc(%rdi)
decl %r9d
movl %r9d, 0x14(%rdi)
xorl %ecx, %ecx
cmpq $0x5, %rcx
je 0x3691
movzwl 0x1(%rsi,%rcx,2), %edx
movw %dx, -0x28(%rsp,%rcx,2)
incq %rcx
jmp 0x367c
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x36a8
movzwl 0xe(%rsi,%rcx,2), %edx
movw %dx, -0x1e(%rsp,%rcx,2)
incq %rcx
jmp 0x3693
movzwl 0x1c(%rsi), %ecx
movw %cx, -0x12(%rsp)
movzwl 0x1e(%rsi), %edx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movw %dx, -0x10(%rsp)
andl $0x3f, %r8d
imulq $0x1a, %r8, %rdx
addq %rdi, %rdx
addq $-0x2, %rdx
cmpq %rcx, %rax
je 0x3657
movzwl -0x28(%rsp,%rcx,2), %esi
movw %si, (%rdx,%rcx,2)
incq %rcx
jmp 0x36d0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
xorl %r8d, %r8d
testl %esi, %esi
cmovlel %r8d, %esi
movl $0xfffffff3, %eax       # imm = 0xFFFFFFF3
xorl %r9d, %r9d
movslq %r9d, %r10
cmpq %r8, %rsi
je 0x3795
movzwl (%rdi,%r8,2), %r11d
testw %r11w, %r11w
je 0x3795
cmpw $0x800, %r11w           # imm = 0x800
jb 0x3754
addl $0x3, %r9d
cmpl %ecx, %r9d
jge 0x37a8
movzwl %r11w, %ebx
movl %ebx, %ebp
shrl $0xc, %ebp
orb $-0x20, %bpl
movb %bpl, (%rdx,%r10)
shrl $0x6, %ebx
andb $0x3f, %bl
orb $-0x80, %bl
movb %bl, 0x1(%rdx,%r10)
andb $0x3f, %r11b
orb $-0x80, %r11b
movb %r11b, 0x2(%rdx,%r10)
jmp 0x378d
cmpw $0x80, %r11w
jb 0x3781
addl $0x2, %r9d
cmpl %ecx, %r9d
jge 0x37a8
movl %r11d, %ebx
shrl $0x6, %ebx
orb $-0x40, %bl
movb %bl, (%rdx,%r10)
andb $0x3f, %r11b
orb $-0x80, %r11b
movb %r11b, 0x1(%rdx,%r10)
jmp 0x378d
incl %r9d
cmpl %ecx, %r9d
jge 0x37a8
movb %r11b, (%rdx,%r10)
incq %r8
jmp 0x36f6
cmpl %ecx, %r9d
jge 0x37a3
movb $0x0, (%rdx,%r10)
xorl %eax, %eax
jmp 0x37a8
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %ecx, %ecx
xorl %eax, %eax
movb (%rdi,%rcx), %dl
testb %dl, %dl
je 0x37c5
rorb %al
addb %dl, %al
incq %rcx
jmp 0x37af
rorb %al
addb $0x20, %al
incl %ecx
cmpl $0x8, %ecx
jb 0x37bf
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
testb %dl, %dl
je 0x37e2
rorb %al
addb %dl, %al
incq %rcx
jmp 0x37cc
rorb %al
addb $0x20, %al
incl %ecx
cmpl $0x2, %ecx
jbe 0x37dc
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
xorl %ecx, %ecx
movl $0xfffffff5, %eax       # imm = 0xFFFFFFF5
movl $0xfffffff3, %edx       # imm = 0xFFFFFFF3
movabsq $0x3, %r8
movabsq $0x2, %r9
movabsq $0x1, %r10
movsbl (%rdi), %r11d
testl %r11d, %r11d
je 0x38bf
cmpq $0xfe, %rcx
ja 0x38bf
movl %r11d, %ebx
notl %ebx
testb $-0x10, %bl
je 0x38e6
testb $-0x20, %bl
jne 0x387f
movzbl 0x2(%rdi), %ebx
movl %ebx, %ebp
notl %ebp
testb $-0x40, %bpl
jne 0x38cb
movsbl 0x1(%rdi), %ebp
movl %ebp, %r14d
andl $0xc0, %r14d
cmpl $0xc0, %r14d
jne 0x38cb
shll $0xc, %r11d
andl $0x3f, %ebp
shll $0x6, %ebp
orl %r11d, %ebp
andl $0x3f, %ebx
orl %ebp, %ebx
movq %r8, %r11
jmp 0x38b0
testb $-0x40, %bl
jne 0x38a5
movzbl 0x1(%rdi), %ebx
movl %ebx, %ebp
notl %ebp
testb $-0x40, %bpl
jne 0x38cb
andl $0x1f, %r11d
shll $0x6, %r11d
andl $0x3f, %ebx
orl %r11d, %ebx
movq %r9, %r11
jmp 0x38b0
testb %r11b, %r11b
js 0x38cb
movl %r11d, %ebx
movq %r10, %r11
movw %bx, (%rsi,%rcx,2)
addq %r11, %rdi
incq %rcx
jmp 0x3816
testb %r11b, %r11b
je 0x38cf
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
jmp 0x38e6
movl %edx, %eax
jmp 0x38e6
movq %rcx, %rax
cmpq $0xff, %rax
je 0x38e4
andw $0x0, (%rsi,%rax,2)
incq %rax
jmp 0x38d2
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/ufat_ent.c
// Function: ufat_lfn_pack_fragment
void ufat_lfn_pack_fragment(const uint16_t *ucs, int seq, int is_first,
			    uint8_t *data, uint8_t checksum)
{
	int i;

	data[0] = seq;
	if (is_first)
		data[0] |= 0x40;

	for (i = 0; i < 5; i++)
		w16(data + 0x01 + i * 2, ucs[i]);

	data[0x0b] = UFAT_ATTR_LFN_FRAGMENT;
	data[0x0c] = 0;
	data[0x0d] = checksum;

	for (i = 0; i < 6; i++)
		w16(data + 0x0e + i * 2, ucs[i + 5]);

	data[0x1a] = 0;
	data[0x1b] = 0;

	w16(data + 0x1c, ucs[11]);
	w16(data + 0x1e, ucs[12]);
}

// Assembly:
movl %esi, %eax
orb $0x40, %al
testl %edx, %edx
movzbl %al, %eax
cmovel %esi, %eax
movb %al, (%rcx)
xorl %eax, %eax
cmpq $0x5, %rax
je 0x390f
movzwl (%rdi,%rax,2), %edx
movw %dx, 0x1(%rcx,%rax,2)
incq %rax
jmp 0x38fb
movw $0xf, 0xb(%rcx)
movb %r8b, 0xd(%rcx)
xorl %eax, %eax
cmpq $0x6, %rax
je 0x3930
movzwl 0xa(%rdi,%rax,2), %edx
movw %dx, 0xe(%rcx,%rax,2)
incq %rax
jmp 0x391b
andw $0x0, 0x1a(%rcx)
movzwl 0x16(%rdi), %eax
movw %ax, 0x1c(%rcx)
movzwl 0x18(%rdi), %eax
movw %ax, 0x1e(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %r8d, %r8d
testl %ecx, %ecx
movl $0x0, %r9d
cmovgl %ecx, %r9d
pushq $-0x6
popq %rax
movb (%rdi,%r8), %r10b
testb %r10b, %r10b
je 0x396f
cmpq %r8, %r9
je 0x39a0
movb %r10b, (%rdx,%r8)
incq %r8
jmp 0x3958
cmpb $0x0, (%rsi)
je 0x39a1
cmpl %ecx, %r8d
jge 0x39a0
leaq (%rdx,%r8), %rdi
incq %r8
movb $0x2e, %r9b
movb %r9b, (%rdi)
movb (%rsi), %r9b
testb %r9b, %r9b
je 0x39a1
incq %rsi
incq %rdi
leal 0x1(%r8), %r10d
cmpl %ecx, %r8d
movl %r10d, %r8d
jl 0x3983
retq
cmpl %ecx, %r8d
jge 0x39a0
movslq %r8d, %rax
movb $0x0, (%rdx,%rax)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1492
movl %eax, %ebp
testl %eax, %eax
js 0x3a6d
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 0x31b5
movl 0x2c(%r12), %eax
testb $0x10, %al
jne 0x3a20
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 0x325f
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r8
movq %rdi, -0x48(%rbp)
movb (%rdi), %cl
pushq $0x1
popq %r13
shlq %cl, %r13
xorl %eax, %eax
leaq 0xf(%r13), %rcx
andq $-0x10, %rcx
movq %rcx, -0x40(%rbp)
movl $0xff7ff7, %r15d        # imm = 0xFF7FF7
xorl %ebx, %ebx
xorl %edx, %edx
xorl %esi, %esi
xorl %r12d, %r12d
movq %r8, -0x30(%rbp)
movq 0x18(%r8), %rcx
addq %rcx, %rcx
cmpq %rcx, %rdx
jae 0x3e7b
movq %rdx, -0x38(%rbp)
movq %rsp, -0x60(%rbp)
movq %rsp, %r14
subq -0x40(%rbp), %r14
movq %r14, %rsp
movq 0x18(%r8), %rcx
movq %rsi, -0x58(%rbp)
movq %rcx, -0x50(%rbp)
cmpq %rcx, %rsi
cmovel %eax, %ebx
cmovel %eax, %r12d
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x1110
movq -0x30(%rbp), %r9
movl 0x28(%r9), %eax
xorl %edx, %edx
cmpq %rdx, %r13
je 0x3e1b
leal 0x1(%r12), %esi
cmpl $0x3, %esi
movl %ebx, %edi
sbbl $-0x1, %edi
xorl %r8d, %r8d
cmpl $0x3, %esi
leal 0x1(%rbx,%rbx), %ecx
cmovael %r8d, %esi
cmpl %eax, %ecx
jb 0x3dfb
movl $0xff7000, %r8d         # imm = 0xFF7000
addl %ebx, %ebx
cmpl %eax, %ebx
cmovael %r15d, %r8d
shll $0x3, %r12d
movl %r12d, %ecx
shrl %cl, %r8d
movb %r8b, (%r14,%rdx)
incq %rdx
movl %edi, %ebx
movl %esi, %r12d
jmp 0x3dd1
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
movl $0x0, %r15d
cmovneq %rax, %r15
testq %r15, %r15
jne 0x3e3d
movw $0x8ff8, (%r14)         # imm = 0x8FF8
movb $-0x1, 0x2(%r14)
movq 0x8(%r9), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq *0x10(%rdi)
testl %eax, %eax
movq -0x60(%rbp), %rsp
js 0x3e78
movq -0x38(%rbp), %rdx
incq %rdx
incq %r15
movq %r15, %rsi
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl $0xff7ff7, %r15d        # imm = 0xFF7FF7
jmp 0x3d82
pushq $-0x1
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x48(%rbp)
movb (%rdi), %cl
pushq $0x1
popq %r12
shlq %cl, %r12
leal 0x1(%r12), %eax
shrl %eax
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
leaq 0xf(%r12), %rcx
andq $-0x10, %rcx
movq %rcx, -0x40(%rbp)
xorl %ebx, %ebx
xorl %edx, %edx
xorl %r13d, %r13d
movq %rsi, -0x38(%rbp)
movq 0x18(%rsi), %rcx
addq %rcx, %rcx
cmpq %rcx, %r13
jae 0x3f86
movq %r13, -0x58(%rbp)
movq %rsp, -0x50(%rbp)
movq %rsp, %r15
subq -0x40(%rbp), %r15
movq %r15, %rsp
movq 0x18(%rsi), %r14
cmpq %r14, %rbx
cmovel %eax, %edx
movq %r15, %rdi
xorl %esi, %esi
movl %edx, %r13d
movq %r12, %rdx
callq 0x1110
movq -0x38(%rbp), %rsi
movl 0x28(%rsi), %eax
xorl %ecx, %ecx
movl %r13d, -0x30(%rbp)
movl %r13d, %edx
cmpq %r12, %rcx
jae 0x3f30
cmpl %eax, %edx
jb 0x3f28
movw $0xfff7, (%r15,%rcx)    # imm = 0xFFF7
incl %edx
addq $0x2, %rcx
jmp 0x3f18
cmpq %r14, %rbx
movl $0x0, %r14d
cmovneq %rbx, %r14
testq %r14, %r14
jne 0x3f49
movl $0xfff8fff8, (%r15)     # imm = 0xFFF8FFF8
movq 0x8(%rsi), %rsi
movq -0x58(%rbp), %r13
addq %r13, %rsi
movq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq *0x10(%rdi)
testl %eax, %eax
movq -0x50(%rbp), %rsp
js 0x3f83
movl -0x30(%rbp), %edx
addl -0x2c(%rbp), %edx
incq %r13
incq %r14
movq %r14, %rbx
movq -0x38(%rbp), %rsi
xorl %eax, %eax
jmp 0x3ecc
pushq $-0x1
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x48(%rbp)
movb (%rdi), %cl
pushq $0x1
popq %r15
shlq %cl, %r15
leal 0x3(%r15), %eax
shrl $0x2, %eax
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
leaq 0xf(%r15), %rcx
andq $-0x10, %rcx
movq %rcx, -0x40(%rbp)
xorl %r13d, %r13d
xorl %edx, %edx
xorl %r12d, %r12d
movq %rsi, -0x38(%rbp)
movq 0x18(%rsi), %rcx
addq %rcx, %rcx
cmpq %rcx, %r12
jae 0x409f
movq %r12, -0x58(%rbp)
movq %rsp, -0x50(%rbp)
movq %rsp, %r14
subq -0x40(%rbp), %r14
movq %r14, %rsp
movq 0x18(%rsi), %rbx
cmpq %rbx, %r13
cmovel %eax, %edx
movq %r14, %rdi
xorl %esi, %esi
movl %edx, %r12d
movq %r15, %rdx
callq 0x1110
movq -0x38(%rbp), %rsi
movl 0x28(%rsi), %eax
xorl %ecx, %ecx
movl %r12d, -0x30(%rbp)
movl %r12d, %edx
cmpq %r15, %rcx
jae 0x403c
cmpl %eax, %edx
jb 0x4034
movl $0xfffffff7, (%r14,%rcx) # imm = 0xFFFFFFF7
incl %edx
addq $0x4, %rcx
jmp 0x4023
cmpq %rbx, %r13
movl $0x0, %ebx
cmovneq %r13, %rbx
testq %rbx, %rbx
jne 0x4062
movabsq $-0x700000008, %rax     # imm = 0xFFFFFFF8FFFFFFF8
movq %rax, (%r14)
movl $0xfffffff8, 0x8(%r14)  # imm = 0xFFFFFFF8
movq 0x8(%rsi), %rsi
movq -0x58(%rbp), %r12
addq %r12, %rsi
movq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq *0x10(%rdi)
testl %eax, %eax
movq -0x50(%rbp), %rsp
js 0x409c
movl -0x30(%rbp), %edx
addl -0x2c(%rbp), %edx
incq %r12
incq %rbx
movq %rbx, %r13
xorl %eax, %eax
movq -0x38(%rbp), %rsi
jmp 0x3fd7
pushq $-0x1
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/ufat_mkfs.c
// Function: write_fsinfo
static int write_fsinfo(struct ufat_device *dev, const struct fs_layout *fl)
{
	const unsigned int log2_bps =
		fl->log2_sector_size - dev->log2_block_size;
	const unsigned int block_size = 1 << dev->log2_block_size;
	uint8_t buf[block_size];

	memset(buf, 0, sizeof(buf));
	w32(buf + 0x000, 0x41615252); /* FSI_LeadSig */
	w32(buf + 0x1e4, 0x61417272); /* FSI_StrucSig */
	w32(buf + 0x1e8, fl->clusters - 3); /* FSI_Free_Count */
	w32(buf + 0x1ec, 2); /* FSI_Nxt_Free */
	w32(buf + 0x1fc, 0xaa550000); /* FSI_TrailSig */

	/* Write FSInfo and its backup */
	const ufat_block_t fsinfo_block = FSINFO_SECTOR >> log2_bps;
	const ufat_block_t fsinfo_backup_block =
		(FSINFO_SECTOR + BACKUP_SECTOR) >> log2_bps;
	if (dev->write(dev, fsinfo_block, 1, buf) < 0 ||
	    dev->write(dev, fsinfo_backup_block, 1, buf) < 0)
		return -UFAT_ERR_IO;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %r14
movl (%rdi), %ecx
pushq $0x1
popq %rdx
shlq %cl, %rdx
movl (%rsi), %r15d
subl %ecx, %r15d
leaq 0xf(%rdx), %r12
andq $-0x10, %r12
movq %rsp, %rbx
movq %rbx, -0x30(%rbp)
subq %r12, %rbx
movq %rbx, %rsp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1110
movl $0x41615252, (%rbx)     # imm = 0x41615252
movl $0x61417272, 0x1e4(%rbx) # imm = 0x61417272
movl 0x28(%r13), %eax
addl $-0x3, %eax
movb %al, 0x1e8(%rbx)
movq %r12, %rcx
negq %rcx
movq -0x30(%rbp), %rdx
movb %ah, 0x1e9(%rdx,%rcx)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x1ea(%rbx)
shrl $0x18, %eax
movb %al, 0x1eb(%rbx)
movl $0x2, 0x1ec(%rbx)
movl $0xaa550000, 0x1fc(%rbx) # imm = 0xAA550000
pushq $0x1
popq %rsi
movl %r15d, %ecx
shrl %cl, %esi
movq %r14, %rdi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq *0x10(%r14)
testl %eax, %eax
js 0x4178
pushq $0x7
popq %rsi
movl %r15d, %ecx
shrl %cl, %esi
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq *0x10(%r14)
sarl $0x1f, %eax
jmp 0x417b
pushq $-0x1
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/ufat_mkfs.c
// Function: erase_blocks
static int erase_blocks(struct ufat_device *dev, ufat_block_t start,
			ufat_block_t count)
{
	const unsigned int block_size = 1 << dev->log2_block_size;
	uint8_t buf[block_size];

	memset(buf, 0, sizeof(buf));
	for (ufat_block_t i = 0; i < count; i++)
		if (dev->write(dev, start + i, 1, buf) < 0)
			return -UFAT_ERR_IO;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %cl
pushq $0x1
popq %rax
shlq %cl, %rax
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
leaq 0xf(%rax), %rcx
andq $-0x10, %rcx
movq %rsp, %r13
subq %rcx, %r13
movq %r13, %rsp
xorl %r12d, %r12d
movq %r13, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x1110
movq %r12, %r14
cmpq %r12, %r15
je 0x4419
movq -0x30(%rbp), %rax
leaq (%rax,%r14), %rsi
movq %rbx, %rdi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq *0x10(%rbx)
leaq 0x1(%r14), %r12
testl %eax, %eax
jns 0x43f5
xorl %eax, %eax
cmpq %r15, %r14
sbbl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: open_output
static FILE *open_output(const char *fname)
{
	FILE *out;

	if (!fname)
		return stdout;

	out = fopen(fname, "wb");
	if (!out) {
		fprintf(stderr, "Failed to open %s for writing: %s\n",
			fname, strerror(errno));
		return NULL;
	}

	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4ad5
movq %rdi, %rbx
leaq 0x2371(%rip), %rsi      # 0x6e07
callq 0x11a0
movq %rax, %r14
testq %rax, %rax
jne 0x4adf
movq 0x554e(%rip), %rax      # 0x9ff8
movq (%rax), %r15
callq 0x1060
movl (%rax), %edi
callq 0x11f0
leaq 0x234a(%rip), %rsi      # 0x6e0a
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1140
jmp 0x4adf
movq 0x54e4(%rip), %rax      # 0x9fc0
movq (%rax), %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: close_output
static int close_output(const char *fname, FILE *f)
{
	if (fname && fclose(f) < 0) {
		fprintf(stderr, "Error on closing %s: %s\n",
			fname, strerror(errno));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x4b02
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x10c0
testl %eax, %eax
js 0x4b09
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x54e8(%rip), %rax      # 0x9ff8
movq (%rax), %r14
callq 0x1060
movl (%rax), %edi
callq 0x11f0
leaq 0x2454(%rip), %rsi      # 0x6f7a
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1140
pushq $-0x1
popq %rbp
jmp 0x4b02
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: cmd_dir
static int cmd_dir(struct ufat *uf, const struct options *opt)
{
	struct ufat_directory dir;
	FILE *out;

	if (opt->argc) {
		struct ufat_dirent ent;
		int err;

		if (require_file(uf, opt->argv[0], &ent) < 0)
			return -1;

		err = ufat_open_subdir(uf, &dir, &ent);
		if (err < 0) {
			fprintf(stderr, "ufat_open_subdir: %s\n",
				ufat_strerror(err));
			return -1;
		}
	} else {
		ufat_open_root(uf, &dir);
	}

	out = open_output(opt->out_file);
	if (!out)
		return -1;

	if (list_dir(out, &dir) < 0) {
		close_output(opt->out_file, out);
		return -1;
	}

	return close_output(opt->out_file, out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x40(%rsi)
je 0x4bd1
movq 0x38(%r15), %rax
movq (%rax), %rsi
leaq 0x70(%rsp), %rdx
movq %rbx, %rdi
callq 0x5ab1
testl %eax, %eax
js 0x4d03
leaq 0x8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
movq %rbx, %rdi
callq 0x1e81
testl %eax, %eax
jns 0x4bde
movq 0x544a(%rip), %rcx      # 0x9ff8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x1a87
leaq 0x1d3d(%rip), %rsi      # 0x68fc
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x4d03
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e58
movq 0x20(%r15), %rdi
callq 0x4a82
movq %rax, %r14
pushq $-0x1
popq %rax
testq %r14, %r14
je 0x4d06
movq %r15, (%rsp)
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
leaq 0x70(%rsp), %r13
pushq $0x20
popq %rbp
leaq 0x1dd7(%rip), %rbx      # 0x69ea
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x300, %ecx            # imm = 0x300
callq 0x1ed0
testl %eax, %eax
js 0x4cce
jne 0x4cbc
movzwl 0x5c(%rsp), %esi
movq %r14, %rdi
callq 0x5b6b
movl %ebp, %edi
movq %r14, %rsi
callq 0x1120
movzwl 0x5e(%rsp), %esi
movq %r14, %rdi
callq 0x5b93
movl %ebp, %edi
movq %r14, %rsi
callq 0x1120
movl 0x54(%rsp), %esi
andl $-0x11, %esi
movq %r14, %rdi
callq 0x5bb6
testb $0x10, 0x54(%rsp)
jne 0x4c8f
movl 0x68(%rsp), %edx
movq %r14, %rdi
leaq 0x1ceb(%rip), %rsi      # 0x6971
xorl %eax, %eax
callq 0x1140
jmp 0x4ca7
movq %r14, %rdi
leaq 0x1ccd(%rip), %rsi      # 0x6966
leaq 0x1ccb(%rip), %rdx      # 0x696b
xorl %eax, %eax
callq 0x1140
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x4c13
movq (%rsp), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x4ae8
jmp 0x4d06
movq 0x5323(%rip), %rcx      # 0x9ff8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x1a87
leaq 0x1c63(%rip), %rsi      # 0x6949
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
movq (%rsp), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x4ae8
pushq $-0x1
popq %rax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: cmd_read
static int cmd_read(struct ufat *uf, const struct options *opt)
{
	FILE *out;
	struct ufat_dirent ent;
	struct ufat_file file;
	int err;

	if (!opt->argc) {
		fprintf(stderr, "You must specify a file path\n");
		return -1;
	}

	if (require_file(uf, opt->argv[0], &ent) < 0)
		return -1;

	err = ufat_open_file(uf, &file, &ent);
	if (err < 0) {
		fprintf(stderr, "ufat_open_file: %s\n", ufat_strerror(err));
		return -1;
	}

	out = open_output(opt->out_file);
	if (!out)
		return -1;

	for (;;) {
		char buf[16384];
		int req_size = sizeof(buf);
		int len;

		if (opt->flags & OPTION_RANDOMIZE)
			req_size = random() % sizeof(buf) + 1;

		len = ufat_file_read(&file, buf, req_size);
		if (len < 0) {
			fprintf(stderr, "ufat_file_read: %s\n",
				ufat_strerror(len));
			close_output(opt->out_file, out);
			return -1;
		}

		if (!len)
			break;

		if (fwrite(buf, 1, len, out) != (size_t)len) {
			perror("fwrite");
			close_output(opt->out_file, out);
			return -1;
		}
	}

	return close_output(opt->out_file, out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4078, %rsp           # imm = 0x4078
cmpl $0x0, 0x40(%rsi)
je 0x507c
movq %rsi, %r14
movq %rdi, %r15
movq 0x38(%rsi), %rax
movq (%rax), %rsi
leaq 0x28(%rsp), %rdx
callq 0x5ab1
pushq $-0x1
popq %rbx
testl %eax, %eax
js 0x50f5
movq %rsp, %rsi
leaq 0x28(%rsp), %rdx
movq %r15, %rdi
callq 0x274c
testl %eax, %eax
js 0x509a
movq 0x20(%r14), %rdi
callq 0x4a82
testq %rax, %rax
je 0x50f5
movq %rax, %r15
movq %rsp, %r12
leaq 0x70(%rsp), %r13
pushq $0x1
popq %rbp
movl $0x4000, %edx           # imm = 0x4000
testb $0x2, (%r14)
je 0x5035
callq 0x1180
movq %rax, %rdx
andl $0x3fff, %edx           # imm = 0x3FFF
incl %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x2811
testl %eax, %eax
js 0x50c1
je 0x506c
movl %eax, %ebx
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x11e0
cmpq %rbx, %rax
je 0x501a
leaq 0x1d9b(%rip), %rdi      # 0x6e00
callq 0x11b0
jmp 0x50e6
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x4ae8
movl %eax, %ebx
jmp 0x50f5
movq 0x4f75(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x1911(%rip), %rdi      # 0x699e
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
jmp 0x50f2
movq 0x4f57(%rip), %rcx      # 0x9ff8
movq (%rcx), %r14
movl %eax, %edi
callq 0x1a87
leaq 0x1a43(%rip), %rsi      # 0x6af5
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x50f5
movq 0x4f30(%rip), %rcx      # 0x9ff8
movq (%rcx), %r12
movl %eax, %edi
callq 0x1a87
leaq 0x1a30(%rip), %rsi      # 0x6b09
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x4ae8
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x4078, %rsp           # imm = 0x4078
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: cmd_rm
static int cmd_rm(struct ufat *uf, const struct options *opt)
{
	struct ufat_dirent ent;
	int err;

	if (!opt->argc) {
		fprintf(stderr, "You must specify a file path\n");
		return -1;
	}

	if (require_file(uf, opt->argv[0], &ent) < 0)
		return -1;

	err = ufat_dir_delete(uf, &ent);
	if (err < 0) {
		fprintf(stderr, "ufat_dir_delete: %s\n", ufat_strerror(err));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
cmpl $0x0, 0x40(%rsi)
je 0x543d
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq (%rax), %rsi
movq %rsp, %rdx
callq 0x5ab1
pushq $-0x1
popq %rbp
testl %eax, %eax
js 0x5434
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2027
movl %eax, %edi
xorl %eax, %eax
testl %edi, %edi
jns 0x5436
movq 0x4be0(%rip), %rax      # 0x9ff8
movq (%rax), %rbx
callq 0x1a87
leaq 0x1768(%rip), %rsi      # 0x6b8f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq 0x4bb4(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x1550(%rip), %rdi      # 0x699e
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
pushq $-0x1
popq %rax
jmp 0x5436
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: cmd_mkdir
static int cmd_mkdir(struct ufat *uf, const struct options *opt)
{
	const char *basename;
	struct ufat_directory dir;
	struct ufat_dirent ent;
	struct tm *local;
	time_t now = time(NULL);
	int err;

	if (!opt->argc) {
		fprintf(stderr, "You must specify a file path\n");
		return -1;
	}

	err = find_path(uf, &dir, opt->argv[0], &ent, &basename);
	if (err < 0)
		return -1;

	if (!err) {
		fprintf(stderr, "Path already exists: %s\n",
			opt->argv[0]);
		return -1;
	}

	local = localtime(&now);
	ent.attributes = 0;
	ent.create_date = UFAT_DATE(local->tm_year + 1900, local->tm_mon + 1,
				    local->tm_mday);
	ent.create_time = UFAT_TIME(local->tm_hour, local->tm_min,
				    local->tm_sec);
	ent.modify_date = ent.create_date;
	ent.modify_time = ent.create_time;
	ent.access_date = ent.create_date;

	err = ufat_dir_create(&dir, &ent, basename);
	if (err < 0) {
		fprintf(stderr, "ufat_dir_create: %s\n", ufat_strerror(err));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x1170
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x40(%rbx)
je 0x553e
movq 0x38(%rbx), %rax
movq (%rax), %rdx
leaq 0x18(%rsp), %rsi
leaq 0x38(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r14, %rdi
callq 0x5b06
pushq $-0x1
popq %rbp
testl %eax, %eax
js 0x557e
je 0x555f
leaq 0x8(%rsp), %rdi
callq 0x1050
leaq 0x38(%rsp), %rsi
andl $0x0, 0x2c(%rsi)
movl 0x10(%rax), %edx
movl 0x14(%rax), %ecx
shll $0x9, %ecx
addl $0x6000, %ecx           # imm = 0x6000
shll $0x5, %edx
orl 0xc(%rax), %ecx
addl $0x20, %edx
orl %edx, %ecx
movw %cx, 0x30(%rsi)
movl 0x8(%rax), %edx
shll $0xb, %edx
movl (%rax), %edi
movl 0x4(%rax), %eax
shll $0x5, %eax
orl %edx, %eax
shrl %edi
orl %eax, %edi
movw %di, 0x32(%rsi)
movw %cx, 0x34(%rsi)
movw %di, 0x36(%rsi)
movw %cx, 0x38(%rsi)
movq 0x10(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x213f
movl %eax, %edi
xorl %eax, %eax
testl %edi, %edi
jns 0x5580
movq 0x4ad1(%rip), %rax      # 0x9ff8
movq (%rax), %rbx
callq 0x1a87
leaq 0x1687(%rip), %rsi      # 0x6bbd
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x5577
movq 0x4ab3(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x144f(%rip), %rdi      # 0x699e
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
pushq $-0x1
popq %rax
jmp 0x5580
movq 0x4a92(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq 0x38(%rbx), %rax
movq (%rax), %rdx
leaq 0x162d(%rip), %rsi      # 0x6ba4
xorl %eax, %eax
callq 0x1140
movl %ebp, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: cmd_rename
static int cmd_rename(struct ufat *uf, const struct options *opt)
{
	struct ufat_directory dir;
	struct ufat_dirent ent;
	int err;
	const char *src_path;
	const char *dst_name;

	if (opt->argc < 2) {
		fprintf(stderr, "You must specified a source path and "
			"a new name.\n");
		return -1;
	}

	src_path = opt->argv[0];
	dst_name = opt->argv[1];

	err = find_path(uf, &dir, src_path, &ent, NULL);
	if (err < 0)
		return -1;

	if (err) {
		fprintf(stderr, "No such file or directory: %s\n",
			ufat_strerror(err));
		return -1;
	}

	err = ufat_move(&ent, &dir, dst_name);
	if (err < 0) {
		fprintf(stderr, "ufat_move: %s\n", ufat_strerror(err));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x68, %rsp
cmpl $0x1, 0x40(%rsi)
jle 0x5a62
movq 0x38(%rsi), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rbx
movq %rsp, %rsi
leaq 0x20(%rsp), %rcx
xorl %r8d, %r8d
callq 0x5b06
pushq $-0x1
popq %rbp
testl %eax, %eax
js 0x5aa8
jne 0x5a83
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movq %rbx, %rdx
callq 0x26b3
movl %eax, %edi
xorl %eax, %eax
testl %edi, %edi
jns 0x5aaa
movq 0x45a7(%rip), %rax      # 0x9ff8
movq (%rax), %rbx
callq 0x1a87
leaq 0x12d1(%rip), %rsi      # 0x6d31
jmp 0x5a9b
movq 0x458f(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x12cd(%rip), %rdi      # 0x6d40
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
pushq $-0x1
popq %rax
jmp 0x5aaa
movq 0x456e(%rip), %rcx      # 0x9ff8
movq (%rcx), %rbx
movl %eax, %edi
callq 0x1a87
leaq 0xe77(%rip), %rsi       # 0x6912
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: require_file
static int require_file(struct ufat *uf, const char *path,
			struct ufat_dirent *ent)
{
	struct ufat_directory dir;
	int err = find_path(uf, &dir, path, ent, NULL);

	if (err < 0)
		return err;

	if (err) {
		fprintf(stderr, "No such file or directory: %s\n", path);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rcx
movq %rsi, %rbx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x5b06
testl %eax, %eax
js 0x5af8
je 0x5afb
movq 0x451a(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0xe2a(%rip), %rsi       # 0x6912
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1140
pushq $-0x1
popq %r14
jmp 0x5afb
movl %eax, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: find_path
static int find_path(struct ufat *uf,
		     struct ufat_directory *dir, const char *path,
		     struct ufat_dirent *inf, const char **path_out)
{
	int err;

	ufat_open_root(uf, dir);
	err = ufat_dir_find_path(dir, path, inf, path_out);

	if (err < 0)
		fprintf(stderr, "ufat_dir_find_path: %s\n",
			ufat_strerror(err));

	return err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
callq 0x1e58
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x250c
movl %eax, %ebx
testl %eax, %eax
js 0x5b44
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x44ad(%rip), %rax      # 0x9ff8
movq (%rax), %r14
movl %ebx, %edi
callq 0x1a87
leaq 0xdd5(%rip), %rsi       # 0x6931
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x5b36
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: print_attributes
static void print_attributes(FILE *out, ufat_attr_t a)
{
	fprintf(out, "%c%c%c%c%c",
		(a & UFAT_ATTR_ARCHIVE) ? 'A' : ' ',
		(a & UFAT_ATTR_SYSTEM) ? 'S' : ' ',
		(a & UFAT_ATTR_HIDDEN) ? 'H' : ' ',
		(a & UFAT_ATTR_READONLY) ? 'R' : ' ',
		(a & UFAT_ATTR_DIRECTORY) ? 'D' : ' ');
}

// Assembly:
pushq %rax
testb $0x20, %sil
pushq $0x20
popq %rax
pushq $0x41
popq %rdx
cmovel %eax, %edx
testb $0x4, %sil
pushq $0x53
popq %rcx
cmovel %eax, %ecx
testb $0x2, %sil
pushq $0x48
popq %r8
cmovel %eax, %r8d
testb $0x1, %sil
pushq $0x52
popq %r9
cmovel %eax, %r9d
testb $0x10, %sil
pushq $0x44
popq %rsi
cmovel %eax, %esi
movl %esi, (%rsp)
leaq 0xd99(%rip), %rsi       # 0x6993
xorl %eax, %eax
callq 0x1140
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: parse_date
static int parse_date(const char *text, ufat_date_t *d)
{
	int bits[3] = {0};
	int b = 0;
	int i;

	if (!strcasecmp(text, "now")) {
		time_t now = time(NULL);
		struct tm *local = localtime(&now);

		*d = UFAT_DATE(local->tm_year + 1900,
			       local->tm_mon + 1,
			       local->tm_mday);
		return 0;
	}

	for (i = 0; text[i]; i++) {
		const int c = text[i];

		if (c == '-') {
			b++;
			if (b >= 3)
				goto bad_format;
		} else if (isdigit(c)) {
			bits[b] = bits[b] * 10 + c - '0';
		} else {
			goto bad_format;
		}
	}

	if (b < 2)
		goto bad_format;

	*d = UFAT_DATE(bits[0], bits[1], bits[2]);
	return 0;

 bad_format:
	fprintf(stderr, "Date must be of the form YYYY-MM-DD: %s\n", text);
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
andl $0x0, 0x10(%rsp)
movq %rdi, %r14
andq $0x0, 0x8(%rsp)
leaq 0x1055(%rip), %rsi      # 0x6c8a
callq 0x1040
testl %eax, %eax
je 0x5cb2
xorl %ebp, %ebp
movq %r14, %r15
movsbl (%r15), %r12d
testl %r12d, %r12d
je 0x5c8c
cmpb $0x2d, %r12b
jne 0x5c5f
cmpl $0x1, %ebp
jg 0x5cf6
incl %ebp
jmp 0x5c87
callq 0x1200
movq (%rax), %rax
movslq %r12d, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x5cf6
movslq %ebp, %rax
imull $0xa, 0x8(%rsp,%rax,4), %ecx
addl %r12d, %ecx
addl $-0x30, %ecx
movl %ecx, 0x8(%rsp,%rax,4)
incq %r15
jmp 0x5c43
cmpl $0x2, %ebp
jl 0x5cf6
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
shll $0x9, %eax
addl $0x8800, %eax           # imm = 0x8800
shll $0x5, %ecx
orl %eax, %ecx
orl 0x10(%rsp), %ecx
movw %cx, (%rbx)
xorl %r14d, %r14d
jmp 0x5ce6
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x1170
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
callq 0x1050
movl 0x10(%rax), %ecx
movl 0x14(%rax), %edx
shll $0x9, %edx
addl $0x6000, %edx           # imm = 0x6000
shll $0x5, %ecx
addl $0x20, %ecx
orl 0xc(%rax), %edx
orl %ecx, %edx
movw %dx, (%rbx)
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x42fb(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0xf87(%rip), %rsi       # 0x6c8e
movq %r14, %rdx
xorl %eax, %eax
callq 0x1140
pushq $-0x1
popq %r14
jmp 0x5ce6