LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: string_set(char**, char const*)
static void string_set(char** out, const char* in)
{
  size_t insize = strlen(in), i = 0;
  if(string_resize(out, insize))
  {
    for(i = 0; i < insize; i++)
    {
      (*out)[i] = in[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20d0
movq %rax, %r15
movq (%r14), %rdi
leaq 0x1(%rax), %rsi
callq 0x2320
testq %rax, %rax
je 0x5e4c
movb $0x0, (%rax,%r15)
movq %rax, (%r14)
testq %r15, %r15
je 0x5e4c
xorl %eax, %eax
movb (%rbx,%rax), %cl
movq (%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x5e3b
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: LodePNGIText_cleanup(LodePNGInfo*)
static void LodePNGIText_cleanup(LodePNGInfo* info)
{
  size_t i;
  for(i = 0; i < info->itext_num; i++)
  {
    string_cleanup(&info->itext_keys[i]);
    string_cleanup(&info->itext_langtags[i]);
    string_cleanup(&info->itext_transkeys[i]);
    string_cleanup(&info->itext_strings[i]);
  }
  myfree(info->itext_keys);
  myfree(info->itext_langtags);
  myfree(info->itext_transkeys);
  myfree(info->itext_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x60(%rdi)
je 0x5ebc
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x68(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x2220
movq %r14, (%r12,%r15,8)
movq 0x70(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x2220
movq %r14, (%r12,%r15,8)
movq 0x78(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x2220
movq %r14, (%r12,%r15,8)
movq 0x80(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x2220
movq %r14, (%r12,%r15,8)
incq %r15
cmpq 0x60(%rbx), %r15
jb 0x5e6c
movq 0x68(%rbx), %rdi
callq 0x2220
movq 0x70(%rbx), %rdi
callq 0x2220
movq 0x78(%rbx), %rdi
callq 0x2220
movq 0x80(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng_color_mode_equal(LodePNGColorMode const*, LodePNGColorMode const*)
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 0x6924
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x6924
movl 0x18(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
jne 0x6924
testl %ecx, %ecx
je 0x68ec
movl 0x1c(%rdi), %ecx
cmpl 0x1c(%rsi), %ecx
jne 0x6924
movl 0x20(%rdi), %ecx
cmpl 0x20(%rsi), %ecx
jne 0x6924
movl 0x24(%rdi), %ecx
cmpl 0x24(%rsi), %ecx
jne 0x6924
movq 0x10(%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jne 0x6924
shlq $0x2, %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x6924
movq 0x8(%rdi), %rdx
movq 0x8(%rsi), %rsi
xorl %edi, %edi
movb (%rdx,%rdi), %r8b
cmpb (%rsi,%rdi), %r8b
jne 0x6922
incq %rdi
cmpq %rdi, %rcx
jne 0x690e
jmp 0x6924
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: color_tree_add(ColorTree*, unsigned char, unsigned char, unsigned char, unsigned char, int)
static void color_tree_add(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a, int index)
{
  tree = &tree->next[r];
  if(tree->next == 0) color_tree_make_next(tree);
  tree = &tree->next[g];
  if(tree->next == 0) color_tree_make_next(tree);
  tree = &tree->next[b];
  if(tree->next == 0) color_tree_make_next(tree);
  tree = &tree->next[a];

  tree->index = index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
shll $0x4, %esi
movq (%rdi,%rsi), %r13
testq %r13, %r13
jne 0x6982
movq %rdi, %r12
addq %rsi, %r12
movl $0x1000, %edi           # imm = 0x1000
callq 0x2270
movq %rax, (%r12)
xorl %eax, %eax
movq (%r12), %rcx
movq $0x0, (%rcx,%rax)
movl $0xffffffff, 0x8(%rcx,%rax) # imm = 0xFFFFFFFF
addq $0x10, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x695e
movq (%r12), %r13
movzbl %r15b, %eax
shll $0x4, %eax
movq (%r13,%rax), %r15
testq %r15, %r15
jne 0x69ca
addq %rax, %r13
movl $0x1000, %edi           # imm = 0x1000
callq 0x2270
movq %rax, (%r13)
xorl %eax, %eax
movq (%r13), %rcx
movq $0x0, (%rcx,%rax)
movl $0xffffffff, 0x8(%rcx,%rax) # imm = 0xFFFFFFFF
addq $0x10, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x69a6
movq (%r13), %r15
movzbl %r14b, %ecx
shll $0x4, %ecx
movq (%r15,%rcx), %rax
testq %rax, %rax
jne 0x6a0e
addq %rcx, %r15
movl $0x1000, %edi           # imm = 0x1000
callq 0x2270
movq %rax, (%r15)
xorl %eax, %eax
movq (%r15), %rcx
movq $0x0, (%rcx,%rax)
movl $0xffffffff, 0x8(%rcx,%rax) # imm = 0xFFFFFFFF
addq $0x10, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x69ec
movq (%r15), %rax
movzbl %bpl, %ecx
shll $0x4, %ecx
movl %ebx, 0x8(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: color_tree_cleanup(ColorTree*)
static void color_tree_cleanup(ColorTree* tree)
{
  if(tree->next)
  {
    int i;
    for(i = 0; i < 256; i++) color_tree_cleanup(&tree->next[i]);
    myfree(tree->next);
  }
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x6f06
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x6ecf
addq $0x10, %r14
cmpq $0x1000, %r14           # imm = 0x1000
jne 0x6edf
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2220
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: addChunk_tIME(ucvector*, LodePNGTime const*)
static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time)
{
  unsigned error = 0;
  unsigned char* data = (unsigned char*)mymalloc(7);
  if(!data) return 83; /*alloc fail*/
  data[0] = (unsigned char)(time->year / 256);
  data[1] = (unsigned char)(time->year % 256);
  data[2] = time->month;
  data[3] = time->day;
  data[4] = time->hour;
  data[5] = time->minute;
  data[6] = time->second;
  error = addChunk(out, "tIME", data, 7);
  myfree(data);
  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x7, %edi
callq 0x2270
testq %rax, %rax
je 0xaa01
movq %rax, %rbp
movdqu (%r14), %xmm0
movl (%r14), %eax
movb %ah, (%rbp)
pand 0x76ed(%rip), %xmm0     # 0x120a0
packuswb %xmm0, %xmm0
packuswb %xmm0, %xmm0
movd %xmm0, 0x1(%rbp)
movb 0x10(%r14), %al
movb %al, 0x5(%rbp)
movb 0x14(%r14), %al
movb %al, 0x6(%rbp)
leaq 0x8(%rbx), %rsi
leaq 0x8b34(%rip), %rcx      # 0x1350d
movq %rbx, %rdi
movl $0x7, %edx
movq %rbp, %r8
callq 0x5951
testl %eax, %eax
jne 0xa9f5
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rbp, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2220
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: addChunk_tEXt(ucvector*, char const*, char const*)
static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring)
{
  unsigned error = 0;
  size_t i;
  ucvector text;
  ucvector_init(&text);
  for(i = 0; keyword[i] != 0; i++) ucvector_push_back(&text, (unsigned char)keyword[i]);
  ucvector_push_back(&text, 0);
  for(i = 0; textstring[i] != 0; i++) ucvector_push_back(&text, (unsigned char)textstring[i]);
  error = addChunk(out, "tEXt", text.data, text.size);
  ucvector_cleanup(&text);

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, (%rsp)
movq %rdi, 0x8(%rsp)
movb (%rsi), %r15b
testb %r15b, %r15b
je 0xacaf
movq %rsi, %r13
incq %r13
xorl %r14d, %r14d
xorl %edx, %edx
xorl %ebx, %ebx
leaq 0x1(%rdx), %r12
cmpq %r12, %r14
jae 0xac8d
leaq (%r12,%r12), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movq %rdx, 0x10(%rsp)
callq 0x2320
movq 0x10(%rsp), %rdx
testq %rax, %rax
jne 0xac93
jmp 0xaca1
movq %rbx, %rax
movq %r14, %rbp
movb %r15b, -0x1(%rax,%r12)
movq %rbp, %r14
movq %r12, %rdx
movq %rax, %rbx
movb (%r13), %r15b
incq %r13
testb %r15b, %r15b
jne 0xac64
jmp 0xacb6
xorl %ebx, %ebx
xorl %edx, %edx
xorl %r14d, %r14d
leaq 0x1(%rdx), %r15
cmpq %r15, %r14
jae 0xacdf
leaq (%r15,%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %rdx, %r12
callq 0x2320
movq %r12, %rdx
testq %rax, %rax
movq (%rsp), %r12
jne 0xace9
jmp 0xacf8
movq %rbx, %rax
movq %r14, %r13
movq (%rsp), %r12
movb $0x0, -0x1(%rax,%r15)
movq %r13, %r14
movq %r15, %rdx
movq %rax, %rbx
movb (%r12), %bpl
testb %bpl, %bpl
je 0xad51
incq %r12
leaq 0x1(%rdx), %r15
cmpq %r15, %r14
jae 0xad31
leaq (%r15,%r15), %r13
movq %rbx, %rdi
movq %r12, (%rsp)
movq %r13, %rsi
movq %rdx, %r12
callq 0x2320
movq %r12, %rdx
movq (%rsp), %r12
testq %rax, %rax
jne 0xad37
jmp 0xad45
movq %rbx, %rax
movq %r14, %r13
movb %bpl, -0x1(%rax,%r15)
movq %r13, %r14
movq %r15, %rdx
movq %rax, %rbx
movb (%r12), %bpl
incq %r12
testb %bpl, %bpl
jne 0xad04
movq 0x8(%rsp), %r14
leaq 0x8(%r14), %rsi
leaq 0x879d(%rip), %rcx      # 0x134fe
movq %r14, %rdi
movq %rbx, %r8
callq 0x5951
testl %eax, %eax
jne 0xad78
movq 0x8(%r14), %rax
movq %rax, 0x10(%r14)
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: lodepng::compress(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned long, LodePNGCompressSettings const&)
unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
                  const LodePNGCompressSettings& settings)
{
  unsigned char* buffer = 0;
  size_t buffersize = 0;
  unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings);
  if(buffer)
  {
    out.insert(out.end(), &buffer[0], &buffer[buffersize]);
    myfree(buffer);
  }
  return error;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq 0x10(%r8), %rax
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
testq %rax, %rax
je 0xb5cc
callq *%rax
jmp 0xb5d1
callq 0x5460
movl %eax, %ebp
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0xb5fb
movq 0x8(%rbx), %rsi
movq 0x10(%rsp), %rcx
addq %rdx, %rcx
movq %rbx, %rdi
callq 0xde6c
movq 0x8(%rsp), %rdi
callq 0x2220
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/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]);
    myfree(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 0xb1e0
movl %eax, %ebp
movq (%r14), %r14
testq %r14, %r14
je 0xba29
movq 0x8(%rbx), %rsi
movq 0x10(%rsp), %rcx
addq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0xde6c
movq %r14, %rdi
callq 0x2220
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: uivector_resize(uivector*, unsigned long)
static unsigned uivector_resize(uivector* p, size_t size)
{
  if(size * sizeof(unsigned) > p->allocsize)
  {
    size_t newsize = size * sizeof(unsigned) * 2;
    void* data = myrealloc(p->data, newsize);
    if(data)
    {
      p->allocsize = newsize;
      p->data = (unsigned*)data;
      p->size = size;
    }
    else return 0;
  }
  else p->size = size;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rsi,4), %rax
cmpq 0x10(%rdi), %rax
jbe 0xbc43
leaq (,%rbx,8), %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2320
testq %rax, %rax
je 0xbc52
movq %r15, 0x10(%r14)
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0xbc4c
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: ucvector_resize(ucvector*, unsigned long)
static unsigned ucvector_resize(ucvector* p, size_t size)
{
  if(size * sizeof(unsigned char) > p->allocsize)
  {
    size_t newsize = size * sizeof(unsigned char) * 2;
    void* data = myrealloc(p->data, newsize);
    if(data)
    {
      p->allocsize = newsize;
      p->data = (unsigned char*)data;
      p->size = size;
    }
    else return 0; /*error: not enough memory*/
  }
  else p->size = size;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x10(%rdi)
jae 0xbc82
leaq (%rbx,%rbx), %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2320
testq %rax, %rax
je 0xbc91
movq %r15, 0x10(%r14)
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0xbc8b
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: generateFixedLitLenTree(HuffmanTree*)
static unsigned generateFixedLitLenTree(HuffmanTree* tree)
{
  unsigned i, error = 0;
  unsigned* bitlen = (unsigned*)mymalloc(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);

  myfree(bitlen);
  return error;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x480, %edi            # imm = 0x480
callq 0x2270
testq %rax, %rax
je 0xbd35
movq %rax, %rbx
xorl %eax, %eax
movaps 0x63f5(%rip), %xmm0     # 0x120b0
movups %xmm0, (%rbx,%rax,4)
addq $0x4, %rax
cmpq $0x90, %rax
jne 0xbcbb
movl $0x90, %eax
movaps 0x63e9(%rip), %xmm1     # 0x120c0
movups %xmm1, (%rbx,%rax,4)
addq $0x4, %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0xbcd7
movl $0x100, %eax            # imm = 0x100
movaps 0x63dd(%rip), %xmm1     # 0x120d0
movups %xmm1, (%rbx,%rax,4)
addq $0x4, %rax
cmpq $0x118, %rax            # imm = 0x118
jne 0xbcf3
movups %xmm0, 0x460(%rbx)
movups %xmm0, 0x470(%rbx)
movl $0x120, %edx            # imm = 0x120
movq %r14, %rdi
movq %rbx, %rsi
movl $0xf, %ecx
callq 0xbd99
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2220
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: generateFixedDistanceTree(HuffmanTree*)
static unsigned generateFixedDistanceTree(HuffmanTree* tree)
{
  unsigned i, error = 0;
  unsigned* bitlen = (unsigned*)mymalloc(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);

  myfree(bitlen);
  return error;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x80, %edi
callq 0x2270
testq %rax, %rax
je 0xbd91
movq %rax, %rbx
xorl %eax, %eax
movaps 0x6381(%rip), %xmm0     # 0x120e0
movups %xmm0, (%rbx,%rax,4)
addq $0x4, %rax
cmpq $0x20, %rax
jne 0xbd5f
movl $0x20, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xf, %ecx
callq 0xbd99
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2220
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/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*)mymalloc(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 0x2270
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xbdf2
testq %r15, %r15
je 0xbdda
xorl %ecx, %ecx
movl (%r12,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
movl %ecx, %edx
cmpq %r15, %rdx
jb 0xbdc9
movl %r15d, 0x1c(%r14)
movl %ebx, 0x18(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xbe03
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: addBitToStream(unsigned long*, ucvector*, unsigned char)
static void addBitToStream(size_t* bitpointer, ucvector* bitstream, unsigned char bit)
{
  /*add a new byte at the end*/
  if((*bitpointer) % 8 == 0) ucvector_push_back(bitstream, (unsigned char)0);
  /*earlier bit of huffman code is in a lesser significant bit of an earlier byte*/
  (bitstream->data[bitstream->size - 1]) |= (bit << ((*bitpointer) & 0x7));
  (*bitpointer)++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
testb $0x7, (%rdi)
jne 0xc188
movq 0x8(%r15), %rsi
incq %rsi
movq %r15, %rdi
callq 0xbc56
testl %eax, %eax
je 0xc188
movq (%r15), %rax
movq 0x8(%r15), %rcx
movb $0x0, -0x1(%rax,%rcx)
movb (%r14), %cl
andb $0x7, %cl
shlb %cl, %bl
movq (%r15), %rax
movq 0x8(%r15), %rcx
orb %bl, -0x1(%rax,%rcx)
incq (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: HuffmanTree_makeFromFrequencies(HuffmanTree*, unsigned int const*, unsigned long, unsigned int)
static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies,
                                                size_t numcodes, unsigned maxbitlen)
{
  unsigned error = 0;
  tree->maxbitlen = maxbitlen;
  tree->numcodes = (unsigned)numcodes; /*number of symbols*/
  tree->lengths = (unsigned*)myrealloc(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 %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, 0x18(%rdi)
movl %r14d, 0x1c(%rdi)
movq 0x10(%rdi), %rdi
leaq (,%rdx,4), %r12
movq %r12, %rsi
callq 0x2320
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xca70
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2100
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x26a5
testl %eax, %eax
jne 0xca75
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbe03
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_O3/drummyfish[P]flowchart/src/lodepng.cpp
// Function: color_profile_init(ColorProfile*, LodePNGColorMode*)
static void color_profile_init(ColorProfile* profile, LodePNGColorMode* mode)
{
  profile->sixteenbit = 0;
  profile->sixteenbit_done = mode->bitdepth == 16 ? 0 : 1;

  profile->colored = 0;
  profile->colored_done = lodepng_is_greyscale_type(mode) ? 1 : 0;

  profile->key = 0;
  profile->alpha = 0;
  profile->alpha_done = lodepng_can_have_alpha(mode) ? 0 : 1;

  profile->numcolors = 0;
  color_tree_init(&profile->tree, 1);
  profile->palette = (unsigned char*)mymalloc(1024);
  profile->maxnumcolors = 257;
  if(lodepng_get_bpp(mode) <= 8)
  {
    int bpp = lodepng_get_bpp(mode);
    profile->maxnumcolors = bpp == 1 ? 2 : (bpp == 2 ? 4 : (bpp == 4 ? 16 : 256));
  }
  profile->numcolors_done = 0;

  profile->greybits = 1;
  profile->greybits_done = lodepng_get_bpp(mode) == 1 ? 1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movb %r15b, (%rdi)
movl 0x4(%rsi), %ebp
cmpl $0x10, %ebp
setne 0x1(%rdi)
movb %r15b, 0x2(%rdi)
movl (%rsi), %r14d
testl $0xfffffffb, %r14d      # imm = 0xFFFFFFFB
sete 0x3(%rdi)
movb %r15b, 0x4(%rdi)
movb %r15b, 0xc(%rdi)
movq %rsi, %rdi
callq 0x5c20
xorb $0x1, %al
movb %al, 0xd(%rbx)
movl $0x0, 0x10(%rbx)
movl $0x1000, %edi           # imm = 0x1000
callq 0x2270
movq %rax, 0x18(%rbx)
movq 0x18(%rbx), %rax
movq $0x0, (%rax,%r15)
movl $0xffffffff, 0x8(%rax,%r15) # imm = 0xFFFFFFFF
addq $0x10, %r15
cmpq $0x1000, %r15           # imm = 0x1000
jne 0xd32e
movl $0xffffffff, 0x20(%rbx) # imm = 0xFFFFFFFF
movl $0x400, %edi            # imm = 0x400
callq 0x2270
movq %rax, 0x28(%rbx)
movl $0x101, 0x30(%rbx)      # imm = 0x101
xorl %ecx, %ecx
leaq 0x5307(%rip), %rax      # 0x1267c
cmpl $0x6, %r14d
ja 0xd37f
movl (%rax,%r14,4), %ecx
imull %ebp, %ecx
cmpl $0x8, %ecx
ja 0xd3c1
xorl %ecx, %ecx
cmpl $0x6, %r14d
ja 0xd393
movl (%rax,%r14,4), %ecx
imull %ebp, %ecx
cmpl $0x1, %ecx
je 0xd3a7
cmpl $0x2, %ecx
jne 0xd3ae
movl $0x4, %ecx
jmp 0xd3be
movl $0x2, %ecx
jmp 0xd3be
cmpl $0x4, %ecx
movl $0x10, %edx
movl $0x100, %ecx            # imm = 0x100
cmovel %edx, %ecx
movl %ecx, 0x30(%rbx)
movb $0x0, 0x34(%rbx)
movl $0x1, 0x38(%rbx)
xorl %ecx, %ecx
cmpl $0x6, %r14d
ja 0xd3d8
movl (%rax,%r14,4), %ecx
imull %ebp, %ecx
cmpl $0x1, %ecx
sete 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, -0x8(%rsp)
testl %r8d, %r8d
je 0xd4c1
movq %rcx, %rax
movq -0x8(%rsp), %rdx
subq %rcx, %rdx
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %r14d, %r14d
testq %rax, %rax
je 0xd481
leaq (%r14,%rax), %rbx
movq %rax, %r15
movq %r11, %r12
movq %r12, %rcx
shrq $0x3, %rcx
movl %r12d, %ebp
notb %bpl
movzbl (%rsi,%rcx), %r13d
movzbl %bpl, %r9d
andl $0x7, %r9d
movl %r14d, %ecx
notb %cl
andb $0x7, %cl
movb $0x1, %bpl
shlb %cl, %bpl
btl %r9d, %r13d
jae 0xd463
movq %r14, %rcx
shrq $0x3, %rcx
orb %bpl, (%rdi,%rcx)
jmp 0xd471
notb %bpl
movq %r14, %rcx
shrq $0x3, %rcx
andb %bpl, (%rdi,%rcx)
incq %r14
incq %r12
decq %r15
jne 0xd428
addq %rax, %r11
jmp 0xd484
movq %r14, %rbx
cmpq %rax, -0x8(%rsp)
je 0xd4b2
leaq (%rdx,%rbx), %r14
movq %rdx, %r15
movl %ebx, %ecx
notb %cl
movb $-0x2, %r9b
rolb %cl, %r9b
movq %rbx, %rcx
shrq $0x3, %rcx
andb %r9b, (%rdi,%rcx)
incq %rbx
decq %r15
jne 0xd492
movq %r14, %rbx
incl %r10d
movq %rbx, %r14
cmpl %r8d, %r10d
jne 0xd419
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/image.cpp
// Function: image::load_bmp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool image::load_bmp(string filename)
  {
    this->delete_image();

    this->bmp_image = new bitmap_image(filename);

    if (!this->bmp_image->is_loaded())
      {
        this->delete_image();
        return false;
      }

    return true;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0xe1e4
movq %r14, %rdi
callq 0xe9d2
movl $0x40, %esi
movq %r14, %rdi
callq 0x21c0
movq $0x0, (%rbx)
movl $0x40, %edi
callq 0x21b0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xe63c
movq %r14, (%rbx)
cmpq $0x0, 0x20(%r14)
je 0xe22b
cmpl $0x0, 0x2c(%r14)
je 0xe22b
cmpl $0x0, 0x30(%r14)
je 0xe22b
cmpl $0x0, 0x34(%r14)
je 0xe22b
movb $0x1, %al
cmpl $0x0, 0x38(%r14)
jne 0xe249
movq %r14, %rdi
callq 0xe9d2
movl $0x40, %esi
movq %r14, %rdi
callq 0x21c0
movq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/image.cpp
// Function: image::load_png(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool image::load_png(string filename)
  {
    this->delete_image();

    unsigned char *pixel_data, r, g, b;
    unsigned int width, height, i, j, offset;

    if (lodepng_decode32_file(&pixel_data,&width,&height,filename.c_str()) != 0)
      return false;

    this->bmp_image = new bitmap_image(width,height);

    offset = 0;

    for (j = 0; j < height; j++)
      for (i = 0; i < width; i++)
        {
          r = pixel_data[offset];
          g = pixel_data[offset + 1];
          b = pixel_data[offset + 2];

          this->bmp_image->set_pixel(i,j,r,g,b);

          offset += 4;
        }

    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0xe295
movq %r15, %rdi
callq 0xe9d2
movl $0x40, %esi
movq %r15, %rdi
callq 0x21c0
movq $0x0, (%rbx)
movq (%r14), %rcx
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x8652
movl %eax, %ebp
testl %eax, %eax
jne 0xe369
movl $0x40, %edi
callq 0x21b0
movq %rax, %r14
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movq %rax, %rdi
callq 0xe69c
movq %r14, (%rbx)
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0xe369
xorl %eax, %eax
movl 0xc(%rsp), %esi
xorl %ecx, %ecx
testl %esi, %esi
je 0xe361
xorl %edx, %edx
movq 0x10(%rsp), %rdi
movl %eax, %esi
movb (%rdi,%rsi), %sil
leal 0x1(%rax), %r8d
movb (%rdi,%r8), %r8b
leal 0x2(%rax), %r9d
movb (%rdi,%r9), %dil
movq (%rbx), %r9
movl 0x38(%r9), %r10d
imull %ecx, %r10d
movl 0x28(%r9), %r11d
imull %edx, %r11d
movq 0x20(%r9), %r14
leal (%r11,%r10), %r15d
movb %dil, (%r14,%r15)
movq 0x20(%r9), %rdi
leal 0x1(%r11,%r10), %r14d
movb %r8b, (%rdi,%r14)
movq 0x20(%r9), %rdi
leal (%r11,%r10), %r8d
addl $0x2, %r8d
movb %sil, (%rdi,%r8)
addl $0x4, %eax
incl %edx
movl 0xc(%rsp), %esi
cmpl %esi, %edx
jb 0xe2f7
movl 0x8(%rsp), %edx
jmp 0xe363
xorl %esi, %esi
incl %ecx
cmpl %edx, %ecx
jb 0xe2f1
testl %ebp, %ebp
sete %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/image.cpp
// Function: image::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool image::load_file(string filename)
  {
    if (this->load_png(filename))
      return true;

    if (this->load_bmp(filename))
      return true;

    return false;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0xec7c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe268
movl %eax, %r15d
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xe3ea
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
movb $0x1, %bpl
testb %r15b, %r15b
jne 0xe434
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0xec7c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe1bc
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xe434
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0xe454
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xe465
movq (%r12), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/image.cpp
// Function: image::save_png(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool image::save_png(string filename)
  {
    if (this->bmp_image == NULL)
      return false;

    unsigned char *pixel_data, r, g, b;
    unsigned int i, j, offset;
    bool result;

    pixel_data = (unsigned char *) malloc(this->bmp_image->width() * this->bmp_image->height() * 3);

    offset = 0;

    for (j = 0; j < this->bmp_image->width(); j++)
      for (i = 0; i < this->bmp_image->width(); i++)
        {
          this->bmp_image->get_pixel(i,j,r,g,b);

          pixel_data[offset] = r;
          pixel_data[offset + 1] = g;
          pixel_data[offset + 2] = b;

          offset += 3;
        }

    result = (lodepng_encode24_file(filename.c_str(),pixel_data,
      this->bmp_image->width(),this->bmp_image->height()) == 0);

    free(pixel_data);

    return result;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
testq %r12, %r12
je 0xe530
movq %rsi, %rbx
movl 0x30(%r12), %ebp
movl 0x34(%r12), %r14d
movl %ebp, %eax
imull %r14d, %eax
leal (%rax,%rax,2), %edi
callq 0x2270
movq %rax, %r15
testl %ebp, %ebp
je 0xe511
xorl %eax, %eax
xorl %ecx, %ecx
movl 0x28(%r12), %edx
movq 0x20(%r12), %rsi
movl 0x38(%r12), %edi
imull %ecx, %edi
xorl %r8d, %r8d
movl %edi, %r9d
movb (%rsi,%r9), %r9b
leal 0x1(%rdi), %r10d
movb (%rsi,%r10), %r10b
leal 0x2(%rdi), %r11d
movb (%rsi,%r11), %r11b
movl %eax, %r13d
movb %r11b, (%r15,%r13)
leal 0x1(%rax), %r11d
movb %r10b, (%r15,%r11)
leal 0x2(%rax), %r10d
movb %r9b, (%r15,%r10)
addl $0x3, %eax
incl %r8d
addl %edx, %edi
cmpl %ebp, %r8d
jb 0xe4d0
incl %ecx
cmpl %ebp, %ecx
jb 0xe4bb
movq (%rbx), %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r14d, %ecx
callq 0xb38e
testl %eax, %eax
sete %bl
movq %r15, %rdi
callq 0x2220
jmp 0xe532
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/image.cpp
// Function: image::get_pixel(unsigned int, unsigned int, unsigned char&, unsigned char&, unsigned char&)
void image::get_pixel(const unsigned int x, const unsigned int y,
  unsigned char &red, unsigned char &green, unsigned char &blue)
  {
    if (this->bmp_image != NULL && x < this->bmp_image->width() && y < this->bmp_image->height())
      {
        this->bmp_image->get_pixel(x,y,red,green,blue);
      }
    else
      {
        red = 255;
        green = 255;
        blue = 255;
      }
  }

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xe5ac
cmpl %esi, 0x30(%rax)
jbe 0xe5ac
cmpl %edx, 0x34(%rax)
jbe 0xe5ac
imull 0x38(%rax), %edx
imull 0x28(%rax), %esi
movq 0x20(%rax), %rdi
leal (%rsi,%rdx), %r10d
movb (%rdi,%r10), %dil
movb %dil, (%r9)
movq 0x20(%rax), %rdi
leal 0x1(%rsi,%rdx), %r9d
movb (%rdi,%r9), %dil
movb %dil, (%r8)
movq 0x20(%rax), %rax
addl %esi, %edx
addl $0x2, %edx
movb (%rax,%rdx), %al
movb %al, (%rcx)
retq
movb $-0x1, %al
movb %al, (%rcx)
movb %al, (%r8)
movb %al, (%r9)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/image.cpp
// Function: image::set_pixel(unsigned int, unsigned int, char const&, char const&, char const&)
void image::set_pixel(const unsigned int x, const unsigned int y,
  const char &red, const char &green, const char &blue)
  {
    if (x >= this->bmp_image->width() || y >= this->bmp_image->height())
      return;

    if (this->bmp_image != NULL)
      this->bmp_image->set_pixel(x,y,red,green,blue);
  }

// Assembly:
movq (%rdi), %rax
cmpl %esi, 0x30(%rax)
jbe 0xe5fa
cmpl %edx, 0x34(%rax)
jbe 0xe5fa
movb (%rcx), %cl
movb (%r8), %dil
imull 0x38(%rax), %edx
movb (%r9), %r8b
imull 0x28(%rax), %esi
movq 0x20(%rax), %r9
leal (%rsi,%rdx), %r10d
movb %r8b, (%r9,%r10)
movq 0x20(%rax), %r8
leal 0x1(%rsi,%rdx), %r9d
movb %dil, (%r8,%r9)
movq 0x20(%rax), %rax
addl %esi, %edx
addl $0x2, %edx
movb %cl, (%rax,%rdx)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::create_bitmap()
void create_bitmap()
   {
      length_ = width_ * height_ * bytes_per_pixel_;
      row_increment_ = width_ * bytes_per_pixel_;
      if (0 != data_)
      {
         delete[] data_;
      }
      data_ = new unsigned char[length_];
   }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x28(%rdi), %ecx
imull 0x30(%rdi), %ecx
movl 0x34(%rdi), %eax
imull %ecx, %eax
movl %eax, 0x2c(%rdi)
movl %ecx, 0x38(%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0xec6e
callq 0x2250
movl 0x2c(%rbx), %eax
movl %eax, %edi
callq 0x2040
movq %rax, 0x20(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/program.cpp
// Function: program::char_from_image_position(image*, coord_2d)
int program::char_from_image_position(image *img, coord_2d c)
  {
    unsigned int i, j, k, x, y;
    unsigned char r,g,b,r2,g2,b2;
    bool matches;

    for (k = 0; k < 256; k++)
      {
        x = (k % FONT_ROW_SYMBOLS) * FONT_WIDTH;   // character coordinates in the font mask
        y = (k / FONT_ROW_SYMBOLS) * FONT_HEIGHT;

        matches = true;

        for (j = 0; j < FONT_HEIGHT; j++)
          {
            for (i = 0; i < FONT_WIDTH; i++)
              {
                img->get_pixel(c.x + i,c.y + j,r,g,b);
                this->font_mask.get_pixel(x + i,y + j,r2,g2,b2);

                if ((is_black(r,g,b)) != (is_black(r2,g2,b2)))
                  matches = false;
              }
          }

        if (matches)
          return k;
      }

    return -1;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, 0x38(%rsp)
movq %rdx, %rax
shrq $0x20, %rax
movq %rax, 0x20(%rsp)
xorl %esi, %esi
leaq 0xf(%rsp), %r13
leaq 0xe(%rsp), %rbp
leaq 0xd(%rsp), %r12
movq %rdx, 0x30(%rsp)
movl %esi, %eax
andl $0x1f, %eax
leal (,%rax,8), %edi
subl %eax, %edi
movq %rdi, 0x40(%rsp)
movl %esi, 0x10(%rsp)
shrl $0x2, %esi
andl $0x38, %esi
movl %esi, 0x14(%rsp)
movb $0x1, %r14b
xorl %esi, %esi
movq 0x20(%rsp), %rax
addl %esi, %eax
movl %eax, 0x1c(%rsp)
movq %rsi, 0x28(%rsp)
movl %esi, %eax
orl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
xorl %r15d, %r15d
leal (%rdx,%r15), %esi
movq %rbx, %rdi
movl 0x1c(%rsp), %edx
movq %r13, %rcx
movq %rbp, %r8
movq %r12, %r9
callq 0xe564
movq 0x40(%rsp), %rax
leal (%rax,%r15), %esi
movq 0x38(%rsp), %rdi
movl 0x18(%rsp), %edx
leaq 0xc(%rsp), %rcx
leaq 0xb(%rsp), %r8
leaq 0xa(%rsp), %r9
callq 0xe564
movq 0x30(%rsp), %rdx
movb 0xe(%rsp), %al
orb 0xf(%rsp), %al
orb 0xd(%rsp), %al
sete %al
movb 0xb(%rsp), %sil
orb 0xc(%rsp), %sil
orb 0xa(%rsp), %sil
setne %sil
xorb %al, %sil
andb %sil, %r14b
incl %r15d
cmpl $0x7, %r15d
jne 0xfaff
movq 0x28(%rsp), %rsi
incl %esi
cmpl $0x8, %esi
jne 0xfae2
testb %r14b, %r14b
jne 0xfba2
movl 0x10(%rsp), %esi
incl %esi
cmpl $0x100, %esi            # imm = 0x100
jne 0xfabc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xfba6
movl 0x10(%rsp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/program.cpp
// Function: program::string_from_image_position[abi:cxx11](image*, coord_2d, unsigned int, bool&)
string program::string_from_image_position(image *img, coord_2d c, unsigned int max_x, bool &success)
  {
    int character;
    string result;
    success = true;

    result = "";

    while (c.x <= max_x)
      {
        character = this->char_from_image_position(img,c);

        if (character < 0)    // error
          {
            success = false;
            result = "";
            return result;
          }

        result += (unsigned char) character;
        c.x += (FONT_WIDTH + 1);   // move to the next character
      }

    result = trim(result);

    if (result.length() == 0)
      success = false;

    return result;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %r9, 0x10(%rsp)
movb $0x1, (%r9)
leaq 0x3a04(%rip), %rcx      # 0x135ff
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x22f0
cmpl %ebp, %r15d
ja 0xfc49
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %r15, %r14
andq %rax, %r14
movl %r15d, %edx
orq %r14, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0xfa84
testl %eax, %eax
js 0xfcc8
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2170
addl $0x8, %r15d
cmpl %ebp, %r15d
jbe 0xfc1c
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0xec7c
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x11472
leaq 0x38(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2230
movq (%r15), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xfca0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0xfcb7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21c0
cmpq $0x0, 0x8(%rbx)
jne 0xfce8
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0xfce8
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x8(%rbx), %rdx
leaq 0x3924(%rip), %rcx      # 0x135ff
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x22f0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0xfd1d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xfd1d
jmp 0xfd1a
jmp 0xfd1a
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xfd37
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O3/margual56[P]Markdown-CLI/src/Component.cpp
// Function: Component::setText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Component::setText(std::string text){
    if(this->children.size() == 0)      // If no components were added before, 
        this->content = {text};         // just set the text (keep the reference NULL, the default)
    else                                // Otherwise,
        this->content = {text, this->children.back()}; // set the reference to the last component added
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x60(%rdi)
je 0x4a7c
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x4f62
movq 0x58(%rbx), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%r14)
jmp 0x4aa5
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x4f62
movq $0x0, 0x20(%r14)
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x4370
movq 0x20(%r14), %rax
movq %rax, 0x40(%rbx)
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x4acd
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42b0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/margual56[P]Markdown-CLI/src/HTML.cpp
// Function: HTML::HTML()
HTML::HTML():Component("html"){
    // Add the head and the body to the list of components
    this->head = new Component("head");
    this->head->setText("<link rel=\"stylesheet\" href=\"default.css\">");
    this->children.push_back(this->head);

    this->body = new Component("body");
    this->children.push_back(this->body);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x10f6f(%rip), %rsi     # 0x16036
leaq 0x10f6c(%rip), %rdx     # 0x1603a
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
callq 0x5000
movq %rbx, %rdi
movq %r14, %rsi
callq 0x483c
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x5103
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x42b0
movl $0x68, %edi
callq 0x42a0
movq %rax, %r15
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x10f1b(%rip), %rsi     # 0x1603b
leaq 0x10f18(%rip), %rdx     # 0x1603f
leaq -0x80(%rbp), %rdi
callq 0x5000
leaq -0x80(%rbp), %rsi
movq %r15, %rdi
callq 0x483c
movq %r15, 0x68(%rbx)
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x5159
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x42b0
movq 0x68(%rbx), %r15
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x10ed7(%rip), %rsi     # 0x16040
leaq 0x10efa(%rip), %rdx     # 0x1606a
leaq -0x60(%rbp), %rdi
callq 0x5000
leaq -0x60(%rbp), %rsi
movq %r15, %rdi
callq 0x4a36
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x519a
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x42b0
movl $0x18, %edi
callq 0x42a0
leaq 0x50(%rbx), %r14
movq 0x68(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4060
incq 0x60(%rbx)
movl $0x68, %edi
callq 0x42a0
movq %rax, %r15
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x10e8f(%rip), %rsi     # 0x1606b
leaq 0x10e8c(%rip), %rdx     # 0x1606f
leaq -0x40(%rbp), %rdi
callq 0x5000
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x483c
movq %r15, 0x70(%rbx)
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5211
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42b0
movl $0x18, %edi
callq 0x42a0
movq 0x70(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4060
incq 0x60(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x528a
movq -0x30(%rbp), %rsi
jmp 0x527d
jmp 0x5287
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x52bc
movq -0x50(%rbp), %rsi
incq %rsi
jmp 0x5292
jmp 0x52b9
movq %rax, %r14
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x528a
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x528a
movq %rax, %r14
movl $0x68, %esi
movq %r15, %rdi
callq 0x42b0
jmp 0x52bc
movq %rax, %r14
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x52c4
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x52c4
movq %rax, %r14
movq %rbx, %rdi
callq 0x595c
movq %r14, %rdi
callq 0x44a0
// File: /workspace/github_cpp_makefile_star2_O3/KokiKishimoto[P]cp_decomposition/./data.hpp
// Function: Data::addEntity(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int addEntity(std::string entity) {
		if (entity_dict.find(entity) == entity_dict.end()) {
			int id = entity_counter;
			entity_dict[entity] = entity_counter;
			entity_dict_rev[entity_counter] = entity;
			++entity_counter;
			return id;
		} else {
			return entity_dict[entity];
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x3f64
leaq 0x10(%r14), %rcx
cmpq %rcx, %rax
je 0x3d91
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3e82
movl (%rax), %ebp
jmp 0x3dbb
movl (%r14), %ebp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3e82
movl %ebp, (%rax)
leaq 0x68(%r14), %rdi
movq %r14, %rsi
callq 0x3efe
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2130
incl (%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/KokiKishimoto[P]cp_decomposition/./data.hpp
// Function: Data::addRelation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int addRelation(std::string relation) {
		if (relation_dict.find(relation) == relation_dict.end()) {
			int id = relation_counter;
			relation_dict[relation] = relation_counter;
			relation_dict_rev[relation_counter] = relation;
			++relation_counter;
			return id;
		} else {
			return relation_dict[relation];
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
callq 0x3f64
leaq 0x40(%r14), %rcx
cmpq %rcx, %rax
je 0x3dfa
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3e82
movl (%rax), %ebp
jmp 0x3e2d
leaq 0x4(%r14), %r12
movl 0x4(%r14), %ebp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3e82
movl %ebp, (%rax)
leaq 0x98(%r14), %rdi
movq %r12, %rsi
callq 0x3efe
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2130
incl 0x4(%r14)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/KokiKishimoto[P]cp_decomposition/cp.cpp
// Function: CP::initializeModel(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, int, std::uniform_real_distribution<double>&)
void initializeModel(std::vector< std::vector<double> >& Vec, const int counter, std::uniform_real_distribution<>& dist){
		for (int i = 0; i < counter; i++) {
			Vec[i].resize(vecDim);
			for (int j = 0; j < vecDim; j++) {
				Vec[i][j] = dist(rnd);
			}
		}
	}

// Assembly:
testl %edx, %edx
jle 0x48c6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x208(%rdi), %r12
movl %edx, %eax
movq %rax, 0x8(%rsp)
movl 0x200(%rdi), %eax
xorl %ebp, %ebp
leaq (,%rbp,2), %r13
addq %rbp, %r13
leaq (,%r13,8), %rdi
addq (%r14), %rdi
movslq %eax, %rsi
callq 0x48c8
movl 0x200(%r15), %eax
testl %eax, %eax
jle 0x48ae
movq %rbp, 0x10(%rsp)
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x4b49
movsd (%rbx), %xmm1
movsd 0x8(%rbx), %xmm2
subsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movq (%r14), %rax
movq (%rax,%r13,8), %rax
movsd %xmm2, (%rax,%rbp,8)
incq %rbp
movslq 0x200(%r15), %rax
cmpq %rax, %rbp
jl 0x4871
movq 0x10(%rsp), %rbp
incq %rbp
cmpq 0x8(%rsp), %rbp
jne 0x4841
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop