// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/gif.c
// Function: de_run_gif
static void de_run_gif(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 bytesused = 0;
	u8 block_type;
	const char *blk_name;

	d = de_malloc(c, sizeof(lctx));
	d->compose = 1;
	d->fi = de_finfo_create(c);

	if(de_get_ext_option(c, "gif:raw")) {
		d->compose = 0;
		// TODO: It would be more consistent to extract an *image* of each
		// plain text extension, but we don't support that, so extract them
		// as text files instead.
		d->dump_plaintext_ext = 1;
	}
	if(de_get_ext_option(c, "gif:dumpplaintext")) {
		d->dump_plaintext_ext = 1;
	}
	if(de_get_ext_option(c, "gif:dumpscreen")) {
		// This lets the user see what the screen looks like after the last
		// "graphic rendering block" has been disposed of.
		d->dump_screen = 1;
	}

	pos = 0;
	if(!do_read_header(c, d, pos)) goto done;
	pos += 6;
	if(!do_read_screen_descriptor(c, d, pos)) goto done;
	pos += 7;
	if(!do_read_global_color_table(c, d, pos, &bytesused)) goto done;
	pos += bytesused;

	// If we're fully rendering the frames, create a "screen" image to
	// track the current state of the animation.
	if(d->compose) {
		if(!de_good_image_dimensions(c, d->screen_w, d->screen_h)) {
			// Try to continue. There could be other interesting things in the file.
			d->bad_screen_flag = 1;
			d->screen_w = 1;
			d->screen_h = 1;
		}
		d->screen_img = de_bitmap_create(c, d->screen_w, d->screen_h, 4);
	}

	while(1) {
		if(pos >= c->infile->len) {
			on_unexpected_eof(c, d);
			goto done;
		}
		block_type = de_getbyte(pos);

		switch(block_type) {
		case 0x2c: blk_name="image"; break;
		case 0x3b: blk_name="trailer"; break;
		case 0x21: blk_name="extension"; break;
		default: blk_name="?"; break;
		}

		de_dbg(c, "block type 0x%02x (%s) at %"I64_FMT, (UI)block_type, blk_name, pos);
		pos++;

		switch(block_type) {
		case 0x3b:
			goto found_trailer;
		case 0x21:
			if(!do_read_extension(c, d, pos, &bytesused)) goto done;
			pos += bytesused;
			break;
		case 0x2c:
			if(!do_image(c, d, pos, &bytesused)) goto done;
			pos += bytesused;
			break;
		default:
			de_err(c, "Unknown block type: 0x%02x", (unsigned int)block_type);
			goto done;
		}
	}

found_trailer:
	do_after_trailer(c, d, pos);

done:
	if(d) {
		if(d->screen_img) {
			if(d->dump_screen) {
				de_finfo_set_name_from_sz(c, d->fi, "screen", 0, DE_ENCODING_LATIN1);
				de_bitmap_write_to_file_finfo(d->screen_img, d->fi, DE_CREATEFLAG_OPT_IMAGE);
				de_finfo_set_name_from_sz(c, d->fi, NULL, 0, DE_ENCODING_LATIN1);
			}
			de_bitmap_destroy(d->screen_img);
		}
		discard_current_gce_data(c, d);
		de_finfo_destroy(c, d->fi);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
movl $0x450, %esi            # imm = 0x450
callq 0xe8b2b
movq %rax, %r14
movl $0x1, (%rax)
movq %rbx, %rdi
callq 0xea504
movq %rax, 0x448(%r14)
leaq 0xcecca(%rip), %rsi     # 0x11fb06
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x50e58
movl $0x0, (%r14)
movl $0x1, 0xc(%r14)
leaq 0xcecaf(%rip), %rsi     # 0x11fb0e
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x50e74
movl $0x1, 0xc(%r14)
leaq 0xceca5(%rip), %rsi     # 0x11fb20
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x50e90
movl $0x1, 0x8(%r14)
leaq 0xe8857(%rip), %rsi     # 0x1396ee
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x3, %esi
movl $0x3, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefbd7
movq %r15, %rdi
callq 0xf705c
leaq 0xe0541(%rip), %rsi     # 0x13142a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r15, %rdi
callq 0xf6753
leaq 0xcec56(%rip), %rsi     # 0x11fb68
movq %rbx, %rdi
movl $0x6, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xeebc8
movq %rax, 0x18(%r14)
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0xeebc8
movq %rax, 0x20(%r14)
movl 0x18(%r14), %edx
leaq 0xbffda(%rip), %rsi     # 0x110f37
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movl $0xa, %esi
callq 0xeead3
movzbl %al, %r15d
leaq 0xcebfe(%rip), %rsi     # 0x11fb80
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl %r15d, %eax
shrb $0x7, %al
movzbl %al, %edx
movl %edx, 0x28(%r14)
leaq 0xcebe6(%rip), %rsi     # 0x11fb96
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl %r15d, %edx
shrl $0x4, %edx
andl $0x7, %edx
leal 0x1(%rdx), %ecx
testl %edx, %edx
leaq 0xf40e1(%rip), %rax     # 0x1450b0
leaq 0xc3d8a(%rip), %r8      # 0x114d60
cmoveq %rax, %r8
leaq 0xcebd1(%rip), %rsi     # 0x11fbb2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpl $0x0, 0x28(%r14)
je 0x5103a
movl %r15d, %edx
shrl $0x3, %edx
andl $0x1, %edx
leaq 0xcebd0(%rip), %rsi     # 0x11fbd2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
cmpl $0x0, 0x28(%r14)
je 0x5103a
andl $0x7, %r15d
leal 0x1(%r15), %edi
callq 0xe9c9b
movq %rax, 0x30(%r14)
leaq 0xcebc5(%rip), %rsi     # 0x11fbf0
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq %r14, 0x20(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x18(%rbx), %rdi
movl $0xb, %esi
callq 0xeead3
movzbl %al, %edx
leaq 0xcebb4(%rip), %rsi     # 0x11fc18
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movl $0xc, %esi
callq 0xeead3
movzbl %al, %ebp
leaq 0xcebad(%rip), %rsi     # 0x11fc33
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
testb %bpl, %bpl
je 0x510d4
cmpl $0x31, %ebp
je 0x510d4
movq 0x20(%rsp), %rax
movq 0x448(%rax), %rax
movl $0x1, 0x78(%rax)
movabsq $0x4050000000000000, %rcx # imm = 0x4050000000000000
cvtsi2sd %ebp, %xmm0
movq %rcx, 0x80(%rax)
addsd 0xcea14(%rip), %xmm0    # 0x11fae0
movsd %xmm0, 0x88(%rax)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x20(%rsp), %r14
cmpl $0x0, 0x28(%r14)
je 0x51156
leaq 0xceb55(%rip), %rsi     # 0x11fc49
movq %rbx, %rdi
movl $0xd, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x30(%r14), %rdx
movq %r14, %r8
addq $0x38, %r8
movq 0x18(%rbx), %rdi
movl $0x0, (%rsp)
movl $0xd, %esi
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
callq 0xf2c4e
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x30(%r14), %rax
leaq (%rax,%rax,2), %r13
addq $0xd, %r13
jmp 0x5115c
movl $0xd, %r13d
cmpl $0x0, (%r14)
je 0x511ae
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %rbx, %rdi
callq 0xf1db1
testl %eax, %eax
je 0x51180
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
jmp 0x5119a
movl $0x1, 0x4(%r14)
movl $0x1, %edx
movq %rdx, 0x18(%r14)
movq %rdx, 0x20(%r14)
movl $0x1, %esi
movq %rbx, %rdi
movl $0x4, %ecx
callq 0xf266a
movq %rax, 0x438(%r14)
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %r13
jge 0x52395
leaq 0xce96c(%rip), %r15     # 0x11fb2f
movq %r13, %rsi
callq 0xeead3
movzbl %al, %ebp
cmpb $0x21, %bpl
je 0x514c5
cmpl $0x2c, %ebp
jne 0x523c3
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
leaq 0xd3e04(%rip), %rcx     # 0x124ff4
movq %r13, %r8
xorl %eax, %eax
callq 0xe8617
leaq 0x1(%r13), %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl $0x458, %esi            # imm = 0x458
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r12
movq %rbx, %rdi
leaq 0x64(%rsp), %rsi
callq 0xe8a1c
movq %r14, 0x48(%rsp)
movl $0x0, 0x38(%r12)
movq $0x0, 0x40(%r12)
movq %rbx, %rdi
leaq 0xcedc0(%rip), %rsi     # 0x120009
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %r14, 0x50(%rsp)
movq %r14, %rsi
callq 0xeebc8
movq %rax, 0x8(%r12)
movq 0x18(%rbx), %rdi
leaq 0x3(%r13), %rsi
callq 0xeebc8
movq %rax, 0x10(%r12)
movl 0x8(%r12), %edx
movq %rbx, %rdi
leaq 0xced89(%rip), %rsi     # 0x120020
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x5(%r13), %rsi
callq 0xeebc8
movq %rax, 0x18(%r12)
movq 0x18(%rbx), %rdi
leaq 0x7(%r13), %rsi
callq 0xeebc8
movq %rax, 0x20(%r12)
movl 0x18(%r12), %edx
movq %rbx, %rdi
leaq 0xced65(%rip), %rsi     # 0x120038
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
leaq 0x9(%r13), %rsi
callq 0xeead3
movzbl %al, %ebp
movq %rbx, %rdi
leaq 0xce88a(%rip), %rsi     # 0x11fb80
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl %ebp, %eax
shrb $0x7, %al
movzbl %al, %edx
movl %edx, 0x34(%r12)
movq %rbx, %rdi
leaq 0xced2e(%rip), %rsi     # 0x120051
xorl %eax, %eax
callq 0xe8617
movl %ebp, %edx
shrl $0x6, %edx
andl $0x1, %edx
movl %edx, 0x30(%r12)
movq %rbx, %rdi
leaq 0xcd9a3(%rip), %rsi     # 0x11ece4
xorl %eax, %eax
callq 0xe8617
cmpl $0x0, 0x34(%r12)
je 0x51396
movl %ebp, %edx
shrl $0x3, %edx
andl $0x1, %edx
movq %rbx, %rdi
leaq 0xced0a(%rip), %rsi     # 0x12006c
xorl %eax, %eax
callq 0xe8617
cmpl $0x0, 0x34(%r12)
je 0x51396
andl $0x7, %ebp
leal 0x1(%rbp), %edi
callq 0xe9c9b
movq %rax, 0x48(%r12)
movq %rbx, %rdi
leaq 0xcecfe(%rip), %rsi     # 0x120089
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
addq $0xa, %r13
movq %r13, 0x48(%rsp)
cmpl $0x0, 0x34(%r12)
je 0x5142a
movq %rbx, %rdi
leaq 0xcebbe(%rip), %rsi     # 0x11ff89
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x48(%r12), %rdx
movq %r12, %r8
addq $0x58, %r8
movq 0x18(%rbx), %rdi
movl $0x0, (%rsp)
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
movq %r13, %rsi
callq 0xf2c4e
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x48(%r12), %rax
leaq (%rax,%rax,2), %rax
addq %rax, %r13
movq %r13, 0x48(%rsp)
movq 0x20(%rsp), %rbp
movq 0x18(%rbx), %rax
cmpq %r13, 0x18(%rax)
jle 0x51582
movq %rbx, %rdi
leaq 0xceb5a(%rip), %rsi     # 0x11ffa1
movl %r13d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq 0x1(%r13), %rax
movq %rax, 0x48(%rsp)
movq %r13, %rsi
callq 0xeead3
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xceb32(%rip), %rsi     # 0x11ffb2
movl %edx, 0x2c(%rsp)
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r12), %rdx
movq 0x20(%r12), %rcx
testq %rdx, %rdx
sete %al
testq %rcx, %rcx
sete %sil
orb %al, %sil
movq %rbx, %rdi
cmpb $0x1, %sil
jne 0x5165e
leaq 0xceb0f(%rip), %rsi     # 0x11ffc8
xorl %eax, %eax
callq 0xe8faa
jmp 0x5166d
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
leaq 0xce246(%rip), %rcx     # 0x11f71a
movq %r13, %r8
xorl %eax, %eax
callq 0xe8617
leaq 0x1(%r13), %rbp
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xeead3
movzbl %al, %edx
leaq 0x2(%r13), %r12
cmpl $0xf8, %edx
movq %rbp, 0x50(%rsp)
jle 0x515be
cmpl $0xf9, %edx
movq 0x20(%rsp), %r14
je 0x51895
cmpl $0xfe, %edx
je 0x51a51
cmpl $0xff, %edx
jne 0x51bea
movq %rbx, %rdi
leaq 0xce742(%rip), %rsi     # 0x11fc88
leaq 0xdc0f5(%rip), %rcx     # 0x12d642
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeead3
cmpb $0xb, %al
jae 0x51c17
movq 0x20(%rsp), %r14
jmp 0x521c1
xorl %r14d, %r14d
cmpb $0x0, 0x10(%rbp)
movl $0x0, %r15d
movl $0x0, %r13d
jne 0x51e22
xorl %r14d, %r14d
movq %rbx, %rdi
leaq 0xc176c(%rip), %rsi     # 0x112d14
xorl %eax, %eax
callq 0xe9295
movb $0x1, 0x10(%rbp)
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x51e22
cmpl $0x1, %edx
movq 0x20(%rsp), %r14
je 0x51b0f
cmpl $0xce, %edx
jne 0x51bea
movq %rbx, %rdi
leaq 0xce6a6(%rip), %rsi     # 0x11fc88
leaq 0xce694(%rip), %rcx     # 0x11fc7d
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r12, 0x30(%rsp)
movq $0x0, 0x70(%rsp)
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x68(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x15f6(%rip), %rcx      # 0x52c22
leaq 0x68(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x525ca
movq 0x68(%rsp), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xce90c(%rip), %rsi     # 0x11ff5b
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
jmp 0x51b00
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xf1db1
testl %eax, %eax
jne 0x51676
movl $0x1, 0x38(%r12)
movq 0x440(%rbp), %rax
testq %rax, %rax
je 0x5168d
movl $0x4, %ecx
cmpb $0x0, 0x1(%rax)
jne 0x51692
movl $0x3, %ecx
cmpl $0x0, 0x38(%r12)
je 0x516ae
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x516bb
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0xf266a
movq %rax, (%r12)
cmpl $0x0, 0x30(%r12)
je 0x51740
cmpl $0x0, 0x38(%r12)
movq 0x20(%r12), %rbp
jne 0x51745
movl $0x2, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xe96f7
movq %rax, 0x50(%r12)
movq 0x20(%r12), %rbp
movl $0x1, %ecx
xorl %edx, %edx
leaq 0xceb0f(%rip), %r8      # 0x120210
leaq 0xceb20(%rip), %r9      # 0x120228
cmpl $0x3, %ecx
ja 0x5171c
movslq %ecx, %rdi
movq -0x8(%r8,%rdi,8), %rsi
movq -0x8(%r9,%rdi,8), %rdi
jmp 0x51732
movl $0x2, %edi
movl $0x1, %esi
jmp 0x51732
movw %si, (%rax,%rdx,2)
incq %rdx
addq %rdi, %rsi
cmpq %rbp, %rsi
jl 0x51728
incl %ecx
cmpl $0x5, %ecx
jne 0x51708
jmp 0x51745
movq 0x20(%r12), %rbp
imulq 0x18(%r12), %rbp
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x30(%rsp), %rdx
leaq 0x68(%rsp), %r15
movq %r15, %rcx
callq 0xfa1dc
leaq 0xe8(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf13d3
movq %rax, %r13
movq %rax, %rdi
callq 0xf0855
movq %rbx, 0xc8(%rsp)
movq 0x20(%rsp), %r14
movq %r14, 0xd0(%rsp)
movq %r12, 0xd8(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0xa8(%r13)
leaq 0x17a0(%rip), %rax      # 0x52f5c
movq %rax, 0xb0(%r13)
movl $0x2, 0xe4(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0xec(%rsp)
movq %r13, 0x30(%rsp)
movb $0x1, 0x38(%rsp)
movq %rbp, 0x40(%rsp)
movq %rbx, %rdi
leaq 0xb0c29(%rip), %rsi     # 0x10241b
leaq 0xe4(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r15, %r8
callq 0xfa325
movq %rax, 0x40(%r12)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x17f7(%rip), %rcx      # 0x53014
movq %r12, %r8
leaq 0x48(%rsp), %r9
callq 0x525ca
movq 0x48(%rsp), %r14
subq 0x50(%rsp), %r14
movl $0x1, %r15d
cmpl $0x0, 0x38(%r12)
je 0x5184c
movq 0x20(%rsp), %rbp
jmp 0x51e2a
movq 0x40(%r12), %rdi
callq 0xfa3c8
movq %r13, %rdi
callq 0xf08ba
cmpl $0x0, 0x68(%rsp)
je 0x51df9
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0xfa1a4
movq %rbx, %rdi
leaq 0xc29a1(%rip), %rsi     # 0x114221
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9295
movl $0x1, %r15d
jmp 0x51e1d
movq %rbx, %rdi
leaq 0xce3e9(%rip), %rsi     # 0x11fc88
leaq 0xce3c7(%rip), %rcx     # 0x11fc6d
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x440(%r14), %rsi
testq %rsi, %rsi
je 0x518dc
movq %rbx, %rdi
callq 0xe8be2
movq $0x0, 0x440(%r14)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xeead3
cmpb $0x4, %al
je 0x5190c
movl %eax, %ebp
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xce457(%rip), %rsi     # 0x11fd52
xorl %eax, %eax
callq 0xe8faa
cmpb $0x4, %bpl
jb 0x521c1
movl $0x3, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, 0x440(%r14)
movq 0x18(%rbx), %rdi
leaq 0x3(%r13), %rsi
callq 0xeead3
movzbl %al, %ebp
movq %rbx, %rdi
leaq 0xce246(%rip), %rsi     # 0x11fb80
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movl %ebp, %eax
andb $0x1, %al
movq 0x440(%r14), %rcx
movb %al, 0x1(%rcx)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xbff77(%rip), %rsi     # 0x1118e2
xorl %eax, %eax
callq 0xe8617
movl %ebp, %eax
shrb %al
andb $0x1, %al
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xce407(%rip), %rsi     # 0x11fd8c
xorl %eax, %eax
callq 0xe8617
shrb $0x2, %bpl
andb $0x7, %bpl
movq 0x440(%r14), %rax
movb %bpl, (%rax)
movzbl %bpl, %edx
leaq 0xda7a8(%rip), %rcx     # 0x12c151
cmpb $0x3, %bpl
ja 0x519bd
leaq 0xce84a(%rip), %rax     # 0x120200
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
movq %rbx, %rdi
leaq 0xce412(%rip), %rsi     # 0x11fdd9
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq 0x4(%r13), %rsi
callq 0xeebc8
cvtsi2sd %rax, %xmm0
divsd 0xce0f3(%rip), %xmm0    # 0x11fae8
movq %rbx, %rdi
leaq 0xce3f3(%rip), %rsi     # 0x11fdf2
movl %eax, %edx
movb $0x1, %al
callq 0xe8617
movq 0x20(%rsp), %r14
movq 0x440(%r14), %rax
cmpb $0x0, 0x1(%rax)
je 0x521c1
movq 0x18(%rbx), %rdi
addq $0x6, %r13
movq %r13, %rsi
callq 0xeead3
movq 0x440(%r14), %rcx
movb %al, 0x2(%rcx)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xce3c8(%rip), %rsi     # 0x11fe0d
xorl %eax, %eax
callq 0xe8617
jmp 0x521c1
movq %rbx, %rdi
leaq 0xce22d(%rip), %rsi     # 0x11fc88
leaq 0xf2db0(%rip), %rcx     # 0x144812
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r12, 0x30(%rsp)
movq $0x0, 0x70(%rsp)
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x68(%rsp)
cmpl $0x1, 0x90(%rbx)
jle 0x51ab8
movq %rbx, %rdi
leaq 0xc6a8c(%rip), %rsi     # 0x118533
xorl %edx, %edx
movl $0x1, %ecx
callq 0xefda1
movq %rax, 0x70(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x1159(%rip), %rcx      # 0x52c22
leaq 0x68(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x525ca
movq 0x68(%rsp), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xc2d94(%rip), %rsi     # 0x114880
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x70(%rsp), %rdi
callq 0xf052b
movq 0x68(%rsp), %rdi
callq 0xf6753
jmp 0x521c1
movq %rbx, %rdi
leaq 0xce16f(%rip), %rsi     # 0x11fc88
leaq 0xce142(%rip), %rcx     # 0x11fc62
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r12, 0x68(%rsp)
movl $0x70, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r13
movb $0x0, 0x58(%rax)
xorl %eax, %eax
cmpl $0x0, (%r14)
setne %al
movl %eax, 0x4(%r13)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xb5f(%rip), %rcx       # 0x526cd
movq %r13, %r8
leaq 0x68(%rsp), %r9
callq 0x525ca
cmpl $0x0, (%r13)
je 0x52185
cmpl $0x0, (%r14)
je 0x52185
movq 0x438(%r14), %rdi
movq 0x448(%r14), %rsi
movl $0x2, %edx
callq 0xf22d0
movzbl 0x58(%r13), %eax
cmpl $0x3, %eax
je 0x52151
cmpl $0x2, %eax
jne 0x52185
movq 0x438(%r14), %rdi
movq 0x8(%r13), %rsi
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movq 0x20(%r13), %r8
movl $0x0, (%rsp)
xorl %r9d, %r9d
callq 0xf3654
jmp 0x52185
movq %rbx, %rdi
leaq 0xce094(%rip), %rsi     # 0x11fc88
leaq 0xda556(%rip), %rcx     # 0x12c151
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
jmp 0x521c1
movzbl %al, %r14d
leaq 0x3(%r13), %rdx
movq 0x18(%rbx), %rdi
movl $0xb, %ecx
leaq 0x30(%rsp), %rsi
callq 0xee8d4
addq %r14, %r13
addq $0x3, %r13
movq %rbx, %rdi
callq 0xf6410
movq %rax, %rbp
movl $0xb, %edx
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xf6cdd
movq %rbp, %rdi
callq 0xf705c
movq %rbx, %rdi
leaq 0xce1b9(%rip), %rsi     # 0x11fe29
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbp, %rdi
callq 0xf6753
movq 0x30(%rsp), %rax
movabsq $0x455041435354454e, %rcx # imm = 0x455041435354454E
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
movabsq $0x302e324550414353, %rdx # imm = 0x302E324550414353
xorq %rdx, %rcx
orq %rax, %rcx
je 0x51faa
movq 0x30(%rsp), %rax
movabsq $0x535458454d494e41, %rcx # imm = 0x535458454D494E41
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
movabsq $0x302e31535458454d, %rdx # imm = 0x302E31535458454D
xorq %rdx, %rcx
orq %rax, %rcx
je 0x51faa
movq 0x30(%rsp), %rax
movabsq $0x6174614420504d58, %rcx # imm = 0x6174614420504D58
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
movabsq $0x504d586174614420, %rdx # imm = 0x504D586174614420
xorq %rdx, %rcx
orq %rax, %rcx
je 0x52224
movq 0x30(%rsp), %rax
movabsq $0x3147424752434349, %rcx # imm = 0x3147424752434349
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
movabsq $0x3231303147424752, %rdx # imm = 0x3231303147424752
xorq %rdx, %rcx
orq %rax, %rcx
je 0x52286
movq 0x30(%rsp), %rax
movabsq $0x67614d6567616d49, %rcx # imm = 0x67614D6567616D49
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
movabsq $0x6b636967614d6567, %rdx # imm = 0x6B636967614D6567
xorq %rdx, %rcx
orq %rax, %rcx
je 0x522f3
movq 0x30(%rsp), %rax
movabsq $0x304d4942384b474d, %rcx # imm = 0x304D4942384B474D
xorq %rcx, %rax
movabsq $0x3030303043545049, %rdx # imm = 0x3030303043545049
leaq 0x9f4f1ef(%rdx), %rcx
xorq 0x33(%rsp), %rcx
orq %rax, %rcx
je 0x52353
movq 0x30(%rsp), %rax
movabsq $0x30435450494b474d, %rcx # imm = 0x30435450494B474D
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
xorq %rdx, %rcx
orq %rax, %rcx
movq 0x20(%rsp), %rsi
je 0x52368
movq 0x30(%rsp), %rax
movabsq $0x204554494c464947, %rcx # imm = 0x204554494C464947
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
movabsq $0x202020204554494c, %rdx # imm = 0x202020204554494C
xorq %rdx, %rcx
movq %rbx, %rdi
orq %rax, %rcx
je 0x52388
movq %r13, %rdx
callq 0x52e6e
jmp 0x51578
movq 0x28(%r12), %rcx
movl $0x1, %r15d
cmpq %rbp, %rcx
jge 0x51e1d
movq %rbx, %rdi
leaq 0xce1d2(%rip), %rsi     # 0x11ffe5
movq %rbp, %rdx
xorl %eax, %eax
callq 0xe8faa
movq 0x20(%rsp), %rbp
cmpl $0x0, 0x38(%r12)
je 0x51e3b
movq (%r12), %rdi
callq 0xf228d
movq $0x0, (%r12)
movq 0x40(%r12), %rdi
testq %rdi, %rdi
je 0x51e53
callq 0xfa3d4
movq $0x0, 0x40(%r12)
movq %r13, %rdi
callq 0xf052b
movl 0x64(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
testl %r15d, %r15d
je 0x51e87
cmpl $0x0, 0x4(%rbp)
je 0x51ef9
movq %rbx, %rdi
leaq 0xce0ec(%rip), %rsi     # 0x11ff6c
xorl %eax, %eax
callq 0xe8faa
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xf228d
movq (%r12), %rdi
callq 0xf228d
movq 0x50(%r12), %rsi
movq %rbx, %rdi
callq 0xe8be2
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe8be2
movq 0x440(%rbp), %rsi
testq %rsi, %rsi
je 0x51ed2
movq %rbx, %rdi
callq 0xe8be2
movq $0x0, 0x440(%rbp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testl %r15d, %r15d
leaq 0xcdc46(%rip), %r15     # 0x11fb2f
movq 0x50(%rsp), %r12
jne 0x5220b
jmp 0x52476
movq (%r12), %rdi
testq %rdi, %rdi
je 0x51e76
cmpl $0x0, (%rbp)
je 0x51f97
movq 0x440(%rbp), %rax
testq %rax, %rax
je 0x52055
movzbl (%rax), %eax
cmpl $0x3, %eax
jne 0x5206b
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq %rbx, %rdi
movl $0x4, %ecx
callq 0xf266a
movq %rax, %r13
movq 0x20(%rsp), %rax
movq 0x438(%rax), %rdi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq 0x18(%r12), %r8
movq 0x20(%r12), %r9
xorpd %xmm0, %xmm0
movupd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq %r13, %rsi
callq 0xf36d0
movq (%r12), %rdi
movl $0x3, 0x2c(%rsp)
movb $0x1, %al
movq %rax, 0x58(%rsp)
jmp 0x5207b
movq 0x448(%rbp), %rsi
xorl %edx, %edx
callq 0xf22d0
jmp 0x51e87
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeead3
testb %al, %al
je 0x51578
movl %eax, %ebp
leaq 0x1(%r13), %rsi
movq 0x18(%rbx), %rdi
callq 0xeead3
movzbl %al, %edx
cmpb $0x2, %dl
leaq 0xda177(%rip), %rcx     # 0x12c151
leaq 0xcdebd(%rip), %rax     # 0x11fe9e
cmoveq %rax, %rcx
cmpb $0x1, %dl
setne %r14b
leaq 0xcdea3(%rip), %rax     # 0x11fe96
cmoveq %rax, %rcx
movq %rbx, %rdi
leaq 0xcdea7(%rip), %rsi     # 0x11fea8
xorl %eax, %eax
callq 0xe8617
cmpb $0x3, %bpl
setb %al
orb %r14b, %al
jne 0x51578
addq $0x2, %r13
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeebc8
testq %rax, %rax
leaq 0xf307e(%rip), %rcx     # 0x1450b0
leaq 0xcdea1(%rip), %rdx     # 0x11feda
cmoveq %rdx, %rcx
movq %rbx, %rdi
leaq 0xcde82(%rip), %rsi     # 0x11fec9
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
jmp 0x51578
movq $0x0, 0x58(%rsp)
movl $0x0, 0x2c(%rsp)
xorl %r13d, %r13d
jmp 0x5207b
movq $0x0, 0x58(%rsp)
xorl %r13d, %r13d
movl %eax, 0x2c(%rsp)
movq 0x20(%rsp), %rbp
movq 0x438(%rbp), %rsi
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %r9
movupd 0x8(%r12), %xmm0
movupd %xmm0, (%rsp)
movl $0x2, 0x10(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf36d0
movq 0x438(%rbp), %rdi
movq 0x448(%rbp), %rsi
movl $0x2, %edx
callq 0xf22d0
cmpl $0x2, 0x2c(%rsp)
jne 0x520fa
movq 0x438(%rbp), %rdi
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
movq 0x20(%r12), %r8
movl $0x0, (%rsp)
xorl %r9d, %r9d
callq 0xf3654
jmp 0x51e8a
testq %r13, %r13
sete %al
movq 0x58(%rsp), %rcx
xorb $0x1, %cl
orb %al, %cl
jne 0x52147
movq 0x20(%rsp), %rbp
movq 0x438(%rbp), %rsi
movq 0x18(%r12), %r8
movq 0x20(%r12), %r9
movupd 0x8(%r12), %xmm0
movupd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf36d0
jmp 0x51e8a
movq 0x20(%rsp), %rbp
jmp 0x51e8a
movq 0x60(%r13), %rdi
testq %rdi, %rdi
je 0x52185
movq 0x438(%r14), %rsi
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %r9
movupd 0x8(%r13), %xmm0
movupd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf36d0
movq 0x440(%r14), %rsi
testq %rsi, %rsi
je 0x521a4
movq %rbx, %rdi
callq 0xe8be2
movq $0x0, 0x440(%r14)
movq 0x68(%r13), %rdi
callq 0xf052b
movq 0x60(%r13), %rdi
callq 0xf228d
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe8be2
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r12, 0x68(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xd77(%rip), %rcx       # 0x52f5b
xorl %r8d, %r8d
leaq 0x68(%rsp), %r9
callq 0x525ca
movq 0x68(%rsp), %r14
movq 0x50(%rsp), %r12
subq %r12, %r14
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
addq %r14, %r12
movq 0x18(%rbx), %rdi
movq %r12, %r13
cmpq 0x18(%rdi), %r12
jl 0x511c3
jmp 0x52395
movq %r13, 0x68(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
leaq 0xd1f(%rip), %rcx       # 0x52f5b
xorl %r8d, %r8d
leaq 0x68(%rsp), %r9
callq 0x525ca
movq 0x68(%rsp), %rdx
subq %r13, %rdx
cmpq $0x103, %rdx            # imm = 0x103
jl 0x51578
addq $-0x102, %rdx           # imm = 0xFEFE
movq 0x18(%rbx), %rdi
movq %r13, %rsi
leaq 0xe586b(%rip), %rcx     # 0x137ade
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefd48
jmp 0x51578
movq %rbx, %rdi
leaq 0xc390d(%rip), %rsi     # 0x115b9d
xorl %edx, %edx
movl $0x1, %ecx
callq 0xefda1
movq %rax, %rbp
movq %r13, 0xc8(%rsp)
movq %rax, 0x68(%rsp)
movl $0x0, 0x70(%rsp)
leaq 0x78(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
leaq 0xc2c(%rip), %rcx       # 0x52f00
leaq 0x68(%rsp), %r8
leaq 0xc8(%rsp), %r9
callq 0x525ca
movq %rbp, %rdi
callq 0xf052b
jmp 0x51578
movq %r13, 0x68(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x68(%rsp), %rsi
callq 0xeeb4b
testb %al, %al
je 0x52378
movzbl %al, %ebp
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r13
movq 0x18(%rbx), %rdi
movq 0x68(%rsp), %rsi
movq %rbp, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefbd7
movq %r13, %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0xcdb9f(%rip), %rsi     # 0x11fee6
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
jmp 0x5237b
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0x52c81
jmp 0x51578
movq %rbx, %rdi
movq %r13, %rdx
callq 0x52d33
jmp 0x51578
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xf6753
jmp 0x51578
movq %r13, %rsi
callq 0x52de5
jmp 0x51578
movq 0x20(%rsp), %rax
cmpb $0x0, 0x10(%rax)
jne 0x52476
leaq 0xc0969(%rip), %rsi     # 0x112d14
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq 0x20(%rsp), %rax
movb $0x1, 0x10(%rax)
jmp 0x52476
leaq 0xcd765(%rip), %rsi     # 0x11fb2f
cmpl $0x3b, %ebp
jne 0x52434
leaq 0xf93f7(%rip), %rcx     # 0x14b7cd
movq %rbx, %rdi
movl %ebp, %edx
movq %r13, %r8
xorl %eax, %eax
callq 0xe8617
leaq 0x1(%r13), %r15
movq 0x18(%rbx), %rdi
movq 0x18(%rdi), %r14
movq %r14, %r12
subq %r15, %r12
jle 0x52476
movq %r15, %rsi
callq 0xeead3
movl %eax, %ebp
cmpb $0x1a, %al
je 0x5240f
movzbl %bpl, %eax
testl %eax, %eax
jne 0x5245f
cmpq $0x1, %r12
je 0x52476
addq $0x2, %r13
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xeead3
cmpb %bpl, %al
jne 0x5245f
incq %r13
cmpq %r13, %r14
jne 0x52419
jmp 0x52476
leaq 0xd9d16(%rip), %rcx     # 0x12c151
movq %rbx, %rdi
movl %ebp, %edx
movq %r13, %r8
xorl %eax, %eax
callq 0xe8617
leaq 0xcd6fc(%rip), %rsi     # 0x11fb4d
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9295
jmp 0x52476
leaq 0xcdc7d(%rip), %rsi     # 0x1200e3
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe9393
movq 0x20(%rsp), %r14
movq 0x438(%r14), %rdi
testq %rdi, %rdi
je 0x524e9
cmpl $0x0, 0x8(%r14)
je 0x524e4
movq 0x448(%r14), %rsi
leaq 0xddeca(%rip), %rdx     # 0x130366
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xea78f
movq 0x438(%r14), %rdi
movq 0x448(%r14), %rsi
movl $0x2, %edx
callq 0xf22d0
movq 0x448(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xea78f
movq 0x438(%r14), %rdi
callq 0xf228d
movq 0x440(%r14), %rsi
testq %rsi, %rsi
je 0x52508
movq %rbx, %rdi
callq 0xe8be2
movq $0x0, 0x440(%r14)
movq 0x448(%r14), %rsi
movq %rbx, %rdi
callq 0xea50e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq