// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]ufat/main.c
// Function: cmd_chattr
static int cmd_chattr(struct ufat *uf, const struct options *opt)
{
	struct ufat_dirent ent;
	int err;
	int i;

	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;

	for (i = 1; i < opt->argc; i++)
		if (parse_attribute(opt->argv[i], &ent) < 0)
			return -1;

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

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpl $0x0, 0x40(%rsi)
pushq $-0x1
popq %rbx
je 0x57d4
movq %rsi, %rbp
movq %rdi, %r14
movq 0x38(%rsi), %rax
movq (%rax), %rsi
leaq 0x18(%rsp), %rdx
callq 0x5ab1
testl %eax, %eax
js 0x57f0
movq %r14, (%rsp)
pushq $0x1
popq %r8
pushq $0x20
popq %rbx
pushq $0x2
popq %r13
pushq $0x1
popq %r14
pushq $0x4
popq %r12
leaq 0x60(%rsp), %rdi
movq %rbp, 0x8(%rsp)
movslq 0x40(%rbp), %rax
cmpq %rax, %r8
jge 0x57a0
movq 0x38(%rbp), %rax
movq (%rax,%r8,8), %r15
movzbl (%r15), %ecx
cmpl $0x2b, %ecx
je 0x5612
cmpl $0x7e, %ecx
je 0x5612
cmpl $0x3d, %ecx
jne 0x567e
incq %r15
xorl %eax, %eax
movzbl (%r15), %edx
movl %ebx, %esi
cmpl $0x41, %edx
je 0x5654
cmpl $0x48, %edx
je 0x5651
cmpl $0x52, %edx
je 0x564c
cmpl $0x53, %edx
je 0x5647
movl %ebx, %esi
cmpl $0x61, %edx
je 0x5654
cmpl $0x68, %edx
je 0x5651
cmpl $0x72, %edx
je 0x564c
cmpl $0x73, %edx
jne 0x565b
movl %r12d, %esi
jmp 0x5654
movl %r14d, %esi
jmp 0x5654
movl %r13d, %esi
orl %esi, %eax
incq %r15
jmp 0x5617
testl %edx, %edx
jne 0x5780
cmpl $0x3d, %ecx
je 0x572f
cmpl $0x2b, %ecx
jne 0x5729
orl 0x44(%rsp), %eax
jmp 0x572f
movq %r8, 0x10(%rsp)
movq %r15, %rsi
pushq $0x40
popq %rdx
movq %rdi, %rbp
callq 0x1080
movb $0x0, 0x9f(%rsp)
movq %rbp, %rdi
pushq $0x3d
popq %rsi
callq 0x10f0
testq %rax, %rax
je 0x5804
movq %rax, %rcx
incq %rax
movb $0x0, (%rcx)
movq %rbp, %r15
movq %rax, %rbp
movq %r15, %rdi
leaq 0x1551(%rip), %rsi      # 0x6c17
callq 0x1040
testl %eax, %eax
je 0x5735
movq %r15, %rdi
leaq 0x154a(%rip), %rsi      # 0x6c23
callq 0x1040
testl %eax, %eax
je 0x573f
movq %r15, %rdi
leaq 0x1543(%rip), %rsi      # 0x6c2f
callq 0x1040
testl %eax, %eax
je 0x5749
movq %r15, %rdi
leaq 0x153c(%rip), %rsi      # 0x6c3b
callq 0x1040
testl %eax, %eax
je 0x5758
movq %r15, %rdi
leaq 0x1535(%rip), %rsi      # 0x6c47
callq 0x1040
testl %eax, %eax
jne 0x5824
movq %rbp, %rdi
leaq 0x50(%rsp), %rsi
jmp 0x5751
notl %eax
andl 0x44(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x5778
movq %rbp, %rdi
leaq 0x48(%rsp), %rsi
jmp 0x5751
movq %rbp, %rdi
leaq 0x4a(%rsp), %rsi
jmp 0x5760
movq %rbp, %rdi
leaq 0x4c(%rsp), %rsi
callq 0x5c11
jmp 0x5765
movq %rbp, %rdi
leaq 0x4e(%rsp), %rsi
callq 0x5d17
testl %eax, %eax
movq 0x8(%rsp), %rbp
movq 0x10(%rsp), %r8
leaq 0x60(%rsp), %rdi
js 0x579b
incq %r8
jmp 0x55ea
movsbl %dl, %edx
movq 0x486e(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x14d6(%rip), %rsi      # 0x6c6a
xorl %eax, %eax
callq 0x1140
pushq $-0x1
popq %rax
jmp 0x57f2
leaq 0x18(%rsp), %rsi
movq (%rsp), %rdi
callq 0x39b0
movl %eax, %edi
xorl %eax, %eax
testl %edi, %edi
jns 0x57f2
movq 0x483b(%rip), %rax      # 0x9ff8
movq (%rax), %rbx
callq 0x1a87
leaq 0x1406(%rip), %rsi      # 0x6bd2
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x5818
movq 0x481d(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x11b9(%rip), %rdi      # 0x699e
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x47ed(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x13dd(%rip), %rsi      # 0x6bf2
movq %r15, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x579b
movq 0x47cd(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x141e(%rip), %rsi      # 0x6c53
leaq 0x60(%rsp), %rdx
jmp 0x5818