// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/icns.c
// Function: de_run_icns_pass
static void de_run_icns_pass(deark *c, lctx *d, int pass)
{
	i64 segment_pos;
	struct page_ctx *pg = NULL;
	int image_count;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	segment_pos = 8;
	image_count = 0;

	while(1) {
		i64 segment_len;

		if(pg) { de_free(c, pg); pg=NULL; }

		if(segment_pos+8 > d->file_size) break;

		pg = de_malloc(c, sizeof(struct page_ctx));
		pg->segment_pos = segment_pos;
		pg->image_num = image_count;

		dbuf_read_fourcc(c->infile, segment_pos, &pg->code4cc, 4, 0x0);

		segment_len = de_getu32be(segment_pos+4);

		pg->image_pos = segment_pos + 8;
		pg->image_len = segment_len - 8;

		if(pass==2) {
			de_dbg(c, "image #%d, type '%s', segment at %"I64_FMT", image at %"I64_FMT", size=%"I64_FMT,
				pg->image_num, pg->code4cc.id_dbgstr,
				pg->segment_pos, pg->image_pos, pg->image_len);
		}
		de_dbg_indent(c, 1);

		if(segment_len<8 || segment_pos+segment_len > d->file_size) {
			if(pass==2) {
				de_err(c, "Invalid length for segment '%s' (%u)", pg->code4cc.id_sanitized_sz,
					(unsigned int)segment_len);
			}
			break;
		}

		if(segment_len==8) {
			if(pass==2) {
				de_dbg(c, "[empty icon]");
			}
			goto next_icon;
		}

		if(pass==2) {
			size_t i;

			// Find this type code in the image_type_info array
			pg->type_info = NULL;
			for(i=0; i<DE_ARRAYCOUNT(image_type_info_arr); i++) {
				if(image_type_info_arr[i].code==pg->code4cc.id) {
					pg->type_info = &image_type_info_arr[i];
					break;
				}
			}
			if(!pg->type_info) {
				de_warn(c, "(Image #%d) Unknown image type '%s'", pg->image_num, pg->code4cc.id_sanitized_sz);
			}
		}

		if(pass==1) {
			de_dbg_indent(c, -1);
			switch(pg->code4cc.id) {
			case 0x69636d23: // icm# 16x12x1
				do_read_mask(c, d, pg, MASKTYPEID_16_12_1, 1, 16, 12);
				break;
			case 0x69637323: // ics# 16x16x1
				do_read_mask(c, d, pg, MASKTYPEID_16_16_1, 1, 16, 16);
				break;
			case 0x49434e23: // ICN# 32x32x1
				do_read_mask(c, d, pg, MASKTYPEID_32_32_1, 1, 32, 32);
				break;
			case 0x69636823: // ich# 48x48x1
				do_read_mask(c, d, pg, MASKTYPEID_48_48_1, 1, 48, 48);
				break;
			case 0x73386d6b: // s8mk 16x16x8
				do_read_mask(c, d, pg, MASKTYPEID_16_16_8, 8, 16, 16);
				break;
			case 0x6c386d6b: // l8mk 32x32x8
				do_read_mask(c, d, pg, MASKTYPEID_32_32_8, 8, 32, 32);
				break;
			case 0x68386d6b: // h8mk 48x48x8
				do_read_mask(c, d, pg, MASKTYPEID_48_48_8, 8, 48, 48);
				break;
			case 0x74386d6b: // t8mk 128x128x8
				do_read_mask(c, d, pg, MASKTYPEID_128_128_8, 8, 128, 128);
				break;
			}
			de_dbg_indent(c, 1);
		}
		else if(pass==2) {
			do_icon(c, d, pg);
		}

next_icon:
		image_count++;
		segment_pos += segment_len;
		de_dbg_indent(c, -1);
	}

	if(pg) de_free(c, pg);
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, 0x2c(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x44(%rsp), %rsi
callq 0xdebae
leaq 0xf0(%r14), %rax
movq %rax, 0x90(%rsp)
leaq 0x70(%r14), %rax
movq %rax, 0x88(%rsp)
leaq 0xd0(%r14), %rax
movq %rax, 0x80(%rsp)
leaq 0x50(%r14), %rax
movq %rax, 0x78(%rsp)
leaq 0xb0(%r14), %rax
movq %rax, 0x70(%rsp)
leaq 0x30(%r14), %rax
movq %rax, 0x68(%rsp)
leaq 0x90(%r14), %rax
movq %rax, 0x60(%rsp)
leaq 0x10(%r14), %rax
movq %rax, 0x58(%rsp)
movq %r14, 0x10(%rsp)
leaq 0x114(%r14), %rax
movq %rax, 0x48(%rsp)
pushq $0x8
popq %r12
pushq $0x1
popq %rbp
xorl %r13d, %r13d
xorl %r15d, %r15d
movl %ebp, %r14d
testq %r13, %r13
je 0x6f9e0
movq %rbx, %rdi
movq %r13, %rsi
callq 0xded32
leaq 0x8(%r12), %rbp
movq 0x10(%rsp), %rax
cmpq (%rax), %rbp
jg 0x704d1
movl $0x490, %esi            # imm = 0x490
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r13
movq %r12, 0x8(%rax)
movl %r15d, 0x40(%rsp)
movl %r15d, (%rax)
movq 0x18(%rbx), %rdi
leaq 0x38(%rax), %rdx
movq %r12, %rsi
pushq $0x4
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
movq 0x18(%rbx), %rdi
leaq 0x4(%r12), %rsi
callq 0xe404f
movq %rax, %r15
addq $-0x8, %rax
movq %rbp, 0x10(%r13)
movq %rax, 0x18(%r13)
cmpl $0x2, 0x2c(%rsp)
jne 0x6fa6d
movl (%r13), %edx
leaq 0x48(%r13), %rcx
movq 0x8(%r13), %r8
movq %rax, (%rsp)
movq %rbx, %rdi
leaq 0xaa9cc(%rip), %rsi     # 0x11a42f
movq %rbp, %r9
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %r14d, %ebp
movl %r14d, %esi
callq 0xdeba7
cmpq $0x8, %r15
jl 0x704a4
addq %r15, %r12
movq 0x10(%rsp), %rax
cmpq (%rax), %r12
jg 0x704a4
cmpq $0x8, %r15
movl 0x2c(%rsp), %eax
jne 0x6fabf
cmpl $0x2, %eax
jne 0x70023
movq %rbx, %rdi
leaq 0xaa9de(%rip), %rsi     # 0x11a491
xorl %eax, %eax
callq 0xde896
jmp 0x70023
cmpl $0x2, %eax
jne 0x6fb00
andq $0x0, 0x30(%r13)
movl 0x3c(%r13), %eax
xorl %ecx, %ecx
leaq 0xaa4aa(%rip), %rsi     # 0x119f80
leaq 0x14(%rcx), %rdx
cmpq $0x334, %rdx            # imm = 0x334
je 0x6fb8a
cmpl %eax, (%rcx,%rsi)
movq %rdx, %rcx
jne 0x6fad6
leaq (%rdx,%rsi), %rax
addq $-0x14, %rax
movq %rax, 0x30(%r13)
jmp 0x6fbae
cmpl $0x1, %eax
jne 0x70023
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movl 0x3c(%r13), %eax
cmpl $0x49434e23, %eax       # imm = 0x49434E23
je 0x6fff7
cmpl $0x68386d6b, %eax       # imm = 0x68386D6B
je 0x6ff9c
cmpl $0x69636823, %eax       # imm = 0x69636823
je 0x6ffda
cmpl $0x74386d6b, %eax       # imm = 0x74386D6B
je 0x6ffb8
cmpl $0x69637323, %eax       # imm = 0x69637323
je 0x6ff45
cmpl $0x6c386d6b, %eax       # imm = 0x6C386D6B
je 0x6ff80
cmpl $0x73386d6b, %eax       # imm = 0x73386D6B
je 0x6ff5f
cmpl $0x69636d23, %eax       # imm = 0x69636D23
jne 0x70019
movq $0xc, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
jmp 0x6ff5a
movl (%r13), %edx
leaq 0x40(%r13), %rcx
movq %rbx, %rdi
leaq 0xaa902(%rip), %rsi     # 0x11a49e
xorl %eax, %eax
callq 0xdf05a
cmpq $0x0, 0x30(%r13)
je 0x70023
leaq 0x6c(%r13), %r15
movq %r15, %rdi
leaq 0xc80a4(%rip), %rsi     # 0x137c60
pushq $0x20
popq %rdx
callq 0xde492
movq 0x30(%r13), %rsi
movl 0x10(%rsi), %ecx
leal -0x1(%rcx), %eax
cmpl $0x4, %eax
ja 0x70023
leaq 0xaa302(%rip), %rdx     # 0x119ee0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl 0x68(%r13), %edi
testl %edi, %edi
jne 0x6fc8d
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rdx
leaq 0x30(%rsp), %rsi
pushq $0x8
popq %rcx
callq 0xe3cb7
cmpb $0x6a, 0x34(%rsp)
jne 0x6fc19
cmpb $0x50, 0x35(%rsp)
pushq $0x3
popq %rdi
je 0x6fc82
movb 0x30(%rsp), %dl
movb 0x31(%rsp), %al
movl %edx, %ecx
notb %cl
movl %eax, %esi
xorb $0x4f, %sil
orb %cl, %sil
movb 0x32(%rsp), %cl
movl %ecx, %edi
notb %dil
orb %sil, %dil
movb 0x33(%rsp), %sil
movl %esi, %r8d
xorb $0x51, %r8b
orb %dil, %r8b
pushq $0x4
popq %rdi
je 0x6fc82
movl %edx, %edi
xorb $-0x77, %dil
movl %eax, %r8d
xorb $0x50, %r8b
orb %dil, %r8b
pushq $0x2
popq %rdi
je 0x6fc82
xorb $0x41, %dl
xorb $0x52, %al
orb %dl, %al
xorb $0x47, %cl
orb %al, %cl
xorb $0x42, %sil
xorl %eax, %eax
orb %cl, %sil
sete %al
leal 0x1(,%rax,4), %edi
movl %edi, 0x68(%r13)
movq 0x30(%r13), %rsi
movl 0x10(%rsi), %ecx
cmpl $0x5, %ecx
jne 0x6fe38
cmpl $0x5, %edi
jne 0x6fe38
movl 0x4(%rsi), %eax
movl 0x8(%rsi), %ecx
movslq %eax, %rsi
movq %rsi, 0x38(%rsp)
movslq %ecx, %rax
movq %rax, 0x20(%rsp)
imulq %rax, %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0xe59cd
movq %r15, 0x18(%rsp)
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
pushq $0x4
popq %rcx
callq 0x70663
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
movq 0x20(%rsp), %rdx
pushq $0x4
popq %rcx
callq 0xe7437
movq %rax, %rbp
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
pushq $0x3
popq %rcx
callq 0x706fb
movq %r15, %rdi
pushq $0x1
popq %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x706fb
movq %r15, %rdi
pushq $0x2
popq %rsi
movq %rbp, %rdx
pushq $0x1
popq %rcx
callq 0x706fb
movq %r15, %rdi
pushq $0x3
popq %rsi
movq %rbp, %rdx
pushq $0x2
popq %rcx
callq 0x706fb
movq 0x18(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0xaa8f1(%rip), %rdx     # 0x11a63a
movq 0x38(%rsp), %rcx
movq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0xde40c
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0xe70b7
movq %rbp, %rdi
movl %r14d, %ebp
callq 0xe7084
testq %r15, %r15
je 0x70023
movq %r15, %rdi
jmp 0x703ef
movl 0xc(%rsi), %edi
movl 0x4(%rsi), %eax
imull %edi, %eax
addl $0x7, %eax
cltd
pushq $0x8
popq %r8
idivl %r8d
movslq %eax, %rdx
movq %rdx, 0x28(%r13)
movslq 0x8(%rsi), %rax
imulq %rdx, %rax
cmpl $0x4, %ecx
sete %cl
shlq %cl, %rax
cmpl $0x18, %edi
jne 0x6fedd
movb $0x6, %r14b
cmpl $0x49434f4e, (%rsi)     # imm = 0x49434F4E
movq %r15, 0x18(%rsp)
je 0x70123
movl 0x4(%rsi), %ecx
addl $-0x10, %ecx
roll $0x1c, %ecx
xorl %eax, %eax
cmpl $0x7, %ecx
ja 0x70067
leaq 0xaa10a(%rip), %rdx     # 0x119ef4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
xorl %r15d, %r15d
jmpq *%rcx
movl 0x8(%rsi), %ecx
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %r15
cmpl $0x10, %ecx
je 0x7006a
cmpl $0xc, %ecx
jne 0x70065
cmpl $0x9, 0xc(%rsi)
movl $0x0, %eax
cmovlq 0x58(%rsp), %rax
jmp 0x70067
movq %rbx, %rdi
leaq 0xaa6d6(%rip), %rsi     # 0x11a509
jmp 0x6fab3
movq 0x10(%r13), %rdx
movq %rbx, %rdi
leaq 0xaa7b1(%rip), %rsi     # 0x11a5f7
xorl %eax, %eax
callq 0xde896
movslq 0x68(%r13), %rax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
ja 0x6ff02
leaq 0xaa528(%rip), %rcx     # 0x11a38c
movslq -0x8(%rcx,%rax,4), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %rbp
movq 0x30(%r13), %rax
movl 0x4(%rax), %ecx
movl 0x8(%rax), %r8d
movq %r15, %rdi
pushq $0x20
popq %rsi
leaq 0xba807(%rip), %rdx     # 0x12a69b
xorl %eax, %eax
callq 0xde40c
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movl %r14d, %r8d
callq 0xdffbd
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
movq 0x18(%rsp), %rcx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0xe4e0b
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %ebp
callq 0xdfd24
jmp 0x70023
movq 0x18(%r13), %r8
cmpq %rax, %r8
jge 0x6ff1c
movl (%r13), %edx
movq %rbx, %rdi
leaq 0xaa629(%rip), %rsi     # 0x11a51d
movl %eax, %ecx
xorl %eax, %eax
callq 0xdf2a5
jmp 0x70023
movl (%r13), %edx
movq %rbx, %rdi
leaq 0xaa705(%rip), %rsi     # 0x11a615
xorl %eax, %eax
callq 0xdf2a5
jmp 0x70023
movb $0x6, %r14b
jle 0x6fdbe
movl (%r13), %edx
movq %rbx, %rdi
leaq 0xaa62b(%rip), %rsi     # 0x11a55e
movl %eax, %ecx
xorl %eax, %eax
callq 0xdf05a
movq 0x30(%r13), %rsi
jmp 0x6fdbe
movq $0x10, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movl %ebp, %ecx
movl %ebp, %r8d
jmp 0x6ff79
movq $0x10, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
pushq $0x4
popq %rcx
pushq $0x8
popq %r8
pushq $0x10
jmp 0x70012
movq $0x20, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
pushq $0x5
popq %rcx
pushq $0x8
popq %r8
jmp 0x70010
movq $0x30, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
pushq $0x6
popq %rcx
pushq $0x8
popq %r8
jmp 0x6fff3
movq $0x80, (%rsp)
movl $0x80, %r9d
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
pushq $0x7
popq %rcx
pushq $0x8
popq %r8
jmp 0x70014
movq $0x30, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
pushq $0x3
popq %rcx
movl %ebp, %r8d
pushq $0x30
jmp 0x70012
movq $0x20, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
pushq $0x2
popq %rcx
movl %ebp, %r8d
pushq $0x20
popq %r9
callq 0x704ef
movq %rbx, %rdi
movl %ebp, %esi
callq 0xdeba7
movl 0x40(%rsp), %r15d
incl %r15d
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
jmp 0x6f9cd
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %r15
jmp 0x7006a
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %r15
jmp 0x7006a
xorl %eax, %eax
movq 0x90(%rsp), %r15
jmp 0x7006a
xorl %eax, %eax
xorl %r15d, %r15d
movl 0xc(%rsi), %ecx
xorl %edx, %edx
cmpl $0x9, %ecx
setge %dl
addq $0x9, %rdx
cmpl $0x1, %ecx
pushq $0x8
popq %rcx
cmoveq %rcx, %rdx
movq 0x10(%rsp), %rcx
movzbl (%rcx,%rdx), %edx
movq %rax, %rcx
cmpl $0x1, %edx
je 0x700d3
cmpl $0x51, %edx
je 0x700a8
cmpl $0x12, %edx
je 0x700bc
movq %r15, %rcx
cmpl $0x8, %edx
je 0x700d3
jmp 0x7010e
movq %rax, %rcx
testq %r15, %r15
je 0x700d3
cmpq $0x0, 0x18(%r15)
movq %rax, %rcx
jne 0x700e2
jmp 0x700d3
testq %rax, %rax
je 0x700d0
cmpq $0x0, 0x18(%rax)
movq %r15, %rcx
movq %rax, %r15
jne 0x700e2
jmp 0x700d3
movq %r15, %rcx
testq %rcx, %rcx
je 0x7010e
cmpq $0x0, 0x18(%rcx)
movq %rcx, %r15
je 0x7010e
cmpl $0x4, 0x10(%rsi)
movq (%r15), %rdx
jne 0x700f6
cmpq %rax, %r15
jne 0x700f6
cmpq %rdx, 0x8(%r13)
jne 0x7010e
movb $0x1, 0x8(%r15)
movq %rbx, %rdi
leaq 0xaa542(%rip), %rsi     # 0x11a647
xorl %eax, %eax
callq 0xde896
jmp 0x70126
movq 0x8(%r13), %rdx
movq %rbx, %rdi
leaq 0xaa53f(%rip), %rsi     # 0x11a65b
xorl %eax, %eax
callq 0xde896
xorl %r15d, %r15d
movq %r15, 0x20(%r13)
movq 0x30(%r13), %rax
movl 0x4(%rax), %ecx
movl 0x8(%rax), %r8d
movl 0xc(%rax), %r9d
movq 0x18(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0xaa457(%rip), %rdx     # 0x11a59f
xorl %eax, %eax
callq 0xde40c
movq 0x30(%r13), %rax
movl 0x4(%rax), %edx
movl 0x8(%rax), %ecx
movl 0xc(%rax), %r8d
movq %rbx, %rdi
leaq 0xaa441(%rip), %rsi     # 0x11a5a8
xorl %eax, %eax
callq 0xde896
movq 0x30(%r13), %rax
movl 0xc(%rax), %ecx
cmpl $0x1, %ecx
je 0x70191
cmpl $0x4, %ecx
je 0x70191
cmpl $0x18, %ecx
je 0x70233
cmpl $0x8, %ecx
jne 0x702ec
xorl %edx, %edx
cmpl $0x1, %ecx
setne %dl
leal 0x2(%rdx,%rdx), %ecx
movslq 0x4(%rax), %rsi
movslq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0xe7437
movq %rax, 0x20(%rsp)
movq 0x30(%r13), %r15
movl 0xc(%r15), %eax
cmpl $0x4, %eax
je 0x701f5
cmpl $0x8, %eax
jne 0x70277
movq 0x10(%rsp), %rax
cmpb $0x0, 0x110(%rax)
je 0x703f9
leaq 0x8c(%r13), %rdi
movl $0x400, %edx            # imm = 0x400
movq 0x48(%rsp), %rsi
callq 0x181e0
jmp 0x70288
movaps 0xaa0d4(%rip), %xmm0    # 0x11a2d0
movups %xmm0, 0xbc(%r13)
movaps 0xaa0b5(%rip), %xmm0    # 0x11a2c0
movups %xmm0, 0xac(%r13)
movaps 0xaa096(%rip), %xmm0    # 0x11a2b0
movups %xmm0, 0x9c(%r13)
movaps 0xaa077(%rip), %xmm0    # 0x11a2a0
movups %xmm0, 0x8c(%r13)
jmp 0x70288
movslq 0x4(%rax), %r14
movslq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
cmpl $0x69743332, 0x3c(%r13) # imm = 0x69743332
jne 0x7030d
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rsi
leaq 0xaa127(%rip), %rdx     # 0x11a384
pushq $0x4
popq %rcx
callq 0xe4d48
xorl %r15d, %r15d
testl %eax, %eax
sete %r15b
shll $0x2, %r15d
jmp 0x70310
movabsq $-0xffffff00000001, %rax # imm = 0xFF000000FFFFFFFF
movq %rax, 0x8c(%r13)
movq 0x18(%rbx), %rdi
movslq 0xc(%r15), %rdx
movq 0x10(%r13), %rsi
movq 0x28(%r13), %rcx
movq %r13, %r8
addq $0x8c, %r8
andl $0x0, (%rsp)
movq 0x20(%rsp), %r14
movq %r14, %r9
callq 0xe7cbc
movq 0x20(%r13), %rax
testq %rax, %rax
je 0x702cf
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x702cf
movq %r14, %rdi
xorl %edx, %edx
callq 0xe83f8
movq %r14, %rdi
movq 0x18(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0xe70b7
movq %r14, %rdi
callq 0xe7084
jmp 0x70023
movl (%r13), %edx
movq %r13, %rcx
addq $0x40, %rcx
movq %rbx, %rdi
leaq 0xaa2c9(%rip), %rsi     # 0x11a5ca
xorl %eax, %eax
callq 0xdf05a
jmp 0x70023
xorl %r15d, %r15d
movq %r14, %rax
imulq 0x20(%rsp), %rax
leaq (%rax,%rax,2), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0xe59cd
movq %r14, 0x50(%rsp)
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x70663
movq %rbx, %rdi
movq %r14, %rsi
movq 0x20(%rsp), %r14
movq %r14, %rdx
pushq $0x4
popq %rcx
callq 0xe7437
movq %rax, %r15
andl $0x0, (%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq 0x50(%rsp), %rcx
movq %r14, %r8
movq 0x38(%rsp), %r14
movl $0xff000000, %r9d       # imm = 0xFF000000
callq 0xe8292
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x706fb
movq %r14, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rsi
movq %r15, %rdx
callq 0x706fb
movq %r14, %rdi
pushq $0x2
popq %rcx
movq %rcx, %rsi
movq %r15, %rdx
callq 0x706fb
movq 0x20(%r13), %rax
testq %rax, %rax
je 0x703cb
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x703cb
movq %r15, %rdi
xorl %edx, %edx
callq 0xe83f8
movq %r15, %rdi
movq 0x18(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0xe70b7
movq %r15, %rdi
callq 0xe7084
testq %r14, %r14
je 0x70023
movq %r14, %rdi
callq 0xe5591
jmp 0x70023
movq 0x10(%rsp), %rax
movb $0x1, 0x110(%rax)
movb $0x5, %sil
xorl %edi, %edi
movzbl %dil, %edx
movl %edx, %eax
divb %r14b
movl %eax, %ecx
movl %edx, %eax
movb $0x24, %dl
divb %dl
movzbl %ah, %edx
cmpq $0x100, %rdi            # imm = 0x100
je 0x701da
cmpq $0xd6, %rdi
ja 0x70483
movzbl %cl, %eax
imull $0x6, %eax, %ecx
addb %sil, %cl
movzbl %dil, %eax
movb $0x24, %r8b
divb %r8b
movzbl %al, %eax
pushq $0x5
popq %r9
movl %r9d, %r8d
subl %eax, %r8d
movzbl %dl, %eax
divb %r14b
movzbl %al, %eax
movl %r9d, %edx
subl %eax, %edx
movzbl %cl, %eax
imull $0x33, %eax, %eax
imull $0x330000, %r8d, %ecx   # imm = 0x330000
orl %eax, %ecx
imull $0x3300, %edx, %eax     # imm = 0x3300
movzwl %ax, %eax
addl %ecx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
jmp 0x70491
leaq 0xa9e56(%rip), %rax     # 0x11a2e0
movl -0x35c(%rax,%rdi,4), %eax
movq 0x48(%rsp), %rcx
movl %eax, (%rcx,%rdi,4)
incq %rdi
decb %sil
jmp 0x7040a
cmpl $0x2, 0x2c(%rsp)
jne 0x704c6
movq %r13, %rdx
addq $0x40, %rdx
leaq 0xa9fb3(%rip), %rsi     # 0x11a46c
movq %rbx, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r13, %rsi
callq 0xded32
movl 0x44(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq