// File: /workspace/github_c_makefile_star2_O3/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 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movl $0x11, %edx
callq 0xeb220
movl %eax, (%r14)
movq $0x200, 0x8(%r14)       # imm = 0x200
movq %rbx, %rdi
callq 0xeb2a9
movq %rax, 0xa8(%r14)
movq %rbx, %rdi
callq 0xeb2a9
movq %rax, 0xb0(%r14)
movq 0x8(%r14), %r15
leaq (%r15,%r15), %rdx
leaq 0xcb688(%rip), %rsi     # 0x120b78
movl $0x2, %ecx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
leaq 0x2(,%r15,2), %rsi
leaq 0xcb688(%rip), %rcx     # 0x120ba3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x55936
leaq 0x6(,%r15,2), %rsi
leaq 0xcb680(%rip), %rcx     # 0x120bb4
movq %rbx, %rdi
xorl %edx, %edx
callq 0x55936
leaq 0xc(,%r15,2), %rax
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, 0x10(%r14)
leaq 0xcb662(%rip), %rsi     # 0x120bc7
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
addq $0x4, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, 0x18(%r14)
leaq 0xcb656(%rip), %rsi     # 0x120be2
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
movq %rax, 0x20(%r14)
leaq 0xcb642(%rip), %rsi     # 0x120bf1
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
movq %rax, 0x28(%r14)
leaq 0xcb62e(%rip), %rsi     # 0x120c00
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, 0x30(%r14)
leaq 0xcb618(%rip), %rsi     # 0x120c0d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
addq $0x6, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %r13d
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq (%r15), %rsi
movl (%r14), %eax
movl %eax, (%rsp)
movl $0x1b, %ecx
movq %r13, %rdx
movq %r12, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r12, %rdi
callq 0xf70f6
leaq 0xcb5cb(%rip), %rsi     # 0x120c1a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0x5d, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
movq %rax, 0x38(%r14)
leaq 0xcb5b5(%rip), %rsi     # 0x120c2c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq (%r15), %rsi
leaq 0x78(%r14), %r13
leaq 0xcb5aa(%rip), %rcx     # 0x120c3c
movq %rbx, %rdi
movq %r13, %rdx
callq 0x559d5
addq $0xc, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeed31
movq %rax, 0x40(%r14)
leaq 0xcb58f(%rip), %rsi     # 0x120c47
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq (%r15), %rsi
leaq 0xcb588(%rip), %rcx     # 0x120c57
movq %rbx, %rdi
movq %r13, %rdx
callq 0x559d5
addq $0xc, (%r15)
movq 0x90(%r14), %rax
addq 0x80(%r14), %rax
addq 0xa0(%r14), %rax
imulq 0x20(%r14), %rax
cmpq %rax, 0x40(%r14)
jle 0x55729
leaq 0xcb55d(%rip), %rsi     # 0x120c62
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r12, %rdi
callq 0xf6753
jmp 0x55824
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r12, %rdi
callq 0xf6753
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
movq 0x30(%r14), %rax
imulq 0x8(%r14), %rax
movq 0x20(%r14), %rdx
imulq 0x78(%r14), %rdx
addq %rax, %rdx
leaq 0xcb54e(%rip), %rsi     # 0x120cb5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl $0x50, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r15
movl $0x1, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x55a4c
testl %eax, %eax
je 0x55801
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
cmpl $0x1, 0x2c(%r15)
jne 0x557f0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x56211
testl %eax, %eax
je 0x55801
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x2, %ecx
callq 0x56211
jmp 0x55801
leaq 0xcb4dc(%rip), %rsi     # 0x120cd3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq 0x48(%r15), %rsi
movq %rbx, %rdi
callq 0xe8be2
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe8be2
movl 0x10(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movq 0xa8(%r14), %rsi
movq %rbx, %rdi
callq 0xeb2b3
movq 0xb0(%r14), %rsi
testq %rsi, %rsi
je 0x558b0
leaq 0x18(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0xeb43b
testl %eax, %eax
je 0x558a1
leaq 0x10(%rsp), %r15
leaq 0x18(%rsp), %r12
movq 0x18(%rsp), %r13
movq 0x8(%r13), %rdi
callq 0xf6753
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe8be2
movq $0x0, 0x18(%rsp)
movq 0xb0(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0xeb43b
testl %eax, %eax
jne 0x55866
movq 0xb0(%r14), %rsi
movq %rbx, %rdi
callq 0xeb2b3
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq