// File: /workspace/github_c_makefile_star2_O1/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 $0x78, %rsp
movq %rdi, %r12
movl $0x288, %esi            # imm = 0x288
callq 0xe969b
movq %rax, %r14
leaq 0xf5615(%rip), %rsi     # 0x111b74
movq %r12, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x1c573
movl $0x1, (%r14)
leaq 0xf560f(%rip), %rsi     # 0x111b89
movq %r12, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x1c58f
movl $0x1, 0x4(%r14)
leaq 0xf5603(%rip), %rsi     # 0x111b99
movq %r12, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x1c5a8
movb $0x1, 0x72(%r14)
leaq 0xf55f8(%rip), %rsi     # 0x111ba7
movq %r12, %rdi
callq 0xea6cb
testq %rax, %rax
je 0x1c5c9
movq %rax, %rdi
callq 0xea781
movslq %eax, %rbx
jmp 0x1c5cb
xorl %ebx, %ebx
leaq 0x78(%r14), %rdi
movq %rdi, 0x58(%rsp)
movl $0xd, %esi
callq 0xec207
leaq 0x98(%r14), %rdi
movq %rdi, 0x50(%rsp)
movl $0x17, %esi
callq 0xec207
movq 0x18(%r12), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%r14)
movl $0x98, %esi
movq %r12, %rdi
callq 0xe969b
movq %rax, %r15
movq %r12, %rdi
callq 0xf84f4
movq %rax, %r13
movq 0x18(%r12), %rsi
leaq 0x4d(%rsp), %rbp
movq %r12, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0xf840d
cmpb $0x0, (%rbp)
je 0x1c6c1
movq %r12, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r12), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0xf84ad
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x30(%r13), %rax
movq %rax, 0x20(%r14)
movq 0x8(%r13), %rax
movq %rax, 0x68(%r15)
movq 0x10(%r13), %rax
movq %rax, 0x70(%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)
je 0x1c6c1
cmpb $0x1, 0x38(%r13)
movb $0x1, %bpl
jne 0x1c6c4
movb 0x39(%r13), %al
addb $-0x3, %al
cmpb $-0x2, %al
setb %bpl
jmp 0x1c6c4
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x1c6f0
movb 0x3a(%r13), %al
testb $0x1, %al
je 0x1c6d6
movb $0x1, 0x8(%r14)
movl %eax, %ecx
andb $0x18, %cl
cmpb $0x10, %cl
jne 0x1c6e5
movb $0x1, 0x3(%r15)
andb $0x6, %al
cmpb $0x4, %al
jne 0x1c6f0
movb $0x1, 0x1(%r15)
movq 0x18(%r12), %rdi
movq 0x20(%r14), %rsi
decq %rsi
callq 0xef0d5
cmpb $0x1a, %al
jne 0x1c721
movq 0x20(%r14), %rdx
decq %rdx
leaq 0xf549f(%rip), %rsi     # 0x111bb2
movq %r12, %rdi
xorl %eax, %eax
callq 0xe9226
decq 0x20(%r14)
movq 0x20(%r14), %rdx
movq 0x18(%r12), %rax
cmpq 0x18(%rax), %rdx
je 0x1c741
leaq 0xf5494(%rip), %rsi     # 0x111bcb
movq %r12, %rdi
xorl %eax, %eax
callq 0xe9226
movq $0x1, 0x10(%r15)
movl $0x1, %esi
movl $0x8, %edx
movq %r12, %rdi
callq 0xea259
movq %rax, 0x18(%r15)
movl $0x18, %esi
movq %r12, %rdi
callq 0xe969b
movq 0x18(%r15), %rcx
movq %rax, (%rcx)
movq 0x18(%r15), %rax
movq (%rax), %rax
movq %rax, 0x10(%r14)
testq %rbx, %rbx
jg 0x1c79e
testb %bpl, %bpl
jne 0x1c799
movq 0x40(%r13), %rbx
leaq -0x28(%rbx), %rcx
cmpq $0x7d9, %rcx            # imm = 0x7D9
jb 0x1c79e
movl $0x50, %ebx
movq %r13, 0x70(%rsp)
movq %rbx, (%rax)
movq $0x1, 0x8(%rax)
movl $0x1388, %esi           # imm = 0x1388
movl $0x8, %edx
movq %r12, %rdi
callq 0xea259
movq 0x10(%r14), %rcx
movq %rax, 0x10(%rcx)
movl $0x1388, %esi           # imm = 0x1388
movl $0x1, %edx
movq %r12, %rdi
callq 0xea259
movq %rax, 0x18(%r14)
movq %r15, 0x68(%rsp)
addq $0x20, %r15
leaq 0xf5332(%rip), %rdi     # 0x111b20
movl $0x10, %edx
movq %r15, %rsi
callq 0xecc60
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq $0x7, 0x48(%r14)
cmpq $0x0, 0x20(%r14)
jle 0x1d658
leaq 0x28(%r14), %rax
movq %rax, 0x30(%rsp)
leaq 0x4c(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x68(%r14), %r13
movq %r14, %rax
addq $0xb8, %rax
movq %rax, 0x60(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x40(%rsp)
xorl %ebx, %ebx
movq $0x0, 0x18(%rsp)
movq %r12, 0x10(%rsp)
movq %r13, 0x28(%rsp)
movq 0x18(%r12), %rdi
movq %r15, %rsi
callq 0xef0d5
movl %eax, %ebp
testq %r15, %r15
sete %al
cmpb $-0x65, %bpl
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1c883
movb $0x1, 0x71(%r14)
leaq 0x1(%r15), %rsi
movl %ebx, %eax
leaq 0xf51c0(%rip), %rcx     # 0x111a50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x1b, %bpl
jne 0x1ca3b
movl $0x1, %ebx
jmp 0x1ccf9
leal -0x40(%rbp), %eax
cmpb $0x3e, %al
ja 0x1ccf9
movq %rsi, 0x20(%rsp)
subq 0x18(%rsp), %r15
cmpl $0x2, (%r12)
jl 0x1c8f3
movl 0x28(%r14), %edx
movl 0x30(%r14), %ecx
incl %edx
incl %ecx
movzbl %bpl, %r8d
movl %r15d, (%rsp)
movq %r12, %rdi
leaq 0xf5347(%rip), %rsi     # 0x111c2e
movq 0x18(%rsp), %r9
xorl %eax, %eax
callq 0xe93cf
cmpq $0x64, %r15
jl 0x1ca80
movq %r12, %rdi
leaq 0xf533f(%rip), %rsi     # 0x111c46
movl %r15d, %edx
movq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0xe9b27
movzbl %bpl, %eax
movb $0x1, 0x208(%r14,%rax)
xorl %ebx, %ebx
movq 0x10(%rsp), %r12
movq 0x20(%rsp), %rsi
jmp 0x1ccf9
cmpb $0x0, 0x72(%r14)
jne 0x1c957
movq %r12, %rdi
movq %rsi, %rbx
leaq 0xf54bb(%rip), %rsi     # 0x111e03
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rsi
movb $0x1, 0x72(%r14)
movzbl 0x40(%rsp), %edx
cmpb $0x23, %dl
je 0x1cb9f
cmpl $0x29, %edx
je 0x1cb76
cmpl $0x28, %edx
jne 0x1cbda
cmpb $0x30, %bpl
je 0x1cd32
movzbl %bpl, %eax
cmpl $0x42, %eax
je 0x1cd25
cmpl $0x41, %eax
jne 0x1cbda
movl $0x2, 0x58(%r14)
jmp 0x1cc70
cmpb $0x5b, %bpl
je 0x1ca48
movl %ebp, %eax
andb $-0x20, %al
cmpb $0x40, %al
jne 0x1cc3a
cmpb $0x5f, %bpl
ja 0x1cc6b
cmpb $0x5c, %bpl
je 0x1cc6b
movzbl %bpl, %r12d
cmpl $0x50, %r12d
jne 0x1cdd1
movl $0x1, %ebx
movq 0x10(%rsp), %r12
movq %rsi, %rbp
leaq (%r15,%rbx), %rsi
cmpq 0x20(%r14), %rsi
jge 0x1d40b
movq 0x18(%r12), %rdi
callq 0xef0d5
movq %r12, %rcx
movl %eax, %r12d
movq 0x18(%rcx), %rdi
leaq (%r15,%rbx), %rsi
incq %rsi
callq 0xef0d5
cmpb $-0x64, %r12b
je 0x1d40f
incq %rbx
cmpb $0x1b, %r12b
movq 0x10(%rsp), %r12
movq %rbp, %rsi
jne 0x1c9e6
cmpb $0x5c, %al
jne 0x1c9e6
jmp 0x1cc6d
cmpb $-0x65, %bpl
jne 0x1ca57
cmpb $0x0, 0x71(%r14)
je 0x1ca57
movq %rsi, 0x18(%rsp)
movl $0x2, %ebx
jmp 0x1ccf9
cmpb $0xa, %bpl
je 0x1cce8
movzbl %bpl, %r12d
cmpl $0xd, %r12d
jne 0x1ccc1
movq 0x30(%rsp), %rax
movq $0x0, (%rax)
jmp 0x1ccf4
movq 0x18(%r12), %rdi
movq 0x60(%rsp), %rbx
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rcx
callq 0xeeee8
movb $0x0, (%rbx,%r15)
movzbl %bpl, %edx
leal -0x66(%rdx), %eax
cmpl $0xf, %eax
ja 0x1cc77
leaq 0xf4fe6(%rip), %rcx     # 0x111a9c
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 0x1d997
cmpl $0x0, 0x120(%r14)
jle 0x1c916
cmpb $0x3f, %bl
leaq 0x1280e0(%rip), %r15    # 0x144bd0
leaq 0x10f372(%rip), %rax    # 0x12be69
cmoveq %rax, %r15
xorl %r12d, %r12d
movq 0x128(%r14,%r12,8), %rax
cmpb $0x3f, %bl
jne 0x1cb17
cmpq $0x18, %rax
jg 0x1cb51
cmpq $0x4, %rax
je 0x1cb62
cmpq $0x7, %rax
je 0x1cb62
movq 0x28(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1cb62
movl 0x128(%r14,%r12,8), %ecx
movq 0x10(%rsp), %rdi
leaq 0xf51dd(%rip), %rsi     # 0x111d19
movq %r15, %rdx
movq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0xe9b27
incq 0x68(%r14)
jmp 0x1cb62
cmpq $0x19, %rax
je 0x1cb62
cmpq $0x21, %rax
jne 0x1cb1d
movb $0x1, 0x70(%r14)
incq %r12
movslq 0x120(%r14), %rax
cmpq %rax, %r12
jl 0x1cafe
jmp 0x1c916
cmpb $0x30, %bpl
je 0x1cd18
movzbl %bpl, %eax
cmpl $0x42, %eax
je 0x1cd0b
cmpl $0x41, %eax
jne 0x1cbda
movl $0x2, 0x5c(%r14)
jmp 0x1cc70
movzbl %bpl, %eax
addl $-0x33, %eax
cmpl $0x3, %eax
ja 0x1cbda
leaq 0xf4eae(%rip), %rcx     # 0x111a60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%r14), %rax
xorl %ebx, %ebx
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1ccf9
movq 0x18(%r14), %rcx
movb $0x1, (%rcx,%rax)
jmp 0x1ccf9
xorl %ebx, %ebx
movq 0x28(%rsp), %r13
cmpq $0x9, (%r13)
jg 0x1ccf9
decq %r15
leal -0x20(%rdx), %eax
cmpb $0x5f, %al
movq %rsi, 0x20(%rsp)
movl $0x3f, %esi
cmovael %esi, %edx
movl $0xff, %edi
andl %edi, %edx
leal -0x20(%rbp), %eax
cmpb $0x5f, %al
movzbl %bpl, %ecx
cmovael %esi, %ecx
andl %edi, %ecx
xorl %ebx, %ebx
movq %r12, %rdi
leaq 0xf51f9(%rip), %rsi     # 0x111e1b
movq %r15, %r8
xorl %eax, %eax
callq 0xe9b27
movq 0x20(%rsp), %rsi
incq (%r13)
jmp 0x1ccf9
cmpb $0x29, %bpl
ja 0x1ccf9
movzbl %bpl, %eax
movabsq $0x30800000000, %rcx    # imm = 0x30800000000
btq %rax, %rcx
jae 0x1ccf9
movl $0x3, %ebx
movq %rbp, 0x40(%rsp)
jmp 0x1ccf9
xorl %ebx, %ebx
addq %rbx, %rsi
xorl %ebx, %ebx
jmp 0x1ccf9
leal -0x41(%rdx), %eax
cmpl $0xa, %eax
ja 0x1d19a
leaq 0xf4de6(%rip), %rcx     # 0x111a70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1d997
cmpl $0x0, 0x120(%r14)
jle 0x1ccb8
movq 0x128(%r14), %rbx
subq %rbx, 0x30(%r14)
jmp 0x1c916
cmpb $0x1f, %bpl
ja 0x1cd3f
cmpb $0x0, 0x72(%r14)
je 0x1cd3f
addl $-0xa, %r12d
cmpl $0x5, %r12d
ja 0x1ccf4
leaq 0xf4e1d(%rip), %rcx     # 0x111afc
movslq (%rcx,%r12,4), %rax
addq %rcx, %rax
jmpq *%rax
incq 0x30(%r14)
movq $0x0, 0x28(%r14)
movq 0x10(%rsp), %r12
movq %rsi, %r15
cmpq 0x20(%r14), %rsi
jl 0x1c85b
jmp 0x1d658
movl $0x1, 0x5c(%r14)
jmp 0x1cc70
movl $0x3, 0x5c(%r14)
jmp 0x1cc70
movl $0x1, 0x58(%r14)
jmp 0x1cc70
movl $0x3, 0x58(%r14)
jmp 0x1cc70
movq %rsi, 0x20(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x60(%r14)
setne %al
movl 0x58(%r14,%rax,4), %eax
cmpl $0x3, %eax
jne 0x1ce26
addb $-0x5f, %bpl
movq 0x50(%rsp), %rsi
cmpb $0x20, %bpl
jae 0x1ce37
jmp 0x1ce3c
movq 0x30(%r14), %rax
xorl %ebx, %ebx
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1ccf9
movq 0x18(%r14), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x1ccf9
movq 0x30(%r14), %rax
xorl %ebx, %ebx
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1ccf9
movq 0x18(%r14), %rcx
movb $0x3, (%rcx,%rax)
jmp 0x1ccf9
movq 0x30(%r14), %rax
xorl %ebx, %ebx
cmpq $0x1387, %rax           # imm = 0x1387
ja 0x1ccf9
movq 0x18(%r14), %rcx
movb $0x2, (%rcx,%rax)
jmp 0x1ccf9
cmpb $0x0, 0x208(%r14,%r12)
jne 0x1ce04
movq 0x10(%rsp), %rdi
movq %rsi, %rbx
leaq 0xf4e1f(%rip), %rsi     # 0x111c0a
movl %r12d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0xe9b27
movq %rbx, %rsi
movb $0x1, 0x208(%r14,%r12)
movb $0x1, 0x208(%r14,%r12)
xorl %ebx, %ebx
movq 0x10(%rsp), %r12
jmp 0x1cc6d
movq %r14, %rdi
callq 0x1d94a
jmp 0x1c916
cmpb $0x23, %bpl
jne 0x1ce37
movl $0xa3, %r13d
cmpl $0x2, %eax
je 0x1ce47
movq 0x58(%rsp), %rsi
movl %r12d, %edi
callq 0xec6fd
movl %eax, %r13d
movq 0x10(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rcx
movq 0x10(%rsp), %rdi
callq 0x1d8bb
testq %rax, %rax
je 0x1cf23
movl %r12d, (%rax)
movl %r13d, 0x4(%rax)
movl 0x48(%r14), %edx
movl %edx, 0x8(%rax)
movl 0x4c(%r14), %ecx
movl %ecx, 0xc(%rax)
cmpb $0x0, 0x50(%r14)
setne %sil
cmpl $0x10, %edx
setb %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1ce9a
orl $0x8, %edx
movl %edx, 0x8(%rax)
movb 0x51(%r14), %dl
movb %dl, 0x10(%rax)
movb 0x55(%r14), %dl
movb %dl, 0x11(%rax)
movb $0x0, 0x13(%rax)
cmpb $0x0, 0x70(%r14)
movq 0x10(%rsp), %r12
jne 0x1ceca
cmpb $0x0, 0x8(%r14)
jne 0x1ceca
cmpl $0x0, 0x4(%r14)
je 0x1d5d1
cmpb $0x0, 0x52(%r14)
setne %dl
cmpl $0x10, %ecx
setb %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1cee8
orl $0x8, %ecx
movl %ecx, 0xc(%rax)
xorl %ecx, %ecx
movq 0x20(%rsp), %rsi
movb %cl, 0x12(%rax)
cmpb $0x0, 0x53(%r14)
je 0x1cefe
rolq $0x20, 0x8(%rax)
cmpb $0x0, 0x54(%r14)
je 0x1cf0f
movl 0xc(%rax), %ecx
movl %ecx, 0x8(%rax)
movb $0x0, 0x12(%rax)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rax
cmpq 0x8(%rcx), %rax
jl 0x1cf6b
addq $0x8, %rcx
jmp 0x1cf65
movq 0x28(%rsp), %r13
cmpq $0x9, (%r13)
movq 0x10(%rsp), %r12
movq 0x20(%rsp), %rsi
jg 0x1cf6b
movl 0x28(%r14), %edx
movl 0x30(%r14), %ecx
incl %edx
incl %ecx
movq %r12, %rdi
leaq 0xf4c9b(%rip), %rsi     # 0x111bea
movq %r15, %r8
xorl %eax, %eax
callq 0xe9b27
movq 0x20(%rsp), %rsi
movq 0x68(%r14), %rax
movq %r13, %rcx
incq %rax
movq %rax, (%rcx)
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rax
incq %rax
movq %rax, 0x28(%r14)
movq (%rcx), %rcx
cmpq %rcx, %rax
jl 0x1ccf9
cmpb $0x0, 0x72(%r14)
jne 0x1ccf9
movq 0x30(%r14), %rdx
subq %rcx, %rax
incq %rdx
cmpq %rcx, %rax
jge 0x1cf95
movq %rax, 0x28(%r14)
movq %rdx, 0x30(%r14)
jmp 0x1ccf9
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d997
cmpl $0x4, 0x120(%r14)
jne 0x1d1d7
movq 0x128(%r14), %rax
cmpq $0x1, %rax
ja 0x1d1d7
movq 0x130(%r14), %rdx
cmpq $0xff, %rdx
ja 0x1d1d7
movq 0x138(%r14), %rsi
cmpq $0xff, %rsi
ja 0x1d1d7
movq 0x140(%r14), %rcx
cmpq $0xff, %rcx
ja 0x1d1d7
cmpl $0x0, (%r14)
jne 0x1c916
shll $0x10, %edx
shll $0x8, %esi
orl %edx, %esi
orl %esi, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
testq %rax, %rax
je 0x1d64c
movl %ecx, 0x48(%r14)
jmp 0x1c916
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d997
movl 0x120(%r14), %esi
testl %esi, %esi
jle 0x1c916
movq 0x128(%r14), %rax
cmpq $0x26, %rax
je 0x1d072
cmpq $0x30, %rax
jne 0x1d436
cmpl $0x1, %esi
je 0x1c916
cmpq $0x30, %rax
leaq 0xf4d0a(%rip), %rdx     # 0x111d90
leaq 0x109769(%rip), %rcx    # 0x1267f6
cmoveq %rcx, %rdx
movq 0x130(%r14), %rcx
cmpq $0x2, %rcx
jne 0x1d5da
cmpl $0x4, %esi
jg 0x1d5fe
movq 0x10(%rsp), %rdi
leaq 0xf4d05(%rip), %rsi     # 0x111dbc
xorl %eax, %eax
callq 0xe9b27
jmp 0x1c916
movups 0x28(%r14), %xmm0
movups %xmm0, 0x38(%r14)
jmp 0x1c916
movb 0xb8(%r14), %bl
xorl %edx, %edx
cmpb $0x3f, %bl
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x1d997
cmpl $0x0, 0x120(%r14)
jle 0x1c916
cmpb $0x3f, %bl
leaq 0x127acd(%rip), %r15    # 0x144bd0
leaq 0x10ed5f(%rip), %rax    # 0x12be69
cmoveq %rax, %r15
xorl %r12d, %r12d
movq 0x128(%r14,%r12,8), %rax
cmpb $0x3f, %bl
jne 0x1d13b
leaq -0x4(%rax), %rcx
cmpq $0x2, %rcx
jb 0x1d177
cmpq $0x19, %rax
je 0x1d177
cmpq $0x21, %rax
jne 0x1d145
movb $0x0, 0x70(%r14)
jmp 0x1d177
andq $-0x2, %rax
cmpq $0x4, %rax
je 0x1d177
movq 0x28(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1d177
movl 0x128(%r14,%r12,8), %ecx
movq 0x10(%rsp), %rdi
leaq 0xf4be4(%rip), %rsi     # 0x111d48
movq %r15, %rdx
movq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0xe9b27
incq 0x68(%r14)
incq %r12
movslq 0x120(%r14), %rax
cmpq %rax, %r12
jl 0x1d111
jmp 0x1c916
movups 0x38(%r14), %xmm0
movups %xmm0, 0x28(%r14)
jmp 0x1c916
cmpb $0x0, 0x208(%r14,%rdx)
jne 0x1c916
cmpb $0x72, %bpl
jne 0x1d5b1
movq 0x10(%rsp), %rdi
leaq 0xf4ace(%rip), %rsi     # 0x111c8d
leaq 0xf4aaf(%rip), %rcx     # 0x111c75
movq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0xe9b27
jmp 0x1c916
movq 0x28(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1c916
movq 0x10(%rsp), %rdi
leaq 0xf4be9(%rip), %rsi     # 0x111ddb
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0xe9b27
movq 0x28(%rsp), %rax
incq (%rax)
jmp 0x1c916
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1d997
cmpl $0x0, 0x120(%r14)
jle 0x1d230
movq 0x128(%r14), %rbx
movq 0x30(%rsp), %rax
addq %rbx, (%rax)
jmp 0x1c916
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d997
cmpl $0x0, 0x120(%r14)
movl $0x0, %ebx
jle 0x1d25f
movq 0x128(%r14), %rbx
movq 0x10(%r14), %rax
cmpq $0x0, 0x8(%rax)
jle 0x1d2ee
xorl %r15d, %r15d
movq 0x10(%r14), %rsi
cmpq $0x0, (%rsi)
jle 0x1d2e1
xorl %r12d, %r12d
cmpq $0x1, %rbx
je 0x1d29d
testq %rbx, %rbx
jne 0x1d2af
cmpq 0x30(%r14), %r15
jl 0x1d2d5
jne 0x1d2af
movq 0x30(%rsp), %rax
cmpq (%rax), %r12
jge 0x1d2af
jmp 0x1d2d5
cmpq 0x30(%r14), %r15
jg 0x1d2d5
jne 0x1d2af
movq 0x30(%rsp), %rax
cmpq (%rax), %r12
jg 0x1d2d5
movq 0x10(%rsp), %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1d8bb
testq %rax, %rax
je 0x1d2d5
movl $0x0, 0x10(%rax)
movaps 0xf475e(%rip), %xmm0    # 0x111a30
movups %xmm0, (%rax)
incq %r12
movq 0x10(%r14), %rsi
cmpq (%rsi), %r12
jl 0x1d27e
incq %r15
movq 0x10(%r14), %rax
cmpq 0x8(%rax), %r15
jl 0x1d271
cmpq $0x2, %rbx
jne 0x1c916
xorps %xmm0, %xmm0
movq 0x30(%rsp), %rax
movups %xmm0, (%rax)
jmp 0x1c916
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1d997
cmpl $0x0, 0x120(%r14)
jle 0x1d32d
movq 0x128(%r14), %rbx
addq %rbx, 0x30(%r14)
jmp 0x1c916
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x1d997
cmpl $0x0, 0x120(%r14)
jle 0x1d35b
movq 0x128(%r14), %rbx
movq 0x30(%rsp), %rcx
movq (%rcx), %rax
subq %rbx, %rax
testq %rax, %rax
movl $0x0, %edx
cmovleq %rdx, %rax
movq %rax, (%rcx)
jmp 0x1c916
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1d997
cmpl $0x0, 0x120(%r14)
movl $0x0, %ebx
jle 0x1d39c
movq 0x128(%r14), %rbx
movq 0x10(%r14), %rsi
cmpq $0x0, (%rsi)
jle 0x1c916
xorl %r15d, %r15d
cmpq $0x1, %rbx
je 0x1d3c9
testq %rbx, %rbx
movq 0x10(%rsp), %rdi
jne 0x1d3d8
movq 0x30(%rsp), %rax
cmpq (%rax), %r15
jge 0x1d3d8
jmp 0x1d3fa
movq 0x30(%rsp), %rax
cmpq (%rax), %r15
movq 0x10(%rsp), %rdi
jg 0x1d3fa
movq 0x30(%r14), %rcx
movq %r15, %rdx
callq 0x1d8bb
testq %rax, %rax
je 0x1d3fa
movl $0x0, 0x10(%rax)
movaps 0xf4639(%rip), %xmm0    # 0x111a30
movups %xmm0, (%rax)
incq %r15
movq 0x10(%r14), %rsi
cmpq (%rsi), %r15
jl 0x1d3ad
jmp 0x1c916
xorl %ebx, %ebx
jmp 0x1d414
movq 0x10(%rsp), %r12
movq %rbp, %rsi
jmp 0x1cc6d
movl $0x1, 0x60(%r14)
jmp 0x1ccf4
movl $0x0, 0x60(%r14)
jmp 0x1ccf4
xorl %ebx, %ebx
movq 0x128(%r14,%rbx,8), %rdx
cmpq $0x4, %rdx
je 0x1d474
cmpq $0x1, %rdx
je 0x1d46d
testq %rdx, %rdx
jne 0x1d47b
movq 0x38(%rsp), %rax
movw $0x0, 0x8(%rax)
movq $0x0, (%rax)
movl $0x7, 0x48(%r14)
jmp 0x1d48a
movb $0x1, 0x50(%r14)
jmp 0x1d48a
movb $0x1, 0x51(%r14)
jmp 0x1d48a
leaq -0x5(%rdx), %rax
cmpq $0x1, %rax
ja 0x1d49e
movb $0x1, 0x52(%r14)
incq %rbx
movslq 0x120(%r14), %rax
cmpq %rax, %rbx
jl 0x1d438
jmp 0x1c916
cmpq $0x15, %rdx
jle 0x1d4c5
leaq -0x16(%rdx), %rax
cmpq $0x7, %rax
ja 0x1d512
leaq 0xf4627(%rip), %rcx     # 0x111adc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, 0x50(%r14)
jmp 0x1d48a
cmpq $0x7, %rdx
je 0x1d501
cmpq $0x8, %rdx
je 0x1d508
cmpq $0x9, %rdx
jne 0x1d512
movb $0x1, 0x55(%r14)
jmp 0x1d48a
movb $0x0, 0x54(%r14)
jmp 0x1d48a
movb $0x0, 0x52(%r14)
jmp 0x1d48a
movb $0x0, 0x53(%r14)
jmp 0x1d48a
movb $0x0, 0x51(%r14)
jmp 0x1d48a
movb $0x0, 0x55(%r14)
jmp 0x1d48a
movb $0x1, 0x53(%r14)
jmp 0x1d48a
movb $0x1, 0x54(%r14)
jmp 0x1d48a
leaq -0x1e(%rdx), %rax
cmpq $0x7, %rax
ja 0x1d528
addl $-0x1e, %edx
movl %edx, 0x48(%r14)
jmp 0x1d48a
cmpq $0x27, %rdx
je 0x1d463
movq %rdx, %rax
andq $-0x8, %rax
cmpq $0x28, %rax
jne 0x1d54e
addl $-0x28, %edx
movq 0x38(%rsp), %rax
movl %edx, (%rax)
jmp 0x1d48a
cmpq $0x31, %rdx
jne 0x1d564
movq 0x38(%rsp), %rax
movl $0x0, (%rax)
jmp 0x1d48a
leaq -0x5a(%rdx), %rax
cmpq $0x7, %rax
ja 0x1d573
addl $-0x52, %edx
jmp 0x1d51f
leaq -0x64(%rdx), %rax
cmpq $0x7, %rax
ja 0x1d582
addl $-0x5c, %edx
jmp 0x1d542
movq 0x28(%rsp), %rax
cmpq $0x9, (%rax)
jg 0x1d48a
movq 0x10(%rsp), %rdi
leaq 0xf47da(%rip), %rsi     # 0x111d77
xorl %eax, %eax
callq 0xe9b27
movq 0x28(%rsp), %rax
incq (%rax)
jmp 0x1d48a
cmpb $0x70, %bpl
setb %al
cmpb $0x7f, %bpl
sete %cl
orb %al, %cl
movq 0x10(%rsp), %rdi
jne 0x1d5f2
leaq 0xf46ec(%rip), %rsi     # 0x111cbb
jmp 0x1d5f9
movb 0x52(%r14), %cl
jmp 0x1ceea
movq 0x10(%rsp), %rdi
leaq 0xf47ad(%rip), %rsi     # 0x111d93
xorl %eax, %eax
callq 0xe9b27
jmp 0x1c916
leaq 0xf46f7(%rip), %rsi     # 0x111cf0
jmp 0x1c90a
cmpl $0x0, (%r14)
jne 0x1c916
movl 0x138(%r14), %edx
movl 0x140(%r14), %ecx
movzbl 0x148(%r14), %esi
shll $0x10, %edx
shll $0x8, %ecx
movzwl %cx, %ecx
orl %edx, %ecx
orl %esi, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
cmpq $0x30, %rax
jne 0x1d643
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1c916
movl %ecx, 0x48(%r14)
jmp 0x1c916
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
jmp 0x1c916
movq 0x10(%r14), %rsi
cmpq $0x0, 0x8(%rsi)
movq 0x70(%rsp), %rbx
jle 0x1d71b
xorl %eax, %eax
movq 0x18(%r14), %rcx
movzbl (%rcx,%rax), %ecx
testl %ecx, %ecx
je 0x1d702
movq 0x10(%rsi), %rdx
movq (%rdx,%rax,8), %rdx
testq %rdx, %rdx
je 0x1d71b
movq (%rsi), %rsi
testq %rsi, %rsi
jle 0x1d702
leaq (%rsi,%rsi,4), %rdi
decq %rsi
leaq (%rdx,%rdi,4), %rdi
decq %rdi
movq %rsi, %r8
subq $0x1, %r8
jb 0x1d6ca
movq %rsi, %r9
shrq %r9
leaq (%r9,%r9,4), %r9
movl 0x10(%rdx,%r9,4), %r10d
movl %r10d, -0x3(%rdi)
movups (%rdx,%r9,4), %xmm0
movups %xmm0, -0x13(%rdi)
movb $0x0, (%rdi)
cmpl $0x1, %ecx
je 0x1d6dc
cmpl $0x2, %ecx
jne 0x1d6e2
movb $0x20, %r9b
jmp 0x1d6df
movb $0x10, %r9b
movb %r9b, (%rdi)
andb $0x1, %sil
shlb $0x2, %sil
addb $0x4, %sil
orb %sil, (%rdi)
leaq 0x2(%r8), %r9
addq $-0x14, %rdi
movq %r8, %rsi
cmpq $0x1, %r9
jg 0x1d6a8
cmpq $0x1386, %rax           # imm = 0x1386
ja 0x1d71b
incq %rax
movq 0x10(%r14), %rsi
cmpq 0x8(%rsi), %rax
jl 0x1d66e
cmpb $0x0, 0x72(%r14)
movq 0x68(%rsp), %r15
je 0x1d72c
movb $0x1, 0x3(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0xf455b
movq %r12, %rdi
movq %r15, %rsi
callq 0xf44c8
movq 0x18(%r14), %rsi
movq %r12, %rdi
callq 0xe9752
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf84fe
movq %r12, %rdi
movq %r14, %rsi
callq 0xe9752
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq