LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_zlib_decompress
unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in,
                                 size_t insize, const LodePNGDecompressSettings* settings)
{
  unsigned error = 0;
  unsigned CM, CINFO, FDICT;

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

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

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

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

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

  return 0; /*no error*/
}

// Assembly:
movl $0x35, %eax
cmpq $0x2, %rcx
jb 0x3d8a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movzbl (%rdx), %edx
movl %edx, %eax
shll $0x8, %eax
movzbl 0x1(%r12), %ecx
orl %ecx, %eax
imull $0xbdef7bdf, %eax, %esi # imm = 0xBDEF7BDF
movl $0x18, %eax
cmpl $0x8421084, %esi        # imm = 0x8421084
ja 0x3d7c
movl %edx, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %dl, %dl
sets %dl
orb %al, %dl
movl $0x19, %eax
jne 0x3d7c
movl $0x1a, %eax
testb $0x20, %cl
jne 0x3d7c
movq %r8, %r13
movq %rdi, %r14
leaq 0x2(%r12), %rdx
leaq -0x2(%r15), %rcx
movq 0x10(%r8), %rax
movq %rbx, %rsi
testq %rax, %rax
je 0x3d4e
movq %r13, %r8
callq *%rax
jmp 0x3d53
callq 0x199d
testl %eax, %eax
jne 0x3d7c
cmpl $0x0, (%r13)
jne 0x3d7a
movl -0x4(%r12,%r15), %ebp
bswapl %ebp
movq (%r14), %rdi
movl (%rbx), %esi
callq 0x3d8b
movl %eax, %ecx
movl $0x3a, %eax
cmpl %ebp, %ecx
jne 0x3d7c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: adler32
static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len)
{
   unsigned s1 = adler & 0xffff;
   unsigned s2 = (adler >> 16) & 0xffff;

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

  return (s2 << 16) | s1;
}

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

// Assembly:
testq %rsi, %rsi
je 0x412f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
leaq 0xa0ae(%rip), %rdx      # 0xe1c0
movb (%rdi,%rcx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rdx,%r8,4), %eax
incq %rcx
cmpq %rcx, %rsi
jne 0x4112
notl %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_chunk_append
unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk)
{
  unsigned i;
  unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12;
  unsigned char *chunk_start, *new_buffer;
  size_t new_length = (*outlength) + total_chunk_length;
  if(new_length < total_chunk_length || new_length < (*outlength)) return 77; /*integer overflow happened*/

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

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

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movzbl (%rdx), %r13d
shll $0x18, %r13d
movzbl 0x1(%rdx), %r15d
shll $0x10, %r15d
leal (%r15,%r13), %eax
movzbl 0x2(%rdx), %r14d
shll $0x8, %r14d
orl %r14d, %eax
movzbl 0x3(%rdx), %ecx
leal (%rcx,%rax), %ebp
addl $0xc, %ebp
movq (%rsi), %rax
movq %rbp, %r12
movl $0x4d, %edx
addq %rax, %r12
jb 0x4346
movq %rax, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq (%rdi), %rdi
movq %r12, %rsi
callq 0x1120
testq %rax, %rax
je 0x4341
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq 0x20(%rsp), %rcx
movq %r12, (%rcx)
xorl %edx, %edx
testl %ebp, %ebp
je 0x4346
addq 0x8(%rsp), %rax
orl %r15d, %r13d
orl %r14d, %r13d
movq 0x10(%rsp), %rcx
leal (%rcx,%r13), %edx
addl $0xb, %edx
incq %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x10e0
xorl %edx, %edx
jmp 0x4346
movl $0x53, %edx
movl %edx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_chunk_create
unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length,
                              const char* type, const unsigned char* data)
{
  unsigned i;
  unsigned char *chunk, *new_buffer;
  size_t new_length = (*outlength) + length + 12;
  if(new_length < length + 12 || new_length < (*outlength)) return 77; /*integer overflow happened*/
  new_buffer = (unsigned char*)lodepng_realloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*out) = new_buffer;
  (*outlength) = new_length;
  chunk = &(*out)[(*outlength) - length - 12];

  /*1: length*/
  lodepng_set32bitInt(chunk, (unsigned)length);

  /*2: chunk name (4 letters)*/
  chunk[4] = (unsigned char)type[0];
  chunk[5] = (unsigned char)type[1];
  chunk[6] = (unsigned char)type[2];
  chunk[7] = (unsigned char)type[3];

  /*3: the data*/
  for(i = 0; i != length; ++i) chunk[8 + i] = data[i];

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

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %r13d
leaq 0xc(%r13), %rbp
addq (%rsi), %rbp
setb %al
leal 0xc(%rdx), %ecx
cmpq %rcx, %rbp
setb %cl
orb %al, %cl
movl $0x4d, %eax
jne 0x4427
movq %r8, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, (%rsp)
movq (%rdi), %rdi
movq %rbp, %rsi
callq 0x1120
testq %rax, %rax
je 0x4422
movq %rax, (%r12)
movq %rbp, (%r15)
subq %r13, %rbp
leaq (%rax,%rbp), %rdi
addq $-0xc, %rdi
movq (%rsp), %rdx
movl %edx, %ecx
shrl $0x18, %ecx
movb %cl, -0xc(%rax,%rbp)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, -0xb(%rax,%rbp)
movb %dh, -0xa(%rax,%rbp)
movb %dl, -0x9(%rax,%rbp)
movb (%r14), %cl
movb %cl, -0x8(%rax,%rbp)
movb 0x1(%r14), %cl
movb %cl, -0x7(%rax,%rbp)
movb 0x2(%r14), %cl
movb %cl, -0x6(%rax,%rbp)
movb 0x3(%r14), %cl
movb %cl, -0x5(%rax,%rbp)
testl %edx, %edx
je 0x4419
negq %r13
movl $0x8, %eax
movb -0x8(%rbx,%rax), %cl
movl %eax, %edx
movb %cl, (%rdi,%rdx)
leaq (%rax,%r13), %rcx
incq %rcx
incq %rax
cmpq $0x8, %rcx
jne 0x4400
callq 0x423b
xorl %eax, %eax
jmp 0x4427
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_color_mode_copy
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source)
{
  size_t i;
  lodepng_color_mode_cleanup(dest);
  *dest = *source;
  if(source->palette)
  {
    dest->palette = (unsigned char*)lodepng_malloc(1024);
    if(!dest->palette && source->palettesize) return 83; /*alloc fail*/
    for(i = 0; i != source->palettesize * 4; ++i) dest->palette[i] = source->palette[i];
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x44a8
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
xorl %eax, %eax
cmpq $0x0, 0x8(%rbx)
je 0x4523
movl $0x400, %edi            # imm = 0x400
callq 0x10f0
movq %rax, (%r15)
testq %rax, %rax
je 0x4517
movq 0x10(%rbx), %rcx
shlq $0x2, %rcx
movl $0x0, %eax
testq %rcx, %rcx
je 0x4523
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb (%rdx,%rcx), %dl
movq (%r15), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
movq 0x10(%rbx), %rdx
shlq $0x2, %rdx
cmpq %rdx, %rcx
jne 0x44f8
jmp 0x4523
movl $0x53, %eax
cmpq $0x0, 0x10(%rbx)
je 0x44e2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_palette_add
unsigned lodepng_palette_add(LodePNGColorMode* info,
                             unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
  unsigned char* data;
  /*the same resize technique as C++ std::vectors is used, and here it's made so that for a palette with
  the max of 256 colors, it'll have the exact alloc size*/
  if(!info->palette) /*allocate palette if empty*/
  {
    /*room for 256 colors with 4 bytes each*/
    data = (unsigned char*)lodepng_realloc(info->palette, 1024);
    if(!data) return 83; /*alloc fail*/
    else info->palette = data;
  }
  info->palette[4 * info->palettesize + 0] = r;
  info->palette[4 * info->palettesize + 1] = g;
  info->palette[4 * info->palettesize + 2] = b;
  info->palette[4 * info->palettesize + 3] = a;
  ++info->palettesize;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
jne 0x4559
movl $0x400, %edi            # imm = 0x400
callq 0x10f0
testq %rax, %rax
je 0x459a
movq %rax, 0x8(%r14)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r12b, (%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r15b, 0x1(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bpl, 0x2(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bl, 0x3(%rax,%rcx,4)
incq 0x10(%r14)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x53, %eax
jmp 0x4591
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_get_raw_size
size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color)
{
  /*will not overflow for any color type if roughly w * h < 268435455*/
  size_t bpp = lodepng_get_bpp(color);
  size_t n = w * h;
  return ((n / 8) * bpp) + ((n & 7) * bpp + 7) / 8;
}

// Assembly:
movl %esi, %eax
movl (%rdx), %esi
movl 0x4(%rdx), %edx
xorl %ecx, %ecx
cmpq $0x6, %rsi
ja 0x4661
leaq 0xa3c6(%rip), %rcx      # 0xea24
movl (%rcx,%rsi,4), %ecx
imull %edx, %ecx
imull %edi, %eax
movl %eax, %edx
shrl $0x3, %edx
imulq %rcx, %rdx
andl $0x7, %eax
imulq %rcx, %rax
addq $0x7, %rax
shrq $0x3, %rax
addq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_get_raw_size_lct
size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
{
  /*will not overflow for any color type if roughly w * h < 268435455*/
  size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth);
  size_t n = w * h;
  return ((n / 8) * bpp) + ((n & 7) * bpp + 7) / 8;
}

// Assembly:
movl %esi, %eax
xorl %esi, %esi
cmpl $0x6, %edx
ja 0x4698
movl %edx, %edx
leaq 0xa38f(%rip), %rsi      # 0xea24
movl (%rsi,%rdx,4), %esi
imull %ecx, %esi
imull %edi, %eax
movl %eax, %ecx
shrl $0x3, %ecx
imulq %rsi, %rcx
andl $0x7, %eax
imulq %rsi, %rax
addq $0x7, %rax
shrq $0x3, %rax
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: LodePNGText_cleanup
static void LodePNGText_cleanup(LodePNGInfo* info)
{
  size_t i;
  for(i = 0; i != info->text_num; ++i)
  {
    string_cleanup(&info->text_keys[i]);
    string_cleanup(&info->text_strings[i]);
  }
  lodepng_free(info->text_keys);
  lodepng_free(info->text_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x48(%rdi)
je 0x46ff
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x50(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x1030
movq %r14, (%r12,%r15,8)
movq 0x58(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x1030
movq %r14, (%r12,%r15,8)
incq %r15
cmpq 0x48(%rbx), %r15
jne 0x46d4
movq 0x50(%rbx), %rdi
callq 0x1030
movq 0x58(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_add_text
unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str)
{
  char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1)));
  if(!new_keys || !new_strings)
  {
    lodepng_free(new_keys);
    lodepng_free(new_strings);
    return 83; /*alloc fail*/
  }

  ++info->text_num;
  info->text_keys = new_keys;
  info->text_strings = new_strings;

  string_init(&info->text_keys[info->text_num - 1]);
  string_set(&info->text_keys[info->text_num - 1], key);

  string_init(&info->text_strings[info->text_num - 1]);
  string_set(&info->text_strings[info->text_num - 1], str);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1120
movq %rax, %r12
movq 0x48(%r14), %rax
movq 0x58(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1120
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x47fb
movq %rbx, (%rsp)
movq 0x48(%r14), %rbx
leaq 0x1(%rbx), %rbp
movq %rbp, 0x48(%r14)
movq %r12, 0x50(%r14)
movq %r13, 0x58(%r14)
movq $0x0, (%r12,%rbx,8)
movl $0x1, %edi
callq 0x10f0
testq %rax, %rax
je 0x47aa
movb $0x0, (%rax)
movq %rax, (%r12,%rbx,8)
leaq (%r12,%rbp,8), %rdi
addq $-0x8, %rdi
movq %r15, %rsi
callq 0x481f
movq 0x48(%r14), %rbx
movq 0x58(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x10f0
testq %rax, %rax
je 0x47e2
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x58(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq (%rsp), %rsi
callq 0x481f
xorl %eax, %eax
jmp 0x4810
movq %r12, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: string_set
static void string_set(char** out, const char* in)
{
  size_t insize = strlen(in), i;
  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 0x1090
movq %rax, %r15
movq (%r14), %rdi
leaq 0x1(%rax), %rsi
callq 0x1120
testq %rax, %rax
je 0x4866
movb $0x0, (%rax,%r15)
movq %rax, (%r14)
testq %r15, %r15
je 0x4866
xorl %eax, %eax
movb (%rbx,%rax), %cl
movq (%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x4855
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: LodePNGIText_cleanup
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]);
  }
  lodepng_free(info->itext_keys);
  lodepng_free(info->itext_langtags);
  lodepng_free(info->itext_transkeys);
  lodepng_free(info->itext_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x60(%rdi)
je 0x48d6
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x68(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x1030
movq %r14, (%r12,%r15,8)
movq 0x70(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x1030
movq %r14, (%r12,%r15,8)
movq 0x78(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x1030
movq %r14, (%r12,%r15,8)
movq 0x80(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x1030
movq %r14, (%r12,%r15,8)
incq %r15
cmpq 0x60(%rbx), %r15
jne 0x4886
movq 0x68(%rbx), %rdi
callq 0x1030
movq 0x70(%rbx), %rdi
callq 0x1030
movq 0x78(%rbx), %rdi
callq 0x1030
movq 0x80(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_info_init
void lodepng_info_init(LodePNGInfo* info)
{
  lodepng_color_mode_init(&info->color);
  info->interlace_method = 0;
  info->compression_method = 0;
  info->filter_method = 0;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  info->background_defined = 0;
  info->background_r = info->background_g = info->background_b = 0;

  LodePNGText_init(info);
  LodePNGIText_init(info);

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

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

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x10(%rdi)
movups %xmm0, 0x18(%rdi)
xorl %eax, %eax
movl %eax, 0x8(%rdi)
movq $0x0, (%rdi)
movl %eax, 0xa4(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movl %eax, 0x88(%rdi)
movups %xmm0, 0xb8(%rdi)
movups %xmm0, 0xc8(%rdi)
movups %xmm0, 0xd8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_info_cleanup
void lodepng_info_cleanup(LodePNGInfo* info)
{
  lodepng_color_mode_cleanup(&info->color);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  LodePNGText_cleanup(info);
  LodePNGIText_cleanup(info);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x4b82
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rbx, %rdi
callq 0x46bc
movq %rbx, %rdi
callq 0x486e
xorl %r14d, %r14d
movq 0xb8(%rbx,%r14,8), %rdi
callq 0x1030
incq %r14
cmpq $0x3, %r14
jne 0x4b9c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_info_copy
unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source)
{
  lodepng_info_cleanup(dest);
  *dest = *source;
  lodepng_color_mode_init(&dest->color);
  CERROR_TRY_RETURN(lodepng_color_mode_copy(&dest->color, &source->color));

#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  CERROR_TRY_RETURN(LodePNGText_copy(dest, source));
  CERROR_TRY_RETURN(LodePNGIText_copy(dest, source));

  LodePNGUnknownChunks_init(dest);
  CERROR_TRY_RETURN(LodePNGUnknownChunks_copy(dest, source));
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4b69
movl $0xe8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10e0
leaq 0x10(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x10(%r14)
movups %xmm0, 0x18(%r14)
leaq 0x10(%rbx), %rsi
callq 0x448b
movl %eax, %ebp
testl %eax, %eax
jne 0x4d80
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
movq $0x0, 0x58(%r14)
cmpq $0x0, 0x48(%rbx)
je 0x4c55
xorl %r12d, %r12d
movq 0x50(%rbx), %rax
movq 0x58(%rbx), %rcx
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
movq %r14, %rdi
callq 0x471c
testl %eax, %eax
cmovnel %eax, %r15d
jne 0x4c58
incq %r12
cmpq 0x48(%rbx), %r12
jne 0x4c2c
xorl %r15d, %r15d
testl %r15d, %r15d
cmovnel %r15d, %ebp
jne 0x4d80
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
movups %xmm0, 0x60(%r14)
movq $0x0, 0x80(%r14)
cmpq $0x0, 0x60(%rbx)
je 0x4cc3
xorl %r12d, %r12d
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
movq 0x78(%rbx), %rax
movq (%rax,%r12,8), %rcx
movq 0x80(%rbx), %rax
movq (%rax,%r12,8), %r8
movq %r14, %rdi
callq 0x4908
testl %eax, %eax
cmovnel %eax, %r15d
jne 0x4cc6
incq %r12
cmpq 0x60(%rbx), %r12
jne 0x4c87
xorl %r15d, %r15d
testl %r15d, %r15d
cmovnel %r15d, %ebp
jne 0x4d80
leaq 0xb8(%r14), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%r14)
movups %xmm0, 0xc8(%r14)
movups %xmm0, 0xb8(%r14)
xorl %r15d, %r15d
movq (%r12,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq $0x3, %r15
jne 0x4cf8
xorl %r13d, %r13d
movq 0xd0(%rbx,%r13,8), %rbp
movq %rbp, 0xd0(%r14,%r13,8)
movq 0xd0(%rbx,%r13,8), %r15
movq %r15, %rdi
callq 0x10f0
movq %rax, 0xb8(%r14,%r13,8)
testq %rax, %rax
setne %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x4d7b
testq %r15, %r15
je 0x4d6e
xorl %eax, %eax
movq 0xb8(%rbx,%r13,8), %rcx
movb (%rcx,%rax), %cl
movq (%r12,%r13,8), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq 0xd0(%rbx,%r13,8), %rax
jb 0x4d4f
incq %r13
xorl %ebp, %ebp
cmpq $0x3, %r13
jne 0x4d0d
jmp 0x4d80
movl $0x53, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_color_mode_equal
static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b)
{
  size_t i;
  if(a->colortype != b->colortype) return 0;
  if(a->bitdepth != b->bitdepth) return 0;
  if(a->key_defined != b->key_defined) return 0;
  if(a->key_defined)
  {
    if(a->key_r != b->key_r) return 0;
    if(a->key_g != b->key_g) return 0;
    if(a->key_b != b->key_b) return 0;
  }
  /*if one of the palette sizes is 0, then we consider it to be the same as the
  other: it means that e.g. the palette was not given by the user and should be
  considered the same as the palette inside the PNG.*/
  if(1/*a->palettesize != 0 && b->palettesize != 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 0x5335
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x5335
movl 0x18(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
jne 0x5335
testl %ecx, %ecx
je 0x52fd
movl 0x1c(%rdi), %ecx
cmpl 0x1c(%rsi), %ecx
jne 0x5335
movl 0x20(%rdi), %ecx
cmpl 0x20(%rsi), %ecx
jne 0x5335
movl 0x24(%rdi), %ecx
cmpl 0x24(%rsi), %ecx
jne 0x5335
movq 0x10(%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jne 0x5335
shlq $0x2, %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x5335
movq 0x8(%rdi), %rdx
movq 0x8(%rsi), %rsi
xorl %edi, %edi
movb (%rdx,%rdi), %r8b
cmpb (%rsi,%rdi), %r8b
jne 0x5333
incq %rdi
cmpq %rdi, %rcx
jne 0x531f
jmp 0x5335
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: color_tree_add
static void color_tree_add(ColorTree* tree,
                           unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index)
{
  int bit;
  for(bit = 0; bit < 8; ++bit)
  {
    int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1);
    if(!tree->children[i])
    {
      tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree));
      color_tree_init(tree->children[i]);
    }
    tree = tree->children[i];
  }
  tree->index = (int)index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, (%rsp)
movl %ecx, %r15d
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %r12
xorl %ebx, %ebx
movl %r8d, 0x4(%rsp)
movl %r14d, %eax
movl %ebx, %ecx
shrl %cl, %eax
movl %r13d, %edi
shrl %cl, %edi
andl $0x1, %eax
andl $0x1, %edi
movl %r15d, %r10d
shrl %cl, %r10d
andl $0x1, %r10d
xorl %ecx, %ecx
btl %ebx, %r8d
setb %cl
leal (%rcx,%rdi,4), %ecx
leal (%rcx,%rax,8), %eax
leal (%rax,%r10,2), %ebp
cmpq $0x0, (%r12,%rbp,8)
jne 0x53cd
movl $0x88, %edi
callq 0x10f0
movl 0x4(%rsp), %r8d
movq %rax, (%r12,%rbp,8)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x70(%rax)
movl $0xffffffff, 0x80(%rax) # imm = 0xFFFFFFFF
movq (%r12,%rbp,8), %r12
incl %ebx
cmpl $0x8, %ebx
jne 0x5358
movl (%rsp), %eax
movl %eax, 0x80(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: color_tree_cleanup
static void color_tree_cleanup(ColorTree* tree)
{
  int i;
  for(i = 0; i != 16; ++i)
  {
    if(tree->children[i])
    {
      color_tree_cleanup(tree->children[i]);
      lodepng_free(tree->children[i]);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x5cec
callq 0x5ccb
movq (%rbx,%r14,8), %rdi
callq 0x1030
incq %r14
cmpq $0x10, %r14
jne 0x5cd5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: checkColorValidity
static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) /*bd = bitdepth*/
{
  switch(colortype)
  {
    case 0: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; /*grey*/
    case 2: if(!(                                 bd == 8 || bd == 16)) return 37; break; /*RGB*/
    case 3: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8            )) return 37; break; /*palette*/
    case 4: if(!(                                 bd == 8 || bd == 16)) return 37; break; /*grey + alpha*/
    case 6: if(!(                                 bd == 8 || bd == 16)) return 37; break; /*RGBA*/
    default: return 31;
  }
  return 0; /*allowed color type / bits combination*/
}

// Assembly:
movl $0x1f, %eax
cmpl $0x6, %edi
ja 0x6a6e
movl %edi, %ecx
leaq 0x76b5(%rip), %rdx      # 0xe0dc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
movl $0x25, %eax
cmovel %esi, %eax
retq
movl $0x25, %eax
cmpl $0x10, %esi
ja 0x6a6e
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x6a6e
xorl %eax, %eax
retq
decl %esi
movl $0x25, %eax
cmpl $0x8, %esi
jae 0x6a6e
movl %esi, %eax
leaq 0x8f29(%rip), %rcx      # 0xf994
movl (%rcx,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_decode_memory
unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in,
                               size_t insize, LodePNGColorType colortype, unsigned bitdepth)
{
  unsigned error;
  LodePNGState state;
  lodepng_state_init(&state);
  state.info_raw.colortype = colortype;
  state.info_raw.bitdepth = bitdepth;
  error = lodepng_decode(out, w, h, &state, in, insize);
  lodepng_state_cleanup(&state);
  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %r8, %rax
movq %rcx, %r8
movl 0x1c0(%rsp), %ecx
movaps 0x685e(%rip), %xmm0     # 0xe030
movq %rsp, %rbx
movups %xmm0, 0x24(%rbx)
xorl %r10d, %r10d
movl %r10d, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x14(%rbx)
movaps 0x684f(%rip), %xmm1     # 0xe040
movups %xmm1, 0x34(%rbx)
movl $0x1, %r11d
movl %r11d, 0x44(%rbx)
movups %xmm0, 0x48(%rbx)
movq %r10, 0x58(%rbx)
movl %r11d, 0x68(%rbx)
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movl %r11d, 0x80(%rbx)
movups %xmm0, 0xa0(%rbx)
movabsq $0x800000006, %r14      # imm = 0x800000006
movq %r14, 0x88(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0xd8(%rbx)
movq %r14, 0xc0(%rbx)
movups %xmm0, 0xc8(%rbx)
movl %r10d, 0xb8(%rbx)
movq %r10, 0xb0(%rbx)
movl %r10d, 0x154(%rbx)
movl %r10d, 0x138(%rbx)
movups %xmm0, 0x128(%rbx)
movups %xmm0, 0x118(%rbx)
movups %xmm0, 0x108(%rbx)
movups %xmm0, 0xf8(%rbx)
movups %xmm0, 0xe8(%rbx)
movups %xmm0, 0x188(%rbx)
movups %xmm0, 0x178(%rbx)
movups %xmm0, 0x168(%rbx)
movl %r11d, 0x198(%rbx)
movl %r9d, 0x88(%rbx)
movl %ecx, 0x8c(%rbx)
movq %rbx, %rcx
movq %rax, %r9
callq 0x6a6f
movl %eax, %ebp
movq %rbx, %rdi
callq 0x79bf
movl %ebp, %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_decode_file
unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename,
                             LodePNGColorType colortype, unsigned bitdepth)
{
  unsigned char* buffer = 0;
  size_t buffersize;
  unsigned error;
  error = lodepng_load_file(&buffer, &buffersize, filename);
  if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth);
  lodepng_free(buffer);
  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movl %r8d, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
leaq 0x10(%rsp), %rsi
movq %rcx, %rdx
callq 0x1261
movl %eax, %r13d
testl %eax, %eax
jne 0x7a83
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movl %ebp, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %r9d
callq 0x77b3
movl %eax, %r13d
movq 0x8(%rsp), %rdi
callq 0x1030
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_decoder_settings_init
void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings)
{
  settings->color_convert = 1;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  settings->read_text_chunks = 1;
  settings->remember_unknown_chunks = 0;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  settings->ignore_crc = 0;
  lodepng_decompress_settings_init(&settings->zlibsettings);
}

// Assembly:
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x24(%rdi)
xorl %eax, %eax
movl %eax, 0x2c(%rdi)
movl %eax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x14(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_encoder_settings_init
void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings)
{
  lodepng_compress_settings_init(&settings->zlibsettings);
  settings->filter_palette_zero = 1;
  settings->filter_strategy = LFS_MINSUM;
  settings->auto_convert = 1;
  settings->force_palette = 0;
  settings->predefined_filters = 0;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  settings->add_id = 0;
  settings->text_compression = 1;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
}

// Assembly:
movaps 0x6537(%rip), %xmm0     # 0xe020
movups %xmm0, (%rdi)
movabsq $0x100000080, %rax      # imm = 0x100000080
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movl $0x1, %eax
movl %eax, 0x38(%rdi)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movl %eax, 0x50(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_state_copy
void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source)
{
  lodepng_state_cleanup(dest);
  *dest = *source;
  lodepng_color_mode_init(&dest->info_raw);
  lodepng_info_init(&dest->info_png);
  dest->error = lodepng_color_mode_copy(&dest->info_raw, &source->info_raw); if(dest->error) return;
  dest->error = lodepng_info_copy(&dest->info_png, &source->info_png); if(dest->error) return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x79bf
movl $0x1a0, %edx            # imm = 0x1A0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10e0
movl $0x88, %esi
leaq (%rbx,%rsi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x88(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0xd8(%rbx)
movq %rax, 0xc0(%rbx)
movups %xmm0, 0xc8(%rbx)
xorl %eax, %eax
movl %eax, 0xb8(%rbx)
movq $0x0, 0xb0(%rbx)
movl %eax, 0x154(%rbx)
movups %xmm0, 0xe8(%rbx)
movups %xmm0, 0xf8(%rbx)
movups %xmm0, 0x108(%rbx)
movups %xmm0, 0x118(%rbx)
movups %xmm0, 0x128(%rbx)
movl %eax, 0x138(%rbx)
movups %xmm0, 0x168(%rbx)
movups %xmm0, 0x178(%rbx)
movups %xmm0, 0x188(%rbx)
addq %r14, %rsi
callq 0x448b
movl %eax, 0x198(%rbx)
testl %eax, %eax
jne 0x7c0b
leaq 0xb0(%rbx), %rdi
addq $0xb0, %r14
movq %r14, %rsi
callq 0x4bba
movl %eax, 0x198(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: writeSignature
static void writeSignature(ucvector* out)
{
  /*8 bytes PNG signature, aka the magic bytes*/
  ucvector_push_back(out, 137);
  ucvector_push_back(out, 80);
  ucvector_push_back(out, 78);
  ucvector_push_back(out, 71);
  ucvector_push_back(out, 13);
  ucvector_push_back(out, 10);
  ucvector_push_back(out, 26);
  ucvector_push_back(out, 10);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
incq %r14
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x87f7
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $-0x77, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x881a
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0x50, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x883d
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0x4e, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x8860
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0x47, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x8883
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0xd, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x88a6
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0xa, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x88c9
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0x1a, -0x1(%rax,%r14)
movq 0x8(%rbx), %r14
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa144
testl %eax, %eax
je 0x88ec
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movb $0xa, -0x1(%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: addUnknownChunks
static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize)
{
  unsigned char* inchunk = data;
  while((size_t)(inchunk - data) < datasize)
  {
    CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk));
    out->allocsize = out->size; /*fix the allocsize again*/
    inchunk = lodepng_chunk_next(inchunk);
  }
  return 0;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
je 0x8b72
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rdi), %r13
movq %rsi, %rbp
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x4292
testl %eax, %eax
cmovnel %eax, %ebx
jne 0x8b62
movq 0x8(%r12), %rax
movq %rax, 0x10(%r12)
movl (%rbp), %eax
bswapl %eax
addl $0xc, %eax
addq %rax, %rbp
movq %rbp, %rax
subq %r15, %rax
cmpq %r14, %rax
jb 0x8b29
xorl %eax, %eax
jmp 0x8b64
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: addChunk_PLTE
static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info)
{
  unsigned error = 0;
  size_t i;
  ucvector PLTE;
  ucvector_init(&PLTE);
  for(i = 0; i != info->palettesize * 4; ++i)
  {
    /*add all channels except alpha channel*/
    if(i % 4 != 3) ucvector_push_back(&PLTE, info->palette[i]);
  }
  error = addChunk(out, "PLTE", PLTE.data, PLTE.size);
  ucvector_cleanup(&PLTE);

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rax
shlq $0x2, %rax
testq %rax, %rax
je 0x8c36
movq %rsi, %r15
movq %rbx, 0x8(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %edx, %edx
xorl %r8d, %r8d
movl %ebp, %eax
notl %eax
testb $0x3, %al
je 0x8c1b
movq 0x8(%r15), %rax
movb (%rax,%rbp), %r14b
leaq 0x1(%rdx), %r12
cmpq %r12, %r13
jae 0x8bfd
movq %rdx, (%rsp)
leaq (,%r13,2), %rax
movq %r13, 0x10(%rsp)
leaq (%r12,%r12,2), %r13
shrq %r13
cmpq %r12, %rax
cmovbq %r12, %r13
movq %r8, %rdi
movq %r13, %rsi
movq %r8, %rbx
callq 0x1120
testq %rax, %rax
je 0x8c01
xorl %ecx, %ecx
movq %rax, %r8
movq (%rsp), %rdx
jmp 0x8c0f
xorl %ecx, %ecx
jmp 0x8c0f
movb $0x1, %cl
movq %rbx, %r8
movq (%rsp), %rdx
movq 0x10(%rsp), %r13
testb %cl, %cl
jne 0x8c1b
movb %r14b, -0x1(%r8,%r12)
movq %r12, %rdx
incq %rbp
movq 0x10(%r15), %rax
shlq $0x2, %rax
cmpq %rax, %rbp
jne 0x8ba7
movq 0x8(%rsp), %rbx
jmp 0x8c3b
xorl %r8d, %r8d
xorl %edx, %edx
leaq 0x8(%rbx), %rsi
leaq 0x6d23(%rip), %rcx      # 0xf969
movq %rbx, %rdi
movq %r8, %r14
callq 0x4357
testl %eax, %eax
jne 0x8c5d
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: getPaletteTranslucency
static unsigned getPaletteTranslucency(const unsigned char* palette, size_t palettesize)
{
  size_t i;
  unsigned key = 0;
  unsigned r = 0, g = 0, b = 0; /*the value of the color with alpha 0, so long as color keying is possible*/
  for(i = 0; i != palettesize; ++i)
  {
    if(!key && palette[4 * i + 3] == 0)
    {
      r = palette[4 * i + 0]; g = palette[4 * i + 1]; b = palette[4 * i + 2];
      key = 1;
      i = (size_t)(-1); /*restart from beginning, to detect earlier opaque colors with key's value*/
    }
    else if(palette[4 * i + 3] != 255) return 2;
    /*when key, no opaque RGB may have key's RGB*/
    else if(key && r == palette[i * 4 + 0] && g == palette[i * 4 + 1] && b == palette[i * 4 + 2]) return 2;
  }
  return key;
}

// Assembly:
testq %rsi, %rsi
je 0x8d0c
pushq %rbx
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r10d, %r10d
xorl %r9d, %r9d
testl %r10d, %r10d
jne 0x8c97
cmpb $0x0, 0x3(%rdi,%r9,4)
je 0x8cdd
movl $0x2, %eax
cmpb $-0x1, 0x3(%rdi,%r9,4)
jne 0x8d0a
testl %r10d, %r10d
je 0x8cd8
leaq (,%r9,4), %r11
movzbl (%rdi,%r11), %ebx
movl $0x1, %r10d
cmpl %ebx, %r8d
jne 0x8cff
movzbl 0x1(%rdi,%r11), %ebx
cmpl %ebx, %edx
jne 0x8cff
movzbl 0x2(%rdi,%r11), %r11d
cmpl %r11d, %ecx
jne 0x8cff
jmp 0x8d0a
xorl %r10d, %r10d
jmp 0x8cff
shlq $0x2, %r9
movzbl (%rdi,%r9), %r8d
movzbl 0x1(%rdi,%r9), %edx
movzbl 0x2(%rdi,%r9), %ecx
movl $0x1, %r10d
movq $-0x1, %r9
incq %r9
movl %r10d, %eax
cmpq %rsi, %r9
jne 0x8c8a
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: addChunk_pHYs
static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info)
{
  unsigned error = 0;
  ucvector data;
  ucvector_init(&data);

  lodepng_add32bitInt(&data, info->phys_x);
  lodepng_add32bitInt(&data, info->phys_y);
  ucvector_push_back(&data, info->phys_unit);

  error = addChunk(out, "pHYs", data.data, data.size);
  ucvector_cleanup(&data);

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movl 0xa8(%rsi), %esi
movq %r15, %rdi
callq 0x408c
movl 0xac(%r14), %esi
movq %r15, %rdi
callq 0x408c
movb 0xb0(%r14), %bpl
movq 0x8(%r15), %r12
movq 0x10(%r15), %rax
incq %r12
cmpq %r12, %rax
jae 0x93d1
addq %rax, %rax
leaq (%r12,%r12,2), %r14
shrq %r14
cmpq %r12, %rax
cmovbq %r12, %r14
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x1120
testq %rax, %rax
je 0x93df
movq %r14, 0x10(%rsp)
movq %rax, (%rsp)
movq %r12, 0x8(%rsp)
movq (%rsp), %rax
movb %bpl, -0x1(%rax,%r12)
leaq 0x8(%rsp), %r15
movq -0x8(%r15), %r14
movl (%r15), %edx
leaq 0x8(%rbx), %rsi
leaq 0x6596(%rip), %rcx      # 0xf98c
movq %rbx, %rdi
movq %r14, %r8
callq 0x4357
testl %eax, %eax
jne 0x940d
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq %r14, %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: addChunk_IDAT
static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize,
                              LodePNGCompressSettings* zlibsettings)
{
  ucvector zlibdata;
  unsigned error = 0;

  /*compress with the Zlib compressor*/
  ucvector_init(&zlibdata);
  error = zlib_compress(&zlibdata.data, &zlibdata.size, data, datasize, zlibsettings);
  if(!error) error = addChunk(out, "IDAT", zlibdata.data, zlibdata.size);
  ucvector_cleanup(&zlibdata);

  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rbx
movaps %xmm0, -0x8(%rbx)
movq $0x0, 0x8(%rbx)
movq 0x18(%r8), %rax
movq %rsp, %rdi
movq %rbx, %rsi
testq %rax, %rax
je 0x9464
callq *%rax
jmp 0x9469
callq 0x3e1e
movl %eax, %ebp
testl %eax, %eax
jne 0x949a
movq (%rsp), %r8
movl 0x8(%rsp), %edx
leaq 0x8(%r14), %rsi
leaq 0x64dd(%rip), %rcx      # 0xf95f
movq %r14, %rdi
callq 0x4357
movl %eax, %ebp
testl %eax, %eax
jne 0x949a
movq 0x8(%r14), %rax
movq %rax, 0x10(%r14)
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq (%rsp), %rdi
callq 0x1030
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: addChunk_tIME
static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time)
{
  unsigned error = 0;
  unsigned char* data = (unsigned char*)lodepng_malloc(7);
  if(!data) return 83; /*alloc fail*/
  data[0] = (unsigned char)(time->year >> 8);
  data[1] = (unsigned char)(time->year & 255);
  data[2] = (unsigned char)time->month;
  data[3] = (unsigned char)time->day;
  data[4] = (unsigned char)time->hour;
  data[5] = (unsigned char)time->minute;
  data[6] = (unsigned char)time->second;
  error = addChunk(out, "tIME", data, 7);
  lodepng_free(data);
  return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0x7, %edi
callq 0x10f0
testq %rax, %rax
je 0x9539
movq %rax, %r14
movzwl (%r15), %eax
rolw $0x8, %ax
movw %ax, (%r14)
movb 0x4(%r15), %al
movb %al, 0x2(%r14)
movb 0x8(%r15), %al
movb %al, 0x3(%r14)
movb 0xc(%r15), %al
movb %al, 0x4(%r14)
movb 0x10(%r15), %al
movb %al, 0x5(%r14)
movb 0x14(%r15), %al
movb %al, 0x6(%r14)
leaq 0x8(%rbx), %rsi
leaq 0x6477(%rip), %rcx      # 0xf987
movq %rbx, %rdi
movl $0x7, %edx
movq %r14, %r8
callq 0x4357
testl %eax, %eax
jne 0x952c
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: addChunk_tEXt
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]);
  if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/
  ucvector_push_back(&text, 0); /*0 termination char*/
  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 $0x28, %rsp
movq %rdx, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movb (%rsi), %r12b
testb %r12b, %r12b
je 0x989e
movq $-0x1, %r15
xorl %r9d, %r9d
xorl %r14d, %r14d
xorl %r8d, %r8d
movq %rsi, 0x10(%rsp)
leaq 0x1(%r14), %r13
cmpq %r13, %r9
jae 0x9869
leaq (%r9,%r9), %rax
leaq (,%r13,2), %rbp
addq %r13, %rbp
shrq %rbp
cmpq %r13, %rax
cmovbq %r13, %rbp
movq %r8, %rdi
movq %r9, 0x8(%rsp)
movq %rbp, %rsi
movq %r8, %rbx
callq 0x1120
testq %rax, %rax
je 0x986d
xorl %ecx, %ecx
movq %rax, %r8
movq %rbp, %r9
jmp 0x9877
xorl %ecx, %ecx
jmp 0x987c
movb $0x1, %cl
movq %rbx, %r8
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %rsi
testb %cl, %cl
jne 0x9888
movb %r12b, -0x1(%r8,%r13)
movq %r13, %r14
movb 0x2(%rsi,%r15), %r12b
incq %r15
testb %r12b, %r12b
jne 0x9825
cmpq $0x4f, %r15
setae %al
jmp 0x98a9
movb $0x1, %al
xorl %r8d, %r8d
xorl %r14d, %r14d
xorl %r9d, %r9d
testb %al, %al
movq 0x20(%rsp), %r12
je 0x98c1
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1(%r14), %r15
cmpq %r15, %r9
jae 0x98fc
leaq (%r9,%r9), %rax
leaq (%r15,%r15,2), %r13
shrq %r13
cmpq %r15, %rax
cmovbq %r15, %r13
movq %r8, %rdi
movq %r9, %rbp
movq %r13, %rsi
movq %r8, %rbx
callq 0x1120
testq %rax, %rax
je 0x9900
xorl %ecx, %ecx
movq %rax, %r8
movq %r13, %r9
jmp 0x9908
xorl %ecx, %ecx
jmp 0x9908
movb $0x1, %cl
movq %rbx, %r8
movq %rbp, %r9
testb %cl, %cl
jne 0x9915
movb $0x0, -0x1(%r8,%r15)
movq %r15, %r14
movb (%r12), %bpl
testb %bpl, %bpl
je 0x9984
incq %r12
leaq 0x1(%r14), %r15
cmpq %r15, %r9
jae 0x995e
leaq (%r9,%r9), %rax
leaq (%r15,%r15,2), %r13
shrq %r13
cmpq %r15, %rax
cmovbq %r15, %r13
movq %r8, %rdi
movq %r9, 0x8(%rsp)
movq %r13, %rsi
movq %r8, %rbx
callq 0x1120
testq %rax, %rax
je 0x9962
xorl %ecx, %ecx
movq %rax, %r8
movq %r13, %r9
jmp 0x996c
xorl %ecx, %ecx
jmp 0x996c
movb $0x1, %cl
movq %rbx, %r8
movq 0x8(%rsp), %r9
testb %cl, %cl
jne 0x9978
movb %bpl, -0x1(%r8,%r15)
movq %r15, %r14
movb (%r12), %bpl
incq %r12
testb %bpl, %bpl
jne 0x9921
movq 0x18(%rsp), %rbx
leaq 0x8(%rbx), %rsi
leaq 0x5fe4(%rip), %rcx      # 0xf978
movq %rbx, %rdi
movl %r14d, %edx
movq %r8, %r14
callq 0x4357
testl %eax, %eax
jne 0x99ae
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030