// File: /workspace/github_c_makefile_star2_O1/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 0xe969b
movq %rax, %r12
movl $0x1, (%rax)
movq %rbx, %rdi
callq 0xea9a9
movq %rax, 0x448(%r12)
leaq 0xceaad(%rip), %rsi     # 0x11f9de
movq %rbx, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x50f4f
movl $0x0, (%r12)
movl $0x1, 0xc(%r12)
leaq 0xcea90(%rip), %rsi     # 0x11f9e6
movq %rbx, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x50f6c
movl $0x1, 0xc(%r12)
leaq 0xcea85(%rip), %rsi     # 0x11f9f8
movq %rbx, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x50f89
movl $0x1, 0x8(%r12)
leaq 0xe83ce(%rip), %rsi     # 0x13935e
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x3, %esi
movl $0x3, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xf01b0
movq %r14, %rdi
callq 0xf74bd
leaq 0xe0108(%rip), %rsi     # 0x1310ea
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r14, %rdi
callq 0xf6bb0
leaq 0xcea35(%rip), %rsi     # 0x11fa40
movq %rbx, %rdi
movl $0x6, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movl $0x6, %esi
callq 0xef1ca
movq %rax, 0x18(%r12)
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0xef1ca
movq %rax, 0x20(%r12)
movl 0x18(%r12), %edx
leaq 0xbfecf(%rip), %rsi     # 0x110f28
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movl $0xa, %esi
callq 0xef0d5
movzbl %al, %r15d
leaq 0xce9da(%rip), %rsi     # 0x11fa58
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl %r15d, %eax
shrb $0x7, %al
movzbl %al, %edx
movl %edx, 0x28(%r12)
leaq 0xce9c1(%rip), %rsi     # 0x11fa6e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movl %r15d, %edx
shrl $0x4, %edx
andl $0x7, %edx
leal 0x1(%rdx), %ecx
testl %edx, %edx
leaq 0xf3b04(%rip), %rax     # 0x144bd0
leaq 0xc3bdd(%rip), %r8      # 0x114cb0
cmoveq %rax, %r8
leaq 0xce9ac(%rip), %rsi     # 0x11fa8a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
cmpl $0x0, 0x28(%r12)
je 0x5110a
movl %r15d, %edx
shrl $0x3, %edx
andl $0x1, %edx
leaq 0xce9aa(%rip), %rsi     # 0x11faaa
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
cmpl $0x0, 0x28(%r12)
je 0x5113a
andl $0x7, %r15d
leal 0x1(%r15), %edi
callq 0xea7f2
movq %rax, 0x30(%r12)
leaq 0xce99d(%rip), %rsi     # 0x11fac8
movq %rbx, %rdi
movl %r15d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x18(%rbx), %rdi
movl $0xb, %esi
callq 0xef0d5
movzbl %al, %edx
leaq 0xce991(%rip), %rsi     # 0x11faf0
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movl $0xc, %esi
callq 0xef0d5
movzbl %al, %ebp
leaq 0xce98a(%rip), %rsi     # 0x11fb0b
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
testb %bpl, %bpl
je 0x511cb
cmpl $0x31, %ebp
je 0x511cb
movq 0x448(%r12), %rax
movl $0x1, 0x78(%rax)
movabsq $0x4050000000000000, %rcx # imm = 0x4050000000000000
cvtsi2sd %ebp, %xmm0
movq %rcx, 0x80(%rax)
addsd 0xce7fd(%rip), %xmm0    # 0x11f9c0
movsd %xmm0, 0x88(%rax)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
cmpl $0x0, 0x28(%r12)
je 0x5124b
leaq 0xce93a(%rip), %rsi     # 0x11fb21
movq %rbx, %rdi
movl $0xd, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x30(%r12), %rdx
movq %r12, %r8
addq $0x38, %r8
movq 0x18(%rbx), %rdi
movl $0x0, (%rsp)
movl $0xd, %esi
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
callq 0xf328f
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x30(%r12), %rax
leaq (%rax,%rax,2), %r13
addq $0xd, %r13
jmp 0x51251
movl $0xd, %r13d
cmpl $0x0, (%r12)
je 0x512a5
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0xf241d
testl %eax, %eax
jne 0x51286
movl $0x1, 0x4(%r12)
movl $0x1, %eax
movq %rax, 0x18(%r12)
movq %rax, 0x20(%r12)
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq %rbx, %rdi
movl $0x4, %ecx
callq 0xf2cab
movq %rax, 0x438(%r12)
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %r13
jge 0x52473
movq %r12, 0x18(%rsp)
movq %r13, %rsi
callq 0xef0d5
movzbl %al, %ebp
cmpb $0x21, %bpl
je 0x512e3
leaq 0xd3af4(%rip), %rcx     # 0x124dc4
cmpl $0x2c, %ebp
je 0x512f3
cmpl $0x3b, %ebp
jne 0x512ec
leaq 0xf9ef5(%rip), %rcx     # 0x14b1d6
jmp 0x512f3
leaq 0xce308(%rip), %rcx     # 0x11f5f2
jmp 0x512f3
leaq 0xdab76(%rip), %rcx     # 0x12be69
movq %rbx, %rdi
leaq 0xce70a(%rip), %rsi     # 0x11fa07
movl %ebp, %edx
movq %r13, %r8
xorl %eax, %eax
callq 0xe9226
leaq 0x1(%r13), %r14
cmpl $0x21, %ebp
je 0x515e1
cmpl $0x2c, %ebp
movq %r14, 0x20(%rsp)
jne 0x5249b
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl $0x458, %esi            # imm = 0x458
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r15
movq %rbx, %rdi
leaq 0x5c(%rsp), %rsi
callq 0xe958c
movq %r14, 0x28(%rsp)
movl $0x0, 0x38(%r15)
movq $0x0, 0x40(%r15)
movq %rbx, %rdi
leaq 0xceb74(%rip), %rsi     # 0x11fee1
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef1ca
movq %rax, 0x8(%r15)
movq 0x18(%rbx), %rdi
leaq 0x3(%r13), %rsi
callq 0xef1ca
movq %rax, 0x10(%r15)
movl 0x8(%r15), %edx
movq %rbx, %rdi
leaq 0xceb45(%rip), %rsi     # 0x11fef8
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0x5(%r13), %rsi
callq 0xef1ca
movq %rax, 0x18(%r15)
movq 0x18(%rbx), %rdi
leaq 0x7(%r13), %rsi
callq 0xef1ca
movq %rax, 0x20(%r15)
movl 0x18(%r15), %edx
movq %rbx, %rdi
leaq 0xceb24(%rip), %rsi     # 0x11ff10
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
addq $0x9, %r13
movq %r13, %rsi
callq 0xef0d5
movzbl %al, %r14d
movq %rbx, %rdi
leaq 0xce645(%rip), %rsi     # 0x11fa58
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl %r14d, %eax
shrb $0x7, %al
movzbl %al, %edx
movl %edx, 0x34(%r15)
movq %rbx, %rdi
leaq 0xceae8(%rip), %rsi     # 0x11ff29
xorl %eax, %eax
callq 0xe9226
movl %r14d, %edx
shrl $0x6, %edx
andl $0x1, %edx
movl %edx, 0x30(%r15)
movq %rbx, %rdi
leaq 0xcd77d(%rip), %rsi     # 0x11ebdc
xorl %eax, %eax
callq 0xe9226
cmpl $0x0, 0x34(%r15)
je 0x51487
movl %r14d, %edx
shrl $0x3, %edx
andl $0x1, %edx
movq %rbx, %rdi
leaq 0xceac4(%rip), %rsi     # 0x11ff44
xorl %eax, %eax
callq 0xe9226
cmpl $0x0, 0x34(%r15)
je 0x514b5
andl $0x7, %r14d
leal 0x1(%r14), %edi
callq 0xea7f2
movq %rax, 0x48(%r15)
movq %rbx, %rdi
leaq 0xceab8(%rip), %rsi     # 0x11ff61
movl %r14d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x28(%rsp), %rdx
addq $0x9, %rdx
movq %rdx, 0x28(%rsp)
cmpl $0x0, 0x34(%r15)
je 0x51544
movq %rbx, %rdi
leaq 0xce973(%rip), %rsi     # 0x11fe61
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x28(%rsp), %rsi
movq 0x48(%r15), %rdx
leaq 0x58(%r15), %r8
movq 0x18(%rbx), %rdi
movl $0x0, (%rsp)
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
callq 0xf328f
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x48(%r15), %rax
leaq (%rax,%rax,2), %rax
addq %rax, 0x28(%rsp)
movq 0x18(%rbx), %rax
movq 0x18(%rax), %r14
movq 0x28(%rsp), %rdx
cmpq %rdx, %r14
movq %rdx, 0x50(%rsp)
jle 0x51635
movq %rbx, %rdi
leaq 0xce910(%rip), %rsi     # 0x11fe79
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq 0x28(%rsp), %rsi
leaq 0x1(%rsi), %rax
movq %rax, 0x28(%rsp)
callq 0xef0d5
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xce8e9(%rip), %rsi     # 0x11fe8a
movl %edx, 0x58(%rsp)
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdx
testq %rdx, %rdx
je 0x5169e
movq 0x20(%r15), %rax
testq %rax, %rax
je 0x5169e
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xf241d
testl %eax, %eax
jne 0x516bb
jmp 0x516b3
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef0d5
movzbl %al, %ebp
cmpl $0xf8, %ebp
jle 0x51676
cmpl $0xff, %ebp
je 0x518d7
cmpl $0xfe, %ebp
je 0x518e0
cmpl $0xf9, %ebp
jne 0x518e9
leaq 0xce515(%rip), %rcx     # 0x11fb45
jmp 0x518f0
xorl %r13d, %r13d
cmpb $0x0, 0x10(%r12)
movl $0x0, %ebp
movl $0x0, %r12d
jne 0x51efb
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0xc16a8(%rip), %rsi     # 0x112d04
xorl %eax, %eax
callq 0xe9df7
movq 0x18(%rsp), %rax
movb $0x1, 0x10(%rax)
xorl %ebp, %ebp
xorl %r12d, %r12d
jmp 0x51efb
leaq 0xce4bd(%rip), %rcx     # 0x11fb3a
cmpl $0x1, %ebp
je 0x518f0
cmpl $0xce, %ebp
jne 0x518e9
leaq 0xce4bc(%rip), %rcx     # 0x11fb55
jmp 0x518f0
movl 0x20(%r15), %ecx
movq %rbx, %rdi
leaq 0xce7f4(%rip), %rsi     # 0x11fea0
xorl %eax, %eax
callq 0xe9b27
movl $0x1, 0x38(%r15)
movq %r14, 0x48(%rsp)
movq 0x440(%r12), %rax
testq %rax, %rax
je 0x516d8
movl $0x4, %ecx
cmpb $0x0, 0x1(%rax)
jne 0x516dd
movl $0x3, %ecx
cmpl $0x0, 0x38(%r15)
leaq 0xce9ff(%rip), %r14     # 0x1200e8
leaq 0xcea10(%rip), %r12     # 0x120100
je 0x51706
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x51711
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
movq %rbx, %rdi
callq 0xf2cab
movq %rax, (%r15)
cmpl $0x0, 0x30(%r15)
je 0x5177e
cmpl $0x0, 0x38(%r15)
jne 0x5177e
movq 0x20(%r15), %rsi
movl $0x2, %edx
movq %rbx, %rdi
callq 0xea259
movq %rax, 0x50(%r15)
movq 0x20(%r15), %rcx
movl $0x1, %edx
xorl %esi, %esi
cmpl $0x3, %edx
ja 0x5175b
movslq %edx, %r8
movq -0x8(%r14,%r8,8), %rdi
movq -0x8(%r12,%r8,8), %r8
jmp 0x51772
movl $0x2, %r8d
movl $0x1, %edi
jmp 0x51772
movw %di, (%rax,%rsi,2)
incq %rsi
addq %r8, %rdi
cmpq %rcx, %rdi
jl 0x51768
incl %edx
cmpl $0x5, %edx
jne 0x51747
movq 0x20(%r15), %r14
imulq 0x18(%r15), %r14
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x30(%rsp), %rdx
leaq 0x80(%rsp), %r13
movq %r13, %rcx
callq 0xfa6e0
xorpd %xmm0, %xmm0
movapd %xmm0, 0xe0(%rsp)
movl $0x0, 0xf0(%rsp)
movapd %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf19d3
movq %rax, %r12
movq %rax, %rdi
callq 0xf0e3f
movq %rbx, 0x60(%rsp)
movq 0x18(%rsp), %rbp
movq %rbp, 0x68(%rsp)
movq %r15, 0x70(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0xa8(%r12)
leaq 0x17fa(%rip), %rax      # 0x53001
movq %rax, 0xb0(%r12)
movl $0x2, 0xe0(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0xe8(%rsp)
movq %r12, 0x30(%rsp)
movb $0x1, 0x38(%rsp)
movq %r14, 0x40(%rsp)
movq %rbx, %rdi
leaq 0xb14cd(%rip), %rsi     # 0x102d0b
leaq 0xe0(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r13, %r8
callq 0xfa829
movq %rax, 0x40(%r15)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0x1858(%rip), %rcx      # 0x530c0
movq %r15, %r8
leaq 0x28(%rsp), %r9
callq 0x5267e
movq 0x28(%rsp), %r13
subq 0x20(%rsp), %r13
movl $0x1, %ebp
cmpl $0x0, 0x38(%r15)
jne 0x51ef6
movq 0x40(%r15), %rdi
callq 0xfa8cc
movq %r12, %rdi
callq 0xf0ea4
cmpl $0x0, 0x80(%rsp)
je 0x51ed9
movq %rbx, %rdi
leaq 0x80(%rsp), %rsi
callq 0xfa6a8
movq %rbx, %rdi
leaq 0xc28a9(%rip), %rsi     # 0x114171
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9df7
jmp 0x51ef6
leaq 0xdba7c(%rip), %rcx     # 0x12d35a
jmp 0x518f0
leaq 0xf2a4b(%rip), %rcx     # 0x144332
jmp 0x518f0
leaq 0xda579(%rip), %rcx     # 0x12be69
movq %rbx, %rdi
leaq 0xce266(%rip), %rsi     # 0x11fb60
movl %ebp, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe9226
leaq 0x2(%r13), %r15
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
cmpl $0xf8, %ebp
jle 0x51b46
cmpl $0xf9, %ebp
je 0x51bc6
cmpl $0xfe, %ebp
je 0x51d5c
cmpl $0xff, %ebp
jne 0x52279
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef0d5
cmpb $0xb, %al
jb 0x52279
movq %r14, 0x20(%rsp)
movzbl %al, %r14d
leaq 0x3(%r13), %rdx
movq 0x18(%rbx), %rdi
movl $0xb, %ecx
leaq 0x30(%rsp), %rbp
movq %rbp, %rsi
callq 0xeeee8
addq %r14, %r13
addq $0x3, %r13
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r14
movl $0xb, %edx
movq %rax, %rdi
movq %rbp, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xf7131
movq %r14, %rdi
callq 0xf74bd
movq %rbx, %rdi
leaq 0xce347(%rip), %rsi     # 0x11fd01
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
callq 0xf6bb0
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 0x5200c
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 0x5200c
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 0x522dd
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 0x5234b
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 0x523bc
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
movq 0x20(%rsp), %r14
je 0x5242b
movq 0x30(%rsp), %rax
movabsq $0x30435450494b474d, %rcx # imm = 0x30435450494B474D
xorq %rcx, %rax
movq 0x33(%rsp), %rcx
xorq %rdx, %rcx
orq %rax, %rcx
je 0x5243e
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 0x52466
movq %r12, %rsi
movq %r13, %rdx
callq 0x52f11
jmp 0x52279
cmpl $0x1, %ebp
je 0x51e08
cmpl $0xce, %ebp
jne 0x52279
movq %r15, 0x30(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x80(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x1137(%rip), %rcx      # 0x52cc5
leaq 0x80(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x5267e
movq 0x80(%rsp), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0xce27c(%rip), %rsi     # 0x11fe33
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x51df6
movq 0x440(%r12), %rsi
testq %rsi, %rsi
je 0x51be7
movq %rbx, %rdi
callq 0xe9752
movq $0x0, 0x440(%r12)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef0d5
cmpb $0x4, %al
je 0x51c17
movl %eax, %ebp
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xce024(%rip), %rsi     # 0x11fc2a
xorl %eax, %eax
callq 0xe9b27
cmpb $0x4, %bpl
jb 0x52279
movl $0x3, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, 0x440(%r12)
movq 0x18(%rbx), %rdi
leaq 0x3(%r13), %rsi
callq 0xef0d5
movzbl %al, %ebp
movq %rbx, %rdi
leaq 0xcde12(%rip), %rsi     # 0x11fa58
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movl %ebp, %eax
andb $0x1, %al
movq 0x440(%r12), %rcx
movb %al, 0x1(%rcx)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xbfc5b(%rip), %rsi     # 0x1118d3
xorl %eax, %eax
callq 0xe9226
movl %ebp, %eax
shrb %al
andb $0x1, %al
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xcdfd2(%rip), %rsi     # 0x11fc64
xorl %eax, %eax
callq 0xe9226
shrb $0x2, %bpl
andb $0x7, %bpl
movq 0x440(%r12), %rax
movb %bpl, (%rax)
movzbl %bpl, %edx
leaq 0xda1b2(%rip), %rcx     # 0x12be69
cmpb $0x3, %bpl
ja 0x51ccb
leaq 0xce414(%rip), %rax     # 0x1200d8
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
movq %rbx, %rdi
leaq 0xcdfdc(%rip), %rsi     # 0x11fcb1
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x18(%rbx), %rdi
leaq 0x4(%r13), %rsi
callq 0xef1ca
cvtsi2sd %rax, %xmm0
divsd 0xc8875(%rip), %xmm0    # 0x11a578
movq %rbx, %rdi
leaq 0xcdfbd(%rip), %rsi     # 0x11fcca
movl %eax, %edx
movb $0x1, %al
callq 0xe9226
movq 0x440(%r12), %rax
cmpb $0x0, 0x1(%rax)
je 0x52279
movq 0x18(%rbx), %rdi
addq $0x6, %r13
movq %r13, %rsi
callq 0xef0d5
movq 0x440(%r12), %rcx
movb %al, 0x2(%rcx)
movzbl %al, %edx
movq %rbx, %rdi
leaq 0xcdf95(%rip), %rsi     # 0x11fce5
xorl %eax, %eax
callq 0xe9226
jmp 0x52279
movq %r15, 0x30(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x80(%rsp)
cmpl $0x2, 0x90(%rbx)
jl 0x51da5
movq %rbx, %rdi
leaq 0xc666a(%rip), %rsi     # 0x1183fb
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, 0x88(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
leaq 0xf0f(%rip), %rcx       # 0x52cc5
leaq 0x80(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x5267e
movq 0x80(%rsp), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0xc29c6(%rip), %rsi     # 0x1147a5
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x88(%rsp), %rdi
callq 0xf0b13
movq 0x80(%rsp), %rdi
callq 0xf6bb0
jmp 0x52279
movq %r14, %r13
movq %r15, 0x80(%rsp)
movl $0x70, %esi
movq %rbx, %rdi
callq 0xe969b
movq %r12, %r14
movq %rax, %r12
movb $0x0, 0x58(%rax)
movl $0x1, 0x4(%rax)
xorl %eax, %eax
cmpl $0x0, (%r14)
setne %al
movl %eax, 0x4(%r12)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x931(%rip), %rcx       # 0x52781
movq %r12, %r8
leaq 0x80(%rsp), %r9
callq 0x5267e
cmpl $0x0, (%r12)
je 0x52235
cmpl $0x0, (%r14)
je 0x52235
movq 0x438(%r14), %rdi
movq 0x448(%r14), %rsi
movl $0x2, %edx
callq 0xf2917
movzbl 0x58(%r12), %eax
cmpl $0x3, %eax
je 0x521fa
cmpl $0x2, %eax
movq 0x18(%rsp), %r14
jne 0x52235
movq 0x438(%r14), %rdi
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
movq 0x20(%r12), %r8
movl $0x0, (%rsp)
xorl %r9d, %r9d
callq 0xf3cb3
jmp 0x52235
movq 0x28(%r15), %rcx
cmpq %r14, %rcx
jge 0x51ef6
movq %rbx, %rdi
leaq 0xcdfd1(%rip), %rsi     # 0x11febd
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9b27
movq 0x48(%rsp), %r14
cmpl $0x0, 0x38(%r15)
je 0x51f11
movq (%r15), %rdi
callq 0xf28d4
movq $0x0, (%r15)
movq 0x40(%r15), %rdi
testq %rdi, %rdi
je 0x51f27
callq 0xfa8d8
movq $0x0, 0x40(%r15)
movq %r12, %rdi
callq 0xf0b13
movl 0x5c(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
cmpq 0x50(%rsp), %r14
jle 0x51f69
movq 0x18(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x51fdf
movq %rbx, %rdi
leaq 0xcdee9(%rip), %rsi     # 0x11fe44
xorl %eax, %eax
callq 0xe9b27
movl $0x1, %ebp
jmp 0x51f6b
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %r12, %rdi
callq 0xf28d4
testq %r15, %r15
je 0x51f9a
movq (%r15), %rdi
callq 0xf28d4
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0xe9752
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe9752
movq 0x18(%rsp), %r12
movq 0x440(%r12), %rsi
testq %rsi, %rsi
je 0x51fc0
movq %rbx, %rdi
callq 0xe9752
movq $0x0, 0x440(%r12)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
testl %ebp, %ebp
movq 0x20(%rsp), %r14
jne 0x522c7
jmp 0x52527
movq (%r15), %rdi
testq %rdi, %rdi
je 0x51f51
cmpl $0x0, (%rax)
je 0x520c1
movq 0x440(%rax), %rax
testq %rax, %rax
je 0x520d4
movzbl (%rax), %eax
jmp 0x520d6
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef0d5
testb %al, %al
movq 0x20(%rsp), %r14
je 0x52279
movl %eax, %ebp
leaq 0x1(%r13), %rsi
movq 0x18(%rbx), %rdi
callq 0xef0d5
movzbl %al, %edx
cmpb $0x2, %dl
leaq 0xd9e28(%rip), %rcx     # 0x12be69
leaq 0xcdd2e(%rip), %rax     # 0x11fd76
cmoveq %rax, %rcx
cmpb $0x1, %dl
setne %r14b
leaq 0xcdd14(%rip), %rax     # 0x11fd6e
cmoveq %rax, %rcx
movq %rbx, %rdi
leaq 0xcdd18(%rip), %rsi     # 0x11fd80
xorl %eax, %eax
callq 0xe9226
cmpb $0x3, %bpl
setb %al
orb %r14b, %al
movq 0x20(%rsp), %r14
jne 0x52279
addq $0x2, %r13
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef1ca
testq %rax, %rax
leaq 0xf2b32(%rip), %rcx     # 0x144bd0
leaq 0xcdd0d(%rip), %rdx     # 0x11fdb2
cmoveq %rdx, %rcx
movq %rbx, %rdi
leaq 0xcdcee(%rip), %rsi     # 0x11fda1
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
jmp 0x52279
movq 0x448(%rax), %rsi
xorl %edx, %edx
callq 0xf2917
jmp 0x51f6b
xorl %eax, %eax
movl %eax, 0x50(%rsp)
cmpl $0x3, %eax
jne 0x5212e
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
movq %rbx, %rdi
movl $0x4, %ecx
callq 0xf2cab
movq %rax, %r12
movq 0x18(%rsp), %r14
movq 0x438(%r14), %rdi
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq 0x18(%r15), %r8
movq 0x20(%r15), %r9
xorpd %xmm0, %xmm0
movupd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq %rax, %rsi
callq 0xf3d2f
jmp 0x52136
xorl %r12d, %r12d
movq 0x18(%rsp), %r14
movq (%r15), %rdi
movq 0x438(%r14), %rsi
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %r9
movupd 0x8(%r15), %xmm0
movupd %xmm0, (%rsp)
movl $0x2, 0x10(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf3d2f
movq 0x438(%r14), %rdi
movq 0x448(%r14), %rsi
movl $0x2, %edx
callq 0xf2917
movl 0x50(%rsp), %eax
cmpl $0x2, %eax
jne 0x521b0
movq 0x438(%r14), %rdi
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
movq 0x20(%r15), %r8
movl $0x0, (%rsp)
xorl %r9d, %r9d
callq 0xf3cb3
jmp 0x51f6e
cmpl $0x3, %eax
jne 0x51f6e
testq %r12, %r12
je 0x51f6e
movq 0x18(%rsp), %rax
movq 0x438(%rax), %rsi
movq 0x18(%r15), %r8
movq 0x20(%r15), %r9
movupd 0x8(%r15), %xmm0
movupd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf3d2f
jmp 0x51f6e
movq 0x60(%r12), %rdi
testq %rdi, %rdi
movq 0x18(%rsp), %r14
je 0x52235
movq 0x438(%r14), %rsi
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %r9
movupd 0x8(%r12), %xmm0
movupd %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf3d2f
movq 0x440(%r14), %rsi
testq %rsi, %rsi
je 0x52254
movq %rbx, %rdi
callq 0xe9752
movq $0x0, 0x440(%r14)
movq 0x68(%r12), %rdi
callq 0xf0b13
movq 0x60(%r12), %rdi
callq 0xf28d4
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe9752
movq %r14, %r12
movq %r13, %r14
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq %r15, 0x80(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
leaq 0xd61(%rip), %rcx       # 0x53000
xorl %r8d, %r8d
leaq 0x80(%rsp), %r9
callq 0x5267e
movq 0x80(%rsp), %r13
subq %r14, %r13
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
addq %r14, %r13
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %r13
jl 0x512b8
jmp 0x52473
movq %r13, 0x80(%rsp)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
leaq 0xd0a(%rip), %rcx       # 0x53000
xorl %r8d, %r8d
leaq 0x80(%rsp), %r9
callq 0x5267e
movq 0x80(%rsp), %rdx
subq %r13, %rdx
cmpq $0x103, %rdx            # imm = 0x103
movq 0x20(%rsp), %r14
jl 0x52279
addq $-0x102, %rdx           # imm = 0xFEFE
movq 0x18(%rbx), %rdi
movq %r13, %rsi
leaq 0xe541e(%rip), %rcx     # 0x137756
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xf0321
jmp 0x52279
movq %rbx, %rdi
leaq 0xc3798(%rip), %rsi     # 0x115aed
xorl %edx, %edx
movl $0x1, %ecx
callq 0xf037a
movq %rax, %r14
movq %r13, 0x60(%rsp)
movq %rax, 0x80(%rsp)
movl $0x0, 0x88(%rsp)
leaq 0x90(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
leaq 0xc06(%rip), %rcx       # 0x52fa3
leaq 0x80(%rsp), %r8
leaq 0x60(%rsp), %r9
callq 0x5267e
movq %r14, %rdi
callq 0xf0b13
jmp 0x5245c
movq %r13, 0x80(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x80(%rsp), %rsi
callq 0xef14d
testb %al, %al
je 0x52451
movzbl %al, %r12d
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq 0x80(%rsp), %rsi
movq %r12, %rdx
movq 0x18(%rsp), %r12
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xf01b0
movq %r14, %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0xcd99f(%rip), %rsi     # 0x11fdbe
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
jmp 0x52454
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x52d24
jmp 0x52279
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x52dd6
jmp 0x52279
xorl %r14d, %r14d
movq %r14, %rdi
callq 0xf6bb0
movq 0x20(%rsp), %r14
jmp 0x52279
movq %r13, %rsi
callq 0x52e88
jmp 0x52279
cmpb $0x0, 0x10(%r12)
jne 0x52527
leaq 0xc087e(%rip), %rsi     # 0x112d04
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0x10(%r12)
jmp 0x52527
cmpl $0x3b, %ebp
jne 0x524f9
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq 0x18(%rdi), %r14
subq %rsi, %r14
jle 0x52527
callq 0xef0d5
movl %eax, %ebp
cmpb $0x1a, %al
je 0x524c3
movzbl %bpl, %eax
testl %eax, %eax
jne 0x5250e
cmpq $0x1, %r14
je 0x52527
cmpq $0x3, %r14
movl $0x2, %r15d
cmovgeq %r14, %r15
decq %r15
addq $0x2, %r13
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef0d5
cmpb %bpl, %al
jne 0x5250e
incq %r13
decq %r15
jne 0x524de
jmp 0x52527
leaq 0xcd525(%rip), %rsi     # 0x11fa25
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9df7
jmp 0x52527
leaq 0xcdaa6(%rip), %rsi     # 0x11ffbb
movq %rbx, %rdi
movq %r14, %rdx
movq 0x20(%rsp), %rcx
xorl %eax, %eax
callq 0xe9ef5
cmpq $0x0, 0x438(%r12)
je 0x5259a
cmpl $0x0, 0x8(%r12)
je 0x5258d
movq 0x448(%r12), %rsi
leaq 0xddb24(%rip), %rdx     # 0x13006d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xeac7c
movq 0x438(%r12), %rdi
movq 0x448(%r12), %rsi
movl $0x2, %edx
callq 0xf2917
movq 0x448(%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xeac7c
movq 0x438(%r12), %rdi
callq 0xf28d4
movq 0x440(%r12), %rsi
testq %rsi, %rsi
je 0x525bb
movq %rbx, %rdi
callq 0xe9752
movq $0x0, 0x440(%r12)
movq 0x448(%r12), %rsi
movq %rbx, %rdi
callq 0xea9b3
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe9752
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq