// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rsi
callq 0xdecaf
movq %rax, %r12
leaq 0x62db7(%rip), %rsi     # 0x12c3ee
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xdeba7
movq 0x18(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0xe409f
movq %rax, (%r12)
leaq 0x69dd9(%rip), %rsi     # 0x133440
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
pushq $0x8
popq %rsi
callq 0xe409f
movq %rax, 0x8(%r12)
leaq 0x69dc0(%rip), %rsi     # 0x13344b
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x8(%r12), %r15
leaq 0x69da9(%rip), %rsi     # 0x133457
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %ebp, %esi
callq 0xdeba7
testq %r15, %r15
js 0xc96e8
movq 0x18(%rbx), %rax
cmpq %r15, 0x18(%rax)
jle 0xc96e8
movq (%r12), %rax
leaq -0x2711(%rax), %rcx
cmpq $-0x2710, %rcx          # imm = 0xD8F0
jae 0xc970c
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %rbx, %rdi
movq %r12, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xded32
xorl %edx, %edx
movq %r12, 0x8(%rsp)
cmpq %rax, %rdx
jge 0xc96e8
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
addq $-0x10, %rax
cmpq %rax, %r15
jg 0xc96e8
movq %rbx, %rdi
leaq 0x69d34(%rip), %rsi     # 0x133467
movq %rdx, 0x10(%rsp)
movl %r15d, %ecx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0xdeba7
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe409f
movq %rax, %r13
movq %rbx, %rdi
leaq 0x3d3b1(%rip), %rsi     # 0x106b1b
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x4(%r15), %rsi
callq 0xe409f
movq %rax, %rbp
movq %rbx, %rdi
leaq 0x3c20b(%rip), %rsi     # 0x105999
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x8(%r15), %rsi
pushq $0x8
popq %rcx
movq %rcx, %rdx
movl %r14d, %r8d
movl %r14d, %r9d
callq 0xe495c
movq %rax, %r14
movq 0x18(%rax), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0x4bdf5(%rip), %rsi     # 0x1155bb
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
testq %rbp, %rbp
setle %al
testq %r13, %r13
sets %cl
orb %al, %cl
jne 0xc9847
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
cmpq %r13, %rax
setle %cl
movq %rbp, %rdx
addq %r13, %rdx
cmpq %rax, %rdx
setg %al
orb %cl, %al
jne 0xc9847
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r12
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0xdfd55
movb $0x1, 0x8(%r12)
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0xe4e0b
movq %rbx, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %r12
callq 0xdfd24
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe4b94
movq 0x10(%rsp), %rdx
incq %rdx
movq (%r12), %rax
addq $0x10, %r15
jmp 0xc9713