// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb $0x1, %bpl
cmpq $0x20, 0x10(%rdx)
movb $0x1, %r12b
jl 0x2f2fe
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0xef0d5
testb %al, %al
jne 0x2f2fb
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x4, %rsi
callq 0xef0d5
movb $0x1, %r12b
testb %al, %al
je 0x2f2fe
xorl %r12d, %r12d
cmpq $0x3e, 0x10(%r14)
jl 0x2f328
movq 0x18(%rbx), %rdi
movq 0x8(%r14), %rsi
addq $0x22, %rsi
leaq 0xe7876(%rip), %rdx     # 0x116b8e
movl $0x4, %ecx
callq 0xf025e
testl %eax, %eax
setne %bpl
testb %r12b, %r12b
jne 0x2f40a
movq 0x8(%r14), %rsi
leaq 0x50(%rsp), %r12
movq %rsi, (%r12)
movq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1d74
leaq 0x30(%rsp), %r13
leaq 0xe5500(%rip), %rsi     # 0x114860
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%r15), %rax
movl -0x10(%r13), %ecx
movl %ecx, 0x90(%rax)
movq 0x10(%r15), %rax
movb $0x1, %cl
movb %cl, 0x7b(%rax)
movq (%r12), %rsi
addq $0x4, %rsi
movq %rsi, (%r12)
movq 0x18(%rbx), %rdi
leaq 0x58(%rsp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1d74
leaq 0x68(%rsp), %r13
leaq 0x104b41(%rip), %rsi    # 0x133ef3
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%r15), %rax
movl -0x10(%r13), %ecx
movl %ecx, 0x94(%rax)
movq 0x10(%r15), %rax
movb $0x1, %cl
movb %cl, 0x7c(%rax)
movb $0x1, %r13b
addq $0x4, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xef193
movq 0x10(%r15), %rcx
movw %ax, 0x7e(%rcx)
movb %r13b, 0x7d(%rcx)
movzwl %ax, %edx
leaq 0xf9cfd(%rip), %rsi     # 0x1290fd
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
testb %bpl, %bpl
jne 0x2f72a
movq 0x8(%r14), %rax
leaq 0x20(%rsp), %r14
movq %rax, (%r14)
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0xe958c
movq (%r14), %rdi
addq $0x20, %rdi
movq %rdi, (%r14)
callq 0xea7de
movq %rax, (%r14)
leaq 0xe774e(%rip), %rsi     # 0x116b93
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
addq $0x8, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
leaq 0xe7730(%rip), %rsi     # 0x116ba6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
leaq 0xe7720(%rip), %rsi     # 0x116bb6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
leaq 0xe7710(%rip), %rsi     # 0x116bc6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq $0xc, (%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef193
leaq 0xf9c23(%rip), %rsi     # 0x1290fd
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef193
movq %rax, %r14
leaq 0xe76db(%rip), %rsi     # 0x116bd7
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
testq %r14, %r14
jle 0x2f708
decq %r14
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movq %r14, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0xea7de
movq %rax, %r12
movq %rax, 0x20(%rsp)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r13
cmpq %r13, %r12
jge 0x2f6aa
movq %rbx, %rdi
leaq 0xe7693(%rip), %rsi     # 0x116be5
movl %ebp, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0xef34e
movq %rbx, %rdi
leaq 0x11b28c(%rip), %rsi    # 0x14a812
movq %rax, 0x10(%rsp)
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef34e
movq %rax, %r15
movq %rbx, %rdi
leaq 0x115e3e(%rip), %rsi    # 0x1453ec
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef193
movq %rbx, %rdi
leaq 0xf9b2f(%rip), %rsi     # 0x1290fd
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef14d
movl %eax, %r14d
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x2f5f8
movq %rbx, %rdi
callq 0xf00aa
movzbl %r14b, %r14d
movq 0x18(%rbx), %rdi
movq 0x20(%rsp), %rsi
movq %r14, %rdx
movq %r14, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
callq 0xefe67
movq %rax, 0x8(%rsp)
movq 0x18(%rax), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0xf2f3f(%rip), %rsi     # 0x122573
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rsp), %rdx
leaq (%r15,%rdx), %rax
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %rax
jg 0x2f693
cmpq $0x8, %r15
jl 0x2f674
movl $0x8, %ecx
movq %rdx, %rsi
leaq 0xe7596(%rip), %rdx     # 0x116bfc
callq 0xf025e
movq 0x10(%rsp), %rdx
testl %eax, %eax
je 0x2f6c1
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xe975a
addq %r14, 0x20(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x18(%rsp), %r14
cmpq %r13, %r12
jge 0x2f711
leaq 0x1(%rbp), %rax
cmpq %rbp, %r14
movq %rax, %rbp
jne 0x2f525
jmp 0x2f711
movq %rbx, %rdi
leaq 0xe753a(%rip), %rsi     # 0x116c05
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf8390
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
jmp 0x2f693
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xf00aa
movl 0x58(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq