LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_is_16_bit
STBIDEF int stbi_is_16_bit(char const *filename)
{
    FILE *f = stbi__fopen(filename, "rb");
    int result;
    if (!f) return stbi__err("can't fopen", "Unable to open file");
    result = stbi_is_16_bit_from_file(f);
    fclose(f);
    return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xca00(%rip), %rsi      # 0x10900
callq 0x21b0
testq %rax, %rax
je 0x3f23
movq %rax, %rbx
movq %rax, %rdi
callq 0x3f3a
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2160
movl %ebp, %eax
jmp 0x3f33
leaq 0xc9d9(%rip), %rax      # 0x10903
movq %rax, 0x112e7(%rip)     # 0x15218
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__is_16_main(stbi__context*)
static int stbi__is_16_main(stbi__context *s)
{
   #ifndef STBI_NO_PNG
   if (stbi__png_is16(s))  return 1;
   #endif

   #ifndef STBI_NO_PSD
   if (stbi__psd_is16(s))  return 1;
   #endif

   return 0;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rbx, (%rdi)
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf079
testl %eax, %eax
je 0x3fc5
cmpl $0x10, 0x28(%rsp)
jne 0x3fb2
pushq $0x1
popq %rax
jmp 0x4026
movq 0x8(%rsp), %rax
movups 0xc8(%rax), %xmm0
movups %xmm0, 0xb8(%rax)
movq %rbx, %rdi
callq 0xcd14
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x4016
movq %rbx, %rdi
callq 0xaf12
cmpl $0x1, %eax
jne 0x4016
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0xb088
movq %rbx, %rdi
callq 0xaf12
cmpl $0x10, %eax
ja 0x4016
movq %rbx, %rdi
callq 0xcd14
movq %rbx, %rdi
callq 0xcd14
movq %rbx, %rdi
callq 0xaf12
cmpl $0x10, %eax
je 0x3fad
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: SlideCompressor::SlideCompressor()
SlideCompressor::SlideCompressor()
{
	S = 0;
	for(int i = 0; i < SLIDE_N + SLIDE_M - 1; i++) Text[i] = 0;
	for(int i = 0; i < 256*256; i++)
		Map[i] = -1;
	for(int i = 0; i < SLIDE_N; i++)
		Chains[i].Prev = Chains[i].Next = -1;
	for(int i = SLIDE_N - 1; i >= 0; i--)
		AddMap(i);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10c47(%rip), %rax     # 0x14d88
movq %rax, (%rdi)
andl $0x0, 0x92228(%rdi)
pushq $0x8
popq %rax
cmpq $0x1118, %rax           # imm = 0x1118
je 0x415f
movb $0x0, (%rbx,%rax)
incq %rax
jmp 0x414e
movl $0x446, %eax            # imm = 0x446
cmpq $0x10446, %rax          # imm = 0x10446
je 0x4175
orl $-0x1, (%rbx,%rax,4)
incq %rax
jmp 0x4164
movl $0x8223, %eax           # imm = 0x8223
cmpq $0x9223, %rax           # imm = 0x9223
je 0x418c
orq $-0x1, (%rbx,%rax,8)
incq %rax
jmp 0x417a
movl $0xfff, %ebp            # imm = 0xFFF
testl %ebp, %ebp
js 0x41a3
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41aa
decl %ebp
jmp 0x4191
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: SlideCompressor::GetMatch(unsigned char const*, int, int&, int)
int SlideCompressor::GetMatch(const unsigned char*cur, int curlen, int &pos, int s)
{
	// get match length
	if(curlen < 3) return 0;

	int place = cur[0] + ((int)cur[1] << 8);

	int maxlen = 0;
	if((place = Map[place]) != -1)
	{
		int place_org;
		curlen -= 1;
		do
		{
			place_org = place;
			if(s == place || s == ((place + 1) & (SLIDE_N -1))) continue;
			place += 2;
			int lim = (SLIDE_M < curlen ? SLIDE_M : curlen) + place_org;
			const unsigned char *c = cur + 2;
			if(lim >= SLIDE_N)
			{
				if(place_org <= s && s < SLIDE_N)
					lim = s;
				else if(s < (lim&(SLIDE_N-1)))
					lim = s + SLIDE_N;
			}
			else
			{
				if(place_org <= s && s < lim)
					lim = s;
			}
			while(Text[place] == *(c++) && place < lim) place++;
			int matchlen = place - place_org;
			if(matchlen > maxlen) pos = place_org, maxlen = matchlen;
			if(matchlen == SLIDE_M) return maxlen;

		} while((place = Chains[place_org].Next) != -1);
	}
	return maxlen;
}

// Assembly:
xorl %eax, %eax
cmpl $0x3, %edx
jl 0x42f8
movzwl (%rsi), %r9d
movl 0x1118(%rdi,%r9,4), %r9d
cmpl $-0x1, %r9d
je 0x42f8
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x112, %r10d           # imm = 0x112
cmpl %r10d, %edx
cmovbl %edx, %r10d
decl %r10d
addq $0x2, %rsi
leal 0x1000(%r8), %edx
xorl %eax, %eax
movl $0x2, %r11d
cmpl %r8d, %r9d
je 0x42db
leal 0x1(%r9), %ebx
andl $0xfff, %ebx            # imm = 0xFFF
cmpl %r8d, %ebx
je 0x42db
leal (%r10,%r9), %ebx
cmpl $0x1000, %ebx           # imm = 0x1000
jl 0x4291
cmpl $0xfff, %r8d            # imm = 0xFFF
jg 0x427f
movl %r8d, %ebp
cmpl %r8d, %r9d
jle 0x42a0
movl %ebx, %ebp
andl $0xfff, %ebp            # imm = 0xFFF
cmpl %r8d, %ebp
cmovgl %edx, %ebx
movl %ebx, %ebp
jmp 0x42a0
cmpl %r8d, %ebx
movl %r8d, %ebp
cmovll %ebx, %ebp
cmpl %r8d, %r9d
cmovgl %ebx, %ebp
leal 0x2(%r9), %ebx
movslq %ebx, %r14
movslq %ebp, %r15
movl %r11d, %ebx
movq %rsi, %r12
movb 0x8(%rdi,%r14), %bpl
cmpb (%r12), %bpl
jne 0x42ca
cmpq %r15, %r14
jge 0x42ca
incq %r12
incq %r14
incl %ebx
jmp 0x42b0
cmpl %eax, %ebx
jle 0x42d3
movl %r9d, (%rcx)
movl %ebx, %eax
cmpl $0x111, %ebx            # imm = 0x111
je 0x42f0
movslq %r9d, %r9
movl 0x4111c(%rdi,%r9,8), %r9d
cmpl $-0x1, %r9d
jne 0x424a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: SlideCompressor::DeleteMap(int)
void SlideCompressor::DeleteMap(int p)
{
	int n;
	if((n = Chains[p].Next) != -1)
		Chains[n].Prev = Chains[p].Prev;

	if((n = Chains[p].Prev) != -1)
	{
		Chains[n].Next = Chains[p].Next;
	}
	else if(Chains[p].Next != -1)
	{
		int place = Text[p] + ((int)Text[(p + 1) & (SLIDE_N - 1)] << 8);
		Map[place] = Chains[p].Next;
	}
	else
	{
		int place = Text[p] + ((int)Text[(p + 1) & (SLIDE_N - 1)] << 8);
		Map[place] = -1;
	}

	Chains[p].Prev = -1;
	Chains[p].Next = -1;
}

// Assembly:
movslq %esi, %rax
movslq 0x4111c(%rdi,%rax,8), %rcx
movl 0x41118(%rdi,%rax,8), %edx
cmpq $-0x1, %rcx
je 0x4340
movl %edx, 0x41118(%rdi,%rcx,8)
cmpl $-0x1, %edx
jne 0x4345
movzbl 0x8(%rdi,%rax), %edx
leal 0x1(%rax), %esi
andl $0xfff, %esi            # imm = 0xFFF
movzbl 0x8(%rdi,%rsi), %esi
shll $0xa, %esi
leal (%rsi,%rdx,4), %edx
movl %ecx, 0x1118(%rdi,%rdx)
jmp 0x434f
cmpl $-0x1, %edx
je 0x4359
movslq %edx, %rdx
movl %ecx, 0x4111c(%rdi,%rdx,8)
orq $-0x1, 0x41118(%rdi,%rax,8)
retq
movzbl 0x8(%rdi,%rax), %ecx
leal 0x1(%rax), %edx
andl $0xfff, %edx            # imm = 0xFFF
movzbl 0x8(%rdi,%rdx), %edx
shll $0xa, %edx
leal (%rdx,%rcx,4), %ecx
orl $-0x1, 0x1118(%rdi,%rcx)
jmp 0x434f
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: SlideCompressor::Store()
void SlideCompressor::Store()
{
	S2 = S;
	int i;
	for(i = 0; i < SLIDE_N + SLIDE_M - 1; i++)
		Text2[i] = Text[i];

	for(i = 0; i < 256*256; i++)
		Map2[i] = Map[i];

	for(i = 0; i < SLIDE_N; i++)
		Chains2[i] = Chains[i];
}

// Assembly:
movl 0x92228(%rdi), %eax
movl %eax, 0x9222c(%rdi)
movq $-0x1110, %rax          # imm = 0xEEF0
testq %rax, %rax
je 0x45f5
movb 0x1118(%rdi,%rax), %cl
movb %cl, 0x4a228(%rdi,%rax)
incq %rax
jmp 0x45dd
movq $-0x40000, %rax         # imm = 0xFFFC0000
testq %rax, %rax
je 0x4615
movl 0x41118(%rdi,%rax), %ecx
movl %ecx, 0x8a228(%rdi,%rax)
addq $0x4, %rax
jmp 0x45fc
xorl %eax, %eax
cmpq $0x1000, %rax           # imm = 0x1000
je 0x4634
movq 0x41118(%rdi,%rax,8), %rcx
movq %rcx, 0x8a228(%rdi,%rax,8)
incq %rax
jmp 0x4617
retq
nop
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: SlideCompressor::Restore()
void SlideCompressor::Restore()
{
	S = S2;
	int i;
	for(i = 0; i < SLIDE_N + SLIDE_M - 1; i++)
		Text[i] = Text2[i];

	for(i = 0; i < 256*256; i++)
		Map[i] = Map2[i];

	for(i = 0; i < SLIDE_N; i++)
		Chains[i] = Chains2[i];
}

// Assembly:
movl 0x9222c(%rdi), %eax
movl %eax, 0x92228(%rdi)
movq $-0x1110, %rax          # imm = 0xEEF0
testq %rax, %rax
je 0x4661
movb 0x4a228(%rdi,%rax), %cl
movb %cl, 0x1118(%rdi,%rax)
incq %rax
jmp 0x4649
movq $-0x40000, %rax         # imm = 0xFFFC0000
testq %rax, %rax
je 0x4681
movl 0x8a228(%rdi,%rax), %ecx
movl %ecx, 0x41118(%rdi,%rax)
addq $0x4, %rax
jmp 0x4668
xorl %eax, %eax
cmpq $0x1000, %rax           # imm = 0x1000
je 0x46a0
movq 0x8a228(%rdi,%rax,8), %rcx
movq %rcx, 0x41118(%rdi,%rax,8)
incq %rax
jmp 0x4683
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: TVPTLG6InitGolombTable()
void TVPTLG6InitGolombTable()
{
	if(TVPTLG6GolombTableInit) return;
	for(int n = 0; n < TVP_TLG6_GOLOMB_N_COUNT; n++)
	{
		int a = 0;
		for(int i = 0; i < 9; i++)
		{
			for(int j = 0; j < TVPTLG6GolombCompressed[n][i]; j++)
				TVPTLG6GolombBitLengthTable[a++][n] = (char)i;
		}
		if(a != TVP_TLG6_GOLOMB_N_COUNT*2*128)
			*(char*)0 = 0;   // THIS MUST NOT BE EXECUETED!
				// (this is for compressed table data check)
	}
	TVPTLG6GolombTableInit = true;
}

// Assembly:
cmpb $0x0, 0x11b88(%rip)     # 0x16230
jne 0x471c
pushq %rbx
leaq 0x10b7e(%rip), %rax     # 0x15230
xorl %ecx, %ecx
leaq 0xbc85(%rip), %rdx      # 0x10340
cmpq $0x4, %rcx
je 0x4714
xorl %esi, %esi
imulq $0x12, %rcx, %rdi
addq %rdx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpq $0x9, %r8
je 0x470c
movzwl (%rdi,%r8,2), %r10d
movslq %r9d, %r11
testw %r10w, %r10w
cmovlel %esi, %r10d
movzwl %r10w, %r9d
addl %r11d, %r9d
movslq %r9d, %r10
subq %r11, %r10
leaq (%rax,%r11,4), %r11
xorl %ebx, %ebx
cmpq %rbx, %r10
je 0x4707
movb %r8b, (%r11,%rbx,4)
incq %rbx
jmp 0x46f9
incq %r8
jmp 0x46d0
incq %rcx
incq %rax
jmp 0x46bb
movb $0x1, 0x11b15(%rip)     # 0x16230
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/png2tlg.cpp
// Function: main
int main(int argc, char *argv[])
{
	if (argc != 3) {
		std::cerr << "usage: " << argv[0] << " input output" << std::endl;
		return 1;
	}
	tTVPBaseBitmap bmp(argv[1]);
	std::fstream fs(argv[2], std::fstream::out | std::fstream::binary);
	SaveTLG6( &fs, &bmp, false );
	return 0;
}

// Assembly:
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x5f94
movq 0x8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0xf424
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xf460
leaq 0x20(%rsp), %rdi
callq 0x20b0
movq 0x10(%rbx), %rsi
leaq 0x40(%rsp), %rdi
pushq $0x14
popq %rdx
callq 0x2200
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x5477
leaq 0x40(%rsp), %rdi
callq 0x2060
movq 0x18(%rsp), %rdi
callq 0x21c0
jmp 0x5fcc
movq 0xf04d(%rip), %rdi      # 0x14fe8
leaq 0xa994(%rip), %rsi      # 0x10936
callq 0x2150
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xa985(%rip), %rsi      # 0x1093e
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbx
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2060
jmp 0x5fe9
movq %rax, %rbx
movq 0x18(%rsp), %rdi
callq 0x21c0
jmp 0x6007
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x6007
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__vertical_flip(void*, int, int, int)
static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel)
{
   int row;
   size_t bytes_per_row = (size_t)w * bytes_per_pixel;
   stbi_uc temp[2048];
   stbi_uc *bytes = (stbi_uc *)image;

   for (row = 0; row < (h>>1); row++) {
      stbi_uc *row0 = bytes + row*bytes_per_row;
      stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row;
      // swap row0 with row1
      size_t bytes_left = bytes_per_row;
      while (bytes_left) {
         size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp);
         memcpy(temp, row0, bytes_copy);
         memcpy(row0, row1, bytes_copy);
         memcpy(row1, temp, bytes_copy);
         row0 += bytes_copy;
         row1 += bytes_copy;
         bytes_left -= bytes_copy;
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %rdi, 0x18(%rsp)
movslq %esi, %rax
movslq %ecx, %rcx
imulq %rax, %rcx
movq %rcx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %edx, %eax
sarl %eax
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
movq %rax, 0x20(%rsp)
movl $0x800, %ebx            # imm = 0x800
leaq 0x30(%rsp), %r15
cmpq 0x20(%rsp), %rdx
je 0x9536
movq 0x10(%rsp), %r14
movq %r14, %r12
imulq %rdx, %r12
movq 0x18(%rsp), %rcx
addq %rcx, %r12
movq %rdx, 0x28(%rsp)
movl %edx, %eax
notl %eax
addl 0xc(%rsp), %eax
movslq %eax, %r13
imulq %r14, %r13
addq %rcx, %r13
testq %r14, %r14
je 0x9529
cmpq %rbx, %r14
movl $0x800, %ebp            # imm = 0x800
cmovbq %r14, %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x2130
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2130
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2130
addq %rbp, %r12
addq %rbp, %r13
subq %rbp, %r14
jmp 0x94e3
movq 0x28(%rsp), %rdx
incq %rdx
jmp 0x94b1
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__get_marker(stbi__jpeg*)
static stbi_uc stbi__get_marker(stbi__jpeg *j)
{
   stbi_uc x;
   if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
   x = stbi__get8(j->s);
   if (x != 0xff) return STBI__MARKER_none;
   while (x == 0xff)
      x = stbi__get8(j->s); // consume repeated 0xff fill bytes
   return x;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x4828(%rdi), %al
cmpb $-0x1, %al
je 0xa9cc
movb $-0x1, 0x4828(%rbx)
jmp 0xa9eb
movq (%rbx), %rdi
callq 0xae91
movl %eax, %ecx
movb $-0x1, %al
cmpb $-0x1, %cl
jne 0xa9eb
jmp 0xa9e7
movq (%rbx), %rdi
callq 0xae91
cmpb $-0x1, %al
je 0xa9df
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__at_eof(stbi__context*)
stbi_inline static int stbi__at_eof(stbi__context *s)
{
   if (s->io.read) {
      if (!(s->io.eof)(s->io_user_data)) return 0;
      // if feof() is true, check if buffer = end
      // special case: we've only got the special 0 character at the end
      if (s->read_from_callbacks == 0) return 1;
   }

   return s->img_buffer >= s->img_buffer_end;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0xae73
movq 0x28(%rbx), %rdi
callq *0x20(%rbx)
testl %eax, %eax
je 0xae88
cmpl $0x0, 0x30(%rbx)
je 0xae8c
movq 0xb8(%rbx), %rcx
xorl %eax, %eax
cmpq 0xc0(%rbx), %rcx
setae %al
jmp 0xae8f
xorl %eax, %eax
jmp 0xae8f
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__get8(stbi__context*)
stbi_inline static stbi_uc stbi__get8(stbi__context *s)
{
   if (s->img_buffer < s->img_buffer_end)
      return *s->img_buffer++;
   if (s->read_from_callbacks) {
      stbi__refill_buffer(s);
      return *s->img_buffer++;
   }
   return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xb8(%rdi), %rax
cmpq 0xc0(%rdi), %rax
jb 0xaeba
cmpl $0x0, 0x30(%rbx)
je 0xaec9
movq %rbx, %rdi
callq 0xaecd
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb (%rax), %al
popq %rbx
retq
xorl %eax, %eax
jmp 0xaec7
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__refill_buffer(stbi__context*)
static void stbi__refill_buffer(stbi__context *s)
{
   int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
   if (n == 0) {
      // at end of file, treat same as if from memory, but need to handle case
      // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file
      s->read_from_callbacks = 0;
      s->img_buffer = s->buffer_start;
      s->img_buffer_end = s->buffer_start+1;
      *s->img_buffer = 0;
   } else {
      s->img_buffer = s->buffer_start;
      s->img_buffer_end = s->buffer_start + n;
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
leaq 0x38(%rbx), %r14
movl 0x34(%rbx), %edx
movq %r14, %rsi
callq *0x10(%rbx)
testl %eax, %eax
je 0xaef0
cltq
addq %r14, %rax
jmp 0xaefc
andl $0x0, 0x30(%rbx)
leaq 0x39(%rbx), %rax
movb $0x0, 0x38(%rbx)
movq %r14, 0xb8(%rbx)
movq %rax, 0xc0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__build_huffman(stbi__huffman*, int*)
static int stbi__build_huffman(stbi__huffman *h, int *count)
{
   int i,j,k=0;
   unsigned int code;
   // build size list for each symbol (from JPEG spec)
   for (i=0; i < 16; ++i)
      for (j=0; j < count[i]; ++j)
         h->size[k++] = (stbi_uc) (i+1);
   h->size[k] = 0;

   // compute actual symbols (from jpeg spec)
   code = 0;
   k = 0;
   for(j=1; j <= 16; ++j) {
      // compute delta to add to code to compute symbol id
      h->delta[j] = k - code;
      if (h->size[k] == j) {
         while (h->size[k] == j)
            h->code[k++] = (stbi__uint16) (code++);
         if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG");
      }
      // compute largest code + 1 for this size, preshifted as needed later
      h->maxcode[j] = code << (16-j);
      code <<= 1;
   }
   h->maxcode[j] = 0xffffffff;

   // build non-spec acceleration table; 255 is flag for not-accelerated
   memset(h->fast, 255, 1 << FAST_BITS);
   for (i=0; i < k; ++i) {
      int s = h->size[i];
      if (s <= FAST_BITS) {
         int c = h->code[i] << (FAST_BITS-s);
         int m = 1 << (FAST_BITS-s);
         for (j=0; j < m; ++j) {
            h->fast[c+j] = (stbi_uc) i;
         }
      }
   }
   return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movslq %edx, %rdi
cmpq $0x10, %rcx
je 0xaf73
leal 0x1(%rcx), %r8d
addq %rax, %rdi
xorl %r9d, %r9d
cmpl (%rsi,%rcx,4), %r9d
jge 0xaf6b
movb %r8b, (%rdi,%r9)
incq %r9
jmp 0xaf5c
addl %r9d, %edx
incq %rcx
jmp 0xaf49
movb $0x0, 0x500(%rbx,%rdi)
leaq 0x200(%rbx), %rdx
leaq 0x501(%rbx), %rsi
xorl %r14d, %r14d
pushq $0x1
popq %rax
xorl %edi, %edi
cmpq $0x11, %rax
je 0xb004
movl %r14d, %ecx
subl %edi, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %r14d, %rcx
movzbl 0x500(%rbx,%rcx), %r9d
cmpq %r9, %rax
jne 0xafeb
leaq (%rdx,%rcx,2), %r8
addq %rsi, %rcx
movzbl %r9b, %r9d
cmpq %r9, %rax
jne 0xafd9
movw %di, (%r8)
incl %edi
movb (%rcx), %r9b
incl %r14d
addq $0x2, %r8
incq %rcx
jmp 0xafbb
leal -0x1(%rdi), %r8d
movl %eax, %ecx
shrl %cl, %r8d
testl %r8d, %r8d
jne 0xb070
movb $0x10, %cl
subb %al, %cl
movl %edi, %r8d
shll %cl, %r8d
movl %r8d, 0x604(%rbx,%rax,4)
addl %edi, %edi
incq %rax
jmp 0xaf91
orl $-0x1, 0x648(%rbx)
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x20e0
xorl %edx, %edx
testl %r14d, %r14d
cmovlel %edx, %r14d
pushq $0x1
popq %rax
pushq $0x9
popq %rsi
cmpq %r14, %rdx
je 0xb080
movzbl 0x500(%rbx,%rdx), %r8d
cmpq $0x9, %r8
ja 0xb06b
movzwl 0x200(%rbx,%rdx,2), %edi
movq %rsi, %rcx
subq %r8, %rcx
shlq %cl, %rdi
addq %rbx, %rdi
xorl %r8d, %r8d
movl %r8d, %r9d
shrl %cl, %r9d
testl %r9d, %r9d
jne 0xb06b
movb %dl, (%rdi,%r8)
incq %r8
jmp 0xb057
incq %rdx
jmp 0xb02c
leaq 0x59f0(%rip), %rax      # 0x10a67
movq %rax, 0xa19a(%rip)      # 0x15218
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__skip(stbi__context*, int)
static void stbi__skip(stbi__context *s, int n)
{
   if (n < 0) {
      s->img_buffer = s->img_buffer_end;
      return;
   }
   if (s->io.read) {
      int blen = (int) (s->img_buffer_end - s->img_buffer);
      if (blen < n) {
         s->img_buffer = s->img_buffer_end;
         (s->io.skip)(s->io_user_data, n - blen);
         return;
      }
   }
   s->img_buffer += n;
}

// Assembly:
testl %esi, %esi
js 0xb0c1
cmpq $0x0, 0x10(%rdi)
je 0xb0ca
movq 0xb8(%rdi), %rcx
movq 0xc0(%rdi), %rdx
movl %edx, %r8d
subl %ecx, %r8d
movl %esi, %eax
subl %r8d, %eax
jle 0xb0d1
movq %rdx, 0xb8(%rdi)
movq 0x18(%rdi), %rcx
movq 0x28(%rdi), %rdi
movl %eax, %esi
jmpq *%rcx
movq 0xc0(%rdi), %rax
jmp 0xb0d6
movq 0xb8(%rdi), %rcx
movl %esi, %eax
addq %rcx, %rax
movq %rax, 0xb8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__mad4sizes_valid(int, int, int, int, int)
static int stbi__mul2sizes_valid(int a, int b)
{
   if (a < 0 || b < 0) return 0;
   if (b == 0) return 1; // mul-by-0 is always safe
   // portable way to check for no overflows in a*b
   return a <= INT_MAX/b;
}

// Assembly:
movl %esi, %eax
orl %edi, %eax
js 0xea75
movl %edx, %ecx
testl %esi, %esi
je 0xea3c
xorl %r8d, %r8d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %esi
cmpl %edi, %eax
jl 0xea78
imull %edi, %esi
movl %esi, %eax
orl %ecx, %eax
js 0xea75
testl %ecx, %ecx
je 0xea59
xorl %r8d, %r8d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
cmpl %esi, %eax
jl 0xea78
imull %ecx, %esi
movl $0x0, %r8d
testl %esi, %esi
js 0xea78
xorl %r8d, %r8d
cmpl $0x20000000, %esi       # imm = 0x20000000
setb %r8b
jmp 0xea78
xorl %r8d, %r8d
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__free_jpeg_components(stbi__jpeg*, int, int)
static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why)
{
   int i;
   for (i=0; i < ncomp; ++i) {
      if (z->img_comp[i].raw_data) {
         STBI_FREE(z->img_comp[i].raw_data);
         z->img_comp[i].raw_data = NULL;
         z->img_comp[i].data = NULL;
      }
      if (z->img_comp[i].raw_coeff) {
         STBI_FREE(z->img_comp[i].raw_coeff);
         z->img_comp[i].raw_coeff = 0;
         z->img_comp[i].coeff = 0;
      }
      if (z->img_comp[i].linebuf) {
         STBI_FREE(z->img_comp[i].linebuf);
         z->img_comp[i].linebuf = NULL;
      }
   }
   return why;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %esi
movq %rdi, %rbx
imulq $0x60, %rsi, %r15
addq $0x46f0, %rbx           # imm = 0x46F0
cmpq %r14, %r15
je 0xb1dd
movq -0x18(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0xb1a8
callq 0x21c0
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rbx,%r14)
movq -0x10(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0xb1c2
callq 0x21c0
andq $0x0, -0x10(%rbx,%r14)
andq $0x0, (%rbx,%r14)
movq -0x8(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0xb1d7
callq 0x21c0
andq $0x0, -0x8(%rbx,%r14)
addq $0x60, %r14
jmp 0xb18b
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__resample_row_v_2(unsigned char*, unsigned char*, unsigned char*, int, int)
static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
   // need to generate two samples vertically for every one in input
   int i;
   STBI_NOTUSED(hs);
   for (i=0; i < w; ++i)
      out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2);
   return out;
}

// Assembly:
movq %rdi, %rax
xorl %edi, %edi
testl %ecx, %ecx
cmovlel %edi, %ecx
cmpq %rdi, %rcx
je 0xb266
movzbl (%rsi,%rdi), %r8d
leal (%r8,%r8,2), %r8d
movzbl (%rdx,%rdi), %r9d
addl %r9d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, (%rax,%rdi)
incq %rdi
jmp 0xb23f
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int)
static stbi_uc*  stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
   // need to generate two samples horizontally for every one in input
   int i;
   stbi_uc *input = in_near;

   if (w == 1) {
      // if only one sample, can't do any interpolation
      out[0] = out[1] = input[0];
      return out;
   }

   out[0] = input[0];
   out[1] = stbi__div4(input[0]*3 + input[1] + 2);
   for (i=1; i < w-1; ++i) {
      int n = 3*input[i]+2;
      out[i*2+0] = stbi__div4(n+input[i-1]);
      out[i*2+1] = stbi__div4(n+input[i+1]);
   }
   out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2);
   out[i*2+1] = input[w-1];

   STBI_NOTUSED(in_far);
   STBI_NOTUSED(hs);

   return out;
}

// Assembly:
movq %rdi, %rax
movb (%rsi), %dl
cmpl $0x1, %ecx
jne 0xb277
movb %dl, 0x1(%rax)
movb %dl, (%rax)
retq
movzbl %dl, %edx
movb %dl, (%rax)
movzwl %dx, %edx
leal (%rdx,%rdx,2), %edx
movzbl 0x1(%rsi), %edi
addl %edi, %edx
addl $0x2, %edx
shrl $0x2, %edx
movb %dl, 0x1(%rax)
movslq %ecx, %rdi
leaq -0x1(%rdi), %rcx
pushq $0x1
popq %rdx
cmpq %rcx, %rdx
jge 0xb2d9
movzbl (%rsi,%rdx), %r8d
leal (%r8,%r8,2), %r8d
movzbl -0x1(%rsi,%rdx), %r9d
addl %r8d, %r9d
addl $0x2, %r9d
shrl $0x2, %r9d
movb %r9b, (%rax,%rdx,2)
movzbl 0x1(%rsi,%rdx), %r9d
addl %r9d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, 0x1(%rax,%rdx,2)
incq %rdx
jmp 0xb29b
movzbl -0x2(%rsi,%rdi), %edi
leal (%rdi,%rdi,2), %edi
movzbl (%rsi,%rcx), %r8d
addl %r8d, %edi
addl $0x2, %edi
shrl $0x2, %edi
movb %dil, (%rax,%rdx,2)
movb (%rsi,%rcx), %cl
movb %cl, 0x1(%rax,%rdx,2)
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__resample_row_generic(unsigned char*, unsigned char*, unsigned char*, int, int)
static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
   // resample with nearest-neighbor
   int i,j;
   STBI_NOTUSED(in_far);
   for (i=0; i < w; ++i)
      for (j=0; j < hs; ++j)
         out[i*hs+j] = in_near[i];
   return out;
}

// Assembly:
movq %rdi, %rax
xorl %edx, %edx
testl %r8d, %r8d
movl $0x0, %edi
cmovgl %r8d, %edi
movslq %r8d, %r8
testl %ecx, %ecx
cmovlel %edx, %ecx
movq %rax, %r9
cmpq %rcx, %rdx
je 0xb339
xorl %r10d, %r10d
cmpq %r10, %rdi
je 0xb331
movb (%rsi,%rdx), %r11b
movb %r11b, (%r9,%r10)
incq %r10
jmp 0xb31f
incq %rdx
addq %r8, %r9
jmp 0xb317
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__jpeg_reset(stbi__jpeg*)
static void stbi__jpeg_reset(stbi__jpeg *j)
{
   j->code_bits = 0;
   j->code_buffer = 0;
   j->nomore = 0;
   j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0;
   j->marker = STBI__MARKER_none;
   j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
   j->eob_run = 0;
   // no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
   // since we don't even allow 1<<30 pixels
}

// Assembly:
andq $0x0, 0x4820(%rdi)
andl $0x0, 0x482c(%rdi)
andl $0x0, 0x47d8(%rdi)
andl $0x0, 0x4778(%rdi)
andl $0x0, 0x4718(%rdi)
andl $0x0, 0x46b8(%rdi)
movb $-0x1, 0x4828(%rdi)
movl 0x4868(%rdi), %eax
testl %eax, %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmovnel %eax, %ecx
movl %ecx, 0x486c(%rdi)
andl $0x0, 0x4844(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__grow_buffer_unsafe(stbi__jpeg*)
static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
{
   do {
      unsigned int b = j->nomore ? 0 : stbi__get8(j->s);
      if (b == 0xff) {
         int c = stbi__get8(j->s);
         while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes
         if (c != 0) {
            j->marker = (unsigned char) c;
            j->nomore = 1;
            return;
         }
      }
      j->code_buffer |= b << (24 - j->code_bits);
      j->code_bits += 8;
   } while (j->code_bits <= 24);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x482c(%rbx)
je 0xb530
xorl %eax, %eax
jmp 0xb551
movq (%rbx), %rdi
callq 0xae91
cmpb $-0x1, %al
jne 0xb551
movq (%rbx), %rdi
callq 0xae91
cmpb $-0x1, %al
je 0xb53c
movzbl %al, %ecx
testl %ecx, %ecx
jne 0xb576
movb $-0x1, %al
movzbl %al, %eax
movl 0x4824(%rbx), %edx
movb $0x18, %cl
subb %dl, %cl
shll %cl, %eax
orl %eax, 0x4820(%rbx)
leal 0x8(%rdx), %eax
movl %eax, 0x4824(%rbx)
cmpl $0x11, %edx
jl 0xb523
jmp 0xb586
movb %al, 0x4828(%rbx)
movl $0x1, 0x482c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__jpeg_decode_block_prog_dc(stbi__jpeg*, short*, stbi__huffman*, int)
static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b)
{
   int diff,dc;
   int t;
   if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG");

   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);

   if (j->succ_high == 0) {
      // first scan for DC coefficient, must be first
      memset(data,0,64*sizeof(data[0])); // 0 all the ac values now
      t = stbi__jpeg_huff_decode(j, hdc);
      diff = t ? stbi__extend_receive(j, t) : 0;

      dc = j->img_comp[b].dc_pred + diff;
      j->img_comp[b].dc_pred = dc;
      data[0] = (short) (dc << j->succ_low);
   } else {
      // refinement scan for DC coefficient
      if (stbi__jpeg_get_bit(j))
         data[0] += (short) (1 << j->succ_low);
   }
   return 1;
}

// Assembly:
cmpl $0x0, 0x4838(%rdi)
je 0xb5a2
leaq 0x56be(%rip), %rax      # 0x10c56
movq %rax, 0x9c79(%rip)      # 0x15218
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0xf, 0x4824(%rdi)
jg 0xb5c5
movq %r14, %rdi
callq 0xb51f
cmpl $0x0, 0x483c(%r14)
je 0xb5ee
movq %r14, %rdi
callq 0xb80b
testl %eax, %eax
je 0xb650
movb 0x4840(%r14), %cl
pushq $0x1
popq %rax
movl %eax, %edx
shll %cl, %edx
addw %dx, (%rbx)
jmp 0xb653
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb65e
testl %eax, %eax
je 0xb62b
movq %r14, %rdi
movl %eax, %esi
callq 0xb785
jmp 0xb62d
xorl %eax, %eax
movslq %ebp, %rcx
imulq $0x60, %rcx, %rcx
addl 0x46b8(%r14,%rcx), %eax
movl %eax, 0x46b8(%r14,%rcx)
movb 0x4840(%r14), %cl
shll %cl, %eax
movw %ax, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__jpeg_huff_decode(stbi__jpeg*, stbi__huffman*)
stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h)
{
   unsigned int temp;
   int c,k;

   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);

   // look at the top FAST_BITS and determine what symbol ID it is,
   // if the code is <= FAST_BITS
   c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
   k = h->fast[c];
   if (k < 255) {
      int s = h->size[k];
      if (s > j->code_bits)
         return -1;
      j->code_buffer <<= s;
      j->code_bits -= s;
      return h->values[k];
   }

   // naive test is to shift the code_buffer down so k bits are
   // valid, then test against maxcode. To speed this up, we've
   // preshifted maxcode left so that it has (16-k) 0s at the
   // end; in other words, regardless of the number of bits, it
   // wants to be compared against something shifted to have 16;
   // that way we don't need to shift inside the loop.
   temp = j->code_buffer >> 16;
   for (k=FAST_BITS+1 ; ; ++k)
      if (temp < h->maxcode[k])
         break;
   if (k == 17) {
      // error! code not found
      j->code_bits -= 16;
      return -1;
   }

   if (k > j->code_bits)
      return -1;

   // convert the huffman code to the symbol id
   c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k];
   STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]);

   // convert the id to a symbol
   j->code_bits -= k;
   j->code_buffer <<= k;
   return h->values[c];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0xf, 0x4824(%rdi)
jg 0xb679
movq %rbx, %rdi
callq 0xb51f
movl 0x4820(%rbx), %edx
movl %edx, %eax
shrl $0x17, %eax
movzbl (%r14,%rax), %eax
cmpq $0xff, %rax
je 0xb6bd
movzbl 0x500(%r14,%rax), %ecx
movl 0x4824(%rbx), %esi
subl %ecx, %esi
jl 0xb6f3
shll %cl, %edx
movl %edx, 0x4820(%rbx)
movl %esi, 0x4824(%rbx)
movzbl 0x400(%r14,%rax), %eax
jmp 0xb6f6
movl %edx, %eax
shrl $0x10, %eax
xorl %edi, %edi
movq %rdi, %rcx
incq %rdi
cmpl 0x62c(%r14,%rcx,4), %eax
jae 0xb6c4
movl 0x4824(%rbx), %esi
cmpq $0x8, %rdi
jne 0xb6eb
addl $-0x10, %esi
movl %esi, 0x4824(%rbx)
jmp 0xb6f3
leaq 0x9(%rdi), %rax
cmpl %eax, %esi
jge 0xb6fe
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb $0x17, %cl
subb %dil, %cl
movl %edx, %r8d
shrl %cl, %r8d
leaq 0x4d00(%rip), %r9       # 0x10410
andl 0x24(%r9,%rdi,4), %r8d
addl 0x670(%r14,%rdi,4), %r8d
movslq %r8d, %r8
movzbl 0x500(%r14,%r8), %r10d
movl %r10d, %ecx
negb %cl
movl %edx, %r11d
shrl %cl, %r11d
andl (%r9,%r10,4), %r11d
movzwl 0x200(%r14,%r8,2), %ecx
cmpl %ecx, %r11d
jne 0xb766
subl %edi, %esi
movl %eax, %ecx
shll %cl, %edx
addl $-0x9, %esi
movl %esi, 0x4824(%rbx)
movl %edx, 0x4820(%rbx)
movzbl 0x400(%r14,%r8), %eax
jmp 0xb6f6
leaq 0x53f2(%rip), %rdi      # 0x10b5f
leaq 0x51f2(%rip), %rsi      # 0x10966
leaq 0x5436(%rip), %rcx      # 0x10bb1
movl $0x7a0, %edx            # imm = 0x7A0
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__extend_receive(stbi__jpeg*, int)
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
{
   unsigned int k;
   int sgn;
   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);

   sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB
   k = stbi_lrot(j->code_buffer, n);
   STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask)));
   j->code_buffer = k & ~stbi__bmask[n];
   k &= stbi__bmask[n];
   j->code_bits -= n;
   return k + (stbi__jbias[n] & ~sgn);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, 0x4824(%rdi)
jge 0xb79e
movq %r14, %rdi
callq 0xb51f
cmpl $0x11, %ebx
jae 0xb7ec
movl 0x4820(%r14), %esi
movl %esi, %edx
movl %ebx, %ecx
roll %cl, %edx
movl %ebx, %ecx
leaq 0x4c57(%rip), %rax      # 0x10410
movl (%rax,%rcx,4), %eax
movl %eax, %edi
notl %edi
andl %edx, %edi
movl %edi, 0x4820(%r14)
subl %ebx, 0x4824(%r14)
andl %eax, %edx
xorl %eax, %eax
testl %esi, %esi
js 0xb7e2
leaq 0x4c81(%rip), %rax      # 0x10460
movl (%rax,%rcx,4), %eax
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x53f8(%rip), %rdi      # 0x10beb
leaq 0x516c(%rip), %rsi      # 0x10966
leaq 0x5429(%rip), %rcx      # 0x10c2a
movl $0x7b5, %edx            # imm = 0x7B5
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__jpeg_get_bit(stbi__jpeg*)
stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
{
   unsigned int k;
   if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);
   k = j->code_buffer;
   j->code_buffer <<= 1;
   --j->code_bits;
   return k & 0x80000000;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4824(%rdi), %ecx
testl %ecx, %ecx
jg 0xb827
movq %rbx, %rdi
callq 0xb51f
movl 0x4824(%rbx), %ecx
movl 0x4820(%rbx), %eax
leal (%rax,%rax), %edx
movl %edx, 0x4820(%rbx)
decl %ecx
movl %ecx, 0x4824(%rbx)
andl $0x80000000, %eax       # imm = 0x80000000
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__jpeg_get_bits(stbi__jpeg*, int)
stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
{
   unsigned int k;
   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
   k = stbi_lrot(j->code_buffer, n);
   j->code_buffer = k & ~stbi__bmask[n];
   k &= stbi__bmask[n];
   j->code_bits -= n;
   return k;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x4824(%rdi), %edx
cmpl %esi, %edx
jge 0xb865
movq %rbx, %rdi
callq 0xb51f
movl 0x4824(%rbx), %edx
movl 0x4820(%rbx), %eax
movl %ebp, %ecx
roll %cl, %eax
movl %ebp, %ecx
leaq 0x4b98(%rip), %rsi      # 0x10410
movl (%rsi,%rcx,4), %ecx
movl %ecx, %esi
notl %esi
andl %eax, %esi
movl %esi, 0x4820(%rbx)
andl %ecx, %eax
subl %ebp, %edx
movl %edx, 0x4824(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__check_png_header(stbi__context*)
static int stbi__check_png_header(stbi__context *s)
{
   static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 };
   int i;
   for (i=0; i < 8; ++i)
      if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG");
   return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x1
popq %rbx
leaq 0x5c06(%rip), %r12      # 0x114b6
cmpq $0x8, %r15
je 0xb8db
movq %r14, %rdi
callq 0xae91
leaq 0x1(%r15), %rcx
cmpb (%r15,%r12), %al
movq %rcx, %r15
je 0xb8b0
leaq 0x539a(%rip), %rax      # 0x10c6c
movq %rax, 0x993f(%rip)      # 0x15218
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__getn(stbi__context*, unsigned char*, int)
static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)
{
   if (s->io.read) {
      int blen = (int) (s->img_buffer_end - s->img_buffer);
      if (blen < n) {
         int res, count;

         memcpy(buffer, s->img_buffer, blen);

         count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
         res = (count == (n-blen));
         s->img_buffer = s->img_buffer_end;
         return res;
      }
   }

   if (s->img_buffer+n <= s->img_buffer_end) {
      memcpy(buffer, s->img_buffer, n);
      s->img_buffer += n;
      return 1;
   } else
      return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0xcd99
movq 0xb8(%rbx), %rsi
movq 0xc0(%rbx), %rcx
movq %rcx, %rax
subq %rsi, %rax
movl %edx, %ebp
subl %eax, %ebp
jle 0xcda7
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x2130
movq 0x28(%rbx), %rdi
addq %r15, %r14
movq %r14, %rsi
movl %ebp, %edx
callq *0x10(%rbx)
movl %eax, %ecx
xorl %eax, %eax
cmpl %ebp, %ecx
sete %al
movq 0xc0(%rbx), %rcx
movq %rcx, 0xb8(%rbx)
jmp 0xcdca
movq 0xb8(%rbx), %rsi
movq 0xc0(%rbx), %rcx
movslq %edx, %r15
leaq (%rsi,%r15), %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
ja 0xcdca
movq %r14, %rdi
movq %r15, %rdx
callq 0x2130
addq %r15, 0xb8(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__paeth(int, int, int)
static int stbi__paeth(int a, int b, int c)
{
   int p = a + b - c;
   int pa = abs(p-a);
   int pb = abs(p-b);
   int pc = abs(p-c);
   if (pa <= pb && pa <= pc) return a;
   if (pb <= pc) return b;
   return c;
}

// Assembly:
movl %edi, %eax
leal (%rsi,%rax), %ecx
subl %edx, %ecx
movl %ecx, %edi
subl %eax, %edi
movl %edi, %r8d
negl %r8d
cmovsl %edi, %r8d
movl %ecx, %edi
subl %esi, %edi
movl %edi, %r9d
negl %r9d
cmovsl %edi, %r9d
subl %edx, %ecx
movl %ecx, %edi
negl %edi
cmovsl %ecx, %edi
cmpl %edi, %r9d
cmoval %edx, %esi
cmpl %edi, %r8d
cmoval %esi, %eax
cmpl %r9d, %r8d
cmoval %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__high_bit(unsigned int)
static int stbi__high_bit(unsigned int z)
{
   int n=0;
   if (z == 0) return -1;
   if (z >= 0x10000) { n += 16; z >>= 16; }
   if (z >= 0x00100) { n +=  8; z >>=  8; }
   if (z >= 0x00010) { n +=  4; z >>=  4; }
   if (z >= 0x00004) { n +=  2; z >>=  2; }
   if (z >= 0x00002) { n +=  1; z >>=  1; }
   return n;
}

// Assembly:
testl %edi, %edi
je 0xddab
movl %edi, %eax
shrl $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi          # imm = 0x10000
setae %cl
cmovbl %edi, %eax
shll $0x4, %ecx
leal 0x8(%rcx), %edx
movl %eax, %esi
shrl $0x8, %esi
cmpl $0x100, %eax            # imm = 0x100
cmovbl %eax, %esi
cmovbl %ecx, %edx
leal 0x4(%rdx), %ecx
movl %esi, %edi
shrl $0x4, %edi
cmpl $0x10, %esi
cmovbl %esi, %edi
cmovbl %edx, %ecx
leal 0x2(%rcx), %eax
movl %edi, %edx
shrl $0x2, %edx
cmpl $0x4, %edi
cmovbl %edi, %edx
cmovbl %ecx, %eax
cmpl $0x2, %edx
sbbl $-0x1, %eax
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__shiftsigned(unsigned int, int, int)
static int stbi__shiftsigned(unsigned int v, int shift, int bits)
{
   static unsigned int mul_table[9] = {
      0,
      0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/,
      0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/,
   };
   static unsigned int shift_table[9] = {
      0, 0,0,1,0,2,4,6,0,
   };
   if (shift < 0)
      v <<= -shift;
   else
      v >>= shift;
   STBI_ASSERT(v >= 0 && v < 256);
   v >>= (8-bits);
   STBI_ASSERT(bits >= 0 && bits <= 8);
   return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];
}

// Assembly:
pushq %rax
movl %esi, %ecx
negb %cl
movl %edi, %eax
shll %cl, %eax
movl %esi, %ecx
shrl %cl, %edi
testl %esi, %esi
cmovsl %eax, %edi
cmpl $0x100, %edi            # imm = 0x100
jae 0xde2e
cmpl $0x9, %edx
jge 0xde4d
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %edi
movl %edx, %eax
leaq 0x2726(%rip), %rcx      # 0x10540
imull (%rcx,%rax,4), %edi
leaq 0x274b(%rip), %rcx      # 0x10570
movb (%rcx,%rax,4), %cl
sarl %cl, %edi
movl %edi, %eax
popq %rcx
retq
leaq 0x31ff(%rip), %rdi      # 0x11034
leaq 0x2b2a(%rip), %rsi      # 0x10966
leaq 0x3203(%rip), %rcx      # 0x11046
movl $0x13f9, %edx           # imm = 0x13F9
callq 0x20f0
leaq 0x3220(%rip), %rdi      # 0x11074
leaq 0x2b0b(%rip), %rsi      # 0x10966
leaq 0x31e4(%rip), %rcx      # 0x11046
movl $0x13fb, %edx           # imm = 0x13FB
callq 0x20f0
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__gif_header(stbi__context*, stbi__gif*, int*, int)
static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info)
{
   stbi_uc version;
   if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')
      return stbi__err("not GIF", "Corrupt GIF");

   version = stbi__get8(s);
   if (version != '7' && version != '9')    return stbi__err("not GIF", "Corrupt GIF");
   if (stbi__get8(s) != 'a')                return stbi__err("not GIF", "Corrupt GIF");

   stbi__g_failure_reason = "";
   g->w = stbi__get16le(s);
   g->h = stbi__get16le(s);
   g->flags = stbi__get8(s);
   g->bgindex = stbi__get8(s);
   g->ratio = stbi__get8(s);
   g->transparent = -1;

   if (comp != 0) *comp = 4;  // can't actually tell whether it's 3 or 4 until we parse the comments

   if (is_info) return 1;

   if (g->flags & 0x80)
      stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);

   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0xae91
cmpb $0x47, %al
jne 0xe5a9
movq %r14, %rdi
callq 0xae91
cmpb $0x49, %al
jne 0xe5a9
movq %r14, %rdi
callq 0xae91
cmpb $0x46, %al
jne 0xe5a9
movq %r14, %rdi
callq 0xae91
cmpb $0x38, %al
jne 0xe5a9
movq %r14, %rdi
callq 0xae91
cmpb $0x37, %al
je 0xe511
movzbl %al, %eax
cmpl $0x39, %eax
jne 0xe5a9
movq %r14, %rdi
callq 0xae91
cmpb $0x61, %al
jne 0xe5a9
leaq 0x2f33(%rip), %rax      # 0x1145b
movq %rax, 0x6ce9(%rip)      # 0x15218
movq %r14, %rdi
callq 0xda97
movl %eax, (%rbx)
movq %r14, %rdi
callq 0xda97
movl %eax, 0x4(%rbx)
movq %r14, %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, 0x20(%rbx)
movq %r14, %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, 0x24(%rbx)
movq %r14, %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, 0x28(%rbx)
orl $-0x1, 0x2c(%rbx)
testq %r15, %r15
je 0xe57e
movl $0x4, (%r15)
pushq $0x1
popq %r15
testl %ebp, %ebp
jne 0xe5ba
movl 0x20(%rbx), %ecx
testb %cl, %cl
jns 0xe5ba
addq $0x34, %rbx
andb $0x7, %cl
pushq $0x2
popq %rdx
shll %cl, %edx
pushq $-0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe5c8
jmp 0xe5ba
leaq 0x2b11(%rip), %rax      # 0x110c1
movq %rax, 0x6c61(%rip)      # 0x15218
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__gif_parse_colortable(stbi__context*, unsigned char (*) [4], int, int)
static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp)
{
   int i;
   for (i=0; i < num_entries; ++i) {
      pal[i][2] = stbi__get8(s);
      pal[i][1] = stbi__get8(s);
      pal[i][0] = stbi__get8(s);
      pal[i][3] = transp == i ? 0 : 255;
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %ecx, %r12d
xorl %r13d, %r13d
testl %edx, %edx
cmovlel %r13d, %ebx
cmpq %r13, %rbx
je 0xe622
movq %r15, %rdi
callq 0xae91
movb %al, 0x2(%r14,%r13,4)
movq %r15, %rdi
callq 0xae91
movb %al, 0x1(%r14,%r13,4)
movq %r15, %rdi
callq 0xae91
movb %al, (%r14,%r13,4)
cmpq %r13, %r12
setne %al
negb %al
movb %al, 0x3(%r14,%r13,4)
incq %r13
jmp 0xe5e5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__out_gif_code(stbi__gif*, unsigned short)
static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
{
   stbi_uc *p, *c;
   int idx; 

   // recurse to decode the prefixes, since the linked-list is backwards,
   // and working backwards through an interleaved image would be nasty
   if (g->codes[code].prefix >= 0)
      stbi__out_gif_code(g, g->codes[code].prefix);

   if (g->cur_y >= g->max_y) return;

   idx = g->cur_x + g->cur_y; 
   p = &g->out[idx];
   g->history[idx / 4] = 1;  

   c = &g->color_table[g->codes[code].suffix * 4];
   if (c[3] > 128) { // don't render transparent pixels; 
      p[0] = c[2];
      p[1] = c[1];
      p[2] = c[0];
      p[3] = c[3];
   }
   g->cur_x += 4;

   if (g->cur_x >= g->max_x) {
      g->cur_x = g->start_x;
      g->cur_y += g->step;

      while (g->cur_y >= g->max_y && g->parse > 0) {
         g->step = (1 << g->parse) * g->line_size;
         g->cur_y = g->start_y + (g->step >> 1);
         --g->parse;
      }
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x834(%rdi,%r14,4), %eax
testw %ax, %ax
js 0xe64f
movzwl %ax, %esi
movq %rbx, %rdi
callq 0xe62c
movslq 0x8860(%rbx), %rax
cmpl 0x8858(%rbx), %eax
jge 0xe6d2
movslq 0x885c(%rbx), %rcx
addq %rax, %rcx
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
pushq $0x4
popq %r8
movl %ecx, %eax
cltd
idivl %r8d
cltq
movb $0x1, (%rdi,%rax)
movq 0x8838(%rbx), %rax
movzbl 0x837(%rbx,%r14,4), %edx
cmpb $-0x7f, 0x3(%rax,%rdx,4)
jb 0xe6bb
movb 0x2(%rax,%rdx,4), %dil
movb %dil, (%rsi,%rcx)
movb 0x1(%rax,%rdx,4), %dil
movb %dil, 0x1(%rsi,%rcx)
movb (%rax,%rdx,4), %dil
movb %dil, 0x2(%rsi,%rcx)
movb 0x3(%rax,%rdx,4), %al
movb %al, 0x3(%rsi,%rcx)
movl 0x885c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x885c(%rbx)
cmpl 0x8854(%rbx), %eax
jge 0xe6da
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x884c(%rbx), %ecx
movl 0x8858(%rbx), %eax
movl %ecx, 0x885c(%rbx)
movl 0x8860(%rbx), %edx
addl 0x8844(%rbx), %edx
movl %edx, 0x8860(%rbx)
cmpl %eax, %edx
jl 0xe6d2
movl 0x8840(%rbx), %ecx
testl %ecx, %ecx
jle 0xe6d2
movl 0x8864(%rbx), %edx
shll %cl, %edx
movl %edx, 0x8844(%rbx)
sarl %edx
addl 0x8850(%rbx), %edx
movl %edx, 0x8860(%rbx)
decl %ecx
movl %ecx, 0x8840(%rbx)
jmp 0xe6fe
// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__pic_is4(stbi__context*, char const*)
static int stbi__pic_is4(stbi__context *s,const char *str)
{
   int i;
   for (i=0; i<4; ++i)
      if (stbi__get8(s) != (stbi_uc)str[i])
         return 0;

   return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
pushq $0x1
popq %rbx
cmpq $0x4, %r12
je 0xe764
movq %r15, %rdi
callq 0xae91
leaq 0x1(%r12), %rcx
cmpb (%r14,%r12), %al
movq %rcx, %r12
je 0xe746
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq