// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/ansiart.c
// Function: de_run_ansiart
static void de_run_ansiart(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	struct de_char_context *charctx = NULL;
	struct de_SAUCE_detection_data sdd;
	struct de_SAUCE_info *si = NULL;
	int valid_sauce = 0;
	const char *s;
	i64 width_req = 0;

	d = de_malloc(c, sizeof(lctx));

	if(de_get_ext_option(c, "ansiart:no24bitcolor")) {
		d->opt_disable_24bitcolor = 1;
	}
	if(de_get_ext_option(c, "ansiart:noblink")) {
		d->opt_disable_blink = 1;
	}
	if(de_get_ext_option(c, "ansiart:vt100")) {
		d->vt100_mode = 1;
	}
	s=de_get_ext_option(c, "char:width");
	if(s) {
		width_req = de_atoi(s);
	}

	de_encconv_init(&d->es_main, DE_ENCODING_CP437_G);
	de_encconv_init(&d->es_dec_special_gr, DE_ENCODING_DEC_SPECIAL_GRAPHICS);

	d->effective_file_size = c->infile->len;

	charctx = de_malloc(c, sizeof(struct de_char_context));

	// Read SAUCE metadata, if present.
	si = fmtutil_create_SAUCE(c);
	fmtutil_detect_SAUCE(c, c->infile, &sdd, 0x1);

	if(sdd.has_SAUCE) {
		de_dbg_indent(c, 1);
		fmtutil_handle_SAUCE(c, c->infile, si);
		de_dbg_indent(c, -1);

		d->effective_file_size = si->original_file_size;

		charctx->title = si->title;
		charctx->artist = si->artist;
		charctx->organization = si->organization;
		charctx->creation_date = si->creation_date;
		charctx->comment = si->comment;

		if(si->is_valid && si->data_type==1 && (si->file_type==1 || si->file_type==2)) {
			valid_sauce = 1;
		}
	}

	if(valid_sauce) {
		if(si->tflags & 0x01) {
			d->sauce_disable_blink = 1;
		}
		if((si->tflags & 0x18)>>3 == 0x02) {
			// Square pixels requested.
			// TODO: This is a little bit wrong. Knowing that the pixels are
			// square is different from preventing a density from being written
			// to the output file. For one thing, we should consider what to do
			// if the user set "-opt char:charwidth=9".
			charctx->no_density = 1;
		}
		if((si->tflags & 0x06)>>1 == 0x02) {
			charctx->prefer_9col_mode = 1;
		}
	}

	// Ignore any Ctrl-Z at the end of data.
	if(de_getbyte(d->effective_file_size-1) == 0x1a) {
		de_dbg(c, "found Ctrl+Z byte at %"I64_FMT, (i64)(d->effective_file_size-1));
		d->effective_file_size--;
	}
	if(d->effective_file_size!=c->infile->len) {
		de_dbg(c, "effective file size set to %"I64_FMT, (i64)d->effective_file_size);
	}

	charctx->nscreens = 1;
	charctx->screens = de_mallocarray(c, charctx->nscreens, sizeof(struct de_char_screen*));
	charctx->screens[0] = de_malloc(c, sizeof(struct de_char_screen));

	d->screen = charctx->screens[0];

	if(width_req>0) {
		// Use the width requested by the user.
		d->screen->width = width_req;
	}
	else if(valid_sauce && si->width_in_chars>=40 && si->width_in_chars<=2048) {
		// Use the width from SAUCE, if it's available and seems sensible.
		d->screen->width = si->width_in_chars;
	}
	else {
		// Otherwise, assume 80 characters per row.
		d->screen->width = 80;
	}
	// We don't know the height yet. This will be updated as we read the file.
	d->screen->height = 1;

	d->screen->cell_rows = de_mallocarray(c, MAX_ROWS, sizeof(struct de_char_cell*));
	d->row_data = de_mallocarray(c, MAX_ROWS, sizeof(struct row_data_struct));

	de_copy_palette_from_rgb24(ansi_palette, charctx->pal, 16);

	do_main(c, d);

	fixup_doublesize_rows(c, d);

	if(d->vt100_mode) {
		charctx->no_density = 1;
	}

	de_char_output_to_file(c, charctx);

	de_free_charctx(c, charctx);
	de_free(c, d->row_data);
	fmtutil_free_SAUCE(c, si);
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movl $0x288, %esi            # imm = 0x288
callq 0xe8b2b
movq %rax, %r14
leaq 0xf550d(%rip), %rsi     # 0x111b84
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x1c68b
movl $0x1, (%r14)
leaq 0xf5507(%rip), %rsi     # 0x111b99
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x1c6a7
movl $0x1, 0x4(%r14)
leaq 0xf54fb(%rip), %rsi     # 0x111ba9
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x1c6c0
movb $0x1, 0x72(%r14)
leaq 0xf54f0(%rip), %rsi     # 0x111bb7
movq %rbx, %rdi
callq 0xe9b74
testq %rax, %rax
je 0x1c6e1
movq %rax, %rdi
callq 0xe9c2a
movslq %eax, %r12
jmp 0x1c6e4
xorl %r12d, %r12d
leaq 0x78(%r14), %rdi
movl $0xd, %esi
callq 0xebbf7
leaq 0x98(%r14), %rdi
movl $0x17, %esi
callq 0xebbf7
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%r14)
movl $0x98, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r15
movq %rbx, %rdi
callq 0xf8028
movq %rax, %r13
movq 0x18(%rbx), %rsi
leaq 0x45(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0xf7f3d
movb $0x1, %al
movl %eax, 0x10(%rsp)
cmpb $0x0, (%rbp)
je 0x1c7fa
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf7fdd
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x30(%r13), %rax
movq %rax, 0x20(%r14)
movups 0x8(%r13), %xmm0
movups %xmm0, 0x68(%r15)
movq 0x18(%r13), %rax
movq %rax, 0x78(%r15)
movups 0x20(%r13), %xmm0
movups %xmm0, 0x80(%r15)
movq 0x60(%r13), %rax
movq %rax, 0x90(%r15)
cmpl $0x0, (%r13)
movq %rbx, %rbp
je 0x1c7fd
cmpb $0x1, 0x38(%r13)
jne 0x1c7fd
movb 0x39(%r13), %al
addb $-0x3, %al
cmpb $-0x2, %al
jb 0x1c7fd
movb 0x3a(%r13), %al
testb $0x1, %al
je 0x1c7d6
movb $0x1, 0x8(%r14)
movl %eax, %ecx
andb $0x18, %cl
cmpb $0x10, %cl
jne 0x1c7e5
movb $0x1, 0x3(%r15)
andb $0x6, %al
cmpb $0x4, %al
jne 0x1c7f0
movb $0x1, 0x1(%r15)
movl $0x0, 0x10(%rsp)
jmp 0x1c7fd
movq %rbx, %rbp
movq 0x18(%rbp), %rdi
movq 0x20(%r14), %rsi
decq %rsi
callq 0xeead3
movq 0x20(%r14), %rdx
cmpb $0x1a, %al
jne 0x1c834
decq %rdx
leaq 0xf53a3(%rip), %rsi     # 0x111bc2
movq %rbp, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x20(%r14), %rdx
decq %rdx
movq %rdx, 0x20(%r14)
movq 0x18(%rbp), %rax
cmpq 0x18(%rax), %rdx
je 0x1c84f
leaq 0xf5396(%rip), %rsi     # 0x111bdb
movq %rbp, %rdi
xorl %eax, %eax
callq 0xe8617
movq $0x1, 0x10(%r15)
movl $0x1, %esi
movl $0x8, %edx
movq %rbp, %rdi
callq 0xe96f7
movq %rax, 0x18(%r15)
movl $0x18, %esi
movq %rbp, %rdi
callq 0xe8b2b
movq 0x18(%r15), %rcx
movq %rax, (%rcx)
movq 0x18(%r15), %rax
movq (%rax), %rax
movq %rax, 0x10(%r14)
testq %r12, %r12
jg 0x1c8b0
cmpb $0x0, 0x10(%rsp)
jne 0x1c8aa
movq 0x40(%r13), %r12
leaq -0x28(%r12), %rcx
cmpq $0x7d9, %rcx            # imm = 0x7D9
jb 0x1c8b0
movl $0x50, %r12d
movq %r13, 0x58(%rsp)
movq %r12, (%rax)
movq $0x1, 0x8(%rax)
movl $0x1388, %esi           # imm = 0x1388
movl $0x8, %edx
movq %rbp, %rdi
callq 0xe96f7
movq 0x10(%r14), %rcx
movq %rax, 0x10(%rcx)
movl $0x1388, %esi           # imm = 0x1388
movl $0x1, %edx
movq %rbp, %rdi
callq 0xe96f7
movq %rax, 0x18(%r14)
movq %r15, 0x50(%rsp)
addq $0x20, %r15
leaq 0xf5230(%rip), %rdi     # 0x111b30
movl $0x10, %edx
movq %r15, %rsi
callq 0xec5fe
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq $0x7, 0x48(%r14)
cmpq $0x0, 0x20(%r14)
jle 0x1d762
leaq 0x28(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x4c(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x68(%r14), %rax
movq %rax, 0x30(%rsp)
leaq 0xb8(%r14), %rax
movq %rax, 0x48(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x18(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x20(%rsp)
movq %rbp, 0x10(%rsp)
movq 0x18(%rbp), %rdi
movq %r15, %rsi
callq 0xeead3
movl %eax, %r13d
testq %r15, %r15
sete %al
cmpb $-0x65, %r13b
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1c994
movb $0x1, 0x71(%r14)
leaq 0x1(%r15), %rbx
movl %r12d, %eax
leaq 0xf50be(%rip), %rcx     # 0x111a60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %r12d
cmpb $0x1b, %r13b
je 0x1cf9a
cmpb $-0x65, %r13b
jne 0x1cd4e
movl $0x2, %r12d
cmpb $0x0, 0x71(%r14)
jne 0x1cb0f
movl $0x9b, %r12d
xorl %eax, %eax
cmpl $0x0, 0x60(%r14)
setne %al
movl 0x58(%r14,%rax,4), %eax
cmpl $0x3, %eax
jne 0x1ce8b
addb $-0x5f, %r13b
movl $0x98, %esi
cmpb $0x20, %r13b
jae 0x1ce9c
jmp 0x1cea1
leal -0x40(%r13), %eax
movl $0x2, %r12d
cmpb $0x3e, %al
ja 0x1cf9a
movq 0x20(%rsp), %r12
subq %r12, %r15
cmpl $0x2, (%rbp)
jl 0x1ca54
movl 0x28(%r14), %edx
movl 0x30(%r14), %ecx
incl %edx
incl %ecx
movzbl %r13b, %r8d
movl %r15d, (%rsp)
movq %rbp, %rdi
leaq 0xf51f4(%rip), %rsi     # 0x111c3e
movq %r12, %r9
xorl %eax, %eax
callq 0xe87e4
movq %rbx, 0x60(%rsp)
cmpq $0x64, %r15
jl 0x1cb91
movq %rbp, %rdi
leaq 0xf51e9(%rip), %rsi     # 0x111c56
movl %r15d, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0xe8faa
movzbl %r13b, %eax
movb $0x1, 0x208(%r14,%rax)
xorl %r12d, %r12d
movq 0x10(%rsp), %rbp
movq 0x60(%rsp), %rbx
jmp 0x1cf9a
cmpb $0x0, 0x72(%r14)
jne 0x1cab6
movq %rbp, %rdi
leaq 0xf5369(%rip), %rsi     # 0x111e13
xorl %eax, %eax
callq 0xe8617
movb $0x1, 0x72(%r14)
movzbl 0x18(%rsp), %edx
cmpb $0x23, %dl
je 0x1cca9
cmpl $0x29, %edx
je 0x1cc80
cmpl $0x28, %edx
jne 0x1ccec
cmpb $0x30, %r13b
je 0x1cf88
movzbl %r13b, %eax
cmpl $0x42, %eax
je 0x1cf7e
cmpl $0x41, %eax
jne 0x1ccec
movl $0x2, 0x58(%r14)
jmp 0x1cf90
movl $0x2, %r12d
cmpb $0x5b, %r13b
jne 0x1cb19
movq %rbx, 0x20(%rsp)
jmp 0x1cf9a
movl %r13d, %eax
andb $-0x20, %al
cmpb $0x40, %al
jne 0x1cd77
cmpb $0x5c, %r13b
je 0x1cdfb
movzbl %r13b, %r12d
movq %rbx, %rbp
cmpl $0x50, %r12d
jne 0x1ce00
movl $0x1, %ebx
leaq (%r15,%rbx), %rsi
cmpq 0x20(%r14), %rsi
jge 0x1ce2d
movq 0x10(%rsp), %r13
movq 0x18(%r13), %rdi
callq 0xeead3
movl %eax, %r12d
movq 0x18(%r13), %rdi
leaq (%r15,%rbx), %rsi
incq %rsi
callq 0xeead3
cmpb $-0x64, %r12b
je 0x1ce2f
incq %rbx
cmpb $0x1b, %r12b
jne 0x1cb46
cmpb $0x5c, %al
jne 0x1cb46
jmp 0x1ce2f
movq 0x18(%rbp), %rdi
movq 0x48(%rsp), %rbx
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0xee8d4
movb $0x0, (%rbx,%r15)
movzbl %r13b, %edx
leal -0x66(%rdx), %eax
cmpl $0xf, %eax
ja 0x1cdb1
leaq 0xf4ee8(%rip), %rcx     # 0x111aac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0xb8(%r14), %bl
xorl %edx, %edx
cmpb $0x3f, %bl
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x1daa8
movl 0x120(%r14), %eax
testl %eax, %eax
jle 0x1ca7a
cmpb $0x3f, %bl
leaq 0x1284b1(%rip), %r15    # 0x1450b0
leaq 0x10f54b(%rip), %rcx    # 0x12c151
cmoveq %rcx, %r15
xorl %r12d, %r12d
movq 0x128(%r14,%r12,8), %rcx
cmpb $0x3f, %bl
jne 0x1cc26
cmpq $0x18, %rcx
jg 0x1cc5f
cmpq $0x4, %rcx
je 0x1cc70
cmpq $0x7, %rcx
je 0x1cc70
movq 0x30(%rsp), %rdx
cmpq $0x9, (%rdx)
jg 0x1cc70
movq 0x10(%rsp), %rdi
leaq 0xf50e6(%rip), %rsi     # 0x111d29
movq %r15, %rdx
movq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0xe8faa
incq 0x68(%r14)
movl 0x120(%r14), %eax
jmp 0x1cc70
cmpq $0x19, %rcx
je 0x1cc70
cmpq $0x21, %rcx
jne 0x1cc2c
movb $0x1, 0x70(%r14)
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x1cc0d
jmp 0x1ca7a
cmpb $0x30, %r13b
je 0x1cf72
movzbl %r13b, %eax
cmpl $0x42, %eax
je 0x1cf68
cmpl $0x41, %eax
jne 0x1ccec
movl $0x2, 0x5c(%r14)
jmp 0x1cf7a
movzbl %r13b, %eax
addl $-0x33, %eax
cmpl $0x3, %eax
ja 0x1ccec
leaq 0xf4db4(%rip), %rcx     # 0x111a70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%r14), %rax
movb $0x23, %cl
movq %rcx, 0x18(%rsp)
xorl %r12d, %r12d
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1cf9a
movq 0x18(%r14), %rcx
movb $0x1, (%rcx,%rax)
jmp 0x1cf9a
movq %rbp, %r8
xorl %r12d, %r12d
movq 0x30(%rsp), %rbp
cmpq $0x9, (%rbp)
jg 0x1cda9
decq %r15
leal -0x20(%rdx), %eax
cmpb $0x5f, %al
movl $0x3f, %esi
cmovael %esi, %edx
movl $0xff, %edi
andl %edi, %edx
leal -0x20(%r13), %eax
cmpb $0x5f, %al
movzbl %r13b, %ecx
cmovael %esi, %ecx
andl %edi, %ecx
xorl %r12d, %r12d
movq %r8, %r13
movq %r8, %rdi
leaq 0xf50f3(%rip), %rsi     # 0x111e2b
movq %r15, %r8
xorl %eax, %eax
callq 0xe8faa
incq (%rbp)
movq %r13, %rbp
jmp 0x1cf9a
cmpb $0xa, %r13b
je 0x1ce7a
movzbl %r13b, %r12d
cmpl $0xd, %r12d
jne 0x1ce42
movq 0x28(%rsp), %rax
movq $0x0, (%rax)
jmp 0x1cf97
cmpb $0x29, %r13b
ja 0x1cfac
movzbl %r13b, %eax
movabsq $0x30800000000, %rcx    # imm = 0x30800000000
btq %rax, %rcx
jae 0x1cfac
movl $0x3, %r12d
movq %r13, 0x18(%rsp)
jmp 0x1cf9a
movq %r8, %rbp
jmp 0x1cf9a
leal -0x41(%rdx), %eax
cmpl $0xa, %eax
ja 0x1d2c4
leaq 0xf4cbc(%rip), %rcx     # 0x111a80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x0, 0x120(%r14)
jle 0x1cdf2
movq 0x128(%r14), %rbx
subq %rbx, 0x30(%r14)
jmp 0x1ca7a
movq %rbx, %rbp
jmp 0x1ce2d
cmpb $0x0, 0x208(%r14,%r12)
jne 0x1ce24
movq 0x10(%rsp), %rdi
leaq 0xf4e03(%rip), %rsi     # 0x111c1a
movl %r12d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe8faa
movb $0x1, 0x208(%r14,%r12)
xorl %ebx, %ebx
addq %rbx, %rbp
movq %rbp, %rbx
xorl %r12d, %r12d
movq 0x10(%rsp), %rbp
jmp 0x1cf9a
cmpb $0x1f, %r13b
ja 0x1c9dc
cmpb $0x0, 0x72(%r14)
je 0x1c9dc
movzbl %r13b, %eax
xorl %r12d, %r12d
addl $-0xa, %eax
cmpl $0x5, %eax
ja 0x1cf9a
leaq 0xf4c9b(%rip), %rcx     # 0x111b0c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
incq 0x30(%r14)
movq $0x0, 0x28(%r14)
jmp 0x1cf97
cmpb $0x23, %r13b
jne 0x1ce9c
movl $0xa3, %r13d
cmpl $0x2, %eax
je 0x1ceaf
movl $0x78, %esi
addq %r14, %rsi
movl %r12d, %edi
callq 0xec0ad
movl %eax, %r13d
movq 0x10(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rcx
movq %rbp, %rdi
callq 0x1d9cf
testq %rax, %rax
je 0x1cfb4
movl %r12d, (%rax)
movl %r13d, 0x4(%rax)
movl 0x48(%r14), %ecx
movl %ecx, 0x8(%rax)
movl 0x4c(%r14), %edx
movl %edx, 0xc(%rax)
cmpb $0x0, 0x50(%r14)
setne %sil
cmpl $0x10, %ecx
setb %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1cf00
orl $0x8, %ecx
movl %ecx, 0x8(%rax)
movb 0x51(%r14), %sil
movb %sil, 0x10(%rax)
movb 0x55(%r14), %sil
movb %sil, 0x11(%rax)
movb $0x0, 0x13(%rax)
cmpb $0x0, 0x70(%r14)
jne 0x1cf2d
cmpb $0x0, 0x8(%r14)
jne 0x1cf2d
cmpl $0x0, 0x4(%r14)
je 0x1d548
cmpb $0x0, 0x52(%r14)
setne %sil
cmpl $0x10, %edx
setb %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1cf4c
orl $0x8, %edx
movl %edx, 0xc(%rax)
xorl %esi, %esi
movb %sil, 0x12(%rax)
cmpb $0x0, 0x53(%r14)
je 0x1d05e
movl %edx, 0x8(%rax)
movl %ecx, 0xc(%rax)
jmp 0x1d060
movl $0x1, 0x5c(%r14)
jmp 0x1cf7a
movl $0x3, 0x5c(%r14)
movb $0x29, %al
jmp 0x1cf92
movl $0x1, 0x58(%r14)
jmp 0x1cf90
movl $0x3, 0x58(%r14)
movb $0x28, %al
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
movq %rbx, %r15
cmpq 0x20(%r14), %rbx
jl 0x1c96c
jmp 0x1d762
movl $0x1, %r12d
jmp 0x1cf9a
movq 0x30(%rsp), %r12
cmpq $0x9, (%r12)
jg 0x1d086
movl 0x28(%r14), %edx
movl 0x30(%r14), %ecx
incl %edx
incl %ecx
movq %rbp, %rdi
leaq 0xf4c20(%rip), %rsi     # 0x111bfa
movq %r15, %r8
xorl %eax, %eax
callq 0xe8faa
movq 0x68(%r14), %rax
movq %r12, %rcx
jmp 0x1d080
movq 0x30(%r14), %rax
movb $0x23, %cl
movq %rcx, 0x18(%rsp)
xorl %r12d, %r12d
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1cf9a
movq 0x18(%r14), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x1cf9a
movq 0x30(%r14), %rax
movb $0x23, %cl
movq %rcx, 0x18(%rsp)
xorl %r12d, %r12d
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1cf9a
movq 0x18(%r14), %rcx
movb $0x3, (%rcx,%rax)
jmp 0x1cf9a
movq 0x30(%r14), %rax
movb $0x23, %cl
movq %rcx, 0x18(%rsp)
xorl %r12d, %r12d
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1cf9a
movq 0x18(%r14), %rcx
movb $0x2, (%rcx,%rax)
jmp 0x1cf9a
movl %edx, %ecx
cmpb $0x0, 0x54(%r14)
je 0x1d06e
movl %ecx, 0x8(%rax)
movb $0x0, 0x12(%rax)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rax
cmpq 0x8(%rcx), %rax
jl 0x1d086
addq $0x8, %rcx
incq %rax
movq %rax, (%rcx)
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rax
incq %rax
movq %rax, 0x28(%r14)
movq (%rcx), %rcx
xorl %r12d, %r12d
cmpq %rcx, %rax
jl 0x1cf9a
cmpb $0x0, 0x72(%r14)
jne 0x1cf9a
movq 0x30(%r14), %rdx
subq %rcx, %rax
incq %rdx
cmpq %rcx, %rax
jge 0x1d0b3
movq %rax, 0x28(%r14)
movq %rdx, 0x30(%r14)
jmp 0x1cf9a
movq %r14, %rdi
callq 0x1da56
jmp 0x1ca7a
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x4, 0x120(%r14)
jne 0x1d306
movq 0x128(%r14), %rax
cmpq $0x1, %rax
ja 0x1d306
movq 0x130(%r14), %rdx
cmpq $0xff, %rdx
ja 0x1d306
movq 0x138(%r14), %rsi
cmpq $0xff, %rsi
ja 0x1d306
movq 0x140(%r14), %rcx
cmpq $0xff, %rcx
ja 0x1d306
cmpl $0x0, (%r14)
jne 0x1ca7a
shll $0x10, %edx
shll $0x8, %esi
orl %edx, %esi
orl %esi, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
testq %rax, %rax
je 0x1d756
movl %ecx, 0x48(%r14)
jmp 0x1ca7a
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1daa8
movl 0x120(%r14), %eax
testl %eax, %eax
jle 0x1ca7a
movq 0x128(%r14), %rsi
cmpq $0x26, %rsi
je 0x1d19d
cmpq $0x30, %rsi
jne 0x1d551
cmpl $0x1, %eax
je 0x1ca7a
cmpq $0x30, %rsi
leaq 0xf4bef(%rip), %rdx     # 0x111da0
leaq 0x10986e(%rip), %rcx    # 0x126a26
cmoveq %rcx, %rdx
movq 0x130(%r14), %rcx
cmpq $0x2, %rcx
jne 0x1d6e5
cmpl $0x4, %eax
ja 0x1d709
movq 0x10(%rsp), %rdi
leaq 0xf4bea(%rip), %rsi     # 0x111dcc
xorl %eax, %eax
callq 0xe8faa
jmp 0x1ca7a
movups 0x28(%r14), %xmm0
movups %xmm0, 0x38(%r14)
jmp 0x1ca7a
movb 0xb8(%r14), %bl
xorl %edx, %edx
cmpb $0x3f, %bl
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x1daa8
movl 0x120(%r14), %eax
testl %eax, %eax
jle 0x1ca7a
cmpb $0x3f, %bl
leaq 0x127e81(%rip), %r15    # 0x1450b0
leaq 0x10ef1b(%rip), %rcx    # 0x12c151
cmoveq %rcx, %r15
xorl %r12d, %r12d
movq 0x128(%r14,%r12,8), %rcx
cmpb $0x3f, %bl
jne 0x1d267
leaq -0x4(%rcx), %rdx
cmpq $0x2, %rdx
jb 0x1d2a5
cmpq $0x19, %rcx
je 0x1d2a5
cmpq $0x21, %rcx
jne 0x1d274
movb $0x0, 0x70(%r14)
jmp 0x1d2a5
movq %rcx, %rdx
andq $-0x2, %rdx
cmpq $0x4, %rdx
je 0x1d2a5
movq 0x30(%rsp), %rdx
cmpq $0x9, (%rdx)
jg 0x1d2a5
movq 0x10(%rsp), %rdi
leaq 0xf4acd(%rip), %rsi     # 0x111d58
movq %r15, %rdx
movq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0xe8faa
incq 0x68(%r14)
movl 0x120(%r14), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x1d23d
jmp 0x1ca7a
movups 0x38(%r14), %xmm0
movups %xmm0, 0x28(%r14)
jmp 0x1ca7a
cmpb $0x0, 0x208(%r14,%rdx)
jne 0x1ca7a
cmpb $0x72, %r13b
jne 0x1d6cc
movq 0x10(%rsp), %rdi
leaq 0xf49b4(%rip), %rsi     # 0x111c9d
movl $0x72, %edx
leaq 0xf4990(%rip), %rcx     # 0x111c85
movq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0xe8faa
jmp 0x1ca7a
movq 0x30(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1ca7a
movq 0x10(%rsp), %rdi
leaq 0xf4aca(%rip), %rsi     # 0x111deb
movq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0xe8faa
movq 0x30(%rsp), %rax
incq (%rax)
jmp 0x1ca7a
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x0, 0x120(%r14)
jle 0x1d35f
movq 0x128(%r14), %rbx
movq 0x28(%rsp), %rax
addq %rbx, (%rax)
jmp 0x1ca7a
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x0, 0x120(%r14)
movl $0x0, %ebx
jle 0x1d38e
movq 0x128(%r14), %rbx
movq 0x10(%r14), %rsi
cmpq $0x0, 0x8(%rsi)
jle 0x1d416
movq (%rsi), %rax
xorl %r15d, %r15d
testq %rax, %rax
jle 0x1d40d
xorl %r12d, %r12d
cmpq $0x1, %rbx
je 0x1d3c6
testq %rbx, %rbx
jne 0x1d3d8
cmpq 0x30(%r14), %r15
jl 0x1d3fe
jne 0x1d3d8
movq 0x28(%rsp), %rax
cmpq (%rax), %r12
jge 0x1d3d8
jmp 0x1d3fe
cmpq 0x30(%r14), %r15
jg 0x1d3fe
jne 0x1d3d8
movq 0x28(%rsp), %rax
cmpq (%rax), %r12
jg 0x1d3fe
movq 0x10(%rsp), %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1d9cf
testq %rax, %rax
je 0x1d3fe
movl $0x0, 0x10(%rax)
movaps 0xf4645(%rip), %xmm0    # 0x111a40
movups %xmm0, (%rax)
incq %r12
movq 0x10(%r14), %rsi
movq (%rsi), %rax
cmpq %rax, %r12
jl 0x1d3a7
incq %r15
cmpq 0x8(%rsi), %r15
jl 0x1d39f
cmpq $0x2, %rbx
jne 0x1ca7a
xorps %xmm0, %xmm0
movq 0x28(%rsp), %rax
movups %xmm0, (%rax)
jmp 0x1ca7a
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x0, 0x120(%r14)
jle 0x1d455
movq 0x128(%r14), %rbx
addq %rbx, 0x30(%r14)
jmp 0x1ca7a
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x0, 0x120(%r14)
jle 0x1d483
movq 0x128(%r14), %rbx
movq 0x28(%rsp), %rcx
movq (%rcx), %rax
subq %rbx, %rax
testq %rax, %rax
movl $0x0, %edx
cmovleq %rdx, %rax
movq %rax, (%rcx)
jmp 0x1ca7a
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1daa8
cmpl $0x0, 0x120(%r14)
movl $0x0, %ebx
jle 0x1d4c4
movq 0x128(%r14), %rbx
movq 0x10(%r14), %rsi
cmpq $0x0, (%rsi)
jle 0x1ca7a
xorl %r15d, %r15d
cmpq $0x1, %rbx
je 0x1d4ec
testq %rbx, %rbx
jne 0x1d4f6
movq 0x28(%rsp), %rax
cmpq (%rax), %r15
jge 0x1d4f6
jmp 0x1d51d
movq 0x28(%rsp), %rax
cmpq (%rax), %r15
jg 0x1d51d
movq 0x30(%r14), %rcx
movq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x1d9cf
testq %rax, %rax
je 0x1d51d
movl $0x0, 0x10(%rax)
movaps 0xf4526(%rip), %xmm0    # 0x111a40
movups %xmm0, (%rax)
incq %r15
movq 0x10(%r14), %rsi
cmpq (%rsi), %r15
jl 0x1d4d5
jmp 0x1ca7a
movl $0x1, 0x60(%r14)
jmp 0x1cf9a
movl $0x0, 0x60(%r14)
jmp 0x1cf9a
movb 0x52(%r14), %sil
jmp 0x1cf4e
xorl %r15d, %r15d
movq 0x128(%r14,%r15,8), %rdx
cmpq $0x4, %rdx
je 0x1d590
cmpq $0x1, %rdx
je 0x1d589
testq %rdx, %rdx
jne 0x1d597
movq 0x38(%rsp), %rcx
movw $0x0, 0x8(%rcx)
movq $0x0, (%rcx)
movl $0x7, 0x48(%r14)
jmp 0x1d5a6
movb $0x1, 0x50(%r14)
jmp 0x1d5a6
movb $0x1, 0x51(%r14)
jmp 0x1d5a6
leaq -0x5(%rdx), %rcx
cmpq $0x1, %rcx
ja 0x1d5b6
movb $0x1, 0x52(%r14)
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x1d554
jmp 0x1ca7a
cmpq $0x15, %rdx
jle 0x1d5dd
leaq -0x16(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d62a
leaq 0xf451f(%rip), %rsi     # 0x111aec
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movb $0x0, 0x50(%r14)
jmp 0x1d5a6
cmpq $0x7, %rdx
je 0x1d619
cmpq $0x8, %rdx
je 0x1d620
cmpq $0x9, %rdx
jne 0x1d62a
movb $0x1, 0x55(%r14)
jmp 0x1d5a6
movb $0x0, 0x54(%r14)
jmp 0x1d5a6
movb $0x0, 0x52(%r14)
jmp 0x1d5a6
movb $0x0, 0x53(%r14)
jmp 0x1d5a6
movb $0x0, 0x51(%r14)
jmp 0x1d5a6
movb $0x0, 0x55(%r14)
jmp 0x1d5a6
movb $0x1, 0x53(%r14)
jmp 0x1d5a6
movb $0x1, 0x54(%r14)
jmp 0x1d5a6
leaq -0x1e(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d640
addl $-0x1e, %edx
movl %edx, 0x48(%r14)
jmp 0x1d5a6
cmpq $0x27, %rdx
je 0x1d57f
movq %rdx, %rcx
andq $-0x8, %rcx
cmpq $0x28, %rcx
jne 0x1d666
addl $-0x28, %edx
movq 0x38(%rsp), %rcx
movl %edx, (%rcx)
jmp 0x1d5a6
cmpq $0x31, %rdx
jne 0x1d67c
movq 0x38(%rsp), %rcx
movl $0x0, (%rcx)
jmp 0x1d5a6
leaq -0x5a(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d68b
addl $-0x52, %edx
jmp 0x1d637
leaq -0x64(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d69a
addl $-0x5c, %edx
jmp 0x1d65a
movq 0x30(%rsp), %rcx
cmpq $0x9, (%rcx)
jg 0x1d5a6
movq 0x10(%rsp), %rdi
leaq 0xf46d2(%rip), %rsi     # 0x111d87
xorl %eax, %eax
callq 0xe8faa
incq 0x68(%r14)
movl 0x120(%r14), %eax
jmp 0x1d5a6
cmpb $0x70, %r13b
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rcx
jb 0x1d6fd
leaq 0xf45e8(%rip), %rsi     # 0x111ccb
jmp 0x1d704
movq 0x10(%rsp), %rdi
leaq 0xf46b2(%rip), %rsi     # 0x111da3
xorl %eax, %eax
callq 0xe8faa
jmp 0x1ca7a
leaq 0xf45fc(%rip), %rsi     # 0x111d00
jmp 0x1ca73
cmpl $0x0, (%r14)
jne 0x1ca7a
movl 0x138(%r14), %ecx
movl 0x140(%r14), %eax
movzbl 0x148(%r14), %edx
shll $0x10, %ecx
shll $0x8, %eax
movzwl %ax, %eax
orl %ecx, %eax
orl %edx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
cmpq $0x30, %rsi
jne 0x1d74d
movq 0x38(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x1ca7a
movl %eax, 0x48(%r14)
jmp 0x1ca7a
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1ca7a
movq 0x10(%r14), %rdi
cmpq $0x0, 0x8(%rdi)
movq 0x58(%rsp), %r15
jle 0x1d82e
xorl %eax, %eax
movl $0x10, %ecx
movq 0x18(%r14), %rdx
movb (%rdx,%rax), %r8b
testb %r8b, %r8b
je 0x1d819
movq 0x10(%rdi), %rdx
movq (%rdx,%rax,8), %rdx
testq %rdx, %rdx
je 0x1d82e
movq (%rdi), %rsi
testq %rsi, %rsi
jle 0x1d819
cmpb $0x2, %r8b
sete %dil
shlb $0x5, %dil
cmpb $0x1, %r8b
movzbl %dil, %edi
cmovel %ecx, %edi
leaq (%rsi,%rsi,4), %r8
decq %rsi
leaq (%rdx,%r8,4), %r8
decq %r8
movq %rsi, %r9
subq $0x1, %r9
jb 0x1d7f2
movq %rsi, %r10
shrq %r10
leaq (%r10,%r10,4), %r10
movl 0x10(%rdx,%r10,4), %r11d
movl %r11d, -0x3(%r8)
movups (%rdx,%r10,4), %xmm0
movups %xmm0, -0x13(%r8)
andb $0x1, %sil
shlb $0x2, %sil
addb %dil, %sil
addb $0x4, %sil
movb %sil, (%r8)
leaq 0x2(%r9), %r10
addq $-0x14, %r8
movq %r9, %rsi
cmpq $0x1, %r10
ja 0x1d7cf
movq 0x10(%r14), %rdi
cmpq $0x1386, %rax           # imm = 0x1386
ja 0x1d82e
incq %rax
cmpq 0x8(%rdi), %rax
jl 0x1d77d
cmpb $0x0, 0x72(%r14)
movq 0x50(%rsp), %r12
je 0x1d840
movb $0x1, 0x3(%r12)
movq %rbp, %rdi
movq %r12, %rsi
callq 0xf404b
movq %rbp, %rdi
movq %r12, %rsi
callq 0xf3fb8
movq 0x18(%r14), %rsi
movq %rbp, %rdi
callq 0xe8be2
movq %rbp, %rdi
movq %r15, %rsi
callq 0xf8032
movq %rbp, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq