// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodeFlate_deflate(ucvector*, unsigned char const*, unsigned long, LodeZlib_DeflateSettings const*)
unsigned LodeFlate_deflate(ucvector* out, const unsigned char* data, size_t datasize, const LodeZlib_DeflateSettings* settings)
{
  unsigned error = 0;
  if(settings->btype == 0) error = deflateNoCompression(out, data, datasize);
  else if(settings->btype == 1) error = deflateFixed(out, data, datasize, settings);
  else if(settings->btype == 2) error = deflateDynamic(out, data, datasize, settings);
  else error = 61;
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl (%rcx), %eax
cmpl $0x2, %eax
je 0x10e34
cmpl $0x1, %eax
je 0x10d61
testl %eax, %eax
jne 0x10fa1
movq %r14, %rax
shrq $0x10, %rax
movq %rax, -0x78(%rbp)
incq %rax
movq %rax, -0x50(%rbp)
xorl %ebx, %ebx
xorl %eax, %eax
movq %r15, -0x48(%rbp)
cmpq -0x50(%rbp), %rax
je 0x10fa9
xorl %esi, %esi
movq %rax, -0x40(%rbp)
cmpq -0x78(%rbp), %rax
sete %sil
movq %r13, %rdi
callq 0x11607
movl %ebx, %ecx
movl %ebx, %ebx
movq %r14, %rax
subq %rbx, %rax
movl %r14d, %r12d
movl %ecx, -0x30(%rbp)
subl %ecx, %r12d
cmpq $0xffff, %rax           # imm = 0xFFFF
movl $0xffff, %eax           # imm = 0xFFFF
cmovael %eax, %r12d
movq %r13, %r15
movl $0xffff, %r13d          # imm = 0xFFFF
subl %r12d, %r13d
movl %r12d, %esi
movl $0xff, %eax
andl %eax, %esi
movq %r15, %rdi
callq 0x11607
shrl $0x8, %r12d
movl $0xff, %eax
andl %eax, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x11607
movl %r13d, %esi
movl $0xff, %r12d
andl %r12d, %esi
movq %r15, %rdi
callq 0x11607
shrl $0x8, %r13d
andl %r12d, %r13d
movq %r15, %rdi
movl %r13d, %esi
movq %r15, %r13
movq -0x48(%rbp), %r15
callq 0x11607
xorl %r12d, %r12d
cmpq $0xfffe, %r12           # imm = 0xFFFE
ja 0x10d4f
leal (%rbx,%r12), %eax
cmpq %r14, %rax
jae 0x10d4f
movzbl (%r15,%rax), %esi
movq %r13, %rdi
callq 0x11607
incq %r12
jmp 0x10d2b
movq -0x40(%rbp), %rax
incq %rax
movl -0x30(%rbp), %ebx
addl %r12d, %ebx
jmp 0x10c84
leaq -0x70(%rbp), %rbx
andq $0x0, (%rbx)
xorps %xmm0, %xmm0
leaq -0x190(%rbp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
andq $0x0, 0x40(%rdi)
movq %r13, -0x30(%rbp)
leaq -0x1e0(%rbp), %r13
movaps %xmm0, (%r13)
movaps %xmm0, 0x10(%r13)
movaps %xmm0, 0x20(%r13)
movaps %xmm0, 0x30(%r13)
andq $0x0, 0x40(%r13)
callq 0x16457
movq %r13, %rdi
callq 0x16505
pushq $0x1
popq %r13
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movl %r13d, %edx
callq 0x16885
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movl %r13d, %edx
movq -0x30(%rbp), %r13
callq 0x16885
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x16885
cmpl $0x0, 0x4(%r12)
je 0x10fb0
leaq -0x230(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movl 0x8(%r12), %ecx
movq %r15, %rsi
movq %r14, %rdx
callq 0x168ca
testl %eax, %eax
je 0x1101e
movl %eax, %ebx
leaq -0x230(%rbp), %rdi
callq 0x16628
jmp 0x11070
andq $0x0, -0x38(%rbp)
xorps %xmm0, %xmm0
andq $0x0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x190(%rbp)
movaps %xmm0, -0x180(%rbp)
movaps %xmm0, -0x170(%rbp)
movaps %xmm0, -0x160(%rbp)
andq $0x0, -0x150(%rbp)
movaps %xmm0, -0x1e0(%rbp)
movaps %xmm0, -0x1d0(%rbp)
movaps %xmm0, -0x1c0(%rbp)
movaps %xmm0, -0x1b0(%rbp)
andq $0x0, -0x1a0(%rbp)
movaps %xmm0, -0x200(%rbp)
movaps %xmm0, -0x210(%rbp)
andq $0x0, -0x1f0(%rbp)
movaps %xmm0, -0x220(%rbp)
andq $0x0, -0x120(%rbp)
movaps %xmm0, -0x230(%rbp)
andq $0x0, -0x100(%rbp)
movaps %xmm0, -0x130(%rbp)
andq $0x0, -0xe0(%rbp)
movaps %xmm0, -0x110(%rbp)
andq $0x0, -0x80(%rbp)
movaps %xmm0, -0xf0(%rbp)
andq $0x0, -0xc0(%rbp)
movaps %xmm0, -0x90(%rbp)
andq $0x0, -0xa0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movaps %xmm0, -0xb0(%rbp)
cmpl $0x0, 0x4(%r12)
je 0x10fee
movl 0x8(%r12), %ecx
leaq -0x70(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x168ca
testl %eax, %eax
jne 0x110d2
leaq -0x130(%rbp), %rdi
movl $0x11e, %esi            # imm = 0x11E
callq 0x16846
testl %eax, %eax
je 0x110d6
leaq -0x110(%rbp), %rdi
pushq $0x1e
popq %rsi
callq 0x16846
testl %eax, %eax
je 0x110e4
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x110(%rbp), %r14
xorl %edx, %edx
cmpq %rcx, %rdx
jae 0x1108d
movl (%rax,%rdx,4), %edi
incl (%rsi,%rdi,4)
cmpq $0x101, %rdi            # imm = 0x101
jb 0x10f9c
movl 0x8(%rax,%rdx,4), %edi
incl (%r14,%rdi,4)
addq $0x3, %rdx
incq %rdx
jmp 0x10f78
pushq $0x3d
popq %rbx
jmp 0x1115e
xorl %ebx, %ebx
jmp 0x1115e
movq -0x178(%rbp), %rbx
movq -0x160(%rbp), %r13
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x10fe8
movzbl (%r15,%r12), %eax
shll $0x2, %eax
movl (%rbx,%rax), %edx
movl (%r13,%rax), %ecx
leaq -0x70(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x16d0a
incq %r12
jmp 0x10fc1
movq -0x30(%rbp), %rsi
jmp 0x11058
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x16562
testl %eax, %eax
je 0x110dd
movq -0x70(%rbp), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x10f30
movzbl (%r15,%rcx), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
jmp 0x11008
leaq -0x70(%rbp), %rdi
leaq -0x230(%rbp), %r14
leaq -0x190(%rbp), %r15
leaq -0x1e0(%rbp), %r8
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x16c22
movq %r14, %rdi
callq 0x16628
movq 0x18(%r15), %rbx
movq %r13, %rsi
movq 0x30(%r15), %r13
movl 0x400(%rbx), %edx
movl 0x400(%r13), %ecx
leaq -0x70(%rbp), %rdi
callq 0x16d0a
xorl %ebx, %ebx
leaq -0x190(%rbp), %rdi
callq 0x16361
leaq -0x1e0(%rbp), %rdi
callq 0x16361
jmp 0x1115e
movl $0x1, 0x400(%rsi)
movq -0x128(%rbp), %rdx
leaq -0x190(%rbp), %rdi
pushq $0xf
popq %rcx
callq 0x16eb4
testl %eax, %eax
jne 0x110d2
movq -0x108(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
pushq $0xf
popq %rcx
movq %r14, %rsi
callq 0x16eb4
testl %eax, %eax
je 0x11172
movl %eax, %ebx
jmp 0x110e9
movl $0x26c4, %ebx           # imm = 0x26C4
jmp 0x110e9
movl $0x26c3, %ebx           # imm = 0x26C3
jmp 0x110e9
movl $0x26c5, %ebx           # imm = 0x26C5
leaq -0x70(%rbp), %rdi
callq 0x16628
leaq -0x190(%rbp), %rdi
callq 0x16361
leaq -0x1e0(%rbp), %rdi
callq 0x16361
leaq -0x230(%rbp), %rdi
callq 0x16361
leaq -0x130(%rbp), %rdi
callq 0x16628
leaq -0x110(%rbp), %rdi
callq 0x16628
leaq -0xf0(%rbp), %rdi
callq 0x16628
leaq -0x90(%rbp), %rdi
callq 0x16628
leaq -0xd0(%rbp), %rdi
callq 0x16628
leaq -0xb0(%rbp), %rdi
callq 0x16628
movl %ebx, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x38(%rbp), %r14
pushq $0x1
popq %r15
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x16885
xorl %ebx, %ebx
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x16885
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x16885
movl -0x144(%rbp), %eax
movl $0x11e, %ecx            # imm = 0x11E
cmpl %ecx, %eax
cmovbl %eax, %ecx
movq %rcx, -0x50(%rbp)
movl -0x194(%rbp), %r15d
movq -0x160(%rbp), %r12
leaq -0xd0(%rbp), %r14
cmpq %rbx, -0x50(%rbp)
je 0x111e5
movl (%r12,%rbx,4), %esi
movq %r14, %rdi
callq 0x16dcc
incq %rbx
jmp 0x111ce
cmpl $0x1e, %r15d
pushq $0x1e
popq %rax
cmovbl %r15d, %eax
movq %rax, -0x40(%rbp)
movq -0x1b0(%rbp), %rbx
xorl %r15d, %r15d
leaq -0xd0(%rbp), %r14
cmpq %r15, -0x40(%rbp)
je 0x1121c
movl (%rbx,%r15,4), %esi
movq %r14, %rdi
callq 0x16dcc
incq %r15
jmp 0x11205
movq %r12, -0x138(%rbp)
movq %r13, -0x30(%rbp)
movl -0xc8(%rbp), %r13d
movq -0xd0(%rbp), %r12
xorl %r14d, %r14d
cmpq %r13, %r14
jae 0x11377
leaq 0x1(%r14), %rax
movl (%r12,%r14,4), %esi
xorl %r15d, %r15d
movl %r15d, %r15d
leaq (%rax,%r15), %rcx
cmpq %r13, %rcx
jae 0x11263
cmpl %esi, (%r12,%rcx,4)
jne 0x11263
incl %r15d
jmp 0x1124c
testl %esi, %esi
jne 0x1129d
cmpl $0x2, %r15d
jb 0x1129d
leal 0x1(%r15), %ebx
cmpl $0xa, %ebx
ja 0x11337
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
pushq $0x11
popq %rsi
callq 0x16dcc
leal -0x2(%r15), %esi
movq %rbx, %rdi
callq 0x16dcc
jmp 0x1136c
leaq -0x90(%rbp), %rdi
callq 0x16dcc
cmpl $0x3, %r15d
jb 0x1136f
movq %r14, -0x48(%rbp)
movl %r15d, %eax
xorl %edx, %edx
pushq $0x6
popq %rcx
divl %ecx
imull $-0x6, %eax, %eax
addl %r15d, %eax
movl %eax, -0x78(%rbp)
movq %r15, %rax
xorl %edx, %edx
pushq $0x6
popq %rcx
divq %rcx
movq %rax, %r14
subq $0x1, %r14
jb 0x112fd
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
pushq $0x10
popq %rsi
callq 0x16dcc
movq %rbx, %rdi
pushq $0x3
popq %rsi
callq 0x16dcc
jmp 0x112d8
movl -0x78(%rbp), %eax
cmpl $0x3, %eax
jb 0x11365
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
pushq $0x10
popq %rsi
callq 0x16dcc
movl %r15d, %eax
xorl %edx, %edx
pushq $0x6
popq %rcx
divl %ecx
imull $0x6, %eax, %eax
negl %eax
leal (%r15,%rax), %esi
addl $-0x3, %esi
movq %rbx, %rdi
callq 0x16dcc
jmp 0x11368
movl $0x8a, %eax
cmpl %eax, %ebx
cmovael %eax, %ebx
leaq -0x90(%rbp), %r15
movq %r15, %rdi
pushq $0x12
popq %rsi
callq 0x16dcc
leal -0xb(%rbx), %esi
movq %r15, %rdi
callq 0x16dcc
decl %ebx
movq %rbx, %r15
jmp 0x1136c
subl %eax, %r15d
movq -0x48(%rbp), %r14
addq %r15, %r14
incq %r14
jmp 0x11238
leaq -0xf0(%rbp), %rdi
pushq $0x13
popq %rsi
callq 0x16846
testl %eax, %eax
je 0x1141e
movq -0x90(%rbp), %r13
movq -0x88(%rbp), %r12
movq -0xf0(%rbp), %rsi
xorl %eax, %eax
cmpq %r12, %rax
jae 0x113c1
movl (%r13,%rax,4), %ecx
incl (%rsi,%rcx,4)
cmpl $0x10, (%r13,%rax,4)
sbbq $-0x1, %rax
incq %rax
jmp 0x113a5
movq -0xe8(%rbp), %rdx
leaq -0x230(%rbp), %rdi
pushq $0x7
popq %rcx
callq 0x16eb4
testl %eax, %eax
jne 0x110d2
leaq -0xb0(%rbp), %rdi
pushq $0x13
popq %rsi
callq 0x16562
testl %eax, %eax
je 0x1146b
movq -0x200(%rbp), %rdi
movq -0xb0(%rbp), %rax
xorl %ecx, %ecx
leaq 0x116a7(%rip), %rdx     # 0x22ab0
cmpq $0x4c, %rcx
je 0x11428
movl (%rcx,%rdx), %esi
movl (%rdi,%rsi,4), %esi
movl %esi, (%rax,%rcx)
addq $0x4, %rcx
jmp 0x11409
movl $0x26c6, %ebx           # imm = 0x26C6
jmp 0x110e9
movq %rdi, -0x48(%rbp)
leaq -0xb0(%rbp), %r15
movq -0xb0(%rbp), %rbx
movq -0xa8(%rbp), %r14
cmpq $0x5, %r14
jb 0x11475
cmpl $0x0, -0x4(%rbx,%r14,4)
jne 0x11475
decq %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x16562
movl $0x26c8, %ebx           # imm = 0x26C8
testl %eax, %eax
jne 0x11433
jmp 0x110e9
movl $0x26c7, %ebx           # imm = 0x26C7
jmp 0x110e9
movq -0x50(%rbp), %rdx
addl $0xfffffeff, %edx       # imm = 0xFFFFFEFF
movq -0x40(%rbp), %rax
decl %eax
movq %rax, -0x40(%rbp)
leal -0x4(%r14), %eax
movl %eax, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
pushq $0x5
popq %rcx
movq -0x30(%rbp), %r15
movq %r15, %rsi
callq 0x16e6a
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
movq -0x40(%rbp), %rdx
pushq $0x5
popq %rcx
callq 0x16e6a
pushq $0x4
popq %rcx
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
movl -0x50(%rbp), %edx
callq 0x16e6a
movl %r14d, %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x114ec
movl (%rbx,%r15,4), %edx
leaq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
pushq $0x3
popq %rcx
callq 0x16e6a
incq %r15
jmp 0x114ce
movq -0x218(%rbp), %rax
movq %rax, -0x40(%rbp)
xorl %r14d, %r14d
leaq -0x38(%rbp), %rbx
movq -0x30(%rbp), %r15
cmpq %r12, %r14
jae 0x1155b
movl (%r13,%r14,4), %eax
movq -0x40(%rbp), %rcx
movl (%rcx,%rax,4), %edx
movq -0x48(%rbp), %rcx
movl (%rcx,%rax,4), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16d0a
movl (%r13,%r14,4), %eax
addl $-0x10, %eax
cmpl $0x2, %eax
ja 0x11552
movl %eax, %eax
leaq 0x11645(%rip), %rcx     # 0x22b80
movq (%rcx,%rax,8), %rcx
movl 0x4(%r13,%r14,4), %edx
incq %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16e6a
incq %r14
leaq -0x38(%rbp), %rbx
jmp 0x11502
leaq -0x38(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq -0x190(%rbp), %rcx
leaq -0x1e0(%rbp), %r8
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x16c22
movq -0x138(%rbp), %rax
movl 0x400(%rax), %ecx
testl %ecx, %ecx
je 0x115ae
movq -0x178(%rbp), %rax
movl 0x400(%rax), %edx
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x16d0a
xorl %ebx, %ebx
jmp 0x110e9
pushq $0x40
popq %rbx
jmp 0x110e9