LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/generot[P]VM-0/src/lang/vc.cc
// Function: cond_while(lexer&)
void cond_while(lexer& lx) {
    if(!EXPECT("while"))
        return;

    lx.accept();
    size_t curr_addr = bytecode.size();

    expr(lx);
    block(lx);

    bytecode.push_back({ INST_ADDR, OPC_JNZ, SC_INVALID, (size_s)curr_addr });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3900(%rip), %rsi      # 0x180c8
leaq 0x38fe(%rip), %rdx      # 0x180cd
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x59ce
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %ebp
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x14802
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42d0
testb %bpl, %bpl
je 0x148b9
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c32
movq (%r14), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x14835
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x42d0
movq 0xcf24(%rip), %rax      # 0x21760
subq 0xcf15(%rip), %rax      # 0x21758
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r14
movq %rbx, %rdi
callq 0x14ecf
movq %rbx, %rdi
callq 0x1421e
movabsq $0x2100000001, %rax     # imm = 0x2100000001
movq %rax, (%rsp)
movl $0x3, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq 0xced9(%rip), %rsi      # 0x21760
cmpq 0xceda(%rip), %rsi      # 0x21768
je 0x148aa
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xceb8(%rip)     # 0x21760
jmp 0x148b9
leaq 0xcea7(%rip), %rdi      # 0x21758
movq %rsp, %rdx
callq 0x16660
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x148de
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_c_makefile_star2_O1/generot[P]VM-0/src/lang/vc.cc
// Function: call(lexer&)
void call(lexer& lx) {
    if(!EXPECT("call"))
        return;
    
    lx.accept();
    string ident = lx.accept();
    symbol func = symbol_table[ident];

    if(func.ident == string())
        ISSUE_ERROR("Undefined reference to function \"%s\".", ident.c_str());

    bytecode.push_back({ INST_ADDR, OPC_CALL, SC_INVALID, func.addr });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x37c8(%rip), %rsi      # 0x180ce
leaq 0x37c5(%rip), %rdx      # 0x180d2
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x59ce
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %ebp
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x14940
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42d0
testb %bpl, %bpl
je 0x14a61
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c32
movq (%r14), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1497c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c32
leaq 0xcd95(%rip), %rdi      # 0x21728
movq %r14, %rsi
callq 0x160b6
movq %rax, %rbx
movl (%rax), %eax
leaq 0x20(%rsp), %rdi
movl %eax, -0x8(%rdi)
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
callq 0x585e
movq 0x28(%rbx), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x14a6f
movabsq $0x2300000001, %rax     # imm = 0x2300000001
movq %rax, (%rsp)
movl $0x3, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xcd63(%rip), %rsi      # 0x21760
cmpq 0xcd64(%rip), %rsi      # 0x21768
je 0x14a20
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xcd42(%rip)     # 0x21760
jmp 0x14a2f
leaq 0xcd31(%rip), %rdi      # 0x21758
movq %rsp, %rdx
callq 0x16660
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x14a46
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14a61
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rsp), %rdi
callq 0x47ee
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x14a98
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x14a98
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14ac7
movq 0x58(%rsp), %rsi
jmp 0x14abf
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x14ac7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_c_makefile_star2_O1/generot[P]VM-0/src/lang/vc.cc
// Function: expr(lexer&)
void expr(lexer& lx) {
    comp(lx);
    while(EXPECT("&&") || EXPECT("||")) {
        opcode opc = lx.accept() == "&&" ? OPC_AND : OPC_OR;
        comp(lx);

        bytecode.push_back({ INST_NOARGS, opc });
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0x150a9
leaq 0x3239(%rip), %r15      # 0x18125
leaq 0x8(%rsp), %r13
leaq 0x28(%rsp), %r14
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %r12
movq %r15, %rsi
leaq 0x3212(%rip), %rdx      # 0x18127
callq 0x59ce
movq %rbx, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %ebp
movb $0x1, %r15b
testb %al, %al
jne 0x14f63
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0x31e1(%rip), %rsi      # 0x18128
leaq 0x31dc(%rip), %rdx      # 0x1812a
callq 0x59ce
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %r15d
testb %bpl, %bpl
jne 0x14f84
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x14f84
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42d0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x14fa0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
testb %r15b, %r15b
je 0x15050
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4c32
movq %r13, %rdi
movq %r12, %r15
movq %r12, %rsi
callq 0x40a0
cmpl $0x1, %eax
movl $0x19, %ebp
sbbl $0x0, %ebp
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x14fe9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x150a9
movl $0x2, 0x8(%rsp)
movl %ebp, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0xc74b(%rip), %rsi      # 0x21760
cmpq 0xc74c(%rip), %rsi      # 0x21768
je 0x1503c
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xc729(%rip)     # 0x21760
jmp 0x14ef6
leaq 0xc715(%rip), %rdi      # 0x21758
movq %r13, %rdx
callq 0x16660
jmp 0x14ef6
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15082
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x15085
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x15085
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x150a1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_c_makefile_star2_O1/generot[P]VM-0/src/lang/vc.cc
// Function: term(lexer&)
void term(lexer& lx) {
    factor(lx);
    while(EXPECT("+") || EXPECT("-")) {
        opcode opc = lx.accept() == "+" ? OPC_ADDF : OPC_SUBF;
        factor(lx);

        bytecode.push_back({ INST_NOARGS, opc });
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0x15780
leaq 0x2b68(%rip), %r15      # 0x1812b
leaq 0x8(%rsp), %r13
leaq 0x28(%rsp), %r14
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %r12
movq %r15, %rsi
leaq 0x2b40(%rip), %rdx      # 0x1812c
callq 0x59ce
movq %rbx, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %ebp
movb $0x1, %r15b
testb %al, %al
jne 0x1563a
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0x2b0f(%rip), %rsi      # 0x1812d
leaq 0x2b09(%rip), %rdx      # 0x1812e
callq 0x59ce
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %r15d
testb %bpl, %bpl
jne 0x1565b
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1565b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42d0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x15677
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
testb %r15b, %r15b
je 0x15727
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4c32
movq %r13, %rdi
movq %r12, %r15
movq %r12, %rsi
callq 0x40a0
cmpl $0x1, %eax
movl $0x15, %ebp
sbbl $0x0, %ebp
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x156c0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x15780
movl $0x2, 0x8(%rsp)
movl %ebp, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0xc074(%rip), %rsi      # 0x21760
cmpq 0xc075(%rip), %rsi      # 0x21768
je 0x15713
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xc052(%rip)     # 0x21760
jmp 0x155cd
leaq 0xc03e(%rip), %rdi      # 0x21758
movq %r13, %rdx
callq 0x16660
jmp 0x155cd
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15759
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1575c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x1575c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x15778
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_c_makefile_star2_O1/generot[P]VM-0/src/lang/vc.cc
// Function: factor(lexer&)
void factor(lexer& lx) {
    value(lx);
    while(EXPECT("*") || EXPECT("/")) {
        opcode opc = lx.accept() == "*" ? OPC_MULTF : OPC_DIVF;
        value(lx);

        bytecode.push_back({ INST_NOARGS, opc });
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0x1595a
leaq 0x2992(%rip), %r15      # 0x1812f
leaq 0x8(%rsp), %r13
leaq 0x28(%rsp), %r14
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %r12
movq %r15, %rsi
leaq 0x296a(%rip), %rdx      # 0x18130
callq 0x59ce
movq %rbx, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %ebp
movb $0x1, %r15b
testb %al, %al
jne 0x15814
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0x1926(%rip), %rsi      # 0x1711e
leaq 0x1920(%rip), %rdx      # 0x1711f
callq 0x59ce
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4ab4
movl %eax, %r15d
testb %bpl, %bpl
jne 0x15835
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x15835
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42d0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x15851
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
testb %r15b, %r15b
je 0x15901
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4c32
movq %r13, %rdi
movq %r12, %r15
movq %r12, %rsi
callq 0x40a0
cmpl $0x1, %eax
movl $0x17, %ebp
sbbl $0x0, %ebp
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1589a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x1595a
movl $0x2, 0x8(%rsp)
movl %ebp, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0xbe9a(%rip), %rsi      # 0x21760
cmpq 0xbe9b(%rip), %rsi      # 0x21768
je 0x158ed
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xbe78(%rip)     # 0x21760
jmp 0x157a7
leaq 0xbe64(%rip), %rdi      # 0x21758
movq %r13, %rdx
callq 0x16660
jmp 0x157a7
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15933
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x15936
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x15936
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x15952
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_load_file
unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename) {
  long size = lodepng_filesize(filename);
  if(size < 0) return 78;
  *outsize = (size_t)size;

  *out = (unsigned char*)lodepng_malloc((size_t)size);
  if(!(*out) && size > 0) return 83; /*the above malloc failed*/

  return lodepng_buffer_file(*out, (size_t)size, filename);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
leaq 0x112c8(%rip), %rsi     # 0x13da1
movq %rdx, %rdi
callq 0x1190
testq %rax, %rax
je 0x2b2d
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1160
movq $-0x1, %r14
testl %eax, %eax
jne 0x2b23
movq %r13, %rdi
callq 0x1120
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
movq $-0x1, %r14
cmovneq %rax, %r14
movq %r13, %rdi
callq 0x1090
jmp 0x2b34
movq $-0x1, %r14
movl $0x4e, %eax
testq %r14, %r14
js 0x2bac
movq %r14, (%r12)
movq %r14, %rdi
callq 0x1140
movq %rax, %r12
movq %rax, (%r15)
testq %rax, %rax
sete %cl
testq %r14, %r14
setne %dl
movl $0x53, %eax
testb %cl, %dl
jne 0x2bac
leaq 0x11235(%rip), %rsi     # 0x13da1
movq %rbx, %rdi
callq 0x1190
movq %rax, %rbx
movl $0x4e, %eax
testq %rbx, %rbx
je 0x2bac
movl $0x1, %esi
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1080
movq %rax, %r15
movq %rbx, %rdi
callq 0x1090
xorl %ecx, %ecx
cmpq %r14, %r15
movl $0x4e, %eax
cmovel %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_save_file
unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) {
  FILE* file;
  file = fopen(filename, "wb" );
  if(!file) return 79;
  fwrite(buffer, 1, buffersize, file);
  fclose(file);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xffbd(%rip), %rsi      # 0x12b85
movq %rdx, %rdi
callq 0x1190
testq %rax, %rax
je 0x2bf7
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x11d0
movq %r15, %rdi
callq 0x1090
xorl %eax, %eax
jmp 0x2bfc
movl $0x4f, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: ensureBits17
static unsigned ensureBits17(LodePNGBitReader* reader, size_t nbits) {
  size_t start = reader->bp >> 3u;
  size_t size = reader->size;
  if(start + 2u < size) {
    reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) |
                     ((unsigned)reader->data[start + 2] << 16u);
    reader->buffer >>= (reader->bp & 7u);
    return 1;
  } else {
    reader->buffer = 0;
    if(start + 0u < size) reader->buffer |= reader->data[start + 0];
    if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u);
    reader->buffer >>= (reader->bp & 7u);
    return reader->bp + nbits <= reader->bitsize;
  }
}

// Assembly:
movq 0x8(%rdi), %rdx
movq 0x18(%rdi), %rax
movq %rax, %rcx
shrq $0x3, %rcx
leaq 0x2(%rcx), %r8
cmpq %rdx, %r8
jae 0x2e49
movq (%rdi), %rdx
movzwl (%rdx,%rcx), %esi
movzbl 0x2(%rdx,%rcx), %edx
shll $0x10, %edx
orl %esi, %edx
andb $0x7, %al
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x20(%rdi)
movl $0x1, %eax
retq
movl $0x0, 0x20(%rdi)
cmpq %rdx, %rcx
jae 0x2e61
movq (%rdi), %r8
movzbl (%r8,%rcx), %r8d
movl %r8d, 0x20(%rdi)
incq %rcx
cmpq %rdx, %rcx
jae 0x2e76
movq (%rdi), %rdx
movzbl (%rdx,%rcx), %ecx
shll $0x8, %ecx
orl %ecx, 0x20(%rdi)
movl %eax, %ecx
andb $0x7, %cl
shrl %cl, 0x20(%rdi)
addq %rax, %rsi
xorl %eax, %eax
cmpq 0x10(%rdi), %rsi
setbe %al
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: ensureBits9
static unsigned ensureBits9(LodePNGBitReader* reader, size_t nbits) {
  size_t start = reader->bp >> 3u;
  size_t size = reader->size;
  if(start + 1u < size) {
    reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u);
    reader->buffer >>= (reader->bp & 7u);
    return 1;
  } else {
    reader->buffer = 0;
    if(start + 0u < size) reader->buffer |= reader->data[start + 0];
    reader->buffer >>= (reader->bp & 7u);
    return reader->bp + nbits <= reader->bitsize;
  }
}

// Assembly:
movq 0x8(%rdi), %rdx
movq 0x18(%rdi), %rax
movq %rax, %rcx
shrq $0x3, %rcx
leaq 0x1(%rcx), %r8
cmpq %rdx, %r8
jae 0x2eb9
movq (%rdi), %rdx
movzwl (%rdx,%rcx), %edx
andb $0x7, %al
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x20(%rdi)
movl $0x1, %eax
retq
movl $0x0, 0x20(%rdi)
cmpq %rdx, %rcx
jae 0x2ecf
movq (%rdi), %rdx
movzbl (%rdx,%rcx), %ecx
movl %ecx, 0x20(%rdi)
movl %eax, %ecx
andb $0x7, %cl
shrl %cl, 0x20(%rdi)
addq %rax, %rsi
xorl %eax, %eax
cmpq 0x10(%rdi), %rsi
setbe %al
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_inflate
unsigned lodepng_inflate(unsigned char** out, size_t* outsize,
                         const unsigned char* in, size_t insize,
                         const LodePNGDecompressSettings* settings) {
  ucvector v = ucvector_init(*out, *outsize);
  unsigned error = lodepng_inflatev(&v, in, insize, settings);
  *out = v.data;
  *outsize = v.size;
  return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rsi), %rsi
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %rsi, 0x8(%r15)
movq %rsi, 0x10(%r15)
movq %r15, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x353d
movq (%r15), %rcx
movq %rcx, (%r14)
movq 0x8(%r15), %rcx
movq %rcx, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_zlib_decompressv
static unsigned lodepng_zlib_decompressv(ucvector* out,
                                         const unsigned char* in, size_t insize,
                                         const LodePNGDecompressSettings* settings) {
  unsigned error = 0;
  unsigned CM, CINFO, FDICT;

  if(insize < 2) return 53; /*error, size of zlib data too small*/
  /*read information from zlib header*/
  if((in[0] * 256 + in[1]) % 31 != 0) {
    /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/
    return 24;
  }

  CM = in[0] & 15;
  CINFO = (in[0] >> 4) & 15;
  /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/
  FDICT = (in[1] >> 5) & 1;
  /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/

  if(CM != 8 || CINFO > 7) {
    /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/
    return 25;
  }
  if(FDICT != 0) {
    /*error: the specification of PNG says about the zlib stream:
      "The additional flags shall not specify a preset dictionary."*/
    return 26;
  }

  error = inflatev(out, in + 2, insize - 2, settings);
  if(error) return error;

  if(!settings->ignore_adler32) {
    unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]);
    unsigned checksum = adler32(out->data, (unsigned)(out->size));
    if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/
  }

  return 0; /*no error*/
}

// Assembly:
movl $0x35, %eax
cmpq $0x2, %rdx
jb 0x5070
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movzbl (%rsi), %edx
movl %edx, %eax
shll $0x8, %eax
movzbl 0x1(%rsi), %ecx
orl %ecx, %eax
imull $0xbdef7bdf, %eax, %esi # imm = 0xBDEF7BDF
movl $0x18, %eax
cmpl $0x8421084, %esi        # imm = 0x8421084
ja 0x5068
movl %edx, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %dl, %dl
sets %dl
orb %al, %dl
movl $0x19, %eax
jne 0x5068
movl $0x1a, %eax
testb $0x20, %cl
jne 0x5068
movq %rdi, %rbx
leaq 0x2(%r15), %rdx
leaq -0x2(%r14), %rcx
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x502d
leaq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r12, %r8
callq *%rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x503e
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r12, %rcx
callq 0x353d
testl %eax, %eax
jne 0x5068
cmpl $0x0, (%r12)
jne 0x5066
movl -0x4(%r15,%r14), %ebp
bswapl %ebp
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0x51d4
movl %eax, %ecx
movl $0x3a, %eax
cmpl %ebp, %ecx
jne 0x5068
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: adler32
static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) {
  unsigned s1 = adler & 0xffffu;
  unsigned s2 = (adler >> 16u) & 0xffffu;

  while(len != 0u) {
    unsigned i;
    /*at least 5552 sums can be done before the sums overflow, saving a lot of module divisions*/
    unsigned amount = len > 5552u ? 5552u : len;
    len -= amount;
    for(i = 0; i != amount; ++i) {
      s1 += (*data++);
      s2 += s1;
    }
    s1 %= 65521u;
    s2 %= 65521u;
  }

  return (s2 << 16u) | s1;
}

// Assembly:
testl %esi, %esi
je 0x5261
pushq %rbp
pushq %r14
pushq %rbx
movl $0x1, %ecx
xorl %eax, %eax
movl $0x15b0, %edx           # imm = 0x15B0
movl $0x15b0, %r8d           # imm = 0x15B0
movl $0x80078071, %r9d       # imm = 0x80078071
cmpl %edx, %esi
movl $0x15b0, %r10d          # imm = 0x15B0
cmovbl %esi, %r10d
leal -0x1(%r10), %r11d
movl %esi, %ebx
cmpq %r8, %rbx
cmovaeq %r8, %rbx
xorl %r14d, %r14d
movzbl (%rdi,%r14), %ebp
addl %ebp, %ecx
addl %ecx, %eax
incq %r14
cmpl %r14d, %ebx
jne 0x5214
movl %ecx, %ebx
imulq %r9, %rbx
shrq $0x2f, %rbx
imull $0xfff1, %ebx, %ebx     # imm = 0xFFF1
subl %ebx, %ecx
movl %eax, %ebx
imulq %r9, %rbx
shrq $0x2f, %rbx
imull $0xfff1, %ebx, %ebx     # imm = 0xFFF1
subl %ebx, %eax
movl %r11d, %r11d
addq %r11, %rdi
incq %rdi
subl %r10d, %esi
jne 0x51f8
shll $0x10, %eax
orl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_crc32
unsigned lodepng_crc32(const unsigned char* data, size_t length) {
  unsigned r = 0xffffffffu;
  size_t i;
  for(i = 0; i < length; ++i) {
    r = lodepng_crc32_table[(r ^ data[i]) & 0xffu] ^ (r >> 8u);
  }
  return r ^ 0xffffffffu;
}

// Assembly:
testq %rsi, %rsi
je 0x52ca
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
leaq 0xd033(%rip), %rdx      # 0x122e0
movb (%rdi,%rcx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rdx,%r8,4), %eax
incq %rcx
cmpq %rcx, %rsi
jne 0x52ad
notl %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_next
unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end) {
  if(chunk >= end || end - chunk < 12) return end; /*too small to contain a chunk*/
  if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47
    && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) {
    /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */
    return chunk + 8;
  } else {
    size_t total_chunk_length;
    unsigned char* result;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    result = chunk + total_chunk_length;
    if(result < chunk) return end; /*pointer overflow*/
    return result;
  }
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
subq %rdi, %rcx
setbe %dl
cmpq $0xc, %rcx
setl %cl
orb %dl, %cl
jne 0x547d
movzbl (%rdi), %eax
cmpq $0x89, %rax
jne 0x5459
cmpb $0x50, 0x1(%rdi)
jne 0x5459
cmpb $0x4e, 0x2(%rdi)
jne 0x5459
cmpb $0x47, 0x3(%rdi)
jne 0x5459
cmpb $0xd, 0x4(%rdi)
jne 0x5459
cmpb $0xa, 0x5(%rdi)
jne 0x5459
cmpb $0x1a, 0x6(%rdi)
jne 0x5459
cmpb $0xa, 0x7(%rdi)
jne 0x5459
addq $0x8, %rdi
movq %rdi, %rax
retq
shll $0x18, %eax
movzbl 0x1(%rdi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x3(%rdi), %ecx
orq %rax, %rcx
leaq (%rdi,%rcx), %rax
addq $0xc, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_next_const
const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end) {
  if(chunk >= end || end - chunk < 12) return end; /*too small to contain a chunk*/
  if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47
    && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) {
    /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */
    return chunk + 8;
  } else {
    size_t total_chunk_length;
    const unsigned char* result;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    result = chunk + total_chunk_length;
    if(result < chunk) return end; /*pointer overflow*/
    return result;
  }
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
subq %rdi, %rcx
setbe %dl
cmpq $0xc, %rcx
setl %cl
orb %dl, %cl
jne 0x54f6
movzbl (%rdi), %eax
cmpq $0x89, %rax
jne 0x54d2
cmpb $0x50, 0x1(%rdi)
jne 0x54d2
cmpb $0x4e, 0x2(%rdi)
jne 0x54d2
cmpb $0x47, 0x3(%rdi)
jne 0x54d2
cmpb $0xd, 0x4(%rdi)
jne 0x54d2
cmpb $0xa, 0x5(%rdi)
jne 0x54d2
cmpb $0x1a, 0x6(%rdi)
jne 0x54d2
cmpb $0xa, 0x7(%rdi)
jne 0x54d2
addq $0x8, %rdi
movq %rdi, %rax
retq
shll $0x18, %eax
movzbl 0x1(%rdi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x3(%rdi), %ecx
orq %rax, %rcx
leaq (%rdi,%rcx), %rax
addq $0xc, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_find
unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]) {
  for(;;) {
    if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */
    if(lodepng_chunk_type_equals(chunk, type)) return chunk;
    chunk = lodepng_chunk_next(chunk, end);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
subq %rdi, %rax
setbe %cl
cmpq $0xc, %rax
setl %al
orb %cl, %al
je 0x5518
xorl %r14d, %r14d
jmp 0x5554
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %r12
xorl %r14d, %r14d
movq %r15, %rdi
movq %r12, %rsi
callq 0x52e9
testb %al, %al
jne 0x5551
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5405
movq %rax, %r15
movq %rbx, %rax
subq %r15, %rax
jbe 0x5554
cmpq $0xb, %rax
jg 0x5524
jmp 0x5554
movq %r15, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_find_const
const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]) {
  for(;;) {
    if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */
    if(lodepng_chunk_type_equals(chunk, type)) return chunk;
    chunk = lodepng_chunk_next_const(chunk, end);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
subq %rdi, %rax
setbe %cl
cmpq $0xc, %rax
setl %al
orb %cl, %al
je 0x5584
xorl %r14d, %r14d
jmp 0x55c0
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %r12
xorl %r14d, %r14d
movq %r15, %rdi
movq %r12, %rsi
callq 0x52e9
testb %al, %al
jne 0x55bd
movq %r15, %rdi
movq %rbx, %rsi
callq 0x547e
movq %rax, %r15
movq %rbx, %rax
subq %r15, %rax
jbe 0x55c0
cmpq $0xb, %rax
jg 0x5590
jmp 0x55c0
movq %r15, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_append
unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk) {
  unsigned i;
  size_t total_chunk_length, new_length;
  unsigned char *chunk_start, *new_buffer;

  if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return 77;
  if(lodepng_addofl(*outsize, total_chunk_length, &new_length)) return 77;

  new_buffer = (unsigned char*)lodepng_realloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*out) = new_buffer;
  (*outsize) = new_length;
  chunk_start = &(*out)[new_length - total_chunk_length];

  for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i];

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdx), %r13d
bswapl %r13d
addq $0xc, %r13
movq (%rsi), %rbp
movq %r13, %r12
movl $0x4d, %eax
addq %rbp, %r12
jb 0x5632
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
movq %r12, %rsi
callq 0x1170
testq %rax, %rax
je 0x562d
movq %rax, (%r15)
movq %r12, (%r14)
addq %rax, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
movb %dl, (%rbp,%rcx)
incq %rcx
movl %ecx, %edx
cmpq %rdx, %r13
jne 0x561a
jmp 0x5632
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_create
unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize,
                              unsigned length, const char* type, const unsigned char* data) {
  ucvector v = ucvector_init(*out, *outsize);
  unsigned error = lodepng_chunk_createv(&v, length, type, data);
  *out = v.data;
  *outsize = v.size;
  return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rsi), %rsi
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %rsi, 0x8(%r15)
movq %rsi, 0x10(%r15)
movq %r15, %rdi
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x568d
movq (%r15), %rcx
movq %rcx, (%r14)
movq 0x8(%r15), %rcx
movq %rcx, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_createv
static unsigned lodepng_chunk_createv(ucvector* out,
                                      unsigned length, const char* type, const unsigned char* data) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, length, type));

  /*3: the data*/
  lodepng_memcpy(chunk + 8, data, length);

  /*4: CRC (of the chunkname characters and the data)*/
  lodepng_chunk_generate_crc(chunk);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %rcx
movl %esi, %ebp
movq %rdi, %rsi
leaq 0x8(%rsp), %rdi
movl %ebp, %edx
callq 0xd3f7
testl %eax, %eax
jne 0x56d1
movq 0x8(%rsp), %r14
testl %ebp, %ebp
je 0x56c7
movl %ebp, %edx
leaq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x1130
movq %r14, %rdi
callq 0x53c4
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_color_mode_copy
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) {
  lodepng_color_mode_cleanup(dest);
  lodepng_memcpy(dest, source, sizeof(LodePNGColorMode));
  if(source->palette) {
    dest->palette = (unsigned char*)lodepng_malloc(1024);
    if(!dest->palette && source->palettesize) return 83; /*alloc fail*/
    lodepng_memcpy(dest->palette, source->palette, source->palettesize * 4);
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x574c
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
cmpq $0x0, 0x8(%rbx)
je 0x579d
movl $0x400, %edi            # imm = 0x400
callq 0x1140
movq %rax, (%r15)
testq %rax, %rax
je 0x57a7
movq 0x10(%rbx), %rdx
shlq $0x2, %rdx
testq %rdx, %rdx
je 0x579d
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x1130
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x53, %ecx
cmpq $0x0, 0x10(%rbx)
jne 0x579f
jmp 0x5784
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_color_mode_make
LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth) {
  LodePNGColorMode result;
  lodepng_color_mode_init(&result);
  result.colortype = colortype;
  result.bitdepth = bitdepth;
  return result;
}

// Assembly:
movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_palette_add
unsigned lodepng_palette_add(LodePNGColorMode* info,
                             unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
  if(!info->palette) /*allocate palette if empty*/ {
    lodepng_color_mode_alloc_palette(info);
    if(!info->palette) return 83; /*alloc fail*/
  }
  if(info->palettesize >= 256) {
    return 108; /*too many palette values*/
  }
  info->palette[4 * info->palettesize + 0] = r;
  info->palette[4 * info->palettesize + 1] = g;
  info->palette[4 * info->palettesize + 2] = b;
  info->palette[4 * info->palettesize + 3] = a;
  ++info->palettesize;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
jne 0x57f5
movq %r14, %rdi
callq 0x584b
cmpq $0x0, 0x8(%r14)
je 0x583d
movq 0x10(%r14), %rcx
movl $0x6c, %eax
cmpq $0xff, %rcx
ja 0x5842
movq 0x8(%r14), %rax
movb %r12b, (%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r15b, 0x1(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bpl, 0x2(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bl, 0x3(%rax,%rcx,4)
incq 0x10(%r14)
xorl %eax, %eax
jmp 0x5842
movl $0x53, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_color_mode_alloc_palette
static void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) {
  size_t i;
  /*if the palette is already allocated, it will have size 1024 so no reallocation needed in that case*/
  /*the palette must have room for up to 256 colors with 4 bytes each.*/
  if(!info->palette) info->palette = (unsigned char*)lodepng_malloc(1024);
  if(!info->palette) return; /*alloc fail*/
  for(i = 0; i != 256; ++i) {
    /*Initialize all unused colors with black, the value used for invalid palette indices.
    This is an error according to the PNG spec, but common PNG decoders make it black instead.
    That makes color conversion slightly faster due to no error handling needed.*/
    info->palette[i * 4 + 0] = 0;
    info->palette[i * 4 + 1] = 0;
    info->palette[i * 4 + 2] = 0;
    info->palette[i * 4 + 3] = 255;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
jne 0x5864
movl $0x400, %edi            # imm = 0x400
callq 0x1140
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x8(%rbx)
je 0x589b
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb %al, (%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb %al, 0x1(%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb %al, 0x2(%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb $-0x1, 0x3(%rdx,%rcx,4)
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x586f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_has_palette_alpha
unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info) {
  size_t i;
  for(i = 0; i != info->palettesize; ++i) {
    if(info->palette[i * 4 + 3] < 255) return 1;
  }
  return 0;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x5927
movq 0x8(%rdi), %rcx
xorl %edx, %edx
cmpb $-0x1, 0x3(%rcx,%rdx,4)
jne 0x592a
incq %rdx
cmpq %rdx, %rax
jne 0x5918
xorl %eax, %eax
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_add_text_sized
static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t size) {
  char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1)));

  if(new_keys) info->text_keys = new_keys;
  if(new_strings) info->text_strings = new_strings;

  if(!new_keys || !new_strings) return 83; /*alloc fail*/

  ++info->text_num;
  info->text_keys[info->text_num - 1] = alloc_string(key);
  info->text_strings[info->text_num - 1] = alloc_string_sized(str, size);
  if(!info->text_keys[info->text_num - 1] || !info->text_strings[info->text_num - 1]) return 83; /*alloc fail*/

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1170
movq %rax, %r13
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1170
testq %r13, %r13
je 0x5a04
movq %r13, 0x50(%rbx)
testq %rax, %rax
je 0x5a0d
movq %rax, 0x58(%rbx)
testq %rax, %rax
sete %al
testq %r13, %r13
sete %cl
movl $0x53, %ebp
orb %al, %cl
jne 0x5a8d
incq 0x48(%rbx)
movq %r12, %rdi
callq 0xd478
movq 0x48(%rbx), %r13
movq 0x50(%rbx), %rcx
movq %rax, -0x8(%rcx,%r13,8)
leaq 0x1(%r14), %rdi
callq 0x1140
movq %rax, %r12
testq %rax, %rax
je 0x5a64
testq %r14, %r14
je 0x5a5f
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1130
movb $0x0, (%r12,%r14)
movq 0x58(%rbx), %rax
movq %r12, -0x8(%rax,%r13,8)
movq 0x50(%rbx), %rax
cmpq $0x0, -0x8(%rax,%r13,8)
je 0x5a8d
movq 0x58(%rbx), %rax
xorl %ecx, %ecx
cmpq $0x0, -0x8(%rax,%r13,8)
movl $0x53, %ebp
cmovnel %ecx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_add_itext_sized
static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag,
                                        const char* transkey, const char* str, size_t size) {
  char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1)));
  char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1)));
  char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1)));

  if(new_keys) info->itext_keys = new_keys;
  if(new_langtags) info->itext_langtags = new_langtags;
  if(new_transkeys) info->itext_transkeys = new_transkeys;
  if(new_strings) info->itext_strings = new_strings;

  if(!new_keys || !new_langtags || !new_transkeys || !new_strings) return 83; /*alloc fail*/

  ++info->itext_num;

  info->itext_keys[info->itext_num - 1] = alloc_string(key);
  info->itext_langtags[info->itext_num - 1] = alloc_string(langtag);
  info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey);
  info->itext_strings[info->itext_num - 1] = alloc_string_sized(str, size);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %rbp
