// File: /workspace/github_c_makefile_star2_O2/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, %r12
movl $0x288, %esi            # imm = 0x288
callq 0xdecaf
movq %rax, %r14
leaq 0xe88fd(%rip), %rsi     # 0x104b64
movq %r12, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x1c27b
movl $0x1, (%r14)
leaq 0xe88f7(%rip), %rsi     # 0x104b79
movq %r12, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x1c297
movl $0x1, 0x4(%r14)
leaq 0xe88eb(%rip), %rsi     # 0x104b89
movq %r12, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x1c2b0
movb $0x1, 0x72(%r14)
leaq 0xe88e0(%rip), %rsi     # 0x104b97
movq %r12, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x1c2d1
movq %rax, %rdi
callq 0xdfb36
movslq %eax, %rbx
jmp 0x1c2d3
xorl %ebx, %ebx
leaq 0x78(%r14), %rdi
pushq $0xd
popq %rsi
callq 0xe11fc
leaq 0x98(%r14), %rdi
pushq $0x17
popq %rsi
callq 0xe11fc
movq 0x18(%r12), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%r14)
movl $0x98, %esi
movq %r12, %rdi
callq 0xdecaf
movq %rax, %rbp
movq %r12, %rdi
callq 0xec762
movq %rax, %r13
movq 0x18(%r12), %rsi
leaq 0x4d(%rsp), %r15
pushq $0x1
popq %rcx
movq %r12, %rdi
movq %r15, %rdx
callq 0xec67d
movb $0x1, %al
movl %eax, 0xc(%rsp)
cmpb $0x0, (%r15)
movq %r12, 0x20(%rsp)
je 0x1c3de
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0xdeba7
movq 0x18(%r12), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0xec71a
pushq $-0x1
popq %rsi
movq %r12, %rdi
callq 0xdeba7
movq 0x30(%r13), %rax
movq %rax, 0x20(%r14)
movups 0x8(%r13), %xmm0
movups %xmm0, 0x68(%rbp)
movq 0x18(%r13), %rax
movq %rax, 0x78(%rbp)
movups 0x20(%r13), %xmm0
movups %xmm0, 0x80(%rbp)
movq 0x60(%r13), %rax
movq %rax, 0x90(%rbp)
cmpl $0x0, (%r13)
je 0x1c3de
cmpb $0x1, 0x38(%r13)
jne 0x1c3de
movb 0x39(%r13), %al
addb $-0x3, %al
cmpb $-0x2, %al
jb 0x1c3de
movb 0x3a(%r13), %al
testb $0x1, %al
je 0x1c3be
movb $0x1, 0x8(%r14)
movl %eax, %ecx
andb $0x18, %cl
cmpb $0x10, %cl
jne 0x1c3cc
movb $0x1, 0x3(%rbp)
andb $0x6, %al
cmpb $0x4, %al
jne 0x1c3d6
movb $0x1, 0x1(%rbp)
movl $0x0, 0xc(%rsp)
movq 0x20(%rsp), %r15
movq 0x18(%r15), %rdi
movq 0x20(%r14), %rsi
decq %rsi
callq 0xe3eb4
movq 0x20(%r14), %rdx
cmpb $0x1a, %al
jne 0x1c41a
decq %rdx
leaq 0xe879d(%rip), %rsi     # 0x104ba2
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x20(%r14), %rdx
decq %rdx
movq %rdx, 0x20(%r14)
movq 0x18(%r15), %rax
cmpq 0x18(%rax), %rdx
je 0x1c435
leaq 0xe8790(%rip), %rsi     # 0x104bbb
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
movq $0x1, 0x10(%rbp)
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0xdf66f
movq %rax, 0x18(%rbp)
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0xdecaf
movq 0x18(%rbp), %rcx
movq %rax, (%rcx)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x10(%r14)
testq %rbx, %rbx
jg 0x1c48c
cmpb $0x0, 0xc(%rsp)
jne 0x1c489
movq 0x40(%r13), %rbx
leaq -0x28(%rbx), %rcx
cmpq $0x7d9, %rcx            # imm = 0x7D9
jb 0x1c48c
pushq $0x50
popq %rbx
movq %r13, 0x58(%rsp)
movq %rbx, (%rax)
movq $0x1, 0x8(%rax)
pushq $0x8
popq %rdx
movl $0x1388, %esi           # imm = 0x1388
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0xdf66f
movq 0x10(%r14), %rcx
movq %rax, 0x10(%rcx)
movl $0x1388, %esi           # imm = 0x1388
movq %rbx, %rdi
pushq $0x1
popq %rdx
callq 0xdf66f
movq %rax, 0x18(%r14)
movq %rbp, 0x50(%rsp)
addq $0x20, %rbp
leaq 0xe8633(%rip), %rdi     # 0x104b10
pushq $0x10
popq %rdx
movq %rbp, %rsi
callq 0xe1b9f
leaq 0x28(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0x4c(%r14), %rax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq $0x7, 0x48(%r14)
leaq 0x68(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0xb8(%r14), %rax
movq %rax, 0x60(%rsp)
xorl %eax, %eax
xorl %ebx, %ebx
xorl %ecx, %ecx
xorl %esi, %esi
movb %cl, 0xc(%rsp)
cmpq 0x20(%r14), %rsi
jge 0x1d2bb
movq %rsi, %r15
movl %ebx, %ebp
movq %rax, %rbx
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xe3eb4
movl %eax, %r12d
testq %r15, %r15
sete %al
cmpb $-0x65, %r12b
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1c567
movb $0x1, 0x71(%r14)
leaq 0x1(%r15), %rsi
movl %ebp, %eax
leaq 0xe84cc(%rip), %rcx     # 0x104a40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movzbl %r12b, %r8d
jmpq *%rax
movq %rbx, %r13
movq %rbx, %rax
pushq $0x1
popq %rbx
movb 0xc(%rsp), %cl
cmpb $0x1b, %r12b
je 0x1c527
cmpb $-0x65, %r12b
jne 0x1c928
cmpb $0x0, 0x71(%r14)
movq %rsi, %rax
pushq $0x2
popq %rbx
movb 0xc(%rsp), %cl
jne 0x1c527
movl $0x9b, %ecx
jmp 0x1c974
leal -0x40(%r12), %edx
movq %rbx, 0x28(%rsp)
movq %rbx, %rax
movl %ebp, %ebx
movb 0xc(%rsp), %cl
cmpb $0x3e, %dl
ja 0x1c527
movq %rsi, 0x38(%rsp)
movq 0x28(%rsp), %rbx
subq %rbx, %r15
movq 0x20(%rsp), %rbp
cmpl $0x2, (%rbp)
jl 0x1c61b
movl 0x28(%r14), %edx
movl 0x30(%r14), %ecx
incl %edx
incl %ecx
movl %r15d, (%rsp)
movq %rbp, %rdi
leaq 0xe8613(%rip), %rsi     # 0x104c1e
movq %r8, %r13
movq %rbx, %r9
xorl %eax, %eax
callq 0xde9f1
movq %r13, %r8
movq %r8, %r13
cmpq $0x64, %r15
jl 0x1c767
movq %rbp, %rdi
leaq 0xe8604(%rip), %rsi     # 0x104c36
movl %r15d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xdf05a
movq %r13, %r8
movb $0x1, 0x208(%r14,%r8)
movq 0x28(%rsp), %rax
xorl %ebx, %ebx
movb 0xc(%rsp), %cl
movq 0x38(%rsp), %rsi
jmp 0x1c527
cmpb $0x0, 0x72(%r14)
movq 0x20(%rsp), %rdi
jne 0x1c691
movq %rbx, %r13
movq %rsi, %rbx
leaq 0xe877a(%rip), %rsi     # 0x104df3
xorl %eax, %eax
movq %r8, %rbp
callq 0xde896
movq %rbp, %r8
movq %rbx, %rsi
movq %r13, %rbx
movb $0x1, 0x72(%r14)
movzbl 0xc(%rsp), %edx
cmpb $0x23, %dl
je 0x1c871
cmpl $0x29, %edx
je 0x1c84a
cmpl $0x28, %edx
jne 0x1c8b5
cmpb $0x30, %r12b
je 0x1ca9d
cmpl $0x42, %r8d
je 0x1ca93
cmpl $0x41, %r8d
jne 0x1c8b5
movl $0x2, 0x58(%r14)
jmp 0x1caa5
movq %rbx, %r13
movq %rsi, %rax
pushq $0x2
popq %rbx
movb 0xc(%rsp), %cl
cmpb $0x5b, %r12b
je 0x1c527
movl %r12d, %eax
andb $-0x20, %al
cmpb $0x40, %al
jne 0x1c942
cmpb $0x5c, %r12b
movq %rsi, 0x38(%rsp)
je 0x1ca65
cmpl $0x50, %r8d
movq 0x20(%rsp), %rbp
jne 0x1ca34
pushq $0x1
popq %rbx
leaq (%r15,%rbx), %rsi
cmpq 0x20(%r14), %rsi
jge 0x1ca65
movq 0x18(%rbp), %rdi
callq 0xe3eb4
movl %eax, %r12d
movq 0x18(%rbp), %rdi
leaq (%r15,%rbx), %rsi
incq %rsi
callq 0xe3eb4
cmpb $-0x64, %r12b
je 0x1ca67
incq %rbx
cmpb $0x1b, %r12b
jne 0x1c721
cmpb $0x5c, %al
jne 0x1c721
jmp 0x1ca67
movq 0x18(%rbp), %rdi
movq %rbx, %rdx
movq 0x60(%rsp), %rbx
movq %rbx, %rsi
movq %r15, %rcx
callq 0xe3cb7
movb $0x0, (%rbx,%r15)
movq %r13, %r8
leal -0x66(%r13), %eax
cmpl $0xf, %eax
ja 0x1c9bb
leaq 0xe82f2(%rip), %rcx     # 0x104a8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0xb8(%r14), %bl
xorl %edx, %edx
cmpb $0x3f, %bl
leaq 0x11b4aa(%rip), %r15    # 0x137c60
leaq 0x102724(%rip), %rax    # 0x11eee1
cmoveq %rax, %r15
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x1d618
movq %r13, %r8
xorl %r12d, %r12d
movslq 0x120(%r14), %rax
cmpq %rax, %r12
jge 0x1c642
movq 0x128(%r14,%r12,8), %rcx
cmpb $0x3f, %bl
jne 0x1c810
cmpq $0x4, %rcx
je 0x1c845
cmpq $0x7, %rcx
je 0x1c845
cmpq $0x19, %rcx
je 0x1c845
cmpq $0x21, %rcx
jne 0x1c816
movb $0x1, 0x70(%r14)
jmp 0x1c845
cmpq $0x7, %rcx
je 0x1c845
movq 0x10(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1c845
movq %rbp, %rdi
leaq 0xe84de(%rip), %rsi     # 0x104d09
movq %r15, %rdx
movq 0x28(%rsp), %r8
xorl %eax, %eax
callq 0xdf05a
movq %r13, %r8
movq 0x10(%rsp), %rax
incq (%rax)
incq %r12
jmp 0x1c7d4
cmpb $0x30, %r12b
je 0x1ca87
cmpl $0x42, %r8d
je 0x1ca7d
cmpl $0x41, %r8d
jne 0x1c8b5
movl $0x2, 0x5c(%r14)
jmp 0x1ca8f
leal -0x33(%r8), %eax
cmpl $0x3, %eax
ja 0x1c8b5
leaq 0xe81cf(%rip), %rcx     # 0x104a50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%r14), %rdx
movb $0x23, %cl
movq %rbx, %rdi
movq %rbx, %rax
movl $0x0, %ebx
cmpq $0x1387, %rdx           # imm = 0x1387
ja 0x1c527
movq 0x18(%r14), %rax
movb $0x1, (%rax,%rdx)
jmp 0x1cb27
movq 0x10(%rsp), %rax
cmpq $0x9, (%rax)
movq %rbx, %r13
movq %rbx, %rax
movl $0x0, %ebx
movb 0xc(%rsp), %cl
jg 0x1c527
decq %r15
leal -0x20(%rdx), %eax
cmpb $0x5f, %al
pushq $0x3f
popq %rax
cmovael %eax, %edx
movl $0xff, %ecx
andl %ecx, %edx
addb $-0x20, %r12b
cmpb $0x5f, %r12b
cmovael %eax, %r8d
andl %ecx, %r8d
xorl %ebx, %ebx
movq 0x20(%rsp), %rdi
movq %rsi, %r12
leaq 0xe8503(%rip), %rsi     # 0x104e0b
movl %r8d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0xdf05a
movq %r12, %rsi
movq 0x10(%rsp), %rax
incq (%rax)
movq %r13, %rax
jmp 0x1ca74
cmpb $0xa, %r12b
je 0x1c9a8
movl %r8d, %ecx
cmpl $0xd, %r8d
jne 0x1c974
movq 0x40(%rsp), %rax
andq $0x0, (%rax)
jmp 0x1c9b1
movq %r13, %rax
movl %ebp, %ebx
movb 0xc(%rsp), %cl
cmpb $0x29, %r12b
ja 0x1c527
movabsq $0x30800000000, %rax    # imm = 0x30800000000
btq %r8, %rax
movq %r13, %rax
pushq $0x3
popq %rbx
movl %r8d, %ecx
jb 0x1c527
jmp 0x1c9b1
cmpb $0x1f, %r12b
ja 0x1c9f9
cmpb $0x0, 0x72(%r14)
je 0x1c9f9
addl $-0xa, %r8d
movq %r13, %rax
movl %ebp, %ebx
movb 0xc(%rsp), %cl
cmpl $0x5, %r8d
ja 0x1c527
leaq 0xe814d(%rip), %rcx     # 0x104aec
movslq (%rcx,%r8,4), %rax
addq %rcx, %rax
jmpq *%rax
incq 0x30(%r14)
andq $0x0, 0x28(%r14)
movq %r13, %rax
movl %ebp, %ebx
jmp 0x1ca74
leal -0x41(%r8), %eax
cmpl $0xa, %eax
ja 0x1ceb0
leaq 0xe8091(%rip), %rcx     # 0x104a60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x1d5e6
movq %r13, %r8
movq 0x18(%rsp), %rax
subq %rax, 0x30(%r14)
jmp 0x1c642
movq %rsi, 0x38(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x60(%r14)
setne %al
movl 0x58(%r14,%rax,4), %eax
cmpl $0x3, %eax
movq %r13, %rbx
movl %ecx, %r13d
jne 0x1cb31
addb $-0x5f, %r12b
movl $0x98, %esi
cmpb $0x20, %r12b
jae 0x1cb42
jmp 0x1cb45
cmpb $0x0, 0x208(%r14,%r8)
jne 0x1ca5c
movq %rbp, %rdi
leaq 0xe81b1(%rip), %rsi     # 0x104bfa
movl %r8d, %edx
movq %r15, %rcx
xorl %eax, %eax
movq %r8, %rbx
callq 0xdf05a
movq %rbx, %r8
movb $0x1, 0x208(%r14,%r8)
xorl %ebx, %ebx
movq 0x38(%rsp), %rsi
addq %rbx, %rsi
movq %r13, %rax
xorl %ebx, %ebx
movb 0xc(%rsp), %cl
jmp 0x1c527
movl $0x1, 0x5c(%r14)
jmp 0x1ca8f
movl $0x3, 0x5c(%r14)
movb $0x29, %cl
jmp 0x1caa7
movl $0x1, 0x58(%r14)
jmp 0x1caa5
movl $0x3, 0x58(%r14)
movb $0x28, %cl
movq %rbx, %rax
xorl %ebx, %ebx
jmp 0x1c527
movq 0x30(%r14), %rdx
movb $0x23, %cl
movq %rbx, %rdi
movq %rbx, %rax
movl $0x0, %ebx
cmpq $0x1387, %rdx           # imm = 0x1387
ja 0x1c527
movq 0x18(%r14), %rax
movb $0x0, (%rax,%rdx)
jmp 0x1cb27
movq 0x30(%r14), %rdx
movb $0x23, %cl
movq %rbx, %rdi
movq %rbx, %rax
movl $0x0, %ebx
cmpq $0x1387, %rdx           # imm = 0x1387
ja 0x1c527
movq 0x18(%r14), %rax
movb $0x3, (%rax,%rdx)
jmp 0x1cb27
movq 0x30(%r14), %rdx
movb $0x23, %cl
movq %rbx, %rdi
movq %rbx, %rax
movl $0x0, %ebx
cmpq $0x1387, %rdx           # imm = 0x1387
ja 0x1c527
movq 0x18(%r14), %rax
movb $0x2, (%rax,%rdx)
movq %rdi, %rax
xorl %ebx, %ebx
jmp 0x1c527
cmpb $0x23, %r12b
jne 0x1cb42
movl $0xa3, %r12d
cmpl $0x2, %eax
je 0x1cb53
pushq $0x78
popq %rsi
addq %r14, %rsi
movl %r13d, %edi
callq 0xe1679
movl %eax, %r12d
movq 0x10(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rcx
movq 0x20(%rsp), %rdi
callq 0x1d50b
testq %rax, %rax
je 0x1cc07
movl %r13d, (%rax)
movl %r12d, 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 0x1cba6
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 0x1cbd3
cmpb $0x0, 0x8(%r14)
jne 0x1cbd3
cmpl $0x0, 0x4(%r14)
je 0x1d234
cmpb $0x0, 0x52(%r14)
setne %sil
cmpl $0x10, %edx
setb %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1cbf2
orl $0x8, %edx
movl %edx, 0xc(%rax)
xorl %esi, %esi
movb %sil, 0x12(%rax)
cmpb $0x0, 0x53(%r14)
je 0x1cc4c
movl %edx, 0x8(%rax)
movl %ecx, 0xc(%rax)
jmp 0x1cc4e
movq 0x10(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1cc74
movl 0x28(%r14), %edx
movl 0x30(%r14), %ecx
incl %edx
incl %ecx
movq 0x20(%rsp), %rdi
leaq 0xe7fb0(%rip), %rsi     # 0x104bda
movq %r15, %r8
xorl %eax, %eax
callq 0xdf05a
movq 0x68(%r14), %rax
movq 0x10(%rsp), %rcx
jmp 0x1cc6e
movq %r14, %rdi
callq 0x1d596
jmp 0x1c63f
movl %edx, %ecx
cmpb $0x0, 0x54(%r14)
je 0x1cc5c
movl %ecx, 0x8(%rax)
movb $0x0, 0x12(%rax)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rax
cmpq 0x8(%rcx), %rax
jl 0x1cc74
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
movq %rcx, %rdx
negq %rdx
movq %rax, %rsi
subq %rcx, %rsi
jl 0x1ccab
cmpb $0x0, 0x72(%r14)
jne 0x1ccab
addq %rdx, %rax
movq %rax, 0x28(%r14)
incq 0x30(%r14)
movq %rsi, %rax
jmp 0x1cc8f
movq %rbx, %rax
movl %ebp, %ebx
jmp 0x1c652
movl $0x1, 0x60(%r14)
jmp 0x1c9b1
andl $0x0, 0x60(%r14)
jmp 0x1c9b1
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d618
cmpl $0x4, 0x120(%r14)
jne 0x1ceee
movq 0x128(%r14), %rax
cmpq $0x1, %rax
ja 0x1ceee
movq 0x130(%r14), %rdx
cmpq $0xff, %rdx
ja 0x1ceee
movq 0x138(%r14), %rsi
cmpq $0xff, %rsi
ja 0x1ceee
movq 0x140(%r14), %rcx
cmpq $0xff, %rcx
ja 0x1ceee
cmpl $0x0, (%r14)
movq %r13, %r8
jne 0x1c642
shll $0x10, %edx
shll $0x8, %esi
orl %edx, %esi
orl %esi, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
testq %rax, %rax
je 0x1d2af
movl %ecx, 0x48(%r14)
jmp 0x1c642
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d618
movl 0x120(%r14), %eax
testl %eax, %eax
jle 0x1d0ab
movq 0x128(%r14), %rsi
cmpq $0x30, %rsi
je 0x1cd94
cmpq $0x26, %rsi
jne 0x1d0ab
cmpl $0x1, %eax
movq %r13, %r8
je 0x1c642
cmpq $0x30, %rsi
leaq 0xe7fd5(%rip), %rdx     # 0x104d80
leaq 0xfca74(%rip), %rcx     # 0x119826
cmoveq %rcx, %rdx
movq 0x130(%r14), %rcx
cmpq $0x2, %rcx
jne 0x1d23d
cmpl $0x4, %eax
ja 0x1d262
movq %rbp, %rdi
leaq 0xe7fd2(%rip), %rsi     # 0x104dac
xorl %eax, %eax
callq 0xdf05a
jmp 0x1c63f
movups 0x28(%r14), %xmm0
movups %xmm0, 0x38(%r14)
jmp 0x1c642
movb 0xb8(%r14), %bl
xorl %edx, %edx
cmpb $0x3f, %bl
leaq 0x11ae58(%rip), %r15    # 0x137c60
leaq 0x1020d2(%rip), %rax    # 0x11eee1
cmoveq %rax, %r15
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x1d618
movq %r13, %r8
xorl %r12d, %r12d
movslq 0x120(%r14), %rax
cmpq %rax, %r12
jge 0x1c642
movq 0x128(%r14,%r12,8), %rcx
cmpb $0x3f, %bl
jne 0x1ce60
leaq -0x4(%rcx), %rax
cmpq $0x2, %rax
jb 0x1ce9c
cmpq $0x19, %rcx
je 0x1ce9c
cmpq $0x21, %rcx
jne 0x1ce6d
movb $0x0, 0x70(%r14)
jmp 0x1ce9c
movq %rcx, %rax
andq $-0x2, %rax
cmpq $0x4, %rax
je 0x1ce9c
movq 0x10(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1ce9c
movq %rbp, %rdi
leaq 0xe7eb6(%rip), %rsi     # 0x104d38
movq %r15, %rdx
movq 0x28(%rsp), %r8
xorl %eax, %eax
callq 0xdf05a
movq %r13, %r8
movq 0x10(%rsp), %rax
incq (%rax)
incq %r12
jmp 0x1ce26
movups 0x38(%r14), %xmm0
movups %xmm0, 0x28(%r14)
jmp 0x1c642
cmpb $0x0, 0x208(%r14,%r8)
jne 0x1c642
cmpb $0x72, %r12b
jne 0x1d21d
movq %rbp, %rdi
leaq 0xe7daa(%rip), %rsi     # 0x104c7d
pushq $0x72
popq %rdx
leaq 0xe7d88(%rip), %rcx     # 0x104c65
movq 0x28(%rsp), %r8
xorl %eax, %eax
callq 0xdf05a
jmp 0x1c63f
movq 0x10(%rsp), %rax
cmpq $0x9, (%rax)
movq %r13, %r8
jg 0x1c642
movq %rbp, %rdi
leaq 0xe7ec1(%rip), %rsi     # 0x104dcb
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0xdf05a
movq %r13, %r8
movq 0x10(%rsp), %rax
incq (%rax)
jmp 0x1c642
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x1d5e6
movq %r13, %r8
movq 0x18(%rsp), %rax
addq %rax, 0x28(%r14)
jmp 0x1c642
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x1d5e6
movq 0x18(%rsp), %rbx
movq 0x10(%r14), %rsi
xorl %r15d, %r15d
cmpq 0x8(%rsi), %r15
jge 0x1cfd0
xorl %r12d, %r12d
cmpq (%rsi), %r12
jge 0x1cfcb
cmpq $0x1, %rbx
je 0x1cf8f
testq %rbx, %rbx
jne 0x1cfa1
cmpq 0x30(%r14), %r15
jl 0x1cfc2
jne 0x1cfa1
movq 0x40(%rsp), %rax
cmpq (%rax), %r12
jge 0x1cfa1
jmp 0x1cfc2
cmpq 0x30(%r14), %r15
jg 0x1cfc2
jne 0x1cfa1
movq 0x40(%rsp), %rax
cmpq (%rax), %r12
jg 0x1cfc2
movq %rbp, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1d50b
testq %rax, %rax
je 0x1cfc2
andl $0x0, 0x10(%rax)
movaps 0xe7a61(%rip), %xmm0    # 0x104a20
movups %xmm0, (%rax)
incq %r12
movq 0x10(%r14), %rsi
jmp 0x1cf6b
incq %r15
jmp 0x1cf62
cmpq $0x2, %rbx
movq %r13, %r8
jne 0x1c642
movq 0x40(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0x1c642
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x1d5e6
movq %r13, %r8
movq 0x18(%rsp), %rax
addq %rax, 0x30(%r14)
jmp 0x1c642
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x1d5e6
movq %r13, %r8
movq 0x28(%r14), %rax
subq 0x18(%rsp), %rax
testq %rax, %rax
movl $0x0, %ecx
cmovleq %rcx, %rax
movq %rax, 0x28(%r14)
jmp 0x1c642
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x1d5e6
movq 0x18(%rsp), %rbx
xorl %r15d, %r15d
movq 0x10(%r14), %rsi
cmpq (%rsi), %r15
jge 0x1c63f
cmpq $0x1, %rbx
je 0x1d07a
testq %rbx, %rbx
jne 0x1d084
movq 0x40(%rsp), %rax
cmpq (%rax), %r15
jge 0x1d084
jmp 0x1d0a6
movq 0x40(%rsp), %rax
cmpq (%rax), %r15
jg 0x1d0a6
movq 0x30(%r14), %rcx
movq %rbp, %rdi
movq %r15, %rdx
callq 0x1d50b
testq %rax, %rax
je 0x1d0a6
andl $0x0, 0x10(%rax)
movaps 0xe797d(%rip), %xmm0    # 0x104a20
movups %xmm0, (%rax)
incq %r15
jmp 0x1d056
xorl %ebx, %ebx
movq %r13, %r8
movslq %eax, %rcx
cmpq %rcx, %rbx
jge 0x1c642
movq 0x128(%r14,%rbx,8), %rdx
cmpq $0x4, %rdx
je 0x1d0f4
cmpq $0x1, %rdx
je 0x1d0ed
testq %rdx, %rdx
jne 0x1d0fb
movq 0x30(%rsp), %rcx
andw $0x0, 0x8(%rcx)
andq $0x0, (%rcx)
movl $0x7, 0x48(%r14)
jmp 0x1d10a
movb $0x1, 0x50(%r14)
jmp 0x1d10a
movb $0x1, 0x51(%r14)
jmp 0x1d10a
leaq -0x5(%rdx), %rcx
cmpq $0x1, %rcx
ja 0x1d10f
movb $0x1, 0x52(%r14)
incq %rbx
jmp 0x1d0b0
leaq -0x16(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d130
leaq 0xe79ac(%rip), %rsi     # 0x104acc
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movb $0x0, 0x50(%r14)
jmp 0x1d10a
cmpq $0x9, %rdx
je 0x1d186
cmpq $0x8, %rdx
je 0x1d17f
cmpq $0x7, %rdx
jne 0x1d149
movb $0x1, 0x53(%r14)
jmp 0x1d10a
leaq -0x1e(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d190
addl $-0x1e, %edx
movl %edx, 0x48(%r14)
jmp 0x1d10a
movb $0x0, 0x54(%r14)
jmp 0x1d10a
movb $0x0, 0x53(%r14)
jmp 0x1d10a
movb $0x0, 0x52(%r14)
jmp 0x1d10a
movb $0x0, 0x51(%r14)
jmp 0x1d10a
movb $0x0, 0x55(%r14)
jmp 0x1d10a
movb $0x1, 0x54(%r14)
jmp 0x1d10a
movb $0x1, 0x55(%r14)
jmp 0x1d10a
cmpq $0x27, %rdx
je 0x1d0e3
movq %rdx, %rcx
andq $-0x8, %rcx
cmpq $0x28, %rcx
jne 0x1d1b6
addl $-0x28, %edx
movq 0x30(%rsp), %rcx
movl %edx, (%rcx)
jmp 0x1d10a
cmpq $0x31, %rdx
jne 0x1d1c9
movq 0x30(%rsp), %rcx
andl $0x0, (%rcx)
jmp 0x1d10a
leaq -0x5a(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d1db
addl $-0x52, %edx
jmp 0x1d156
leaq -0x64(%rdx), %rcx
cmpq $0x7, %rcx
ja 0x1d1ea
addl $-0x5c, %edx
jmp 0x1d1aa
movq 0x10(%rsp), %rcx
cmpq $0x9, (%rcx)
jg 0x1d10a
movq %rbp, %rdi
leaq 0xe7b64(%rip), %rsi     # 0x104d67
xorl %eax, %eax
callq 0xdf05a
movq %r13, %r8
incq 0x68(%r14)
movl 0x120(%r14), %eax
jmp 0x1d10a
cmpb $0x70, %r12b
movq 0x28(%rsp), %rcx
movq %rbp, %rdi
jb 0x1d253
leaq 0xe7a79(%rip), %rsi     # 0x104cab
jmp 0x1d25a
movb 0x52(%r14), %sil
jmp 0x1cbf4
movq %rbp, %rdi
leaq 0xe7b3c(%rip), %rsi     # 0x104d83
xorl %eax, %eax
callq 0xdf05a
jmp 0x1c63f
leaq 0xe7a86(%rip), %rsi     # 0x104ce0
movl %r8d, %edx
jmp 0x1c638
cmpl $0x0, (%r14)
jne 0x1c642
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 0x1d2a6
movq 0x30(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x1c642
movl %eax, 0x48(%r14)
jmp 0x1c642
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1c642
xorl %eax, %eax
pushq $0x10
popq %rcx
movq 0x20(%rsp), %rbx
movq 0x58(%rsp), %r15
movq 0x50(%rsp), %r12
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1d37c
movq 0x10(%r14), %rdi
cmpq 0x8(%rdi), %rax
jge 0x1d37c
movq 0x18(%r14), %rdx
movb (%rdx,%rax), %sil
testb %sil, %sil
je 0x1d374
movq 0x10(%rdi), %rdx
movq (%rdx,%rax,8), %rdx
testq %rdx, %rdx
je 0x1d37c
cmpb $0x2, %sil
sete %r8b
shlb $0x5, %r8b
cmpb $0x1, %sil
movzbl %r8b, %esi
cmovel %ecx, %esi
movq (%rdi), %rdi
imulq $0x14, %rdi, %r8
decq %rdi
addq %rdx, %r8
decq %r8
leaq 0x1(%rdi), %r9
testq %r9, %r9
jle 0x1d374
movq %rdi, %r9
subq $0x1, %r9
jb 0x1d359
movq %rdi, %r10
shrq %r10
imulq $0x14, %r10, %r10
movl 0x10(%rdx,%r10), %r11d
movl %r11d, -0x3(%r8)
movups (%rdx,%r10), %xmm0
movups %xmm0, -0x13(%r8)
andb $0x1, %dil
shlb $0x2, %dil
addb %sil, %dil
addb $0x4, %dil
movb %dil, (%r8)
addq $-0x14, %r8
movq %r9, %rdi
jmp 0x1d32a
incq %rax
jmp 0x1d2cf
cmpb $0x0, 0x72(%r14)
je 0x1d389
movb $0x1, 0x3(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe8a63
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe89d2
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xded32
movq %rbx, %rdi
movq %r15, %rsi
callq 0xec76a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq