LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__YCbCr_to_RGB_row(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int)
static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)
{
   int i;
   for (i=0; i < count; ++i) {
      int y_fixed = (y[i] << 20) + (1<<19); // rounding
      int r,g,b;
      int cr = pcr[i] - 128;
      int cb = pcb[i] - 128;
      r = y_fixed +  cr* float2fixed(1.40200f);
      g = y_fixed + (cr*-float2fixed(0.71414f)) + ((cb*-float2fixed(0.34414f)) & 0xffff0000);
      b = y_fixed                               +   cb* float2fixed(1.77200f);
      r >>= 20;
      g >>= 20;
      b >>= 20;
      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
      out[0] = (stbi_uc)r;
      out[1] = (stbi_uc)g;
      out[2] = (stbi_uc)b;
      out[3] = 255;
      out += step;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %r9d, %rax
xorl %r9d, %r9d
testl %r8d, %r8d
cmovlel %r9d, %r8d
addq $0x3, %rdi
movl $0xff, %ebp
cmpq %r9, %r8
je 0x17606
movzbl (%rsi,%r9), %ebx
shll $0x14, %ebx
movzbl (%rcx,%r9), %r14d
addl $-0x80, %r14d
imull $0x166f00, %r14d, %r10d # imm = 0x166F00
leal (%r10,%rbx), %r11d
addl $0x80000, %r11d         # imm = 0x80000
sarl $0x14, %r11d
xorl %r10d, %r10d
testl %r11d, %r11d
cmovlel %r10d, %r11d
cmpl %ebp, %r11d
jl 0x17585
movl $0xff, %r11d
movzbl (%rdx,%r9), %r15d
addl $-0x80, %r15d
imull $0xfff49300, %r14d, %r14d # imm = 0xFFF49300
leal (%r14,%rbx), %r12d
addl $0x80000, %r12d         # imm = 0x80000
imull $0xfffa7e00, %r15d, %r14d # imm = 0xFFFA7E00
andl $0xffff0000, %r14d      # imm = 0xFFFF0000
addl %r12d, %r14d
sarl $0x14, %r14d
testl %r14d, %r14d
jg 0x175bd
xorl %r14d, %r14d
cmpl %ebp, %r14d
jl 0x175c8
movl $0xff, %r14d
imull $0x1c5a00, %r15d, %r15d # imm = 0x1C5A00
addl %r15d, %ebx
addl $0x80000, %ebx          # imm = 0x80000
sarl $0x14, %ebx
testl %ebx, %ebx
cmovgl %ebx, %r10d
cmpl %ebp, %r10d
jl 0x175ec
movl $0xff, %r10d
movb %r11b, -0x3(%rdi)
movb %r14b, -0x2(%rdi)
movb %r10b, -0x1(%rdi)
movb $-0x1, (%rdi)
incq %r9
addq %rax, %rdi
jmp 0x17540
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__resample_row_hv_2(unsigned char*, unsigned char*, unsigned char*, int, int)
static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
   // need to generate 2x2 samples for every one in input
   int i,t0,t1;
   if (w == 1) {
      out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);
      return out;
   }

   t1 = 3*in_near[0] + in_far[0];
   out[0] = stbi__div4(t1+2);
   for (i=1; i < w; ++i) {
      t0 = t1;
      t1 = 3*in_near[i]+in_far[i];
      out[i*2-1] = stbi__div16(3*t0 + t1 + 8);
      out[i*2  ] = stbi__div16(3*t1 + t0 + 8);
   }
   out[w*2-1] = stbi__div4(t1+2);

   STBI_NOTUSED(hs);

   return out;
}

// Assembly:
movq %rdi, %rax
movzbl (%rsi), %r8d
movzbl (%rdx), %edi
cmpl $0x1, %ecx
jne 0x17636
movzwl %r8w, %ecx
leal (%rcx,%rcx,2), %ecx
movzwl %di, %edx
addl %edx, %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
movb %cl, 0x1(%rax)
movb %cl, (%rax)
retq
movzwl %r8w, %r8d
leal (%r8,%r8,2), %r8d
movzwl %di, %r9d
leal (%r8,%r9), %edi
addl %r9d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, (%rax)
movslq %ecx, %rcx
pushq $0x1
popq %r8
cmpq %rcx, %r8
jge 0x1769e
movzbl (%rsi,%r8), %r9d
leal (%r9,%r9,2), %r9d
movzbl (%rdx,%r8), %r10d
addl %r9d, %r10d
leal (%rdi,%rdi,2), %r9d
addl %r10d, %r9d
addl $0x8, %r9d
shrl $0x4, %r9d
movb %r9b, -0x1(%rax,%r8,2)
leal (%r10,%r10,2), %r9d
addl %r9d, %edi
addl $0x8, %edi
shrl $0x4, %edi
movb %dil, (%rax,%r8,2)
incq %r8
movl %r10d, %edi
jmp 0x1765b
addl $0x2, %edi
shrl $0x2, %edi
movb %dil, -0x1(%rax,%rcx,2)
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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);
   return x;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x4728(%rdi), %al
