// File: /workspace/github_c_makefile_star2_O1/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 0xe969b
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movl $0x11, %edx
callq 0xeb7d1
movl %eax, (%r14)
movq $0x200, 0x8(%r14)       # imm = 0x200
movq %rbx, %rdi
callq 0xeb85a
movq %rax, 0xa8(%r14)
movq %rbx, %rdi
callq 0xeb85a
movq %rax, 0xb0(%r14)
movq 0x8(%r14), %rdx
addq %rdx, %rdx
leaq 0x10(%rsp), %r15
movq %rdx, (%r15)
leaq 0xcb475(%rip), %rsi     # 0x120a50
movl $0x2, %ecx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%r15), %rsi
addq $0x2, %rsi
movq %rsi, (%r15)
leaq 0xcb473(%rip), %rcx     # 0x120a7b
movq %rbx, %rdi
xorl %edx, %edx
callq 0x55a19
movq (%r15), %rsi
addq $0x4, %rsi
movq %rsi, (%r15)
leaq 0xcb469(%rip), %rcx     # 0x120a8c
movq %rbx, %rdi
xorl %edx, %edx
callq 0x55a19
addq $0x6, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x10(%r14)
leaq 0xcb457(%rip), %rsi     # 0x120a9f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x4, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x18(%r14)
leaq 0xcb44b(%rip), %rsi     # 0x120aba
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef34e
movq %rax, 0x20(%r14)
leaq 0xcb437(%rip), %rsi     # 0x120ac9
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef34e
movq %rax, 0x28(%r14)
leaq 0xcb423(%rip), %rsi     # 0x120ad8
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, 0x30(%r14)
leaq 0xcb40d(%rip), %rsi     # 0x120ae5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
addq $0x6, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef14d
movzbl %al, %r13d
movq %rbx, %rdi
callq 0xf6870
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 0xf0203
movq %r12, %rdi
callq 0xf7557
leaq 0xcb3c0(%rip), %rsi     # 0x120af2
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq $0x5d, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef34e
movq %rax, 0x38(%r14)
leaq 0xcb3aa(%rip), %rsi     # 0x120b04
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rsi
leaq 0x78(%r14), %r13
leaq 0xcb39f(%rip), %rcx     # 0x120b14
movq %rbx, %rdi
movq %r13, %rdx
callq 0x55ab8
addq $0xc, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef34e
movq %rax, 0x40(%r14)
leaq 0xcb384(%rip), %rsi     # 0x120b1f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq (%r15), %rsi
leaq 0xcb37d(%rip), %rcx     # 0x120b2f
movq %rbx, %rdi
movq %r13, %rdx
callq 0x55ab8
addq $0xc, (%r15)
movq 0x90(%r14), %rax
addq 0x80(%r14), %rax
addq 0xa0(%r14), %rax
imulq 0x20(%r14), %rax
cmpq %rax, 0x40(%r14)
jle 0x5580c
leaq 0xcb352(%rip), %rsi     # 0x120b3a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r12, %rdi
callq 0xf6bb0
jmp 0x55907
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r12, %rdi
callq 0xf6bb0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xe958c
movq 0x30(%r14), %rax
imulq 0x8(%r14), %rax
movq 0x20(%r14), %rdx
imulq 0x78(%r14), %rdx
addq %rax, %rdx
leaq 0xcb343(%rip), %rsi     # 0x120b8d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movl $0x50, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r15
movl $0x1, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x55b2f
testl %eax, %eax
je 0x558e4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
cmpl $0x1, 0x2c(%r15)
jne 0x558d3
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x562f3
testl %eax, %eax
je 0x558e4
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x2, %ecx
callq 0x562f3
jmp 0x558e4
leaq 0xcb2d1(%rip), %rsi     # 0x120bab
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq 0x48(%r15), %rsi
movq %rbx, %rdi
callq 0xe9752
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe9752
movl 0x10(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
movq 0xa8(%r14), %rsi
movq %rbx, %rdi
callq 0xeb864
movq 0xb0(%r14), %rsi
testq %rsi, %rsi
je 0x55993
leaq 0x18(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0xeb9f8
testl %eax, %eax
je 0x55984
leaq 0x10(%rsp), %r15
leaq 0x18(%rsp), %r12
movq 0x18(%rsp), %r13
movq 0x8(%r13), %rdi
callq 0xf6bb0
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe9752
movq $0x0, 0x18(%rsp)
movq 0xb0(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0xeb9f8
testl %eax, %eax
jne 0x55949
movq 0xb0(%r14), %rsi
movq %rbx, %rdi
callq 0xeb864
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq