LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x898b
movl %eax, %ebp
movq (%r14), %r14
testq %r14, %r14
je 0x8fb0
movq 0x8(%rbx), %rsi
movq 0x10(%rsp), %rcx
addq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0xad68
movq %r14, %rdi
callq 0x2200
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9230
leaq (,%rbx,8), %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2310
testq %rax, %rax
je 0x923d
movq %r15, 0x10(%r14)
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x9237
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9286
leaq (%rbx,%rbx), %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2310
testq %rax, %rax
je 0x9293
movq %r15, 0x10(%r14)
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x928d
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: readBitsFromStream(unsigned long*, unsigned char const*, unsigned long)
static unsigned readBitsFromStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits)
{
  unsigned result = 0, i;
  for(i = 0; i < nbits; i++)
  {
    result += ((unsigned)READBIT(*bitpointer, bitstream)) << i;
    (*bitpointer)++;
  }
  return result;
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %r8d
cmpq %rdx, %r8
jae 0x932e
movq (%rdi), %r8
movq %r8, %r9
shrq $0x3, %r9
movzbl (%rsi,%r9), %r9d
movl %r8d, %r10d
andl $0x7, %r10d
xorl %r11d, %r11d
btl %r10d, %r9d
setb %r11b
shll %cl, %r11d
addl %r11d, %eax
incq %r8
movq %r8, (%rdi)
incl %ecx
jmp 0x92f5
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2260
testq %rax, %rax
je 0x93ee
movq %rax, %rbx
xorl %eax, %eax
cmpq $0x90, %rax
je 0x9381
movl $0x8, (%rbx,%rax,4)
incq %rax
jmp 0x936d
movl $0x90, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x939a
movl $0x9, (%rbx,%rax,4)
incq %rax
jmp 0x9386
movl $0x100, %eax            # imm = 0x100
cmpq $0x118, %rax            # imm = 0x118
je 0x93b3
movl $0x7, (%rbx,%rax,4)
incq %rax
jmp 0x939f
movl $0x118, %eax            # imm = 0x118
cmpq $0x120, %rax            # imm = 0x120
je 0x93cc
movl $0x8, (%rbx,%rax,4)
incq %rax
jmp 0x93b8
pushq $0xf
popq %rcx
movl $0x120, %edx            # imm = 0x120
movq %r14, %rdi
movq %rbx, %rsi
callq 0x944b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2200
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2260
testq %rax, %rax
je 0x9443
movq %rax, %rbx
xorl %eax, %eax
cmpq $0x20, %rax
je 0x9423
movl $0x5, (%rbx,%rax,4)
incq %rax
jmp 0x9411
pushq $0x20
popq %rdx
pushq $0xf
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x944b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2200
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2260
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x94a0
xorl %ecx, %ecx
movl %ecx, %ecx
cmpq %r15, %rcx
jae 0x9488
movl (%r12,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incl %ecx
jmp 0x9476
movl %r15d, 0x1c(%r14)
movl %ebx, 0x18(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x94af
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/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;
  size_t amount, i;
  if(pos >= size) return 0;
  amount = HASH_NUM_CHARACTERS;
  if(pos + amount >= size) amount = size - pos;
  for(i = 0; i < amount; i++) result ^= (data[pos + i] << (i * HASH_SHIFT));
  return result % HASH_NUM_VALUES;
}

// Assembly:
xorl %eax, %eax
cmpq %rsi, %rdx
jae 0x9d0f
leaq 0x3(%rdx), %rax
cmpq %rax, %rsi
cmovbq %rsi, %rax
xorl %ecx, %ecx
xorl %esi, %esi
cmpq %rdx, %rax
je 0x9d0c
movzbl (%rdi,%rdx), %r8d
shll %cl, %r8d
xorl %r8d, %esi
incq %rdx
addl $0x2, %ecx
jmp 0x9cf4
movzwl %si, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2310
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x9e30
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2110
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x2646
testl %eax, %eax
jne 0x9e33
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x94af
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/lodepng.cpp
// Function: string_resize(char**, unsigned long)
static unsigned string_resize(char** out, size_t size)
{
  char* data = (char*)myrealloc(*out, size + 1);
  if(data)
  {
    data[size] = 0; /*null termination char*/
    *out = data;
  }
  return data != 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
incq %rsi
callq 0x2310
testq %rax, %rax
je 0x9e76
movb $0x0, (%rax,%r14)
movq %rax, (%rbx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/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)
{
  /*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 % (8 / bits);
  in &= (1 << bits) - 1; /*filter out any other bits of the input value*/
  in = in << (bits * (8 / bits - p - 1));
  if(p == 0) out[index * bits / 8] = in;
  else out[index * bits / 8] |= in;
}

// Assembly:
movl %ecx, %r9d
movl %edx, %r8d
pushq $0x8
popq %rax
xorl %edx, %edx
divl %r8d
movl %eax, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r10
pushq $-0x1
popq %rax
movl %r8d, %ecx
shll %cl, %eax
notl %eax
andl %r9d, %eax
movl %edx, %ecx
notl %ecx
addl %r10d, %ecx
imull %r8d, %ecx
shll %cl, %eax
movl %r8d, %ecx
imulq %rsi, %rcx
shrq $0x3, %rcx
testq %rdx, %rdx
je 0x9f64
orb %al, (%rdi,%rcx)
retq
movb %al, (%rdi,%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/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)
{
  tree = &tree->next[r];
  if(tree->next == 0) return -1;
  tree = &tree->next[g];
  if(tree->next == 0) return -1;
  tree = &tree->next[b];
  if(tree->next == 0) return -1;
  tree = &tree->next[a];

  return tree->index;
}

// Assembly:
movq (%rdi), %rax
shll $0x4, %esi
movq (%rax,%rsi), %rsi
pushq $-0x1
popq %rax
testq %rsi, %rsi
je 0x9fa3
movzbl %dl, %edx
shll $0x4, %edx
movq (%rsi,%rdx), %rdx
testq %rdx, %rdx
je 0x9fa3
movzbl %cl, %ecx
shll $0x4, %ecx
movq (%rdx,%rcx), %rcx
testq %rcx, %rcx
je 0x9fa3
movzbl %r8b, %eax
shll $0x4, %eax
movl 0x8(%rcx,%rax), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movb %al, (%rdi)
cmpl $0x10, 0x4(%rsi)
setne 0x1(%rdi)
movb %al, 0x2(%rdi)
testl $0xfffffffb, (%rsi)     # imm = 0xFFFFFFFB
sete 0x3(%rdi)
movb %al, 0x4(%rdi)
movb %al, 0xc(%rdi)
movq %rsi, %rdi
callq 0x464d
xorb $0x1, %al
movb %al, 0xd(%rbx)
andl $0x0, 0x10(%rbx)
leaq 0x18(%rbx), %rdi
callq 0x9e88
orl $-0x1, 0x20(%rbx)
movl $0x400, %edi            # imm = 0x400
callq 0x2260
movq %rax, 0x28(%rbx)
movl $0x101, 0x30(%rbx)      # imm = 0x101
movq %r14, %rdi
callq 0x45e2
cmpl $0x8, %eax
ja 0xa4e7
cmpl $0x1, %eax
je 0xa4d1
cmpl $0x2, %eax
jne 0xa4d6
pushq $0x4
jmp 0xa4d3
pushq $0x2
popq %rax
jmp 0xa4e4
cmpl $0x4, %eax
pushq $0x10
popq %rcx
movl $0x100, %eax            # imm = 0x100
cmovel %ecx, %eax
movl %eax, 0x30(%rbx)
movb $0x0, 0x34(%rbx)
movl $0x1, 0x38(%rbx)
movq %r14, %rdi
callq 0x45e2
cmpl $0x1, %eax
sete 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x28, %rsp
movl %r8d, 0x4(%rsp)
movq %rsi, %r12
leaq 0x8(%rsp), %r13
andq $0x0, (%r13)
movq %rdi, %rbp
movq %rcx, 0x18(%rsp)
subq %rcx, %rdx
movq %rdx, 0x10(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpl 0x4(%rsp), %ebx
je 0xa5d0
movq 0x18(%rsp), %r14
leaq (%r15,%r14), %rax
movq %rax, 0x20(%rsp)
subq $0x1, %r14
jb 0xa594
movq %r15, %rax
shrq $0x3, %rax
movl %r15d, %ecx
notb %cl
movzbl (%r12,%rax), %eax
movzbl %cl, %ecx
andl $0x7, %ecx
xorl %edx, %edx
btl %ecx, %eax
setb %dl
incq %r15
movq %r13, %rdi
movq %rbp, %rsi
callq 0xa42d
jmp 0xa55f
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
subq $0x1, %rdx
jb 0xa5bf
movl %eax, %ecx
notb %cl
movb $-0x2, %sil
rolb %cl, %sil
movq %rax, %rcx
shrq $0x3, %rcx
andb %sil, (%rbp,%rcx)
incq %rax
jmp 0xa59e
movq %rax, 0x8(%rsp)
incl %ebx
movq 0x20(%rsp), %r15
jmp 0xa54b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0xb508
pushq $0x40
popq %rdi
callq 0x21b0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb536
movq %r14, (%rbx)
movq %r14, %rdi
callq 0xb578
movl %eax, %ebp
testb %al, %al
jne 0xb231
movq %rbx, %rdi
callq 0xb508
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x40
popq %rsi
movq %r14, %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xb508
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x6ca8
movl %eax, %ebp
testl %eax, %eax
je 0xb298
testl %ebp, %ebp
sete %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x40
popq %rdi
callq 0x21b0
movq %rax, %r14
movl 0x4(%rsp), %esi
movl (%rsp), %edx
movq %rax, %rdi
callq 0xb59c
movq %r14, (%rbx)
xorl %r14d, %r14d
xorl %r12d, %r12d
cmpl (%rsp), %r14d
jae 0xb286
xorl %r15d, %r15d
cmpl 0x4(%rsp), %r15d
jae 0xb302
movq 0x8(%rsp), %rax
movl %r12d, %ecx
movzbl (%rax,%rcx), %ecx
leal 0x1(%r12), %edx
movzbl (%rax,%rdx), %r8d
leal 0x2(%r12), %edx
movzbl (%rax,%rdx), %r9d
movq (%rbx), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0xb604
addl $0x4, %r12d
incl %r15d
jmp 0xb2c4
incl %r14d
jmp 0xb2bb
movq %rax, %rbx
pushq $0x40
popq %rsi
movq %r14, %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %r13
xorl %ebx, %ebx
testq %r13, %r13
je 0xb45d
movq %rsi, %r14
movl 0x30(%r13), %ebp
movl 0x34(%r13), %r15d
movl %ebp, %eax
imull %r15d, %eax
leal (%rax,%rax,2), %edi
callq 0x2260
movq %rax, %r12
xorl %eax, %eax
cmpl %ebp, %ebx
jae 0xb440
xorl %ecx, %ecx
cmpl %ebp, %ecx
jae 0xb43c
movl 0x38(%r13), %edx
imull %ebx, %edx
movl 0x28(%r13), %esi
imull %ecx, %esi
movq 0x20(%r13), %rdi
leal (%rsi,%rdx), %r8d
movb (%rdi,%r8), %r8b
leal (%rsi,%rdx), %r9d
incl %r9d
movb (%rdi,%r9), %r9b
leal 0x2(%rsi,%rdx), %edx
movb (%rdi,%rdx), %dl
movl %eax, %esi
movb %dl, (%r12,%rsi)
leal 0x1(%rax), %edx
movb %r9b, (%r12,%rdx)
leal 0x2(%rax), %edx
movb %r8b, (%r12,%rdx)
addl $0x3, %eax
incl %ecx
jmp 0xb3f1
incl %ebx
jmp 0xb3eb
movq (%r14), %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x8ab2
testl %eax, %eax
sete %bl
movq %r12, %rdi
callq 0x2200
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %rdi
testq %rdi, %rdi
je 0xb4a4
cmpl %esi, 0x30(%rdi)
jbe 0xb4a4
cmpl %edx, 0x34(%rdi)
ja 0xb798
movb $-0x1, %al
movb %al, (%rcx)
movb %al, (%r8)
movb %al, (%r9)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::set_pixel(unsigned int, unsigned int, unsigned char, unsigned char, unsigned char)
inline void set_pixel(const unsigned int x, const unsigned int y,
                         const unsigned char red,
                         const unsigned char green,
                         const unsigned char blue)
   {
      const unsigned int y_offset = y * row_increment_;
      const unsigned int x_offset = x * bytes_per_pixel_;
      data_[y_offset + x_offset + 0] = blue;
      data_[y_offset + x_offset + 1] = green;
      data_[y_offset + x_offset + 2] = red;
   }

// Assembly:
imull 0x38(%rdi), %edx
imull 0x28(%rdi), %esi
movq 0x20(%rdi), %rax
leal (%rsi,%rdx), %r10d
movb %r9b, (%rax,%r10)
movq 0x20(%rdi), %rax
leal 0x1(%rsi,%rdx), %r9d
movb %r8b, (%rax,%r9)
movq 0x20(%rdi), %rax
addl %esi, %edx
addl $0x2, %edx
movb %cl, (%rax,%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::get_pixel(unsigned int, unsigned int, unsigned char&, unsigned char&, unsigned char&)
inline void get_pixel(const unsigned int x, const unsigned int y,
                         unsigned char& red,
                         unsigned char& green,
                         unsigned char& blue)
   {
      const unsigned int y_offset = y * row_increment_;
      const unsigned int x_offset = x * bytes_per_pixel_;
      blue  = data_[y_offset + x_offset + 0];
      green = data_[y_offset + x_offset + 1];
      red   = data_[y_offset + x_offset + 2];
   }

// Assembly:
imull 0x38(%rdi), %edx
imull 0x28(%rdi), %esi
movq 0x20(%rdi), %rax
leal (%rsi,%rdx), %r10d
movb (%rax,%r10), %al
movb %al, (%r9)
movq 0x20(%rdi), %rax
leal 0x1(%rsi,%rdx), %r9d
movb (%rax,%r9), %al
movb %al, (%r8)
movq 0x20(%rdi), %rax
addl %esi, %edx
addl $0x2, %edx
movb (%rax,%rdx), %al
movb %al, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::load_bitmap()
void load_bitmap()
   {
      std::ifstream stream(file_name_.c_str(),std::ios::binary);
      if (!stream)
      {
         //std::cerr << "bitmap_image::load_bitmap() ERROR: bitmap_image - file " << file_name_ << " not found!" << std::endl;
         return;
      }

      bitmap_file_header bfh;
      bitmap_information_header bih;

      read_bfh(stream,bfh);
      read_bih(stream,bih);

      if (bfh.type != 19778)
      {
         stream.close();
         //std::cerr << "bitmap_image::load_bitmap() ERROR: bitmap_image - Invalid type value " << bfh.type << " expected 19778." << std::endl;
         return;
      }

      if (bih.bit_count != 24)
      {
         stream.close();
         //std::cerr << "bitmap_image::load_bitmap() ERROR: bitmap_image - Invalid bit depth " << bih.bit_count << " expected 24." << std::endl;
         return;
      }

      height_ = bih.height;
      width_  = bih.width;

      bytes_per_pixel_ = bih.bit_count >> 3;

      unsigned int padding = (4 - ((3 * width_) % 4)) % 4;
      char padding_data[4] = {0,0,0,0};

      create_bitmap();

      for (unsigned int i = 0; i < height_; ++i)
      {
         unsigned char* data_ptr = row(height_ - i - 1); // read in inverted row order
         stream.read(reinterpret_cast<char*>(data_ptr),sizeof(char) * bytes_per_pixel_ * width_);
         stream.read(padding_data,padding);
      }
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x40(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x2350
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0xb8d6
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xb90c
leaq 0x40(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0xb97a
cmpw $0x4d42, 0x8(%rsp)      # imm = 0x4D42
jne 0xb8cc
cmpw $0x18, 0x26(%rsp)
jne 0xb8cc
movq 0x1c(%rsp), %r14
movq %r14, 0x30(%rbx)
movl $0x3, 0x28(%rbx)
andl $0x0, 0x4(%rsp)
movq %rbx, %rdi
callq 0xba42
movq %r14, %xmm0
movd %xmm0, %r14d
andl $0x3, %r14d
xorl %ebp, %ebp
pushq $-0x1
popq %r13
leaq 0x40(%rsp), %r15
leaq 0x4(%rsp), %r12
movl 0x34(%rbx), %esi
cmpl %esi, %ebp
jae 0xb8d6
addl %r13d, %esi
imull 0x38(%rbx), %esi
addq 0x20(%rbx), %rsi
movl 0x28(%rbx), %eax
movl 0x30(%rbx), %edx
imulq %rax, %rdx
movq %r15, %rdi
callq 0x2220
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2220
incl %ebp
decl %r13d
jmp 0xb893
leaq 0x40(%rsp), %rdi
callq 0x2060
leaq 0x40(%rsp), %rdi
callq 0x2080
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb8f6
jmp 0xb8f6
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::read_bfh(std::basic_ifstream<char, std::char_traits<char>>&, bitmap_image::bitmap_file_header&)
inline void read_bfh(std::ifstream& stream, bitmap_file_header& bfh)
   {
      read_from_stream(stream,bfh.type);
      read_from_stream(stream,bfh.size);
      read_from_stream(stream,bfh.reserved1);
      read_from_stream(stream,bfh.reserved2);
      read_from_stream(stream,bfh.off_bits);

      if (big_endian())
      {
         bfh.type = flip(bfh.type);
         bfh.size = flip(bfh.size);
         bfh.reserved1 = flip(bfh.reserved1);
         bfh.reserved2 = flip(bfh.reserved2);
         bfh.off_bits = flip(bfh.off_bits);
      }
   }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x2
popq %r15
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2220
leaq 0x4(%rbx), %rsi
pushq $0x4
popq %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x2220
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0xa(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
addq $0xc, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::read_bih(std::basic_ifstream<char, std::char_traits<char>>&, bitmap_image::bitmap_information_header&)
inline void read_bih(std::ifstream& stream,bitmap_information_header& bih)
   {
      read_from_stream(stream,bih.size);
      read_from_stream(stream,bih.width);
      read_from_stream(stream,bih.height);
      read_from_stream(stream,bih.planes);
      read_from_stream(stream,bih.bit_count);
      read_from_stream(stream,bih.compression);
      read_from_stream(stream,bih.size_image);
      read_from_stream(stream,bih.x_pels_per_meter);
      read_from_stream(stream,bih.y_pels_per_meter);
      read_from_stream(stream,bih.clr_used);
      read_from_stream(stream,bih.clr_important);

      if (big_endian())
      {
         bih.size = flip(bih.size);
         bih.width = flip(bih.width);
         bih.height = flip(bih.height);
         bih.planes = flip(bih.planes);
         bih.bit_count = flip(bih.bit_count);
         bih.compression = flip(bih.compression);
         bih.size_image = flip(bih.size_image);
         bih.x_pels_per_meter = flip(bih.x_pels_per_meter);
         bih.y_pels_per_meter = flip(bih.y_pels_per_meter);
         bih.clr_used = flip(bih.clr_used);
         bih.clr_important = flip(bih.clr_important);
      }
   }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x4
popq %r15
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2220
leaq 0x4(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0xc(%rbx), %rsi
pushq $0x2
popq %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x2220
leaq 0xe(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x2220
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0x1c(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2220
addq $0x24, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O2/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 0xba6a
callq 0x2230
movl 0x2c(%rbx), %eax
movl %eax, %edi
callq 0x2040
movq %rax, 0x20(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::write_bfh(std::basic_ofstream<char, std::char_traits<char>>&, bitmap_image::bitmap_file_header const&)
inline void write_bfh(std::ofstream& stream, const bitmap_file_header& bfh)
   {
      if (big_endian())
      {
         write_to_stream(stream,flip(bfh.type));
         write_to_stream(stream,flip(bfh.size));
         write_to_stream(stream,flip(bfh.reserved1));
         write_to_stream(stream,flip(bfh.reserved2));
         write_to_stream(stream,flip(bfh.off_bits));
      }
      else
      {
         write_to_stream(stream,bfh.type);
         write_to_stream(stream,bfh.size);
         write_to_stream(stream,bfh.reserved1);
         write_to_stream(stream,bfh.reserved2);
         write_to_stream(stream,bfh.off_bits);
      }
   }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x2
popq %r15
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2250
leaq 0x4(%rbx), %rsi
pushq $0x4
popq %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x2250
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0xa(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
addq $0xc, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::write_bih(std::basic_ofstream<char, std::char_traits<char>>&, bitmap_image::bitmap_information_header const&)
inline void write_bih(std::ofstream& stream, const bitmap_information_header& bih)
   {
      if (big_endian())
      {
         write_to_stream(stream,flip(bih.size));
         write_to_stream(stream,flip(bih.width));
         write_to_stream(stream,flip(bih.height));
         write_to_stream(stream,flip(bih.planes));
         write_to_stream(stream,flip(bih.bit_count));
         write_to_stream(stream,flip(bih.compression));
         write_to_stream(stream,flip(bih.size_image));
         write_to_stream(stream,flip(bih.x_pels_per_meter));
         write_to_stream(stream,flip(bih.y_pels_per_meter));
         write_to_stream(stream,flip(bih.clr_used));
         write_to_stream(stream,flip(bih.clr_important));
      }
      else
      {
         write_to_stream(stream,bih.size);
         write_to_stream(stream,bih.width);
         write_to_stream(stream,bih.height);
         write_to_stream(stream,bih.planes);
         write_to_stream(stream,bih.bit_count);
         write_to_stream(stream,bih.compression);
         write_to_stream(stream,bih.size_image);
         write_to_stream(stream,bih.x_pels_per_meter);
         write_to_stream(stream,bih.y_pels_per_meter);
         write_to_stream(stream,bih.clr_used);
         write_to_stream(stream,bih.clr_important);
      }
   }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x4
popq %r15
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x2250
leaq 0x4(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0xc(%rbx), %rsi
pushq $0x2
popq %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x2250
leaq 0xe(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x2250
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0x1c(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2250
addq $0x24, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rsi, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
movq %rdx, %r15
shrq $0x20, %rdx
movq %rdx, 0x18(%rsp)
xorl %ecx, %ecx
cmpl $0x100, %ecx            # imm = 0x100
je 0xc677
movl %ecx, %eax
andl $0x1f, %eax
imull $0x7, %eax, %ebp
movl %ecx, 0x10(%rsp)
shrl $0x2, %ecx
andl $0x38, %ecx
movl %ecx, 0x14(%rsp)
movb $0x1, %bl
xorl %ecx, %ecx
cmpl $0x8, %ecx
je 0xc667
movq 0x18(%rsp), %rax
leal (%rcx,%rax), %r12d
movq %rcx, 0x20(%rsp)
movl %ecx, %r13d
orl 0x14(%rsp), %r13d
xorl %r14d, %r14d
cmpl $0x7, %r14d
je 0xc65b
leal (%r15,%r14), %esi
movq 0x30(%rsp), %rdi
movl %r12d, %edx
leaq 0xf(%rsp), %rcx
leaq 0xe(%rsp), %r8
leaq 0xd(%rsp), %r9
callq 0xb48e
leal (%r14,%rbp), %esi
movq 0x28(%rsp), %rdi
movl %r13d, %edx
leaq 0xc(%rsp), %rcx
leaq 0xb(%rsp), %r8
leaq 0xa(%rsp), %r9
callq 0xb48e
movb 0xe(%rsp), %al
orb 0xf(%rsp), %al
orb 0xd(%rsp), %al
sete %al
movb 0xb(%rsp), %cl
orb 0xc(%rsp), %cl
orb 0xa(%rsp), %cl
setne %cl
xorb %al, %cl
andb %cl, %bl
incl %r14d
jmp 0xc5ee
movq 0x20(%rsp), %rcx
incl %ecx
jmp 0xc5cc
testb $0x1, %bl
jne 0xc67c
movl 0x10(%rsp), %ecx
incl %ecx
jmp 0xc5a6
pushq $-0x1
popq %rax
jmp 0xc680
movl 0x10(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x48, %rsp
movl %r8d, %ebp
movq %rcx, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rdx, %r12
movq %rsi, %r13
movb $0x0, 0x10(%rdi)
movq %r9, (%rsp)
movb $0x1, (%r9)
leaq 0x2e9f(%rip), %rsi      # 0xf56b
callq 0x2360
movabsq $-0x100000000, %r14     # imm = 0xFFFFFFFF00000000
andq %r15, %r14
cmpl %ebp, %r15d
ja 0xc709
movl %r15d, %edx
orq %r14, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0xc580
testl %eax, %eax
js 0xc757
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2160
addl $0x8, %r15d
jmp 0xc6de
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2280
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xdb7b
leaq 0x28(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2210
movq %r15, %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x20d0
cmpq $0x0, 0x8(%rbx)
jne 0xc76d
movq (%rsp), %rax
movb $0x0, (%rax)
jmp 0xc76d
movq (%rsp), %rax
movb $0x0, (%rax)
leaq 0x2e06(%rip), %rsi      # 0xf56b
movq %rbx, %rdi
callq 0x2360
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x20d0
jmp 0xc795
jmp 0xc792
jmp 0xc792
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x60(%rdi)
je 0x4885
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x43e0
movq 0x58(%rbx), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%r14)
jmp 0x4896
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x43e0
andq $0x0, 0x20(%r14)
addq $0x20, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4ac2
movq %r14, %rdi
callq 0x41a0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x90, %rsp
movq %rdi, %rbx
leaq 0xe25e(%rip), %rsi      # 0x13036
leaq -0xa8(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x4af4
leaq -0xa8(%rbp), %rsi
movq %rbx, %rdi
callq 0x46fc
leaq -0xa8(%rbp), %rdi
callq 0x41a0
pushq $0x68
popq %rdi
callq 0x42f0
movq %rax, %r15
leaq 0xe226(%rip), %rsi      # 0x1303b
leaq -0x88(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x4af4
leaq -0x88(%rbp), %rsi
movq %r15, %rdi
callq 0x46fc
movq %r15, 0x68(%rbx)
leaq -0x88(%rbp), %rdi
callq 0x41a0
movq 0x68(%rbx), %r14
leaq 0xe1f1(%rip), %rsi      # 0x13040
leaq -0x68(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x4af4
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x4856
leaq 0x68(%rbx), %r15
leaq -0x68(%rbp), %rdi
callq 0x41a0
leaq 0x50(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4ae4
pushq $0x68
popq %rdi
callq 0x42f0
movq %rax, %r15
leaq 0xe1d5(%rip), %rsi      # 0x1306b
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x4af4
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x46fc
leaq 0x70(%rbx), %r12
movq %r15, 0x70(%rbx)
leaq -0x48(%rbp), %rdi
callq 0x41a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x4ae4
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x48(%rbp), %rdi
jmp 0x4f00
jmp 0x4f07
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x41a0
jmp 0x4f30
jmp 0x4f2d
movq %rax, %r14
leaq -0x88(%rbp), %rdi
callq 0x41a0
jmp 0x4f0a
movq %rax, %r14
pushq $0x68
popq %rsi
movq %r15, %rdi
callq 0x4300
jmp 0x4f30
movq %rax, %r14
leaq -0xa8(%rbp), %rdi
callq 0x41a0
jmp 0x4f38
movq %rax, %r14
jmp 0x4f38
movq %rax, %r14
movq %rbx, %rdi
callq 0x5364
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O2/margual56[P]Markdown-CLI/src/HTML.cpp
// Function: HTML::HTML(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
HTML::HTML(std::string content,std::string cssFilePath):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=\"" + cssFilePath + "\">");
    this->children.push_back(this->head);

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

    this->setText(content);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xdeb6(%rip), %rsi      # 0x13036
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4af4
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdi
callq 0x46fc
leaq -0xe8(%rbp), %rdi
callq 0x41a0
pushq $0x68
popq %rdi
callq 0x42f0
movq %rax, %r12
leaq 0xde7e(%rip), %rsi      # 0x1303b
leaq -0xc8(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4af4
leaq -0xc8(%rbp), %rsi
movq %r12, %rdi
callq 0x46fc
movq %r12, 0x68(%rbx)
leaq -0xc8(%rbp), %rdi
callq 0x41a0
movq 0x68(%rbx), %r12
leaq 0xde79(%rip), %rsi      # 0x13070
leaq -0x48(%rbp), %rdi
movq %r15, %rdx
callq 0x4b58
leaq 0xde5e(%rip), %rdx      # 0x13068
leaq -0xa8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4b2f
leaq -0xa8(%rbp), %rsi
movq %r12, %rdi
callq 0x4856
leaq 0x68(%rbx), %r12
leaq -0xa8(%rbp), %rdi
callq 0x41a0
leaq -0x48(%rbp), %rdi
callq 0x41a0
leaq 0x50(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ae4
pushq $0x68
popq %rdi
callq 0x42f0
movq %rax, %r12
leaq 0xde08(%rip), %rsi      # 0x1306b
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4af4
leaq -0x88(%rbp), %rsi
movq %r12, %rdi
callq 0x46fc
leaq 0x70(%rbx), %r13
movq %r12, 0x70(%rbx)
leaq -0x88(%rbp), %rdi
callq 0x41a0
movq %r15, %rdi
movq %r13, %rsi
callq 0x4ae4
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x43e0
leaq -0x68(%rbp), %rsi
movq %rbx, %rdi
callq 0x5110
leaq -0x68(%rbp), %rdi
callq 0x41a0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x68(%rbp), %rdi
jmp 0x5303
movq %rax, %r14
leaq -0x88(%rbp), %rdi
jmp 0x5316
jmp 0x531d
movq %rax, %r14
leaq -0xa8(%rbp), %rdi
callq 0x41a0
jmp 0x52ff
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x41a0
jmp 0x5346
jmp 0x5343
movq %rax, %r14
leaq -0xc8(%rbp), %rdi
callq 0x41a0
jmp 0x5320
movq %rax, %r14
pushq $0x68
popq %rsi
movq %r12, %rdi
callq 0x4300
jmp 0x5346
movq %rax, %r14
leaq -0xe8(%rbp), %rdi
callq 0x41a0
jmp 0x534e
movq %rax, %r14
jmp 0x534e
movq %rax, %r14
movq %rbx, %rdi
callq 0x5364
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/exponential.h
// Function: efgy::math::exponentiate::integral<efgy::math::numeric::fractional<long long>, 5l>::raise(efgy::math::numeric::fractional<long long> const&)
constexpr static Q raise(const Q &base) {
    return (exponent % 2 == 0)
               ? integral<Q, (exponent >> 1)>::raise(base * base)
               : (base *
                  integral<Q, ((exponent - 1) >> 1)>::raise(base * base));
  }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rdi, %rsi
callq 0xf9d8
movq %rsp, %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
callq 0x5998
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rbx, %rdi
callq 0xf9d8
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/cp.cpp
// Function: ArgPos(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char**)
int ArgPos(std::string str, int argc, char **argv) {
	int a;
	for (a = 1; a < argc; a++){
		if (str == argv[a]) {
			if (a == argc - 1) {
				std::cout << "Argument missing for" << str << std::endl;
				exit(1);
			}
			return a;
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movslq %esi, %r12
leal -0x2(%r12), %r13d
pushq $0x1
popq %r15
pushq $-0x1
popq %rbp
cmpq %r12, %r15
jge 0x2511
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x295c
testb %al, %al
jne 0x2509
incq %r15
decl %r13d
jmp 0x24ec
testl %r13d, %r13d
je 0x2522
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7a9f(%rip), %rdi      # 0x9fc8
leaq 0x3b3c(%rip), %rsi      # 0x606c
callq 0x2200
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3918
leaq 0x10(%r14), %rcx
cmpq %rcx, %rax
je 0x3773
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3864
movl (%rax), %ebp
jmp 0x379d
movl (%r14), %ebp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3864
movl %ebp, (%rax)
leaq 0x68(%r14), %rdi
movq %r14, %rsi
callq 0x38ca
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