// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/insetpix.c
// Function: de_run_insetpix
static void de_run_insetpix(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	UI pix_version;
	i64 item;
	i64 pos;
	i64 num_skipped_items = 0;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	d = de_malloc(c, sizeof(lctx));
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_CP437);

	pix_version = (UI)de_getu16le(0);
	d->item_count = de_getu16le(2);
	de_dbg(c, "version: %u", pix_version);
	de_dbg(c, "index at 4, %d items", (int)d->item_count);

	// Scan the index, and record the location of items we care about.
	// (The index will be read again when converting the image bitmap.)
	de_dbg_indent(c, 1);
	for(item=0; item<d->item_count; item++) {
		struct insetpix_item_data itd;
		u8 skip_flag = 0;

		pos = 4 + 8*item;
		if(pos+8 > c->infile->len) goto done;

		insetpix_read_item(c, pos, &itd);
		if(itd.is_tile) {
			if(d->num_tiles_found==0) {
				d->idx_of_1st_tile = item;
			}
			d->num_tiles_found++;
		}
		skip_flag = itd.is_special;
		if(skip_flag) {
			num_skipped_items++;
		}
		if(skip_flag && c->debug_level<2) { // Skip "tile" items for now
			continue;
		}

		insetpix_dbg_item(c, &itd, item);

		if(skip_flag) {
			continue;
		}

		if(itd.loc + itd.len > c->infile->len) {
			de_err(c, "Item #%d (ID %u) goes beyond end of file",
				(int)item, itd.id);
			goto done;
		}

		switch(itd.id) {
		case 0:
			d->imginfo_pos = itd.loc;
			d->imginfo_len = itd.len;
			break;
		case 1:
			if(!d->pal_pos) {
				d->pal_pos = itd.loc;
				d->pal_len = itd.len;
			}
			break;
		case 2:
			d->tileinfo_pos = itd.loc;
			d->tileinfo_len = itd.len;
			break;
		}
	}
	if(c->debug_level<2) {
		de_dbg(c, "other items not listed: %"I64_FMT, num_skipped_items);
	}
	de_dbg(c, "number of tiles: %"I64_FMT, d->num_tiles_found);
	de_dbg_indent(c, -1);

	do_image_info(c, d);
	if(!d->have_image_info) {
		de_err(c, "Bad or missing Image Info");
		goto done;
	}

	if(d->pal_sample_descriptor[0]!=0 && d->pal_sample_descriptor[1]==0 &&
		d->pal_sample_descriptor[2]==0 && d->pal_sample_descriptor[3]==0)
	{
		d->is_grayscale = 1;
	}

	do_palette(c, d);
	if(!d->have_pal_data) {
		de_err(c, "Bad or missing palette");
		goto done;
	}

	do_tileinfo(c, d);
	if(!d->have_tile_info) {
		de_err(c, "Bad or missing Tile Info");
		goto done;
	}

	if(d->graphics_type==0) {
		do_char_graphics(c, d);
	}
	else {
		if(d->gfore<1 || d->gfore>8) {
			de_err(c, "Inset PIX with %d bits/pixel are not supported", (int)d->gfore);
			goto done;
		}

		switch(d->descriptor_combined) {
		case 0x00040404U:
		case 0x00404040U:
		case 0x02000000U:
		case 0x02020202U:
			break;
		default:
			de_warn(c, "Not a known image type. This image might not be handled correctly.");
		}

		do_bitmap(c, d);
	}

done:
	if(d) {
		de_bitmap_destroy(d->tile_img);
		de_free(c, d);
	}
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r14
leaq 0x38(%rsp), %rsi
callq 0xe8a1c
movl $0x4f0, %esi            # imm = 0x4F0
movq %r14, %rdi
callq 0xe8b2b
movq %rax, %rbx
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
movl $0xd, %edx
callq 0xeb220
movl %eax, (%rbx)
movq 0x18(%r14), %rdi
xorl %esi, %esi
callq 0xeebc8
movq %rax, %r12
movq 0x18(%r14), %rdi
movl $0x2, %esi
callq 0xeebc8
movq %rax, 0x40(%rbx)
leaq 0xb921f(%rip), %rsi     # 0x136d84
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
movl 0x40(%rbx), %edx
leaq 0xabdcd(%rip), %rsi     # 0x129949
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpq $0x0, 0x40(%rbx)
movq %rbx, 0x10(%rsp)
jle 0x7dce5
movl $0xc, %ebp
xorl %r15d, %r15d
leaq 0x70(%rsp), %r13
xorl %r12d, %r12d
movq 0x18(%r14), %rax
cmpq 0x18(%rax), %rbp
jg 0x7e524
leaq -0x8(%rbp), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x7eb78
cmpb $0x0, 0x79(%rsp)
je 0x7dbeb
movq 0x48(%rbx), %rax
testq %rax, %rax
jne 0x7dbe4
movq %r12, 0x50(%rbx)
incq %rax
movq %rax, 0x48(%rbx)
movq %r14, %rbx
movb 0x78(%rsp), %al
xorl %r14d, %r14d
testb %al, %al
setne %sil
je 0x7dc1e
cmpl $0x2, (%rbx)
jl 0x7dcc3
movq %rbx, %rdi
movb %sil, 0x18(%rsp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x7ebe8
jmp 0x7dcbe
movb %sil, 0x18(%rsp)
movq %r15, 0x28(%rsp)
movq %r13, %rsi
movq %rbx, %rdi
movq %r13, %r15
movq %r12, %rdx
callq 0x7ebe8
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
leaq (%rax,%rcx), %rdx
movq 0x18(%rbx), %rsi
cmpq 0x18(%rsi), %rdx
jg 0x7e0d0
movl 0x70(%rsp), %edx
cmpl $0x2, %edx
je 0x7dca9
cmpl $0x1, %edx
movq %r15, %r13
movb 0x18(%rsp), %sil
je 0x7dc89
testl %edx, %edx
movq 0x28(%rsp), %r15
jne 0x7dcc3
movq 0x10(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movq %rax, 0x18(%rdx)
jmp 0x7dcc3
movq 0x10(%rsp), %rdx
cmpq $0x0, 0x20(%rdx)
movq 0x28(%rsp), %r15
jne 0x7dcc3
movq 0x10(%rsp), %rdx
movq %rcx, 0x20(%rdx)
movq %rax, 0x28(%rdx)
jmp 0x7dcc3
movq 0x10(%rsp), %rdx
movq %rcx, 0x30(%rdx)
movq %rax, 0x38(%rdx)
movq %r15, %r13
movq 0x28(%rsp), %r15
movb 0x18(%rsp), %sil
movb %sil, %r14b
addq %r14, %r15
incq %r12
addq $0x8, %rbp
movq 0x10(%rsp), %rax
cmpq 0x40(%rax), %r12
movq %rbx, %r14
movq %rax, %rbx
jl 0x7dbb3
cmpl $0x1, (%r14)
jg 0x7dcff
leaq 0xabc95(%rip), %rsi     # 0x129987
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x48(%rbx), %rdx
leaq 0xabc99(%rip), %rsi     # 0x1299a3
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xe8a1c
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x7dfca
cmpq $0x20, 0x18(%rbx)
jl 0x7dfca
leaq 0xabd7d(%rip), %rsi     # 0x129aca
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
leaq 0x70(%rsp), %r12
movq %r15, (%r12)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movb %al, 0x4(%rbx)
movzbl %al, %edx
leaq 0xabd5a(%rip), %rsi     # 0x129ae3
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movb %al, 0x5(%rbx)
movl %eax, %ecx
andb $0x1, %cl
movb %cl, 0x6(%rbx)
movzbl %al, %edx
andb $-0x2, %al
movb %al, 0x7(%rbx)
leaq 0xabd3c(%rip), %rsi     # 0x129af5
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movzbl 0x7(%rbx), %edx
movl %edx, %eax
andl $0x7e, %eax
roll $0x1d, %eax
cmpl $0x3, %eax
ja 0x7ddf3
movl %eax, %eax
leaq 0xabf12(%rip), %rsi     # 0x129cfc
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0x7ddfa
leaq 0xae357(%rip), %rcx     # 0x12c151
leaq 0xabd02(%rip), %rsi     # 0x129b03
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movzbl 0x6(%rbx), %edx
testl %edx, %edx
leaq 0xabd16(%rip), %rax     # 0x129b2e
leaq 0x99b95(%rip), %rcx     # 0x1179b4
cmoveq %rax, %rcx
leaq 0xabced(%rip), %rsi     # 0x129b17
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movb 0x6(%rbx), %al
testb %al, %al
jne 0x7de92
leaq 0x5(%r15), %rax
leaq 0x70(%rsp), %r12
movq %rax, (%r12)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %eax
movq %rax, 0x70(%rbx)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %ecx
movq %rcx, 0x78(%rbx)
movl 0x70(%rbx), %edx
leaq 0xabcb3(%rip), %rsi     # 0x129b38
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movb 0x6(%rbx), %al
cmpb $0x1, %al
jne 0x7df0f
leaq 0x12(%r15), %rax
leaq 0x70(%rsp), %r12
movq %rax, (%r12)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
movq %rax, 0x58(%rbx)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
movq %rax, 0x68(%rbx)
movq 0x58(%rbx), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0xe8f88
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rdx, 0x80(%rbx)
leaq 0xabc67(%rip), %rsi     # 0x129b56
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x80(%rbx), %rdi
callq 0xe9c9b
decq %rax
movq %rax, 0x88(%rbx)
addq $0x19, %r15
leaq 0x70(%rsp), %r12
movq %r15, (%r12)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movl %eax, 0x94(%rbx)
movq %rax, %rdx
shrq $0x18, %rdx
movb %dl, 0x90(%rbx)
movq %rax, %rcx
shrq $0x10, %rcx
movb %cl, 0x91(%rbx)
movq %rax, %r8
shrq $0x8, %r8
movb %r8b, 0x92(%rbx)
movb %al, 0x93(%rbx)
movl $0xff, %r9d
andl %r9d, %edx
andl %r9d, %ecx
andl %r9d, %r8d
andl %eax, %r9d
leaq 0xabbfb(%rip), %rsi     # 0x129b70
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
incq (%r12)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %eax
movq %rax, 0x98(%rbx)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %ecx
movq %rcx, 0xa0(%rbx)
movl 0x98(%rbx), %edx
leaq 0xabbdb(%rip), %rsi     # 0x129b97
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movb $0x1, 0x8(%rbx)
movl 0x50(%rsp), %esi
movq %r14, %rdi
callq 0xe8a25
cmpb $0x0, 0x8(%rbx)
je 0x7e0c4
cmpb $0x0, 0x90(%rbx)
je 0x7e00e
cmpb $0x0, 0x91(%rbx)
jne 0x7e00e
cmpb $0x0, 0x92(%rbx)
jne 0x7e00e
cmpb $0x0, 0x93(%rbx)
jne 0x7e00e
movl $0x1, 0xd8(%rbx)
leaq 0x3c(%rsp), %rsi
movq %r14, %rdi
callq 0xe8a1c
movq 0x20(%rbx), %rdx
testq %rdx, %rdx
je 0x7e3b1
cmpq $0x4, 0x28(%rbx)
jl 0x7e3b1
movq %rdx, 0xb0(%rsp)
leaq 0xb85a9(%rip), %rsi     # 0x1365eb
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x28(%rbx), %r12
leaq 0x3(%r12), %r15
testq %r12, %r12
cmovnsq %r12, %r15
sarq $0x2, %r15
leaq 0x9334f(%rip), %rsi     # 0x1113c3
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r15, 0xe8(%rbx)
cmpb $0x1, 0x6(%rbx)
jne 0x7e0a6
movq 0x88(%rbx), %rax
incq %rax
cmpq %r15, %rax
cmovgeq %r15, %rax
movq %rax, 0xe8(%rbx)
movsd 0x9978a(%rip), %xmm0    # 0x117838
cmpb $0x0, 0x90(%rbx)
je 0x7e0c0
cmpl $0x0, 0xd8(%rbx)
je 0x7e0f5
xorl %eax, %eax
jmp 0x7e0ff
leaq 0xab8ed(%rip), %rsi     # 0x1299b8
jmp 0x7e51a
movl 0x70(%rsp), %ecx
leaq 0xab883(%rip), %rsi     # 0x12995e
movq %rbx, %r14
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9295
movq 0x10(%rsp), %rbx
jmp 0x7e524
movsd 0xab7eb(%rip), %xmm0    # 0x1298e8
movb $0x1, %al
movl %eax, 0x18(%rsp)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
xorl %eax, %eax
movdqa 0xab7df(%rip), %xmm1    # 0x1298f0
pcmpeqd %xmm2, %xmm2
pxor %xmm3, %xmm3
movdqa 0x9965f(%rip), %xmm4    # 0x117780
movzwl 0x90(%rbx,%rax), %ecx
movd %ecx, %xmm5
movdqa %xmm5, %xmm6
pminub %xmm1, %xmm6
pcmpeqb %xmm5, %xmm6
punpcklbw %xmm6, %xmm6    # xmm6 = xmm6[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pxor %xmm2, %xmm6
pshuflw $0x50, %xmm6, %xmm6     # xmm6 = xmm6[0,0,1,1,4,5,6,7]
pshufd $0x50, %xmm6, %xmm6     # xmm6 = xmm6[0,0,1,1]
punpcklbw %xmm3, %xmm5    # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1],xmm5[2],xmm3[2],xmm5[3],xmm3[3],xmm5[4],xmm3[4],xmm5[5],xmm3[5],xmm5[6],xmm3[6],xmm5[7],xmm3[7]
punpcklwd %xmm3, %xmm5    # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1],xmm5[2],xmm3[2],xmm5[3],xmm3[3]
paddd %xmm2, %xmm5
punpckldq %xmm3, %xmm5    # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1]
por %xmm4, %xmm5
subpd %xmm4, %xmm5
movapd %xmm0, %xmm7
divpd %xmm5, %xmm7
andpd %xmm6, %xmm7
movapd %xmm7, 0x50(%rsp,%rax,8)
addq $0x2, %rax
cmpq $0x4, %rax
jne 0x7e121
cmpq $0x4, %r12
jl 0x7e3ad
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movups 0x58(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
movsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0xb0(%rsp), %r12
xorl %r13d, %r13d
cmpq $0x100, %r13            # imm = 0x100
je 0x7e3ad
xorl %ebx, %ebx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movb %al, 0x24(%rsp,%rbx)
movb %al, 0xc(%rsp,%rbx)
incq %rbx
cmpq $0x4, %rbx
jne 0x7e1c5
xorl %eax, %eax
movq 0x10(%rsp), %rbx
leaq 0x70(%rsp), %rbp
cmpb $0x4, 0x91(%rbx,%rax)
jne 0x7e211
movzbl 0xd(%rsp,%rax), %ecx
cmpl $0x1, %ecx
je 0x7e20b
cmpl $0x2, %ecx
jne 0x7e211
movb $0x1, %cl
jmp 0x7e20d
movb $0x2, %cl
movb %cl, 0xd(%rsp,%rax)
incq %rax
cmpq $0x3, %rax
jne 0x7e1ee
cmpl $0x0, 0xd8(%rbx)
je 0x7e253
movzbl 0xc(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x28(%rsp), %xmm0
addsd 0x995f3(%rip), %xmm0    # 0x117830
cvttsd2si %xmm0, %eax
movzbl %al, %eax
imull $0x10101, %eax, %eax    # imm = 0x10101
movl 0x18(%rsp), %esi
jmp 0x7e30e
movzbl 0xf(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x30(%rsp), %xmm0
addsd 0x995c3(%rip), %xmm0    # 0x117830
cvttsd2si %xmm0, %ecx
cmpb $0x0, 0xc(%rsp)
setne %dl
movl 0x18(%rsp), %esi
andb %sil, %dl
leal 0x55(%rcx), %eax
movzbl %al, %eax
testb %dl, %dl
cmovel %ecx, %eax
movzwl 0xd(%rsp), %ecx
movd %ecx, %xmm0
pxor %xmm3, %xmm3
punpcklbw %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3],xmm0[4],xmm3[4],xmm0[5],xmm3[5],xmm0[6],xmm3[6],xmm0[7],xmm3[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
cvtdq2pd %xmm0, %xmm0
mulpd 0x40(%rsp), %xmm0
addpd 0xab64e(%rip), %xmm0    # 0x129900
cvttpd2dq %xmm0, %xmm0
packuswb %xmm0, %xmm0
packuswb %xmm0, %xmm0
movzbl %dl, %ecx
movd %ecx, %xmm1
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
psllw $0x7, %xmm1
pand 0xab63a(%rip), %xmm1    # 0x129910
pxor %xmm2, %xmm2
pcmpgtb %xmm1, %xmm2
pand 0xab63a(%rip), %xmm2    # 0x129920
paddb %xmm0, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
movdqa %xmm2, %xmm0
pslld $0x10, %xmm0
psrld $0x10, %xmm2
pslld $0x8, %xmm2
por %xmm0, %xmm2
movd %xmm2, %ecx
movzbl %al, %eax
orl %ecx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, 0xf0(%rbx,%r13,4)
movzbl 0x25(%rsp), %ecx
movzbl 0x26(%rsp), %r8d
movzbl 0x27(%rsp), %r9d
testb %sil, %sil
je 0x7e359
movzbl 0x24(%rsp), %r10d
subq $0x8, %rsp
movl $0x40, %esi
movq %rbp, %rdi
leaq 0xab862(%rip), %rdx     # 0x129bac
xorl %eax, %eax
pushq %r10
callq 0xe8193
addq $0x10, %rsp
jmp 0x7e36f
movl $0x40, %esi
movq %rbp, %rdi
leaq 0xab861(%rip), %rdx     # 0x129bc9
xorl %eax, %eax
callq 0xe8193
cmpq 0xe8(%rbx), %r13
movl 0xf0(%rbx,%r13,4), %edx
leaq 0x92c26(%rip), %r9      # 0x110fab
leaq 0xc6d24(%rip), %rax     # 0x1450b0
cmovlq %rax, %r9
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0xe90a3
incq %r13
cmpq %r15, %r13
jne 0x7e1b6
movb $0x1, 0x9(%rbx)
movl 0x3c(%rsp), %esi
movq %r14, %rdi
callq 0xe8a25
cmpb $0x0, 0x9(%rbx)
je 0x7e4bf
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xe8a1c
movq 0x30(%rbx), %r15
testq %r15, %r15
je 0x7e4d3
cmpq $0x8, 0x38(%rbx)
jl 0x7e4d3
leaq 0xab7e9(%rip), %rsi     # 0x129bdc
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
leaq 0x70(%rsp), %r12
movq %r15, (%r12)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
movq %rax, 0xa8(%rbx)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
movq %rax, 0xb0(%rbx)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
movq %rax, 0xb8(%rbx)
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
movq %rax, 0xc0(%rbx)
movq 0xa8(%rbx), %rcx
movq 0xb0(%rbx), %rdx
leaq 0xab77d(%rip), %rsi     # 0x129bf4
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0xb8(%rbx), %rcx
movq 0xc0(%rbx), %rdx
leaq 0xab77d(%rip), %rsi     # 0x129c13
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0xb0(%rbx), %rdx
testb $0x7, %dl
je 0x7e4c8
leaq 0xab77e(%rip), %rsi     # 0x129c31
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x7e4d3
leaq 0xab50c(%rip), %rsi     # 0x1299d2
jmp 0x7e51a
cmpq $0x0, 0x48(%rbx)
je 0x7e4d3
movb $0x1, 0xa(%rbx)
movl 0x50(%rsp), %esi
movq %r14, %rdi
callq 0xe8a25
cmpb $0x0, 0xa(%rbx)
je 0x7e513
cmpb $0x0, 0x6(%rbx)
je 0x7e559
movq 0x80(%rbx), %rdx
leaq -0x9(%rdx), %rax
cmpq $-0x9, %rax
ja 0x7e6ee
leaq 0xab4fb(%rip), %rsi     # 0x129a02
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0x7e524
leaq 0xab4cf(%rip), %rsi     # 0x1299e9
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
movq 0xe0(%rbx), %rdi
callq 0xf228d
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe8be2
movl 0x38(%rsp), %esi
movq %r14, %rdi
callq 0xe8a25
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xe8a1c
leaq 0xab6ee(%rip), %rsi     # 0x129c5b
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpq $0x1, 0x48(%rbx)
jne 0x7e70b
movq 0x50(%rbx), %rax
leaq 0x4(,%rax,8), %rsi
leaq 0x70(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x7eb78
movq 0x50(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x7ebe8
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %edx, %edx
callq 0xf09c5
movq %rax, %r15
movl $0x40, %esi
movq %r14, %rdi
callq 0xe8b2b
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
callq 0xf3eb8
movq %rax, %r13
movb $0x1, 0x2(%rax)
movq 0xb0(%rbx), %rax
movq %rax, 0x20(%r12)
movq 0xa8(%rbx), %r8
movq %r8, 0x28(%r12)
cmpq $0x51, %rax
setge %cl
cmpq $0x1a, %r8
setge %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x7e61f
movb $0x1, 0x3(%r13)
movl $0x1, %ebx
movq 0x10(%rsp), %rbp
movq %rbx, 0x80(%rbp)
leaq (%rax,%rax), %rcx
movq %rcx, 0xc8(%rbp)
leaq 0x7(,%rax,2), %rcx
leaq 0xe(,%rax,2), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x3, %rax
movq %rax, 0xd0(%rbp)
leaq 0x70(%rsp), %rdx
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rcx
callq 0x7ecb4
movl (%rbp), %eax
movl %eax, 0x18(%r12)
movq %r15, (%r12)
movq $0x0, 0x8(%r12)
movq 0x28(%r12), %rax
imulq 0x20(%r12), %rax
leaq (%rax,%rax), %rcx
movq %rcx, 0x10(%r12)
movq %rbx, 0x30(%r12)
movq %rbp, %rbx
movq %rax, 0x38(%r12)
movupd 0xf0(%rbp), %xmm0
movdqu 0x100(%rbp), %xmm1
movdqu 0x110(%rbp), %xmm2
movdqu 0x120(%rbp), %xmm3
movupd %xmm0, 0x20(%r13)
movdqu %xmm1, 0x30(%r13)
movdqu %xmm2, 0x40(%r13)
movdqu %xmm3, 0x50(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xf9c77
jmp 0x7e725
movl 0x94(%rbx), %eax
cmpl $0x1ffffff, %eax        # imm = 0x1FFFFFF
jg 0x7e754
cmpl $0x40404, %eax          # imm = 0x40404
je 0x7e773
cmpl $0x404040, %eax         # imm = 0x404040
je 0x7e773
jmp 0x7e762
leaq 0xab55f(%rip), %rsi     # 0x129c71
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0xf3fb8
movq %r14, %rdi
movq %r12, %rsi
callq 0xe8be2
movq %r15, %rdi
callq 0xf052b
movl 0x50(%rsp), %esi
movq %r14, %rdi
callq 0xe8a25
jmp 0x7e524
cmpl $0x2000000, %eax        # imm = 0x2000000
je 0x7e773
cmpl $0x2020202, %eax        # imm = 0x2020202
je 0x7e773
leaq 0xab2c8(%rip), %rsi     # 0x129a31
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8faa
leaq 0xab53a(%rip), %rsi     # 0x129cb4
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x58(%rbx), %rsi
movq 0x68(%rbx), %rdx
movq %r14, %rdi
callq 0xf1db1
testl %eax, %eax
je 0x7e7f7
movq 0xb0(%rbx), %rdx
leaq 0x7(%rdx), %rax
testq %rdx, %rdx
cmovnsq %rdx, %rax
sarq $0x3, %rax
movq %rax, 0xc8(%rbx)
leaq 0x7(%rax), %rcx
addq $0xe, %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x3, %rax
movq %rax, 0xd0(%rbx)
cmpb $0x0, 0xd6(%r14)
je 0x7e7ff
imulq 0xc0(%rbx), %rdx
movq 0x58(%rbx), %rsi
jmp 0x7e806
xorl %r15d, %r15d
jmp 0x7ea59
movq 0x58(%rbx), %rsi
movq %rsi, %rdx
movq %rdx, 0x60(%rbx)
movq 0x68(%rbx), %rcx
xorl %eax, %eax
cmpl $0x0, 0xd8(%rbx)
sete %al
leal 0x1(,%rax,2), %r8d
movq %r14, %rdi
callq 0xf26a5
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rbx)
jle 0x7ea0d
movq %rbx, %rax
addq $0xf0, %rax
movq %rax, 0x30(%rsp)
movl $0xc, %r12d
xorl %ebp, %ebp
movq 0x18(%r14), %rax
cmpq 0x18(%rax), %r12
jg 0x7ea0d
leaq -0x8(%r12), %rsi
movq %r14, %rdi
leaq 0x70(%rsp), %rdx
callq 0x7eb78
cmpb $0x0, 0x79(%rsp)
je 0x7e9fc
movq %r14, %rdi
leaq 0x70(%rsp), %r15
movq %r15, %rsi
movq %rbp, %rdx
callq 0x7ebe8
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movl 0x74(%rsp), %eax
xorl %edx, %edx
idivq 0xc0(%rbx)
movq 0xb0(%rbx), %r10
movq %r10, %r8
imulq %rdx, %r8
movq 0x68(%rbx), %r13
movq 0xa8(%rbx), %rcx
movq %rcx, %r9
imulq %rax, %r9
subq %r9, %r13
cmpq %rcx, %r13
cmovgeq %rcx, %r13
movq 0xc8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
movq %r14, %rdi
leaq 0xab3df(%rip), %rsi     # 0x129cc7
movl %eax, %ecx
movq %r8, 0x10(%rsp)
movq %r9, 0x28(%rsp)
xorl %eax, %eax
pushq %r13
pushq %r10
callq 0xe8617
addq $0x10, %rsp
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %edx, %edx
callq 0xf09c5
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %r15
movq %rax, %rcx
movq %r13, %r8
callq 0x7ecb4
movq 0xe0(%rbx), %rdi
movq 0xa8(%rbx), %r8
movq 0xb0(%rbx), %rcx
testq %rdi, %rdi
je 0x7e962
subq $0x8, %rsp
xorl %esi, %esi
xorl %edx, %edx
xorl %r9d, %r9d
pushq $0x0
callq 0xf3654
addq $0x10, %rsp
movq 0xe0(%rbx), %rax
jmp 0x7e989
xorl %eax, %eax
cmpl $0x0, 0xd8(%rbx)
sete %al
leal 0x1(%rax,%rax), %eax
movq %r14, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %eax, %ecx
callq 0xf266a
movq %rax, 0xe0(%rbx)
movq 0x18(%rsp), %r8
imulq %r13, %r8
movq 0x80(%rbx), %rdx
movq 0xc8(%rbx), %rcx
movq %r15, %rdi
xorl %esi, %esi
movq 0x30(%rsp), %r9
pushq $0x2
pushq %rax
callq 0xf30b3
addq $0x10, %rsp
movq 0xb0(%rbx), %r8
movq 0xe0(%rbx), %rdi
subq $0x8, %rsp
movq 0x48(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r9
pushq $0x0
pushq 0x38(%rsp)
pushq 0x28(%rsp)
callq 0xf36d0
addq $0x20, %rsp
movq %r15, %rdi
callq 0xf052b
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbp
addq $0x8, %r12
cmpq 0x40(%rbx), %rbp
jl 0x7e850
movq %r14, %rdi
callq 0xea504
movq %rax, %r15
movl $0x1, 0x78(%rax)
cvtsi2sdq 0x98(%rbx), %xmm0
movsd %xmm0, 0x80(%rax)
xorps %xmm0, %xmm0
cvtsi2sdq 0xa0(%rbx), %xmm0
movsd %xmm0, 0x88(%rax)
movq 0x40(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0xf22d0
movq %r12, %rdi
callq 0xf228d
movq %r14, %rdi
movq %r15, %rsi
callq 0xea50e
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x7e524