LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
movq -0x8(%rbp), %rsi
addq $0x38, %rsi
movq -0x8(%rbp), %rcx
movl 0x34(%rcx), %edx
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2cf5b
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rcx
addq $0x38, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rcx
addq $0x38, %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movb $0x0, (%rax)
jmp 0x2cf88
movq -0x8(%rbp), %rcx
addq $0x38, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rcx
addq $0x38, %rcx
movslq -0xc(%rbp), %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__build_fast_ac(short*, stbi__huffman*)
static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h)
{
   int i;
   for (i=0; i < (1 << FAST_BITS); ++i) {
      stbi_uc fast = h->fast[i];
      fast_ac[i] = 0;
      if (fast < 255) {
         int rs = h->values[fast];
         int run = (rs >> 4) & 15;
         int magbits = rs & 15;
         int len = h->size[fast];

         if (magbits && len + magbits <= FAST_BITS) {
            // magnitude code followed by receive_extend code
            int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
            int m = 1 << (magbits - 1);
            if (k < m) k += (-1 << magbits) + 1;
            // if the result is small enough, we can fit it in fast_ac table
            if (k >= -128 && k <= 127)
               fast_ac[i] = (stbi__int16) ((k << 8) + (run << 4) + (len + magbits));
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x200, -0x14(%rbp)     # imm = 0x200
jge 0x2d335
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movzbl -0x15(%rbp), %eax
cmpl $0xff, %eax
jge 0x2d325
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movzbl 0x400(%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
sarl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movzbl 0x500(%rax,%rcx), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x2d323
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
cmpl $0x9, %eax
jg 0x2d323
movl -0x14(%rbp), %eax
movl -0x28(%rbp), %ecx
shll %cl, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl $0x9, %ecx
subl -0x24(%rbp), %ecx
sarl %cl, %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x2d2f0
movl -0x24(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
addl $0x1, %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $-0x80, -0x2c(%rbp)
jl 0x2d321
cmpl $0x7f, -0x2c(%rbp)
jg 0x2d321
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movl -0x20(%rbp), %ecx
shll $0x4, %ecx
addl %ecx, %eax
movl -0x28(%rbp), %ecx
addl -0x24(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
jmp 0x2d323
jmp 0x2d325
jmp 0x2d327
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2d223
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x2d36d
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
jmp 0x2d3e9
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2d3ce
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xb8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2d3cc
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
movl -0xc(%rbp), %esi
subl -0x10(%rbp), %esi
callq *%rax
jmp 0x2d3e9
jmp 0x2d3ce
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0xb8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2deb5
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x38(%rax)
je 0x2ddda
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
callq 0x54c0
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x40(%rax)
je 0x2de4e
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x40(%rax), %rdi
callq 0x54c0
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x48(%rax)
je 0x2dea5
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rdi
callq 0x54c0
movq -0x8(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x48(%rax)
jmp 0x2dea7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2dd53
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2df41
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzbl (%rax,%rcx), %eax
imull $0x3, %eax, %eax
movq -0x18(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
addl $0x2, %eax
sarl $0x2, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2defe
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2e13c
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2e12f
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
imull -0x20(%rbp), %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2e0fd
jmp 0x2e131
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2e0ee
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// 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 = 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x4724(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4720(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x472c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4678(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4618(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x45b8(%rax)
movq -0x8(%rbp), %rax
movb $-0x1, 0x4728(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x475c(%rax)
je 0x2f253
movq -0x8(%rbp), %rax
movl 0x475c(%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0x2f25d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0xc(%rbp)
jmp 0x2f25d
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4760(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4744(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x472c(%rax)
je 0x2f520
xorl %eax, %eax
movl %eax, -0x14(%rbp)
jmp 0x2f532
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2ce50
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0xff, -0xc(%rbp)
jne 0x2f57a
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2ce50
movzbl %al, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x2f578
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x4728(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x472c(%rax)
jmp 0x2f5c4
jmp 0x2f57a
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rdx
movl $0x18, %ecx
subl 0x4724(%rdx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
orl 0x4720(%rax), %ecx
movl %ecx, 0x4720(%rax)
movq -0x8(%rbp), %rax
movl 0x4724(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x4724(%rax)
movq -0x8(%rbp), %rax
cmpl $0x18, 0x4724(%rax)
jle 0x2f50c
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4738(%rax)
je 0x2f608
leaq 0x18b76(%rip), %rdi     # 0x48171
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x2f6fe
movq -0x10(%rbp), %rax
cmpl $0x10, 0x4724(%rax)
jge 0x2f61e
movq -0x10(%rbp), %rdi
callq 0x2f500
movq -0x10(%rbp), %rax
cmpl $0x0, 0x473c(%rax)
jne 0x2f6c7
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x5230
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2fc10
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x2f666
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x2fe40
movl %eax, -0x34(%rbp)
jmp 0x2f66d
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x2f66d
movl -0x34(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0x24(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
addq $0x45a0, %rax           # imm = 0x45A0
movslq -0x24(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x4740(%rcx), %ecx
shll %cl, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
jmp 0x2f6f7
movq -0x10(%rbp), %rdi
callq 0x2ff50
cmpl $0x0, %eax
je 0x2f6f5
movq -0x10(%rbp), %rax
movl 0x4740(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movswl %ax, %edx
movq -0x18(%rbp), %rax
movswl (%rax), %ecx
addl %edx, %ecx
movw %cx, (%rax)
jmp 0x2f6f7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x4724(%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x2fe67
movq -0x8(%rbp), %rdi
callq 0x2f500
movq -0x8(%rbp), %rax
movl 0x4720(%rax), %eax
sarl $0x1f, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x4720(%rax), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x4720(%rcx), %edx
movl $0x20, %ecx
subl -0xc(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0x15(%rbp)
jl 0x2feb6
cmpl $0x11, -0xc(%rbp)
setl %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x2febf
jmp 0x2fec1
jmp 0x2fee0
leaq 0x1823e(%rip), %rdi     # 0x48106
leaq 0x181e6(%rip), %rsi     # 0x480b5
movl $0x686, %edx            # imm = 0x686
leaq 0x1826a(%rip), %rcx     # 0x48145
callq 0x52c0
movl -0x10(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x2c5b2(%rip), %rax     # 0x5c4a0
movl (%rax,%rdx,4), %eax
xorl $-0x1, %eax
andl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4720(%rax)
movslq -0xc(%rbp), %rcx
leaq 0x2c595(%rip), %rax     # 0x5c4a0
movl (%rax,%rcx,4), %eax
andl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x4724(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4724(%rax)
movl -0x10(%rbp), %eax
movslq -0xc(%rbp), %rdx
leaq 0x17ef9(%rip), %rcx     # 0x47e30
movl (%rcx,%rdx,4), %ecx
movl -0x14(%rbp), %edx
xorl $-0x1, %edx
andl %edx, %ecx
addl %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x4724(%rax)
jge 0x2ff72
movq -0x8(%rbp), %rdi
callq 0x2f500
movq -0x8(%rbp), %rax
movl 0x4720(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x4720(%rax), %ecx
shll %ecx
movl %ecx, 0x4720(%rax)
movq -0x8(%rbp), %rax
movl 0x4724(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4724(%rax)
movl -0xc(%rbp), %eax
andl $0x80000000, %eax       # imm = 0x80000000
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x4724(%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x2ffe7
movq -0x8(%rbp), %rdi
callq 0x2f500
movq -0x8(%rbp), %rax
movl 0x4720(%rax), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x4720(%rcx), %edx
movl $0x20, %ecx
subl -0xc(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x2c481(%rip), %rax     # 0x5c4a0
movl (%rax,%rdx,4), %eax
xorl $-0x1, %eax
andl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4720(%rax)
movslq -0xc(%rbp), %rcx
leaq 0x2c464(%rip), %rax     # 0x5c4a0
movl (%rax,%rcx,4), %eax
andl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x4724(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4724(%rax)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jge 0x30116
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
movslq -0x14(%rbp), %rdx
leaq 0x2c3f4(%rip), %rcx     # 0x5c4e4
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x30109
leaq 0x18088(%rip), %rdi     # 0x48187
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x3011d
jmp 0x3010b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x300d3
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__do_png(stbi__png*, int*, int*, int*, int)
static unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp)
{
   unsigned char *result=NULL;
   if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
   if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) {
      result = p->out;
      p->out = NULL;
      if (req_comp && req_comp != p->s->img_out_n) {
         result = stbi__convert_format(result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
         p->s->img_out_n = req_comp;
         if (result == NULL) return result;
      }
      *x = p->s->img_x;
      *y = p->s->img_y;
      if (n) *n = p->s->img_out_n;
   }
   STBI_FREE(p->out);      p->out      = NULL;
   STBI_FREE(p->expanded); p->expanded = NULL;
   STBI_FREE(p->idata);    p->idata    = NULL;

   return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x30160
cmpl $0x4, -0x2c(%rbp)
jle 0x30180
leaq 0x17e87(%rip), %rdi     # 0x47fee
callq 0x275b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x302a0
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %edx
xorl %esi, %esi
callq 0x302b0
cmpl $0x0, %eax
je 0x3024d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpl $0x0, -0x2c(%rbp)
je 0x30215
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0xc(%rcx), %eax
je 0x30215
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %esi
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %r8d
callq 0x30f30
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0xc(%rax)
cmpq $0x0, -0x38(%rbp)
jne 0x30213
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x302a0
jmp 0x30215
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x3024b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
jmp 0x3024d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x54c0
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x54c0
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x54c0
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3160a
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xb8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x31608
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rsi
movslq -0x20(%rbp), %rdx
callq 0x5370
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rcx
addq %rcx, %rsi
movl -0x1c(%rbp), %edx
subl -0x20(%rbp), %edx
callq *%rax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl -0x20(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3166c
jmp 0x3160a
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
ja 0x31665
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x5370
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0xb8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3166c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__compute_transparency(stbi__png*, unsigned char*, int)
static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n)
{
   stbi__context *s = z->s;
   stbi__uint32 i, pixel_count = s->img_x * s->img_y;
   stbi_uc *p = z->out;

   // compute color-based transparency, assuming we've
   // already got 255 as the alpha value in the output
   STBI_ASSERT(out_n == 2 || out_n == 4);

   if (out_n == 2) {
      for (i=0; i < pixel_count; ++i) {
         p[1] = (p[0] == tc[0] ? 0 : 255);
         p += 2;
      }
   } else {
      for (i=0; i < pixel_count; ++i) {
         if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
            p[3] = 0;
         p += 4;
      }
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
imull 0x4(%rcx), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movb $0x1, %al
cmpl $0x2, -0x14(%rbp)
movb %al, -0x31(%rbp)
je 0x31a80
cmpl $0x4, -0x14(%rbp)
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x31a89
jmp 0x31a8b
jmp 0x31aaa
leaq 0x168db(%rip), %rdi     # 0x4836d
leaq 0x1661c(%rip), %rsi     # 0x480b5
movl $0x1070, %edx           # imm = 0x1070
leaq 0x168e1(%rip), %rcx     # 0x48386
callq 0x52c0
cmpl $0x2, -0x14(%rbp)
jne 0x31afb
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x31af9
movq -0x30(%rbp), %rax
movzbl (%rax), %edx
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
movl $0xff, %eax
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x31ab7
jmp 0x31b65
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x31b63
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x31b4c
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jne 0x31b4c
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jne 0x31b4c
movq -0x30(%rbp), %rax
movb $0x0, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x31b02
jmp 0x31b65
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x332a1
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jg 0x332a1
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x332b7
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jg 0x332b1
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x332b7
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__bmp_test_raw(stbi__context*)
static int stbi__bmp_test_raw(stbi__context *s)
{
   int r;
   int sz;
   if (stbi__get8(s) != 'B') return 0;
   if (stbi__get8(s) != 'M') return 0;
   stbi__get32le(s); // discard filesize
   stbi__get16le(s); // discard reserved
   stbi__get16le(s); // discard reserved
   stbi__get32le(s); // discard data offset
   sz = stbi__get32le(s);
   r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);
   return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x42, %eax
je 0x33319
movl $0x0, -0x4(%rbp)
jmp 0x333aa
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x4d, %eax
je 0x33333
movl $0x0, -0x4(%rbp)
jmp 0x333aa
movq -0x10(%rbp), %rdi
callq 0x333c0
movq -0x10(%rbp), %rdi
callq 0x28370
movq -0x10(%rbp), %rdi
callq 0x28370
movq -0x10(%rbp), %rdi
callq 0x333c0
movq -0x10(%rbp), %rdi
callq 0x333c0
movl %eax, -0x18(%rbp)
movb $0x1, %al
cmpl $0xc, -0x18(%rbp)
movb %al, -0x19(%rbp)
je 0x33399
movb $0x1, %al
cmpl $0x28, -0x18(%rbp)
movb %al, -0x19(%rbp)
je 0x33399
movb $0x1, %al
cmpl $0x38, -0x18(%rbp)
movb %al, -0x19(%rbp)
je 0x33399
movb $0x1, %al
cmpl $0x6c, -0x18(%rbp)
movb %al, -0x19(%rbp)
je 0x33399
cmpl $0x7c, -0x18(%rbp)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x33880
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x33903
cmpl $0x10000, -0x8(%rbp)    # imm = 0x10000
jb 0x3389b
movl -0xc(%rbp), %eax
addl $0x10, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0x10, %eax
movl %eax, -0x8(%rbp)
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jb 0x338b6
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x8(%rbp)
cmpl $0x10, -0x8(%rbp)
jb 0x338ce
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0x4, %eax
movl %eax, -0x8(%rbp)
cmpl $0x4, -0x8(%rbp)
jb 0x338e6
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x8(%rbp)
cmpl $0x2, -0x8(%rbp)
jb 0x338fd
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__bitcount(unsigned int)
static int stbi__bitcount(unsigned int a)
{
   a = (a & 0x55555555) + ((a >>  1) & 0x55555555); // max 2
   a = (a & 0x33333333) + ((a >>  2) & 0x33333333); // max 4
   a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
   a = (a + (a >> 8)); // max 16 per 8 bits
   a = (a + (a >> 16)); // max 32 per 8 bits
   return a & 0xff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x55555555, %eax       # imm = 0x55555555
movl -0x4(%rbp), %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x33333333, %eax       # imm = 0x33333333
movl -0x4(%rbp), %ecx
shrl $0x2, %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl -0x4(%rbp), %ecx
shrl $0x4, %ecx
addl %ecx, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl -0x4(%rbp), %ecx
shrl $0x8, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x339b9
xorl %ecx, %ecx
subl -0x8(%rbp), %ecx
movl -0x4(%rbp), %eax
shll %cl, %eax
movl %eax, -0x4(%rbp)
jmp 0x339c4
movl -0x8(%rbp), %ecx
movl -0x4(%rbp), %eax
sarl %cl, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jge 0x339ef
movl -0x4(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl %cl, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x339d0
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__gif_test_raw(stbi__context*)
static int stbi__gif_test_raw(stbi__context *s)
{
   int sz;
   if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0;
   sz = stbi__get8(s);
   if (sz != '9' && sz != '7') return 0;
   if (stbi__get8(s) != 'a') return 0;
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x47, %eax
jne 0x33a50
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x49, %eax
jne 0x33a50
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x46, %eax
jne 0x33a50
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x38, %eax
je 0x33a59
movl $0x0, -0x4(%rbp)
jmp 0x33a9e
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
movl %eax, -0x14(%rbp)
cmpl $0x39, -0x14(%rbp)
je 0x33a7d
cmpl $0x37, -0x14(%rbp)
je 0x33a7d
movl $0x0, -0x4(%rbp)
jmp 0x33a9e
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x61, %eax
je 0x33a97
movl $0x0, -0x4(%rbp)
jmp 0x33a9e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x47, %eax
jne 0x3414b
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x49, %eax
jne 0x3414b
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x46, %eax
jne 0x3414b
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x38, %eax
je 0x3415f
leaq 0x1439d(%rip), %rdi     # 0x484ef
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x3428a
movq -0x10(%rbp), %rdi
callq 0x2ce50
movb %al, -0x25(%rbp)
movzbl -0x25(%rbp), %eax
cmpl $0x37, %eax
je 0x34191
movzbl -0x25(%rbp), %eax
cmpl $0x39, %eax
je 0x34191
leaq 0x1436b(%rip), %rdi     # 0x484ef
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x3428a
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
cmpl $0x61, %eax
je 0x341b6
leaq 0x14346(%rip), %rdi     # 0x484ef
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x3428a
leaq 0x12f45(%rip), %rax     # 0x47102
movq %rax, 0x28abc(%rip)     # 0x5cc80
movq -0x10(%rbp), %rdi
callq 0x28370
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x28370
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x24(%rax) # imm = 0xFFFFFFFF
cmpq $0x0, -0x20(%rbp)
je 0x3423c
movq -0x20(%rbp), %rax
movl $0x4, (%rax)
cmpl $0x0, -0x24(%rbp)
je 0x3424b
movl $0x1, -0x4(%rbp)
jmp 0x3428a
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x34283
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x30, %rsi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x7, %ecx
movl $0x2, %edx
shll %cl, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x34360
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rax
movq -0x8(%rbp), %rcx
movslq 0x1c(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x34352
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3433f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x20(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movb 0x2(%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x28(%rbp), %rax
movb (%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x3(%rax)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x342e4
jmp 0x34341
movq -0x8(%rbp), %rax
movl (%rax), %eax
shll $0x2, %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x342d6
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x343f4
movq -0x8(%rbp), %rdi
callq 0x2ce50
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, 0x2(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x2ce50
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
callq 0x2ce50
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx,4)
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %esi
movl $0xff, %eax
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, 0x3(%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3437d
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__pic_test_core(stbi__context*)
static int stbi__pic_test_core(stbi__context *s)
{
   int i;

   if (!stbi__pic_is4(s,"\x53\x80\xF6\x34"))
      return 0;

   for(i=0;i<84;++i)
      stbi__get8(s);

   if (!stbi__pic_is4(s,"PICT"))
      return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x13c17(%rip), %rsi     # 0x4858e
callq 0x349e0
cmpl $0x0, %eax
jne 0x3498a
movl $0x0, -0x4(%rbp)
jmp 0x349d0
movl $0x0, -0x14(%rbp)
cmpl $0x54, -0x14(%rbp)
jge 0x349ab
movq -0x10(%rbp), %rdi
callq 0x2ce50
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x34991
movq -0x10(%rbp), %rdi
leaq 0x13bdd(%rip), %rsi     # 0x48593
callq 0x349e0
cmpl $0x0, %eax
jne 0x349c9
movl $0x0, -0x4(%rbp)
jmp 0x349d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0x34a2f
movq -0x10(%rbp), %rdi
callq 0x2ce50
movzbl %al, %eax
movq -0x18(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x34a22
movl $0x0, -0x4(%rbp)
jmp 0x34a36
jmp 0x34a24
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x349f7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x80, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0x35048
movl -0x14(%rbp), %eax
andl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x35033
movq -0x10(%rbp), %rdi
callq 0x2c540
cmpl $0x0, %eax
je 0x3501d
leaq 0x13591(%rip), %rdi     # 0x48598
callq 0x275b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x35050
movq -0x10(%rbp), %rdi
callq 0x2ce50
movb %al, %dl
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x35035
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
sarl %eax
movl %eax, -0x24(%rbp)
jmp 0x34fe1
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x80, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x4, -0x20(%rbp)
jge 0x350b9
movl -0x4(%rbp), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
je 0x350a4
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x350a6
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
sarl %eax
movl %eax, -0x1c(%rbp)
jmp 0x3507d
popq %rbp
retq
nopl (%rax,%rax)