// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/applesd.c
// Function: handler_finder
static void handler_finder(deark *c, lctx *d, struct entry_struct *e)
{
	int has_orig_finder_info = 0;
	int has_xattr = 0;

	if(e->length>=32 && (de_getbyte(e->offset) || de_getbyte(e->offset+4))) {
		has_orig_finder_info = 1;
	}
	if(e->length>=62 && !dbuf_memcmp(c->infile, e->offset+34, (const void*)"ATTR", 4)) {
		has_xattr = 1;
	}

	if(has_orig_finder_info) {
		do_finder_orig(c, d, e);
	}
	if(has_xattr) {
		do_finder_xattr(c, d, e);
	}
}

// Assembly:
cmpq $0x20, 0x10(%rdx)
jl 0x2f5fd
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x8(%rdx), %rsi
callq 0xeead3
testb %al, %al
jne 0x2f1ee
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x4, %rsi
callq 0xeead3
testb %al, %al
je 0x2f5fe
movb $0x1, %cl
cmpq $0x3e, 0x10(%r14)
jl 0x2f22d
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x22, %rsi
leaq 0xe7a32(%rip), %rdx     # 0x116c3e
movl $0x4, %ecx
callq 0xefc85
testl %eax, %eax
setne %cl
testb %bpl, %bpl
je 0x2f22d
testl %eax, %eax
jne 0x2f5ef
jmp 0x2f30a
movb %cl, 0x8(%rsp)
movq 0x8(%r14), %r12
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %rdx
movq %r12, %rsi
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x20(%rsp), %r13
leaq 0xe56e1(%rip), %rsi     # 0x11493b
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r15), %rax
movl -0x10(%r13), %ecx
movl %ecx, 0x90(%rax)
movq 0x10(%r15), %rax
movb $0x1, %bpl
movb %bpl, 0x7b(%rax)
leaq 0x4(%r12), %rsi
movq 0x18(%rbx), %rdi
leaq 0x48(%rsp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x58(%rsp), %r13
leaq 0x105044(%rip), %rsi    # 0x1342eb
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r15), %rax
movl -0x10(%r13), %ecx
movl %ecx, 0x94(%rax)
movq 0x10(%r15), %rax
movb %bpl, 0x7c(%rax)
addq $0x8, %r12
leaq 0x40(%rsp), %rsi
movq %r12, (%rsi)
movq 0x18(%rbx), %rdi
callq 0xeeb91
movq 0x10(%r15), %rcx
movw %ax, 0x7e(%rcx)
movb %bpl, 0x7d(%rcx)
movzwl %ax, %edx
leaq 0xfa038(%rip), %rsi     # 0x12932d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpb $0x0, 0x8(%rsp)
jne 0x2f5ef
movq 0x8(%r14), %r14
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
addq $0x20, %r14
movq %r14, %rdi
callq 0xe9c87
movq %rax, %r12
leaq 0xe7912(%rip), %rsi     # 0x116c43
xorl %r14d, %r14d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
addq $0x8, %r12
leaq 0x10(%rsp), %r15
movq %r12, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
leaq 0xe78e9(%rip), %rsi     # 0x116c56
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
leaq 0xe78d9(%rip), %rsi     # 0x116c66
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
leaq 0xe78c9(%rip), %rsi     # 0x116c76
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0xc, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
leaq 0xf9f5c(%rip), %rsi     # 0x12932d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, %r15
leaq 0xe7894(%rip), %rsi     # 0x116c87
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r15, 0x8(%rsp)
testq %r15, %r15
jle 0x2f5d8
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
callq 0xe9c87
movq %rax, 0x10(%rsp)
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x2f5d8
movq %rbx, %rdi
leaq 0xe785b(%rip), %rsi     # 0x116c95
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0xeed31
movq %rax, %r12
movq %rbx, %rdi
leaq 0x11b951(%rip), %rsi    # 0x14adc2
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeed31
movq %rax, %r15
movq %rbx, %rdi
leaq 0x116438(%rip), %rsi    # 0x1458cc
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb91
movq %rbx, %rdi
leaq 0xf9e79(%rip), %rsi     # 0x12932d
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb4b
movl %eax, %r13d
testq %r14, %r14
je 0x2f4dc
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefaca
movzbl %r13b, %r13d
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movq %r13, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
callq 0xef87c
movq %rax, %r14
movq 0x18(%rax), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xf3265(%rip), %rsi     # 0x12277b
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
leaq (%r15,%r12), %rax
movq 0x18(%rbx), %rsi
cmpq 0x18(%rsi), %rax
jg 0x2f571
cmpq $0x8, %r15
jl 0x2f553
movl $0x8, %ecx
movq %rsi, %rdi
movq %r12, %rsi
leaq 0xe7766(%rip), %rdx     # 0x116cac
callq 0xefc85
testl %eax, %eax
je 0x2f593
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xe8bea
addq %r13, 0x10(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbp
cmpq %rbp, 0x8(%rsp)
jne 0x2f413
jmp 0x2f5d8
movq %rbx, %rdi
leaq 0xe7718(%rip), %rsi     # 0x116cb5
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf7ec0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x2f571
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefaca
movl 0x48(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
cmpq $0x3d, 0x10(%r14)
jg 0x2f1f9
jmp 0x2f5ef