// File: /workspace/github_c_makefile_star2_O3/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 $0x108, %rsp            # imm = 0x108
movq %rcx, 0x78(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq (,%rdx,8), %rax
movq %rax, 0x18(%rsp)
shrq $0x3d, %rdx
setne %cl
cmpq $-0x40, %rax
setae %al
movl $0x69, %ebx
orb %cl, %al
jne 0x3e16
movq %rdi, %r14
leaq 0x8(%rsp), %r13
movq $0x0, 0x18(%r13)
movl $0x0, 0x20(%r13)
xorl %eax, %eax
testl %eax, %eax
jne 0x3df8
movl $0x3, %esi
movq %r13, %rdi
callq 0x2bb8
movl $0x34, %ebx
testl %eax, %eax
je 0x3e16
movl 0x28(%rsp), %edi
movl %edi, %ecx
shrl %ecx
movq 0x20(%rsp), %rax
movl %edi, %edx
shrl $0x3, %edx
leaq 0x3(%rax), %rsi
movl %edx, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
andl $0x3, %ecx
movl %edi, 0x5c(%rsp)
je 0x34c2
cmpl $0x3, %ecx
je 0x3dfc
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
leaq 0xc8(%rsp), %rax
movups %xmm0, (%rax)
movaps %xmm0, 0x80(%rsp)
leaq 0x98(%rsp), %rax
movups %xmm0, (%rax)
cmpl $0x1, %ecx
jne 0x3563
leaq 0xb0(%rsp), %rdi
callq 0xc312
movl %eax, %ebx
testl %eax, %eax
jne 0x3704
leaq 0x80(%rsp), %rdi
callq 0xc3bb
movl %eax, %ebx
jmp 0x3700
movq 0x10(%rsp), %r13
addq $0xa, %rax
shrq $0x3, %rax
leaq 0x4(%rax), %r12
cmpq %r13, %r12
jae 0x3e16
movq 0x8(%rsp), %rbx
movzwl (%rbx,%rax), %ebp
movq 0x78(%rsp), %rcx
cmpl $0x0, 0x4(%rcx)
jne 0x3502
movzwl 0x2(%rbx,%rax), %eax
addl %ebp, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x3e11
movl %ebp, %r15d
movq 0x8(%r14), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0xc226
testl %eax, %eax
je 0x3e03
movl %ebp, %eax
movq %r14, %rbp
leaq (%r12,%r15), %r14
cmpq %r13, %r14
ja 0x3e0a
testl %eax, %eax
je 0x354b
addq %r12, %rbx
movq (%rbp), %rdi
addq 0x8(%rbp), %rdi
subq %r15, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1130
shlq $0x3, %r14
movq %r14, 0x20(%rsp)
xorl %ebx, %ebx
movq %rbp, %r14
leaq 0x8(%rsp), %r13
jmp 0x371e
movl $0xe, %esi
movq %r13, %rdi
callq 0x2b3c
testl %eax, %eax
je 0x36c2
movl 0x28(%rsp), %ebx
movq 0x20(%rsp), %r15
movl %ebx, %eax
shrl $0xe, %eax
movl %eax, 0x28(%rsp)
addq $0xe, %r15
movq %r15, 0x20(%rsp)
movl $0x4c, %edi
callq 0x1140
testq %rax, %rax
je 0x36c9
movq %rax, %rcx
movq %rbx, %rdx
shrl $0xa, %ebx
andl $0xf, %ebx
leaq 0x4(%rbx), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
leaq 0xf8(%rsp), %rax
movups %xmm0, (%rax)
leaq (%rsi,%rsi,2), %rax
addq %r15, %rax
cmpq %r15, %rax
jb 0x36d0
cmpq 0x18(%rsp), %rax
ja 0x36d0
movq %rsi, (%rsp)
movq %r14, 0x68(%rsp)
movl %edx, %eax
andl $0x1f, %eax
shrl $0x5, %edx
movq %rax, 0x50(%rsp)
addq $0x101, %rax            # imm = 0x101
movq %rax, 0x40(%rsp)
andl $0x1f, %edx
incl %edx
movq %rdx, 0x30(%rsp)
leaq 0x10(,%rbx,4), %r15
movq %r13, %r14
xorl %r13d, %r13d
movl $0x3, %esi
movq %r14, %rdi
movq %rcx, %rbp
callq 0x2bb8
movl 0x28(%rsp), %eax
movl %eax, %ecx
andl $0x7, %ecx
shrl $0x3, %eax
movl %eax, 0x28(%rsp)
movq 0x20(%rsp), %r12
addq $0x3, %r12
movq %r12, 0x20(%rsp)
leaq 0xf38b(%rip), %rax      # 0x129e0
movl (%r13,%rax), %eax
movl %ecx, (%rbp,%rax,4)
movq %rbp, %rcx
addq $0x4, %r13
cmpq %r13, %r15
jne 0x3620
cmpl $0x13, (%rsp)
leaq 0xf36b(%rip), %rdx      # 0x129e0
je 0x368b
movl 0x10(%rdx,%rbx,4), %eax
movl $0x0, (%rcx,%rax,4)
incq %rbx
cmpq $0xf, %rbx
jne 0x3677
movl $0x13, %edx
leaq 0xe0(%rsp), %rdi
movq %rcx, %rsi
movl $0x7, %ecx
callq 0xc418
testl %eax, %eax
movq %r14, %r13
movq 0x68(%rsp), %r14
je 0x3a32
movl %eax, %ebx
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rbp, %rcx
jmp 0x36db
movl $0x31, %ebx
jmp 0x3700
movl $0x53, %ebx
jmp 0x3700
xorl %r12d, %r12d
xorl %r15d, %r15d
movl $0x32, %ebx
movq %rcx, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
leaq 0xe0(%rsp), %rdi
callq 0xc2ea
testl %ebx, %ebx
je 0x3732
leaq 0xb0(%rsp), %rdi
callq 0xc2ea
leaq 0x80(%rsp), %rdi
callq 0xc2ea
movl 0x5c(%rsp), %eax
andl $0x1, %eax
testl %ebx, %ebx
je 0x3412
jmp 0x3e16
movq 0xc8(%rsp), %rbx
movq 0xd0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rcx
movq %rbx, 0x48(%rsp)
movq %rcx, %rdx
shrq $0x3, %rdx
movq 0x10(%rsp), %rsi
leaq 0x3(%rdx), %rax
cmpq %rsi, %rax
jae 0x3789
movq 0x8(%rsp), %rax
movl (%rax,%rdx), %eax
jmp 0x37cc
xorl %eax, %eax
cmpq %rsi, %rdx
jae 0x379d
movq 0x8(%rsp), %rax
movzbl (%rax,%rdx), %eax
movl %eax, 0x28(%rsp)
leaq 0x1(%rdx), %rdi
cmpq %rsi, %rdi
jae 0x37b5
movq 0x8(%rsp), %r8
movzbl (%r8,%rdi), %edi
shll $0x8, %edi
orl %edi, %eax
addq $0x2, %rdx
cmpq %rsi, %rdx
jae 0x37cc
movq 0x8(%rsp), %rsi
movzbl (%rsi,%rdx), %edx
shll $0x10, %edx
orl %edx, %eax
andb $0x7, %cl
shrl %cl, %eax
movl %eax, 0x28(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
movq 0x40(%rsp), %rdx
callq 0xc26a
movl %eax, %r15d
cmpl $0xff, %eax
ja 0x3817
movq 0x8(%r14), %rsi
incq %rsi
movq %r14, %rdi
callq 0xc226
testl %eax, %eax
je 0x3a14
movq (%r14), %rax
movq 0x8(%r14), %rcx
movb %r15b, -0x1(%rax,%rcx)
jmp 0x39e1
cmpl $0x100, %r15d           # imm = 0x100
je 0x3a00
cmpl $0x11d, %r15d           # imm = 0x11D
ja 0x3a00
addl $0xfffffeff, %r15d      # imm = 0xFFFFFEFF
leaq 0xefa1(%rip), %rax      # 0x127e0
movl (%rax,%r15,4), %r12d
leaq -0x1c(%r15), %rcx
movq 0x20(%rsp), %rax
cmpq $-0x14, %rcx
jb 0x3875
leaq 0xf007(%rip), %rcx      # 0x12860
movl (%rcx,%r15,4), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
andl 0x28(%rsp), %edx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
addq %rdx, %r12
movq %rax, %rsi
shrq $0x3, %rsi
movq 0x10(%rsp), %rcx
leaq 0x4(%rsi), %rdx
cmpq %rcx, %rdx
jae 0x38aa
movq 0x8(%rsp), %rdx
movl (%rdx,%rsi), %edi
andb $0x7, %al
movl %eax, %ecx
shrl %cl, %edi
movzbl 0x4(%rdx,%rsi), %edx
shll $0x18, %edx
movb $0x8, %cl
subb %al, %cl
shll %cl, %edx
orl %edi, %edx
jmp 0x3907
xorl %edx, %edx
cmpq %rcx, %rsi
jae 0x38ba
movq 0x8(%rsp), %rdx
movzbl (%rdx,%rsi), %edx
leaq 0x1(%rsi), %rdi
cmpq %rcx, %rdi
jae 0x38d2
movq 0x8(%rsp), %r8
movzbl (%r8,%rdi), %edi
shll $0x8, %edi
orl %edi, %edx
leaq 0x2(%rsi), %rdi
cmpq %rcx, %rdi
jae 0x38ea
movq 0x8(%rsp), %r8
movzbl (%r8,%rdi), %edi
shll $0x10, %edi
orl %edi, %edx
addq $0x3, %rsi
cmpq %rcx, %rsi
jae 0x3901
movq 0x8(%rsp), %rcx
movzbl (%rcx,%rsi), %ecx
shll $0x18, %ecx
orl %ecx, %edx
andb $0x7, %al
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x28(%rsp)
movq %r13, %rdi
movq (%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xc26a
cmpl $0x1e, %eax
jae 0x3a1e
movl %eax, %ecx
leaq 0xefb2(%rip), %rdx      # 0x128e0
movl (%rdx,%rcx,4), %edx
cmpl $0x4, %eax
jb 0x395c
leaq 0xf023(%rip), %rax      # 0x12960
movl (%rax,%rcx,4), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
movl 0x28(%rsp), %esi
notl %eax
andl %esi, %eax
shrl %cl, %esi
movl %esi, 0x28(%rsp)
addq %rcx, 0x20(%rsp)
addl %eax, %edx
movq 0x8(%r14), %r15
movl %edx, %ebx
movq %r15, %rbp
subq %rbx, %rbp
jb 0x3d78
leaq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0xc226
testl %eax, %eax
je 0x3d7f
movq %r12, %r13
subq %rbx, %r13
jbe 0x39c0
testq %rbx, %rbx
je 0x39a1
movq (%r14), %rdi
leaq (%rdi,%rbp), %rsi
addq %r15, %rdi
movq %rbx, %rdx
callq 0x1130
addq %rbx, %r15
movq 0x48(%rsp), %rbx
movq (%r14), %rax
movb (%rax,%rbp), %cl
incq %rbp
movb %cl, (%rax,%r15)
incq %r15
decq %r13
jne 0x39a9
jmp 0x39e1
testq %r12, %r12
movq 0x48(%rsp), %rbx
je 0x39e1
movq (%r14), %rax
addq %rax, %rbp
addq %rax, %r15
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1130
movq 0x20(%rsp), %rcx
cmpq 0x18(%rsp), %rcx
leaq 0x8(%rsp), %r13
jbe 0x376a
movl $0x33, %ebx
jmp 0x3704
xorl %ebx, %ebx
cmpl $0x100, %r15d           # imm = 0x100
setne %bl
shll $0x4, %ebx
jmp 0x3704
movl $0x53, %ebx
jmp 0x3704
xorl %ecx, %ecx
cmpl $0x20, %eax
setb %cl
leal 0x10(,%rcx,2), %ebx
jmp 0x3704
movl $0x480, %edi            # imm = 0x480
callq 0x1140
movq %rax, %rbx
movl $0x80, %edi
callq 0x1140
movq %rbx, %rdi
movq %rax, %r15
testq %rbx, %rbx
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x3d8e
xorl %ebx, %ebx
movl $0x480, %edx            # imm = 0x480
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x10e0
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x50(%r15)
movups %xmm0, 0x60(%r15)
movups %xmm0, 0x70(%r15)
movq 0x30(%rsp), %rdx
addl 0x40(%rsp), %edx
movq 0xf8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x50(%rsp), %rcx
leal 0x102(%rcx), %eax
movl %eax, 0x58(%rsp)
negl %ecx
movq %rcx, 0x50(%rsp)
movslq %ecx, %rax
addq $-0x101, %rax           # imm = 0xFEFF
movq %rax, 0x60(%rsp)
movl $0x0, 0x3c(%rsp)
movq %r15, 0x30(%rsp)
movq %rdx, %r15
movq %r12, %rcx
shrq $0x3, %rcx
movq 0x10(%rsp), %rdx
leaq 0x3(%rcx), %rax
cmpq %rdx, %rax
jae 0x3b15
movq 0x8(%rsp), %rax
movl (%rax,%rcx), %eax
jmp 0x3b53
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0x3b25
movq 0x8(%rsp), %rax
movzbl (%rax,%rcx), %eax
leaq 0x1(%rcx), %rsi
cmpq %rdx, %rsi
jae 0x3b3c
movq 0x8(%rsp), %rdi
movzbl (%rdi,%rsi), %esi
shll $0x8, %esi
orl %esi, %eax
addq $0x2, %rcx
cmpq %rdx, %rcx
jae 0x3b53
movq 0x8(%rsp), %rdx
movzbl (%rdx,%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
andb $0x7, %r12b
movl %r12d, %ecx
shrl %cl, %eax
movl %eax, 0x28(%rsp)
movq %r13, %rdi
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0xc26a
cmpl $0xf, %eax
ja 0x3ba9
movq 0x40(%rsp), %rcx
cmpl %ecx, %ebx
movl $0x0, %edx
cmovbl %edx, %ecx
movq 0x30(%rsp), %r8
movq %r8, %rdx
cmovbq (%rsp), %rdx
movl %ebx, %esi
subl %ecx, %esi
movl %eax, (%rdx,%rsi,4)
incl %ebx
movq 0x20(%rsp), %r12
movq %r15, %r10
jmp 0x3d2f
cmpw $0x12, %ax
movq 0x30(%rsp), %r8
movq 0x40(%rsp), %r9
movq %r15, %r10
movq 0x60(%rsp), %r11
je 0x3cb5
movzwl %ax, %eax
cmpl $0x11, %eax
je 0x3c5f
movq %rbp, %rcx
cmpl $0x10, %eax
jne 0x3db2
testl %ebx, %ebx
je 0x3db9
movl 0x28(%rsp), %ecx
movl %ecx, %eax
andl $0x3, %eax
shrl $0x2, %ecx
movl %ecx, 0x28(%rsp)
movq 0x20(%rsp), %r12
addq $0x2, %r12
movq %r12, 0x20(%rsp)
leal -0x1(%rbx), %ecx
cmpl 0x58(%rsp), %ebx
movq (%rsp), %rsi
leaq (%rsi,%rcx,4), %rcx
movq 0x50(%rsp), %rdx
leal -0x102(%rbx,%rdx), %edx
leaq (%r8,%rdx,4), %rdx
cmovbq %rcx, %rdx
movl (%rdx), %ecx
movl %ebx, %edx
negl %ebx
leaq (%rsi,%rdx,4), %rsi
addl $0x3, %eax
cmpq %r10, %rdx
jae 0x3d25
leal (%r11,%rdx), %edi
cmpq %r9, %rdx
leaq (%r8,%rdi,4), %rdi
cmovbq %rsi, %rdi
movl %ecx, (%rdi)
incq %rdx
decl %ebx
addq $0x4, %rsi
decl %eax
jne 0x3c33
jmp 0x3d09
movl 0x28(%rsp), %ecx
movl %ecx, %eax
andl $0x7, %eax
shrl $0x3, %ecx
movl %ecx, 0x28(%rsp)
movq 0x20(%rsp), %r12
addq $0x3, %r12
movq %r12, 0x20(%rsp)
movl %ebx, %ecx
negl %ebx
movq (%rsp), %rdx
leaq (%rdx,%rcx,4), %rdx
addl $0x3, %eax
cmpq %r10, %rcx
jae 0x3d0d
leal (%r11,%rcx), %esi
cmpq %r9, %rcx
leaq (%r8,%rsi,4), %rsi
cmovbq %rdx, %rsi
movl $0x0, (%rsi)
incq %rcx
decl %ebx
addq $0x4, %rdx
decl %eax
jne 0x3c8c
jmp 0x3d09
movl 0x28(%rsp), %ecx
movl %ecx, %eax
andl $0x7f, %eax
shrl $0x7, %ecx
movl %ecx, 0x28(%rsp)
movq 0x20(%rsp), %r12
addq $0x7, %r12
movq %r12, 0x20(%rsp)
movl %ebx, %ecx
negl %ebx
movq (%rsp), %rdx
leaq (%rdx,%rcx,4), %rdx
addl $0xb, %eax
cmpq %r10, %rcx
jae 0x3d19
leal (%r11,%rcx), %esi
cmpq %r9, %rcx
leaq (%r8,%rsi,4), %rsi
cmovbq %rdx, %rsi
movl $0x0, (%rsi)
incq %rcx
decl %ebx
addq $0x4, %rdx
decl %eax
jne 0x3ce2
negl %ebx
jmp 0x3d2f
negl %ebx
movl $0xe, 0x3c(%rsp)
jmp 0x3d2f
negl %ebx
movl $0xf, 0x3c(%rsp)
jmp 0x3d2f
negl %ebx
movl $0xd, 0x3c(%rsp)
cmpq 0x18(%rsp), %r12
ja 0x3d9e
cmpl %r10d, %ebx
jb 0x3af6
movl 0x3c(%rsp), %ebx
testl %ebx, %ebx
jne 0x3da3
movq (%rsp), %r12
cmpl $0x0, 0x400(%r12)
je 0x3dc0
movl $0x120, %edx            # imm = 0x120
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
movl $0xf, %ecx
callq 0xc418
testl %eax, %eax
je 0x3dd2
movl %eax, %ebx
jmp 0x3dc5
movl $0x34, %ebx
jmp 0x3d84
movl $0x53, %ebx
leaq 0x8(%rsp), %r13
jmp 0x3704
movl $0x53, %ebx
movq %rbp, %rcx
movq %rdi, %r12
jmp 0x36db
movl $0x32, %ebx
movq %rbp, %rcx
movq (%rsp), %r12
movq %r8, %r15
jmp 0x36db
movl $0x10, %ebx
jmp 0x3da6
movl $0x36, %ebx
jmp 0x3da6
movl $0x40, %ebx
movq %rbp, %rcx
movq 0x30(%rsp), %r15
jmp 0x36db
movl $0x20, %edx
leaq 0x80(%rsp), %rdi
movq 0x30(%rsp), %r15
movq %r15, %rsi
movl $0xf, %ecx
callq 0xc418
movl %eax, %ebx
jmp 0x36bd
xorl %ebx, %ebx
jmp 0x3e16
movl $0x14, %ebx
jmp 0x3e16
movl $0x53, %ebx
jmp 0x3e16
movl $0x17, %ebx
jmp 0x3e16
movl $0x15, %ebx
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq