// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/iso9660.c
// Function: do_directory
static void do_directory(deark *c, lctx *d, i64 pos1, i64 len, int nesting_level)
{
	struct dir_record *dr = NULL;
	i64 pos = pos1;
	int saved_indent_level;
	int idx = 0;

	de_dbg_indent_save(c, &saved_indent_level);
	if(pos1<=0) goto done;

	if((len>=0x08000000LL) & (d->dirsize_hack_state!=0)) {
		// A few CDs seem to have garbage in the high bits of the directory length fields.
		// Examples:
		//  https://archive.org/details/NIghtsOwl
		//  https://archive.org/details/SDN1__793

		if(d->dirsize_hack_state<0) {
			de_warn(c, "Possibly corrupt directory length found (0x%08x). Enabling workaround.", (UI)len);
			d->dirsize_hack_state = 1;
		}
		len &= 0x07ffffffLL;
	}

	de_dbg(c, "directory at %"I64_FMT", len=%"I64_FMT, pos1, len);
	de_dbg_indent(c, 1);

	if(!de_inthashtable_add_item(c, d->dirs_seen, pos1, NULL)) {
		de_warn(c, "Duplicate directory or loop detected (@%"I64_FMT")", pos1);
		goto done;
	}

	if(nesting_level>MAX_NESTING_LEVEL) {
		de_err(c, "Maximum directory nesting level exceeded");
		goto done;
	}

	if(pos1+len > c->infile->len) {
		de_warn(c, "Directory at %"I64_FMT" goes beyond end of file (size=%"I64_FMT")",
			pos1, len);
	}

	while(1) {
		int ret;

		if(pos >= pos1+len) break;
		if(pos >= c->infile->len) break;

		// Peek at the first byte of the dir record (the length)
		if(pos%d->secsize != 0) {
			if(de_getbyte(pos)==0) {
				// No more dir records in this sector; advance to the next sector
				pos = de_pad_to_n(pos, d->secsize);
			}

			if(pos >= pos1+len) break;
			if(pos >= c->infile->len) break;
		}

		de_dbg(c, "file/dir record at %"I64_FMT" (item[%d] in dir@%"I64_FMT")", pos,
			idx, pos1);
		dr = de_malloc(c, sizeof(struct dir_record));
		de_dbg_indent(c, 1);
		ret = do_directory_record(c, d, pos, dr, nesting_level);
		de_dbg_indent(c, -1);
		if(!ret) break;
		if(dr->len_dir_rec<1) break;

		pos += dr->len_dir_rec; // + ext_len??
		free_dir_record(c, dr);
		dr = NULL;
		idx++;
	}

done:
	if(dr) free_dir_record(c, dr);
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r8, 0x80(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xb8(%rsp), %rsi
callq 0xe958c
testq %r12, %r12
jle 0x8c4f7
cmpq $0x8000000, %r14        # imm = 0x8000000
setl %cl
movq %rbx, 0x40(%rsp)
movl 0xc(%rbx), %eax
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x8c499
testl %eax, %eax
jns 0x8c492
leaq 0xa19a9(%rip), %rsi     # 0x12de22
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9b27
movq 0x40(%rsp), %rax
movl $0x1, 0xc(%rax)
andl $0x7ffffff, %r14d       # imm = 0x7FFFFFF
leaq 0xa19c9(%rip), %rsi     # 0x12de69
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x40(%rsp), %rax
movq 0x38(%rax), %rsi
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xeb96a
testl %eax, %eax
je 0x8c4fc
cmpl $0x21, 0x80(%rsp)
jl 0x8c544
leaq 0xa19c7(%rip), %rsi     # 0x12deaf
xorl %r13d, %r13d
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x8c513
xorl %r13d, %r13d
jmp 0x8c513
leaq 0xa1980(%rip), %rsi     # 0x12de83
xorl %r13d, %r13d
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9b27
testq %r13, %r13
je 0x8c523
movq %r15, %rdi
movq %r13, %rsi
callq 0x8e2ca
movl 0xb8(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%r14,%r12), %rcx
movq 0x18(%r15), %rax
cmpq 0x18(%rax), %rcx
movq %rcx, 0x50(%rsp)
jle 0x8c573
leaq 0xa197a(%rip), %rsi     # 0x12ded8
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe9b27
movq 0x50(%rsp), %rcx
movq 0x80(%rsp), %rax
incl %eax
movl %eax, 0xb4(%rsp)
xorl %r13d, %r13d
movq %r12, %rbx
movl $0x0, 0x64(%rsp)
movq %r15, 0x10(%rsp)
movq 0x40(%rsp), %r14
movq %r12, 0x130(%rsp)
cmpq %rcx, %rbx
jge 0x8c857
movq 0x18(%r15), %rdi
cmpq 0x18(%rdi), %rbx
jge 0x8c857
movq %rbx, %rax
cqto
idivq 0x18(%r14)
testq %rdx, %rdx
je 0x8c600
movq %rbx, %rsi
callq 0xef0d5
testb %al, %al
jne 0x8c5e4
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xea80b
movq %rax, %rbx
movq 0x50(%rsp), %rcx
cmpq %rcx, %rbx
jge 0x8c857
movq 0x18(%r15), %rax
cmpq 0x18(%rax), %rbx
jge 0x8c857
movq %r15, %rdi
leaq 0xa1902(%rip), %rsi     # 0x12df0c
movq %rbx, %rdx
movl 0x64(%rsp), %ecx
movq %r12, %r8
xorl %eax, %eax
callq 0xe9226
movl $0xb0, %esi
movq %r15, %rdi
callq 0xe969b
movq %rax, %r13
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq %rbx, 0x58(%rsp)
movq %rbx, 0x20(%rsp)
movq 0x18(%r15), %rdi
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movq %rdx, 0x10(%r13)
movq %r15, %rdi
leaq 0xa18d5(%rip), %rsi     # 0x12df39
xorl %eax, %eax
callq 0xe9226
cmpq $0x0, 0x10(%r13)
jle 0x8c866
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movq %rdx, 0x18(%r13)
movq %r15, %rdi
leaq 0xa18b6(%rip), %rsi     # 0x12df49
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq 0x20(%rsp), %rsi
addq $0x4, %rsi
callq 0xef32a
addq $0x8, 0x20(%rsp)
movq %rax, 0x30(%r13)
movq 0x18(%r14), %rdx
imulq %rax, %rdx
movq %r15, %rdi
leaq 0xa1898(%rip), %rsi     # 0x12df60
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq 0x20(%rsp), %rsi
addq $0x4, %rsi
callq 0xef32a
addq $0x8, 0x20(%rsp)
movq %rax, 0x20(%r13)
movq %r15, %rdi
leaq 0xa15c5(%rip), %rsi     # 0x12dcbc
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x20(%rsp), %rsi
movq 0x48(%r14), %rax
cmpb $0x1, 0x28(%rax)
movl $0x0, %edx
adcl $0x6, %edx
leaq 0x48(%r13), %r14
movq %r15, %rdi
movq %r14, %rcx
callq 0x8e2fe
movq %r15, %rdi
movq %r14, %rsi
movq 0x40(%rsp), %r14
leaq 0xa184a(%rip), %rdx     # 0x12df80
callq 0x8e262
movq 0x48(%r14), %rax
cmpb $0x1, 0x28(%rax)
adcq $0x6, 0x20(%rsp)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef14d
movb %al, (%r13)
movq %r15, %rdi
callq 0xf6870
testb $0x1, (%r13)
movq %rax, 0x38(%rsp)
je 0x8c783
movq 0x38(%rsp), %rdi
leaq 0xa1816(%rip), %rsi     # 0x12df8f
callq 0xf7566
movq 0x38(%rsp), %rax
testb $0x2, (%r13)
je 0x8c7a5
movq 0x38(%rsp), %rdi
leaq 0x873dc(%rip), %rsi     # 0x113b72
callq 0xf7566
movq 0x38(%rsp), %rax
movb $0x1, 0x1(%r13)
testb $0x4, (%r13)
je 0x8c7c2
movq 0x38(%rsp), %rdi
leaq 0xa17de(%rip), %rsi     # 0x12df96
callq 0xf7566
movq 0x38(%rsp), %rax
testb $0x8, (%r13)
je 0x8c7e4
movq 0x38(%rsp), %rdi
leaq 0xa17d1(%rip), %rsi     # 0x12dfa6
callq 0xf7566
movq 0x38(%rsp), %rax
movb $0x1, 0x9(%r13)
testb $0x10, (%r13)
je 0x8c801
movq 0x38(%rsp), %rdi
leaq 0xa17bd(%rip), %rsi     # 0x12dfb4
callq 0xf7566
movq 0x38(%rsp), %rax
cmpb $0x0, (%r13)
jns 0x8c823
movq 0x38(%rsp), %rdi
leaq 0xa17aa(%rip), %rsi     # 0x12dfbe
callq 0xf7566
movq 0x38(%rsp), %rax
movb $0x1, 0x9(%r13)
movzbl (%r13), %ebp
movq %rax, %rdi
callq 0xf7557
movq %r15, %rdi
leaq 0xa1791(%rip), %rsi     # 0x12dfcb
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x48(%r14), %rax
cmpb $0x0, 0x28(%rax)
je 0x8c86d
incq 0x20(%rsp)
jmp 0x8c88f
xorl %eax, %eax
testb %al, %al
jne 0x8c5a4
jmp 0x8c513
xorl %edi, %edi
jmp 0x8d5a7
movq 0x18(%r15), %rdi
leaq 0x20(%rsp), %rsi
callq 0xef14d
movzbl %al, %edx
movq %r15, %rdi
leaq 0xa175b(%rip), %rsi     # 0x12dfe3
xorl %eax, %eax
callq 0xe9226
movq 0x48(%r14), %rax
cmpb $0x0, 0x28(%rax)
je 0x8c8a1
addq $0x2, 0x20(%rsp)
jmp 0x8c8cf
movq 0x18(%r15), %rdi
leaq 0x20(%rsp), %rsi
callq 0xef14d
movzbl %al, %ebp
movq %r15, %rdi
leaq 0xa173a(%rip), %rsi     # 0x12dff6
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
testb %bpl, %bpl
je 0x8c8cf
movb $0x1, 0x9(%r13)
movq 0x18(%r15), %rdi
movq 0x20(%rsp), %rsi
addq $0x2, %rsi
callq 0xef169
addq $0x4, 0x20(%rsp)
movq %r15, %rdi
leaq 0xa1285(%rip), %rsi     # 0x12db76
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
leaq 0x20(%rsp), %rsi
callq 0xef14d
movzbl %al, %eax
movq %rax, 0x28(%r13)
movq 0x48(%r14), %rcx
cmpb $0x0, 0x27(%rcx)
je 0x8c952
movq 0x18(%r15), %rdi
movq 0x58(%rsp), %rcx
leaq (%rcx,%rax), %rsi
addq $0x25, %rsi
callq 0xef169
movl %eax, 0xc(%r13)
movq %r15, %rdi
leaq 0xa16d1(%rip), %rsi     # 0x12e00e
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
testb $-0x80, 0xd(%r13)
je 0x8c952
movb $0x1, 0x1(%r13)
movl $0xff, %ebx
cmpb $0x0, 0x1(%r13)
je 0x8c976
cmpq $0x1, 0x28(%r13)
jne 0x8c976
movq 0x18(%r15), %rdi
movq 0x20(%rsp), %rsi
callq 0xef0d5
movzbl %al, %ebx
movl $0x401, %ebp            # imm = 0x401
cmpl $0x2, %ebx
jb 0x8c99f
movq 0x48(%r14), %rax
movl 0x20(%rax), %ebp
testl %ebp, %ebp
jne 0x8c99f
movl $0x1, %ebp
cmpb $0x0, 0x2a(%rax)
jne 0x8c99f
movl (%r14), %ebp
cmpl $0x1, %ebp
adcl $0x0, %ebp
movq %r15, %rdi
callq 0xf6870
movq %rax, 0x38(%r13)
movq 0x18(%r15), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%r13), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0xf01b0
movq 0x38(%r13), %rdi
callq 0xf7557
movq %r15, %rdi
leaq 0xa164a(%rip), %rsi     # 0x12e023
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpb $0x0, 0x8(%r14)
movq 0x58(%rsp), %r8
je 0x8c9fd
movq 0x48(%r14), %rax
cmpb $0x0, 0x25(%rax)
je 0x8cadd
cmpl $0x1, %ebx
je 0x8ca1c
testl %ebx, %ebx
jne 0x8ca21
movb $0x1, 0x2(%r13)
cmpl $0x0, 0x80(%rsp)
jne 0x8ca21
movb $0x1, 0x4(%r13)
jmp 0x8ca21
movb $0x1, 0x3(%r13)
movq 0x28(%r13), %rax
movl %eax, %r12d
addq 0x20(%rsp), %rax
notl %r12d
andl $0x1, %r12d
addq %rax, %r12
movq %r12, 0x20(%rsp)
movq 0x10(%r13), %r15
addq %r8, %r15
subq %r12, %r15
testq %r15, %r15
jle 0x8d54c
movq 0x48(%r14), %rax
cmpb $0x0, 0x27(%rax)
jne 0x8d54c
movq 0x10(%rsp), %rdi
leaq 0xa15fb(%rip), %rsi     # 0x12e064
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe9226
cmpb $0x0, 0x4(%r13)
je 0x8cb1b
cmpq $0x6, %r15
jl 0x8cb2e
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movl $0x6, %ecx
leaq 0xc0(%rsp), %rsi
movq %r12, %rdx
callq 0xeeee8
cmpb $0x53, 0xc0(%rsp)
jne 0x8cb2e
cmpb $0x50, 0xc1(%rsp)
jne 0x8cb2e
cmpb $-0x42, 0xc4(%rsp)
jne 0x8cb2e
cmpb $-0x11, 0xc5(%rsp)
jne 0x8cb2e
movq 0x48(%r14), %rax
movb $0x1, 0x2a(%rax)
xorl %edx, %edx
jmp 0x8cb34
movq 0x38(%r13), %rcx
testq %rcx, %rcx
je 0x8c9fd
movq 0x10(%rcx), %rax
testq %rax, %rax
jle 0x8c9fd
movq 0x8(%rcx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
leal -0x41(%rsi), %edi
cmpl $0x19, %edi
ja 0x8cb0e
orl $0x20, %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x8cafd
jmp 0x8c9fd
movq 0x48(%r14), %rax
cmpb $0x0, 0x2a(%rax)
je 0x8cb2e
movq 0x30(%rax), %rdx
subq %rdx, %r15
jmp 0x8cb34
movq %r15, %rdx
xorl %r15d, %r15d
testq %rdx, %rdx
movq %rdx, %rbp
jle 0x8cc79
movw $0x0, 0x108(%rsp)
movq $0x0, 0x100(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %r14
movl $0xa, %edi
movq %rdx, %rsi
callq 0xea792
movq %r14, %rdi
movq 0x40(%rsp), %r14
leaq 0x100(%rsp), %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0xeeee8
movq %rbp, %rdx
cmpq $0xe, %rbp
jl 0x8cc04
movq 0x48(%r14), %rax
cmpb $0x0, 0x26(%rax)
je 0x8cc04
cmpb $0x58, 0x106(%rsp)
jne 0x8cc04
cmpb $0x41, 0x107(%rsp)
jne 0x8cc04
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa14f7(%rip), %rsi     # 0x12e0b4
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
leaq 0x4(%r12), %rsi
callq 0xef169
movq %rbx, %rdi
leaq 0xa1427(%rip), %rsi     # 0x12e013
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
jmp 0x8cc3f
cmpq $0xe, %rdx
jl 0x8cc46
cmpb $0x41, 0x100(%rsp)
jne 0x8cc46
cmpb $0x41, 0x101(%rsp)
jne 0x8cc46
cmpb $0xe, 0x102(%rsp)
jne 0x8cc46
cmpb $0x2, 0x103(%rsp)
jne 0x8cc46
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x8e679
movq %rbp, %rdx
movb $0x1, %al
jmp 0x8cc7b
cmpq $0xa, %rdx
jl 0x8cc79
movq 0x100(%rsp), %rax
movabsq $0x44454d4948435241, %rcx # imm = 0x44454D4948435241
xorq %rcx, %rax
movzwl 0x108(%rsp), %ecx
xorq $0x5345, %rcx           # imm = 0x5345
orq %rax, %rcx
je 0x8d699
xorl %eax, %eax
testq %rdx, %rdx
setle %cl
orb %al, %cl
jne 0x8cce7
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa1401(%rip), %rsi     # 0x12e095
xorl %eax, %eax
callq 0xe9226
movq %rbp, %rdx
cmpl $0x2, (%rbx)
jl 0x8cce7
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r12, %rdx
movq %rbp, %rcx
xorl %r9d, %r9d
callq 0xe975a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %rbp, %rdx
movq 0x48(%r14), %rax
cmpb $0x0, 0x2a(%rax)
je 0x8d54c
testq %r15, %r15
jle 0x8d54c
addq %r12, %rdx
movq %r13, %rax
addq $0x58, %rax
movq %rax, 0x138(%rsp)
movq %r13, 0x18(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0xbc(%rsp), %rsi
movq %rdx, %rbx
callq 0xe958c
movq %r12, %rdi
leaq 0xa13c8(%rip), %rsi     # 0x12e104
movq %rbx, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe9226
movq %r12, %rdi
movl $0x1, %esi
callq 0xe9585
movq %r15, 0x68(%rsp)
movq %rbx, 0x88(%rsp)
leaq (%r15,%rbx), %rax
movq 0x48(%rsp), %r15
leaq 0x4(%r15), %r14
movq %rax, 0xf8(%rsp)
cmpq %rax, %r14
jle 0x8cda6
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
jmp 0x8d4d9
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x18(%r12), %rdi
movq %r15, %rsi
leaq 0x100(%rsp), %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0xf1d74
addq $0x2, 0x48(%rsp)
movq 0x18(%r12), %rdi
leaq 0x48(%rsp), %rsi
callq 0xef14d
cmpb $0x4, %al
jb 0x8d4d9
movzbl %al, %r13d
leaq (%r15,%r13), %rax
movq %rax, 0x28(%rsp)
cmpq 0xf8(%rsp), %rax
jg 0x8d4d4
leaq -0x4(%r13), %rbp
movq 0x18(%r12), %rdi
leaq 0x48(%rsp), %rsi
callq 0xef14d
movq %r12, %rbx
movl %eax, %r12d
movzbl %al, %r9d
movl %ebp, (%rsp)
movq %rbx, %rdi
leaq 0xa12d4(%rip), %rsi     # 0x12e11d
leaq 0x110(%rsp), %rdx
movq %r15, %rcx
movl %r13d, %r8d
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl 0x104(%rsp), %eax
cmpl $0x5345, %eax           # imm = 0x5345
jle 0x8cf82
cmpl $0x5353, %eax           # imm = 0x5353
jle 0x8d042
cmpl $0x5446, %eax           # imm = 0x5446
je 0x8d280
cmpl $0x5a46, %eax           # imm = 0x5A46
jne 0x8d39e
movq %r14, 0x70(%rsp)
movq 0x18(%rsp), %rax
movb $0x1, 0x9(%rax)
cmpb $0x10, %r13b
movq 0x10(%rsp), %r12
jb 0x8d47f
movq 0x18(%r12), %rdi
movq %r14, %rsi
leaq 0xc0(%rsp), %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0xf1d74
movq %r12, %rdi
leaq 0xa1380(%rip), %rsi     # 0x12e262
leaq 0xd0(%rsp), %rdx
xorl %eax, %eax
callq 0xe9226
addq $0x2, 0x70(%rsp)
movq 0x18(%r12), %rdi
leaq 0x70(%rsp), %rbx
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
leal (,%rdx,4), %ecx
movq %r12, %rdi
leaq 0xa135a(%rip), %rsi     # 0x12e277
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %ecx
movl $0x1, %eax
shll %cl, %eax
movq %r12, %rdi
leaq 0xa134d(%rip), %rsi     # 0x12e292
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r12), %rdi
movq 0x70(%rsp), %rsi
addq $0x4, %rsi
callq 0xef32a
addq $0x8, 0x70(%rsp)
movq %r12, %rdi
leaq 0xa133b(%rip), %rsi     # 0x12e2ae
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x8d47f
cmpl $0x4e4c, %eax           # imm = 0x4E4C
jg 0x8d0ac
cmpl $0x4345, %eax           # imm = 0x4345
je 0x8d14a
cmpl $0x4552, %eax           # imm = 0x4552
jne 0x8d3a9
movq %r14, 0xc0(%rsp)
cmpb $0x8, %r13b
jb 0x8d412
movq 0x18(%rsp), %rax
cmpb $0x0, 0x4(%rax)
movl $0x0, %ebp
movq 0x10(%rsp), %r12
je 0x8d477
movq 0x18(%r12), %rdi
leaq 0xc0(%rsp), %rbx
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %r14d
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %r15d
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %ebp
movq 0x18(%r12), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movq %r12, %rdi
leaq 0xa11a0(%rip), %rsi     # 0x12e1c2
xorl %eax, %eax
callq 0xe9226
leal (%r14,%r15), %eax
addl %ebp, %eax
addl $0x8, %eax
cmpl %r13d, %eax
jbe 0x8d41b
xorl %ebp, %ebp
jmp 0x8d477
cmpl $0x5346, %eax           # imm = 0x5346
je 0x8d136
cmpl $0x5350, %eax           # imm = 0x5350
jne 0x8d3a9
cmpb $0x7, %r13b
movq 0x40(%rsp), %rbx
movq 0x28(%rsp), %r14
jb 0x8d406
movq 0x18(%rsp), %r13
cmpb $0x0, 0x4(%r13)
movq 0x10(%rsp), %r12
je 0x8d489
movq 0x18(%r12), %rdi
addq $0x6, %r15
movq %r15, %rsi
callq 0xef0d5
movzbl %al, %edx
movq 0x48(%rbx), %rax
movq %rdx, 0x30(%rax)
movq %r12, %rdi
leaq 0xa10a1(%rip), %rsi     # 0x12e148
jmp 0x8d1da
cmpl $0x4e4d, %eax           # imm = 0x4E4D
je 0x8d1e6
cmpl $0x5058, %eax           # imm = 0x5058
jne 0x8d3a9
cmpb $0x24, %r13b
jb 0x8d394
movq 0x10(%rsp), %r12
movq 0x18(%r12), %rdi
addq $0x8, %r15
movq %r15, %rsi
callq 0xef32a
movq %rax, %r14
movq %r12, %rdi
leaq 0xa1132(%rip), %rsi     # 0x12e221
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
testl $0x7000, %r14d          # imm = 0x7000
movq 0x18(%rsp), %r13
je 0x8d4b4
andl $0xf000, %r14d          # imm = 0xF000
cmpl $0x4000, %r14d          # imm = 0x4000
je 0x8d484
cmpl $0xa000, %r14d          # imm = 0xA000
jne 0x8d4c1
movb $0x1, 0x7(%r13)
jmp 0x8d484
movq 0x18(%rsp), %r13
movb $0x1, 0x9(%r13)
movq 0x10(%rsp), %r12
jmp 0x8d484
cmpb $0x1c, %r13b
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %r14
jb 0x8d489
movq 0x18(%r12), %rdi
leaq 0x8(%r15), %rsi
callq 0xef32a
movq %r12, %rdi
leaq 0xa0fdf(%rip), %rsi     # 0x12e15a
movq %rax, 0xa0(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r12), %rdi
leaq 0x10(%r15), %rsi
callq 0xef32a
movq %r12, %rdi
leaq 0xa0fdb(%rip), %rsi     # 0x12e17f
movq %rax, 0x98(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r12), %rdi
addq $0x18, %r15
movq %r15, %rsi
callq 0xef32a
movq %r12, %rdi
leaq 0xa0fd2(%rip), %rsi     # 0x12e1a2
movq %rax, 0x90(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
jmp 0x8d489
movq 0x10(%rsp), %r12
movq 0x18(%r12), %rdi
movq %r14, %rsi
callq 0xef0d5
movzbl %al, %edx
movq %r12, %rdi
leaq 0xa2b65(%rip), %rsi     # 0x12fd6a
xorl %eax, %eax
callq 0xe9226
cmpb $0x6, %r13b
jb 0x8d47f
movq 0x18(%rsp), %rbx
cmpq $0x0, 0x40(%rbx)
movq 0x28(%rsp), %r14
jne 0x8d233
movq %r12, %rdi
callq 0xf6870
movq %rax, 0x40(%rbx)
movq 0x18(%r12), %rdi
addq $0x5, %r15
addq $-0x5, %r13
movq 0x40(%rbx), %rcx
movq 0x40(%rsp), %rax
movl 0x4(%rax), %r9d
movq %r15, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
callq 0xf01b0
movq 0x40(%rbx), %rdi
callq 0xf7557
movq %r12, %rdi
leaq 0xa0f9d(%rip), %rsi     # 0x12e20b
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %r13
jmp 0x8d489
movq %r14, 0xa8(%rsp)
cmpl $0x4, %r13d
je 0x8d394
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xef14d
movb %al, 0x37(%rsp)
movzbl %al, %r14d
testb %r14b, %r14b
movl $0x11, %ecx
movl $0x7, %eax
cmovnsq %rax, %rcx
movq %rcx, 0x140(%rsp)
leaq 0xa0434(%rip), %r12     # 0x12d704
xorl %r13d, %r13d
btl %r13d, %r14d
jae 0x8d383
movq 0xa8(%rsp), %rsi
cmpb $0x0, 0x37(%rsp)
js 0x8d305
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
leaq 0x70(%rsp), %r15
movq %r15, %rcx
callq 0x8e2fe
jmp 0x8d31c
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
leaq 0x70(%rsp), %r15
movq %r15, %rcx
callq 0x8e08b
movslq (%r12), %rcx
leaq 0xa03dd(%rip), %rax     # 0x12d704
addq %rax, %rcx
movl $0x20, %esi
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdi
leaq 0xa0f19(%rip), %rdx     # 0x12e25a
xorl %eax, %eax
callq 0xe8d67
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x8e262
cmpq $0x1, %r13
jne 0x8d373
cmpb $0x0, 0x70(%rsp)
je 0x8d373
movups 0x70(%rsp), %xmm0
movq 0x138(%rsp), %rax
movups %xmm0, (%rax)
movq 0x140(%rsp), %rax
addq %rax, 0xa8(%rsp)
incq %r13
addq $0x4, %r12
cmpq $0x7, %r13
jne 0x8d2d3
movq 0x10(%rsp), %r12
jmp 0x8d47f
cmpl $0x5354, %eax           # imm = 0x5354
je 0x8d4cf
cmpb $0x2, %r12b
movq 0x28(%rsp), %r14
jne 0x8d3d3
cmpb $0xe, %r13b
jne 0x8d3d3
cmpl $0x4141, %eax           # imm = 0x4141
jne 0x8d3d3
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8e679
jmp 0x8d40b
movq 0x10(%rsp), %r12
cmpl $0x2, (%r12)
jl 0x8d40b
movq 0x18(%r12), %rsi
movq 0x48(%rsp), %rdx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r12, %rdi
movq %rbp, %rcx
xorl %r9d, %r9d
callq 0xe975a
jmp 0x8d40b
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r13
jmp 0x8d489
xorl %ebp, %ebp
movq 0x10(%rsp), %r12
jmp 0x8d477
movq %r12, %rdi
callq 0xf6870
movq %rbp, %r13
movq %rax, %rbp
movq %r12, %rdi
xorl %esi, %esi
leaq 0xa0da3(%rip), %rdx     # 0x12e1d8
movq %rbx, %rcx
movq %r14, %r8
movq %rax, %r9
callq 0x8dfe7
movq %r12, %rdi
xorl %esi, %esi
leaq 0xa0d96(%rip), %rdx     # 0x12e1e5
movq %rbx, %rcx
movq %r15, %r8
movq %rbp, %r9
callq 0x8dfe7
movq %r12, %rdi
xorl %esi, %esi
leaq 0xa0d91(%rip), %rdx     # 0x12e1fa
movq %rbx, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x8dfe7
movq %rbp, %rdi
callq 0xf6bb0
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %r14
movq %r14, 0x48(%rsp)
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x48(%rsp), %r15
leaq 0x4(%r15), %r14
cmpq 0xf8(%rsp), %r14
jle 0x8cdca
jmp 0x8d4d9
testb $0x49, %r14b
je 0x8d4c8
movb $0x1, 0x5(%r13)
jmp 0x8d484
movb $0x1, 0x8(%r13)
jmp 0x8d484
movb $0x1, 0x6(%r13)
jmp 0x8d484
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r13
movl 0xbc(%rsp), %esi
movq %r12, %rdi
callq 0xe9595
movq 0xa0(%rsp), %rbx
testq %rbx, %rbx
je 0x8d530
movq 0x40(%rsp), %r14
imulq 0x18(%r14), %rbx
addq 0x98(%rsp), %rbx
movq 0x38(%r14), %rsi
movq %r12, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xeb96a
testl %eax, %eax
setne %al
movq 0x68(%rsp), %r15
cmovneq 0x90(%rsp), %r15
movq %rbx, %rdx
jmp 0x8d544
xorl %eax, %eax
movq 0x40(%rsp), %r14
movq 0x68(%rsp), %r15
movq 0x88(%rsp), %rdx
testb %al, %al
jne 0x8cd15
cmpb $0x0, 0x78(%r13)
je 0x8d57d
testb $0x1, 0x8d(%r13)
je 0x8d57d
movq 0x38(%r13), %rdi
callq 0xf6c00
testl %eax, %eax
je 0x8d57d
movq 0x38(%r13), %rax
movq 0x8(%rax), %rax
cmpl $0x5f, (%rax)
jne 0x8d57d
movl $0x21, (%rax)
cmpq $0x0, 0x18(%r13)
movq 0x10(%rsp), %r15
movq 0x130(%rsp), %r12
jle 0x8d5ca
movq %r15, %rdi
leaq 0xa0a96(%rip), %rsi     # 0x12e031
xorl %eax, %eax
callq 0xe9df7
movq 0x38(%rsp), %rdi
callq 0xf6bb0
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
xorl %eax, %eax
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %rbx
jmp 0x8c859
movb 0x1(%r13), %al
testb %al, %al
je 0x8d5eb
cmpb $0x0, 0x2(%r13)
jne 0x8d5e0
cmpb $0x0, 0x3(%r13)
je 0x8d63f
testb %al, %al
je 0x8d5eb
cmpb $0x0, 0x4(%r13)
je 0x8d5f9
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x8e401
movq 0x38(%rsp), %rdi
callq 0xf6bb0
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x10(%r13), %rax
testq %rax, %rax
jle 0x8d5b9
movq 0x58(%rsp), %rbx
addq %rax, %rbx
movq %r15, %rdi
movq %r13, %rsi
callq 0x8e2ca
incl 0x64(%rsp)
movb $0x1, %al
xorl %r13d, %r13d
movq 0x50(%rsp), %rcx
jmp 0x8c859
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x8e401
movq 0x40(%r13), %rdi
callq 0xf6c00
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x30(%r14), %rdi
movq 0x38(%r13,%rcx,8), %rsi
callq 0xf7705
movq 0x18(%r14), %rdx
imulq 0x30(%r13), %rdx
movq 0x20(%r13), %rcx
movq %r15, %rdi
movq %r14, %rsi
movl 0xb4(%rsp), %r8d
callq 0x8c418
movq 0x30(%r14), %rdi
callq 0xf76c8
jmp 0x8d5f9
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa0a40(%rip), %rsi     # 0x12e0e8
movq %rdx, 0x88(%rsp)
movq %r12, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
cmpq $0x16, 0x88(%rsp)
jl 0x8d773
leaq 0xa(%r12), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %r15, 0x68(%rsp)
leaq 0xc0(%rsp), %r15
movq %r15, %rdx
callq 0xf978c
leaq 0xe0(%rsp), %rax
movups (%rax), %xmm0
movups %xmm0, 0x68(%r13)
leaq 0x12(%r12), %rcx
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq 0x68(%rsp), %r15
xorl %r8d, %r8d
callq 0xf9878
movb $0x1, 0x78(%r13)
movaps 0xc0(%rsp), %xmm0
movaps 0xd0(%rsp), %xmm1
movaps 0xe0(%rsp), %xmm2
movups %xmm0, 0x80(%r13)
movups %xmm1, 0x90(%r13)
movups %xmm2, 0xa0(%r13)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movb $0x1, %al
movq %rbp, %rdx
jmp 0x8cc7b