// File: /workspace/github_c_makefile_star2_O3/albinoloverats[P]hide/src/jpeg-save.c
// Function: jpeg_encode_data
extern void jpeg_encode_data(FILE *file, jpeg_message_t *msg, jpeg_image_t *info)
{
	message = msg;

	bitstring fillbits; // filling bitstring for the bit alignment of the EOI marker

	Ximage = info->width;
	Yimage = info->height;

	uint32_t Xdiv8 = (Ximage % 8) ? ((Ximage / 8) << 3) + 8 : Ximage;
	uint32_t Ydiv8 = (Yimage % 8) ? ((Yimage / 8) << 3) + 8 : Yimage;

	// The image we encode shall be filled with the last line and the last column
	// from the original bitmap, until Ximage and Yimage are divisible by 8
	// Load BMP image from disk and complete X
	RGB_buffer = calloc(Xdiv8 * Ydiv8, sizeof (colorRGB));

	//uint8_t nr_fillingbytes = (Ximage % 4) ? 4 - (Ximage % 4) : 0;
	for (uint32_t nrline = 0; nrline < Yimage; nrline++)
		memcpy(RGB_buffer + nrline * Xdiv8, info->rgb[nrline], Ximage * 3);
	Ximage = Xdiv8;
	Yimage = Ydiv8;


	fp_jpeg_stream = file;
	init_all();
	SOF0info.width = info->width;
	SOF0info.height = info->height;
	writeword(0xFFD8); // SOI
	write_APP0info();

	write_DQTinfo();
	write_SOF0info();
	write_DHTinfo();
	write_SOSinfo();

	bytenew = 0;
	bytepos = 7;
	main_encoder();
	// Do the bit alignment of the EOI marker
	if (bytepos >= 0)
	{
		fillbits.length = bytepos + 1;
		fillbits.value = (1 << (bytepos + 1)) - 1;
		writebits(fillbits);
	}
	writeword(0xFFD9); //EOI
	free(RGB_buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x45c2(%rip)      # 0x7140
movl 0x8(%rdx), %r12d
movq %rdx, 0x10(%rsp)
movl 0xc(%rdx), %ebx
leal 0x7(%r12), %r15d
andl $-0x8, %r15d
leal 0x7(%rbx), %eax
andl $-0x8, %eax
movl %eax, 0x4(%rsp)
movl %eax, %edi
imull %r15d, %edi
movl $0x3, %esi
callq 0x10c0
movq %rax, 0x459c(%rip)      # 0x7150
testq %rbx, %rbx
je 0x2c01
movq %rbx, %rcx
movq %rax, %r13
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
leal (%r12,%r12,2), %r12d
xorl %r14d, %r14d
xorl %ebx, %ebx
movl %r14d, %eax
leaq (%rax,%rax,2), %rdi
addq %r13, %rdi
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdx
movq %rcx, %rbp
callq 0x1100
movq %rbp, %rcx
incq %rbx
addl %r15d, %r14d
cmpq %rbx, %rbp
jne 0x2bd5
movl %r15d, 0x4540(%rip)     # 0x7148
movl 0x4(%rsp), %eax
movl %eax, 0x453a(%rip)      # 0x714c
movq 0x18(%rsp), %rax
movq %rax, 0x453a(%rip)      # 0x7158
movl $0x84ffdb, 0x453e(%rip) # imm = 0x84FFDB
movb $0x0, 0x453b(%rip)      # 0x716a
movb $0x1, 0x4575(%rip)      # 0x71ab
xorl %eax, %eax
leaq 0x2681(%rip), %rcx      # 0x52c0
movabsq $0x103070f1f1f3f, %rdx  # imm = 0x103070F1F1F3F
movl $0x1, %esi
leaq 0x26ab(%rip), %r9       # 0x5300
leaq 0x450a(%rip), %rbx      # 0x7166
movzbl (%rax,%rcx), %edi
imull $0x290, %edi, %edi      # imm = 0x290
addl $0x8020, %edi           # imm = 0x8020
shrl $0x10, %edi
btq %rax, %rdx
cmovbl %esi, %edi
movzbl (%rax,%r9), %r8d
movb %dil, 0x5(%r8,%rbx)
incq %rax
cmpq $0x40, %rax
jne 0x2c5c
xorl %eax, %eax
leaq 0x26ae(%rip), %rcx      # 0x5340
movl $0x103070f, %edx        # imm = 0x103070F
movl $0x1, %esi
movzbl (%rax,%rcx), %edi
imull $0x290, %edi, %edi      # imm = 0x290
addl $0x8020, %edi           # imm = 0x8020
shrl $0x10, %edi
btq %rax, %rdx
cmovbl %esi, %edi
movzbl (%rax,%r9), %r8d
movb %dil, 0x46(%r8,%rbx)
incq %rax
cmpq $0x40, %rax
jne 0x2c9c
movl $0x1a2ffc4, 0x4519(%rip) # imm = 0x1A2FFC4
movb $0x0, 0x4516(%rip)      # 0x71f0
movups 0x26a0(%rip), %xmm0     # 0x5381
movups %xmm0, 0x4509(%rip)     # 0x71f1
movabsq $0x706050403020100, %r14 # imm = 0x706050403020100
movq %r14, 0x4508(%rip)      # 0x7201
movl $0xb0a0908, %ebp        # imm = 0xB0A0908
movl %ebp, 0x4505(%rip)      # 0x7209
movb $0x10, 0x4502(%rip)     # 0x720d
movups 0x268f(%rip), %xmm0     # 0x53a1
movups %xmm0, 0x44f5(%rip)     # 0x720e
leaq 0x44fe(%rip), %rdi      # 0x721e
leaq 0x2699(%rip), %r12      # 0x53c0
movl $0xa2, %edx
movq %r12, %rsi
callq 0x1100
movb $0x1, 0x4585(%rip)      # 0x72c0
movups 0x272f(%rip), %xmm0     # 0x5471
movups %xmm0, 0x4578(%rip)     # 0x72c1
movq %r14, 0x4581(%rip)      # 0x72d1
movl %ebp, 0x4583(%rip)      # 0x72d9
movb $0x11, 0x4580(%rip)     # 0x72dd
movups 0x272d(%rip), %xmm0     # 0x5491
movups %xmm0, 0x4573(%rip)     # 0x72de
leaq 0x457c(%rip), %rdi      # 0x72ee
leaq 0x2737(%rip), %r15      # 0x54b0
movl $0xa2, %edx
movq %r15, %rsi
callq 0x1100
xorl %ecx, %ecx
movl $0x1, %edx
leaq 0x25ec(%rip), %rsi      # 0x5380
leaq 0x26e6(%rip), %rax      # 0x5481
leaq 0x45ee(%rip), %rdi      # 0x7390
xorl %r8d, %r8d
leaq -0xa(%rdx), %r9
cmpq $-0x8, %r9
jb 0x2deb
movzbl (%rdx,%rsi), %r9d
movslq %ecx, %r10
cmpq $0x1, %r9
adcq $0x0, %r9
movzwl %r8w, %r14d
xorl %r11d, %r11d
leal (%r14,%r11), %ebp
leaq (%r10,%r11), %r13
movzbl (%rax,%r13), %r13d
movw %bp, 0x2(%rdi,%r13,4)
movb %dl, (%rdi,%r13,4)
incq %r11
cmpl %r11d, %r9d
jne 0x2dc6
addl %r11d, %ecx
addl %r11d, %r8d
incq %rdx
addl %r8d, %r8d
cmpq $0x11, %rdx
jne 0x2da5
xorl %ecx, %ecx
movl $0x1, %edx
leaq 0x266b(%rip), %rsi      # 0x5470
leaq 0x45b4(%rip), %rdi      # 0x73c0
xorl %r8d, %r8d
leaq -0xc(%rdx), %r9
cmpq $-0xa, %r9
jb 0x2e55
movzbl (%rdx,%rsi), %r9d
movslq %ecx, %r10
cmpq $0x1, %r9
adcq $0x0, %r9
movzwl %r8w, %r14d
xorl %r11d, %r11d
leal (%r14,%r11), %ebp
leaq (%r10,%r11), %r13
movzbl (%rax,%r13), %r13d
movw %bp, 0x2(%rdi,%r13,4)
movb %dl, (%rdi,%r13,4)
incq %r11
cmpl %r11d, %r9d
jne 0x2e30
addl %r11d, %ecx
addl %r11d, %r8d
incq %rdx
addl %r8d, %r8d
cmpq $0x11, %rdx
jne 0x2e0f
xorl %eax, %eax
movl $0x1, %ecx
movl $0x6003, %edx           # imm = 0x6003
leaq 0x252c(%rip), %rsi      # 0x53a0
leaq 0x4575(%rip), %rdi      # 0x73f0
xorl %r8d, %r8d
btq %rcx, %rdx
jb 0x2ec0
movzbl (%rcx,%rsi), %r9d
movslq %eax, %r10
cmpq $0x1, %r9
adcq $0x0, %r9
movzwl %r8w, %r14d
xorl %r11d, %r11d
leal (%r14,%r11), %ebp
leaq (%r10,%r11), %r13
movzbl (%r12,%r13), %r13d
movw %bp, 0x2(%rdi,%r13,4)
movb %cl, (%rdi,%r13,4)
incq %r11
cmpl %r11d, %r9d
jne 0x2e9b
addl %r11d, %eax
addl %r11d, %r8d
incq %rcx
addl %r8d, %r8d
cmpq $0x11, %rcx
jne 0x2e7e
xorl %eax, %eax
movl $0x1, %ecx
movl $0x2003, %edx           # imm = 0x2003
leaq 0x25b1(%rip), %rsi      # 0x5490
leaq 0x490a(%rip), %rdi      # 0x77f0
xorl %r8d, %r8d
btq %rcx, %rdx
jb 0x2f2b
movzbl (%rcx,%rsi), %r9d
movslq %eax, %r10
cmpq $0x1, %r9
adcq $0x0, %r9
movzwl %r8w, %r14d
xorl %r11d, %r11d
leal (%r14,%r11), %ebp
leaq (%r10,%r11), %r12
movzbl (%r15,%r12), %r12d
movw %bp, 0x2(%rdi,%r12,4)
movb %cl, (%rdi,%r12,4)
incq %r11
cmpl %r11d, %r9d
jne 0x2f06
addl %r11d, %eax
addl %r11d, %r8d
incq %rcx
addl %r8d, %r8d
cmpq $0x11, %rcx
jne 0x2ee9
leaq 0xccb1(%rip), %rax      # 0xfbef
movq %rax, 0x14cab(%rip)     # 0x17bf0
leaq 0x34cb0(%rip), %rax     # 0x37bfc
movq %rax, 0x54cad(%rip)     # 0x57c00
movl $0x2, %r15d
movl $0x1, %ebp
leaq 0x14c9b(%rip), %r13     # 0x17c00
movl $0x1, %r12d
cmpl %r15d, %r12d
jae 0x2fb3
movl %r12d, %r14d
leaq 0x4c76(%rip), %rax      # 0x7bf0
leaq (%r14,%rax), %rdi
addq $0x7fff, %rdi           # imm = 0x7FFF
movl %r12d, %edx
notl %edx
addl %r15d, %edx
incq %rdx
movl %ebp, %esi
callq 0x1090
movl %r15d, %eax
movb %bpl, 0x1fffc(%r13,%r14,4)
movw %r14w, 0x1fffe(%r13,%r14,4)
incq %r14
cmpq %r14, %rax
jne 0x2f9a
movl $0x1, %eax
subl %r15d, %eax
movl %r12d, %r14d
negl %r14d
cmpl %r14d, %eax
jg 0x301e
movl %r15d, %eax
negl %eax
cltq
leaq 0x4c1c(%rip), %rcx      # 0x7bf0
leaq (%rax,%rcx), %rdi
addq $0x8000, %rdi           # imm = 0x8000
movl %r12d, %edx
notl %edx
addl %r15d, %edx
incq %rdx
movl %ebp, %esi
callq 0x1090
movslq %r14d, %rax
movl %r15d, %edx
addq %rdx, %rax
shlq $0x2, %rdx
movq %r13, %rcx
subq %rdx, %rcx
addq $0x20002, %rcx          # imm = 0x20002
xorl %edx, %edx
movb %bpl, -0x2(%rcx,%rdx,4)
movw %dx, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x300d
addl %r12d, %r12d
addl %r15d, %r15d
incl %ebp
cmpl $0x10, %ebp
jne 0x2f6b
movapd 0x2179(%rip), %xmm0     # 0x51b0
xorl %eax, %eax
xorpd %xmm1, %xmm1
movapd 0x217b(%rip), %xmm2     # 0x51c0
movapd 0x2183(%rip), %xmm3     # 0x51d0
leaq 0x54bbc(%rip), %rbp     # 0x57c10
movapd 0x2184(%rip), %xmm4     # 0x51e0
leaq 0x54fad(%rip), %rcx     # 0x58010
leaq 0x553a6(%rip), %rdx     # 0x58410
movapd 0x217e(%rip), %xmm5     # 0x51f0
leaq 0x55797(%rip), %r12     # 0x58810
movapd 0x217f(%rip), %xmm6     # 0x5200
leaq 0x55b88(%rip), %rsi     # 0x58c10
movapd 0x2180(%rip), %xmm7     # 0x5210
leaq 0x55f79(%rip), %rdi     # 0x59010
movapd 0x2180(%rip), %xmm8     # 0x5220
leaq 0x56369(%rip), %r8      # 0x59410
leaq 0x56762(%rip), %r9      # 0x59810
movapd 0x2179(%rip), %xmm9     # 0x5230
leaq 0x56b52(%rip), %r10     # 0x59c10
movdqa 0x2179(%rip), %xmm10    # 0x5240
movapd %xmm0, %xmm11
unpckhps %xmm1, %xmm11           # xmm11 = xmm11[2],xmm1[2],xmm11[3],xmm1[3]
orpd %xmm2, %xmm11
subpd %xmm2, %xmm11
movapd %xmm0, %xmm12
unpcklps %xmm1, %xmm12           # xmm12 = xmm12[0],xmm1[0],xmm12[1],xmm1[1]
orpd %xmm2, %xmm12
subpd %xmm2, %xmm12
movapd %xmm12, %xmm13
mulpd %xmm3, %xmm13
movapd %xmm11, %xmm14
mulpd %xmm3, %xmm14
cvttpd2dq %xmm14, %xmm14
cvttpd2dq %xmm13, %xmm13
unpcklpd %xmm14, %xmm13          # xmm13 = xmm13[0],xmm14[0]
movapd %xmm13, (%rax,%rbp)
movapd %xmm12, %xmm13
movapd %xmm11, %xmm14
mulpd %xmm4, %xmm14
cvttpd2dq %xmm14, %xmm14
mulpd %xmm4, %xmm13
cvttpd2dq %xmm13, %xmm13
unpcklpd %xmm14, %xmm13          # xmm13 = xmm13[0],xmm14[0]
movapd %xmm13, (%rax,%rcx)
movapd %xmm0, %xmm13
pslld $0xf, %xmm13
movdqa %xmm13, (%rax,%rdx)
movapd %xmm12, %xmm14
mulpd %xmm5, %xmm14
movapd %xmm11, %xmm15
mulpd %xmm5, %xmm15
cvttpd2dq %xmm15, %xmm15
cvttpd2dq %xmm14, %xmm14
unpcklpd %xmm15, %xmm14          # xmm14 = xmm14[0],xmm15[0]
movapd %xmm14, (%rax,%r12)
movapd %xmm12, %xmm14
mulpd %xmm6, %xmm14
movapd %xmm11, %xmm15
mulpd %xmm6, %xmm15
cvttpd2dq %xmm15, %xmm15
cvttpd2dq %xmm14, %xmm14
unpcklpd %xmm15, %xmm14          # xmm14 = xmm14[0],xmm15[0]
movapd %xmm14, (%rax,%rsi)
movapd %xmm12, %xmm14
mulpd %xmm7, %xmm14
movapd %xmm11, %xmm15
mulpd %xmm7, %xmm15
cvttpd2dq %xmm15, %xmm15
cvttpd2dq %xmm14, %xmm14
unpcklpd %xmm15, %xmm14          # xmm14 = xmm14[0],xmm15[0]
movapd %xmm14, (%rax,%rdi)
movapd %xmm12, %xmm14
mulpd %xmm8, %xmm14
movapd %xmm11, %xmm15
mulpd %xmm8, %xmm15
cvttpd2dq %xmm15, %xmm15
cvttpd2dq %xmm14, %xmm14
unpcklpd %xmm15, %xmm14          # xmm14 = xmm14[0],xmm15[0]
movapd %xmm14, (%rax,%r8)
movdqa %xmm13, (%rax,%r9)
mulpd %xmm9, %xmm11
cvttpd2dq %xmm11, %xmm11
mulpd %xmm9, %xmm12
cvttpd2dq %xmm12, %xmm12
unpcklpd %xmm11, %xmm12          # xmm12 = xmm12[0],xmm11[0]
movapd %xmm12, (%rax,%r10)
paddd %xmm10, %xmm0
addq $0x10, %rax
cmpq $0x400, %rax            # imm = 0x400
jne 0x30c7
xorl %eax, %eax
leaq 0x2329(%rip), %rcx      # 0x5560
movsd 0x2071(%rip), %xmm0     # 0x52b0
movsd 0x1de9(%rip), %xmm1     # 0x5030
leaq 0x56dc2(%rip), %rdx     # 0x5a010
leaq 0x56fbb(%rip), %rsi     # 0x5a210
xorl %edi, %edi
leaq 0x20a2(%rip), %r14      # 0x5300
movsd (%rcx,%rax,8), %xmm2
movslq %edi, %rdi
leaq (,%rdi,8), %r8
xorl %r9d, %r9d
movzbl (%rdi,%r14), %r10d
movzbl 0x5(%r10,%rbx), %r11d
xorps %xmm3, %xmm3
cvtsi2sd %r11d, %xmm3
mulsd %xmm2, %xmm3
movsd (%r9,%rcx), %xmm4
movzbl 0x46(%r10,%rbx), %r10d
mulsd %xmm4, %xmm3
xorps %xmm5, %xmm5
cvtsi2sd %r10d, %xmm5
mulsd %xmm2, %xmm5
mulsd %xmm0, %xmm3
mulsd %xmm4, %xmm5
movapd %xmm1, %xmm4
leaq (%r8,%r9), %r10
divsd %xmm3, %xmm4
mulsd %xmm0, %xmm5
movapd %xmm1, %xmm3
divsd %xmm5, %xmm3
movsd %xmm4, (%rdx,%r10)
movsd %xmm3, (%rsi,%r10)
incq %rdi
addq $0x8, %r9
cmpq $0x40, %r9
jne 0x3271
incq %rax
cmpq $0x8, %rax
jne 0x325e
movq 0x10(%rsp), %rcx
movzwl 0x8(%rcx), %eax
movw %ax, 0x3e68(%rip)       # 0x7162
movzwl 0xc(%rcx), %eax
movw %ax, 0x3e5b(%rip)       # 0x7160
movl $0xff, %edi
movq 0x18(%rsp), %rsi
callq 0x10b0
movq 0x3e3d(%rip), %rsi      # 0x7158
movl $0xd8, %edi
callq 0x10b0
movzbl 0x3d89(%rip), %edi      # 0x70b5
movq 0x3e25(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3d75(%rip), %edi      # 0x70b4
movq 0x3e12(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3d65(%rip), %edi      # 0x70b7
movq 0x3dff(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3d51(%rip), %edi      # 0x70b6
movq 0x3dec(%rip), %rsi      # 0x7158
callq 0x10b0
movq 0x3de0(%rip), %rsi      # 0x7158
leaq 0x3d39(%rip), %rdi      # 0x70b8
callq 0x1080
movq 0x3dcd(%rip), %rsi      # 0x7158
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x10b0
movzbl 0x3d21(%rip), %edi      # 0x70bd
movq 0x3db5(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3d0f(%rip), %edi      # 0x70be
movq 0x3da2(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cfd(%rip), %edi      # 0x70bf
movq 0x3d8f(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cec(%rip), %edi      # 0x70c1
movq 0x3d7c(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cd8(%rip), %edi      # 0x70c0
movq 0x3d69(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cc8(%rip), %edi      # 0x70c3
movq 0x3d56(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cb4(%rip), %edi      # 0x70c2
movq 0x3d43(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3ca3(%rip), %edi      # 0x70c4
movq 0x3d30(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3c91(%rip), %edi      # 0x70c5
movq 0x3d1d(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3d20(%rip), %edi      # 0x7167
movq 0x3d0a(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3d0c(%rip), %edi      # 0x7166
movq 0x3cf7(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cfc(%rip), %edi      # 0x7169
movq 0x3ce4(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3ce8(%rip), %edi      # 0x7168
movq 0x3cd1(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3cd7(%rip), %edi      # 0x716a
movq 0x3cbe(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x5(%r14,%rbx), %edi
movq 0x3cac(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0x40, %r14
jne 0x349f
movzbl 0x3cea(%rip), %edi      # 0x71ab
movq 0x3c90(%rip), %rsi      # 0x7158
callq 0x10b0
xorl %r14d, %r14d
movzbl 0x46(%r14,%rbx), %edi
movq 0x3c7b(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0x40, %r14
jne 0x34d0
movq 0x3c66(%rip), %rsi      # 0x7158
movl $0xff, %edi
callq 0x10b0
movq 0x3c55(%rip), %rsi      # 0x7158
movl $0xc0, %edi
callq 0x10b0
movq 0x3c44(%rip), %rsi      # 0x7158
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x10b0
movq 0x3c33(%rip), %rsi      # 0x7158
movl $0x11, %edi
callq 0x10b0
movq 0x3c22(%rip), %rsi      # 0x7158
movl $0x8, %edi
callq 0x10b0
movzbl 0x3c1a(%rip), %edi      # 0x7161
movq 0x3c0a(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3c06(%rip), %edi      # 0x7160
movq 0x3bf7(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3bf6(%rip), %edi      # 0x7163
movq 0x3be4(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3be2(%rip), %edi      # 0x7162
movq 0x3bd1(%rip), %rsi      # 0x7158
callq 0x10b0
movq 0x3bc5(%rip), %rsi      # 0x7158
movl $0x3, %edi
callq 0x10b0
movq 0x3bb4(%rip), %rsi      # 0x7158
movl $0x1, %edi
callq 0x10b0
movq 0x3ba3(%rip), %rsi      # 0x7158
movl $0x11, %edi
callq 0x10b0
movq 0x3b92(%rip), %rsi      # 0x7158
xorl %edi, %edi
callq 0x10b0
movq 0x3b84(%rip), %rsi      # 0x7158
movl $0x2, %edi
callq 0x10b0
movq 0x3b73(%rip), %rsi      # 0x7158
movl $0x11, %edi
callq 0x10b0
movq 0x3b62(%rip), %rsi      # 0x7158
movl $0x1, %edi
callq 0x10b0
movq 0x3b51(%rip), %rsi      # 0x7158
movl $0x3, %edi
callq 0x10b0
movq 0x3b40(%rip), %rsi      # 0x7158
movl $0x11, %edi
callq 0x10b0
movq 0x3b2f(%rip), %rsi      # 0x7158
movl $0x1, %edi
callq 0x10b0
movzbl 0x3bb3(%rip), %edi      # 0x71ed
movq 0x3b17(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3b9f(%rip), %edi      # 0x71ec
movq 0x3b04(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3b8f(%rip), %edi      # 0x71ef
movq 0x3af1(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3b7b(%rip), %edi      # 0x71ee
movq 0x3ade(%rip), %rsi      # 0x7158
callq 0x10b0
movzbl 0x3b6a(%rip), %edi      # 0x71f0
movq 0x3acb(%rip), %rsi      # 0x7158
callq 0x10b0
leaq 0x3b53(%rip), %rbx      # 0x71ec
movzbl 0x5(%r14,%rbx), %edi
movq 0x3ab2(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0x10, %r14
jne 0x3699
movq $-0xc, %r14
movzbl 0x21(%r14,%rbx), %edi
movq 0x3a90(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
jne 0x36bb
movzbl 0x3b34(%rip), %edi      # 0x720d
movq 0x3a78(%rip), %rsi      # 0x7158
callq 0x10b0
xorl %r14d, %r14d
movzbl 0x22(%r14,%rbx), %edi
movq 0x3a63(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0x10, %r14
jne 0x36e8
movl $0x32, %r14d
movzbl (%r14,%rbx), %edi
movq 0x3a43(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0xd4, %r14
jne 0x3709
movzbl 0x3b93(%rip), %edi      # 0x72c0
movq 0x3a24(%rip), %rsi      # 0x7158
callq 0x10b0
xorl %r14d, %r14d
movzbl 0xd5(%r14,%rbx), %edi
movq 0x3a0c(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0x10, %r14
jne 0x373c
movq $-0xc, %r14
movzbl 0xf1(%r14,%rbx), %edi
movq 0x39e7(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
jne 0x3761
movzbl 0x3b5b(%rip), %edi      # 0x72dd
movq 0x39cf(%rip), %rsi      # 0x7158
callq 0x10b0
xorl %r14d, %r14d
movzbl 0xf2(%r14,%rbx), %edi
movq 0x39b7(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
cmpq $0x10, %r14
jne 0x3791
movq $-0xa2, %r14
movzbl 0x1a4(%r14,%rbx), %edi
movq 0x3992(%rip), %rsi      # 0x7158
callq 0x10b0
incq %r14
jne 0x37b6
movq 0x3981(%rip), %rsi      # 0x7158
movl $0xff, %edi
callq 0x10b0
movq 0x3970(%rip), %rsi      # 0x7158
movl $0xda, %edi
callq 0x10b0
movq 0x395f(%rip), %rsi      # 0x7158
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
movq 0x394f(%rip), %rsi      # 0x7158
movl $0xc, %edi
callq 0x10b0
movq 0x393e(%rip), %rsi      # 0x7158
movl $0x3, %edi
callq 0x10b0
movq 0x392d(%rip), %rsi      # 0x7158
movl $0x1, %edi
callq 0x10b0
movq 0x391c(%rip), %rsi      # 0x7158
xorl %edi, %edi
callq 0x10b0
movq 0x390e(%rip), %rsi      # 0x7158
movl $0x2, %edi
callq 0x10b0
movq 0x38fd(%rip), %rsi      # 0x7158
movl $0x11, %edi
callq 0x10b0
movq 0x38ec(%rip), %rsi      # 0x7158
movl $0x3, %edi
callq 0x10b0
movq 0x38db(%rip), %rsi      # 0x7158
movl $0x11, %edi
callq 0x10b0
movq 0x38ca(%rip), %rsi      # 0x7158
xorl %edi, %edi
callq 0x10b0
movq 0x38bc(%rip), %rsi      # 0x7158
movl $0x3f, %edi
callq 0x10b0
movq 0x38ab(%rip), %rsi      # 0x7158
xorl %edi, %edi
callq 0x10b0
movb $0x0, 0x38a9(%rip)      # 0x7164
movb $0x7, 0x37f0(%rip)      # 0x70b2
movw %bx, 0xe(%rsp)
movw %bx, 0xc(%rsp)
movl $0x0, (%rsp)
movw %bx, 0xa(%rsp)
movl 0x386e(%rip), %ecx      # 0x714c
testl %ecx, %ecx
je 0x3abb
movl 0x385c(%rip), %edi      # 0x7148
leaq 0x56b1d(%rip), %r11     # 0x5a410
leaq 0x56b96(%rip), %r14     # 0x5a490
testl %edi, %edi
je 0x3a9c
xorl %eax, %eax
movl %edi, %r9d
imull (%rsp), %r9d
movl %eax, 0x4(%rsp)
addl %eax, %r9d
movq 0x3836(%rip), %rdx      # 0x7150
xorl %esi, %esi
xorl %eax, %eax
movl %edi, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movl $0x8, %r8d
movl %r9d, 0x20(%rsp)
leaq 0x56b18(%rip), %rdi     # 0x5a450
movl %r9d, %eax
leaq (%rax,%rax,2), %r10
movq %r11, %rbx
movzbl (%rdx,%r10), %r11d
movzbl 0x1(%rdx,%r10), %r13d
shll $0x2, %r11d
shll $0x2, %r13d
movl (%r13,%r12), %eax
addl (%r11,%rbp), %eax
movq %r14, %r15
movq %r12, %r14
movq %rbp, %r12
leaq 0x552a2(%rip), %rcx     # 0x58c10
movl (%r13,%rcx), %ebp
leaq 0x54696(%rip), %rcx     # 0x58010
addl (%r11,%rcx), %ebp
leaq 0x5568b(%rip), %rcx     # 0x59010
movl (%r13,%rcx), %r13d
leaq 0x54a7f(%rip), %rcx     # 0x58410
addl (%r11,%rcx), %r13d
movq %rbx, %r11
movzbl 0x2(%rdx,%r10), %r10d
shll $0x2, %r10d
leaq 0x55a67(%rip), %rcx     # 0x59410
addl (%r10,%rcx), %eax
shrl $0x10, %eax
addb $-0x80, %al
movzbl %sil, %esi
movb %al, (%rsi,%rbx)
leaq 0x55e50(%rip), %rax     # 0x59810
addl (%r10,%rax), %ebp
shrl $0x10, %ebp
movb %bpl, (%rsi,%rdi)
movq %r12, %rbp
movq %r14, %r12
movq %r15, %r14
leaq 0x56235(%rip), %rax     # 0x59c10
addl (%r10,%rax), %r13d
shrl $0x10, %r13d
movb %r13b, (%rsi,%r15)
incl %r9d
incb %sil
decl %r8d
jne 0x3938
movl 0x10(%rsp), %edi
movl 0x20(%rsp), %r9d
addl %edi, %r9d
subl %r8d, %r9d
movl 0x18(%rsp), %eax
incl %eax
cmpl $0x8, %eax
jne 0x3922
movq %r11, %rdi
leaq 0x565f2(%rip), %rsi     # 0x5a010
leaq 0xe(%rsp), %rdx
leaq 0x3966(%rip), %rcx      # 0x7390
leaq 0x39bf(%rip), %r8       # 0x73f0
callq 0x3ba7
leaq 0x56a13(%rip), %rdi     # 0x5a450
leaq 0x567cc(%rip), %r15     # 0x5a210
movq %r15, %rsi
leaq 0xc(%rsp), %rdx
leaq 0x396d(%rip), %r13      # 0x73c0
movq %r13, %rcx
leaq 0x3d93(%rip), %r8       # 0x77f0
callq 0x3ba7
movq %r14, %rdi
movq %r15, %rsi
leaq 0xa(%rsp), %rdx
movq %r13, %rcx
leaq 0x3d79(%rip), %r8       # 0x77f0
callq 0x3ba7
movq %rbx, %r11
movl 0x4(%rsp), %eax
addl $0x8, %eax
movl 0x36bc(%rip), %edi      # 0x7148
cmpl %edi, %eax
jb 0x3904
movl 0x36b2(%rip), %ecx      # 0x714c
jmp 0x3a9e
xorl %edi, %edi
movl (%rsp), %eax
addl $0x8, %eax
movl %eax, (%rsp)
cmpl %ecx, %eax
jb 0x38fa
movb 0x35fd(%rip), %cl       # 0x70b2
testb %cl, %cl
jns 0x3abd
jmp 0x3ad5
movb $0x7, %cl
movl $0x20000, %eax          # imm = 0x20000
shll %cl, %eax
movzbl %cl, %ecx
leal (%rax,%rcx), %edi
addl $0xffff0001, %edi       # imm = 0xFFFF0001
callq 0x3b11
movq 0x367c(%rip), %rsi      # 0x7158
movl $0xff, %edi
callq 0x10b0
movq 0x366b(%rip), %rsi      # 0x7158
movl $0xd9, %edi
callq 0x10b0
movq 0x3652(%rip), %rdi      # 0x7150
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040