// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_inflatev
static unsigned lodepng_inflatev(ucvector* out,
                                 const unsigned char* in, size_t insize,
                                 const LodePNGDecompressSettings* settings) {
  unsigned BFINAL = 0;
  LodePNGBitReader reader;
  unsigned error = LodePNGBitReader_init(&reader, in, insize);

  if(error) return error;

  while(!BFINAL) {
    unsigned BTYPE;
    if(!ensureBits9(&reader, 3)) return 52; /*error, bit pointer will jump past memory*/
    BFINAL = readBits(&reader, 1);
    BTYPE = readBits(&reader, 2);

    if(BTYPE == 3) return 20; /*error: invalid BTYPE*/
    else if(BTYPE == 0) error = inflateNoCompression(out, &reader, settings); /*no compression*/
    else error = inflateHuffmanBlock(out, &reader, BTYPE); /*compression, BTYPE 01 or 10*/

    if(error) return error;
  }

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x88(%rsp)
movq %rdi, %rbx
movq %rsi, (%rsp)
movq %rdx, 0x8(%rsp)
leaq (,%rdx,8), %rax
movq %rax, 0x10(%rsp)
shrq $0x3d, %rdx
sete %cl
cmpq $-0x40, %rax
setb %al
andb %cl, %al
movl $0x69, %r14d
cmpb $0x1, %al
jne 0x359d
movq $0x0, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
xorl %r14d, %r14d
testb %al, %al
je 0x4000
movq %rsp, %r12
leaq 0x60(%rsp), %r13
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %rbx, 0x30(%rsp)
testl %r15d, %r15d
jne 0x3ffd
movl $0x3, %esi
movq %r12, %rdi
callq 0x2e8b
testl %eax, %eax
je 0x36c6
movl 0x20(%rsp), %edx
movl %edx, %r15d
andl $0x1, %r15d
movl %edx, %ecx
shrl %ecx
movq 0x18(%rsp), %rax
andl $0x3, %ecx
shrl $0x3, %edx
movl %edx, 0x20(%rsp)
leaq 0x3(%rax), %rdx
movq %rdx, 0x18(%rsp)
cmpl $0x3, %ecx
je 0x36ce
movl %r14d, 0x5c(%rsp)
testl %ecx, %ecx
movl %r15d, 0x58(%rsp)
jne 0x36db
movq 0x8(%rsp), %r14
addq $0xa, %rax
shrq $0x3, %rax
leaq 0x4(%rax), %rbx
movl $0x34, %ebp
cmpq %r14, %rbx
jae 0x3f75
movq (%rsp), %rcx
movzwl (%rcx,%rax), %r12d
movq 0x88(%rsp), %rdx
cmpl $0x0, 0x4(%rdx)
jne 0x3665
movzwl 0x2(%rcx,%rax), %eax
addl %r12d, %eax
movl $0x15, %ebp
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x3f75
movl %r12d, %r15d
movq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
addq %r15, %rsi
callq 0xc33f
testl %eax, %eax
je 0x388d
leaq (%rbx,%r15), %r13
movl $0x17, %ebp
cmpq %r14, %r13
ja 0x3f75
testl %r12d, %r12d
je 0x36b6
addq (%rsp), %rbx
movq 0x30(%rsp), %rax
movq (%rax), %rdi
addq 0x8(%rax), %rdi
subq %r15, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1130
shlq $0x3, %r13
movq %r13, 0x18(%rsp)
xorl %ebp, %ebp
jmp 0x3f75
movl $0x34, %r14d
jmp 0x36d4
movl $0x14, %r14d
xorl %eax, %eax
jmp 0x3f90
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
leaq 0x78(%rsp), %rax
movups %xmm0, (%rax)
movaps %xmm0, 0x90(%rsp)
leaq 0xa8(%rsp), %rax
movups %xmm0, (%rax)
cmpl $0x1, %ecx
jne 0x372e
movq %r13, %rdi
callq 0xc432
movl %eax, %ebp
testl %eax, %eax
movq 0x30(%rsp), %r15
jne 0x3c26
leaq 0x90(%rsp), %rdi
callq 0xc4d1
movl %eax, %ebp
jmp 0x3c26
movl $0xe, %esi
movq %r12, %rdi
callq 0x2e11
testl %eax, %eax
je 0x3883
movl 0x20(%rsp), %ebx
movq 0x18(%rsp), %r12
movl %ebx, %eax
shrl $0xe, %eax
movl %eax, 0x20(%rsp)
addq $0xe, %r12
movq %r12, 0x18(%rsp)
movl $0x4c, %edi
callq 0x1140
testq %rax, %rax
je 0x3897
movq %rax, %r13
movl %ebx, %r14d
shrl $0xa, %r14d
andl $0xf, %r14d
leaq 0x4(%r14), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
leaq 0xd8(%rsp), %rax
movups %xmm0, (%rax)
leaq (%rcx,%rcx,2), %rax
addq %r12, %rax
movl $0x32, %ebp
cmpq %r12, %rax
jb 0x38a4
movl $0x0, %esi
movl $0x0, %r9d
cmpq 0x10(%rsp), %rax
movq %rsp, %r12
ja 0x3bf1
movq %rcx, 0x28(%rsp)
movl %ebx, %eax
andl $0x1f, %eax
shrl $0x5, %ebx
movq %rax, 0x38(%rsp)
addq $0x101, %rax            # imm = 0x101
movq %rax, 0x48(%rsp)
andl $0x1f, %ebx
incl %ebx
movq %rbx, 0x40(%rsp)
leaq 0x10(,%r14,4), %rbp
movq %r12, %r15
xorl %r12d, %r12d
leaq 0xf0dd(%rip), %rbx      # 0x128e0
movl $0x3, %esi
movq %r15, %rdi
callq 0x2e8b
movl 0x20(%rsp), %eax
movl %eax, %ecx
andl $0x7, %ecx
shrl $0x3, %eax
movl %eax, 0x20(%rsp)
addq $0x3, 0x18(%rsp)
movl (%r12,%rbx), %eax
movl %ecx, (%r13,%rax,4)
addq $0x4, %r12
cmpq %r12, %rbp
jne 0x3803
cmpl $0x13, 0x28(%rsp)
je 0x3856
movl 0x10(%rbx,%r14,4), %eax
movl $0x0, (%r13,%rax,4)
incq %r14
cmpq $0xf, %r14
jne 0x383f
movl $0x13, %edx
leaq 0xc0(%rsp), %rdi
movq %r13, %rsi
movl $0x7, %ecx
callq 0xc529
testl %eax, %eax
movq %rsp, %r12
je 0x38b1
movl %eax, %ebp
xorl %esi, %esi
xorl %r9d, %r9d
jmp 0x3bf1
movl $0x31, %ebp
jmp 0x3c21
movl $0x53, %ebp
jmp 0x3f75
movl $0x53, %ebp
movq %rsp, %r12
jmp 0x3c1c
xorl %esi, %esi
xorl %r9d, %r9d
movq %rsp, %r12
jmp 0x3bf1
movl $0x480, %edi            # imm = 0x480
callq 0x1140
movq %rax, %rbx
movl $0x80, %edi
callq 0x1140
movq %rbx, %rsi
movq %rax, %r9
testq %rbx, %rbx
sete %al
testq %r9, %r9
sete %cl
movl $0x53, %ebp
orb %al, %cl
jne 0x3bf1
xorl %ebp, %ebp
movl $0x480, %edx            # imm = 0x480
movq %rsi, 0x28(%rsp)
movq %rsi, %rdi
xorl %esi, %esi
movq %r9, %r14
callq 0x10e0
movq %r14, %r9
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x70(%r14)
movq 0x40(%rsp), %r8
addl 0x48(%rsp), %r8d
movq 0x38(%rsp), %rcx
leal 0x102(%rcx), %eax
movl %eax, 0x54(%rsp)
negl %ecx
movq %rcx, 0x38(%rsp)
movslq %ecx, %rax
addq $-0x101, %rax           # imm = 0xFEFF
movq %rax, 0x40(%rsp)
xorl %r15d, %r15d
movq %r8, %rbx
cmpl %r8d, %r15d
jae 0x3be4
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq %rcx, %rax
shrq $0x3, %rax
leaq 0x3(%rax), %rsi
cmpq %rdx, %rsi
jae 0x398d
movq (%rsp), %rdx
movl (%rdx,%rax), %eax
jmp 0x39da
movl $0x0, 0x20(%rsp)
cmpq %rdx, %rax
jae 0x39a6
movq (%rsp), %rsi
movzbl (%rsi,%rax), %esi
movl %esi, 0x20(%rsp)
leaq 0x1(%rax), %rsi
cmpq %rdx, %rsi
jae 0x39be
movq (%rsp), %rdi
movzbl (%rdi,%rsi), %esi
shll $0x8, %esi
orl %esi, 0x20(%rsp)
addq $0x2, %rax
cmpq %rdx, %rax
jae 0x39d6
movq (%rsp), %rdx
movzbl (%rdx,%rax), %eax
shll $0x10, %eax
orl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
andb $0x7, %cl
shrl %cl, %eax
movl %eax, 0x20(%rsp)
movq %r12, %rdi
leaq 0xc0(%rsp), %rsi
callq 0xc383
cmpl $0xf, %eax
ja 0x3a4e
movq 0x48(%rsp), %rcx
cmpl %ecx, %r15d
movl $0x0, %edx
cmovbl %edx, %ecx
movq %r14, %r9
movq %r14, %rdx
cmovbq 0x28(%rsp), %rdx
movl %r15d, %esi
subl %ecx, %esi
movl %eax, (%rdx,%rsi,4)
incl %r15d
movq %rbx, %r8
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
movl $0x32, %eax
cmoval %eax, %ebp
movl $0x0, %ecx
movl $0xb, %eax
cmoval %eax, %ecx
testl %ecx, %ecx
je 0x3961
jmp 0x3be4
cmpw $0x12, %ax
movq %rbx, %r8
movq %r14, %r9
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r11
je 0x3b4c
movzwl %ax, %eax
cmpl $0x11, %eax
je 0x3af9
cmpl $0x10, %eax
jne 0x3b9b
testl %r15d, %r15d
je 0x3bbe
movl 0x20(%rsp), %eax
movl %eax, %ecx
shrl $0x2, %eax
movl %eax, 0x20(%rsp)
addq $0x2, 0x18(%rsp)
andl $0x3, %ecx
leal -0x1(%r15), %eax
cmpl 0x54(%rsp), %r15d
movq 0x28(%rsp), %rsi
leaq (%rsi,%rax,4), %rax
movq 0x38(%rsp), %rdx
leal -0x102(%r15,%rdx), %edx
leaq (%r9,%rdx,4), %rdx
cmovbq %rax, %rdx
movl (%rdx), %edx
movl %r15d, %eax
leaq (%rsi,%rax,4), %rsi
addl $0x3, %ecx
cmpq %r8, %rax
jae 0x3bcc
leal (%r11,%rax), %edi
cmpq %r10, %rax
leaq (%r9,%rdi,4), %rdi
cmovbq %rsi, %rdi
movl %edx, (%rdi)
incq %rax
addq $0x4, %rsi
decl %ecx
jne 0x3acf
jmp 0x3bd1
movl 0x20(%rsp), %ecx
movl %ecx, %eax
shrl $0x3, %ecx
movl %ecx, 0x20(%rsp)
addq $0x3, 0x18(%rsp)
andl $0x7, %eax
movl %r15d, %r15d
movq 0x28(%rsp), %rcx
leaq (%rcx,%r15,4), %rcx
addl $0x3, %eax
cmpq %r8, %r15
jae 0x3baa
leal (%r11,%r15), %edx
cmpq %r10, %r15
leaq (%r9,%rdx,4), %rdx
cmovbq %rcx, %rdx
movl $0x0, (%rdx)
incq %r15
addq $0x4, %rcx
decl %eax
jne 0x3b1e
jmp 0x3a22
movl 0x20(%rsp), %ecx
movl %ecx, %eax
shrl $0x7, %ecx
movl %ecx, 0x20(%rsp)
addq $0x7, 0x18(%rsp)
andl $0x7f, %eax
movl %r15d, %r15d
movq 0x28(%rsp), %rcx
leaq (%rcx,%r15,4), %rcx
addl $0xb, %eax
cmpq %r8, %r15
jae 0x3bb4
leal (%r11,%r15), %edx
cmpq %r10, %r15
leaq (%r9,%rdx,4), %rdx
cmovbq %rcx, %rdx
movl $0x0, (%rdx)
incq %r15
addq $0x4, %rcx
decl %eax
jne 0x3b71
jmp 0x3a22
movl $0xb, %ecx
movl $0x10, %ebp
jmp 0x3a41
movl $0xe, %ebp
jmp 0x3a22
movl $0xf, %ebp
jmp 0x3a22
movl $0xb, %ecx
xorl %eax, %eax
movl $0x36, %ebp
jmp 0x3bd3
movl $0xd, %ebp
xorl %ecx, %ecx
testl %r15d, %r15d
movl %eax, %r15d
jne 0x3a22
jmp 0x3a41
testl %ebp, %ebp
je 0x3f9a
movq 0x28(%rsp), %rsi
movq %r13, %rdi
movq %rsi, %rbx
movq %r9, %r14
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
leaq 0xc0(%rsp), %rdi
callq 0xc40a
leaq 0x60(%rsp), %r13
movq 0x30(%rsp), %r15
testl %ebp, %ebp
jne 0x3f60
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq %rcx, %rax
shrq $0x3, %rax
leaq 0x3(%rax), %rsi
cmpq %rdx, %rsi
jae 0x3c51
movq (%rsp), %rdx
movl (%rdx,%rax), %eax
jmp 0x3c9e
movl $0x0, 0x20(%rsp)
cmpq %rdx, %rax
jae 0x3c6a
movq (%rsp), %rsi
movzbl (%rsi,%rax), %esi
movl %esi, 0x20(%rsp)
leaq 0x1(%rax), %rsi
cmpq %rdx, %rsi
jae 0x3c82
movq (%rsp), %rdi
movzbl (%rdi,%rsi), %esi
shll $0x8, %esi
orl %esi, 0x20(%rsp)
addq $0x2, %rax
cmpq %rdx, %rax
jae 0x3c9a
movq (%rsp), %rdx
movzbl (%rdx,%rax), %eax
shll $0x10, %eax
orl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
andb $0x7, %cl
shrl %cl, %eax
movl %eax, 0x20(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xc383
movl %eax, %ebx
cmpl $0xff, %eax
ja 0x3ce2
movq 0x8(%r15), %rsi
incq %rsi
movq %r15, %rdi
callq 0xc33f
testl %eax, %eax
je 0x3d8f
movq (%r15), %rax
movq 0x8(%r15), %rcx
movb %bl, -0x1(%rax,%rcx)
jmp 0x3f11
cmpl $0x100, %ebx            # imm = 0x100
sete %al
cmpl $0x11e, %ebx            # imm = 0x11E
setae %cl
orb %al, %cl
jne 0x3d7f
addl $0xfffffeff, %ebx       # imm = 0xFFFFFEFF
leaq 0xe9d7(%rip), %rax      # 0x126e0
movl (%rax,%rbx,4), %r13d
leaq -0x1c(%rbx), %rax
cmpq $-0x14, %rax
jb 0x3d3e
leaq 0xea42(%rip), %rax      # 0x12760
movl (%rax,%rbx,4), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl 0x20(%rsp), %edx
notl %eax
andl %edx, %eax
shrl %cl, %edx
movl %edx, 0x20(%rsp)
addq %rcx, 0x18(%rsp)
addq %rax, %r13
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq %rcx, %rax
shrq $0x3, %rax
leaq 0x4(%rax), %rsi
cmpq %rdx, %rsi
jae 0x3d9f
movq (%rsp), %rdx
movl (%rdx,%rax), %esi
andb $0x7, %cl
shrl %cl, %esi
movl %esi, 0x20(%rsp)
movzbl 0x4(%rdx,%rax), %edx
shll $0x18, %edx
movb $0x8, %al
subb %cl, %al
movl %eax, %ecx
shll %cl, %edx
orl %esi, %edx
jmp 0x3e09
cmpl $0x100, %ebx            # imm = 0x100
movl $0x10, %eax
cmovnel %eax, %ebp
jmp 0x3d94
movl $0x53, %ebp
movl $0x3, %r14d
jmp 0x3f2c
movl $0x0, 0x20(%rsp)
cmpq %rdx, %rax
jae 0x3db8
movq (%rsp), %rsi
movzbl (%rsi,%rax), %esi
movl %esi, 0x20(%rsp)
leaq 0x1(%rax), %rsi
cmpq %rdx, %rsi
jae 0x3dd0
movq (%rsp), %rdi
movzbl (%rdi,%rsi), %esi
shll $0x8, %esi
orl %esi, 0x20(%rsp)
leaq 0x2(%rax), %rsi
cmpq %rdx, %rsi
jae 0x3de8
movq (%rsp), %rdi
movzbl (%rdi,%rsi), %esi
shll $0x10, %esi
orl %esi, 0x20(%rsp)
addq $0x3, %rax
cmpq %rdx, %rax
jae 0x3e00
movq (%rsp), %rdx
movzbl (%rdx,%rax), %eax
shll $0x18, %eax
orl %eax, 0x20(%rsp)
movl 0x20(%rsp), %edx
andb $0x7, %cl
shrl %cl, %edx
movl %edx, 0x20(%rsp)
movq %r12, %rdi
leaq 0x90(%rsp), %rsi
callq 0xc383
cmpl $0x1e, %eax
jb 0x3e3f
xorl %ecx, %ecx
cmpl $0x20, %eax
setb %cl
leal 0x10(,%rcx,2), %ebp
movl $0x3, %r14d
xorl %r15d, %r15d
jmp 0x3f02
movl %eax, %ecx
leaq 0xe998(%rip), %rdx      # 0x127e0
movl (%rdx,%rcx,4), %edx
cmpl $0x4, %eax
jb 0x3e76
leaq 0xea09(%rip), %rax      # 0x12860
movl (%rax,%rcx,4), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl 0x20(%rsp), %esi
notl %eax
andl %esi, %eax
shrl %cl, %esi
movl %esi, 0x20(%rsp)
addq %rcx, 0x18(%rsp)
addl %eax, %edx
movq 0x8(%r15), %r12
movq %r15, %rdi
movl %edx, %r15d
movl $0x3, %r14d
movq %r12, %rbx
subq %r15, %rbx
jae 0x3e95
movl $0x34, %ebp
jmp 0x3efc
leaq (%r12,%r13), %rsi
callq 0xc33f
testl %eax, %eax
je 0x3ef7
movq %r13, %r14
subq %r15, %r14
jbe 0x3f37
testq %r15, %r15
je 0x3eca
movq 0x30(%rsp), %rax
movq (%rax), %rdi
leaq (%rdi,%rbx), %rsi
addq %r12, %rdi
movq %r15, %rdx
callq 0x1130
addq %r15, %r12
movq 0x30(%rsp), %rdx
leaq 0x60(%rsp), %r13
movq (%rdx), %rax
movb (%rax,%rbx), %cl
incq %rbx
movb %cl, (%rax,%r12)
incq %r12
decq %r14
jne 0x3ed7
xorl %r14d, %r14d
movb $0x1, %r15b
movq %rsp, %r12
jmp 0x3f07
movl $0x53, %ebp
xorl %r15d, %r15d
movq %rsp, %r12
leaq 0x60(%rsp), %r13
testb %r15b, %r15b
movq 0x30(%rsp), %r15
je 0x3f2c
movq 0x18(%rsp), %rax
xorl %ecx, %ecx
cmpq 0x10(%rsp), %rax
seta %cl
leal (%rcx,%rcx,2), %r14d
movl $0x33, %eax
cmoval %eax, %ebp
testl %r14d, %r14d
je 0x3c26
jmp 0x3f60
xorl %r14d, %r14d
movb $0x1, %r15b
testq %r13, %r13
je 0x3eff
movq 0x30(%rsp), %rax
movq (%rax), %rax
addq %rax, %rbx
addq %rax, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1130
jmp 0x3eff
movq %r13, %rdi
callq 0xc40a
leaq 0x90(%rsp), %rdi
callq 0xc40a
testl %ebp, %ebp
sete %al
movl 0x5c(%rsp), %r14d
cmovnel %ebp, %r14d
movq %rsp, %r12
leaq 0x60(%rsp), %r13
movl 0x58(%rsp), %r15d
testb %al, %al
jne 0x35b7
jmp 0x4000
movq 0x28(%rsp), %rsi
cmpl $0x0, 0x400(%rsi)
je 0x3fcf
movl $0x120, %edx            # imm = 0x120
leaq 0x60(%rsp), %rdi
movl $0xf, %ecx
callq 0xc529
testl %eax, %eax
je 0x3fd9
movl %eax, %ebp
movq 0x28(%rsp), %rsi
movq %r14, %r9
jmp 0x3bf1
movl $0x40, %ebp
jmp 0x3bf1
movl $0x20, %edx
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
movl $0xf, %ecx
callq 0xc529
movq %r14, %r9
movl %eax, %ebp
jmp 0x3bec
movl %ebp, %r14d
movl %r14d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq