LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng::decode(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned int&, unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, LodePNGColorType, unsigned int)
unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h, const std::string& filename,
                LodePNGColorType colortype, unsigned bitdepth)
{
  std::vector<unsigned char> buffer;
  unsigned error = load_file(buffer, filename);
  if(error) return error;
  return decode(out, w, h, buffer, colortype, bitdepth);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movl %r8d, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
vxorps %xmm0, %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
vmovaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rcx, %rsi
callq 0xd258
movl %eax, %r13d
testl %eax, %eax
jne 0xd700
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %r8
xorl %ecx, %ecx
cmpq %r8, %rax
cmovneq %rax, %rcx
subl %eax, %r8d
movl %ebp, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %r9d
callq 0xd450
movl %eax, %r13d
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd70f
callq 0x2120
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd733
callq 0x2120
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng::encode(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned int, unsigned int, LodePNGColorType, unsigned int)
unsigned encode(std::vector<unsigned char>& out, const unsigned char* in, unsigned w, unsigned h,
                LodePNGColorType colortype, unsigned bitdepth)
{
  unsigned char* buffer;
  size_t buffersize;
  unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth);
  if(buffer)
  {
    out.insert(out.end(), &buffer[0], &buffer[buffersize]);
    lodepng_free(buffer);
  }
  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %r8d, %eax
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %rbx
movl %r9d, (%rsp)
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %eax, %r9d
callq 0xd072
movl %eax, %ebp
movq (%r14), %r14
testq %r14, %r14
je 0xd793
movq 0x8(%rbx), %rsi
movq 0x10(%rsp), %rcx
addq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x106b0
movq %r14, %rdi
callq 0x21b0
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng::encode(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned int, unsigned int, lodepng::State&)
unsigned encode(std::vector<unsigned char>& out,
                const unsigned char* in, unsigned w, unsigned h,
                State& state)
{
  unsigned char* buffer;
  size_t buffersize;
  unsigned error = lodepng_encode(&buffer, &buffersize, in, w, h, &state);
  if(buffer)
  {
    out.insert(out.end(), &buffer[0], &buffer[buffersize]);
    lodepng_free(buffer);
  }
  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r9
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0xad48
movl %eax, %ebp
movq (%r14), %r14
testq %r14, %r14
je 0xd86a
movq 0x8(%rbx), %rsi
movq (%rsp), %rcx
addq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x106b0
movq %r14, %rdi
callq 0x21b0
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng::encode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char const*, unsigned int, unsigned int, LodePNGColorType, unsigned int)
unsigned encode(const std::string& filename,
                const unsigned char* in, unsigned w, unsigned h,
                LodePNGColorType colortype, unsigned bitdepth)
{
  std::vector<unsigned char> buffer;
  unsigned error = encode(buffer, in, w, h, colortype, bitdepth);
  if(!error) error = save_file(buffer, filename);
  return error;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %rdi
vmovaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0xd73b
movl %eax, %ebp
testl %eax, %eax
jne 0xd922
movq (%rsp), %rax
movq 0x8(%rsp), %rsi
xorl %edi, %edi
subq %rax, %rsi
cmovneq %rax, %rdi
movq (%rbx), %rdx
callq 0x41e4
movl %eax, %ebp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xd930
callq 0x2120
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xd94a
callq 0x2120
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: ucvector_reserve(ucvector*, unsigned long)
static unsigned ucvector_reserve(ucvector* p, size_t allocsize)
{
  if(allocsize > p->allocsize)
  {
    size_t newsize = (allocsize > p->allocsize * 2) ? allocsize : (allocsize * 3 / 2);
    void* data = lodepng_realloc(p->data, newsize);
    if(data)
    {
      p->allocsize = newsize;
      p->data = (unsigned char*)data;
    }
    else return 0; /*error: not enough memory*/
  }
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rax
movl $0x1, %ebx
cmpq %rsi, %rax
jae 0xda12
movq %rdi, %r14
addq %rax, %rax
leaq (%rsi,%rsi,2), %r15
shrq %r15
cmpq %rsi, %rax
cmovbq %rsi, %r15
movq (%rdi), %rdi
movq %r15, %rsi
callq 0x2260
testq %rax, %rax
je 0xda10
movq %r15, 0x10(%r14)
movq %rax, (%r14)
jmp 0xda12
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: generateFixedLitLenTree(HuffmanTree*)
static unsigned generateFixedLitLenTree(HuffmanTree* tree)
{
  unsigned i, error = 0;
  unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned));
  if(!bitlen) return 83; /*alloc fail*/

  /*288 possible codes: 0-255=literals, 256=endcode, 257-285=lengthcodes, 286-287=unused*/
  for(i =   0; i <= 143; ++i) bitlen[i] = 8;
  for(i = 144; i <= 255; ++i) bitlen[i] = 9;
  for(i = 256; i <= 279; ++i) bitlen[i] = 7;
  for(i = 280; i <= 287; ++i) bitlen[i] = 8;

  error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DEFLATE_CODE_SYMBOLS, 15);

  lodepng_free(bitlen);
  return error;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x480, %edi            # imm = 0x480
callq 0x21e0
testq %rax, %rax
je 0xdb10
movq %rax, %rbx
xorl %eax, %eax
vbroadcastss 0x4879(%rip), %zmm0 # 0x122bc
vmovups %zmm0, (%rbx,%rax,4)
addq $0x10, %rax
cmpq $0x90, %rax
jne 0xda43
movl $0x90, %eax
vbroadcastss 0x485b(%rip), %zmm0 # 0x122c0
vmovups %zmm0, (%rbx,%rax,4)
addq $0x10, %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0xda65
xorl %eax, %eax
vpmovsxbq 0x472c(%rip), %zmm0 # 0x121b0
vpmovsxbq 0x472a(%rip), %zmm1 # 0x121b8
vpbroadcastq 0x4708(%rip), %zmm2 # 0x121a0
vpbroadcastd 0x480e(%rip), %zmm3 # 0x122b0
vpbroadcastq %rax, %zmm4
vporq %zmm0, %zmm4, %zmm5
vporq %zmm1, %zmm4, %zmm4
vpcmpltuq %zmm2, %zmm4, %k0
vpcmpltuq %zmm2, %zmm5, %k1
kunpckbw %k0, %k1, %k1
vmovdqu32 %zmm3, 0x400(%rbx,%rax,4) {%k1}
addq $0x10, %rax
cmpq $0x20, %rax
jne 0xdaa2
vbroadcastss 0x47db(%rip), %ymm0 # 0x122bc
vmovups %ymm0, 0x460(%rbx)
movl $0x120, %edx            # imm = 0x120
movq %r14, %rdi
movq %rbx, %rsi
movl $0xf, %ecx
vzeroupper
callq 0xdb7d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: generateFixedDistanceTree(HuffmanTree*)
static unsigned generateFixedDistanceTree(HuffmanTree* tree)
{
  unsigned i, error = 0;
  unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned));
  if(!bitlen) return 83; /*alloc fail*/

  /*there are 32 distance codes, but 30-31 are unused*/
  for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen[i] = 5;
  error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15);

  lodepng_free(bitlen);
  return error;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x80, %edi
callq 0x21e0
testq %rax, %rax
je 0xdb75
movq %rax, %rbx
xorl %eax, %eax
vbroadcastss 0x4787(%rip), %zmm0 # 0x122c4
vmovups %zmm0, (%rbx,%rax,4)
addq $0x10, %rax
cmpq $0x20, %rax
jne 0xdb3d
movl $0x20, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xf, %ecx
vzeroupper
callq 0xdb7d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: HuffmanTree_makeFromLengths(HuffmanTree*, unsigned int const*, unsigned long, unsigned int)
static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen,
                                            size_t numcodes, unsigned maxbitlen)
{
  unsigned i;
  tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned));
  if(!tree->lengths) return 83; /*alloc fail*/
  for(i = 0; i != numcodes; ++i) tree->lengths[i] = bitlen[i];
  tree->numcodes = (unsigned)numcodes; /*number of symbols*/
  tree->maxbitlen = maxbitlen;
  return HuffmanTree_makeFromLengths2(tree);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq (,%rdx,4), %rdi
callq 0x21e0
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xdbd6
testq %r15, %r15
je 0xdbbe
xorl %ecx, %ecx
movl (%r12,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
movl %ecx, %edx
cmpq %r15, %rdx
jne 0xdbad
movl %r15d, 0x1c(%r14)
movl %ebx, 0x18(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xdbe7
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: writeLZ77data(unsigned long*, ucvector*, uivector const*, HuffmanTree const*, HuffmanTree const*)
static void writeLZ77data(size_t* bp, ucvector* out, const uivector* lz77_encoded,
                          const HuffmanTree* tree_ll, const HuffmanTree* tree_d)
{
  size_t i = 0;
  for(i = 0; i != lz77_encoded->size; ++i)
  {
    unsigned val = lz77_encoded->data[i];
    addHuffmanSymbol(bp, out, HuffmanTree_getCode(tree_ll, val), HuffmanTree_getLength(tree_ll, val));
    if(val > 256) /*for a length code, 3 more things have to be added*/
    {
      unsigned length_index = val - FIRST_LENGTH_CODE_INDEX;
      unsigned n_length_extra_bits = LENGTHEXTRA[length_index];
      unsigned length_extra_bits = lz77_encoded->data[++i];

      unsigned distance_code = lz77_encoded->data[++i];

      unsigned distance_index = distance_code;
      unsigned n_distance_extra_bits = DISTANCEEXTRA[distance_index];
      unsigned distance_extra_bits = lz77_encoded->data[++i];

      addBitsToStream(bp, out, length_extra_bits, n_length_extra_bits);
      addHuffmanSymbol(bp, out, HuffmanTree_getCode(tree_d, distance_code),
                       HuffmanTree_getLength(tree_d, distance_code));
      addBitsToStream(bp, out, distance_extra_bits, n_distance_extra_bits);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
cmpq $0x0, 0x8(%rdx)
je 0xe85e
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %r14d, %r14d
movq (%r15), %rax
movl (%rax,%r14,4), %ebx
movq 0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movl (%rax,%rbx,4), %edx
movl (%rcx,%rbx,4), %ecx
movq %r13, %rdi
movq %r12, %rsi
callq 0xe86d
cmpq $0x101, %rbx            # imm = 0x101
jb 0xe851
addl $0xfffffeff, %ebx       # imm = 0xFFFFFEFF
leaq 0x35be(%rip), %rax      # 0x11da0
movl (%rax,%rbx,4), %ecx
movq (%r15), %rax
movl 0x4(%rax,%r14,4), %edx
movq %rbp, %rbx
movl 0x8(%rax,%r14,4), %ebp
leaq 0x36a4(%rip), %rsi      # 0x11ea0
movl (%rsi,%rbp,4), %esi
movq %rsi, 0x10(%rsp)
movl 0xc(%rax,%r14,4), %eax
movl %eax, 0x4(%rsp)
addq $0x3, %r14
movq %r13, %rdi
movq %r12, %rsi
callq 0xe9f9
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
movl (%rax,%rbp,4), %edx
movl (%rcx,%rbp,4), %ecx
movq %rbx, %rbp
movq %r13, %rdi
movq %r12, %rsi
callq 0xe86d
movq %r13, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
movq 0x10(%rsp), %rcx
callq 0xe9f9
incq %r14
cmpq 0x8(%r15), %r14
jne 0xe7ac
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: getHash(unsigned char const*, unsigned long, unsigned long)
static unsigned getHash(const unsigned char* data, size_t size, size_t pos)
{
  unsigned result = 0;
  if(pos + 2 < size)
  {
    /*A simple shift and xor hash is used. Since the data of PNGs is dominated
    by zeroes due to the filters, a better hash does not have a significant
    effect on speed in traversing the chain, and causes more time spend on
    calculating the hash.*/
    result ^= (unsigned)(data[pos + 0] << 0u);
    result ^= (unsigned)(data[pos + 1] << 4u);
    result ^= (unsigned)(data[pos + 2] << 8u);
  } else {
    size_t amount, i;
    if(pos >= size) return 0;
    amount = size - pos;
    for(i = 0; i != amount; ++i) result ^= (unsigned)(data[pos + i] << (i * 8u));
  }
  return result & HASH_BIT_MASK;
}

// Assembly:
leaq 0x2(%rdx), %rax
cmpq %rsi, %rax
jae 0xe907
movzbl (%rdi,%rdx), %eax
movzbl 0x1(%rdi,%rdx), %esi
shll $0x4, %esi
xorl %eax, %esi
movzbl 0x2(%rdi,%rdx), %ecx
shll $0x8, %ecx
xorl %esi, %ecx
jmp 0xe9f2
xorl %eax, %eax
movq %rsi, %r8
subq %rdx, %r8
movl $0x0, %ecx
jbe 0xe9ed
addq %rdx, %rdi
leaq 0xf(%r8), %rcx
andq $-0x10, %rcx
decq %r8
vpbroadcastq %r8, %zmm0
vpmovsxbq 0x3878(%rip), %zmm1 # 0x121b0
vpmovsxbq 0x3876(%rip), %zmm2 # 0x121b8
vpmovsxbd 0x3954(%rip), %zmm3 # 0x122a0
vpxor %xmm7, %xmm7, %xmm7
xorl %r8d, %r8d
vpbroadcastq 0x384b(%rip), %zmm4 # 0x121a8
vpbroadcastd 0x3965(%rip), %zmm5 # 0x122cc
vmovdqa64 %zmm7, %zmm6
vpcmpleuq %zmm0, %zmm2, %k0
vpcmpleuq %zmm0, %zmm1, %k1
kunpckbw %k0, %k1, %k1
vmovdqu8 (%rdi,%r8), %xmm7 {%k1} {z}
vpmovzxbd %xmm7, %zmm7    # zmm7 = xmm7[0],zero,zero,zero,xmm7[1],zero,zero,zero,xmm7[2],zero,zero,zero,xmm7[3],zero,zero,zero,xmm7[4],zero,zero,zero,xmm7[5],zero,zero,zero,xmm7[6],zero,zero,zero,xmm7[7],zero,zero,zero,xmm7[8],zero,zero,zero,xmm7[9],zero,zero,zero,xmm7[10],zero,zero,zero,xmm7[11],zero,zero,zero,xmm7[12],zero,zero,zero,xmm7[13],zero,zero,zero,xmm7[14],zero,zero,zero,xmm7[15],zero,zero,zero
vpslld $0x3, %zmm3, %zmm8
vpsllvd %zmm8, %zmm7, %zmm7
vpxord %zmm6, %zmm7, %zmm7
addq $0x10, %r8
vpaddq %zmm4, %zmm2, %zmm2
vpaddq %zmm4, %zmm1, %zmm1
vpaddd %zmm5, %zmm3, %zmm3
cmpq %r8, %rcx
jne 0xe967
vmovdqa32 %zmm7, %zmm6 {%k1}
vextracti64x4 $0x1, %zmm6, %ymm0
vpxord %zmm0, %zmm6, %zmm0
vextracti128 $0x1, %ymm0, %xmm1
vpxor %xmm1, %xmm0, %xmm0
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpxor %xmm1, %xmm0, %xmm0
vpshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
vpxor %xmm1, %xmm0, %xmm0
vmovd %xmm0, %ecx
cmpq %rdx, %rsi
jbe 0xe9f5
movzwl %cx, %eax
vzeroupper
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: HuffmanTree_makeFromFrequencies(HuffmanTree*, unsigned int const*, unsigned long, unsigned long, unsigned int)
static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies,
                                                size_t mincodes, size_t numcodes, unsigned maxbitlen)
{
  unsigned error = 0;
  while(!frequencies[numcodes - 1] && numcodes > mincodes) --numcodes; /*trim zeroes*/
  tree->maxbitlen = maxbitlen;
  tree->numcodes = (unsigned)numcodes; /*number of symbols*/
  tree->lengths = (unsigned*)lodepng_realloc(tree->lengths, numcodes * sizeof(unsigned));
  if(!tree->lengths) return 83; /*alloc fail*/
  /*initialize all lengths to 0*/
  memset(tree->lengths, 0, numcodes * sizeof(unsigned));

  error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen);
  if(!error) error = HuffmanTree_makeFromLengths2(tree);
  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x4(,%rcx,4), %rsi
movl $0x1, %eax
xorl %ecx, %ecx
leaq (%r14,%rcx), %rdi
leaq -0x4(%rsi), %r12
decq %rax
cmpq %rdx, %rdi
jbe 0xeabc
decq %rcx
cmpl $0x0, -0x8(%r15,%rsi)
movq %r12, %rsi
je 0xea9e
movl %ebp, 0x18(%rbx)
addq %rax, %r14
movl %r14d, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x2260
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xeb15
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20b0
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x4230
testl %eax, %eax
jne 0xeb1a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdbe7
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: addColorBits(unsigned char*, unsigned long, unsigned int, unsigned int)
static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in)
{
  unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/
  /*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/
  unsigned p = index & m;
  in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/
  in = in << (bits * (m - p));
  if(p == 0) out[index * bits / 8] = in;
  else out[index * bits / 8] |= in;
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, %edx
sete %al
cmpl $0x1, %edx
leal 0x1(%rax,%rax), %eax
movl $0x7, %r8d
cmovnel %eax, %r8d
movl %esi, %r9d
andl %r8d, %r9d
bzhil %edx, %ecx, %eax
subl %r9d, %r8d
imull %edx, %r8d
shlxl %r8d, %eax, %eax
movl %edx, %ecx
imulq %rsi, %rcx
shrq $0x3, %rcx
testl %r9d, %r9d
je 0xeb6c
orb %al, (%rdi,%rcx)
retq
movb %al, (%rdi,%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: color_tree_get(ColorTree*, unsigned char, unsigned char, unsigned char, unsigned char)
static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
  int bit = 0;
  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]) return -1;
    else tree = tree->children[i];
  }
  return tree ? tree->index : -1;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
shrxl %eax, %esi, %r9d
andl $0x1, %r9d
shrxl %eax, %edx, %r10d
andl $0x1, %r10d
shrxl %eax, %ecx, %r11d
andl $0x1, %r11d
shrxl %eax, %r8d, %ebx
andl $0x1, %ebx
leal (%rbx,%r10,4), %r10d
leal (%r10,%r9,8), %r9d
leal (%r9,%r11,2), %r9d
movq (%rdi,%r9,8), %rdi
testq %rdi, %rdi
je 0xebba
incl %eax
cmpl $0x8, %eax
jne 0xeb73
movl 0x80(%rdi), %eax
jmp 0xebbf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: readChunk_PLTE(LodePNGColorMode*, unsigned char const*, unsigned long)
static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength)
{
  unsigned pos = 0, i;
  if(color->palette) lodepng_free(color->palette);
  color->palettesize = chunkLength / 3;
  color->palette = (unsigned char*)lodepng_malloc(4 * color->palettesize);
  if(!color->palette && color->palettesize)
  {
    color->palettesize = 0;
    return 83; /*alloc fail*/
  }
  if(color->palettesize > 256) return 38; /*error: palette too big*/

  for(i = 0; i != color->palettesize; ++i)
  {
    color->palette[4 * i + 0] = data[pos++]; /*R*/
    color->palette[4 * i + 1] = data[pos++]; /*G*/
    color->palette[4 * i + 2] = data[pos++]; /*B*/
    color->palette[4 * i + 3] = 255; /*alpha*/
  }

  return 0; /* OK */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xebdd
callq 0x21b0
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
movq %r15, %rdx
mulxq %rax, %rdi, %rdi
shrq %rdi
movq %rdi, 0x10(%rbx)
shlq $0x2, %rdi
callq 0x21e0
movq %rax, 0x8(%rbx)
testq %rax, %rax
setne %al
cmpq $0x3, %r15
setb %cl
orb %al, %cl
je 0xec91
movl $0x26, %eax
cmpq $0x302, %r15            # imm = 0x302
ja 0xec9e
xorl %eax, %eax
cmpq $0x0, 0x10(%rbx)
je 0xec9e
movl $0x3, %ecx
movl $0x1, %edx
movl $0x1, %esi
leal -0x1(%rdx), %edi
movb (%r14,%rdi), %dil
movq 0x8(%rbx), %r8
leal -0x3(%rcx), %r9d
movb %dil, (%r8,%r9)
leal 0x1(%rdx), %edi
movl %edx, %r8d
movb (%r14,%r8), %r8b
movq 0x8(%rbx), %r9
leal -0x2(%rcx), %r10d
movb %r8b, (%r9,%r10)
movb (%r14,%rdi), %dil
movq 0x8(%rbx), %r8
leal -0x1(%rcx), %r9d
movb %dil, (%r8,%r9)
movq 0x8(%rbx), %rdi
movl %ecx, %r8d
movb $-0x1, (%rdi,%r8)
movl %esi, %edi
incl %esi
addl $0x4, %ecx
addl $0x3, %edx
cmpq %rdi, 0x10(%rbx)
jne 0xec3a
jmp 0xec9e
movq $0x0, 0x10(%rbx)
movl $0x53, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: readChunk_tRNS(LodePNGColorMode*, unsigned char const*, unsigned long)
static unsigned readChunk_tRNS(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength)
{
  unsigned i;
  if(color->colortype == LCT_PALETTE)
  {
    /*error: more alpha values given than there are palette entries*/
    if(chunkLength > color->palettesize) return 38;

    for(i = 0; i != chunkLength; ++i) color->palette[4 * i + 3] = data[i];
  }
  else if(color->colortype == LCT_GREY)
  {
    /*error: this chunk must be 2 bytes for greyscale image*/
    if(chunkLength != 2) return 30;

    color->key_defined = 1;
    color->key_r = color->key_g = color->key_b = 256u * data[0] + data[1];
  }
  else if(color->colortype == LCT_RGB)
  {
    /*error: this chunk must be 6 bytes for RGB image*/
    if(chunkLength != 6) return 41;

    color->key_defined = 1;
    color->key_r = 256u * data[0] + data[1];
    color->key_g = 256u * data[2] + data[3];
    color->key_b = 256u * data[4] + data[5];
  }
  else return 42; /*error: tRNS chunk not allowed for other color models*/

  return 0; /* OK */
}

// Assembly:
movl (%rdi), %ecx
testl %ecx, %ecx
je 0xed32
cmpl $0x2, %ecx
je 0xecf9
movl $0x2a, %eax
cmpl $0x3, %ecx
jne 0xecf8
movl $0x26, %eax
cmpq %rdx, 0x10(%rdi)
jb 0xecf8
testq %rdx, %rdx
je 0xed5a
movl $0x3, %ecx
xorl %eax, %eax
xorl %r8d, %r8d
movb (%rsi,%r8), %r9b
movq 0x8(%rdi), %r10
movl %ecx, %r11d
movb %r9b, (%r10,%r11)
incq %r8
movl %r8d, %r9d
addl $0x4, %ecx
cmpq %rdx, %r9
jne 0xecdb
retq
movl $0x29, %eax
cmpq $0x6, %rdx
jne 0xecf8
movl $0x1, 0x18(%rdi)
movbew (%rsi), %ax
movzwl %ax, %eax
movl %eax, 0x1c(%rdi)
movbew 0x2(%rsi), %ax
movzwl %ax, %eax
movl %eax, 0x20(%rdi)
movbew 0x4(%rsi), %ax
movzwl %ax, %eax
movl $0x24, %ecx
jmp 0xed57
movl $0x1e, %eax
cmpq $0x2, %rdx
jne 0xecf8
movl $0x1, 0x18(%rdi)
movbew (%rsi), %ax
movzwl %ax, %eax
movl %eax, 0x24(%rdi)
movl %eax, 0x20(%rdi)
movl $0x1c, %ecx
movl %eax, (%rdi,%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: readChunk_bKGD(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
{
  if(info->color.colortype == LCT_PALETTE)
  {
    /*error: this chunk must be 1 byte for indexed color image*/
    if(chunkLength != 1) return 43;

    info->background_defined = 1;
    info->background_r = info->background_g = info->background_b = data[0];
  }
  else if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA)
  {
    /*error: this chunk must be 2 bytes for greyscale image*/
    if(chunkLength != 2) return 44;

    info->background_defined = 1;
    info->background_r = info->background_g = info->background_b = 256u * data[0] + data[1];
  }
  else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA)
  {
    /*error: this chunk must be 6 bytes for greyscale image*/
    if(chunkLength != 6) return 45;

    info->background_defined = 1;
    info->background_r = 256u * data[0] + data[1];
    info->background_g = 256u * data[2] + data[3];
    info->background_b = 256u * data[4] + data[5];
  }

  return 0; /* OK */
}

// Assembly:
movl 0x10(%rdi), %ecx
xorl %eax, %eax
cmpq $0x6, %rcx
ja 0xedf6
leaq 0x2a8d(%rip), %r8       # 0x11800
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movl $0x2c, %eax
cmpq $0x2, %rdx
jne 0xedf6
movl $0x1, 0x38(%rdi)
movbew (%rsi), %ax
movzwl %ax, %eax
jmp 0xede6
movl $0x2d, %eax
cmpq $0x6, %rdx
jne 0xedf6
movl $0x1, 0x38(%rdi)
movbew (%rsi), %ax
movzwl %ax, %eax
movl %eax, 0x3c(%rdi)
movbew 0x2(%rsi), %ax
movzwl %ax, %eax
movl %eax, 0x40(%rdi)
movbew 0x4(%rsi), %ax
movzwl %ax, %eax
movl $0x44, %ecx
jmp 0xedf1
movl $0x2b, %eax
cmpq $0x1, %rdx
jne 0xedf6
movl $0x1, 0x38(%rdi)
movzbl (%rsi), %eax
movl %eax, 0x44(%rdi)
movl %eax, 0x40(%rdi)
movl $0x3c, %ecx
movl %eax, (%rdi,%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: readChunk_tEXt(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
{
  unsigned error = 0;
  char *key = 0, *str = 0;
  unsigned i;

  while(!error) /*not really a while loop, only used to break on error*/
  {
    unsigned length, string2_begin;

    length = 0;
    while(length < chunkLength && data[length] != 0) ++length;
    /*even though it's not allowed by the standard, no error is thrown if
    there's no null termination char, if the text is empty*/
    if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/

    key = (char*)lodepng_malloc(length + 1);
    if(!key) CERROR_BREAK(error, 83); /*alloc fail*/

    key[length] = 0;
    for(i = 0; i != length; ++i) key[i] = (char)data[i];

    string2_begin = length + 1; /*skip keyword null terminator*/

    length = chunkLength < string2_begin ? 0 : chunkLength - string2_begin;
    str = (char*)lodepng_malloc(length + 1);
    if(!str) CERROR_BREAK(error, 83); /*alloc fail*/

    str[length] = 0;
    for(i = 0; i != length; ++i) str[i] = (char)data[string2_begin + i];

    error = lodepng_add_text(info, key, str);

    break;
  }

  lodepng_free(key);
  lodepng_free(str);

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
testq %rdx, %rdx
je 0xee24
xorl %ebp, %ebp
xorl %ebx, %ebx
cmpb $0x0, (%r14,%rbp)
je 0xee28
incl %ebx
movq %rbx, %rbp
cmpq %r12, %rbx
jb 0xee11
jmp 0xee28
xorl %ebx, %ebx
xorl %ebp, %ebp
leal -0x50(%rbx), %eax
cmpl $-0x4f, %eax
jae 0xee3f
movl $0x59, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
jmp 0xeec7
movq %rdi, (%rsp)
leal 0x1(%rbx), %r13d
movq %r13, %rdi
callq 0x21e0
testq %rax, %rax
je 0xeebd
movq %rax, %r15
movb $0x0, (%rax,%rbp)
testl %ebx, %ebx
je 0xee6c
movl %ebx, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
xorl %eax, %eax
movq %r12, %rbp
subq %r13, %rbp
cmovbq %rax, %rbp
leal 0x1(%rbp), %edi
callq 0x21e0
testq %rax, %rax
je 0xeec0
movq %rax, %rbx
movl %ebp, %eax
movb $0x0, (%rbx,%rax)
cmpq %r12, %r13
jae 0xeeaa
movl %ebp, %eax
xorl %ecx, %ecx
leal (%r13,%rcx), %edx
movb (%r14,%rdx), %dl
movb %dl, (%rbx,%rcx)
incq %rcx
cmpl %ecx, %eax
jne 0xee97
movq (%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7882
movl %eax, %ebp
jmp 0xeec7
xorl %r15d, %r15d
xorl %ebx, %ebx
movl $0x53, %ebp
movq %r15, %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x21b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: readChunk_tIME(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
{
  if(chunkLength != 7) return 73; /*invalid tIME chunk size*/

  info->time_defined = 1;
  info->time.year = 256u * data[0] + data[1];
  info->time.month = data[2];
  info->time.day = data[3];
  info->time.hour = data[4];
  info->time.minute = data[5];
  info->time.second = data[6];

  return 0; /* OK */
}

// Assembly:
movl $0x49, %eax
cmpq $0x7, %rdx
jne 0xf3cd
movl $0x1, 0x88(%rdi)
movbew (%rsi), %ax
movzwl %ax, %eax
movl %eax, 0x8c(%rdi)
movzbl 0x2(%rsi), %eax
movl %eax, 0x90(%rdi)
movzbl 0x3(%rsi), %eax
movl %eax, 0x94(%rdi)
movzbl 0x4(%rsi), %eax
movl %eax, 0x98(%rdi)
movzbl 0x5(%rsi), %eax
movl %eax, 0x9c(%rdi)
movzbl 0x6(%rsi), %eax
movl %eax, 0xa0(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: readChunk_pHYs(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
{
  if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/

  info->phys_defined = 1;
  info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3];
  info->phys_y = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7];
  info->phys_unit = data[8];

  return 0; /* OK */
}

// Assembly:
movl $0x4a, %eax
cmpq $0x9, %rdx
jne 0xf404
movl $0x1, 0xa4(%rdi)
movl (%rsi), %eax
movbel %eax, 0xa8(%rdi)
movl 0x4(%rsi), %eax
movbel %eax, 0xac(%rdi)
movzbl 0x8(%rsi), %eax
movl %eax, 0xb0(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: removePaddingBits(unsigned char*, unsigned char const*, unsigned long, unsigned long, unsigned int)
static void removePaddingBits(unsigned char* out, const unsigned char* in,
                              size_t olinebits, size_t ilinebits, unsigned h)
{
  /*
  After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need
  to be removed (except at last scanline of (Adam7-reduced) image) before working with pure image buffers
  for the Adam7 code, the color convert code and the output to the user.
  in and out are allowed to be the same buffer, in may also be higher but still overlapping; in must
  have >= ilinebits*h bits, out must have >= olinebits*h bits, olinebits must be <= ilinebits
  also used to move bits after earlier such operations happened, e.g. in a sequence of reduced images from Adam7
  only useful if (ilinebits - olinebits) is a value in the range 1..7
  */
  unsigned y;
  size_t diff = ilinebits - olinebits;
  size_t ibp = 0, obp = 0; /*input and output bit pointers*/
  for(y = 0; y < h; ++y)
  {
    size_t x;
    for(x = 0; x < olinebits; ++x)
    {
      unsigned char bit = readBitFromReversedStream(&ibp, in);
      setBitOfReversedStream(&obp, out, bit);
    }
    ibp += diff;
  }
}

// Assembly:
testl %r8d, %r8d
je 0xf882
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rax
subq %rdx, %rax
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
testq %rdx, %rdx
je 0xf86f
movq %rdx, %rbx
movq %r11, %r14
movq %r14, %rcx
shrq $0x3, %rcx
movl %r14d, %ebp
notb %bpl
movzbl (%rsi,%rcx), %r15d
movzbl %bpl, %r12d
andl $0x7, %r12d
movl %r10d, %ecx
notb %cl
andb $0x7, %cl
movb $0x1, %bpl
shlb %cl, %bpl
btl %r12d, %r15d
jae 0xf853
movq %r10, %rcx
shrq $0x3, %rcx
orb %bpl, (%rdi,%rcx)
jmp 0xf861
notb %bpl
movq %r10, %rcx
shrq $0x3, %rcx
andb %bpl, (%rdi,%rcx)
incq %r10
incq %r14
decq %rbx
jne 0xf818
addq %rdx, %r11
addq %rax, %r11
incl %r9d
cmpl %r8d, %r9d
jne 0xf80d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: Adam7_getpassvalues(unsigned int*, unsigned int*, unsigned long*, unsigned long*, unsigned long*, unsigned int, unsigned int, unsigned int)
static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], size_t filter_passstart[8],
                                size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp)
{
  /*the passstart values have 8 values: the 8th one indicates the byte after the end of the 7th (= last) pass*/
  unsigned i;

  /*calculate width and height in pixels of each pass*/
  for(i = 0; i != 7; ++i)
  {
    passw[i] = (w + ADAM7_DX[i] - ADAM7_IX[i] - 1) / ADAM7_DX[i];
    passh[i] = (h + ADAM7_DY[i] - ADAM7_IY[i] - 1) / ADAM7_DY[i];
    if(passw[i] == 0) passh[i] = 0;
    if(passh[i] == 0) passw[i] = 0;
  }

  filter_passstart[0] = padded_passstart[0] = passstart[0] = 0;
  for(i = 0; i != 7; ++i)
  {
    /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/
    filter_passstart[i + 1] = filter_passstart[i]
                            + ((passw[i] && passh[i]) ? passh[i] * (1 + (passw[i] * bpp + 7) / 8) : 0);
    /*bits padded if needed to fill full byte at end of each scanline*/
    padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7) / 8);
    /*only padded at end of reduced image*/
    passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7) / 8;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r10
movl 0x38(%rsp), %ebx
xorl %r14d, %r14d
leaq 0x26d2(%rip), %r15      # 0x11f70
leaq 0x26eb(%rip), %r12      # 0x11f90
leaq 0x2704(%rip), %r13      # 0x11fb0
leaq 0x271d(%rip), %rbp      # 0x11fd0
movl (%r14,%r15), %r11d
movl (%r14,%r12), %eax
notl %eax
addl %r11d, %eax
addl %r9d, %eax
xorl %edx, %edx
divl %r11d
movl %eax, (%rdi,%r14)
movl (%r14,%r13), %r11d
movl (%r14,%rbp), %eax
notl %eax
addl %r11d, %eax
addl %ebx, %eax
xorl %edx, %edx
divl %r11d
movl %eax, (%rsi,%r14)
movl (%rdi,%r14), %edx
testl %edx, %edx
cmovel %edx, %eax
movl %eax, (%rsi,%r14)
testl %eax, %eax
jne 0xf8fd
movl $0x0, (%rdi,%r14)
addq $0x4, %r14
cmpq $0x1c, %r14
jne 0xf8b3
xorl %eax, %eax
movq %rax, (%r8)
movq %rax, (%rcx)
movq %rax, (%r10)
movl 0x40(%rsp), %ebx
movl (%rdi,%rax), %edx
testl %edx, %edx
je 0xf93e
movl (%rsi,%rax), %r9d
testl %r9d, %r9d
je 0xf93e
movl %edx, %r11d
imull %ebx, %r11d
addl $0x7, %r11d
shrl $0x3, %r11d
incl %r11d
imull %r11d, %r9d
jmp 0xf941
xorl %r9d, %r9d
addq (%r10,%rax,2), %r9
movq %r9, 0x8(%r10,%rax,2)
movl (%rsi,%rax), %r9d
imull %ebx, %edx
leal 0x7(%rdx), %r11d
shrl $0x3, %r11d
imull %r9d, %r11d
addq (%rcx,%rax,2), %r11
movq %r11, 0x8(%rcx,%rax,2)
imull %r9d, %edx
addl $0x7, %edx
shrl $0x3, %edx
addq (%r8,%rax,2), %rdx
movq %rdx, 0x8(%r8,%rax,2)
addq $0x4, %rax
cmpq $0x1c, %rax
jne 0xf916
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]fractal-gen/lodepng.cpp
// Function: addPaddingBits(unsigned char*, unsigned char const*, unsigned long, unsigned long, unsigned int)
static void addPaddingBits(unsigned char* out, const unsigned char* in,
                           size_t olinebits, size_t ilinebits, unsigned h)
{
  /*The opposite of the removePaddingBits function
  olinebits must be >= ilinebits*/
  unsigned y;
  size_t diff = olinebits - ilinebits;
  size_t obp = 0, ibp = 0; /*bit pointers*/
  for(y = 0; y != h; ++y)
  {
    size_t x;
    for(x = 0; x < ilinebits; ++x)
    {
      unsigned char bit = readBitFromReversedStream(&ibp, in);
      setBitOfReversedStream(&obp, out, bit);
    }
    /*obp += diff; --> no, fill in some value in the padding bits too, to avoid
    "Use of uninitialised value of size ###" warning from valgrind*/
    for(x = 0; x != diff; ++x) setBitOfReversedStream(&obp, out, 0);
  }
}

// Assembly:
testl %r8d, %r8d
je 0xfa4e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rax
movq %rdx, %r9
subq %rcx, %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %ebx, %ebx
testq %rax, %rax
je 0xfa13
movq %rax, %r14
movq %r11, %r15
movq %r15, %rcx
shrq $0x3, %rcx
movl %r15d, %ebp
notb %bpl
movzbl (%rsi,%rcx), %r12d
movzbl %bpl, %r13d
andl $0x7, %r13d
movl %ebx, %ecx
notb %cl
andb $0x7, %cl
movb $0x1, %bpl
shlb %cl, %bpl
btl %r13d, %r12d
jae 0xf9f7
movq %rbx, %rcx
shrq $0x3, %rcx
orb %bpl, (%rdi,%rcx)
jmp 0xfa05
notb %bpl
movq %rbx, %rcx
shrq $0x3, %rcx
andb %bpl, (%rdi,%rcx)
incq %rbx
incq %r15
decq %r14
jne 0xf9bd
addq %rax, %r11
movq %r9, %r14
cmpq %rax, %rdx
je 0xfa38
movl %ebx, %ecx
notb %cl
movb $-0x2, %bpl
rolb %cl, %bpl
movq %rbx, %rcx
shrq $0x3, %rcx
andb %bpl, (%rdi,%rcx)
incq %rbx
decq %r14
jne 0xfa1b
incl %r10d
cmpl %r8d, %r10d
jne 0xf9b2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AlgoLab[P]bwt-lcp-parallel/decode_bwt.c
// Function: main
int main(int argc, char **argv) {

  if(argc != 2) {
    fprintf(stderr, "Usage: %s <bwtfile>\n", argv[0]);
    return 1;
  }

  FILE* pFile;
  int c;
  char c1, c2;

  pFile = fopen(argv[1], "r");
  if(pFile == NULL) {
    fprintf(stderr, "Error while opening the file\n");
    return 1;
  }
  else {
    while((c = fgetc(pFile)) != EOF) {
      c1 = codeToChar((c >> 4));
      printf("%c", c1);
      if((c & 0b1111) != 0b1111) {
        c2 = codeToChar((c & 0b1111));
        printf("%c", c2);
      }
    }
  }
  printf("\n");
  fclose(pFile);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x2, %edi
jne 0x1267
movq 0x8(%rsi), %rdi
leaq 0xe2f(%rip), %rsi       # 0x2021
callq 0x1070
testq %rax, %rax
je 0x1271
movq %rax, %rbx
movq %rax, %rdi
callq 0x1050
cmpl $-0x1, %eax
je 0x124d
movl %eax, %r14d
leaq 0xdee(%rip), %r15       # 0x2004
movl %r14d, %eax
shrl $0x4, %eax
movzbl %al, %eax
movsbl (%rax,%r15), %edi
callq 0x1030
andl $0xf, %r14d
cmpl $0xf, %r14d
je 0x123d
movsbl (%r14,%r15), %edi
callq 0x1030
movq %rbx, %rdi
callq 0x1050
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x1216
movl $0xa, %edi
callq 0x1030
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %rdi
callq 0x10a0
jmp 0x1276
callq 0x10be
movl $0x1, %eax
jmp 0x1261
// File: /workspace/github_cpp_makefile_star2_O1/sile[P]mphf/./generator.hh
// Function: MPHF::Generator::save(std::basic_ofstream<char, std::char_traits<char>>&) const
void save(std::ofstream& out) const {
      out.write(reinterpret_cast<const char*>(&key_count), sizeof(unsigned));
      out.write(reinterpret_cast<const char*>(&hash_value_limit), sizeof(unsigned));
      
      out.write(reinterpret_cast<const char*>(&h[0].param), sizeof(HashImpl::Param));
      out.write(reinterpret_cast<const char*>(&h[1].param), sizeof(HashImpl::Param));

      out.write(reinterpret_cast<const char*>(&rank_bv->bit_length), sizeof(unsigned));      
      out.write(reinterpret_cast<const char*>(rank_bv->blocks), sizeof(unsigned)*rank_bv->block_size()); 
      out.write(reinterpret_cast<const char*>(rank_bv->rank_index), sizeof(unsigned)*rank_bv->rank_index_size()); 

      out.write(reinterpret_cast<const char*>(&hash_assign_bv->bit_length), sizeof(unsigned));      
      out.write(reinterpret_cast<const char*>(hash_assign_bv->blocks), sizeof(unsigned)*hash_assign_bv->block_size()); 
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rdi), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2c(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x8(%r14), %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x8(%r14), %rsi
addq $0x8, %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x18(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
movl (%rax), %edx
addl $0x1f, %edx
shrl $0x3, %edx
andl $-0x4, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x18(%r14), %rax
movq 0x10(%rax), %rsi
movl $0xff, %edx
addl (%rax), %edx
shrl $0x6, %edx
andl $-0x4, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x20(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x21d0
movq 0x20(%r14), %rax
movq 0x8(%rax), %rsi
movl (%rax), %edx
addl $0x1f, %edx
shrl $0x3, %edx
andl $-0x4, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/sile[P]mphf/./generator.hh
// Function: MPHF::Generator::~Generator()
~Generator() {
      delete [] h;
      delete [] graph;
      BitVector::free(rank_bv);
      BitVector::free(hash_assign_bv);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x2f96
callq 0x21c0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2fa4
callq 0x21c0
movq 0x18(%rbx), %rdi
callq 0x3b42
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0x3b42
nop
// File: /workspace/github_cpp_makefile_star2_O1/sile[P]mphf/./generator.hh
// Function: MPHF::Generator::count_line(char const*) const
unsigned count_line(const char* filepath) const {
      unsigned count=0;
      std::ifstream in(filepath);
      if(!in)
	return 0;
      
      std::string line;
      while(std::getline(in, line))
	count++;
      
      return count;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2250
movq (%r14), %rax
movq -0x18(%rax), %rax
xorl %ebx, %ebx
testb $0x5, 0x40(%rsp,%rax)
jne 0x3051
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
xorl %ebx, %ebx
movq %rsp, %r15
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2260
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x303b
incl %ebx
jmp 0x3005
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3051
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x20(%rsp), %rdi
callq 0x2050
movl %ebx, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3085
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x20(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/sile[P]mphf/./generator.hh
// Function: MPHF::Generator::generate_graph()
void generate_graph() {
      const unsigned middle = hash_value_limit/2;
      std::ifstream in(keyset_filepath);
      std::string key;
      for(unsigned i=0; std::getline(in,key); i++) {
	graph[i][0] = h[0].hash(key.c_str()) % middle;
	graph[i][1] = h[1].hash(key.c_str()) % middle + middle;
      }
      
      // sentinel value
      graph[key_count][0] = hash_value_limit+1;
      graph[key_count][1] = hash_value_limit+1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl 0x2c(%rdi), %eax
shrl %eax
movl %eax, 0x4(%rsp)
movq %rdi, 0x8(%rsp)
movq (%rdi), %rsi
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2250
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %ebp, %ebp
movl 0x4(%rsp), %r15d
movq 0x30(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2260
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x320b
movq 0x8(%rsp), %rbx
movq 0x8(%rbx), %r12
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x20b0
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x33d6
xorl %edx, %edx
divl %r15d
movq 0x10(%rbx), %rax
movl %ebp, %r14d
movl %edx, (%rax,%r14,8)
movq 0x8(%rbx), %r12
addq $0x8, %r12
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x20b0
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x33d6
xorl %edx, %edx
divl %r15d
addl %r15d, %edx
movq 0x10(%rbx), %rax
movl %edx, 0x4(%rax,%r14,8)
leaq 0x30(%rsp), %rbx
incl %ebp
jmp 0x3165
movq 0x8(%rsp), %rsi
movl 0x2c(%rsi), %eax
incl %eax
movq 0x10(%rsi), %rcx
movl 0x28(%rsi), %edx
movl %eax, (%rcx,%rdx,8)
movl 0x28(%rsi), %eax
movl 0x2c(%rsi), %edx
incl %edx
movl %edx, 0x4(%rcx,%rax,8)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3247
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x30(%rsp), %rdi
callq 0x2050
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3282
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0x30(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/sile[P]mphf/./generator.hh
// Function: MPHF::Generator::check_and_sort_graph()
bool check_and_sort_graph() {
      unsigned beg=0;
      unsigned prev=0;
      unsigned side=0;
      for(; beg < key_count; side=(side+1)%2) {
	VertexLessThan vtl(side);
	std::sort(graph+beg, graph+key_count, vtl);
	
	for(unsigned i=beg; i < key_count; i++)
	  if(graph[i][side] != graph[i+1][side])
	    std::swap(graph[beg++], graph[i]);   // leaf vertex
	  else
	    for(i++; graph[i][side] == graph[i+1][side]; i++);
	
	if(prev==beg)
	  return false;
	prev=beg;
      }
      std::reverse(graph, graph+key_count);
      return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x28(%rdi), %eax
testl %eax, %eax
sete 0x7(%rsp)
je 0x337c
xorl %ebp, %ebp
xorl %ebx, %ebx
movl %ebx, %r13d
movl %eax, %eax
movl %ebx, %ecx
movq 0x10(%r14), %rdx
leaq (%rdx,%rax,8), %r15
shlq $0x3, %rax
leaq (,%rcx,8), %rsi
subq %rsi, %rax
leaq (%rdx,%rcx,8), %r12
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %ecx
callq 0x342b
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x3542
cmpl 0x28(%r14), %ebx
jae 0x335d
movl %ebp, %eax
movl %ebx, %ecx
movl %ebx, %r13d
movq 0x10(%r14), %rdx
movl %ecx, %esi
leaq (%rdx,%rsi,8), %rsi
movl (%rsi,%rax,4), %edi
leal 0x1(%rcx), %r8d
leaq (%rdx,%r8,8), %r8
cmpl (%r8,%rax,4), %edi
jne 0x3341
leaq (%rdx,%rax,4), %rdx
movl %ecx, %esi
leal 0x1(%rsi), %ecx
movl (%rdx,%rcx,8), %edi
addl $0x2, %esi
cmpl (%rdx,%rsi,8), %edi
je 0x332f
jmp 0x3355
movl %r13d, %edi
incl %r13d
movq (%rdx,%rdi,8), %r8
movq (%rsi), %r9
movq %r9, (%rdx,%rdi,8)
movq %r8, (%rsi)
incl %ecx
cmpl 0x28(%r14), %ecx
jb 0x3310
cmpl %r13d, %ebx
je 0x33c0
notl %ebp
andl $0x1, %ebp
movl 0x28(%r14), %eax
movl %r13d, %ebx
cmpl %eax, %r13d
setae 0x7(%rsp)
jb 0x32b9
movq 0x10(%r14), %rcx
movl %eax, %edx
testl %eax, %eax
setne %sil
leaq (%rcx,%rdx,8), %rax
addq $-0x8, %rax
cmpq %rcx, %rax
seta %dl
andb %sil, %dl
cmpb $0x1, %dl
jne 0x33c0
addq $0x8, %rcx
movq -0x8(%rcx), %rdx
movq (%rax), %rsi
movq %rsi, -0x8(%rcx)
movq %rdx, (%rax)
addq $-0x8, %rax
leaq 0x8(%rcx), %rdx
cmpq %rax, %rcx
movq %rdx, %rcx
jb 0x33a2
movb 0x7(%rsp), %al
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sile[P]mphf/./hash_impl.hh
// Function: MPHF::HashImpl::hash(char const*, unsigned int) const
unsigned hash(const char* key, unsigned size) const {
      const unsigned* u = (const unsigned*)(key);
      unsigned h = param.ini;
      unsigned i = sizeof(unsigned);
      for(; i <= size; i += sizeof(unsigned), u++) 
	h = h*param.mul ^ *u + (h>>ui_size_minus8);
      
      if((i-=sizeof(unsigned)) != size)
	for(; i < size; i++)
	  h = h*param.mul ^ key[i] + (h>>ui_size_minus8);
      
      return h;
    }

// Assembly:
movl (%rdi), %eax
xorl %ecx, %ecx
cmpl $0x4, %edx
jb 0x3402
movl 0x4(%rdi), %r8d
xorl %ecx, %ecx
movl %r8d, %r9d
imull %eax, %r9d
shrl $0x18, %eax
addl (%rsi,%rcx), %eax
xorl %r9d, %eax
addq $0x4, %rcx
leal 0x4(%rcx), %r9d
cmpl %edx, %r9d
jbe 0x33e5
cmpl %edx, %ecx
jae 0x342a
movl 0x4(%rdi), %edi
movl %ecx, %ecx
movl %edx, %edx
movl %edi, %r8d
imull %eax, %r8d
movsbl (%rsi,%rcx), %r9d
shrl $0x18, %eax
addl %r9d, %eax
xorl %r8d, %eax
incq %rcx
cmpq %rcx, %rdx
jne 0x340d
retq