// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/hfs.c
// Function: de_run_hfs
static void de_run_hfs(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;

	d = de_malloc(c, sizeof(lctx));

	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_MACROMAN);

	d->blocksize = 512;
	d->nodes_seen = de_inthashtable_create(c);
	d->dirid_hash = de_inthashtable_create(c);

	if(!do_master_directory_blocks(c, d, 2)) goto done;

	if(!do_catalog(c, d)) goto done;

done:
	if(d) {
		de_inthashtable_destroy(c, d->nodes_seen);
		destroy_dirid_hash(c, d);
		de_free(c, d);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0xb8, %esi
callq 0xdecaf
movq %rax, %r14
pushq $0x11
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe08d2
movl %eax, (%r14)
movq $0x200, 0x8(%r14)       # imm = 0x200
movq %rbx, %rdi
callq 0xe0955
movq %rax, 0xa8(%r14)
movq %rbx, %rdi
callq 0xe0955
movq %rax, 0xb0(%r14)
movq 0x8(%r14), %r15
leaq (%r15,%r15), %rdx
leaq 0xc11de(%rip), %rsi     # 0x113a88
pushq $0x2
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
leaq 0x2(,%r15,2), %rsi
leaq 0xc11e2(%rip), %rcx     # 0x113ab3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x52ca8
leaq 0x6(,%r15,2), %rsi
leaq 0xc11da(%rip), %rcx     # 0x113ac4
movq %rbx, %rdi
xorl %edx, %edx
callq 0x52ca8
leaq 0xc(,%r15,2), %rax
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, 0x10(%r14)
leaq 0xc11bc(%rip), %rsi     # 0x113ad7
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x4, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, 0x18(%r14)
leaq 0xc11b0(%rip), %rsi     # 0x113af2
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x20(%r14)
leaq 0xc119c(%rip), %rsi     # 0x113b01
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x28(%r14)
leaq 0xc1188(%rip), %rsi     # 0x113b10
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, 0x30(%r14)
leaq 0xc1172(%rip), %rsi     # 0x113b1d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x6, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %r13d
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
movl (%r14), %eax
movl %eax, (%rsp)
pushq $0x1b
popq %rcx
movq %r13, %rdx
movq %r12, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r12, %rdi
callq 0xeb877
leaq 0xc1127(%rip), %rsi     # 0x113b2a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x5d, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x38(%r14)
leaq 0xc1111(%rip), %rsi     # 0x113b3c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq (%r15), %rsi
leaq 0x78(%r14), %r13
leaq 0xc1106(%rip), %rcx     # 0x113b4c
movq %rbx, %rdi
movq %r13, %rdx
callq 0x52d43
addq $0xc, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x40(%r14)
leaq 0xc10eb(%rip), %rsi     # 0x113b57
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq (%r15), %rsi
leaq 0xc10e4(%rip), %rcx     # 0x113b67
movq %rbx, %rdi
movq %r13, %rdx
callq 0x52d43
addq $0xc, (%r15)
movq 0x90(%r14), %rax
addq 0x80(%r14), %rax
addq 0xa0(%r14), %rax
imulq 0x20(%r14), %rax
cmpq %rax, 0x40(%r14)
jle 0x52adb
leaq 0xc10b9(%rip), %rsi     # 0x113b72
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %r12, %rdi
callq 0xeaf3c
jmp 0x52bbb
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %r12, %rdi
callq 0xeaf3c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
movq 0x30(%r14), %rax
imulq 0x8(%r14), %rax
movq 0x20(%r14), %rdx
imulq 0x78(%r14), %rdx
addq %rax, %rdx
leaq 0xc10ae(%rip), %rsi     # 0x113bc5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x50
popq %rsi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r15
movl $0x1, (%rax)
andq $0x0, 0x8(%rax)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x52dbc
testl %eax, %eax
je 0x52ba4
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
cmpl $0x1, 0x2c(%r15)
jne 0x52b93
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5353e
testl %eax, %eax
je 0x52ba4
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5353e
jmp 0x52ba4
leaq 0xc1049(%rip), %rsi     # 0x113be3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x535e7
movl 0x10(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
movq 0xa8(%r14), %rsi
movq %rbx, %rdi
callq 0xe095f
movq 0xb0(%r14), %rsi
testq %rsi, %rsi
je 0x52c29
leaq 0x10(%rsp), %r15
leaq 0x18(%rsp), %r12
andq $0x0, 0x18(%rsp)
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0xe0a91
testl %eax, %eax
je 0x52c1a
movq 0x18(%rsp), %r13
movq 0x8(%r13), %rdi
callq 0xeaf3c
movq %rbx, %rdi
movq %r13, %rsi
callq 0xded32
movq 0xb0(%r14), %rsi
jmp 0x52be0
movq 0xb0(%r14), %rsi
movq %rbx, %rdi
callq 0xe095f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq