// File: /workspace/github_c_makefile_star2_O2/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 0x2e6b6
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 0xe3eb4
testb %al, %al
jne 0x2e2b8
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x4, %rsi
callq 0xe3eb4
testb %al, %al
je 0x2e6b7
movb $0x1, %cl
cmpq $0x3e, 0x10(%r14)
jl 0x2e2f5
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x22, %rsi
leaq 0xdb8d8(%rip), %rdx     # 0x109bae
pushq $0x4
popq %rcx
callq 0xe4d48
testl %eax, %eax
setne %cl
testb %bpl, %bpl
je 0x2e2f5
testl %eax, %eax
jne 0x2e6a8
jmp 0x2e3ce
movb %cl, 0x8(%rsp)
movq 0x8(%r14), %r12
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %rdx
pushq $0x4
popq %rcx
movq %r12, %rsi
xorl %r8d, %r8d
callq 0xe657c
leaq 0x20(%rsp), %r13
leaq 0xd9590(%rip), %rsi     # 0x1078b0
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
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
pushq $0x4
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
leaq 0x58(%rsp), %r13
leaq 0xf8ca8(%rip), %rsi     # 0x127013
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
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 0xe3f6e
movq 0x10(%r15), %rcx
movw %ax, 0x7e(%rcx)
movb %bpl, 0x7d(%rcx)
movzwl %ax, %edx
leaq 0xedd34(%rip), %rsi     # 0x11c0ed
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
cmpb $0x0, 0x8(%rsp)
jne 0x2e6a8
movq 0x8(%r14), %r14
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
addq $0x20, %r14
movq %r14, %rdi
callq 0xdfb90
movq %rax, %r14
leaq 0xdb7be(%rip), %rsi     # 0x109bb3
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
addq $0x8, %r14
leaq 0x10(%rsp), %r12
movq %r14, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe4071
leaq 0xdb796(%rip), %rsi     # 0x109bc6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe4071
leaq 0xdb786(%rip), %rsi     # 0x109bd6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe4071
leaq 0xdb776(%rip), %rsi     # 0x109be6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq $0xc, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3f6e
leaq 0xedc58(%rip), %rsi     # 0x11c0ed
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3f6e
movq %rax, %r14
leaq 0xdb740(%rip), %rsi     # 0x109bf7
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xde896
testq %r14, %r14
cmovleq %r15, %r14
movq %r14, 0x8(%rsp)
xorl %r15d, %r15d
xorl %r13d, %r13d
cmpq %r13, 0x8(%rsp)
je 0x2e691
movq 0x10(%rsp), %rdi
callq 0xdfb90
movq %rax, 0x10(%rsp)
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x2e691
movq %rbx, %rdi
leaq 0xdb6fd(%rip), %rsi     # 0x109c05
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xe4071
movq %rax, %rbp
movq %rbx, %rdi
leaq 0x10f3b4(%rip), %rsi    # 0x13d8f2
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe4071
movq %rax, %r12
movq %rbx, %rdi
leaq 0x109f1b(%rip), %rsi    # 0x13847c
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe3f6e
movq %rbx, %rdi
leaq 0xedb6c(%rip), %rsi     # 0x11c0ed
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xe3f2a
movl %eax, %r14d
testq %r15, %r15
je 0x2e5a9
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe4b94
movzbl %r14b, %r14d
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movq %r14, %rcx
pushq $0x1
popq %r8
pushq $0x2
popq %r9
callq 0xe495c
movq %rax, %r15
movq 0x18(%rax), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0xe6fdc(%rip), %rsi     # 0x1155bb
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
leaq (%r12,%rbp), %rax
movq 0x18(%rbx), %rsi
cmpq 0x18(%rsi), %rax
jg 0x2e638
cmpq $0x8, %r12
jl 0x2e61a
movq %rsi, %rdi
movq %rbp, %rsi
leaq 0xdb612(%rip), %rdx     # 0x109c1c
pushq $0x8
popq %rcx
callq 0xe4d48
testl %eax, %eax
je 0x2e650
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r9d, %r9d
callq 0xded3a
addq %r14, 0x10(%rsp)
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
incq %r13
jmp 0x2e4d6
movq %rbx, %rdi
leaq 0xdb5cb(%rip), %rsi     # 0x109c25
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xec602
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
jmp 0x2e638
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe4b94
movl 0x48(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
cmpq $0x3d, 0x10(%r14)
jg 0x2e2c3
jmp 0x2e6a8