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

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

	if(!do_header(c, d, 0)) goto done;

	do_directory(c, d, d->dir_pos);

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x10, %esi
callq 0xe969b
movq %rax, %r14
leaq 0x6643d(%rip), %rsi     # 0x13935e
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xef37e
movq %rax, (%r14)
leaq 0x6d45e(%rip), %rsi     # 0x1403b0
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0xef37e
movq %rax, 0x8(%r14)
leaq 0x6d444(%rip), %rsi     # 0x1403bb
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r14, 0x8(%rsp)
movq 0x8(%r14), %r15
leaq 0x6d427(%rip), %rsi     # 0x1403c7
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
testq %r15, %r15
js 0xd3150
movq 0x18(%rbx), %rax
cmpq %r15, 0x18(%rax)
jle 0xd3150
movq 0x8(%rsp), %rax
movq (%rax), %rax
decq %rax
cmpq $0x270f, %rax           # imm = 0x270F
ja 0xd3150
xorl %r13d, %r13d
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
addq $-0x10, %rax
cmpq %rax, %r15
jg 0xd3150
movq %rbx, %rdi
leaq 0x6d3cd(%rip), %rsi     # 0x1403d7
movl %r13d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef37e
movq %rax, %rbp
movq %rbx, %rdi
leaq 0x40a8e(%rip), %rsi     # 0x113acb
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0x4(%r15), %rsi
callq 0xef37e
movq %rax, %r12
movq %rbx, %rdi
leaq 0x3f949(%rip), %rsi     # 0x1129a9
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0x8(%r15), %rsi
movl $0x8, %edx
movl $0x8, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0xefe67
movq %rax, %r14
movq 0x18(%rax), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0x4f4d0(%rip), %rsi     # 0x122573
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
testq %r12, %r12
setle %al
testq %rbp, %rbp
sets %cl
orb %al, %cl
jne 0xd3123
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
cmpq %rbp, %rax
setle %cl
leaq (%r12,%rbp), %rdx
cmpq %rax, %rdx
setg %al
orb %cl, %al
jne 0xd3123
movq %rbx, %rdi
callq 0xea9a9
movq %rax, 0x10(%rsp)
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0xea9e4
movq 0x10(%rsp), %r8
movb $0x1, 0x8(%r8)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r8, %r12
xorl %r9d, %r9d
callq 0xf0321
movq %rbx, %rdi
movq %r12, %rsi
callq 0xea9b3
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf00aa
incq %r13
addq $0x10, %r15
movq 0x8(%rsp), %rax
cmpq (%rax), %r13
jl 0xd2feb
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9752