LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/sacak-lyndon.c
// Function: induceSAs0_LA_17n
void induceSAs0_LA_17n(int_t *SA, int_t *LA, int_t *PREV, int_t *NEXT,
  int_t *s, int_t *bkt,
  int_t n, unsigned int K, int_t suffix, int cs) {
  int_t i, j;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  for(i=n-1; i>0; i--){

		j=SA[i];

		LA[j]=NEXT[j]-j;	
		NEXT[PREV[j]]=NEXT[j];
		PREV[NEXT[j]]=PREV[j];

    if(SA[i]>0) {

      j=SA[i]-1;
      if(chr(j)<=chr(j+1) && bkt[chr(j)]<i) {
        SA[bkt[chr(j)]]=j;
        bkt[chr(j)]--;
        if(!suffix) SA[i]=0;
      }
    }
	}

	LA[n-1]=1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
movl 0x58(%rsp), %r9d
movl 0x40(%rsp), %edx
movl 0x48(%rsp), %ecx
pushq $0x1
popq %r8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5e7b
movl 0x50(%rsp), %r9d
movl 0x58(%rsp), %r8d
movl 0x40(%rsp), %edi
decl %edi
movq %rdi, %rax
testl %eax, %eax
jle 0x62a3
movslq (%rbp,%rax,4), %rcx
movl (%r12,%rcx,4), %edx
subl %ecx, %edx
movl %edx, (%r14,%rcx,4)
movslq (%r12,%rcx,4), %rdx
movslq (%r13,%rcx,4), %rsi
movl %edx, (%r12,%rsi,4)
movl (%r13,%rcx,4), %ecx
movl %ecx, (%r13,%rdx,4)
movslq (%rbp,%rax,4), %rdx
testq %rdx, %rdx
jle 0x629b
leal -0x1(%rdx), %ecx
cmpl $0x4, %r8d
jne 0x626f
movslq (%r15,%rcx,4), %rsi
cmpl (%r15,%rdx,4), %esi
jg 0x629b
movslq (%rbx,%rsi,4), %rdx
cmpl %eax, %edx
jge 0x629b
movl %ecx, (%rbp,%rdx,4)
movl (%r15,%rcx,4), %ecx
jmp 0x628b
movzbl (%r15,%rcx), %esi
cmpb (%r15,%rdx), %sil
ja 0x629b
movslq (%rbx,%rsi,4), %rdx
cmpl %eax, %edx
jge 0x629b
movl %ecx, (%rbp,%rdx,4)
movzbl (%r15,%rcx), %ecx
movslq %ecx, %rcx
decl (%rbx,%rcx,4)
testl %r9d, %r9d
jne 0x629b
andl $0x0, (%rbp,%rax,4)
decq %rax
jmp 0x6212
movslq %edi, %rax
movl $0x1, (%r14,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/sacak-lyndon.c
// Function: induceSAs0_LA_13n
void induceSAs0_LA_13n(int_t *SA, int_t *LA, int_t *PREV,
  int_t *s, int_t *bkt,
  int_t n, unsigned int K, int_t suffix, int cs) {
  int_t i, j;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  for(i=n-1; i>0; i--){

		j=SA[i];

		int_t next, prev=PREV[j];
		if(LA[j+1]==0) next=j+1;
		else next=PREV[j+1];

		LA[j]=next-j;	

		PREV[next]=prev;
		PREV[prev+1]=next;

    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)<=chr(j+1) && bkt[chr(j)]<i) {
        SA[bkt[chr(j)]]=j;
        bkt[chr(j)]--;
        if(!suffix) SA[i]=0;
      }
    }
	}

	LA[n-1]=1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
movl 0x50(%rsp), %ebx
movl 0x40(%rsp), %ecx
pushq $0x1
popq %r8
movq %r12, %rdi
movq %r15, %rsi
movl %r9d, %edx
movl %ebx, %r9d
callq 0x5e7b
movl 0x48(%rsp), %r10d
movq (%rsp), %r9
decl %r9d
movq %r9, %rax
testl %eax, %eax
jle 0x63ab
movslq (%rbp,%rax,4), %rcx
cmpl $0x0, 0x4(%r14,%rcx,4)
je 0x6326
movl 0x4(%r13,%rcx,4), %esi
movslq %esi, %rdx
jmp 0x632c
leaq 0x1(%rcx), %rdx
movl %edx, %esi
movl (%r13,%rcx,4), %edi
movslq %edi, %rdi
movl %esi, %r8d
subl %ecx, %r8d
movl %r8d, (%r14,%rcx,4)
movl %edi, (%r13,%rdx,4)
movl %esi, 0x4(%r13,%rdi,4)
movslq (%rbp,%rax,4), %rdx
testq %rdx, %rdx
jle 0x63a3
leal -0x1(%rdx), %ecx
cmpl $0x4, %ebx
jne 0x6376
movslq (%r12,%rcx,4), %rsi
cmpl (%r12,%rdx,4), %esi
jg 0x63a3
movslq (%r15,%rsi,4), %rdx
cmpl %eax, %edx
jge 0x63a3
movl %ecx, (%rbp,%rdx,4)
movl (%r12,%rcx,4), %ecx
jmp 0x6392
movzbl (%r12,%rcx), %esi
cmpb (%r12,%rdx), %sil
ja 0x63a3
movslq (%r15,%rsi,4), %rdx
cmpl %eax, %edx
jge 0x63a3
movl %ecx, (%rbp,%rdx,4)
movzbl (%r12,%rcx), %ecx
movslq %ecx, %rcx
decl (%r15,%rcx,4)
testl %r10d, %r10d
jne 0x63a3
andl $0x0, (%rbp,%rax,4)
decq %rax
jmp 0x6307
movslq %r9d, %rax
movl $0x1, (%r14,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/sacak-lyndon.c
// Function: induceSAs0_LA_9n
void induceSAs0_LA_9n(int_t *SA, int_t *LA, 
  int_t *s, int_t *bkt,
  int_t n, unsigned int K, int_t suffix, int cs) {
  int_t i, j;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  for(i=n-1; i>0; i--){

    #if DEBUG
	    printf("\n\n");
	    printf("LA (%d)\n",SA[i]);
      for(j=0; j<n; j++)
	    	printf("%" PRIdN "\t", LA[j]);
	    printf("\n\n");
    #endif

		j=SA[i];
		int_t next, prev;

    if(SA[i]>0) {

      if(LA[j-1]<j) prev=LA[j-1];
      else prev=j-1;
	    next=LA[j];

		  LA[next-1]=prev;
      if(prev>=0) LA[prev]=next;

      j=SA[i]-1;
      if(chr(j)<=chr(j+1) && bkt[chr(j)]<i) { //Inducing S-type
        SA[bkt[chr(j)]]=j;
        bkt[chr(j)]--;
        if(!suffix) SA[i]=0;
      }
    }
    else{
      prev=j-1;
	    next=LA[j];
		  LA[next-1]=prev;
    }
	}

  #if DEBUG
	  printf("\n\n");
	  printf("LA (%d)\n",SA[i]);
    for(j=0; j<n; j++)
	  	printf("%" PRIdN "\t", LA[j]);
	  printf("\n\n");
  #endif 

	LA[n-1]=n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movl 0x48(%rsp), %ebp
pushq $0x1
popq %r8
movq %rdx, %rdi
movq %rcx, %rsi
movl %ebx, %edx
movl %r9d, %ecx
movl %ebp, %r9d
callq 0x5e7b
movl 0x40(%rsp), %r8d
leal -0x1(%rbx), %eax
movq %rax, %rcx
testl %ecx, %ecx
jle 0x64a7
movslq (%r13,%rcx,4), %rsi
leal -0x1(%rsi), %edx
testq %rsi, %rsi
jle 0x6465
movl %edx, %edi
movl (%r14,%rdi,4), %edi
cmpl %esi, %edi
cmovll %edi, %edx
movslq (%r14,%rsi,4), %rsi
movl %edx, -0x4(%r14,%rsi,4)
testl %edx, %edx
js 0x6438
movl %edx, %edx
movl %esi, (%r14,%rdx,4)
movslq (%r13,%rcx,4), %rsi
leaq -0x1(%rsi), %rdx
cmpl $0x4, %ebp
jne 0x6470
movslq -0x4(%r12,%rsi,4), %rdi
cmpl (%r12,%rsi,4), %edi
jg 0x649f
movslq (%r15,%rdi,4), %rdi
cmpl %ecx, %edi
jge 0x649f
movl %edx, (%r13,%rdi,4)
movl -0x4(%r12,%rsi,4), %edx
jmp 0x648d
movslq (%r14,%rsi,4), %rsi
movl %edx, -0x4(%r14,%rsi,4)
jmp 0x649f
movzbl (%r12,%rdx), %edi
cmpb (%r12,%rsi), %dil
ja 0x649f
movslq (%r15,%rdi,4), %rsi
cmpl %ecx, %esi
jge 0x649f
movl %edx, (%r13,%rsi,4)
movzbl (%r12,%rdx), %edx
movslq %edx, %rdx
decl (%r15,%rdx,4)
testl %r8d, %r8d
jne 0x649f
andl $0x0, (%r13,%rcx,4)
decq %rcx
jmp 0x6405
cltq
movl %ebx, (%r14,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/sacak-lyndon.c
// Function: putSubstr0
void putSubstr0(int_t *SA,
  int_t *s, int_t *bkt,
  int_t n, unsigned int K, int cs) {
  int_t i, cur_t, succ_t;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  // set each item in SA as empty.
  for(i=0; i<n; i++) SA[i]=0;

  succ_t=0; // s[n-2] must be L-type.
  for(i=n-2; i>0; i--) {
    cur_t=(chr(i-1)<chr(i) ||
           (chr(i-1)==chr(i) && succ_t==1)
          )?1:0;
    if(cur_t==0 && succ_t==1) SA[bkt[chr(i)]--]=i;
    succ_t=cur_t;
  }

  // set the single sentinel LMS-substring.
  SA[0]=n-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
pushq $0x1
popq %r13
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
movl %r13d, %r8d
callq 0x5e7b
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
cmpq %rax, %rcx
je 0x6507
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x64f8
leal -0x2(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
jle 0x6581
cmpl $0x4, %ebp
jne 0x6527
movl -0x4(%r12,%rax,4), %edx
movl (%r12,%rax,4), %esi
movl %r13d, %edi
cmpl %esi, %edx
jge 0x653a
jmp 0x657a
movzbl -0x1(%r12,%rax), %edx
movzbl (%r12,%rax), %esi
movl %r13d, %edi
cmpb %sil, %dl
jb 0x657a
cmpl %esi, %edx
sete %dil
testl %ecx, %ecx
setne %r8b
andb %dil, %r8b
movzbl %r8b, %edi
cmpl $0x1, %ecx
jne 0x657a
cmpl %esi, %edx
je 0x657a
cmpl $0x4, %ebp
jne 0x6561
movl (%r12,%rax,4), %ecx
jmp 0x6566
movzbl (%r12,%rax), %ecx
movslq %ecx, %rcx
movslq (%r15,%rcx,4), %rdx
leal -0x1(%rdx), %esi
movl %esi, (%r15,%rcx,4)
movl %eax, (%r14,%rdx,4)
xorl %edi, %edi
decq %rax
movl %edi, %ecx
jmp 0x650c
decl %ebx
movl %ebx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/sacak-lyndon.c
// Function: getLengthOfLMS
int_t getLengthOfLMS(int_t *s, 
  int_t n, int level, int_t x, int cs) {
  if(x==n-1) return 1;  
  
  int_t dist=0, i=1;  
  while(1) {
    if(chr(x+i)<chr(x+i-1)) break;
    i++;
  }  
  while(1) {
    if(x+i>n-1 || chr(x+i)>chr(x+i-1)) break;
    if(x+i==n-1 || chr(x+i)<chr(x+i-1)) dist=i;
    i++;
  }
  
  return dist+1;
}

// Assembly:
leal -0x1(%rsi), %eax
cmpl %ecx, %eax
jne 0x6ae6
pushq $0x1
popq %rax
retq
movslq %ecx, %rdx
xorl %r9d, %r9d
cmpl $0x4, %r8d
jne 0x6afc
movl (%rdi,%rdx,4), %r10d
movl 0x4(%rdi,%rdx,4), %eax
jmp 0x6b06
movzbl 0x1(%rdi,%rdx), %eax
movzbl (%rdi,%rdx), %r10d
incq %rdx
incl %r9d
cmpl %r10d, %eax
jge 0x6aec
movslq %esi, %r10
notl %ecx
addl %esi, %ecx
xorl %eax, %eax
cmpq %r10, %rdx
jge 0x6b6d
cmpl $0x4, %r8d
jne 0x6b2f
movl -0x4(%rdi,%rdx,4), %r11d
movl (%rdi,%rdx,4), %esi
jmp 0x6b39
movzbl (%rdi,%rdx), %esi
movzbl -0x1(%rdi,%rdx), %r11d
cmpl %r11d, %esi
jg 0x6b6d
cmpl %r9d, %ecx
je 0x6b62
cmpl $0x4, %r8d
jne 0x6b53
movl -0x4(%rdi,%rdx,4), %r11d
movl (%rdi,%rdx,4), %esi
jmp 0x6b5d
movzbl (%rdi,%rdx), %esi
movzbl -0x1(%rdi,%rdx), %r11d
cmpl %r11d, %esi
jge 0x6b65
movl %r9d, %eax
incl %r9d
incq %rdx
jmp 0x6b1a
incl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/sacak-lyndon.c
// Function: getSAlms
void getSAlms(int_t *SA, 
  int_t *s, 
  int_t *s1, int_t n, 
  int_t n1, int level, int cs) {
  int_t i, j, cur_t, succ_t;

  j=n1-1; s1[j--]=n-1;
  succ_t=0; // s[n-2] must be L-type
  for(i=n-2; i>0; i--) {
    cur_t=(chr(i-1)<chr(i) ||
          (chr(i-1)==chr(i) && succ_t==1))?1:0;
    if(cur_t==0 && succ_t==1) s1[j--]=i;
    succ_t=cur_t;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
movl 0x18(%rsp), %eax
leal -0x1(%rcx), %edi
movslq %r8d, %r9
addl $-0x2, %r8d
movl %edi, -0x4(%rdx,%r9,4)
addl $-0x2, %ecx
xorl %r9d, %r9d
movl $0x1, %edi
testl %ecx, %ecx
jle 0x6dbf
cmpl $0x4, %eax
jne 0x6da5
movl -0x4(%rsi,%rcx,4), %r11d
movl (%rsi,%rcx,4), %ebx
cmpl %ebx, %r11d
jl 0x6db4
cmpl %ebx, %r11d
sete %r10b
testl %r9d, %r9d
setne %bpl
andb %r10b, %bpl
movzbl %bpl, %r10d
cmpl $0x1, %r9d
jne 0x6db7
cmpl %ebx, %r11d
je 0x6db7
movslq %r8d, %r9
decl %r8d
movl %ecx, (%rdx,%r9,4)
xorl %r10d, %r10d
jmp 0x6db7
movzbl -0x1(%rsi,%rcx), %r11d
movzbl (%rsi,%rcx), %ebx
cmpb %bl, %r11b
jae 0x6d76
movl %edi, %r10d
decq %rcx
movl %r10d, %r9d
jmp 0x6d60
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]lyndon-array/external/malloc_count/malloc_count.c
// Function: finish
static __attribute__((destructor)) void finish(void)
{
    fprintf(stdout, PPREFIX
            "exiting, total: %'lld, peak: %'lld, current: %'lld\n",
            total, peak, curr);

    fprintf(stderr, "%'lld\n", peak);

    //fprintf(stderr, "%'lld\t%'lld\t%'lld\n", total, peak, curr);
}

// Assembly:
pushq %rax
movq 0x4593(%rip), %rax      # 0xbfc8
movq (%rax), %rdi
movq 0x104771(%rip), %rdx    # 0x10c1b0
movq 0x4732(%rip), %rcx      # 0xc178
movq 0x4723(%rip), %r8       # 0xc170
leaq 0xec2(%rip), %rsi       # 0x8916
xorl %eax, %eax
callq 0x2180
movq 0x4596(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq 0x470c(%rip), %rdx      # 0xc178
leaq 0xee1(%rip), %rsi       # 0x8954
xorl %eax, %eax
popq %rcx
jmp 0x2180
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_load_file
unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename)
{
  long size = lodepng_filesize(filename);
  if (size < 0) return 78;
  *outsize = (size_t)size;

  *out = (unsigned char*)lodepng_malloc((size_t)size);
  if(!(*out) && size > 0) return 83; /*the above malloc failed*/

  return lodepng_buffer_file(*out, (size_t)size, filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
leaq 0xb6e0(%rip), %rsi      # 0xc95c
movq %rdx, %rdi
callq 0x1130
pushq $0x4e
popq %rbx
testq %rax, %rax
je 0x133a
movq %rax, %rbp
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1110
testl %eax, %eax
je 0x12aa
pushq $-0x1
popq %r15
jmp 0x12c7
movq %rbp, %rdi
callq 0x10d0
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
pushq $-0x1
popq %r15
cmovneq %rax, %r15
movq %rbp, %rdi
callq 0x1070
testq %r15, %r15
js 0x133a
movq %r15, (%r13)
movq %r15, %rdi
callq 0x10f0
movq %rax, %r13
movq %rax, (%r12)
testq %rax, %rax
sete %al
testq %r15, %r15
setne %cl
testb %al, %cl
je 0x12fc
pushq $0x53
popq %rbx
jmp 0x133a
leaq 0xb659(%rip), %rsi      # 0xc95c
movq %r14, %rdi
callq 0x1130
testq %rax, %rax
je 0x133a
movq %rax, %r14
pushq $0x1
popq %rsi
movq %r13, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x1060
movq %rax, %rbx
movq %r14, %rdi
callq 0x1070
xorl %eax, %eax
cmpq %r15, %rbx
pushq $0x4e
popq %rbx
cmovel %eax, %ebx
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_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_save_file
unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename)
{
  FILE* file;
  file = fopen(filename, "wb" );
  if(!file) return 79;
  fwrite((char*)buffer , 1 , buffersize, file);
  fclose(file);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa714(%rip), %rsi      # 0xba71
movq %rdx, %rdi
callq 0x1130
testq %rax, %rax
je 0x138a
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1150
movq %r15, %rdi
callq 0x1070
xorl %eax, %eax
jmp 0x138d
pushq $0x4f
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: bpmnode_create
static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail)
{
  unsigned i;
  BPMNode* result;

  /*memory full, so garbage collect*/
  if(lists->nextfree >= lists->numfree)
  {
    /*mark only those that are in use*/
    for(i = 0; i != lists->memsize; ++i) lists->memory[i].in_use = 0;
    for(i = 0; i != lists->listsize; ++i)
    {
      BPMNode* node;
      for(node = lists->chains0[i]; node != 0; node = node->tail) node->in_use = 1;
      for(node = lists->chains1[i]; node != 0; node = node->tail) node->in_use = 1;
    }
    /*collect those that are free*/
    lists->numfree = 0;
    for(i = 0; i != lists->memsize; ++i)
    {
      if(!lists->memory[i].in_use) lists->freelist[lists->numfree++] = &lists->memory[i];
    }
    lists->nextfree = 0;
  }

  result = lists->freelist[lists->nextfree++];
  result->weight = weight;
  result->index = index;
  result->tail = tail;
  return result;
}

// Assembly:
pushq %r14
pushq %rbx
movl 0x14(%rdi), %r8d
cmpl 0x10(%rdi), %r8d
jae 0x1764
movq 0x18(%rdi), %rax
leal 0x1(%r8), %r9d
movl %r9d, 0x14(%rdi)
movl %r8d, %edi
movq (%rax,%rdi,8), %rax
movl %esi, (%rax)
movl %edx, 0x4(%rax)
movq %rcx, 0x8(%rax)
popq %rbx
popq %r14
retq
movl (%rdi), %eax
imulq $0x18, %rax, %rax
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x1782
movq 0x8(%rdi), %r9
andl $0x0, 0x10(%r9,%r8)
addq $0x18, %r8
jmp 0x176d
movl 0x20(%rdi), %r8d
xorl %r9d, %r9d
cmpq %r8, %r9
je 0x17d2
leaq (,%r9,8), %r10
movq 0x28(%rdi), %r11
addq %r10, %r11
movq (%r11), %r11
testq %r11, %r11
je 0x17b3
movl $0x1, 0x10(%r11)
addq $0x8, %r11
jmp 0x179d
addq 0x30(%rdi), %r10
movq (%r10), %r10
testq %r10, %r10
je 0x17cd
movl $0x1, 0x10(%r10)
addq $0x8, %r10
jmp 0x17b7
incq %r9
jmp 0x1789
andl $0x0, 0x10(%rdi)
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %r9, %rax
je 0x1744
movq 0x8(%rdi), %r11
cmpl $0x0, 0x10(%r11,%r9)
jne 0x1809
addq %r9, %r11
movq 0x18(%rdi), %rbx
movl %r10d, %r14d
incl %r10d
movl %r10d, 0x10(%rdi)
movq %r11, (%rbx,%r14,8)
addq $0x18, %r9
jmp 0x17df
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: boundaryPM
static void boundaryPM(BPMLists* lists, BPMNode* leaves, size_t numpresent, int c, int num)
{
  unsigned lastindex = lists->chains1[c]->index;

  if(c == 0)
  {
    if(lastindex >= numpresent) return;
    lists->chains0[c] = lists->chains1[c];
    lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, 0);
  }
  else
  {
    /*sum of the weights of the head nodes of the previous lookahead chains.*/
    int sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight;
    lists->chains0[c] = lists->chains1[c];
    if(lastindex < numpresent && sum > leaves[lastindex].weight)
    {
      lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, lists->chains1[c]->tail);
      return;
    }
    lists->chains1[c] = bpmnode_create(lists, sum, lastindex, lists->chains1[c - 1]);
    /*in the end we are only interested in the chain of the last list, so no
    need to recurse if we're at the last one (this gives measurable speedup)*/
    if(num + 1 < (int)(2 * numpresent - 2))
    {
      boundaryPM(lists, leaves, numpresent, c - 1, num);
      boundaryPM(lists, leaves, numpresent, c - 1, num);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %r8, 0x8(%rsp)
leal 0x1(%r8), %eax
movl %eax, 0x4(%rsp)
leal -0x2(%rdx,%rdx), %eax
movl %eax, (%rsp)
movslq %ecx, %r15
movq %r15, %rax
negq %rax
movq %rax, 0x10(%rsp)
leaq (,%r15,8), %r13
decl %r15d
xorl %ebp, %ebp
movq 0x30(%rbx), %rcx
addq %r13, %rcx
movq (%rcx,%rbp,8), %rax
movl 0x4(%rax), %edx
cmpq %rbp, 0x10(%rsp)
je 0x18dc
movq 0x28(%rbx), %rdi
addq %r13, %rdi
movq -0x8(%rdi,%rbp,8), %r8
movq -0x8(%rcx,%rbp,8), %rcx
movl (%rcx), %esi
addl (%r8), %esi
movq %rax, (%rdi,%rbp,8)
cmpq %r12, %rdx
jae 0x1895
imulq $0x18, %rdx, %rax
movl (%r14,%rax), %eax
cmpl %eax, %esi
jg 0x1905
movq 0x30(%rbx), %rax
addq %r13, %rax
movq -0x8(%rax,%rbp,8), %rcx
movq %rbx, %rdi
callq 0x1737
movq 0x30(%rbx), %rcx
addq %r13, %rcx
movq %rax, (%rcx,%rbp,8)
movl (%rsp), %eax
cmpl %eax, 0x4(%rsp)
jge 0x1929
leal (%r15,%rbp), %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %r8
callq 0x180f
decq %rbp
jmp 0x1855
cmpq %r12, %rdx
jae 0x1929
movq 0x28(%rbx), %rcx
movq %rax, (%rcx)
imulq $0x18, %rdx, %rax
movl (%r14,%rax), %esi
incl %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1737
movq 0x30(%rbx), %rcx
movq %rax, (%rcx)
jmp 0x1929
incl %edx
movq 0x30(%rbx), %rcx
addq %r13, %rcx
movq (%rcx,%rbp,8), %rcx
movq 0x8(%rcx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x1737
addq 0x30(%rbx), %r13
movq %rax, (%r13,%rbp,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpq $0x2, %rcx
jae 0x2fc7
pushq $0x35
popq %rax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdx), %esi
movl %esi, %eax
shll $0x8, %eax
movzbl 0x1(%rdx), %ecx
orl %ecx, %eax
movw $0x1f, %di
xorl %edx, %edx
divw %di
testw %dx, %dx
je 0x2ffe
pushq $0x18
jmp 0x3040
movl %esi, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %sil, %sil
sets %dl
orb %al, %dl
je 0x3017
pushq $0x19
jmp 0x3040
testb $0x20, %cl
jne 0x303e
movq %r8, %r13
leaq 0x2(%r12), %rdx
leaq -0x2(%r15), %rcx
movq 0x10(%r8), %rax
movq %r14, %rdi
movq %rbx, %rsi
testq %rax, %rax
je 0x3050
movq %r13, %r8
callq *%rax
jmp 0x3055
pushq $0x1a
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1938
testl %eax, %eax
jne 0x3041
cmpl $0x0, (%r13)
jne 0x307d
leaq (%r12,%r15), %rdi
addq $-0x4, %rdi
callq 0x125c
movl %eax, %ebp
movq (%r14), %rdi
movl (%rbx), %esi
callq 0x3085
cmpl %ebp, %eax
jne 0x3081
xorl %eax, %eax
jmp 0x3041
pushq $0x3a
jmp 0x3040
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_zlib_compress
unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
                               size_t insize, const LodePNGCompressSettings* settings)
{
  /*initially, *out must be NULL and outsize 0, if you just give some random *out
  that's pointing to a non allocated buffer, this'll crash*/
  ucvector outv;
  size_t i;
  unsigned error;
  unsigned char* deflatedata = 0;
  size_t deflatesize = 0;

  /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/
  unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/
  unsigned FLEVEL = 0;
  unsigned FDICT = 0;
  unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64;
  unsigned FCHECK = 31 - CMFFLG % 31;
  CMFFLG += FCHECK;

  /*ucvector-controlled version of the output buffer, for dynamic array*/
  ucvector_init_buffer(&outv, *out, *outsize);

  ucvector_push_back(&outv, (unsigned char)(CMFFLG >> 8));
  ucvector_push_back(&outv, (unsigned char)(CMFFLG & 255));

  error = deflate(&deflatedata, &deflatesize, in, insize, settings);

  if(!error)
  {
    unsigned ADLER32 = adler32(in, (unsigned)insize);
    for(i = 0; i != deflatesize; ++i) ucvector_push_back(&outv, deflatedata[i]);
    lodepng_free(deflatedata);
    lodepng_add32bitInt(&outv, ADLER32);
  }

  *out = outv.data;
  *outsize = outv.size;

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rcx, %r15
andq $0x0, 0x8(%rsp)
movq %rdx, %r12
andq $0x0, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rsi), %rcx
leaq 0x10(%rsp), %rbp
movq %rax, (%rbp)
movq %rcx, 0x8(%rbp)
movq %rcx, 0x10(%rbp)
pushq $0x78
popq %rsi
movq %rbp, %rdi
callq 0x31c1
pushq $0x1
popq %rsi
movq %rbp, %rdi
callq 0x31c1
movq 0x20(%r13), %rax
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r13, %r8
testq %rax, %rax
je 0x3150
callq *%rax
jmp 0x3155
callq 0x21cf
movl %eax, %ebp
testl %eax, %eax
jne 0x31a0
movq %r12, %rdi
movl %r15d, %esi
callq 0x3085
movl %eax, %r15d
xorl %r13d, %r13d
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %rdi
cmpq (%rsp), %r13
je 0x318e
movzbl (%rdi,%r13), %esi
movq %r12, %rdi
callq 0x31c1
incq %r13
jmp 0x3171
callq 0x1030
leaq 0x10(%rsp), %rdi
movl %r15d, %esi
callq 0x31ed
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movq 0x18(%rsp), %rax
movq %rax, (%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $-0x1
popq %rax
xorl %ecx, %ecx
leaq 0x7f67(%rip), %rdx      # 0xb1c0
cmpq %rcx, %rsi
je 0x3275
movb (%rdi,%rcx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rdx,%r8,4), %eax
incq %rcx
jmp 0x3259
notl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_chunk_check_crc
unsigned lodepng_chunk_check_crc(const unsigned char* chunk)
{
  unsigned length = lodepng_chunk_length(chunk);
  unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]);
  /*the CRC is taken of the data and the 4 chunk type letters, not the length*/
  unsigned checksum = lodepng_crc32(&chunk[4], length + 4);
  if(CRC != checksum) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x125c
movl %eax, %r14d
leal 0x8(%r14), %edi
addq %rbx, %rdi
callq 0x125c
movl %eax, %ebp
addq $0x4, %rbx
addl $0x4, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x324d
xorl %ecx, %ecx
cmpl %eax, %ebp
setne %cl
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x125c
movl %eax, %r14d
addl $0xc, %r14d
movq (%r15), %rbp
movq %rbp, %r13
addq %r14, %r13
jae 0x33d2
pushq $0x4d
jmp 0x3404
movq (%r12), %rdi
movq %r13, %rsi
callq 0x1120
testq %rax, %rax
je 0x3402
movq %rax, (%r12)
movq %r13, (%r15)
addq %rax, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x3405
movb (%rbx,%rcx), %dl
movb %dl, (%rbp,%rcx)
incq %rcx
jmp 0x33f1
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %edx, %r14d
movq %rsi, %r15
movl %edx, %r13d
leaq 0xc(%r13), %rbp
addq (%rsi), %rbp
setb %al
leal 0xc(%r14), %esi
cmpq %rsi, %rbp
setb %sil
orb %al, %sil
je 0x3446
pushq $0x4d
jmp 0x34c2
movq %r8, %rbx
movq %rdi, %r12
movq %rcx, (%rsp)
movq (%rdi), %rdi
movq %rbp, %rsi
callq 0x1120
testq %rax, %rax
je 0x34c0
movq %rax, (%r12)
movq %rbp, (%r15)
subq %r13, %rbp
leaq (%rax,%rbp), %rdi
addq $-0xc, %rdi
movq %r14, %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)
movq (%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x8(%rax,%rbp)
negq %r13
pushq $0x8
popq %rax
leaq (%rax,%r13), %rcx
cmpq $0x8, %rcx
je 0x34b7
movb -0x8(%rbx,%rax), %cl
movl %eax, %edx
movb %cl, (%rdi,%rdx)
incq %rax
jmp 0x349f
callq 0x3351
xorl %eax, %eax
jmp 0x34c3
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x34f0
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
cmpq $0x0, 0x8(%rbx)
je 0x356b
movl $0x400, %edi            # imm = 0x400
callq 0x10f0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x356f
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
shlq $0x2, %rdx
cmpq %rdx, %rcx
je 0x3579
movq 0x8(%rbx), %rdx
movb (%rdx,%rcx), %dl
movq 0x8(%r14), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
jmp 0x354b
xorl %eax, %eax
jmp 0x3579
cmpq $0x0, 0x10(%rbx)
je 0x3547
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq 0x8(%rdi), %rax
testq %rax, %rax
jne 0x35b3
movl $0x400, %edi            # imm = 0x400
callq 0x10f0
testq %rax, %rax
je 0x35f0
movq %rax, 0x8(%r14)
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
pushq $0x53
popq %rax
jmp 0x35e7
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_has_palette_alpha
unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info)
{
  size_t i;
  for(i = 0; i != info->palettesize; ++i)
  {
    if(info->palette[i * 4 + 3] < 255) return 1;
  }
  return 0;
}

// Assembly:
movq 0x10(%rdi), %rcx
xorl %eax, %eax
pushq $0x1
popq %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x365f
movq 0x8(%rdi), %r8
cmpb $-0x1, 0x3(%r8,%rsi,4)
leaq 0x1(%rsi), %rsi
je 0x3648
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x50(%rbx), %rdi
cmpq 0x48(%rbx), %r15
je 0x3724
addq %r14, %rdi
callq 0x8dd2
movq 0x58(%rbx), %rdi
addq %r14, %rdi
callq 0x8dd2
incq %r15
addq $0x8, %r14
jmp 0x36fd
callq 0x1030
movq 0x58(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
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 0x37ef
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movq %r12, 0x50(%r14)
movq %r13, 0x58(%r14)
leaq (%r12,%rax,8), %rdi
callq 0x380c
movq 0x48(%r14), %rax
movq 0x50(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq %r15, %rsi
callq 0x3817
movq 0x48(%r14), %rax
movq 0x58(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
callq 0x380c
movq 0x48(%r14), %rax
movq 0x58(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq %rbx, %rsi
callq 0x3817
xorl %eax, %eax
jmp 0x3802
movq %r12, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
pushq $0x53
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rax, %rsi
callq 0x8de4
testl %eax, %eax
je 0x3851
xorl %eax, %eax
cmpq %rax, %r15
je 0x3851
movb (%rbx,%rax), %cl
movq (%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
jmp 0x383e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x68(%rbx), %rdi
cmpq 0x60(%rbx), %r15
je 0x38a9
addq %r14, %rdi
callq 0x8dd2
movq 0x70(%rbx), %rdi
addq %r14, %rdi
callq 0x8dd2
movq 0x78(%rbx), %rdi
addq %r14, %rdi
callq 0x8dd2
movq 0x80(%rbx), %rdi
addq %r14, %rdi
callq 0x8dd2
incq %r15
addq $0x8, %r14
jmp 0x3867
callq 0x1030
movq 0x70(%rbx), %rdi
callq 0x1030
movq 0x78(%rbx), %rdi
callq 0x1030
movq 0x80(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x34f0
movq %rbx, %rdi
callq 0x36ef
movq %rbx, %rdi
callq 0x3859
movq %rbx, %rdi
popq %rbx
jmp 0x3b3b
// File: /workspace/github_c_makefile_star2_O2/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 0x3b18
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 0x3506
testl %eax, %eax
jne 0x3c42
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
andq $0x0, 0x58(%r14)
xorl %r12d, %r12d
cmpq 0x48(%rbx), %r12
je 0x3bf2
movq 0x50(%rbx), %rax
movq 0x58(%rbx), %rcx
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
movq %r14, %rdi
callq 0x3737
incq %r12
testl %eax, %eax
je 0x3bcb
jmp 0x3c42
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
movups %xmm0, 0x60(%r14)
andq $0x0, 0x80(%r14)
xorl %r12d, %r12d
cmpq 0x60(%rbx), %r12
je 0x3c57
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 0x38d1
incq %r12
testl %eax, %eax
je 0x3c0a
movl %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x3aeb
movq %r14, %rdi
callq 0x3b3b
xorl %r15d, %r15d
pushq $0x53
popq %rbp
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x3c45
movq 0xd0(%rbx,%r13,8), %r12
movq %r12, 0xd0(%r14,%r13,8)
movq %r12, %rdi
callq 0x10f0
movq %rax, 0xb8(%r14,%r13,8)
testq %rax, %rax
sete %al
testq %r12, %r12
setne %cl
testb %al, %cl
jne 0x3cd5
xorl %eax, %eax
cmpq %r12, %rax
jae 0x3cd0
movq 0xb8(%rbx,%r13,8), %rcx
movb (%rcx,%rax), %cl
movq 0xb8(%r14,%r13,8), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq 0xd0(%rbx,%r13,8), %r12
jmp 0x3ca8
incq %r13
jmp 0x3c70
movl %ebp, %r15d
jmp 0x3c45
// File: /workspace/github_c_makefile_star2_O2/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 0x41d8
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x41d8
movl 0x18(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
jne 0x41d8
testl %ecx, %ecx
je 0x41a4
movl 0x1c(%rdi), %ecx
cmpl 0x1c(%rsi), %ecx
jne 0x41d8
movl 0x20(%rdi), %ecx
cmpl 0x20(%rsi), %ecx
jne 0x41d8
movl 0x24(%rdi), %ecx
cmpl 0x24(%rsi), %ecx
jne 0x41d8
movq 0x10(%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jne 0x41d8
shlq $0x2, %rcx
xorl %r8d, %r8d
pushq $0x1
popq %rdx
cmpq %r8, %rcx
je 0x41d9
movq 0x8(%rdi), %rax
movb (%rax,%r8), %r9b
movq 0x8(%rsi), %r10
leaq 0x1(%r8), %r11
xorl %eax, %eax
cmpb (%r10,%r8), %r9b
movq %r11, %r8
je 0x41b8
retq
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r12d
movl %esi, %r14d
movq %rdi, %rbx
xorl %r13d, %r13d
movl %r8d, 0x4(%rsp)
cmpl $0x8, %r13d
je 0x427f
movl %r14d, %eax
movl %r13d, %ecx
shrl %cl, %eax
movl %r12d, %edi
shrl %cl, %edi
andl $0x1, %eax
andl $0x1, %edi
movl %r15d, %r10d
shrl %cl, %r10d
andl $0x1, %r10d
xorl %ecx, %ecx
btl %r13d, %r8d
setb %cl
leal (%rcx,%rdi,4), %ecx
leal (%rcx,%rax,8), %eax
leal (%rax,%r10,2), %ebp
movq (%rbx,%rbp,8), %rax
testq %rax, %rax
jne 0x4277
movl $0x88, %edi
callq 0x10f0
movq %rax, (%rbx,%rbp,8)
movq %rax, %rdi
callq 0x41dc
movl 0x4(%rsp), %r8d
movq (%rbx,%rbp,8), %rax
incl %r13d
movq %rax, %rbx
jmp 0x4219
movl (%rsp), %eax
movl %eax, 0x80(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: getPixelColorRGBA16
static void getPixelColorRGBA16(unsigned short* r, unsigned short* g, unsigned short* b, unsigned short* a,
                                const unsigned char* in, size_t i, const LodePNGColorMode* mode)
{
  if(mode->colortype == LCT_GREY)
  {
    *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1];
    if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0;
    else *a = 65535;
  }
  else if(mode->colortype == LCT_RGB)
  {
    *r = 256u * in[i * 6 + 0] + in[i * 6 + 1];
    *g = 256u * in[i * 6 + 2] + in[i * 6 + 3];
    *b = 256u * in[i * 6 + 4] + in[i * 6 + 5];
    if(mode->key_defined
       && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r
       && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g
       && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0;
    else *a = 65535;
  }
  else if(mode->colortype == LCT_GREY_ALPHA)
  {
    *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1];
    *a = 256u * in[i * 4 + 2] + in[i * 4 + 3];
  }
  else if(mode->colortype == LCT_RGBA)
  {
    *r = 256u * in[i * 8 + 0] + in[i * 8 + 1];
    *g = 256u * in[i * 8 + 2] + in[i * 8 + 3];
    *b = 256u * in[i * 8 + 4] + in[i * 8 + 5];
    *a = 256u * in[i * 8 + 6] + in[i * 8 + 7];
  }
}

// Assembly:
movq 0x8(%rsp), %rax
movl (%rax), %r10d
cmpq $0x6, %r10
ja 0x440e
leaq 0x6dd8(%rip), %r11      # 0xb088
movslq (%r11,%r10,4), %r10
addq %r11, %r10
jmpq *%r10
movzbl (%r8,%r9,2), %r10d
shll $0x8, %r10d
movzbl 0x1(%r8,%r9,2), %r11d
orl %r10d, %r11d
movw %r11w, (%rdx)
movw %r11w, (%rsi)
movw %r11w, (%rdi)
cmpl $0x0, 0x18(%rax)
je 0x43b7
leaq 0x1(,%r9,2), %rdx
addq %r9, %r9
movzbl (%r8,%r9), %esi
shll $0x8, %esi
movzbl (%r8,%rdx), %edx
orl %esi, %edx
cmpl 0x1c(%rax), %edx
jne 0x43b7
xorl %eax, %eax
jmp 0x440b
movzbl (%r8,%r9,4), %eax
shll $0x8, %eax
movzbl 0x1(%r8,%r9,4), %r10d
orl %eax, %r10d
movw %r10w, (%rdx)
movw %r10w, (%rsi)
movw %r10w, (%rdi)
movzbl 0x2(%r8,%r9,4), %edx
shll $0x8, %edx
movzbl 0x3(%r8,%r9,4), %eax
jmp 0x4409
imulq $0x6, %r9, %r9
movzbl (%r8,%r9), %r10d
shll $0x8, %r10d
movzbl 0x1(%r8,%r9), %r11d
orl %r10d, %r11d
movw %r11w, (%rdi)
movzwl 0x2(%r8,%r9), %edi
rolw $0x8, %di
movw %di, (%rsi)
movzwl 0x4(%r8,%r9), %esi
rolw $0x8, %si
movw %si, (%rdx)
cmpl $0x0, 0x18(%rax)
je 0x43b7
leaq 0x1(%r9), %rdx
movzbl (%r8,%r9), %esi
shll $0x8, %esi
movzbl (%r8,%rdx), %edx
orl %esi, %edx
cmpl 0x1c(%rax), %edx
jne 0x43b7
movzwl 0x2(%r8,%r9), %edx
rolw $0x8, %dx
movzwl %dx, %edx
cmpl 0x20(%rax), %edx
jne 0x43b7
movzwl 0x4(%r8,%r9), %edx
rolw $0x8, %dx
movzwl %dx, %edx
cmpl 0x24(%rax), %edx
je 0x4305
movw $0xffff, %ax            # imm = 0xFFFF
jmp 0x440b
movzbl (%r8,%r9,8), %eax
shll $0x8, %eax
movzbl 0x1(%r8,%r9,8), %r10d
orl %eax, %r10d
movw %r10w, (%rdi)
movzbl 0x2(%r8,%r9,8), %eax
shll $0x8, %eax
movzbl 0x3(%r8,%r9,8), %edi
orl %eax, %edi
movw %di, (%rsi)
movzbl 0x4(%r8,%r9,8), %eax
shll $0x8, %eax
movzbl 0x5(%r8,%r9,8), %esi
orl %eax, %esi
movw %si, (%rdx)
movzbl 0x6(%r8,%r9,8), %edx
shll $0x8, %edx
movzbl 0x7(%r8,%r9,8), %eax
orl %edx, %eax
movw %ax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x10, %r14
je 0x4ae7
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x4ae2
callq 0x4abb
movq (%rbx,%r14,8), %rdi
callq 0x1030
incq %r14
jmp 0x4ac5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $0x1f
popq %rax
cmpl $0x6, %edi
ja 0x55d1
movl %edi, %ecx
leaq 0x5b49(%rip), %rdx      # 0xb0dc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
pushq $0x25
popq %rax
cmovel %esi, %eax
retq
pushq $0x25
popq %rax
cmpl $0x10, %esi
ja 0x55d1
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x55d1
xorl %eax, %eax
retq
decl %esi
cmpl $0x8, %esi
jae 0x55d2
movl %esi, %eax
leaq 0x73c6(%rip), %rcx      # 0xc994
movl (%rcx,%rax,4), %eax
retq
pushq $0x25
popq %rax
retq