movq %rdi, %r14
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1170
movq %rax, %r15
movq 0x60(%r14), %rax
movq 0x70(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1170
movq %rax, %r12
movq 0x60(%r14), %rax
movq 0x78(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1170
movq %rax, %r13
movq 0x60(%r14), %rax
movq 0x80(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1170
testq %r15, %r15
je 0x5c3f
movq %r15, 0x68(%r14)
testq %r12, %r12
je 0x5c48
movq %r12, 0x70(%r14)
testq %r13, %r13
je 0x5c51
movq %r13, 0x78(%r14)
testq %rax, %rax
je 0x5c5d
movq %rax, 0x80(%r14)
movl $0x53, %ecx
testq %r15, %r15
je 0x5d01
testq %r12, %r12
je 0x5d01
testq %r13, %r13
je 0x5d01
testq %rax, %rax
je 0x5d01
incq 0x60(%r14)
movq %rbp, %rdi
callq 0xd478
movq 0x60(%r14), %rcx
movq 0x68(%r14), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x8(%rsp), %rdi
callq 0xd478
movq 0x60(%r14), %rcx
movq 0x70(%r14), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x10(%rsp), %rdi
callq 0xd478
movq 0x60(%r14), %r12
movq 0x78(%r14), %rcx
movq %rax, -0x8(%rcx,%r12,8)
leaq 0x1(%rbx), %rdi
callq 0x1140
movq %rax, %r15
testq %rax, %rax
je 0x5cf3
testq %rbx, %rbx
je 0x5cee
movq %r15, %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x1130
movb $0x0, (%r15,%rbx)
movq 0x80(%r14), %rax
movq %r15, -0x8(%rax,%r12,8)
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_clear_icc
void lodepng_clear_icc(LodePNGInfo* info) {
  string_cleanup(&info->iccp_name);
  lodepng_free(info->iccp_profile);
  info->iccp_profile = NULL;
  info->iccp_profile_size = 0;
  info->iccp_defined = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf0(%rdi), %rdi
callq 0x1030
xorl %r14d, %r14d
movq %r14, 0xf0(%rbx)
movq 0xf8(%rbx), %rdi
callq 0x1030
movq %r14, 0xf8(%rbx)
movl %r14d, 0x100(%rbx)
movl %r14d, 0xe8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_assign_icc
static unsigned lodepng_assign_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) {
  if(profile_size == 0) return 100; /*invalid ICC profile size*/

  info->iccp_name = alloc_string(name);
  info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size);

  if(!info->iccp_name || !info->iccp_profile) return 83; /*alloc fail*/

  lodepng_memcpy(info->iccp_profile, profile, profile_size);
  info->iccp_profile_size = profile_size;

  return 0; /*ok*/
}

// Assembly:
testl %ecx, %ecx
je 0x5e3f
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0xd478
movq %rax, %r13
movq %rax, 0xf0(%r14)
movl %ebx, %r12d
movq %r12, %rdi
callq 0x1140
movq %rax, 0xf8(%r14)
testq %r13, %r13
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
movl $0x53, %ecx
jne 0x5e34
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1130
movl %ebx, 0x100(%r14)
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5e44
movl $0x64, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_info_init
void lodepng_info_init(LodePNGInfo* info) {
  lodepng_color_mode_init(&info->color);
  info->interlace_method = 0;
  info->compression_method = 0;
  info->filter_method = 0;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  info->background_defined = 0;
  info->background_r = info->background_g = info->background_b = 0;

  LodePNGText_init(info);
  LodePNGIText_init(info);

  info->time_defined = 0;
  info->phys_defined = 0;

  info->gama_defined = 0;
  info->chrm_defined = 0;
  info->srgb_defined = 0;
  info->iccp_defined = 0;
  info->iccp_name = NULL;
  info->iccp_profile = NULL;

  LodePNGUnknownChunks_init(info);
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x10(%rdi)
movups %xmm0, 0x18(%rdi)
xorl %eax, %eax
movl %eax, 0x8(%rdi)
movq $0x0, (%rdi)
movl %eax, 0xa4(%rdi)
movl %eax, 0xb4(%rdi)
movl %eax, 0xbc(%rdi)
movl %eax, 0xe0(%rdi)
movl %eax, 0xe8(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movl %eax, 0x88(%rdi)
movups %xmm0, 0xf0(%rdi)
movups %xmm0, 0x128(%rdi)
movups %xmm0, 0x118(%rdi)
movups %xmm0, 0x108(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_color_mode_equal
static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b) {
  size_t i;
  if(a->colortype != b->colortype) return 0;
  if(a->bitdepth != b->bitdepth) return 0;
  if(a->key_defined != b->key_defined) return 0;
  if(a->key_defined) {
    if(a->key_r != b->key_r) return 0;
    if(a->key_g != b->key_g) return 0;
    if(a->key_b != b->key_b) return 0;
  }
  if(a->palettesize != b->palettesize) return 0;
  for(i = 0; i != a->palettesize * 4; ++i) {
    if(a->palette[i] != b->palette[i]) return 0;
  }
  return 1;
}

// Assembly:
movl (%rdi), %ecx
xorl %eax, %eax
cmpl (%rsi), %ecx
jne 0x679b
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x679b
movl 0x18(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
jne 0x679b
testl %ecx, %ecx
je 0x6763
movl 0x1c(%rdi), %ecx
cmpl 0x1c(%rsi), %ecx
jne 0x679b
movl 0x20(%rdi), %ecx
cmpl 0x20(%rsi), %ecx
jne 0x679b
movl 0x24(%rdi), %ecx
cmpl 0x24(%rsi), %ecx
jne 0x679b
movq 0x10(%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jne 0x679b
shlq $0x2, %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x679b
movq 0x8(%rdi), %rdx
movq 0x8(%rsi), %rsi
xorl %edi, %edi
movb (%rdx,%rdi), %r8b
cmpb (%rsi,%rdi), %r8b
jne 0x6799
incq %rdi
cmpq %rdi, %rcx
jne 0x6785
jmp 0x679b
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: color_tree_add
static unsigned color_tree_add(ColorTree* tree,
                               unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) {
  int bit;
  for(bit = 0; bit < 8; ++bit) {
    int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1);
    if(!tree->children[i]) {
      tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree));
      if(!tree->children[i]) return 83; /*alloc fail*/
      color_tree_init(tree->children[i]);
    }
    tree = tree->children[i];
  }
  tree->index = (int)index;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r13d
movq %rdi, %r12
xorl %ebx, %ebx
movl %esi, (%rsp)
movl %esi, %eax
movl %ebx, %ecx
shrl %cl, %eax
movl %r13d, %edi
shrl %cl, %edi
andl $0x1, %eax
andl $0x1, %edi
movl %r15d, %r10d
shrl %cl, %r10d
andl $0x1, %r10d
xorl %ecx, %ecx
btl %ebx, %r14d
setb %cl
leal (%rcx,%rdi,4), %ecx
leal (%rcx,%rax,8), %eax
leal (%rax,%r10,2), %ebp
cmpq $0x0, (%r12,%rbp,8)
jne 0x6834
movl $0x88, %edi
callq 0x1140
movq %rax, (%r12,%rbp,8)
testq %rax, %rax
je 0x684b
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0xffffffff, 0x80(%rax) # imm = 0xFFFFFFFF
movl (%rsp), %esi
movq (%r12,%rbp,8), %r12
movb $0x1, %al
testb %al, %al
je 0x6852
incl %ebx
cmpl $0x8, %ebx
jne 0x67bd
jmp 0x6859
xorl %eax, %eax
movl (%rsp), %esi
jmp 0x683a
movl $0x53, %eax
jmp 0x6867
movl 0x4(%rsp), %eax
movl %eax, 0x80(%r12)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: checkColorValidity
static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) {
  switch(colortype) {
    case LCT_GREY:       if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break;
    case LCT_RGB:        if(!(                                 bd == 8 || bd == 16)) return 37; break;
    case LCT_PALETTE:    if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8            )) return 37; break;
    case LCT_GREY_ALPHA: if(!(                                 bd == 8 || bd == 16)) return 37; break;
    case LCT_RGBA:       if(!(                                 bd == 8 || bd == 16)) return 37; break;
    case LCT_MAX_OCTET_VALUE: return 31; /* invalid color type */
    default: return 31; /* invalid color type */
  }
  return 0; /*allowed color type / bits combination*/
}

// Assembly:
movl $0x1f, %eax
cmpl $0x6, %edi
ja 0x82df
movl %edi, %ecx
leaq 0x9f64(%rip), %rdx      # 0x121fc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
movl $0x25, %eax
cmovel %esi, %eax
retq
movl $0x25, %eax
cmpl $0x10, %esi
ja 0x82df
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x82df
xorl %eax, %eax
retq
decl %esi
movl $0x25, %eax
cmpl $0x8, %esi
jae 0x82df
movl %esi, %eax
leaq 0xbad4(%rip), %rcx      # 0x13db0
movl (%rcx,%rax,4), %eax
retq