cmpb $-0x1, %al
je 0x176c1
movb $-0x1, 0x4728(%rbx)
jmp 0x176e0
movq (%rbx), %rdi
callq 0x17a36
movl %eax, %ecx
movb $-0x1, %al
cmpb $-0x1, %cl
jne 0x176e0
jmp 0x176dc
movq (%rbx), %rdi
callq 0x17a36
cmpb $-0x1, %al
je 0x176d4
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17a18
movq 0x28(%rbx), %rdi
callq *0x20(%rbx)
testl %eax, %eax
je 0x17a2d
cmpl $0x0, 0x30(%rbx)
je 0x17a31
movq 0xb8(%rbx), %rcx
xorl %eax, %eax
cmpq 0xc0(%rbx), %rcx
setae %al
jmp 0x17a34
xorl %eax, %eax
jmp 0x17a34
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17a5f
cmpl $0x0, 0x30(%rbx)
je 0x17a6e
movq %rbx, %rdi
callq 0x17a72
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb (%rax), %al
popq %rbx
retq
xorl %eax, %eax
jmp 0x17a6c
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17a95
cltq
addq %r14, %rax
jmp 0x17aa1
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_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__build_huffman(stbi__huffman*, int*)
static int stbi__build_huffman(stbi__huffman *h, int *count)
{
   int i,j,k=0,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 >= (1 << 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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movslq %edx, %rdi
cmpq $0x10, %rcx
je 0x17b18
leal 0x1(%rcx), %r8d
addq %rax, %rdi
xorl %r9d, %r9d
cmpl (%rsi,%rcx,4), %r9d
jge 0x17b10
movb %r8b, (%rdi,%r9)
incq %r9
jmp 0x17b01
addl %r9d, %edx
incq %rcx
jmp 0x17aee
movb $0x0, 0x500(%rbx,%rdi)
xorl %r14d, %r14d
pushq $0x1
popq %rax
pushq $0x1
popq %rbp
xorl %edx, %edx
cmpq $0x11, %rax
je 0x17b90
movl %r14d, %ecx
subl %edx, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %r14d, %rcx
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x17b7a
movzbl %sil, %esi
cmpq %rsi, %rax
jne 0x17b70
movw %dx, 0x200(%rbx,%rcx,2)
incl %edx
movb 0x501(%rbx,%rcx), %sil
incq %rcx
incl %r14d
jmp 0x17b4d
movl %ebp, %esi
movl %eax, %ecx
shll %cl, %esi
cmpl %esi, %edx
jg 0x17bf6
movb $0x10, %cl
subb %al, %cl
movl %edx, %esi
shll %cl, %esi
movl %esi, 0x604(%rbx,%rax,4)
addl %edx, %edx
incq %rax
jmp 0x17b2b
orl $-0x1, 0x648(%rbx)
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x41d0
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
pushq $0x9
popq %rdx
cmpq %r14, %rax
je 0x17c06
movzbl 0x500(%rbx,%rax), %edi
cmpq $0x9, %rdi
ja 0x17bf1
movzwl 0x200(%rbx,%rax,2), %esi
movq %rdx, %rcx
subq %rdi, %rcx
shlq %cl, %rsi
addq %rbx, %rsi
xorl %edi, %edi
movl %edi, %r8d
shrl %cl, %r8d
testl %r8d, %r8d
jne 0x17bf1
movb %al, (%rsi,%rdi)
incq %rdi
jmp 0x17bde
incq %rax
jmp 0x17bb5
leaq 0xa549(%rip), %rax      # 0x22146
movq %rax, 0x177cc(%rip)     # 0x2f3d0
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17c46
cmpq $0x0, 0x10(%rdi)
je 0x17c4f
movq 0xb8(%rdi), %rcx
movq 0xc0(%rdi), %rdx
movl %edx, %r8d
subl %ecx, %r8d
movl %esi, %eax
subl %r8d, %eax
jle 0x17c56
movq %rdx, 0xb8(%rdi)
movq 0x18(%rdi), %rcx
movq 0x28(%rdi), %rdi
movl %eax, %esi
jmpq *%rcx
movq 0xc0(%rdi), %rax
jmp 0x17c5b
movq 0xb8(%rdi), %rcx
movl %esi, %eax
addq %rcx, %rax
movq %rax, 0xb8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__cleanup_jpeg(stbi__jpeg*)
static void stbi__cleanup_jpeg(stbi__jpeg *j)
{
   int i;
   for (i=0; i < j->s->img_n; ++i) {
      if (j->img_comp[i].raw_data) {
         STBI_FREE(j->img_comp[i].raw_data);
         j->img_comp[i].raw_data = NULL;
         j->img_comp[i].data = NULL;
      }
      if (j->img_comp[i].raw_coeff) {
         STBI_FREE(j->img_comp[i].raw_coeff);
         j->img_comp[i].raw_coeff = 0;
         j->img_comp[i].coeff = 0;
      }
      if (j->img_comp[i].linebuf) {
         STBI_FREE(j->img_comp[i].linebuf);
         j->img_comp[i].linebuf = NULL;
      }
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x45f0(%rdi), %r14
xorl %r15d, %r15d
movq (%rbx), %rax
movslq 0x8(%rax), %rax
cmpq %rax, %r15
jge 0x17cca
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x17c97
callq 0x43a0
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r14)
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0x17cae
callq 0x43a0
andq $0x0, -0x10(%r14)
andq $0x0, (%r14)
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x17cc1
callq 0x43a0
andq $0x0, -0x8(%r14)
incq %r15
addq $0x60, %r14
jmp 0x17c75
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17d05
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 0x17cde
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17d16
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 0x17d78
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 0x17d3a
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_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17dd8
xorl %r10d, %r10d
cmpq %r10, %rdi
je 0x17dd0
movb (%rsi,%rdx), %r11b
movb %r11b, (%r9,%r10)
incq %r10
jmp 0x17dbe
incq %rdx
addq %r8, %r9
jmp 0x17db6
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__grow_buffer_unsafe(stbi__jpeg*)
static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
{
   do {
      int b = j->nomore ? 0 : stbi__get8(j->s);
      if (b == 0xff) {
         int c = stbi__get8(j->s);
         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
xorl %edx, %edx
cmpl $0x0, 0x472c(%rbx)
jne 0x17fa0
movq (%rbx), %rdi
callq 0x17a36
cmpb $-0x1, %al
je 0x17f8f
movzbl %al, %edx
jmp 0x17fa0
movq (%rbx), %rdi
callq 0x17a36
movl $0xff, %edx
testb %al, %al
jne 0x17fc2
movl 0x4724(%rbx), %eax
movb $0x18, %cl
subb %al, %cl
shll %cl, %edx
orl %edx, 0x4720(%rbx)
leal 0x8(%rax), %ecx
movl %ecx, 0x4724(%rbx)
cmpl $0x11, %eax
jl 0x17f73
popq %rbx
retq
movb %al, 0x4728(%rbx)
movl $0x1, 0x472c(%rbx)
jmp 0x17fc0
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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, 0x4738(%rdi)
je 0x17fee
leaq 0xa371(%rip), %rax      # 0x22355
movq %rax, 0x173e5(%rip)     # 0x2f3d0
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, 0x4724(%rdi)
jg 0x18011
movq %r14, %rdi
callq 0x17f6f
cmpl $0x0, 0x473c(%r14)
je 0x1803a
movq %r14, %rdi
callq 0x18257
testl %eax, %eax
je 0x1809c
movb 0x4740(%r14), %cl
pushq $0x1
popq %rax
movl %eax, %edx
shll %cl, %edx
addw %dx, (%rbx)
jmp 0x1809f
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 0x180aa
testl %eax, %eax
je 0x18077
movq %r14, %rdi
movl %eax, %esi
callq 0x181d1
jmp 0x18079
xorl %eax, %eax
movslq %ebp, %rcx
imulq $0x60, %rcx, %rcx
addl 0x45b8(%r14,%rcx), %eax
movl %eax, 0x45b8(%r14,%rcx)
movb 0x4740(%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_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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, 0x4724(%rdi)
jg 0x180c5
movq %rbx, %rdi
callq 0x17f6f
movl 0x4720(%rbx), %edx
movl %edx, %eax
shrl $0x17, %eax
movzbl (%r14,%rax), %eax
cmpq $0xff, %rax
je 0x18109
movzbl 0x500(%r14,%rax), %ecx
movl 0x4724(%rbx), %esi
subl %ecx, %esi
jl 0x1813f
shll %cl, %edx
movl %edx, 0x4720(%rbx)
movl %esi, 0x4724(%rbx)
movzbl 0x400(%r14,%rax), %eax
jmp 0x18142
movl %edx, %eax
shrl $0x10, %eax
xorl %edi, %edi
movq %rdi, %rcx
incq %rdi
cmpl 0x62c(%r14,%rcx,4), %eax
jae 0x18110
movl 0x4724(%rbx), %esi
cmpq $0x8, %rdi
jne 0x18137
addl $-0x10, %esi
movl %esi, 0x4724(%rbx)
jmp 0x1813f
leaq 0x9(%rdi), %rax
cmpl %eax, %esi
jge 0x1814a
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 0x9c24(%rip), %r9       # 0x21d80
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 0x181b2
subl %edi, %esi
movl %eax, %ecx
shll %cl, %edx
addl $-0x9, %esi
movl %esi, 0x4724(%rbx)
movl %edx, 0x4720(%rbx)
movzbl 0x400(%r14,%r8), %eax
jmp 0x18142
leaq 0xa08e(%rip), %rdi      # 0x22247
leaq 0xa0d9(%rip), %rsi      # 0x22299
leaq 0xa0e9(%rip), %rcx      # 0x222b0
movl $0x671, %edx            # imm = 0x671
callq 0x4210
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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, 0x4724(%rdi)
jge 0x181ea
movq %r14, %rdi
callq 0x17f6f
cmpl $0x11, %ebx
jae 0x18238
movl 0x4720(%r14), %esi
movl %esi, %edx
movl %ebx, %ecx
roll %cl, %edx
movl %ebx, %ecx
leaq 0x9b7b(%rip), %rax      # 0x21d80
movl (%rax,%rcx,4), %eax
movl %eax, %edi
notl %edi
andl %edx, %edi
movl %edi, 0x4720(%r14)
subl %ebx, 0x4724(%r14)
andl %eax, %edx
xorl %eax, %eax
testl %esi, %esi
js 0x1822e
leaq 0x9ba5(%rip), %rax      # 0x21dd0
movl (%rax,%rcx,4), %eax
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xa0ab(%rip), %rdi      # 0x222ea
leaq 0xa053(%rip), %rsi      # 0x22299
leaq 0xa0dc(%rip), %rcx      # 0x22329
movl $0x686, %edx            # imm = 0x686
callq 0x4210
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x4724(%rdi), %ecx
testl %ecx, %ecx
jg 0x18273
movq %rbx, %rdi
callq 0x17f6f
movl 0x4724(%rbx), %ecx
movl 0x4720(%rbx), %eax
leal (%rax,%rax), %edx
movl %edx, 0x4720(%rbx)
decl %ecx
movl %ecx, 0x4724(%rbx)
andl $0x80000000, %eax       # imm = 0x80000000
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x4724(%rdi), %edx
cmpl %esi, %edx
jge 0x182b1
movq %rbx, %rdi
callq 0x17f6f
movl 0x4724(%rbx), %edx
movl 0x4720(%rbx), %eax
movl %ebp, %ecx
roll %cl, %eax
movl %ebp, %ecx
leaq 0x9abc(%rip), %rsi      # 0x21d80
movl (%rsi,%rcx,4), %ecx
movl %ecx, %esi
notl %esi
andl %eax, %esi
movl %esi, 0x4720(%rbx)
andl %ecx, %eax
subl %ebp, %edx
movl %edx, 0x4724(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__check_png_header(stbi__context*)
static int stbi__check_png_header(stbi__context *s)
{
   static 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 0xa6de(%rip), %r12      # 0x229da
cmpq $0x8, %r15
je 0x18327
movq %r14, %rdi
callq 0x17a36
leaq 0x1(%r15), %rcx
cmpb (%r15,%r12), %al
movq %rcx, %r15
je 0x182fc
leaq 0xa04d(%rip), %rax      # 0x2236b
movq %rax, 0x170ab(%rip)     # 0x2f3d0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x192b0
movq 0xb8(%rbx), %rsi
movq 0xc0(%rbx), %rcx
movq %rcx, %rax
subq %rsi, %rax
movl %edx, %ebp
subl %eax, %ebp
jle 0x192be
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x42a0
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 0x192e1
movq 0xb8(%rbx), %rsi
movq 0xc0(%rbx), %rcx
movslq %edx, %r15
leaq (%rsi,%r15), %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
ja 0x192e1
movq %r14, %rdi
movq %r15, %rdx
callq 0x42a0
addq %r15, 0xb8(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x1a1da
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_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__shiftsigned(int, int, int)
static int stbi__shiftsigned(int v, int shift, int bits)
{
   int result;
   int z=0;

   if (shift < 0) v <<= -shift;
   else v >>= shift;
   result = v;

   z = bits;
   while (z < 8) {
      result += v >> z;
      z += bits;
   }
   return result;
}

// Assembly:
movl %esi, %ecx
negb %cl
movl %edi, %eax
shll %cl, %eax
movl %esi, %ecx
sarl %cl, %edi
testl %esi, %esi
cmovsl %eax, %edi
movl %edi, %eax
movl %edx, %ecx
cmpl $0x7, %ecx
jg 0x1a23f
movl %edi, %esi
sarl %cl, %esi
addl %esi, %eax
addl %edx, %ecx
jmp 0x1a230
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x17a36
cmpb $0x47, %al
jne 0x1a33f
movq %r14, %rdi
callq 0x17a36
cmpb $0x49, %al
jne 0x1a33f
movq %r14, %rdi
callq 0x17a36
cmpb $0x46, %al
jne 0x1a33f
movq %r14, %rdi
callq 0x17a36
cmpb $0x38, %al
jne 0x1a33f
movq %r14, %rdi
callq 0x17a36
cmpb $0x37, %al
je 0x1a2a7
movzbl %al, %eax
cmpl $0x39, %eax
jne 0x1a33f
movq %r14, %rdi
callq 0x17a36
cmpb $0x61, %al
jne 0x1a33f
leaq 0x6dfd(%rip), %rax      # 0x210bb
movq %rax, 0x1510b(%rip)     # 0x2f3d0
movq %r14, %rdi
callq 0x13054
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x13054
movl %eax, 0x4(%rbx)
movq %r14, %rdi
callq 0x17a36
movzbl %al, %eax
movl %eax, 0x18(%rbx)
movq %r14, %rdi
callq 0x17a36
movzbl %al, %eax
movl %eax, 0x1c(%rbx)
movq %r14, %rdi
callq 0x17a36
movzbl %al, %eax
movl %eax, 0x20(%rbx)
orl $-0x1, 0x24(%rbx)
testq %r15, %r15
je 0x1a314
movl $0x4, (%r15)
pushq $0x1
popq %r15
testl %ebp, %ebp
jne 0x1a350
movl 0x18(%rbx), %ecx
testb %cl, %cl
jns 0x1a350
addq $0x30, %rbx
andb $0x7, %cl
pushq $0x2
popq %rdx
shll %cl, %edx
pushq $-0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a3b5
jmp 0x1a350
leaq 0x838d(%rip), %rax      # 0x226d3
movq %rax, 0x15083(%rip)     # 0x2f3d0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__fill_gif_background(stbi__gif*, int, int, int, int)
static void stbi__fill_gif_background(stbi__gif *g, int x0, int y0, int x1, int y1)
{
   int x, y;
   stbi_uc *c = g->pal[g->bgindex];
   for (y = y0; y < y1; y += 4 * g->w) {
      for (x = x0; x < x1; x += 4) {
         stbi_uc *p  = &g->out[y + x];
         p[0] = c[2];
         p[1] = c[1];
         p[2] = c[0];
         p[3] = 0;
      }
   }
}

// Assembly:
pushq %rbx
movslq 0x1c(%rdi), %rax
movslq %esi, %rsi
movslq %ecx, %rcx
cmpl %r8d, %edx
jge 0x1a3b3
movslq %edx, %r9
addq $0x3, %r9
movq %rsi, %r10
cmpq %rcx, %r10
jge 0x1a3aa
movq 0x8(%rdi), %r11
addq %r9, %r11
movb 0x32(%rdi,%rax,4), %bl
movb %bl, -0x3(%r10,%r11)
movb 0x31(%rdi,%rax,4), %bl
movb %bl, -0x2(%r10,%r11)
movb 0x30(%rdi,%rax,4), %bl
movb %bl, -0x1(%r10,%r11)
movb $0x0, (%r10,%r11)
addq $0x4, %r10
jmp 0x1a378
movl (%rdi), %r9d
leal (%rdx,%r9,4), %edx
jmp 0x1a369
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x1a40f
movq %r15, %rdi
callq 0x17a36
movb %al, 0x2(%r14,%r13,4)
movq %r15, %rdi
callq 0x17a36
movb %al, 0x1(%r14,%r13,4)
movq %r15, %rdi
callq 0x17a36
movb %al, (%r14,%r13,4)
cmpq %r13, %r12
setne %al
negb %al
movb %al, 0x3(%r14,%r13,4)
incq %r13
jmp 0x1a3d2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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;

   // 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;

   p = &g->out[g->cur_x + g->cur_y];
   c = &g->color_table[g->codes[code].suffix * 4];

   if (c[3] >= 128) {
      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 0x830(%rdi,%r14,4), %eax
testw %ax, %ax
js 0x1a43c
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x1a419
movslq 0x4858(%rbx), %rcx
cmpl 0x4850(%rbx), %ecx
jge 0x1a4a5
movq 0x4830(%rbx), %rax
movzbl 0x833(%rbx,%r14,4), %edx
cmpb $0x0, 0x3(%rax,%rdx,4)
jns 0x1a48e
movq 0x8(%rbx), %rsi
movslq 0x4854(%rbx), %rdi
addq %rcx, %rdi
movb 0x2(%rax,%rdx,4), %cl
movb %cl, (%rsi,%rdi)
movb 0x1(%rax,%rdx,4), %cl
movb %cl, 0x1(%rsi,%rdi)
movb (%rax,%rdx,4), %cl
movb %cl, 0x2(%rsi,%rdi)
movb 0x3(%rax,%rdx,4), %al
movb %al, 0x3(%rsi,%rdi)
movl 0x4854(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x4854(%rbx)
cmpl 0x484c(%rbx), %eax
jge 0x1a4ad
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x4844(%rbx), %ecx
movl 0x4850(%rbx), %eax
movl %ecx, 0x4854(%rbx)
movl 0x4858(%rbx), %edx
addl 0x483c(%rbx), %edx
movl %edx, 0x4858(%rbx)
cmpl %eax, %edx
jl 0x1a4a5
movl 0x4838(%rbx), %ecx
testl %ecx, %ecx
jle 0x1a4a5
movl 0x485c(%rbx), %edx
shll %cl, %edx
movl %edx, 0x483c(%rbx)
sarl %edx
addl 0x4848(%rbx), %edx
movl %edx, 0x4858(%rbx)
decl %ecx
movl %ecx, 0x4838(%rbx)
jmp 0x1a4d1
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 0x1a537
movq %r15, %rdi
callq 0x17a36
leaq 0x1(%r12), %rcx
cmpb (%r14,%r12), %al
movq %rcx, %r12
je 0x1a519
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__readval(stbi__context*, int, unsigned char*)
static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)
{
   int mask=0x80, i;

   for (i=0; i<4; ++i, mask>>=1) {
      if (channel & mask) {
         if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short");
         dest[i]=stbi__get8(s);
      }
   }

   return dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x80, %r15d
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x1a599
testl %ebp, %r15d
je 0x1a581
movq %r14, %rdi
callq 0x179fc
testl %eax, %eax
jne 0x1a589
movq %r14, %rdi
callq 0x17a36
movb %al, (%rbx,%r12)
incq %r12
shrl %r15d
jmp 0x1a55e
leaq 0x81ec(%rip), %rax      # 0x2277c
movq %rax, 0x14e39(%rip)     # 0x2f3d0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__copyval(int, unsigned char*, unsigned char const*)
static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src)
{
   int mask=0x80,i;

   for (i=0;i<4; ++i, mask>>=1)
      if (channel&mask)
         dest[i]=src[i];
}

// Assembly:
movl $0x80, %eax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x1a5c5
testl %edi, %eax
je 0x1a5be
movb (%rdx,%rcx), %r8b
movb %r8b, (%rsi,%rcx)
incq %rcx
shrl %eax
jmp 0x1a5ac
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__pnm_info(stbi__context*, int*, int*, int*)
static int      stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
{
   int maxv;
   char c, p, t;

   stbi__rewind( s );

   // Get identifier
   p = (char) stbi__get8(s);
   t = (char) stbi__get8(s);
   if (p != 'P' || (t != '5' && t != '6')) {
       stbi__rewind( s );
       return 0;
   }

   *comp = (t == '6') ? 3 : 1;  // '5' is 1-component .pgm; '6' is 3-component .ppm

   c = (char) stbi__get8(s);
   stbi__pnm_skip_whitespace(s, &c);

   *x = stbi__pnm_getinteger(s, &c); // read width
   stbi__pnm_skip_whitespace(s, &c);

   *y = stbi__pnm_getinteger(s, &c); // read height
   stbi__pnm_skip_whitespace(s, &c);

   maxv = stbi__pnm_getinteger(s, &c);  // read max value

   if (maxv > 255)
      return stbi__err("max value > 255", "PPM image not 8-bit");
   else
      return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movups 0xc8(%rdi), %xmm0
movups %xmm0, 0xb8(%rdi)
callq 0x17a36
movl %eax, %ebp
movq %rbx, %rdi
callq 0x17a36
cmpb $0x50, %bpl
sete %cl
leal -0x37(%rax), %edx
cmpb $-0x2, %dl
setae %dl
testb %dl, %cl
jne 0x1a622
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
jmp 0x1a6a2
xorl %ecx, %ecx
cmpb $0x36, %al
sete %cl
leal 0x1(,%rcx,2), %eax
movl %eax, (%r12)
movq %rbx, %rdi
callq 0x17a36
leaq 0xf(%rsp), %r12
movb %al, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a6b6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a72e
movl %eax, (%r15)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a6b6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a72e
movl %eax, (%r14)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a6b6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a72e
cmpl $0x100, %eax            # imm = 0x100
jl 0x1a6a6
leaq 0x80f5(%rip), %rax      # 0x22790
movq %rax, 0x14d2e(%rip)     # 0x2f3d0
xorl %eax, %eax
jmp 0x1a6a9
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__pnm_skip_whitespace(stbi__context*, char*)
static void     stbi__pnm_skip_whitespace(stbi__context *s, char *c)
{
   for (;;) {
      while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
         *c = (char) stbi__get8(s);

      if (stbi__at_eof(s) || *c != '#')
         break;

      while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' )
         *c = (char) stbi__get8(s);
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x100003e00, %r15      # imm = 0x100003E00
movq %r14, %rdi
callq 0x179fc
testl %eax, %eax
je 0x1a70d
movq %r14, %rdi
callq 0x179fc
testl %eax, %eax
jne 0x1a728
cmpb $0x23, (%rbx)
jne 0x1a728
movq %r14, %rdi
callq 0x179fc
testl %eax, %eax
jne 0x1a6cb
movzbl (%rbx), %eax
cmpl $0xa, %eax
je 0x1a6cb
cmpl $0xd, %eax
je 0x1a6cb
movq %r14, %rdi
callq 0x17a36
movb %al, (%rbx)
jmp 0x1a6e8
movzbl (%rbx), %eax
cmpq $0x20, %rax
ja 0x1a6d7
btq %rax, %r15
jae 0x1a6d7
movq %r14, %rdi
callq 0x17a36
movb %al, (%rbx)
jmp 0x1a6cb
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__pnm_getinteger(stbi__context*, char*)
static int      stbi__pnm_getinteger(stbi__context *s, char *c)
{
   int value = 0;

   while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) {
      value = value*10 + (*c - '0');
      *c = (char) stbi__get8(s);
   }

   return value;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x179fc
testl %eax, %eax
jne 0x1a766
movzbl (%rbx), %eax
leal -0x3a(%rax), %ecx
cmpb $-0xa, %cl
jb 0x1a766
imull $0xa, %ebp, %ecx
leal (%rcx,%rax), %ebp
addl $-0x30, %ebp
movq %r14, %rdi
callq 0x17a36
movb %al, (%rbx)
jmp 0x1a73a
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__hdr_gettoken(stbi__context*, char*)
static char *stbi__hdr_gettoken(stbi__context *z, char *buffer)
{
   int len=0;
   char c = '\0';

   c = (char) stbi__get8(z);

   while (!stbi__at_eof(z) && c != '\n') {
      buffer[len++] = c;
      if (len == STBI__HDR_BUFLEN-1) {
         // flush to end of line
         while (!stbi__at_eof(z) && stbi__get8(z) != '\n')
            ;
         break;
      }
      c = (char) stbi__get8(z);
   }

   buffer[len] = 0;
   return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x17a36
movl %eax, %ebp
movq %r14, %rdi
callq 0x179fc
cmpb $0xa, %bpl
je 0x1a7c7
testl %eax, %eax
jne 0x1a7c7
movb %bpl, (%rbx,%r15)
incq %r15
cmpq $0x3ff, %r15            # imm = 0x3FF
jne 0x1a77d
movl $0x3ff, %r15d           # imm = 0x3FF
movq %r14, %rdi
callq 0x179fc
testl %eax, %eax
jne 0x1a7c7
movq %r14, %rdi
callq 0x17a36
cmpb $0xa, %al
jne 0x1a7af
movb $0x0, (%rbx,%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__hdr_convert(float*, unsigned char*, int)
static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp)
{
   if ( input[3] != 0 ) {
      float f1;
      // Exponent
      f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8));
      if (req_comp <= 2)
         output[0] = (input[0] + input[1] + input[2]) * f1 / 3;
      else {
         output[0] = input[0] * f1;
         output[1] = input[1] * f1;
         output[2] = input[2] * f1;
      }
      if (req_comp == 2) output[1] = 1;
      if (req_comp == 4) output[3] = 1;
   } else {
      switch (req_comp) {
         case 4: output[3] = 1; /* fallthrough */
         case 3: output[0] = output[1] = output[2] = 0;
                 break;
         case 2: output[1] = 1; /* fallthrough */
         case 1: output[0] = 0;
                 break;
      }
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rdi, %rbx
movzbl 0x3(%rsi), %edi
testl %edi, %edi
je 0x1a831
movq %rsi, %r15
addl $0xffffff78, %edi       # imm = 0xFFFFFF78
movss 0x7436(%rip), %xmm0     # 0x21c34
callq 0x4440
movzbl (%r15), %eax
cmpl $0x2, %r14d
jg 0x1a856
movzbl 0x1(%r15), %ecx
addl %eax, %ecx
movzbl 0x2(%r15), %eax
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
divss 0x7411(%rip), %xmm0     # 0x21c3c
movss %xmm0, (%rbx)
jmp 0x1a886
decl %r14d
cmpl $0x3, %r14d
ja 0x1a8b3
leaq 0x74db(%rip), %rax      # 0x21d1c
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x3f800000, 0x4(%rbx)  # imm = 0x3F800000
andl $0x0, (%rbx)
jmp 0x1a8b3
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rbx)
movzbl 0x1(%r15), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x4(%rbx)
movzbl 0x2(%r15), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x8(%rbx)
cmpl $0x4, %r14d
je 0x1a89b
cmpl $0x2, %r14d
jne 0x1a8b3
movl $0x3f800000, 0x4(%rbx)  # imm = 0x3F800000
jmp 0x1a8b3
movl $0x3f800000, 0xc(%rbx)  # imm = 0x3F800000
jmp 0x1a8b3
movl $0x3f800000, 0xc(%rbx)  # imm = 0x3F800000
andl $0x0, 0x8(%rbx)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__tga_get_comp(int, int, int*)
static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16)
{
   // only RGB or RGBA (incl. 16bit) or grey allowed
   if(is_rgb16) *is_rgb16 = 0;
   switch(bits_per_pixel) {
      case 8:  return STBI_grey;
      case 16: if(is_grey) return STBI_grey_alpha;
            // else: fall-through
      case 15: if(is_rgb16) *is_rgb16 = 1;
            return STBI_rgb;
      case 24: // fall-through
      case 32: return bits_per_pixel/8;
      default: return 0;
   }
}

// Assembly:
testq %rdx, %rdx
je 0x1a8c1
andl $0x0, (%rdx)
cmpl $0x8, %edi
je 0x1a90f
pushq $0x3
popq %rax
cmpl $0xf, %edi
je 0x1a900
cmpl $0x20, %edi
je 0x1a8fa
cmpl $0x18, %edi
je 0x1a8fa
cmpl $0x10, %edi
jne 0x1a90c
testq %rdx, %rdx
sete %dil
xorl %ecx, %ecx
testl %esi, %esi
setne %sil
orb %sil, %dil
je 0x1a905
movb %sil, %cl
xorl $0x3, %ecx
movl %ecx, %eax
retq
shrl $0x3, %edi
movl %edi, %eax
retq
testq %rdx, %rdx
je 0x1a90e
movl $0x1, (%rdx)
retq
xorl %eax, %eax
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__zreceive(stbi__zbuf*, int)
stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n)
{
   unsigned int k;
   if (z->num_bits < n) stbi__fill_bits(z);
   k = z->code_buffer & ((1 << n) - 1);
   z->code_buffer >>= n;
   z->num_bits -= n;
   return k;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x10(%rdi), %edx
cmpl %esi, %edx
jge 0x1a92d
movq %rbx, %rdi
callq 0x1ab34
movl 0x10(%rbx), %edx
pushq $-0x1
popq %rax
movl %ebp, %ecx
shll %cl, %eax
movl 0x14(%rbx), %esi
notl %eax
andl %esi, %eax
shrl %cl, %esi
movl %esi, 0x14(%rbx)
subl %ebp, %edx
movl %edx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__fill_bits(stbi__zbuf*)
static void stbi__fill_bits(stbi__zbuf *z)
{
   do {
      STBI_ASSERT(z->code_buffer < (1U << z->num_bits));
      z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits;
      z->num_bits += 8;
   } while (z->num_bits <= 24);
}

// Assembly:
pushq %rax
movl 0x10(%rdi), %ecx
movl 0x14(%rdi), %eax
movl %eax, %edx
shrl %cl, %edx
testl %edx, %edx
jne 0x1ab6e
movq (%rdi), %rsi
xorl %edx, %edx
cmpq 0x8(%rdi), %rsi
jae 0x1ab58
leaq 0x1(%rsi), %rdx
movq %rdx, (%rdi)
movzbl (%rsi), %edx
shll %cl, %edx
orl %edx, %eax
movl %eax, 0x14(%rdi)
leal 0x8(%rcx), %edx
movl %edx, 0x10(%rdi)
cmpl $0x11, %ecx
movl %edx, %ecx
jl 0x1ab3b
popq %rax
retq
leaq 0x7d27(%rip), %rdi      # 0x2289c
leaq 0x771d(%rip), %rsi      # 0x22299
leaq 0x7d3e(%rip), %rcx      # 0x228c1
movl $0xdee, %edx            # imm = 0xDEE
callq 0x4210