// File: /workspace/github_c_makefile_star2_O3/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, 0x60(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x7c(%rsp), %rsi
callq 0xe8a1c
testq %r12, %r12
jle 0x8ce9b
cmpq $0x8000000, %r14        # imm = 0x8000000
setl %cl
movl 0xc(%r13), %eax
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x8bc9a
testl %eax, %eax
jns 0x8bc93
leaq 0xa249c(%rip), %rsi     # 0x12e11a
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8faa
movl $0x1, 0xc(%r13)
andl $0x7ffffff, %r14d       # imm = 0x7FFFFFF
leaq 0xa24c0(%rip), %rsi     # 0x12e161
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x38(%r13), %rsi
movq %rbx, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xeb3ad
testl %eax, %eax
je 0x8bcf0
cmpl $0x21, 0x60(%rsp)
jl 0x8bd09
leaq 0xa24c6(%rip), %rsi     # 0x12e1a7
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x8ce9b
leaq 0xa2484(%rip), %rsi     # 0x12e17b
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe8faa
jmp 0x8ce9b
leaq (%r14,%r12), %rcx
movq 0x18(%rbx), %rax
movq %rcx, 0xc8(%rsp)
cmpq 0x18(%rax), %rcx
jle 0x8bd36
leaq 0xa24aa(%rip), %rsi     # 0x12e1d0
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8faa
testq %r14, %r14
jle 0x8ce9b
movq 0x60(%rsp), %rax
incl %eax
movl %eax, 0x70(%rsp)
leaq 0x10(%rsp), %rbp
movd 0xa1ce9(%rip), %xmm0    # 0x12da40
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)
xorl %r14d, %r14d
movq %r12, %r15
movq %r12, 0xe8(%rsp)
movq %r13, 0x20(%rsp)
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %r15
jge 0x8ce9b
movq %r15, %rax
cqto
idivq 0x18(%r13)
testq %rdx, %rdx
je 0x8bdce
movq %r15, %rsi
callq 0xeead3
testb %al, %al
jne 0x8bdb2
movq 0x18(%r13), %rsi
movq %r15, %rdi
callq 0xe9cb4
movq %rax, %r15
cmpq 0xc8(%rsp), %r15
jge 0x8ce9b
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %r15
jge 0x8ce9b
movq %rbx, %rdi
leaq 0xa242c(%rip), %rsi     # 0x12e204
movq %r15, %rdx
movl %r14d, %ecx
movq %r12, %r8
xorl %eax, %eax
callq 0xe8617
movl $0xb0, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r12
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r15, 0x58(%rsp)
movq %r15, 0x10(%rsp)
movq %r12, %r15
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rdx, 0x10(%r12)
movq %rbx, %rdi
leaq 0xa2401(%rip), %rsi     # 0x12e231
xorl %eax, %eax
callq 0xe8617
cmpq $0x0, 0x10(%r12)
jle 0x8ce65
movl %r14d, 0x74(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rdx, 0x18(%r15)
movq %rbx, %rdi
leaq 0xa23dc(%rip), %rsi     # 0x12e241
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
addq $0x4, %rsi
callq 0xeed0d
addq $0x8, 0x10(%rsp)
movq %rax, 0x30(%r15)
movq 0x18(%r13), %rdx
imulq %rax, %rdx
movq %rbx, %rdi
leaq 0xa23be(%rip), %rsi     # 0x12e258
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
addq $0x4, %rsi
callq 0xeed0d
addq $0x8, 0x10(%rsp)
movq %rax, 0x20(%r15)
movq %rbx, %rdi
leaq 0xa20eb(%rip), %rsi     # 0x12dfb4
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%rsp), %rsi
movq 0x48(%r13), %rax
cmpb $0x1, 0x28(%rax)
movl $0x0, %edx
adcl $0x6, %edx
leaq 0x48(%r15), %r14
movq %rbx, %rdi
movq %r14, %rcx
callq 0x8da07
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xa2375(%rip), %rdx     # 0x12e278
callq 0x8d96b
movq 0x48(%r13), %rax
cmpb $0x1, 0x28(%rax)
adcq $0x6, 0x10(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xeeb4b
movb %al, (%r15)
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r12
movb (%r15), %al
testb $0x1, %al
je 0x8bf49
movq %r12, %rdi
leaq 0xa2346(%rip), %rsi     # 0x12e287
callq 0xf7105
movb (%r15), %al
testb $0x2, %al
je 0x8bf64
movq %r12, %rdi
leaq 0x87ccb(%rip), %rsi     # 0x113c22
callq 0xf7105
movb $0x1, 0x1(%r15)
movb (%r15), %al
testb $0x4, %al
je 0x8bf7a
movq %r12, %rdi
leaq 0xa231c(%rip), %rsi     # 0x12e28e
callq 0xf7105
movb (%r15), %al
testb $0x8, %al
je 0x8bf95
movq %r12, %rdi
leaq 0xa2316(%rip), %rsi     # 0x12e29e
callq 0xf7105
movb $0x1, 0x9(%r15)
movb (%r15), %al
testb $0x10, %al
je 0x8bfab
movq %r12, %rdi
leaq 0xa2309(%rip), %rsi     # 0x12e2ac
callq 0xf7105
movb (%r15), %al
testb %al, %al
jns 0x8bfc6
movq %r12, %rdi
leaq 0xa22fd(%rip), %rsi     # 0x12e2b6
callq 0xf7105
movb $0x1, 0x9(%r15)
movb (%r15), %al
movzbl %al, %ebp
movq %r12, %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xa22e8(%rip), %rsi     # 0x12e2c3
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x20(%rsp), %r14
movq 0x48(%r14), %rax
cmpb $0x0, 0x28(%rax)
je 0x8c002
incq 0x10(%rsp)
leaq 0x10(%rsp), %r13
jmp 0x8c035
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xa22bb(%rip), %rsi     # 0x12e2db
xorl %eax, %eax
callq 0xe8617
movq 0x48(%r14), %rax
cmpb $0x0, 0x28(%rax)
je 0x8c389
addq $0x2, 0x10(%rsp)
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
addq $0x2, %rsi
callq 0xeeb67
addq $0x4, 0x10(%rsp)
movq %rbx, %rdi
leaq 0xa1e11(%rip), %rsi     # 0x12de6e
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %eax
movq %rax, 0x28(%r15)
movq 0x48(%r14), %rcx
cmpb $0x0, 0x27(%rcx)
je 0x8c0bc
movq 0x18(%rbx), %rdi
movq 0x58(%rsp), %rcx
leaq (%rcx,%rax), %rsi
addq $0x25, %rsi
callq 0xeeb67
movl %eax, 0xc(%r15)
movq %rbx, %rdi
leaq 0xa225f(%rip), %rsi     # 0x12e306
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
testb $-0x80, 0xd(%r15)
je 0x8c0bc
movb $0x1, 0x1(%r15)
movl $0xff, %r14d
cmpb $0x0, 0x1(%r15)
je 0x8c0ed
cmpq $0x1, 0x28(%r15)
jne 0x8c0ed
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
callq 0xeead3
movzbl %al, %r14d
movl $0x401, %ebp            # imm = 0x401
cmpb $0x2, %r14b
jb 0x8c115
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movl 0x20(%rax), %ebp
testl %ebp, %ebp
jne 0x8c115
movl $0x1, %ebp
cmpb $0x0, 0x2a(%rax)
jne 0x8c115
movq 0x20(%rsp), %rax
movl (%rax), %ebp
cmpl $0x1, %ebp
adcl $0x0, %ebp
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x38(%r15)
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%r15), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0xefbd7
movq 0x38(%r15), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xa21cc(%rip), %rsi     # 0x12e31b
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x20(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x8c172
movq 0x48(%rax), %rax
cmpb $0x0, 0x25(%rax)
je 0x8c2b5
cmpl $0x1, %r14d
je 0x8c195
testl %r14d, %r14d
movq 0x58(%rsp), %rcx
jne 0x8c19f
movb $0x1, 0x2(%r15)
cmpl $0x0, 0x60(%rsp)
jne 0x8c19f
movb $0x1, 0x4(%r15)
jmp 0x8c19f
movb $0x1, 0x3(%r15)
movq 0x58(%rsp), %rcx
movq 0x28(%r15), %rax
movq %r15, %rdx
movl %eax, %r15d
addq 0x10(%rsp), %rax
notl %r15d
andl $0x1, %r15d
addq %rax, %r15
movq %r15, 0x10(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x10(%rdx), %r14
addq %rcx, %r14
subq %r15, %r14
testq %r14, %r14
jle 0x8c1e4
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x27(%rax)
je 0x8c2f3
movq 0x38(%rsp), %r15
cmpb $0x0, 0x78(%r15)
je 0x8c21a
testb $0x1, 0x8d(%r15)
je 0x8c21a
movq 0x38(%r15), %rdi
callq 0xf67a3
testl %eax, %eax
je 0x8c21a
movq 0x38(%r15), %rax
movq 0x8(%rax), %rax
cmpl $0x5f, (%rax)
jne 0x8c21a
movl $0x21, (%rax)
cmpq $0x0, 0x18(%r15)
movq 0x20(%rsp), %r13
leaq 0x10(%rsp), %rbp
movl 0x74(%rsp), %r14d
jg 0x8ce6a
cmpb $0x0, 0x1(%r15)
je 0x8c254
cmpb $0x0, 0x2(%r15)
jne 0x8c24d
cmpb $0x0, 0x3(%r15)
je 0x8c504
cmpb $0x0, 0x4(%r15)
je 0x8c262
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x8db0a
movq %r12, %rdi
callq 0xf6753
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x10(%r15), %rax
testq %rax, %rax
jle 0x8ce90
movq %r15, %rsi
movq 0x58(%rsp), %r15
addq %rax, %r15
movq %rbx, %rdi
callq 0x8d9d3
incl %r14d
cmpq 0xc8(%rsp), %r15
movq 0xe8(%rsp), %r12
jl 0x8bd7b
jmp 0x8ce9b
movq 0x38(%r15), %rcx
testq %rcx, %rcx
je 0x8c172
movq 0x10(%rcx), %rax
testq %rax, %rax
jle 0x8c172
movq 0x8(%rcx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
leal -0x41(%rsi), %edi
cmpl $0x19, %edi
ja 0x8c2e6
orl $0x20, %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x8c2d5
jmp 0x8c172
movq %rbx, %rdi
leaq 0xa205f(%rip), %rsi     # 0x12e35c
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x38(%rsp), %rax
cmpb $0x0, 0x4(%rax)
je 0x8c3c8
cmpq $0x5, %r14
jbe 0x8c3ed
movq 0x18(%rbx), %rdi
movl $0x6, %ecx
leaq 0x90(%rsp), %rsi
movq %r15, %rdx
callq 0xee8d4
cmpb $0x53, 0x90(%rsp)
jne 0x8c3ed
cmpb $0x50, 0x91(%rsp)
movq 0x20(%rsp), %rax
jne 0x8c3ed
cmpb $-0x42, 0x94(%rsp)
jne 0x8c3ed
cmpb $-0x11, 0x95(%rsp)
jne 0x8c3ed
movq 0x48(%rax), %rax
movb $0x1, 0x2a(%rax)
xorl %ebp, %ebp
movq %r14, 0x30(%rsp)
jmp 0x8c5d8
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %ebp
movq %rbx, %rdi
leaq 0xa1f4c(%rip), %rsi     # 0x12e2ee
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
testb %bpl, %bpl
leaq 0x10(%rsp), %r13
movq 0x20(%rsp), %r14
je 0x8c03b
movb $0x1, 0x9(%r15)
jmp 0x8c03b
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x2a(%rax)
je 0x8c3ed
movq 0x30(%rax), %rbp
subq %rbp, %r14
movq %r14, 0x30(%rsp)
testq %rbp, %rbp
jg 0x8c3f9
jmp 0x8c5d8
movq $0x0, 0x30(%rsp)
movq %r14, %rbp
movw $0x0, 0x108(%rsp)
movq $0x0, 0x100(%rsp)
movq 0x18(%rbx), %r14
movl $0xa, %edi
movq %rbp, %rsi
callq 0xe9c3b
movq %r14, %rdi
leaq 0x100(%rsp), %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0xee8d4
cmpq $0xe, %rbp
jb 0x8c4b2
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x26(%rax)
je 0x8c4b2
cmpb $0x58, 0x106(%rsp)
jne 0x8c4b2
cmpb $0x41, 0x107(%rsp)
jne 0x8c4b2
movq %rbx, %rdi
leaq 0xa1f43(%rip), %rsi     # 0x12e3ac
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq 0x4(%r15), %rsi
callq 0xeeb67
movq %rbx, %rdi
leaq 0xa1e74(%rip), %rsi     # 0x12e30b
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x8c5d8
cmpq $0xe, %rbp
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 0x8c55b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8dd7c
jmp 0x8c5d8
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x8db0a
movq 0x40(%r15), %rdi
callq 0xf67a3
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x30(%r13), %rdi
movq 0x38(%r15,%rcx,8), %rsi
callq 0xf72a4
movq 0x18(%r13), %rdx
imulq 0x30(%r15), %rdx
movq 0x20(%r15), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movl 0x70(%rsp), %r8d
callq 0x8bc27
movq 0x30(%r13), %rdi
callq 0xf7267
jmp 0x8c262
cmpq $0xa, %rbp
jb 0x8c58e
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 0x8cd94
movq %rbx, %rdi
leaq 0xa1df5(%rip), %rsi     # 0x12e38d
xorl %eax, %eax
callq 0xe8617
cmpl $0x2, (%rbx)
jl 0x8c5d8
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rdx
movq %rbp, %rcx
xorl %r9d, %r9d
callq 0xe8bea
jmp 0x8c4a0
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
cmpb $0x0, 0x2a(%rax)
je 0x8c1e4
cmpq $0x0, 0x30(%rsp)
jle 0x8c1e4
addq %r15, %rbp
movq 0x38(%rsp), %rax
addq $0x58, %rax
movq %rax, 0xf0(%rsp)
movq %r12, 0xe0(%rsp)
movq %rbp, 0x48(%rsp)
movq %rbx, %rdi
leaq 0x54(%rsp), %rsi
callq 0xe8a1c
movq %rbx, %rdi
leaq 0xa1dcd(%rip), %rsi     # 0x12e3fc
movq %rbp, %rdx
movq 0x30(%rsp), %r14
movl %r14d, %ecx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpq $0x3, %r14
jle 0x8cd83
movq %r14, %r15
addq %rbp, %r15
leaq 0x4(%rbp), %r12
movq $0x0, 0xd8(%rsp)
movq $0x0, 0xd0(%rsp)
movq $0x0, 0x30(%rsp)
movq %r15, 0x28(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
leaq 0x100(%rsp), %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0xf1762
addq $0x2, 0x48(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x48(%rsp), %rsi
callq 0xeeb4b
cmpb $0x4, %al
jb 0x8cd2e
movzbl %al, %r14d
leaq (%r14,%rbp), %rax
cmpq %r15, %rax
jg 0x8cd2e
movq %rax, 0x40(%rsp)
leaq -0x4(%r14), %r15
movq 0x18(%rbx), %rdi
leaq 0x48(%rsp), %rsi
callq 0xeeb4b
movl %eax, %r13d
movzbl %al, %r9d
movl %r15d, (%rsp)
movq %rbx, %rdi
leaq 0xa1d18(%rip), %rsi     # 0x12e415
leaq 0x110(%rsp), %rdx
movq %rbp, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl 0x104(%rsp), %eax
cmpl $0x5345, %eax           # imm = 0x5345
jle 0x8c837
cmpl $0x5353, %eax           # imm = 0x5353
jle 0x8c8eb
cmpl $0x5446, %eax           # imm = 0x5446
je 0x8cb10
cmpl $0x5a46, %eax           # imm = 0x5A46
jne 0x8cc1a
movq 0x38(%rsp), %rax
movb $0x1, 0x9(%rax)
cmpb $0x10, %r14b
jb 0x8cce1
movq 0x18(%rbx), %rdi
movq %r12, %rsi
leaq 0x90(%rsp), %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0xf1762
movq %rbx, %rdi
leaq 0xa1dcf(%rip), %rsi     # 0x12e55a
leaq 0xa0(%rsp), %rdx
xorl %eax, %eax
callq 0xe8617
addq $0x6, %rbp
movq %rbp, 0x80(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x80(%rsp), %r14
movq %r14, %rsi
callq 0xeeb4b
movzbl %al, %edx
leal (,%rdx,4), %ecx
movq %rbx, %rdi
leaq 0xa1da1(%rip), %rsi     # 0x12e56f
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeeb4b
movzbl %al, %ecx
movl $0x1, %eax
shll %cl, %eax
movq %rbx, %rdi
leaq 0xa1d95(%rip), %rsi     # 0x12e58a
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x80(%rsp), %rsi
addq $0x4, %rsi
callq 0xeed0d
addq $0x8, 0x80(%rsp)
movq %rbx, %rdi
leaq 0xa1d7e(%rip), %rsi     # 0x12e5a6
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
jmp 0x8cce1
cmpl $0x4e4c, %eax           # imm = 0x4E4C
jg 0x8c953
cmpl $0x4345, %eax           # imm = 0x4345
je 0x8c9ee
cmpl $0x4552, %eax           # imm = 0x4552
jne 0x8cc25
movq 0x38(%rsp), %rax
movb 0x4(%rax), %al
movq %r12, 0x90(%rsp)
cmpb $0x8, %r14b
jb 0x8c8e4
movl $0x0, %ebp
testb %al, %al
je 0x8ccd9
movq 0x18(%rbx), %rdi
leaq 0x90(%rsp), %r15
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %r13d
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %r12d
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %ebp
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xa1bef(%rip), %rsi     # 0x12e4ba
xorl %eax, %eax
callq 0xe8617
leal (%r12,%r13), %eax
addl %ebp, %eax
addl $0x8, %eax
cmpl %r14d, %eax
jbe 0x8cc7d
xorl %ebp, %ebp
jmp 0x8ccd9
cmpl $0x5346, %eax           # imm = 0x5346
je 0x8c9e0
cmpl $0x5350, %eax           # imm = 0x5350
jne 0x8cc25
cmpb $0x7, %r14b
movq 0x28(%rsp), %r15
movq 0x40(%rsp), %r12
jb 0x8cceb
movq 0x38(%rsp), %rax
cmpb $0x0, 0x4(%rax)
je 0x8cceb
movq 0x18(%rbx), %rdi
addq $0x6, %rbp
movq %rbp, %rsi
callq 0xeead3
movzbl %al, %edx
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq %rdx, 0x30(%rax)
movq %rbx, %rdi
leaq 0xa1af2(%rip), %rsi     # 0x12e440
jmp 0x8ca73
cmpl $0x4e4d, %eax           # imm = 0x4E4D
je 0x8ca7f
cmpl $0x5058, %eax           # imm = 0x5058
jne 0x8cc25
cmpb $0x24, %r14b
movq 0x28(%rsp), %r15
movq 0x40(%rsp), %r12
jb 0x8cceb
movq 0x18(%rbx), %rdi
addq $0x8, %rbp
movq %rbp, %rsi
callq 0xeed0d
movq %rax, %r14
movq %rbx, %rdi
leaq 0xa1b7f(%rip), %rsi     # 0x12e519
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
testl $0x7000, %r14d          # imm = 0x7000
je 0x8cd11
andl $0xf000, %r14d          # imm = 0xF000
cmpl $0x4000, %r14d          # imm = 0x4000
movq 0x38(%rsp), %rax
je 0x8cceb
cmpl $0xa000, %r14d          # imm = 0xA000
jne 0x8cd22
movb $0x1, 0x7(%rax)
jmp 0x8cceb
movq 0x38(%rsp), %rax
movb $0x1, 0x9(%rax)
jmp 0x8cce1
cmpb $0x1c, %r14b
movq 0x28(%rsp), %r15
movq 0x40(%rsp), %r12
jb 0x8cceb
movq 0x18(%rbx), %rdi
leaq 0x8(%rbp), %rsi
callq 0xeed0d
movq %rbx, %rdi
leaq 0xa1a39(%rip), %rsi     # 0x12e452
movq %rax, 0xd8(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x10(%rbp), %rsi
callq 0xeed0d
movq %rbx, %rdi
leaq 0xa1a36(%rip), %rsi     # 0x12e477
movq %rax, 0xd0(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
addq $0x18, %rbp
movq %rbp, %rsi
callq 0xeed0d
movq %rbx, %rdi
leaq 0xa1a2e(%rip), %rsi     # 0x12e49a
movq %rax, 0x30(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
jmp 0x8cceb
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeead3
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xa35de(%rip), %rsi     # 0x130076
xorl %eax, %eax
callq 0xe8617
cmpb $0x6, %r14b
jb 0x8cce1
movq 0x38(%rsp), %r15
movq 0x40(%r15), %rcx
testq %rcx, %rcx
movq 0x40(%rsp), %r12
jne 0x8cacb
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rcx
movq %rax, 0x40(%r15)
movq 0x18(%rbx), %rdi
addq $0x5, %rbp
addq $-0x5, %r14
movq 0x20(%rsp), %rax
movl 0x4(%rax), %r9d
movq %rbp, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xefbd7
movq 0x40(%r15), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xa1a02(%rip), %rsi     # 0x12e503
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
jmp 0x8cc76
movq %r12, 0x68(%rsp)
cmpl $0x4, %r14d
leaq 0x80(%rsp), %r15
je 0x8cce1
movq 0x18(%rbx), %rdi
leaq 0x68(%rsp), %rsi
callq 0xeeb4b
movb %al, 0x1f(%rsp)
movzbl %al, %eax
movl %eax, 0x78(%rsp)
testb %al, %al
movl $0x11, %ecx
movl $0x7, %eax
cmovnsq %rax, %rcx
movq %rcx, 0xf8(%rsp)
leaq 0xa0e8d(%rip), %r12     # 0x12d9ec
xorl %r13d, %r13d
movl 0x78(%rsp), %eax
btl %r13d, %eax
jae 0x8cc04
movq 0x68(%rsp), %rsi
cmpb $0x0, 0x1f(%rsp)
js 0x8cb8b
movq %rbx, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x8da07
jmp 0x8cb98
movq %rbx, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x8d794
movslq (%r12), %rcx
leaq 0xa0e49(%rip), %rax     # 0x12d9ec
addq %rax, %rcx
movl $0x20, %esi
leaq 0x90(%rsp), %r14
movq %r14, %rdi
leaq 0xa1995(%rip), %rdx     # 0x12e552
xorl %eax, %eax
callq 0xe8193
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8d96b
cmpq $0x1, %r13
jne 0x8cbf7
cmpb $0x0, 0x80(%rsp)
je 0x8cbf7
movdqu 0x80(%rsp), %xmm0
movq 0xf0(%rsp), %rax
movdqu %xmm0, (%rax)
movq 0xf8(%rsp), %rax
addq %rax, 0x68(%rsp)
incq %r13
addq $0x4, %r12
cmpq $0x7, %r13
jne 0x8cb62
jmp 0x8cce1
cmpl $0x5354, %eax           # imm = 0x5354
je 0x8cd2e
cmpb $0x2, %r13b
jne 0x8cc48
cmpb $0xe, %r14b
jne 0x8cc48
cmpl $0x4141, %eax           # imm = 0x4141
jne 0x8cc48
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x8dd7c
jmp 0x8cce1
cmpl $0x2, (%rbx)
movq 0x40(%rsp), %r12
jl 0x8cc76
movq 0x18(%rbx), %rsi
movq 0x48(%rsp), %rdx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xe8bea
movq 0x28(%rsp), %r15
jmp 0x8cceb
movq %rbx, %rdi
callq 0xf6410
movq %rbp, %r14
movq %rax, %rbp
movq %rbx, %rdi
xorl %esi, %esi
leaq 0xa1839(%rip), %rdx     # 0x12e4d0
movq %r15, %rcx
movq %r13, %r8
movq %rax, %r9
callq 0x8d6f0
movq %rbx, %rdi
xorl %esi, %esi
leaq 0xa182c(%rip), %rdx     # 0x12e4dd
movq %r15, %rcx
movq %r12, %r8
movq %rbp, %r9
callq 0x8d6f0
movq %rbx, %rdi
xorl %esi, %esi
leaq 0xa1827(%rip), %rdx     # 0x12e4f2
movq %r15, %rcx
movq %r14, %r8
movq %rbp, %r9
callq 0x8d6f0
movq %rbp, %rdi
callq 0xf6753
movq 0x28(%rsp), %r15
movq 0x40(%rsp), %r12
movq %r12, 0x48(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x48(%rsp), %rbp
leaq 0x4(%rbp), %r12
cmpq %r15, %r12
jle 0x8c688
jmp 0x8cd2e
testb $0x49, %r14b
movq 0x38(%rsp), %rax
je 0x8cd28
movb $0x1, 0x5(%rax)
jmp 0x8cceb
movb $0x1, 0x8(%rax)
jmp 0x8cceb
movb $0x1, 0x6(%rax)
jmp 0x8cceb
movl 0x54(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
movq 0xd8(%rsp), %rbp
testq %rbp, %rbp
movq 0xe0(%rsp), %r12
je 0x8c1e4
movq 0x20(%rsp), %rax
imulq 0x18(%rax), %rbp
addq 0xd0(%rsp), %rbp
movq 0x38(%rax), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0xeb3ad
testl %eax, %eax
jne 0x8c613
jmp 0x8c1e4
movl 0x54(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
jmp 0x8c1e4
movq %rbx, %rdi
leaq 0xa1642(%rip), %rsi     # 0x12e3e0
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpq $0x16, %rbp
jb 0x8c4a0
leaq 0xa(%r15), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
leaq 0x90(%rsp), %r14
movq %r14, %rdx
callq 0xf9284
leaq 0xb0(%rsp), %rax
movups (%rax), %xmm0
movq %r12, %r13
movq 0x38(%rsp), %r12
movups %xmm0, 0x68(%r12)
leaq 0x12(%r15), %rcx
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0xf9370
movb $0x1, 0x78(%r12)
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
movups %xmm0, 0x80(%r12)
movups %xmm1, 0x90(%r12)
movups %xmm2, 0xa0(%r12)
movq %r13, %r12
jmp 0x8c4a0
xorl %r12d, %r12d
jmp 0x8ce7b
leaq 0xa14b8(%rip), %rsi     # 0x12e329
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq %r12, %rdi
callq 0xf6753
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8d9d3
movl 0x7c(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq