// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/pcx.c
// Function: de_run_pcx_internal
static void de_run_pcx_internal(deark *c, lctx *d, de_module_params *mparams)
{
	const char *s;

	s = de_get_ext_option(c, "pcx:pal");
	if(s) {
		d->default_pal_num = de_atoi(s);
		if(d->default_pal_num<0 || d->default_pal_num>1) {
			d->default_pal_num = 0;
		}
		d->default_pal_set = 1;
	}

	d->resmode = RESMODE_AUTO;
	s = de_get_ext_option(c, "pcx:resmode");
	if(s) {
		if(!de_strcmp(s, "auto")) {
			d->resmode = RESMODE_AUTO;
		}
		else if(!de_strcmp(s, "dpi")) {
			d->resmode = RESMODE_DPI;
		}
		else if(!de_strcmp(s, "screen")) {
			d->resmode = RESMODE_SCREENDIMENSIONS;
		}
	}

	d->fi = de_finfo_create(c);

	if(!do_read_header(c, d)) {
		goto done;
	}

	do_palette_stuff(c, d);

	if(d->encoding==0) {
		// Uncompressed PCXs are probably not standard, but support for them is not
		// uncommon. Imagemagick, for example, will create them if you ask it to.
		de_dbg(c, "uncompressed bitmap at %d", (int)PCX_HDRSIZE);
		d->unc_pixels = dbuf_open_input_subfile(c->infile,
			PCX_HDRSIZE, c->infile->len-PCX_HDRSIZE);
	}
	else {
		if(!do_uncompress(c, d)) {
			goto done;
		}
	}
	dbuf_flush(d->unc_pixels);

	do_bitmap(c, d);

done:
	dbuf_close(d->unc_pixels);
	d->unc_pixels = NULL;
	de_finfo_destroy(c, d->fi);
	d->fi = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x85752(%rip), %rsi     # 0x13629b
callq 0xe9b74
testq %rax, %rax
je 0xb0b73
movq %rax, %rdi
callq 0xe9c2a
xorl %ecx, %ecx
cmpl $0x2, %eax
cmovbl %eax, %ecx
movl %ecx, 0x9c(%rbx)
movl $0x1, 0xa0(%rbx)
movl $0x1, 0x4(%rbx)
leaq 0x85722(%rip), %rsi     # 0x1362a3
movq %r14, %rdi
callq 0xe9b74
testq %rax, %rax
je 0xb0be0
movq %rax, %r15
leaq 0x5f9df(%rip), %rsi     # 0x110577
movq %rax, %rdi
callq 0x181a0
testl %eax, %eax
je 0xb0bd1
leaq 0x909bc(%rip), %rsi     # 0x141567
movq %r15, %rdi
callq 0x181a0
testl %eax, %eax
je 0xb0bd8
leaq 0x7f7a8(%rip), %rsi     # 0x130366
movq %r15, %rdi
callq 0x181a0
testl %eax, %eax
jne 0xb0be0
movl $0x3, %eax
jmp 0xb0bdd
movl $0x1, %eax
jmp 0xb0bdd
movl $0x2, %eax
movl %eax, 0x4(%rbx)
movq %r14, %rdi
callq 0xea504
movq %rax, 0xb0(%rbx)
leaq 0x30(%rsp), %r15
movq $0x0, (%r15)
leaq 0x7277d(%rip), %rsi     # 0x12337f
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movl %eax, %ebp
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movb %al, (%rbx)
xorb $-0x15, %bpl
orb 0x90(%rbx), %bpl
movl %eax, %ecx
xorb $0xe, %cl
orb %bpl, %cl
jne 0xb0c58
movb $0x1, 0x91(%rbx)
movb $0x5, (%rbx)
movb $0x5, %al
movzbl %al, %edx
leaq 0x634b5(%rip), %rsi     # 0x114117
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
cmpb $0x0, 0x90(%rbx)
je 0xb0c7e
leaq 0x8564d(%rip), %rsi     # 0x1362c9
jmp 0xb0c97
cmpb $0x0, 0x91(%rbx)
leaq 0x79b2a(%rip), %rax     # 0x12a7b6
leaq 0x85652(%rip), %rsi     # 0x1362e5
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0xeb125
movq 0x18(%r14), %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0xeeb4b
movb %al, 0x1(%rbx)
movzbl %al, %edx
leaq 0x8563d(%rip), %rsi     # 0x1362fa
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rdx, 0x8(%rbx)
leaq 0x9b178(%rip), %rsi     # 0x14be59
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
cmpq $0x0, 0x8(%rbx)
jg 0xb0cfa
movq $0x1, 0x8(%rbx)
movq 0x18(%r14), %rdi
leaq 0x30(%rsp), %r13
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x18(%rbx)
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x20(%rbx)
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x28(%rbx)
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x30(%rbx)
movl 0x18(%rbx), %edx
movl 0x20(%rbx), %ecx
movl 0x28(%rbx), %r8d
leaq 0x855b7(%rip), %rsi     # 0x136307
movq %r14, %rdi
movl %eax, %r9d
xorl %eax, %eax
callq 0xe8617
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
subq 0x18(%rbx), %rsi
incq %rsi
movq %rsi, 0x70(%rbx)
subq 0x20(%rbx), %rdx
incq %rdx
movq %rdx, 0x88(%rbx)
movq %r14, %rdi
callq 0xe8f88
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, %r12
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, %r15
leaq 0x85574(%rip), %rsi     # 0x13631f
movq %r14, %rdi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe8617
movq $0x40, (%r13)
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeeb4b
movb %al, 0x6c(%rbx)
movzbl %al, %edx
leaq 0x85556(%rip), %rsi     # 0x136332
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %rdx, 0x48(%rbx)
leaq 0x8a6af(%rip), %rsi     # 0x13b4af
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x50(%rbx)
leaq 0x8551f(%rip), %rsi     # 0x136340
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %edx
movl %edx, 0x68(%rbx)
incq (%r13)
leaq 0x8550a(%rip), %rsi     # 0x136354
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
cmpb $0x5, (%rbx)
jb 0xb0ec4
movq 0x18(%r14), %rdi
leaq 0x30(%rsp), %r13
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x38(%rbx)
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeebeb
movq %rax, 0x40(%rbx)
movq 0x38(%rbx), %rdx
cmpq $0x140, %rdx            # imm = 0x140
setl %cl
cmpq $0xc8, %rax
setl %sil
orb %cl, %sil
jne 0xb0eb6
movl $0x1001, %ecx           # imm = 0x1001
cmpq %rcx, %rdx
setae %sil
cmpq %rcx, %rax
setae %cl
orb %sil, %cl
je 0xb1009
leaq 0x38(%rbx), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
jmp 0xb0ee4
movq 0x38(%rbx), %rdx
testq %rdx, %rdx
je 0xb0ee4
movq 0x40(%rbx), %rax
leaq 0x8548d(%rip), %rsi     # 0x136365
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xe8617
movq 0x50(%rbx), %rax
movq 0x70(%rbx), %rcx
shlq $0x3, %rax
cqto
idivq 0x8(%rbx)
movq %rax, 0x78(%rbx)
movq %rcx, 0x80(%rbx)
cmpb $0x0, 0xd6(%r14)
je 0xb0f12
cmpq %rcx, %rax
jg 0xb0f43
jmp 0xb0f4d
testq %rcx, %rcx
setle %dl
testq %rax, %rax
setg %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xb0f4d
leaq 0x8544a(%rip), %rsi     # 0x136379
movq %r14, %rdi
movq %rcx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8faa
movq 0x78(%rbx), %rax
movq %rax, 0x80(%rbx)
movq %rax, %rcx
movq 0x88(%rbx), %rdx
movq %r14, %rdi
movq %rcx, %rsi
callq 0xf1db1
testl %eax, %eax
je 0xb1094
movq 0x48(%rbx), %rdx
imulq 0x50(%rbx), %rdx
movq %rdx, 0x58(%rbx)
leaq 0x85423(%rip), %rsi     # 0x13639e
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x8(%rbx), %rdx
movq 0x48(%rbx), %rcx
movq %rcx, %rax
imulq %rdx, %rax
movq %rax, 0x10(%rbx)
movzbl 0x1(%rbx), %eax
cmpl $0x2, %eax
jae 0xb0ff1
cmpq $0x4, %rcx
je 0xb105f
cmpq $0x3, %rcx
je 0xb103b
cmpq $0x1, %rcx
jne 0xb1083
leaq -0x1(%rdx), %rax
cmpq $0x7, %rax
ja 0xb1083
leaq 0x851bc(%rip), %rsi     # 0x136190
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movq $0x2, 0x60(%rbx)
leaq 0x853cb(%rip), %rdx     # 0x1363b7
jmp 0xb113c
leaq 0x6b3d3(%rip), %rsi     # 0x11c3cb
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9295
jmp 0xb1094
movl %edx, %ecx
andl $0x7, %ecx
movl %eax, %esi
andl $0x1, %esi
orq %rcx, %rsi
jne 0xb0eb6
leaq (%rax,%rax,4), %rcx
cmpq %rdx, %rcx
jb 0xb0eb6
leaq (%rdx,%rdx,2), %rcx
cmpq %rax, %rcx
jae 0xb0ed1
jmp 0xb0eb6
cmpq $0x8, %rdx
je 0xb10df
cmpq $0x1, %rdx
jne 0xb1083
movq $0x8, 0x60(%rbx)
leaq 0x85380(%rip), %rdx     # 0x1363da
jmp 0xb113c
cmpq $0x8, %rdx
je 0xb10f0
cmpq $0x1, %rdx
jne 0xb1083
movq $0x10, 0x60(%rbx)
leaq 0x85364(%rip), %rdx     # 0x1363e2
jmp 0xb113c
leaq 0x8537b(%rip), %rsi     # 0x136405
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r14, %r15
movq 0xa8(%rbx), %rdi
callq 0xf052b
xorl %r14d, %r14d
movq %r14, 0xa8(%rbx)
movq 0xb0(%rbx), %rsi
movq %r15, %rdi
callq 0xea50e
movq %r14, 0xb0(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x1000000, 0x60(%rbx)  # imm = 0x1000000
leaq 0x852fd(%rip), %rdx     # 0x1363eb
jmp 0xb113c
movq $0x1000000, 0x60(%rbx)  # imm = 0x1000000
movl $0x1, 0x98(%rbx)
leaq 0x852ec(%rip), %rdx     # 0x1363f5
jmp 0xb113c
movq $0x10, 0x60(%rbx)
leaq 0x852ad(%rip), %rdx     # 0x1363c7
jmp 0xb113c
movq $0x4, 0x60(%rbx)
leaq 0x85294(%rip), %rdx     # 0x1363bf
jmp 0xb113c
movq $0x100, 0x60(%rbx)      # imm = 0x100
leaq 0x84c7b(%rip), %rdx     # 0x135db7
leaq 0x7f49d(%rip), %rsi     # 0x1305e0
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
testq %r12, %r12
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0xb1388
movl 0x4(%rbx), %eax
cmpl $0x3, %eax
je 0xb1227
cmpl $0x2, %eax
je 0xb135a
cmpl $0x1, %eax
jne 0xb1388
movq %r12, %rax
xorq $0x140, %rax            # imm = 0x140
movq %r15, %rcx
xorq $0xc8, %rcx
orq %rax, %rcx
je 0xb11f8
cmpq $0xc8, %r15
sete %al
cmpq $0x1e0, %r15            # imm = 0x1E0
sete %cl
cmpq $0x15e, %r15            # imm = 0x15E
sete %dl
cmpq $0x280, %r12            # imm = 0x280
jne 0xb11c4
orb %dl, %cl
orb %cl, %al
jne 0xb11f8
movq %r12, %rax
xorq $0x320, %rax            # imm = 0x320
movq %r15, %rcx
xorq $0x258, %rcx            # imm = 0x258
orq %rax, %rcx
je 0xb11f8
movq %r12, %rax
xorq $0x400, %rax            # imm = 0x400
movq %r15, %rcx
xorq $0x300, %rcx            # imm = 0x300
orq %rax, %rcx
jne 0xb1332
cmpq %r12, 0x70(%rbx)
jg 0xb1388
cmpq %r12, 0x88(%rbx)
jg 0xb1388
movq 0xb0(%rbx), %rsi
movl $0x1, 0x78(%rsi)
leaq (%r12,%r12,2), %rax
shlq $0x2, %r15
jmp 0xb1249
movq 0xb0(%rbx), %rsi
movl $0x1, 0x78(%rsi)
leaq (%r12,%r12,2), %rax
shlq $0x2, %r15
testq %r12, %r12
movq %rax, %r12
jle 0xb1368
movq %rax, %r12
cmpq $0x3, %r15
jl 0xb1277
movl %r15d, %eax
orl %r12d, %eax
andl $0x1, %eax
jne 0xb1277
movq %r12, %rax
shrq %rax
shrq %r15
cmpq $0x5, %r12
movq %rax, %r12
ja 0xb124c
movq %rax, %r12
jmp 0xb1368
cmpq $0x4, %r12
jb 0xb12c9
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
movq %r12, %rax
mulq %rdi
movq %rdx, %rcx
movq %r15, %rax
mulq %rdi
cmpq $0x4, %r15
jl 0xb12d4
shrq %rcx
leaq (%rcx,%rcx,2), %rax
movq %r12, %r8
subq %rax, %r8
shrq %rdx
leaq (%rdx,%rdx,2), %rax
movq %r15, %r9
subq %rax, %r9
orq %r8, %r9
jne 0xb12d4
movq %rdx, %r15
cmpq $0xb, %r12
movq %rcx, %r12
ja 0xb1287
jmp 0xb132a
movl $0x3, %r12d
jmp 0xb1368
cmpq $0x6, %r12
jb 0xb1368
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
movq %r12, %rax
mulq %rdi
movq %rdx, %rcx
movq %r15, %rax
mulq %rdi
cmpq $0x6, %r15
jl 0xb1368
shrq $0x2, %rcx
leaq (%rcx,%rcx,4), %rax
movq %r12, %r8
subq %rax, %r8
shrq $0x2, %rdx
leaq (%rdx,%rdx,4), %rax
movq %r15, %r9
subq %rax, %r9
orq %r8, %r9
jne 0xb1368
movq %rdx, %r15
cmpq $0x1d, %r12
movq %rcx, %r12
ja 0xb12e8
movq %rcx, %r12
movq %rdx, %r15
jmp 0xb1368
cmpq %r12, 0x70(%rbx)
jne 0xb1341
cmpq %r15, 0x88(%rbx)
je 0xb1388
cmpq %r15, %r12
setne %al
leaq -0x32(%r12), %rcx
cmpq $0x227, %rcx            # imm = 0x227
setae %cl
orb %al, %cl
jne 0xb1388
movq 0xb0(%rbx), %rsi
movl $0x2, 0x78(%rsi)
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
movsd %xmm0, 0x80(%rsi)
xorps %xmm0, %xmm0
cvtsi2sd %r15, %xmm0
movsd %xmm0, 0x88(%rsi)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
cmpq $0x100, 0x60(%rbx)      # imm = 0x100
movq %r14, 0x18(%rsp)
jg 0xb1812
jne 0xb1408
movdqa 0x84dbe(%rip), %xmm0    # 0x136170
xorl %eax, %eax
movdqa 0x84dc4(%rip), %xmm1    # 0x136180
movdqa 0x5f9bc(%rip), %xmm2    # 0x110d80
movdqa 0x66454(%rip), %xmm3    # 0x117820
movdqa %xmm0, %xmm4
pmuludq %xmm1, %xmm4
pshufd $0xe8, %xmm4, %xmm4     # xmm4 = xmm4[0,2,2,3]
pshufd $0xf5, %xmm0, %xmm5     # xmm5 = xmm0[1,1,3,3]
pmuludq %xmm1, %xmm5
pshufd $0xe8, %xmm5, %xmm5     # xmm5 = xmm5[0,2,2,3]
punpckldq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
paddd %xmm2, %xmm4
movdqu %xmm4, 0xb8(%rbx,%rax,4)
addq $0x4, %rax
paddd %xmm3, %xmm0
cmpq $0x100, %rax            # imm = 0x100
jne 0xb13cc
leaq 0x5f16d(%rip), %rsi     # 0x11057c
movq %r14, %rdi
callq 0xe9b74
testq %rax, %rax
je 0xb1585
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xf1114
testq %rax, %rax
je 0xb1585
movq %rax, %r12
movq %r15, 0x20(%rsp)
leaq 0x8514c(%rip), %rsi     # 0x136592
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x60(%rbx), %rax
leaq (%rax,%rax,2), %rax
xorl %ebp, %ebp
cmpq %rax, 0x18(%r12)
setne %bpl
movq %r14, %rdi
movl $0x1, %r14d
movl $0x1, %esi
callq 0xe8a15
cmpq $0x0, 0x60(%rbx)
jle 0xb154c
xorl %r13d, %r13d
leaq (,%r13,2), %rdx
addq %r13, %rdx
cmpq 0x18(%r12), %rdx
jge 0xb154c
movl $0x3, %ecx
movq %r12, %rdi
leaq 0x12(%rsp), %rsi
callq 0xee8d4
xorl %r15d, %r15d
movzbl 0x12(%rsp,%r15), %edi
cmpl $0x40, %edi
cmovael %r14d, %ebp
callq 0xec78a
movb %al, 0x15(%rsp,%r15)
incq %r15
cmpq $0x3, %r15
jne 0xb14af
movzbl 0x15(%rsp), %eax
shll $0x10, %eax
movzbl 0x16(%rsp), %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x17(%rsp), %eax
orl %ecx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, 0xb8(%rbx,%r13,4)
movzbl 0x12(%rsp), %ecx
movzbl 0x13(%rsp), %r8d
movzbl 0x14(%rsp), %r9d
movl $0x40, %esi
leaq 0x30(%rsp), %r15
movq %r15, %rdi
leaq 0x5fa7e(%rip), %rdx     # 0x110f98
xorl %eax, %eax
callq 0xe8193
movl 0xb8(%rbx,%r13,4), %edx
movq 0x18(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe90a3
incq %r13
cmpq 0x60(%rbx), %r13
jl 0xb1484
movq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testl %ebp, %ebp
je 0xb1578
leaq 0x8504a(%rip), %rsi     # 0x1365b3
movq %r14, %rdi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0xe8faa
movq %r12, %rdi
callq 0xf052b
jmp 0xb1812
xorl %edi, %edi
callq 0xf052b
movq 0x60(%rbx), %rdx
cmpq $0x2, %rdx
je 0xb1812
movb (%rbx), %al
cmpb $0x3, %al
setne %cl
leaq -0x8(%rdx), %rsi
cmpq $0x9, %rsi
setae %sil
orb %cl, %sil
jne 0xb1623
cmpl $0x0, 0xa0(%rbx)
jne 0xb15cc
leaq 0x84e6f(%rip), %rsi     # 0x136431
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9393
leaq 0x84ecd(%rip), %rsi     # 0x1364a0
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
leaq 0xb8(%rbx), %rcx
cmpl $0x1, 0x9c(%rbx)
jne 0xb16c2
movaps 0x84be8(%rip), %xmm0    # 0x1361e0
movups %xmm0, 0x30(%rcx)
movaps 0x84bcd(%rip), %xmm0    # 0x1361d0
movups %xmm0, 0x20(%rcx)
movaps 0x84bb2(%rip), %xmm0    # 0x1361c0
movups %xmm0, 0x10(%rcx)
movapd 0x84b96(%rip), %xmm0    # 0x1361b0
movupd %xmm0, (%rcx)
jmp 0xb1812
cmpb $0x5, %al
setb %al
cmpq $0x100, %rdx            # imm = 0x100
setne %cl
orb %al, %cl
jne 0xb16d9
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %r15
cmpq $0x381, %r15            # imm = 0x381
jl 0xb178b
leaq -0x301(%r15), %r12
movq %r12, %rsi
callq 0xeead3
cmpb $0xc, %al
jne 0xb178b
leaq 0x84f7a(%rip), %rsi     # 0x1365e7
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe8617
movl $0x1, 0x94(%rbx)
addq $-0x300, %r15           # imm = 0xFD00
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r14), %rdi
leaq 0xb8(%rbx), %r8
movl $0x0, (%rsp)
movl $0x100, %edx            # imm = 0x100
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
movq %r15, %rsi
jmp 0xb1800
movl $0x10, %r8d
movl $0x32, %edi
movl $0x2, %esi
xorl %edx, %edx
jmp 0xb177e
cmpq $0x4, %rdx
jne 0xb179e
leaq 0x84df5(%rip), %rsi     # 0x1364df
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8faa
movq 0x18(%r14), %rdi
movl $0x10, %esi
callq 0xeead3
movl %eax, %ebp
movq 0x18(%r14), %rdi
movl $0x13, %esi
callq 0xeead3
shrb $0x4, %bpl
movzbl %bpl, %r15d
shrb $0x5, %al
movzbl %al, %ebp
leaq 0x84dec(%rip), %rsi     # 0x136513
movq %r14, %rdi
movl %ebp, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe8617
movl $0x14, %edi
xorl %esi, %esi
movl %r15d, %edx
callq 0xec464
movl %eax, 0xb8(%rbx)
decb %bpl
movl $0x2, %esi
cmpb $0x6, %bpl
ja 0xb1767
movzbl %bpl, %eax
leaq 0x84aa4(%rip), %rcx     # 0x136208
movl (%rcx,%rax,4), %esi
leaq 0xbc(%rbx), %rcx
movl $0x1, %edx
movl $0x3, %r8d
movl $0xa, %edi
xorl %r9d, %r9d
callq 0xec55a
jmp 0xb1812
leaq 0x84d2a(%rip), %rsi     # 0x1364bc
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8faa
jmp 0xb1812
leaq -0x11(%rdx), %rax
cmpq $0xef, %rax
ja 0xb17bb
leaq 0x84d92(%rip), %rsi     # 0x136543
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8faa
leaq 0x84dad(%rip), %rsi     # 0x13656f
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r14), %rdi
leaq 0xb8(%rbx), %r8
movl $0x0, (%rsp)
movl $0x10, %esi
movl $0x10, %edx
movl $0x3, %ecx
movl $0x100, %r9d            # imm = 0x100
callq 0xf2c4e
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
cmpb $0x0, 0x1(%rbx)
je 0xb193a
leaq 0x84dd7(%rip), %rsi     # 0x1365fa
movl $0x80, %r12d
movl $0x80, %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x88(%rbx), %rbp
imulq 0x58(%rbx), %rbp
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xf09c5
movq %rax, 0xa8(%rbx)
movq %rax, %rdi
callq 0xf0855
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x94(%rbx)
leaq -0x301(%rax), %r14
cmoveq %rax, %r14
cmpq $0x81, %r14
jl 0xb18fd
movq %r14, 0x20(%rsp)
movq 0x18(%rsp), %r15
movq 0xa8(%rbx), %rax
cmpq %rbp, 0x18(%rax)
jge 0xb18fd
movq 0x18(%r15), %rdi
leaq 0x1(%r12), %r13
movq %r12, %rsi
callq 0xeead3
cmpb $-0x40, %al
jb 0xb18e6
andb $0x3f, %al
movq %rbp, %r14
movzbl %al, %ebp
movq 0x18(%r15), %rdi
addq $0x2, %r12
movq %r13, %rsi
callq 0xeead3
movq 0xa8(%rbx), %rdi
movzbl %al, %esi
movq %rbp, %rdx
movq %r14, %rbp
movq 0x20(%rsp), %r14
callq 0xf0eba
movq %r12, %r13
jmp 0xb18f8
movq 0xa8(%rbx), %rdi
movzbl %al, %esi
callq 0xf0bd6
movq %r13, %r12
cmpq %r14, %r13
jl 0xb188d
movq 0xa8(%rbx), %rdi
callq 0xf08ba
movq 0xa8(%rbx), %rdi
movq 0x18(%rdi), %rcx
cmpq %rbp, %rcx
movq 0x18(%rsp), %r14
jge 0xb1970
leaq 0x84cee(%rip), %rsi     # 0x136613
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8faa
movq 0xa8(%rbx), %rdi
jmp 0xb1970
leaq 0x8496e(%rip), %rsi     # 0x1362af
movq %r14, %rdi
movl $0x80, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq 0x18(%rdi), %rdx
addq $-0x80, %rdx
movl $0x80, %esi
callq 0xf1388
movq %rax, %rdi
movq %rax, 0xa8(%rbx)
callq 0xf08ba
movq 0x10(%rbx), %rdx
cmpq $0x1, %rdx
jne 0xb19ba
movq 0xa8(%rbx), %rdi
movq 0x50(%rbx), %r8
movq 0x80(%rbx), %rdx
movq 0x88(%rbx), %rcx
movq 0xb0(%rbx), %rax
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
xorl %esi, %esi
xorl %r9d, %r9d
callq 0xf2b5b
jmp 0xb10a1
cmpq $0x8, %rdx
jg 0xb1a18
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
movq %r14, %rdi
movl $0x3, %ecx
callq 0xf266a
movq %rax, %r15
movq 0x48(%rbx), %rdx
cmpq $0x1, %rdx
jne 0xb1b4a
movq 0xa8(%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0x58(%rbx), %rcx
leaq 0xb8(%rbx), %r8
movl $0x0, (%rsp)
xorl %esi, %esi
movq %r15, %r9
callq 0xf2f79
jmp 0xb1b7a
cmpq $0x18, %rdx
jb 0xb1ba0
movl $0xffffffff, 0x30(%rsp) # imm = 0xFFFFFFFF
movq 0x80(%rbx), %rsi
cmpl $0x1, 0x98(%rbx)
movq 0x88(%rbx), %rdx
movl $0x4, %ecx
sbbl $0x0, %ecx
movq %r14, %rdi
callq 0xf266a
movq %rax, 0x28(%rsp)
movq 0x88(%rbx), %rcx
testq %rcx, %rcx
jle 0xb1b2f
movq 0x80(%rbx), %rax
movb $-0x1, 0x20(%rsp)
xorl %r12d, %r12d
movb $-0x1, %r14b
movb $-0x1, %r15b
movb $-0x1, %bpl
testq %rax, %rax
jle 0xb1b23
xorl %r13d, %r13d
cmpq $0x0, 0x48(%rbx)
jle 0xb1ad9
xorl %r14d, %r14d
movq 0xa8(%rbx), %rdi
movq 0x58(%rbx), %rsi
imulq %r12, %rsi
movq 0x50(%rbx), %rax
imulq %r14, %rax
addq %r13, %rsi
addq %rax, %rsi
callq 0xeead3
movb %al, 0x30(%rsp,%r14)
incq %r14
cmpq 0x48(%rbx), %r14
jl 0xb1a92
movb 0x33(%rsp), %bpl
movb 0x30(%rsp), %r15b
movb 0x31(%rsp), %r14b
movb 0x32(%rsp), %al
movb %al, 0x20(%rsp)
movzbl %bpl, %eax
shll $0x18, %eax
movzbl %r15b, %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl %r14b, %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x20(%rsp), %ecx
orl %eax, %ecx
movq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xf24bf
incq %r13
movq 0x80(%rbx), %rax
cmpq %rax, %r13
jl 0xb1a88
movq 0x88(%rbx), %rcx
incq %r12
cmpq %rcx, %r12
jl 0xb1a7c
movq 0xb0(%rbx), %rsi
movq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0xf22d0
movq %r14, %rdi
jmp 0xb1b91
cmpq $0x1, 0x8(%rbx)
jne 0xb1b7a
movq 0xa8(%rbx), %rdi
movq 0x50(%rbx), %r8
movq 0x58(%rbx), %rcx
leaq 0xb8(%rbx), %r9
movq %r15, (%rsp)
movl $0x2, 0x8(%rsp)
xorl %esi, %esi
callq 0xf30b3
movq 0xb0(%rbx), %rsi
movq %r15, %rdi
movl $0x2, %edx
callq 0xf22d0
movq %r15, %rdi
callq 0xf228d
movq 0x18(%rsp), %r15
jmp 0xb10a4
leaq 0x61c90(%rip), %rsi     # 0x113837
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9295
jmp 0xb10a1
nop