// File: /workspace/github_c_makefile_star2_O2/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, 0x48(%rsp)
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
leaq 0x68(%rsp), %rsi
callq 0xdebae
testq %rbx, %rbx
jle 0x87ce9
cmpq $0x8000000, %r14        # imm = 0x8000000
setl %cl
movl 0xc(%r12), %eax
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x86b69
testl %eax, %eax
jns 0x86b62
leaq 0x9a35e(%rip), %rsi     # 0x120eaa
movq %r13, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xdf05a
movl $0x1, 0xc(%r12)
andl $0x7ffffff, %r14d       # imm = 0x7FFFFFF
leaq 0x9a381(%rip), %rsi     # 0x120ef1
movq %r13, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0xdeba7
movq 0x38(%r12), %rsi
movq %r13, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xe0a0b
testl %eax, %eax
je 0x86bc1
movq 0x48(%rsp), %rdx
cmpl $0x21, %edx
jl 0x86bda
leaq 0x9a385(%rip), %rsi     # 0x120f37
movq %r13, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x87ce9
leaq 0x9a343(%rip), %rsi     # 0x120f0b
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xdf05a
jmp 0x87ce9
leaq (%r14,%rbx), %rcx
movq 0x18(%r13), %rax
movq %rcx, 0xb0(%rsp)
cmpq 0x18(%rax), %rcx
jle 0x86c0c
leaq 0x9a369(%rip), %rsi     # 0x120f60
movq %r13, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xdf05a
movq 0x48(%rsp), %rdx
leal 0x1(%rdx), %eax
movl %eax, 0x60(%rsp)
movd 0x99bb5(%rip), %xmm0    # 0x1207d0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3]
movdqa %xmm0, 0x130(%rsp)
movq %rbx, %r14
xorl %ebp, %ebp
movq %rbx, 0xe8(%rsp)
movq %r12, 0x30(%rsp)
cmpq 0xb0(%rsp), %r14
jge 0x87ce9
movq 0x18(%r13), %rdi
cmpq 0x18(%rdi), %r14
jge 0x87ce9
movq %r14, %rax
cqto
idivq 0x18(%r12)
testq %rdx, %rdx
je 0x86ca1
movq %r14, %rsi
callq 0xe3eb4
testb %al, %al
jne 0x86c85
movq 0x18(%r12), %rsi
movq %r14, %rdi
callq 0xdfbb6
movq %rax, %r14
cmpq 0xb0(%rsp), %r14
jge 0x87ce9
movq 0x18(%r13), %rax
cmpq 0x18(%rax), %r14
jge 0x87ce9
movq %r13, %rdi
leaq 0x9a2e9(%rip), %rsi     # 0x120f94
movq %r14, %rdx
movl %ebp, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0xde896
movl $0xb0, %esi
movq %r13, %rdi
callq 0xdecaf
movq %rax, %r15
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq %r14, 0x38(%rsp)
movq 0x18(%r13), %rdi
leaq 0x38(%rsp), %rbx
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %edx
movq %rdx, 0x10(%r15)
movq %r13, %rdi
leaq 0x9a2c5(%rip), %rsi     # 0x120fc1
xorl %eax, %eax
callq 0xde896
cmpq $0x0, 0x10(%r15)
movq %r15, 0x10(%rsp)
jle 0x87cac
movq %r14, 0x50(%rsp)
movl %ebp, 0x64(%rsp)
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %edx
movq %rdx, 0x18(%r15)
movq %r13, %rdi
leaq 0x9a298(%rip), %rsi     # 0x120fd1
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0x8857f
movq %rax, 0x30(%r15)
movq 0x18(%r12), %rdx
imulq %rax, %rdx
movq %r13, %rdi
leaq 0x9a285(%rip), %rsi     # 0x120fe8
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0x8857f
movq %rax, 0x20(%r15)
movq %r13, %rdi
leaq 0x99fbe(%rip), %rsi     # 0x120d44
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x38(%rsp), %rsi
movq 0x48(%r12), %rax
cmpb $0x1, 0x28(%rax)
movl $0x0, %edx
adcl $0x6, %edx
leaq 0x48(%r15), %r14
movq %r13, %rdi
movq %r14, %rcx
callq 0x887b4
movq %r13, %rdi
movq %r14, %rsi
leaq 0x9a247(%rip), %rdx     # 0x121008
callq 0x886eb
movq 0x48(%r12), %rax
cmpb $0x1, 0x28(%rax)
adcq $0x6, 0x38(%rsp)
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movb %al, (%r15)
movq %r13, %rdi
callq 0xeac74
movb (%r15), %cl
movq %rax, %r15
testb $0x1, %cl
je 0x86e0d
movq %r15, %rdi
leaq 0x9a216(%rip), %rsi     # 0x121017
callq 0xeb884
movq 0x10(%rsp), %rax
movb (%rax), %cl
testb $0x2, %cl
je 0x86e2c
movq %r15, %rdi
leaq 0x7fda6(%rip), %rsi     # 0x106bc2
callq 0xeb884
movq 0x10(%rsp), %rax
movb $0x1, 0x1(%rax)
movb (%rax), %cl
testb $0x4, %cl
movq 0x50(%rsp), %r14
je 0x86e4c
movq %r15, %rdi
leaq 0x9a1de(%rip), %rsi     # 0x12101e
callq 0xeb884
movq 0x10(%rsp), %rax
movb (%rax), %cl
testb $0x8, %cl
je 0x86e6b
movq %r15, %rdi
leaq 0x9a1d3(%rip), %rsi     # 0x12102e
callq 0xeb884
movq 0x10(%rsp), %rax
movb $0x1, 0x9(%rax)
movb (%rax), %cl
testb $0x10, %cl
je 0x86e86
movq %r15, %rdi
leaq 0x9a1c2(%rip), %rsi     # 0x12103c
callq 0xeb884
movq 0x10(%rsp), %rax
movb (%rax), %cl
testb %cl, %cl
jns 0x86ea4
movq %r15, %rdi
leaq 0x9a1b2(%rip), %rsi     # 0x121046
callq 0xeb884
movq 0x10(%rsp), %rax
movb $0x1, 0x9(%rax)
movb (%rax), %cl
movzbl %cl, %ebp
movq %r15, %rdi
callq 0xeb877
movq %r13, %rdi
leaq 0x9a19a(%rip), %rsi     # 0x121053
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x48(%r12), %rax
cmpb $0x0, 0x28(%rax)
movq %r15, 0xa8(%rsp)
je 0x86edf
incq 0x38(%rsp)
jmp 0x86f0e
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %edx
movq %r13, %rdi
leaq 0x9a173(%rip), %rsi     # 0x12106b
xorl %eax, %eax
callq 0xde896
movq 0x48(%r12), %rax
cmpb $0x0, 0x28(%rax)
je 0x86fcf
addq $0x2, 0x38(%rsp)
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0x88591
movq %r13, %rdi
leaq 0x99cd4(%rip), %rsi     # 0x120bfe
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %eax
movq 0x10(%rsp), %r15
movq %rax, 0x28(%r15)
movq 0x48(%r12), %rcx
cmpb $0x0, 0x27(%rcx)
je 0x86f8a
movq 0x18(%r13), %rdi
leaq (%r14,%rax), %rsi
addq $0x25, %rsi
callq 0xe3f46
movl %eax, 0xc(%r15)
movq %r13, %rdi
leaq 0x9a121(%rip), %rsi     # 0x121096
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
testb $-0x80, 0xd(%r15)
je 0x86f8a
movb $0x1, 0x1(%r15)
movl $0xff, %ebx
cmpb $0x0, 0x1(%r15)
je 0x86fb8
cmpq $0x1, 0x28(%r15)
jne 0x86fb8
movq 0x18(%r13), %rdi
movq 0x38(%rsp), %rsi
callq 0xe3eb4
movzbl %al, %ebx
movl $0x401, %ebp            # imm = 0x401
cmpb $0x2, %bl
jb 0x87012
movq 0x48(%r12), %rax
movl 0x20(%rax), %ebp
testl %ebp, %ebp
jne 0x87012
cmpb $0x0, 0x2a(%rax)
je 0x87008
pushq $0x1
popq %rbp
jmp 0x87012
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %ebp
movq %r13, %rdi
leaq 0x9a096(%rip), %rsi     # 0x12107e
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
testb %bpl, %bpl
je 0x86f14
movq 0x10(%rsp), %rax
movb $0x1, 0x9(%rax)
jmp 0x86f14
movl (%r12), %ebp
cmpl $0x1, %ebp
adcl $0x0, %ebp
movq %r13, %rdi
callq 0xeac74
movq 0x10(%rsp), %r14
movq %rax, 0x38(%r14)
movq 0x18(%r13), %rdi
movq 0x38(%rsp), %rsi
movq 0x28(%r14), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0xe4c9a
movq 0x38(%r14), %rdi
callq 0xeb877
movq %r13, %rdi
leaq 0x9a05a(%rip), %rsi     # 0x1210ab
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
cmpb $0x0, 0x8(%r12)
je 0x87072
movq 0x48(%r12), %rax
cmpb $0x0, 0x25(%rax)
je 0x8719a
cmpl $0x1, %ebx
je 0x87093
testl %ebx, %ebx
movq 0x10(%rsp), %rcx
movq 0x48(%rsp), %rax
jne 0x8709c
movb $0x1, 0x2(%rcx)
testl %eax, %eax
jne 0x8709c
movb $0x1, 0x4(%rcx)
jmp 0x8709c
movq 0x10(%rsp), %rcx
movb $0x1, 0x3(%rcx)
movq 0x28(%rcx), %rax
movl %eax, %r15d
addq 0x38(%rsp), %rax
notl %r15d
andl $0x1, %r15d
addq %rax, %r15
movq %r15, 0x38(%rsp)
movq 0x10(%rcx), %r14
addq 0x50(%rsp), %r14
subq %r15, %r14
testq %r14, %r14
jle 0x870db
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x27(%rax)
je 0x871e3
movq 0x10(%rsp), %r15
cmpb $0x0, 0x78(%r15)
je 0x87111
testb $0x1, 0x8d(%r15)
je 0x87111
movq 0x38(%r15), %rdi
callq 0xeaf8a
testl %eax, %eax
je 0x87111
movq 0x38(%r15), %rax
movq 0x8(%rax), %rax
cmpl $0x5f, (%rax)
jne 0x87111
movl $0x21, (%rax)
cmpq $0x0, 0x18(%r15)
movq 0xe8(%rsp), %rbx
movq 0x30(%rsp), %r12
movl 0x64(%rsp), %ebp
movq 0x50(%rsp), %r14
jg 0x87cb0
cmpb $0x0, 0x1(%r15)
je 0x87152
cmpb $0x0, 0x2(%r15)
jne 0x8714b
cmpb $0x0, 0x3(%r15)
je 0x8737c
cmpb $0x0, 0x4(%r15)
je 0x87160
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x888b7
movq 0xa8(%rsp), %rdi
callq 0xeaf3c
movq %r13, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x10(%r15), %rax
testq %rax, %rax
jle 0x87cde
addq %rax, %r14
movq %r13, %rdi
movq %r15, %rsi
callq 0x88780
incl %ebp
jmp 0x86c3e
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x87072
movq 0x10(%rax), %rcx
testq %rcx, %rcx
movl $0x0, %edx
cmovleq %rdx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x87072
movq 0x8(%rax), %rsi
movl (%rsi,%rdx,4), %edi
leal -0x41(%rdi), %r8d
cmpl $0x19, %r8d
ja 0x871de
orl $0x20, %edi
movl %edi, (%rsi,%rdx,4)
incq %rdx
jmp 0x871be
movq %r13, %rdi
leaq 0x99eff(%rip), %rsi     # 0x1210ec
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rsp), %rax
cmpb $0x0, 0x4(%rax)
je 0x87253
cmpq $0x5, %r14
jbe 0x87276
movq 0x18(%r13), %rdi
leaq 0x70(%rsp), %rsi
movq %r15, %rdx
pushq $0x6
popq %rcx
callq 0xe3cb7
cmpb $0x53, 0x70(%rsp)
jne 0x87276
cmpb $0x50, 0x71(%rsp)
movq 0x30(%rsp), %rax
jne 0x87276
cmpb $-0x42, 0x74(%rsp)
jne 0x87276
cmpb $-0x11, 0x75(%rsp)
jne 0x87276
movq 0x48(%rax), %rax
movb $0x1, 0x2a(%rax)
xorl %r12d, %r12d
movq %r14, %rbp
jmp 0x8744a
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x2a(%rax)
je 0x87276
movq 0x30(%rax), %r12
subq %r12, %r14
movq %r14, %rbp
testq %r12, %r12
jg 0x8727b
jmp 0x8744a
xorl %ebp, %ebp
movq %r14, %r12
andw $0x0, 0x108(%rsp)
andq $0x0, 0x100(%rsp)
movq 0x18(%r13), %r14
pushq $0xa
popq %rdi
movq %r12, %rsi
callq 0xdfb45
movq %r14, %rdi
leaq 0x100(%rsp), %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0xe3cb7
cmpq $0xe, %r12
jb 0x8732a
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x26(%rax)
je 0x8732a
cmpb $0x58, 0x106(%rsp)
jne 0x8732a
cmpb $0x41, 0x107(%rsp)
jne 0x8732a
movq %r13, %rdi
leaq 0x99e57(%rip), %rsi     # 0x12113c
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%r13), %rdi
leaq 0x4(%r15), %rsi
callq 0xe3f46
movq %r13, %rdi
leaq 0x99d8a(%rip), %rsi     # 0x12109b
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
jmp 0x8744a
cmpq $0xe, %r12
setae %al
movq 0x100(%rsp), %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3]
pcmpeqb 0x130(%rsp), %xmm0
movmskps %xmm0, %ecx
movl %ecx, %edx
andb $0x8, %dl
shrb $0x3, %dl
movl %ecx, %esi
shrb $0x2, %sil
andb %cl, %al
shrb %cl
andb %al, %cl
andb %sil, %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x873d6
movq %r13, %rdi
movq %r15, %rsi
callq 0x88b27
jmp 0x8744a
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x888b7
movq 0x40(%r15), %rdi
callq 0xeaf8a
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x30(%r12), %rdi
movq 0x38(%r15,%rcx,8), %rsi
callq 0xeb9f5
movq 0x18(%r12), %rdx
imulq 0x30(%r15), %rdx
movq 0x20(%r15), %rcx
movq %r13, %rdi
movq %r12, %rsi
movl 0x60(%rsp), %r8d
callq 0x86af4
movq 0x30(%r12), %rdi
callq 0xeb9bd
jmp 0x87160
cmpq $0xa, %r12
leaq 0x70(%rsp), %rbx
jb 0x87400
leaq 0x100(%rsp), %rdi
leaq 0x99d22(%rip), %rsi     # 0x121112
pushq $0xa
popq %rdx
callq 0x18230
testl %eax, %eax
je 0x87bf6
movq %r13, %rdi
leaq 0x99d13(%rip), %rsi     # 0x12111d
xorl %eax, %eax
callq 0xde896
cmpl $0x2, (%r13)
jl 0x8744a
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%r13), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r13, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %r9d, %r9d
callq 0xded3a
jmp 0x8731a
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x2a(%rax)
je 0x870db
testq %rbp, %rbp
jle 0x870db
addq %r15, %r12
movq 0x10(%rsp), %rax
addq $0x58, %rax
movq %rax, 0xf0(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, 0x40(%rsp)
movq %r13, %rdi
leaq 0x6c(%rsp), %rsi
callq 0xdebae
movq %r13, %rdi
leaq 0x99cf1(%rip), %rsi     # 0x12118c
movq %r12, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
addq %r12, %rbp
movq %rbp, 0xd0(%rsp)
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xc8(%rsp)
leaq 0x4(%r12), %r13
cmpq 0xd0(%rsp), %r13
jg 0x87b9c
movq 0x18(%rsp), %rbx
movq 0x18(%rbx), %rdi
movq %r12, %rsi
leaq 0x100(%rsp), %rdx
pushq $0x2
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
addq $0x2, 0x40(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x40(%rsp), %rsi
callq 0xe3f2a
cmpb $0x4, %al
jb 0x87b9c
movzbl %al, %r14d
leaq (%r12,%r14), %rax
movq %rax, 0x28(%rsp)
cmpq 0xd0(%rsp), %rax
jg 0x87b9c
leaq -0x4(%r14), %r15
movq 0x18(%rsp), %rbx
movq 0x18(%rbx), %rdi
leaq 0x40(%rsp), %rsi
callq 0xe3f2a
movl %eax, %ebp
movzbl %al, %r9d
movl %r15d, (%rsp)
movq %rbx, %rdi
leaq 0x99c30(%rip), %rsi     # 0x1211a5
leaq 0x110(%rsp), %rdx
movq %r12, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movl 0x104(%rsp), %eax
cmpl $0x4345, %eax           # imm = 0x4345
je 0x87a20
cmpl $0x4552, %eax           # imm = 0x4552
je 0x877a4
cmpl $0x4e4d, %eax           # imm = 0x4E4D
je 0x87987
cmpl $0x5058, %eax           # imm = 0x5058
je 0x8790f
cmpl $0x5346, %eax           # imm = 0x5346
je 0x8762b
cmpl $0x5350, %eax           # imm = 0x5350
je 0x8774b
cmpl $0x5446, %eax           # imm = 0x5446
je 0x87639
cmpl $0x5a46, %eax           # imm = 0x5A46
je 0x87839
cmpl $0x5354, %eax           # imm = 0x5354
je 0x87b9c
cmpb $0x2, %bpl
jne 0x87ab3
cmpb $0xe, %r14b
jne 0x87ab3
cmpl $0x4141, %eax           # imm = 0x4141
jne 0x87ab3
movq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x88b27
jmp 0x87b56
movq 0x10(%rsp), %rax
movb $0x1, 0x9(%rax)
jmp 0x87905
movq %r13, 0x58(%rsp)
cmpl $0x4, %r14d
je 0x87905
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe3f2a
movb %al, 0x27(%rsp)
movzbl %al, %ebp
testb %bpl, %bpl
pushq $0x11
popq %r15
pushq $0x7
popq %rax
cmovnsq %rax, %r15
movq %r15, 0xf8(%rsp)
leaq 0x990fd(%rip), %r12     # 0x12077c
xorl %r13d, %r13d
cmpq $0x7, %r13
je 0x87905
btl %r13d, %ebp
jae 0x8773f
movq 0x58(%rsp), %rsi
cmpb $0x0, 0x27(%rsp)
js 0x876be
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
leaq 0xd8(%rsp), %r15
movq %r15, %rcx
callq 0x887b4
jmp 0x876d8
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
leaq 0xd8(%rsp), %r15
movq %r15, %rcx
callq 0x885a7
movslq (%r12), %rcx
leaq 0x99099(%rip), %rax     # 0x12077c
addq %rax, %rcx
leaq 0x70(%rsp), %r14
movq %r14, %rdi
pushq $0x20
popq %rsi
leaq 0x99bea(%rip), %rdx     # 0x1212e2
xorl %eax, %eax
callq 0xde40c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x886eb
cmpq $0x1, %r13
jne 0x87732
cmpb $0x0, 0xd8(%rsp)
je 0x87732
movdqu 0xd8(%rsp), %xmm0
movq 0xf0(%rsp), %rax
movdqu %xmm0, (%rax)
movq 0xf8(%rsp), %rax
addq %rax, 0x58(%rsp)
incq %r13
addq $0x4, %r12
jmp 0x87682
cmpb $0x7, %r14b
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %r15
jb 0x87b5b
movq 0x10(%rsp), %rax
cmpb $0x0, 0x4(%rax)
je 0x87b5b
movq 0x18(%r13), %rdi
addq $0x6, %r12
movq %r12, %rsi
callq 0xe3eb4
movzbl %al, %edx
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
movq %rdx, 0x30(%rax)
movq %r13, %rdi
leaq 0x99a38(%rip), %rsi     # 0x1211d0
xorl %eax, %eax
callq 0xde896
jmp 0x87b5b
movq %r13, 0x70(%rsp)
cmpb $0x8, %r14b
jb 0x87ae9
movq 0x10(%rsp), %rax
cmpb $0x0, 0x4(%rax)
movl $0x0, %ebp
movq 0x18(%rsp), %r13
je 0x87b4e
movq 0x18(%r13), %rdi
leaq 0x70(%rsp), %rbx
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %r15d
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %r12d
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %ebp
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %edx
movq %r13, %rdi
leaq 0x99a31(%rip), %rsi     # 0x12124a
xorl %eax, %eax
callq 0xde896
leal (%r15,%r12), %eax
addl %ebp, %eax
addl $0x8, %eax
cmpl %r14d, %eax
jbe 0x87af2
xorl %ebp, %ebp
jmp 0x87b4e
movq 0x10(%rsp), %rax
movb $0x1, 0x9(%rax)
cmpb $0x10, %r14b
jb 0x87905
movq 0x18(%rsp), %r14
movq 0x18(%r14), %rdi
movq %r13, %rsi
leaq 0x70(%rsp), %rdx
pushq $0x2
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
movq %r14, %rdi
leaq 0x99a78(%rip), %rsi     # 0x1212ea
leaq 0x80(%rsp), %rdx
xorl %eax, %eax
callq 0xde896
addq $0x6, %r12
movq %r12, 0xd8(%rsp)
movq 0x18(%r14), %rdi
leaq 0xd8(%rsp), %rbx
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %edx
leal (,%rdx,4), %ecx
movq %r14, %rdi
leaq 0x99a4a(%rip), %rsi     # 0x1212ff
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0xe3f2a
movzbl %al, %ecx
pushq $0x1
popq %rax
shll %cl, %eax
movq %r14, %rdi
leaq 0x99a40(%rip), %rsi     # 0x12131a
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x8857f
movq %r14, %rdi
leaq 0x99a3b(%rip), %rsi     # 0x121336
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rsp), %r13
jmp 0x87b56
movq %r13, 0x70(%rsp)
cmpb $0x24, %r14b
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %r15
jb 0x87b5b
movq 0x18(%r13), %rdi
leaq 0x70(%rsp), %rsi
callq 0x8857f
movq %rax, %r14
movq %r13, %rdi
leaq 0x99966(%rip), %rsi     # 0x1212a9
movl %r14d, %edx
xorl %eax, %eax
callq 0xde896
testw $0x7000, %r14w          # imm = 0x7000
je 0x87b75
andl $0xf000, %r14d          # imm = 0xF000
cmpw $0x4000, %r14w          # imm = 0x4000
je 0x87b5b
cmpl $0xa000, %r14d          # imm = 0xA000
jne 0x87b86
movq 0x10(%rsp), %rax
movb $0x1, 0x7(%rax)
jmp 0x87b5b
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdi
movq %r13, %rsi
movq %rax, %r13
callq 0xe3eb4
movzbl %al, %edx
movq %r13, %rdi
leaq 0x9b43e(%rip), %rsi     # 0x122de6
xorl %eax, %eax
callq 0xde896
cmpb $0x6, %r14b
jb 0x87b56
movq 0x10(%rsp), %rbx
movq 0x40(%rbx), %rcx
testq %rcx, %rcx
movq 0x28(%rsp), %r15
jne 0x879db
movq %r13, %rdi
callq 0xeac74
movq %rax, %rcx
movq %rax, 0x40(%rbx)
movq 0x18(%r13), %rdi
addq $0x5, %r12
addq $-0x5, %r14
movq 0x30(%rsp), %rax
movl 0x4(%rax), %r9d
movq %r12, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xe4c9a
movq 0x40(%rbx), %rdi
callq 0xeb877
movq %r13, %rdi
leaq 0x99882(%rip), %rsi     # 0x121293
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x87b5b
movq %r13, 0x70(%rsp)
cmpb $0x1c, %r14b
movq 0x18(%rsp), %r13
jb 0x87b56
movq 0x18(%r13), %rdi
leaq 0x70(%rsp), %rbx
movq %rbx, %rsi
callq 0x8857f
movq %r13, %rdi
leaq 0x99793(%rip), %rsi     # 0x1211e2
movq %rax, 0xc0(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0x8857f
movq %r13, %rdi
leaq 0x99791(%rip), %rsi     # 0x121207
movq %rax, 0xb8(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r13), %rdi
movq %rbx, %rsi
callq 0x8857f
movq %r13, %rdi
leaq 0x9978d(%rip), %rsi     # 0x12122a
movq %rax, 0xc8(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
jmp 0x87b56
movq 0x18(%rsp), %r13
cmpl $0x2, (%r13)
jl 0x87b56
movq 0x18(%r13), %rsi
movq 0x40(%rsp), %rdx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r13, %rdi
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xded3a
jmp 0x87b56
xorl %ebp, %ebp
movq 0x18(%rsp), %r13
jmp 0x87b4e
movq %r13, %rdi
callq 0xeac74
movq %rbp, %r14
movq %rax, %rbp
movq %r13, %rdi
xorl %esi, %esi
leaq 0x99754(%rip), %rdx     # 0x121260
movq %rbx, %rcx
movq %r15, %r8
movq %rax, %r9
callq 0x884dd
movq %r13, %rdi
xorl %esi, %esi
leaq 0x99747(%rip), %rdx     # 0x12126d
movq %rbx, %rcx
movq %r12, %r8
movq %rbp, %r9
callq 0x884dd
movq %r13, %rdi
xorl %esi, %esi
leaq 0x99742(%rip), %rdx     # 0x121282
movq %rbx, %rcx
movq %r14, %r8
movq %rbp, %r9
callq 0x884dd
movq %rbp, %rdi
callq 0xeaf3c
movq 0x28(%rsp), %r15
movq %r15, 0x40(%rsp)
movq %r13, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x40(%rsp), %r12
jmp 0x874e1
testb $0x49, %r14b
je 0x87b91
movq 0x10(%rsp), %rax
movb $0x1, 0x5(%rax)
jmp 0x87b5b
movq 0x10(%rsp), %rax
movb $0x1, 0x8(%rax)
jmp 0x87b5b
movq 0x10(%rsp), %rax
movb $0x1, 0x6(%rax)
jmp 0x87b5b
movl 0x6c(%rsp), %esi
movq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0xdebb7
movq 0xc0(%rsp), %r12
testq %r12, %r12
movq 0xc8(%rsp), %rbp
je 0x870db
movq 0x30(%rsp), %rax
imulq 0x18(%rax), %r12
addq 0xb8(%rsp), %r12
movq 0x38(%rax), %rsi
movq %r13, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xe0a0b
testl %eax, %eax
jne 0x8747f
jmp 0x870db
movq %r13, %rdi
leaq 0x99570(%rip), %rsi     # 0x121170
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
cmpq $0x16, %r12
jb 0x8731a
leaq 0xa(%r15), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq 0x18(%r13), %rsi
movq %r13, %rdi
movq %rbx, %rdx
callq 0xed922
leaq 0x90(%rsp), %rax
movups (%rax), %xmm0
movq 0x10(%rsp), %r14
movups %xmm0, 0x68(%r14)
leaq 0x12(%r15), %rcx
movq 0x18(%r13), %rsi
movq %r13, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xeda08
movb $0x1, 0x78(%r14)
movaps 0x70(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
movaps 0x90(%rsp), %xmm2
movups %xmm0, 0x80(%r14)
movups %xmm1, 0x90(%r14)
movups %xmm2, 0xa0(%r14)
jmp 0x8731a
xorl %edi, %edi
jmp 0x87cc9
leaq 0x99402(%rip), %rsi     # 0x1210b9
movq %r13, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq 0xa8(%rsp), %rdi
callq 0xeaf3c
pushq $-0x1
popq %rsi
movq %r13, %rdi
callq 0xdeba7
movq 0x10(%rsp), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x88780
movl 0x68(%rsp), %esi
movq %r13, %rdi
callq 0xdebb7
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq