LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: isGrayICCProfile
static unsigned isGrayICCProfile(const unsigned char* profile, unsigned size) {
  /*
  It is a gray profile if bytes 16-19 are "GRAY", rgb profile if bytes 16-19
  are "RGB ". We do not perform any full parsing of the ICC profile here, other
  than check those 4 bytes to grayscale profile. Other than that, validity of
  the profile is not checked. This is needed only because the PNG specification
  requires using a non-gray color model if there is an ICC profile with "RGB "
  (sadly limiting compression opportunities if the input data is grayscale RGB
  data), and requires using a gray color model if it is "GRAY".
  */
  if(size < 20) return 0;
  return profile[16] == 'G' &&  profile[17] == 'R' &&  profile[18] == 'A' &&  profile[19] == 'Y';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x14, -0x14(%rbp)
jae 0xe34a
movl $0x0, -0x4(%rbp)
jmp 0xe39c
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %ecx
xorl %eax, %eax
cmpl $0x47, %ecx
movb %al, -0x15(%rbp)
jne 0xe391
movq -0x10(%rbp), %rax
movzbl 0x11(%rax), %ecx
xorl %eax, %eax
cmpl $0x52, %ecx
movb %al, -0x15(%rbp)
jne 0xe391
movq -0x10(%rbp), %rax
movzbl 0x12(%rax), %ecx
xorl %eax, %eax
cmpl $0x41, %ecx
movb %al, -0x15(%rbp)
jne 0xe391
movq -0x10(%rbp), %rax
movzbl 0x13(%rax), %eax
cmpl $0x59, %eax
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_color_stats_add
static unsigned lodepng_color_stats_add(LodePNGColorStats* stats,
                                        unsigned r, unsigned g, unsigned b, unsigned a) {
  unsigned error = 0;
  unsigned char image[8];
  LodePNGColorMode mode;
  lodepng_color_mode_init(&mode);
  image[0] = r >> 8; image[1] = r; image[2] = g >> 8; image[3] = g;
  image[4] = b >> 8; image[5] = b; image[6] = a >> 8; image[7] = a;
  mode.bitdepth = 16;
  mode.colortype = LCT_RGBA;
  error = lodepng_compute_color_stats(stats, image, 1, 1, &mode);
  lodepng_color_mode_cleanup(&mode);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x62c0
movl -0xc(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x24(%rbp)
movl -0xc(%rbp), %eax
movb %al, -0x23(%rbp)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x22(%rbp)
movl -0x10(%rbp), %eax
movb %al, -0x21(%rbp)
movl -0x14(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x20(%rbp)
movl -0x14(%rbp), %eax
movb %al, -0x1f(%rbp)
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x1e(%rbp)
movl -0x18(%rbp), %eax
movb %al, -0x1d(%rbp)
movl $0x10, -0x4c(%rbp)
movl $0x6, -0x50(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
movl $0x1, %ecx
leaq -0x50(%rbp), %r8
movl %ecx, %edx
callq 0x9cb0
movl %eax, -0x1c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x6330
movl -0x1c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: writeSignature
static unsigned writeSignature(ucvector* out) {
  size_t pos = out->size;
  const unsigned char signature[] = {137, 80, 78, 71, 13, 10, 26, 10};
  /*8 bytes PNG signature, aka the magic bytes*/
  if(!ucvector_resize(out, out->size + 8)) return 83; /*alloc fail*/
  lodepng_memcpy(out->data + pos, signature, 8);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq 0xdb9f(%rip), %rax      # 0x1c7ae
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
callq 0x10ac0
cmpl $0x0, %eax
jne 0xec36
movl $0x53, -0x4(%rbp)
jmp 0xec56
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x8, %edx
callq 0x6440
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_IHDR
static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h,
                              LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) {
  unsigned char *chunk, *data;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 13, "IHDR"));
  data = chunk + 8;

  lodepng_set32bitInt(data + 0, w); /*width*/
  lodepng_set32bitInt(data + 4, h); /*height*/
  data[8] = (unsigned char)bitdepth; /*bit depth*/
  data[9] = (unsigned char)colortype; /*color type*/
  data[10] = 0; /*compression method*/
  data[11] = 0; /*filter method*/
  data[12] = interlace_method; /*interlace method*/

  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
movl $0xd, %edx
leaq 0xc8f7(%rip), %rcx      # 0x1b588
callq 0x14120
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0xeca7
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xed13
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x58d0
movq -0x38(%rbp), %rdi
addq $0x4, %rdi
movl -0x18(%rbp), %esi
callq 0x58d0
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0x8(%rax)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0xa(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0xb(%rax)
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x30(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/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, data + datasize);
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
cmpq -0x20(%rbp), %rax
jae 0xed9a
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x28(%rbp), %rdx
callq 0x60b0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xed73
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xeda1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0x5d50
movq %rax, -0x28(%rbp)
jmp 0xed3c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_iCCP
static unsigned addChunk_iCCP(ucvector* out, const LodePNGInfo* info, LodePNGCompressSettings* zlibsettings) {
  unsigned error = 0;
  unsigned char* chunk = 0;
  unsigned char* compressed = 0;
  size_t compressedsize = 0;
  size_t keysize = lodepng_strlen(info->iccp_name);

  if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/
  error = zlib_compress(&compressed, &compressedsize,
                        info->iccp_profile, info->iccp_profile_size, zlibsettings);
  if(!error) {
    size_t size = keysize + 2 + compressedsize;
    error = lodepng_chunk_init(&chunk, out, size, "iCCP");
  }
  if(!error) {
    lodepng_memcpy(chunk + 8, info->iccp_name, keysize);
    chunk[8 + keysize] = 0; /*null termination char*/
    chunk[9 + keysize] = 0; /*compression method: 0*/
    lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize);
    lodepng_chunk_generate_crc(chunk);
  }

  lodepng_free(compressed);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0xf0(%rax), %rdi
callq 0x5bb0
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x48(%rbp)
jb 0xee05
cmpq $0x4f, -0x48(%rbp)
jbe 0xee11
movl $0x59, -0x4(%rbp)
jmp 0xeee2
movq -0x18(%rbp), %rax
movq 0xf8(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x100(%rax), %eax
movl %eax, %ecx
movq -0x20(%rbp), %r8
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x170a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xee6f
movq -0x48(%rbp), %rax
addq $0x2, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rax
movl %eax, %edx
leaq -0x30(%rbp), %rdi
leaq 0xc75d(%rip), %rcx      # 0x1b5c4
callq 0x14120
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xeed3
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movq 0xf0(%rax), %rsi
movq -0x48(%rbp), %rdx
callq 0x6440
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
addq $0x8, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
addq $0x9, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
addq $0xa, %rdi
addq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x6440
movq -0x30(%rbp), %rdi
callq 0x5d00
movq -0x38(%rbp), %rdi
callq 0x5060
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_gAMA
static unsigned addChunk_gAMA(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 4, "gAMA"));
  lodepng_set32bitInt(chunk + 8, info->gama_gamma);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x4, %edx
leaq 0xc661(%rip), %rcx      # 0x1b5b5
callq 0x14120
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xef6a
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xef91
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0xb8(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_cHRM
static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 32, "cHRM"));
  lodepng_set32bitInt(chunk + 8, info->chrm_white_x);
  lodepng_set32bitInt(chunk + 12, info->chrm_white_y);
  lodepng_set32bitInt(chunk + 16, info->chrm_red_x);
  lodepng_set32bitInt(chunk + 20, info->chrm_red_y);
  lodepng_set32bitInt(chunk + 24, info->chrm_green_x);
  lodepng_set32bitInt(chunk + 28, info->chrm_green_y);
  lodepng_set32bitInt(chunk + 32, info->chrm_blue_x);
  lodepng_set32bitInt(chunk + 36, info->chrm_blue_y);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x20, %edx
leaq 0xc5f6(%rip), %rcx      # 0x1b5ba
callq 0x14120
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xefdd
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf0a5
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0xc0(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rax
movl 0xc4(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rax
movl 0xc8(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
movq -0x18(%rbp), %rax
movl 0xcc(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movl 0xd0(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0x1c, %rdi
movq -0x18(%rbp), %rax
movl 0xd4(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rax
movl 0xd8(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0x24, %rdi
movq -0x18(%rbp), %rax
movl 0xdc(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_PLTE
static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) {
  unsigned char* chunk;
  size_t i, j = 8;

  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, info->palettesize * 3, "PLTE"));

  for(i = 0; i != info->palettesize; ++i) {
    /*add all channels except alpha channel*/
    chunk[j++] = info->palette[i * 4 + 0];
    chunk[j++] = info->palette[i * 4 + 1];
    chunk[j++] = info->palette[i * 4 + 2];
  }

  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x8, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq $0x3, 0x10(%rax), %rax
movl %eax, %edx
leaq -0x20(%rbp), %rdi
leaq 0xc4ab(%rip), %rcx      # 0x1b58d
callq 0x14120
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0xf0fb
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf1b3
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0xf1a3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
movb 0x1(%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
movb 0x2(%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xf103
movq -0x20(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_pHYs
static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 9, "pHYs"));
  lodepng_set32bitInt(chunk + 8, info->phys_x);
  lodepng_set32bitInt(chunk + 12, info->phys_y);
  chunk[16] = info->phys_unit;
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x9, %edx
leaq 0xbfac(%rip), %rcx      # 0x1b5b0
callq 0x14120
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf61a
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf66b
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0xa8(%rax), %esi
callq 0x58d0
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rax
movl 0xac(%rax), %esi
callq 0x58d0
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x10(%rax)
movq -0x20(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_IDAT
static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize,
                              LodePNGCompressSettings* zlibsettings) {
  unsigned error = 0;
  unsigned char* zlib = 0;
  size_t zlibsize = 0;

  error = zlib_compress(&zlib, &zlibsize, data, datasize, zlibsettings);
  if(!error) {
    error = lodepng_chunk_createv(out, zlibsize, "IDAT", zlib);
  }
  lodepng_free(zlib);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x170a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xf6ee
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %esi
movq -0x30(%rbp), %rcx
leaq 0xd0be(%rip), %rdx      # 0x1c7a4
callq 0x6250
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
callq 0x5060
movl -0x24(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_tIME
static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 7, "tIME"));
  chunk[8] = (unsigned char)(time->year >> 8);
  chunk[9] = (unsigned char)(time->year & 255);
  chunk[10] = (unsigned char)time->month;
  chunk[11] = (unsigned char)time->day;
  chunk[12] = (unsigned char)time->hour;
  chunk[13] = (unsigned char)time->minute;
  chunk[14] = (unsigned char)time->second;
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x7, %edx
leaq 0xbe87(%rip), %rcx      # 0x1b5ab
callq 0x14120
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf73d
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf7c3
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xa(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xb(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xd(%rax)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xe(%rax)
movq -0x20(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_zTXt
static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const char* textstring,
                              LodePNGCompressSettings* zlibsettings) {
  unsigned error = 0;
  unsigned char* chunk = 0;
  unsigned char* compressed = 0;
  size_t compressedsize = 0;
  size_t textsize = lodepng_strlen(textstring);
  size_t keysize = lodepng_strlen(keyword);
  if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/

  error = zlib_compress(&compressed, &compressedsize,
                        (const unsigned char*)textstring, textsize, zlibsettings);
  if(!error) {
    size_t size = keysize + 2 + compressedsize;
    error = lodepng_chunk_init(&chunk, out, size, "zTXt");
  }
  if(!error) {
    lodepng_memcpy(chunk + 8, keyword, keysize);
    chunk[8 + keysize] = 0; /*null termination char*/
    chunk[9 + keysize] = 0; /*compression method: 0*/
    lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize);
    lodepng_chunk_generate_crc(chunk);
  }

  lodepng_free(compressed);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5bb0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5bb0
movq %rax, -0x58(%rbp)
cmpq $0x1, -0x58(%rbp)
jb 0xf82f
cmpq $0x4f, -0x58(%rbp)
jbe 0xf83b
movl $0x59, -0x4(%rbp)
jmp 0xf8f6
movq -0x20(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x170a0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xf88a
movq -0x58(%rbp), %rax
addq $0x2, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rsi
movq -0x60(%rbp), %rax
movl %eax, %edx
leaq -0x38(%rbp), %rdi
leaq 0xbd1f(%rip), %rcx      # 0x1b5a1
callq 0x14120
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xf8e7
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x6440
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
addq $0x8, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
addq $0x9, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rdi
addq $0xa, %rdi
addq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x6440
movq -0x38(%rbp), %rdi
callq 0x5d00
movq -0x40(%rbp), %rdi
callq 0x5060
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addChunk_tEXt
static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring) {
  unsigned char* chunk = 0;
  size_t keysize = lodepng_strlen(keyword), textsize = lodepng_strlen(textstring);
  size_t size = keysize + 1 + textsize;
  if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, size, "tEXt"));
  lodepng_memcpy(chunk + 8, keyword, keysize);
  chunk[8 + keysize] = 0; /*null termination char*/
  lodepng_memcpy(chunk + 9 + keysize, textstring, textsize);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5bb0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5bb0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x1, -0x30(%rbp)
jb 0xf954
cmpq $0x4f, -0x30(%rbp)
jbe 0xf95d
movl $0x59, -0x4(%rbp)
jmp 0xf9d6
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq -0x28(%rbp), %rdi
leaq 0xbc2a(%rip), %rcx      # 0x1b59c
callq 0x14120
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0xf988
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf9d6
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x6440
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
addq $0x9, %rdi
addq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x6440
movq -0x28(%rbp), %rdi
callq 0x5d00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: ucvector_resize
static unsigned ucvector_resize(ucvector* p, size_t size) {
  if(size > p->allocsize) {
    size_t newsize = size + (p->allocsize >> 1u);
    void* data = lodepng_realloc(p->data, newsize);
    if(data) {
      p->allocsize = newsize;
      p->data = (unsigned char*)data;
    }
    else return 0; /*error: not enough memory*/
  }
  p->size = size;
  return 1; /*success*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x10b33
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x61b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x10b28
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x10b31
movl $0x0, -0x4(%rbp)
jmp 0x10b46
jmp 0x10b33
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: HuffmanTree_init
static void HuffmanTree_init(HuffmanTree* tree) {
  tree->codes = 0;
  tree->lengths = 0;
  tree->table_len = 0;
  tree->table_value = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: huffmanDecodeSymbol
static unsigned huffmanDecodeSymbol(LodePNGBitReader* reader, const HuffmanTree* codetree) {
  unsigned short code = peekBits(reader, FIRSTBITS);
  unsigned short l = codetree->table_len[code];
  unsigned short value = codetree->table_value[code];
  if(l <= FIRSTBITS) {
    advanceBits(reader, l);
    return value;
  } else {
    unsigned index2;
    advanceBits(reader, FIRSTBITS);
    index2 = value + peekBits(reader, l - FIRSTBITS);
    advanceBits(reader, codetree->table_len[index2] - FIRSTBITS);
    return codetree->table_value[index2];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x10570
movw %ax, -0x1a(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movzwl -0x1a(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movw %ax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movzwl -0x1a(%rbp), %ecx
movw (%rax,%rcx,2), %ax
movw %ax, -0x1e(%rbp)
movzwl -0x1c(%rbp), %eax
cmpl $0x9, %eax
ja 0x1117b
movq -0x10(%rbp), %rdi
movzwl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0x105a0
movzwl -0x1e(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x111df
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x105a0
movzwl -0x1e(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1c(%rbp), %eax
subl $0x9, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x10570
movl %eax, %ecx
movl -0x28(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movzbl (%rax,%rcx), %eax
subl $0x9, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x105a0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x24(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: HuffmanTree_cleanup
static void HuffmanTree_cleanup(HuffmanTree* tree) {
  lodepng_free(tree->codes);
  lodepng_free(tree->lengths);
  lodepng_free(tree->table_len);
  lodepng_free(tree->table_value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5060
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5060
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5060
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x5060
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: reverseBits
static unsigned reverseBits(unsigned bits, unsigned num) {
  /*TODO: implement faster lookup table based version when needed*/
  unsigned i, result = 0;
  for(i = 0; i < num; i++) result |= ((bits >> (num - i - 1u)) & 1u) << i;
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jae 0x11bf7
movl -0x4(%rbp), %eax
movl -0x8(%rbp), %ecx
subl -0xc(%rbp), %ecx
subl $0x1, %ecx
shrl %cl, %eax
andl $0x1, %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x11bc8
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: writeBits
static void writeBits(LodePNGBitWriter* writer, unsigned value, size_t nbits) {
  if(nbits == 1) { /* compiler should statically compile this case if nbits == 1 */
    WRITEBIT(writer, value);
  } else {
    /* TODO: increase output size only once here rather than in each WRITEBIT */
    size_t i;
    for(i = 0; i != nbits; ++i) {
      WRITEBIT(writer, (unsigned char)((value >> i) & 1));
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jne 0x12f44
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x12f00
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
addq $0x1, %rsi
callq 0x10ac0
cmpl $0x0, %eax
jne 0x12ee3
jmp 0x13007
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %ecx
andl $0x7, %ecx
shll %cl, %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movb 0x8(%rax), %cl
addb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x13007
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x13005
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x12fa9
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
addq $0x1, %rsi
callq 0x10ac0
cmpl $0x0, %eax
jne 0x12f8c
jmp 0x13007
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
shrl %cl, %eax
andl $0x1, %eax
movzbl %al, %esi
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %ecx
andl $0x7, %ecx
shll %cl, %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movb 0x8(%rax), %cl
addb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x12f4c
jmp 0x13007
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: writeBitsReversed
static void writeBitsReversed(LodePNGBitWriter* writer, unsigned value, size_t nbits) {
  size_t i;
  for(i = 0; i != nbits; ++i) {
    /* TODO: increase output size only once here rather than in each WRITEBIT */
    WRITEBIT(writer, (unsigned char)((value >> (nbits - 1u - i)) & 1u));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x139df
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x1397b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
addq $0x1, %rsi
callq 0x10ac0
cmpl $0x0, %eax
jne 0x1395e
jmp 0x139df
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movl -0xc(%rbp), %eax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
subq -0x20(%rbp), %rcx
shrl %cl, %eax
andl $0x1, %eax
movzbl %al, %esi
movq -0x8(%rbp), %rax
movzbl 0x8(%rax), %ecx
andl $0x7, %ecx
shll %cl, %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movb 0x8(%rax), %cl
addb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1391b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addLengthDistance
static void addLengthDistance(uivector* values, size_t length, size_t distance) {
  /*values in encoded vector are those used by deflate:
  0-255: literal bytes
  256: end
  257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits)
  286-287: invalid*/

  unsigned length_code = (unsigned)searchCodeIndex(LENGTHBASE, 29, length);
  unsigned extra_length = (unsigned)(length - LENGTHBASE[length_code]);
  unsigned dist_code = (unsigned)searchCodeIndex(DISTANCEBASE, 30, distance);
  unsigned extra_distance = (unsigned)(distance - DISTANCEBASE[dist_code]);

  size_t pos = values->size;
  /*TODO: return error when this fails (out of memory)*/
  unsigned ok = uivector_resize(values, values->size + 4);
  if(ok) {
    values->data[pos + 0] = length_code + FIRST_LENGTH_CODE_INDEX;
    values->data[pos + 1] = extra_length;
    values->data[pos + 2] = dist_code;
    values->data[pos + 3] = extra_distance;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdx
leaq 0x75f1(%rip), %rdi      # 0x1b2b0
movl $0x1d, %esi
callq 0x13e40
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
leaq 0x75d4(%rip), %rcx      # 0x1b2b0
movl (%rcx,%rdx,4), %ecx
subq %rcx, %rax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdx
leaq 0x76c0(%rip), %rdi      # 0x1b3b0
movl $0x1e, %esi
callq 0x13e40
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
leaq 0x76a3(%rip), %rcx      # 0x1b3b0
movl (%rcx,%rdx,4), %ecx
subq %rcx, %rax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x4, %rsi
callq 0x13da0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x13d8d
movl -0x1c(%rbp), %edx
addl $0x101, %edx            # imm = 0x101
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,4)
movl -0x24(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movl %edx, 0x8(%rax,%rcx,4)
movl -0x28(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movl %edx, 0xc(%rax,%rcx,4)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: uivector_resize
static unsigned uivector_resize(uivector* p, size_t size) {
  size_t allocsize = size * sizeof(unsigned);
  if(allocsize > p->allocsize) {
    size_t newsize = allocsize + (p->allocsize >> 1u);
    void* data = lodepng_realloc(p->data, newsize);
    if(data) {
      p->allocsize = newsize;
      p->data = (unsigned*)data;
    }
    else return 0; /*error: not enough memory*/
  }
  p->size = size;
  return 1; /*success*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x13e1f
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x61b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x13e14
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x13e1d
movl $0x0, -0x4(%rbp)
jmp 0x13e32
jmp 0x13e1f
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: HuffmanTree_makeFromFrequencies
static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies,
                                                size_t mincodes, size_t numcodes, unsigned maxbitlen) {
  unsigned error = 0;
  while(!frequencies[numcodes - 1] && numcodes > mincodes) --numcodes; /*trim zeroes*/
  tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned));
  if(!tree->lengths) return 83; /*alloc fail*/
  tree->maxbitlen = maxbitlen;
  tree->numcodes = (unsigned)numcodes; /*number of symbols*/

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rdx
subq $0x1, %rdx
xorl %eax, %eax
cmpl $0x0, (%rcx,%rdx,4)
movb %al, -0x31(%rbp)
jne 0x13f28
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
seta %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x13f31
jmp 0x13f3f
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x13f03
movq -0x28(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3de0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x13f6b
movl $0x53, -0x4(%rbp)
jmp 0x13fb5
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x4690
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x13faf
movq -0x10(%rbp), %rdi
callq 0x11490
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: inflatev
static unsigned inflatev(ucvector* out, const unsigned char* in, size_t insize,
                        const LodePNGDecompressSettings* settings) {
  if(settings->custom_inflate) {
    unsigned error = settings->custom_inflate(&out->data, &out->size, in, insize, settings);
    out->allocsize = out->size;
    return error;
  } else {
    return lodepng_inflatev(out, in, insize, settings);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x14020
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq *%rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x14038
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x5120
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: update_adler32
static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) {
  unsigned s1 = adler & 0xffffu;
  unsigned s2 = (adler >> 16u) & 0xffffu;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x4(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x14109
cmpl $0x15b0, -0x14(%rbp)    # imm = 0x15B0
jbe 0x14094
movl $0x15b0, %eax           # imm = 0x15B0
movl %eax, -0x28(%rbp)
jmp 0x1409a
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x140e6
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x140b2
movl -0x18(%rbp), %eax
movl $0xfff1, %ecx           # imm = 0xFFF1
xorl %edx, %edx
divl %ecx
movl %edx, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movl $0xfff1, %ecx           # imm = 0xFFF1
xorl %edx, %edx
divl %ecx
movl %edx, -0x1c(%rbp)
jmp 0x14077
movl -0x1c(%rbp), %eax
shll $0x10, %eax
orl -0x18(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_chunk_init
static unsigned lodepng_chunk_init(unsigned char** chunk,
                                   ucvector* out,
                                   unsigned length, const char* type) {
  size_t new_length = out->size;
  if(lodepng_addofl(new_length, length, &new_length)) return 77;
  if(lodepng_addofl(new_length, 12, &new_length)) return 77;
  if(!ucvector_resize(out, new_length)) return 83; /*alloc fail*/
  *chunk = out->data + new_length - length - 12u;

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

  /*2: chunk name (4 letters)*/
  lodepng_memcpy(*chunk + 4, type, 4);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdx
callq 0x5e60
cmpl $0x0, %eax
je 0x14166
movl $0x4d, -0x4(%rbp)
jmp 0x141f3
movq -0x30(%rbp), %rdi
movl $0xc, %esi
leaq -0x30(%rbp), %rdx
callq 0x5e60
cmpl $0x0, %eax
je 0x14186
movl $0x4d, -0x4(%rbp)
jmp 0x141f3
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x10ac0
cmpl $0x0, %eax
jne 0x141a1
movl $0x53, -0x4(%rbp)
jmp 0x141f3
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
subq %rdx, %rax
addq %rax, %rcx
addq $-0xc, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x58d0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x4, %rdi
movq -0x28(%rbp), %rsi
movl $0x4, %edx
callq 0x6440
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: alloc_string_sized
static char* alloc_string_sized(const char* in, size_t insize) {
  char* out = (char*)lodepng_malloc(insize + 1);
  if(out) {
    lodepng_memcpy(out, in, insize);
    out[insize] = 0;
  }
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
callq 0x3de0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x14275
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x6440
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: readBitsFromReversedStream
static unsigned readBitsFromReversedStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) {
  unsigned result = 0;
  size_t i;
  for(i = 0 ; i < nbits; ++i) {
    result <<= 1u;
    result |= (unsigned)readBitFromReversedStream(bitpointer, bitstream);
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x142d9
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x142f0
movzbl %al, %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x142a3
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: addColorBits
static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) {
  unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/
  /*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/
  unsigned p = index & m;
  in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/
  in = in << (bits * (m - p));
  if(p == 0) out[index * bits / 8u] = in;
  else out[index * bits / 8u] |= in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x14362
movl $0x7, %eax
movl %eax, -0x24(%rbp)
jmp 0x14378
movl -0x14(%rbp), %edx
movl $0x1, %eax
movl $0x3, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
andq %rcx, %rax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
andl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
movl -0x1c(%rbp), %edx
subl -0x20(%rbp), %edx
imull %edx, %ecx
shll %cl, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x143d5
movl -0x18(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %esi
imulq %rsi, %rcx
shrq $0x3, %rcx
movb %dl, (%rax,%rcx)
jmp 0x143f4
movl -0x18(%rbp), %esi
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
imulq %rdx, %rcx
shrq $0x3, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
popq %rbp
retq
nopw %cs:(%rax,%rax)