LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x22cbd
movq %rsi, %r15
addl $0xffffff78, %edi       # imm = 0xFFFFFF78
movss 0x8f4a(%rip), %xmm0     # 0x2bbd4
callq 0x4410
movzbl (%r15), %eax
cmpl $0x2, %r14d
jg 0x22ce9
movzbl 0x1(%r15), %ecx
addl %eax, %ecx
movzbl 0x2(%r15), %eax
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
divss 0x8f25(%rip), %xmm0     # 0x2bbdc
movss %xmm0, (%rbx)
jmp 0x22d1f
decl %r14d
cmpl $0x3, %r14d
ja 0x22d52
leaq 0x9147(%rip), %rax      # 0x2be18
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x3f800000, 0x4(%rbx)  # imm = 0x3F800000
movl $0x0, (%rbx)
jmp 0x22d52
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rbx)
movzbl 0x1(%r15), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x4(%rbx)
movzbl 0x2(%r15), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x8(%rbx)
cmpl $0x4, %r14d
je 0x22d34
cmpl $0x2, %r14d
jne 0x22d52
movl $0x3f800000, 0x4(%rbx)  # imm = 0x3F800000
jmp 0x22d52
movl $0x3f800000, 0xc(%rbx)  # imm = 0x3F800000
jmp 0x22d52
movl $0x3f800000, 0xc(%rbx)  # imm = 0x3F800000
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x232c3
movq (%rdi), %rsi
xorl %edx, %edx
cmpq 0x8(%rdi), %rsi
jae 0x232ad
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 0x23290
popq %rax
retq
leaq 0x96d2(%rip), %rdi      # 0x2c99c
leaq 0x90c8(%rip), %rsi      # 0x2c399
leaq 0x96e9(%rip), %rcx      # 0x2c9c1
movl $0xdee, %edx            # imm = 0xDEE
callq 0x41f0
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__zexpand(stbi__zbuf*, char*, int)
static int stbi__zexpand(stbi__zbuf *z, char *zout, int n)  // need to make room for n bytes
{
   char *q;
   int cur, limit, old_limit;
   z->zout = zout;
   if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG");
   cur   = (int) (z->zout     - z->zout_start);
   limit = old_limit = (int) (z->zout_end - z->zout_start);
   while (cur + n > limit)
      limit *= 2;
   q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit);
   STBI_NOTUSED(old_limit);
   if (q == NULL) return stbi__err("outofmem", "Out of memory");
   z->zout_start = q;
   z->zout       = q + cur;
   z->zout_end   = q + limit;
   return 1;
}

// Assembly:
movq %rsi, 0x18(%rdi)
cmpl $0x0, 0x30(%rdi)
je 0x2333b
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
subq %rdi, %r14
movl 0x28(%rbx), %eax
subl %edi, %eax
addl %r14d, %edx
movl %eax, %ecx
leal (%rcx,%rcx), %eax
cmpl %ecx, %edx
jg 0x23306
movslq %ecx, %r15
movq %r15, %rsi
callq 0x4510
testq %rax, %rax
je 0x2334c
movq %rax, 0x20(%rbx)
movslq %r14d, %rcx
addq %rax, %rcx
movq %rcx, 0x18(%rbx)
addq %rax, %r15
movq %r15, 0x28(%rbx)
movl $0x1, %eax
jmp 0x2335c
leaq 0x9702(%rip), %rax      # 0x2ca44
movq %rax, 0x14047(%rip)     # 0x37390
xorl %eax, %eax
retq
leaq 0x8f76(%rip), %rax      # 0x2c2c9
movq %rax, 0x14036(%rip)     # 0x37390
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__psd_info(stbi__context*, int*, int*, int*)
static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
   int channelCount;
   if (stbi__get32be(s) != 0x38425053) {
       stbi__rewind( s );
       return 0;
   }
   if (stbi__get16be(s) != 1) {
       stbi__rewind( s );
       return 0;
   }
   stbi__skip(s, 6);
   channelCount = stbi__get16be(s);
   if (channelCount < 0 || channelCount > 16) {
       stbi__rewind( s );
       return 0;
   }
   *y = stbi__get32be(s);
   *x = stbi__get32be(s);
   if (stbi__get16be(s) != 8) {
       stbi__rewind( s );
       return 0;
   }
   if (stbi__get16be(s) != 3) {
       stbi__rewind( s );
       return 0;
   }
   *comp = 4;
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1e517
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x1e517
orl %ebp, %eax
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x23457
movq %rbx, %rdi
callq 0x1e517
cmpl $0x1, %eax
jne 0x23457
cmpq $0x0, 0x10(%rbx)
je 0x233db
movq 0xb8(%rbx), %rax
movq 0xc0(%rbx), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x5, %ecx
jg 0x233e2
movq %rdx, 0xb8(%rbx)
movq 0x28(%rbx), %rdi
movl $0x6, %esi
subl %ecx, %esi
callq *0x18(%rbx)
jmp 0x233ed
movq 0xb8(%rbx), %rax
addq $0x6, %rax
movq %rax, 0xb8(%rbx)
movq %rbx, %rdi
callq 0x1e517
cmpl $0x11, %eax
jae 0x23457
movq %rbx, %rdi
callq 0x1e517
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x1e517
orl %ebp, %eax
movl %eax, (%r12)
movq %rbx, %rdi
callq 0x1e517
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x1e517
orl %ebp, %eax
movl %eax, (%r15)
movq %rbx, %rdi
callq 0x1e517
cmpl $0x8, %eax
jne 0x23457
movq %rbx, %rdi
callq 0x1e517
cmpl $0x3, %eax
jne 0x23457
movl $0x4, (%r14)
movl $0x1, %eax
jmp 0x23467
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__hdr_info(stbi__context*, int*, int*, int*)
static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
{
   char buffer[STBI__HDR_BUFLEN];
   char *token;
   int valid = 0;

   if (stbi__hdr_test(s) == 0) {
       stbi__rewind( s );
       return 0;
   }

   for(;;) {
      token = stbi__hdr_gettoken(s,buffer);
      if (token[0] == 0) break;
      if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
   }

   if (!valid) {
       stbi__rewind( s );
       return 0;
   }
   token = stbi__hdr_gettoken(s,buffer);
   if (strncmp(token, "-Y ", 3)) {
       stbi__rewind( s );
       return 0;
   }
   token += 3;
   *y = (int) strtol(token, &token, 10);
   while (*token == ' ') ++token;
   if (strncmp(token, "+X ", 3)) {
       stbi__rewind( s );
       return 0;
   }
   token += 3;
   *x = (int) strtol(token, NULL, 10);
   *comp = 3;
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
callq 0x149d2
testl %eax, %eax
je 0x238f7
movq %rbx, (%rsp)
leaq 0x10(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x22a42
cmpb $0x0, (%r13)
je 0x238f7
xorl %ebp, %ebp
movl $0x1, %ebx
leaq 0x10(%rsp), %r13
movdqu 0x17(%rsp), %xmm0
pcmpeqb 0x84d0(%rip), %xmm0     # 0x2bd00
movdqa 0x10(%rsp), %xmm1
pcmpeqb 0x84d2(%rip), %xmm1     # 0x2bd10
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
cmovel %ebx, %ebp
movq %r15, %rdi
movq %r13, %rsi
callq 0x22a42
cmpb $0x0, 0x10(%rsp)
jne 0x23822
testl %ebp, %ebp
je 0x238f7
leaq 0x10(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x22a42
movl $0x592d, %eax           # imm = 0x592D
xorl (%r13), %eax
movzbl 0x2(%r13), %ecx
xorl $0x20, %ecx
orw %ax, %cx
jne 0x238f7
leaq 0x13(%rsp), %rdi
leaq 0x8(%rsp), %r13
movq %rdi, (%r13)
movq %r13, %rsi
movl $0xa, %edx
callq 0x4440
movl %eax, (%r12)
movq (%r13), %rdi
addq $0x2, %rdi
movzbl -0x2(%rdi), %eax
incq %rdi
cmpl $0x20, %eax
je 0x238b5
cmpl $0x2b, %eax
movq (%rsp), %rbx
jne 0x238f7
cmpb $0x58, -0x2(%rdi)
jne 0x238f7
cmpb $0x20, -0x1(%rdi)
jne 0x238f7
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0xa, %edx
callq 0x4440
movl %eax, (%r14)
movl $0x3, (%rbx)
movl $0x1, %eax
jmp 0x2390b
movdqu 0xc8(%r15), %xmm0
movdqu %xmm0, 0xb8(%r15)
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbi_write_bmp
STBIWDEF int stbi_write_bmp(char const *filename, int x, int y, int comp, const void *data)
{
   stbi__write_context s;
   if (stbi__start_write_file(&s,filename)) {
      int r = stbi_write_bmp_core(&s, x, y, comp, data);
      stbi__end_write_file(&s);
      return r;
   } else
      return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r12d
leaq 0x9329(%rip), %rsi      # 0x2d1ef
callq 0x4370
movq %rax, %r15
leaq 0x1e09(%rip), %rax      # 0x25cde
movq %rax, (%rsp)
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x23f02
movq %rsp, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x23e43
movl %eax, %ebx
movq %r15, %rdi
callq 0x42f0
jmp 0x23f04
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbi_write_tga
int stbi_write_tga(char const *filename, int x, int y, int comp, const void *data)
{
   stbi__write_context s;
   if (stbi__start_write_file(&s,filename)) {
      int r = stbi_write_tga_core(&s, x, y, comp, (void *) data);
      stbi__end_write_file(&s);
      return r;
   } else
      return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r12d
leaq 0x8f22(%rip), %rsi      # 0x2d1ef
callq 0x4370
movq %rax, %r15
leaq 0x1a02(%rip), %rax      # 0x25cde
movq %rax, (%rsp)
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x24309
movq %rsp, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x23f3a
movl %eax, %ebx
movq %r15, %rdi
callq 0x42f0
jmp 0x2430b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__linear_to_rgbe(unsigned char*, float*)
void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)
{
   int exponent;
   float maxcomp = stbiw__max(linear[0], stbiw__max(linear[1], linear[2]));

   if (maxcomp < 1e-32f) {
      rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0;
   } else {
      float normalize = (float) frexp(maxcomp, &exponent) * 256.0f/maxcomp;

      rgbe[0] = (unsigned char)(linear[0] * normalize);
      rgbe[1] = (unsigned char)(linear[1] * normalize);
      rgbe[2] = (unsigned char)(linear[2] * normalize);
      rgbe[3] = (unsigned char)(exponent + 128);
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movss (%rsi), %xmm1
movss 0x4(%rsi), %xmm2
maxss 0x8(%rsi), %xmm2
movaps %xmm1, %xmm0
maxss %xmm2, %xmm0
movss 0x87a1(%rip), %xmm2     # 0x2cae4
ucomiss %xmm0, %xmm2
jbe 0x24353
movw $0x0, (%rbx)
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x243ad
movq %rsi, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdi
movss %xmm1, 0x8(%rsp)
movss %xmm0, 0x4(%rsp)
callq 0x40c0
movb (%r15), %al
mulss 0x876e(%rip), %xmm0     # 0x2cae8
divss 0x4(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movb %cl, (%rbx)
movss 0x4(%r14), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movb %cl, 0x1(%rbx)
mulss 0x8(%r14), %xmm0
cvttss2si %xmm0, %ecx
addb $-0x80, %al
movb %al, 0x3(%rbx)
movb %cl, 0x2(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__write_run_data(stbi__write_context*, int, unsigned char)
void stbiw__write_run_data(stbi__write_context *s, int length, unsigned char databyte)
{
   unsigned char lengthbyte = STBIW_UCHAR(length+128);
   STBIW_ASSERT(length+128 <= 255);
   s->func(s->context, &lengthbyte, 1);
   s->func(s->context, &databyte, 1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb %dl, 0xf(%rsp)
leal -0x80(%rsi), %eax
movb %al, 0xe(%rsp)
cmpl $0x80, %esi
jge 0x243fe
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
callq *(%rbx)
movq 0x8(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq *(%rbx)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x8c5b(%rip), %rdi      # 0x2d060
leaq 0x8c66(%rip), %rsi      # 0x2d072
leaq 0x8c7c(%rip), %rcx      # 0x2d08f
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x41f0
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__write_dump_data(stbi__write_context*, int, unsigned char*)
void stbiw__write_dump_data(stbi__write_context *s, int length, unsigned char *data)
{
   unsigned char lengthbyte = STBIW_UCHAR(length);
   STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code
   s->func(s->context, &lengthbyte, 1);
   s->func(s->context, data, length);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movb %bpl, 0xf(%rsp)
cmpl $0x81, %esi
jge 0x2445e
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq *(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq *(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8c70(%rip), %rdi      # 0x2d0d5
leaq 0x8c06(%rip), %rsi      # 0x2d072
leaq 0x8c70(%rip), %rcx      # 0x2d0e3
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x41f0
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbi_write_hdr_core(stbi__write_context*, int, int, int, float*)
static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data)
{
   if (y <= 0 || x <= 0 || data == NULL)
      return 0;
   else {
      // Each component is stored separately. Allocate scratch space for full output scanline.
      unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);
      int i, len;
      char buffer[128];
      char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
      s->func(s->context, header, sizeof(header)-1);

      len = sprintf(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
      s->func(s->context, buffer, len);

      for(i=0; i < y; i++)
         stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*i*x);
      STBIW_FREE(scratch);
      return 1;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, 0x4(%rsp)
movl %edx, %ebp
movq %rdi, 0x8(%rsp)
testl %edx, %edx
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
testq %r8, %r8
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x24947
movl %esi, %r14d
leal (,%r14,4), %edi
movq %r8, %r15
callq 0x43f0
movq %rax, %r12
leaq 0x8a09(%rip), %rsi      # 0x2d2c0
leaq 0x90(%rsp), %rax
movl $0x8, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movw $0xa, 0x40(%rax)
movq 0x8(%rsp), %rbx
movq 0x8(%rbx), %rdi
movq %rax, %rsi
movl $0x41, %edx
callq *(%rbx)
leaq 0x897a(%rip), %rsi      # 0x2d264
xorl %r13d, %r13d
leaq 0x10(%rsp), %rdi
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x40b0
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movl %eax, %edx
callq *(%rbx)
movl %ebp, %eax
movl 0x4(%rsp), %ebp
imull %r14d, %ebp
movl %eax, %ebx
movslq %r13d, %r13
leaq (%r15,%r13,4), %r8
movq 0x8(%rsp), %rdi
movl %r14d, %esi
movl 0x4(%rsp), %edx
movq %r12, %rcx
callq 0x2447d
addl %ebp, %r13d
decq %rbx
jne 0x24917
movq %r12, %rdi
callq 0x4380
movl $0x1, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbi_write_hdr
int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
{
   stbi__write_context s;
   if (stbi__start_write_file(&s,filename)) {
      int r = stbi_write_hdr_core(&s, x, y, comp, (float *) data);
      stbi__end_write_file(&s);
      return r;
   } else
      return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r12d
leaq 0x8878(%rip), %rsi      # 0x2d1ef
callq 0x4370
movq %rax, %r15
leaq 0x1358(%rip), %rax      # 0x25cde
movq %rax, (%rsp)
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x249b3
movq %rsp, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x24862
movl %eax, %ebx
movq %r15, %rdi
callq 0x42f0
jmp 0x249b5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__sbgrowf(void**, int, int)
static void *stbiw__sbgrowf(void **arr, int increment, int itemsize)
{
   int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;
   void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2);
   STBIW_ASSERT(p);
   if (p) {
      if (!*arr) ((int *) p)[1] = 0;
      *arr = (void *) ((int *) p + 2);
      stbiw__sbm(*arr) = m;
   }
   return *arr;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x251a0
movl -0x8(%rax), %ecx
leal 0x1(,%rcx,2), %ebp
jmp 0x251a5
movl $0x2, %ebp
leaq -0x8(%rax), %rdi
testq %rax, %rax
cmoveq %rax, %rdi
imull %ebp, %esi
movslq %esi, %rsi
addq $0x8, %rsi
callq 0x4510
testq %rax, %rax
je 0x251e4
cmpq $0x0, (%rbx)
jne 0x251d1
movl $0x0, 0x4(%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, (%rbx)
movl %ebp, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5e3c(%rip), %rdi      # 0x2b027
leaq 0x7e80(%rip), %rsi      # 0x2d072
leaq 0x809c(%rip), %rcx      # 0x2d295
movl $0x29b, %edx            # imm = 0x29B
callq 0x41f0
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__zlib_flushf(unsigned char*, unsigned int*, int*)
static unsigned char *stbiw__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount)
{
   while (*bitcount >= 8) {
      stbiw__sbpush(data, STBIW_UCHAR(*bitbuffer));
      *bitbuffer >>= 8;
      *bitcount -= 8;
   }
   return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rax
movq %rdi, 0x8(%rsp)
cmpl $0x8, (%rdx)
jl 0x2526e
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x8(%rsp), %r15
testq %rax, %rax
je 0x25234
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2524c
movq %r15, %rdi
movl $0x1, %esi
callq 0x25186
movq 0x8(%rsp), %rax
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movb (%r14), %sil
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movb %sil, (%rax,%rcx)
shrl $0x8, (%r14)
movl (%rbx), %ecx
leal -0x8(%rcx), %edx
movl %edx, (%rbx)
cmpl $0xf, %ecx
jg 0x25224
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbi_write_png
STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
{
   FILE *f;
   int len;
   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;
   f = fopen(filename, "wb");
   if (!f) { STBIW_FREE(png); return 0; }
   fwrite(png, 1, len, f);
   fclose(f);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r10d
movl %ecx, %eax
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %r14
leaq 0xc(%rsp), %r9
movq %r8, %rdi
movl %r10d, %esi
movl %eax, %r8d
callq 0x25278
testq %rax, %rax
je 0x258b2
movq %rax, %rbx
leaq 0x7971(%rip), %rsi      # 0x2d1ef
movq %r14, %rdi
callq 0x4370
testq %rax, %rax
je 0x258b6
movq %rax, %r14
movslq 0xc(%rsp), %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x4620
movq %r14, %rdi
callq 0x42f0
movl $0x1, %ebp
jmp 0x258b8
xorl %ebp, %ebp
jmp 0x258c0
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x4380
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbi_write_png_to_func
STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int stride_bytes)
{
   int len;
   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;
   func(context, png, len);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r9, %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x30(%rsp), %esi
leaq 0xc(%rsp), %r9
movq %rax, %rdi
callq 0x25278
testq %rax, %rax
je 0x25911
movq %rax, %r15
movl 0xc(%rsp), %edx
movq %r14, %rdi
movq %rax, %rsi
callq *%rbx
movq %r15, %rdi
callq 0x4380
movl $0x1, %eax
jmp 0x25913
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__outfile(stbi__write_context*, int, int, int, int, int, int, void*, int, int, char const*, ...)
static int stbiw__outfile(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...)
{
   if (y < 0 || x < 0) {
      return 0;
   } else {
      va_list v;
      va_start(v, fmt);
      stbiw__writefv(s, fmt, v);
      va_end(v);
      stbiw__write_pixels(s,rgb_dir,vdir,x,y,comp,data,alpha,pad, expand_mono);
      return 1;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
testb %al, %al
je 0x25972
movaps %xmm0, 0x80(%rsp)
movaps %xmm1, 0x90(%rsp)
movaps %xmm2, 0xa0(%rsp)
movaps %xmm3, 0xb0(%rsp)
movaps %xmm4, 0xc0(%rsp)
movaps %xmm5, 0xd0(%rsp)
movaps %xmm6, 0xe0(%rsp)
movaps %xmm7, 0xf0(%rsp)
movl %r8d, %eax
movl %ecx, 0x4(%rsp)
orl %ecx, %eax
js 0x25a78
movl %r9d, %r13d
movl %r8d, %ebp
movq %rdi, %r14
movq 0x160(%rsp), %rsi
leaq 0x50(%rsp), %rax
leaq 0x30(%rsp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x168(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%rdx)
callq 0x25a8c
movl $0x0, 0x14(%rsp)
testl %ebp, %ebp
jle 0x25a71
movl 0x150(%rsp), %r15d
movl 0x140(%rsp), %r12d
movslq %r13d, %r13
movl %ebp, %ebx
movslq 0x4(%rsp), %rax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
leaq -0x1(%rbx), %rcx
imulq %r13, %rax
imulq %rax, %rcx
addq 0x148(%rsp), %rcx
movq %rcx, 0x8(%rsp)
negq %rax
movq %rax, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
cmpl $0x0, 0x4(%rsp)
jle 0x25a42
movq 0x8(%rsp), %rbp
movq 0x18(%rsp), %rbx
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movq %rbp, %r8
callq 0x25bc5
addq %r13, %rbp
decq %rbx
jne 0x25a26
movq 0x28(%rsp), %rbx
decq %rbx
movq 0x8(%r14), %rdi
leaq 0x14(%rsp), %rsi
movl 0x158(%rsp), %edx
callq *(%r14)
movq 0x8(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
jne 0x25a10
movl $0x1, %eax
jmp 0x25a7a
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__writefv(stbi__write_context*, char const*, __va_list_tag*)
static void stbiw__writefv(stbi__write_context *s, const char *fmt, va_list v)
{
   while (*fmt) {
      switch (*fmt++) {
         case ' ': break;
         case '1': { unsigned char x = STBIW_UCHAR(va_arg(v, int));
                     s->func(s->context,&x,1);
                     break; }
         case '2': { int x = va_arg(v,int);
                     unsigned char b[2];
                     b[0] = STBIW_UCHAR(x);
                     b[1] = STBIW_UCHAR(x>>8);
                     s->func(s->context,b,2);
                     break; }
         case '4': { stbiw_uint32 x = va_arg(v,int);
                     unsigned char b[4];
                     b[0]=STBIW_UCHAR(x);
                     b[1]=STBIW_UCHAR(x>>8);
                     b[2]=STBIW_UCHAR(x>>16);
                     b[3]=STBIW_UCHAR(x>>24);
                     s->func(s->context,b,4);
                     break; }
         default:
            STBIW_ASSERT(0);
            return;
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb (%rsi), %al
testb %al, %al
je 0x25b97
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
incq %r14
leaq 0x1(%rsp), %r12
leaq 0x2(%rsp), %r13
leaq 0x4(%rsp), %rbp
movzbl %al, %eax
cmpl $0x31, %eax
jg 0x25aec
cmpl $0x20, %eax
je 0x25b89
cmpl $0x31, %eax
jne 0x25ba6
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x25b48
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x25b54
cmpl $0x32, %eax
je 0x25b10
cmpl $0x34, %eax
jne 0x25ba6
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x25b68
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x25b74
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x25b26
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x25b32
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movzwl (%rax), %eax
movw %ax, 0x2(%rsp)
movq 0x8(%r15), %rdi
movq %r13, %rsi
movl $0x2, %edx
jmp 0x25b86
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
movb %al, 0x1(%rsp)
movq 0x8(%r15), %rdi
movq %r12, %rsi
movl $0x1, %edx
jmp 0x25b86
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%r15), %rdi
movq %rbp, %rsi
movl $0x4, %edx
callq *(%r15)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x25abc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6e46(%rip), %rdi      # 0x2c9f3
leaq 0x74be(%rip), %rsi      # 0x2d072
leaq 0x764f(%rip), %rcx      # 0x2d20a
movl $0x109, %edx            # imm = 0x109
callq 0x41f0
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image_write.hpp
// Function: stbiw__write_pixel(stbi__write_context*, int, int, int, int, unsigned char*)
static void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char *d)
{
   unsigned char bg[3] = { 255, 0, 255}, px[3];
   int k;

   if (write_alpha < 0)
      s->func(s->context, &d[comp - 1], 1);

   switch (comp) {
      case 1:
         s->func(s->context,d,1);
         break;
      case 2:
         if (expand_mono)
            stbiw__write3(s, d[0], d[0], d[0]); // monochrome bmp
         else
            s->func(s->context, d, 1);  // monochrome TGA
         break;
      case 4:
         if (!write_alpha) {
            // composite against pink background
            for (k = 0; k < 3; ++k)
               px[k] = bg[k] + ((d[k] - bg[k]) * d[3]) / 255;
            stbiw__write3(s, px[1 - rgb_dir], px[1], px[1 + rgb_dir]);
            break;
         }
         /* FALLTHROUGH */
      case 3:
         stbiw__write3(s, d[1 - rgb_dir], d[1], d[1 + rgb_dir]);
         break;
   }
   if (write_alpha > 0)
      s->func(s->context, &d[comp - 1], 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leal -0x1(%r15), %eax
cmpl $0x3, %eax
ja 0x25c52
leaq 0x6f3e(%rip), %rdx      # 0x2cb28
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
testl %ecx, %ecx
je 0x25c17
movb (%r14), %al
movq (%rbx), %rcx
movq 0x8(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movb %al, 0x1(%rsi)
movb %al, 0x2(%rsi)
movl $0x3, %edx
callq *%rcx
jmp 0x25c52
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq *(%rbx)
jmp 0x25c52
testl %ebp, %ebp
je 0x25c76
movb 0x2(%r14), %al
movb (%r14), %cl
movb 0x1(%r14), %dl
movq (%rbx), %r8
movq 0x8(%rbx), %rdi
leaq 0x15(%rsp), %rsi
movb %al, (%rsi)
movb %dl, 0x1(%rsi)
movb %cl, 0x2(%rsi)
movl $0x3, %edx
callq *%r8
testl %ebp, %ebp
jle 0x25c6b
movq 0x8(%rbx), %rdi
movslq %r15d, %rax
leaq (%r14,%rax), %rsi
decq %rsi
movl $0x1, %edx
callq *(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x3(%r14), %eax
xorl %ecx, %ecx
leaq 0x6fd0(%rip), %rdx      # 0x2cc54
movzbl (%rcx,%rdx), %esi
movzbl (%r14,%rcx), %edi
subl %esi, %edi
imull %eax, %edi
movslq %edi, %rdi
imulq $-0x7f7f7f7f, %rdi, %r8 # imm = 0x80808081
shrq $0x20, %r8
addl %r8d, %edi
movl %edi, %r8d
shrl $0x1f, %r8d
shrl $0x7, %edi
addl %r8d, %edi
addb %sil, %dil
movb %dil, 0xc(%rsp,%rcx)
incq %rcx
cmpq $0x3, %rcx
jne 0x25c84
movb 0xe(%rsp), %al
movb 0xc(%rsp), %cl
movb 0xd(%rsp), %dl
movq (%rbx), %r8
movq 0x8(%rbx), %rdi
leaq 0x12(%rsp), %rsi
jmp 0x25c42
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/Frame.cpp
// Function: Frame::setColor(Sample const&, RGB)
void
Frame::setColor(Sample const & s, RGB c)
{
  c.clip(0, 1);

  int xi = (int)std::floor(s.x() * image.width());
  int yi = (int)std::floor((1 - s.y()) * image.height());

  unsigned char * pixel = image.pixel(yi, xi);
  pixel[0] = c.getBMPR(0, 1);
  pixel[1] = c.getBMPG(0, 1);
  pixel[2] = c.getBMPB(0, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movupd (%rdx), %xmm0
xorpd %xmm1, %xmm1
maxpd %xmm0, %xmm1
movapd 0x7515(%rip), %xmm0     # 0x2d310
minpd %xmm1, %xmm0
movapd %xmm0, (%rsp)
movupd %xmm0, (%rdx)
xorpd %xmm0, %xmm0
maxsd 0x10(%rdx), %xmm0
movsd 0x532f(%rip), %xmm1     # 0x2b148
minsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rdx)
movl 0x8(%rdi), %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
mulsd (%rsi), %xmm0
callq 0x4540
cvttsd2si %xmm0, %r12d
movsd 0x5306(%rip), %xmm1     # 0x2b148
subsd 0x8(%r15), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%r14), %xmm0
mulsd %xmm1, %xmm0
callq 0x4540
cvttsd2si %xmm0, %ecx
movq 0x18(%r14), %rax
imull %ebp, %ecx
addl %r12d, %ecx
movslq 0x10(%r14), %rdx
movslq %ecx, %rcx
imulq %rdx, %rcx
movsd 0x74a5(%rip), %xmm0     # 0x2d320
movapd (%rsp), %xmm1
mulsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, (%rax,%rcx)
movsd 0x8(%rbx), %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, 0x1(%rax,%rcx)
mulsd 0x10(%rbx), %xmm0
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %edx
movb %dl, 0x2(%rax,%rcx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/Lights.cpp
// Function: AreaLight::getShadowRays(Vec3 const&, bool&) const
vector<Ray>
AreaLight::getShadowRays(Vec3 const & position, bool & use_dist) const
{
  use_dist = true;
  vector<Ray> v;

  // generated rays from position to all the offset point lights
  for (double i = -1; i < 2; i++)
    for (double j = -1; j < 2; j++)
        for (double k = -1; k < 2; k++)
          v.push_back(Ray::fromOriginAndEnd(position, pos_ 
                                          + Vec3(i*offset_, j*offset_, k*offset_)));
  return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb $0x1, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x30(%rsp), %r12
movl %eax, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movapd %xmm0, 0x10(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movapd 0x10(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd %xmm1, 0x20(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd 0x38(%r15), %xmm1
mulsd %xmm1, %xmm0
addsd 0x50(%r15), %xmm0
movsd 0x10(%r14), %xmm2
subsd %xmm2, %xmm0
movsd %xmm2, 0x40(%rsp)
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd 0x20(%rsp), %xmm1
movupd 0x40(%r15), %xmm2
addpd %xmm1, %xmm2
movupd (%r14), %xmm1
subpd %xmm1, %xmm2
movapd %xmm1, 0x30(%rsp)
movupd %xmm2, 0x48(%rsp)
movsd %xmm0, 0x58(%rsp)
movaps 0x6e37(%rip), %xmm0     # 0x2d350
movaps %xmm0, 0x60(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x267f2
incl %ebp
cmpl $0x2, %ebp
jne 0x264bc
incl %r13d
cmpl $0x2, %r13d
jne 0x2649f
movl 0xc(%rsp), %eax
incl %eax
cmpl $0x2, %eax
jne 0x26488
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x26575
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x4310
movq %r14, %rdi
callq 0x45b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/Primitives.cpp
// Function: Primitive::Primitive(RGB const&, Material const&, Mat4 const&)
Primitive::Primitive(RGB const & c, Material const & m, Mat4 const & modelToWorld)
{
  c_ = c;
  m_ = m;
  modelToWorld_ = modelToWorld;
  worldToModel_ = modelToWorld.inverse();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x1027c(%rip), %rax     # 0x36c80
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rdi)
movq $0x0, 0x118(%rdi)
movsd (%rsi), %xmm0
movsd %xmm0, 0x108(%rdi)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x110(%rdi)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x118(%rdi)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm0, 0x120(%rdi)
movups %xmm1, 0x130(%rdi)
movsd (%rcx), %xmm0
movsd %xmm0, 0x8(%rdi)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x10(%rdi)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x18(%rdi)
movsd 0x18(%rcx), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd 0x20(%rcx), %xmm0
movsd %xmm0, 0x28(%rdi)
movsd 0x28(%rcx), %xmm0
movsd %xmm0, 0x30(%rdi)
movsd 0x30(%rcx), %xmm0
movsd %xmm0, 0x38(%rdi)
movsd 0x38(%rcx), %xmm0
movsd %xmm0, 0x40(%rdi)
movsd 0x40(%rcx), %xmm0
movsd %xmm0, 0x48(%rdi)
movsd 0x48(%rcx), %xmm0
movsd %xmm0, 0x50(%rdi)
movsd 0x50(%rcx), %xmm0
movsd %xmm0, 0x58(%rdi)
movsd 0x58(%rcx), %xmm0
movsd %xmm0, 0x60(%rdi)
movsd 0x60(%rcx), %xmm0
movsd %xmm0, 0x68(%rdi)
movsd 0x68(%rcx), %xmm0
movsd %xmm0, 0x70(%rdi)
movsd 0x70(%rcx), %xmm0
movsd %xmm0, 0x78(%rdi)
movsd 0x78(%rcx), %xmm0
movsd %xmm0, 0x80(%rdi)
movq %rsp, %r14
movq %r14, %rdi
movq %rcx, %rsi
callq 0x27b46
movaps (%r14), %xmm0
movups %xmm0, 0x88(%rbx)
movaps 0x10(%r14), %xmm0
movups %xmm0, 0x98(%rbx)
movaps 0x20(%r14), %xmm0
movups %xmm0, 0xa8(%rbx)
movaps 0x30(%r14), %xmm0
movups %xmm0, 0xb8(%rbx)
movaps 0x40(%r14), %xmm0
movups %xmm0, 0xc8(%rbx)
movaps 0x50(%r14), %xmm0
movups %xmm0, 0xd8(%rbx)
movaps 0x60(%r14), %xmm0
movups %xmm0, 0xe8(%rbx)
movaps 0x70(%r14), %xmm0
movups %xmm0, 0xf8(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/Primitives.cpp
// Function: Sphere::calculateNormal(Vec3 const&) const
Vec3
Sphere::calculateNormal(Vec3 const & position) const
{ 
  // norm is the point's position in the model coordinates
  Vec3 norm = worldToModel_ * position;
  // restoring the normal back to the world coordinates
  return Vec3(worldToModel_.transpose() * Vec4(norm, 0), 3).normalize();
}

// Assembly:
movq %rdi, %rax
movsd (%rdx), %xmm10
movsd 0x8(%rdx), %xmm13
movsd 0x10(%rdx), %xmm9
movsd 0x98(%rsi), %xmm1
movsd 0xb8(%rsi), %xmm3
movsd 0xd8(%rsi), %xmm2
movupd 0xe0(%rsi), %xmm7
movsd 0xf8(%rsi), %xmm0
movupd 0x88(%rsi), %xmm5
movapd %xmm5, %xmm4
unpckhpd %xmm5, %xmm4            # xmm4 = xmm4[1],xmm5[1]
mulsd %xmm13, %xmm4
movapd %xmm5, %xmm6
mulsd %xmm10, %xmm6
addsd %xmm4, %xmm6
movapd %xmm1, %xmm11
mulsd %xmm9, %xmm11
addsd %xmm6, %xmm11
addsd 0xa0(%rsi), %xmm11
movupd 0xa8(%rsi), %xmm6
movapd %xmm6, %xmm4
unpckhpd %xmm6, %xmm4            # xmm4 = xmm4[1],xmm6[1]
mulsd %xmm13, %xmm4
movapd %xmm6, %xmm8
mulsd %xmm10, %xmm8
addsd %xmm4, %xmm8
movapd %xmm3, %xmm12
mulsd %xmm9, %xmm12
addsd %xmm8, %xmm12
addsd 0xc0(%rsi), %xmm12
movupd 0xc8(%rsi), %xmm8
movupd 0xe8(%rsi), %xmm4
unpcklpd %xmm13, %xmm13          # xmm13 = xmm13[0,0]
movapd %xmm8, %xmm14
unpckhpd %xmm4, %xmm14           # xmm14 = xmm14[1],xmm4[1]
mulpd %xmm13, %xmm14
movapd %xmm8, %xmm13
unpcklpd %xmm4, %xmm13           # xmm13 = xmm13[0],xmm4[0]
unpcklpd %xmm10, %xmm10          # xmm10 = xmm10[0,0]
mulpd %xmm13, %xmm10
addpd %xmm14, %xmm10
movapd %xmm2, %xmm13
unpcklpd %xmm0, %xmm13           # xmm13 = xmm13[0],xmm0[0]
unpcklpd %xmm9, %xmm9            # xmm9 = xmm9[0,0]
mulpd %xmm13, %xmm9
addpd %xmm10, %xmm9
movhpd 0x100(%rsi), %xmm7      # xmm7 = xmm7[0],mem[0]
addpd %xmm9, %xmm7
movapd %xmm7, %xmm13
unpckhpd %xmm7, %xmm13           # xmm13 = xmm13[1],xmm7[1]
xorpd %xmm9, %xmm9
ucomisd %xmm9, %xmm13
movapd %xmm11, %xmm10
divsd %xmm13, %xmm10
jne 0x2703d
jp 0x2703d
movapd %xmm11, %xmm10
movapd %xmm12, %xmm11
divsd %xmm13, %xmm11
jne 0x27050
jp 0x27050
movapd %xmm12, %xmm11
movapd %xmm7, %xmm12
divsd %xmm13, %xmm12
jne 0x27063
jp 0x27063
movapd %xmm7, %xmm12
mulsd %xmm11, %xmm3
unpcklpd %xmm11, %xmm11          # xmm11 = xmm11[0,0]
mulpd %xmm11, %xmm6
mulsd %xmm10, %xmm1
unpcklpd %xmm10, %xmm10          # xmm10 = xmm10[0,0]
mulpd %xmm10, %xmm5
addpd %xmm6, %xmm5
mulsd %xmm12, %xmm2
unpcklpd %xmm12, %xmm12          # xmm12 = xmm12[0,0]
mulpd %xmm12, %xmm8
addpd %xmm5, %xmm8
xorpd %xmm5, %xmm5
mulpd %xmm5, %xmm4
addpd %xmm8, %xmm4
addsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm9, %xmm0
addsd %xmm1, %xmm0
movapd %xmm4, %xmm1
mulpd %xmm4, %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
movapd %xmm4, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm1, %xmm2
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
movsd 0x4061(%rip), %xmm2     # 0x2b148
divsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm4, %xmm2
movupd %xmm2, (%rax)
movsd %xmm0, 0x10(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/View.cpp
// Function: View::getSample(int, int, int, Sample&) const
void
View::getSample(int pixel_x, int pixel_y, int ray_index, Sample & s) const
{
  // Some random jitter to break up patterns
  double jitter_x = 0.25 * (std::rand() / (double)RAND_MAX);
  double jitter_y = 0.25 * (std::rand() / (double)RAND_MAX);

  double pixel_sub_x = (ray_index % rays_per_pixel_edge_ + 0.5 + jitter_x) / (double)rays_per_pixel_edge_;
  double pixel_sub_y = (ray_index / rays_per_pixel_edge_ + 0.5 + jitter_y) / (double)rays_per_pixel_edge_;

  s.setX((pixel_x + pixel_sub_x) / (double)pixels_wide_);
  s.setY((pixel_y + pixel_sub_y) / (double)pixels_high_);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
callq 0x40f0
movl %eax, %r13d
callq 0x40f0
movl %eax, %ecx
movl 0x88(%r14), %esi
cvtsi2sd %esi, %xmm0
movl %ebp, %eax
cltd
movd %r15d, %xmm1
movd %r12d, %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtdq2pd %xmm2, %xmm1
movd %r13d, %xmm2
movd %ecx, %xmm3
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
cvtdq2pd %xmm2, %xmm2
divpd 0x55c9(%rip), %xmm2     # 0x2d4c0
mulpd 0x55d1(%rip), %xmm2     # 0x2d4d0
idivl %esi
movd %eax, %xmm3
movd %edx, %xmm4
punpckldq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
cvtdq2pd %xmm4, %xmm3
addpd 0x55c7(%rip), %xmm3     # 0x2d4e0
addpd %xmm2, %xmm3
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
cvtdq2pd 0x80(%r14), %xmm2
divpd %xmm0, %xmm3
addpd %xmm1, %xmm3
divpd %xmm2, %xmm3
movupd %xmm3, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/process.cc
// Function: process::ClientsForProcessList(std::vector<net::Address, std::allocator<net::Address>> const&)
UdpClientMap ClientsForProcessList(const ProcessList& processes) {
  UdpClientMap clients(processes.size());
  for (auto const& addr : processes) {
    clients.emplace(addr, std::make_shared<udp::Client>(addr, kAckTimeout));
  }
  return clients;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq %rdi, %rbx
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
leaq 0x8(%rsp), %rdx
leaq 0x6(%rsp), %rcx
leaq 0x7(%rsp), %r8
callq 0x7a86
movq (%r15), %r14
movq 0x8(%r15), %rbp
cmpq %rbp, %r14
je 0x5ff1
leaq 0xe168(%rip), %r15      # 0x14118
leaq 0x8(%rsp), %r12
leaq 0x6(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x7b38
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x7f4e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5fe8
callq 0x78ac
addq $0x28, %r14
cmpq %rbp, %r14
jne 0x5fba
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x601a
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x601a
callq 0x78ac
movq %rbx, %rdi
callq 0x7926
movq %r14, %rdi
callq 0x5650
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/process.cc
// Function: process::RandomUint32()
uint32_t RandomUint32() {
  // Static thread local to avoid expensive initialization cost on every call,
  // while maintaining thread safety.
  static thread_local std::random_device r;
  static thread_local std::seed_seq seed{r(), r(), r(), r(), r()};
  static thread_local std::default_random_engine random_engine(seed);

  std::uniform_int_distribution<uint32_t> distribution(0, UINT32_MAX);
  return distribution(random_engine);
}

// Assembly:
pushq %rax
cmpb $0x0, %fs:-0x58
je 0x6076
cmpb $0x0, %fs:-0x38
je 0x607d
cmpb $0x0, %fs:-0x28
je 0x6084
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rsp, %rdi
movq %rax, (%rdi)
movq %fs:0x0, %rax
leaq -0x30(%rax), %rsi
movq %rdi, %rdx
callq 0x87c0
popq %rcx
retq
callq 0x56f0
jmp 0x6036
callq 0x572a
jmp 0x6041
callq 0x57c1
jmp 0x604c
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/process.cc
// Function: process::SeqAckMsgFromBuf(char*, unsigned long)
std::experimental::optional<msg::SeqAckMessage> SeqAckMsgFromBuf(char* buf,
                                                                 size_t n) {
  // Check to make sure the size of the buffer is correct.
  if (n != sizeof(msg::SeqAckMessage)) {
    return {};
  }

  msg::SeqAckMessage* buf_msg = reinterpret_cast<msg::SeqAckMessage*>(buf);
  msg::SeqAckMessage msg;
  msg.type = ntohl(buf_msg->type);
  msg.sender = ntohl(buf_msg->sender);
  msg.msg_id = ntohl(buf_msg->msg_id);
  return msg;
}

// Assembly:
movq %rdi, %rax
cmpq $0xc, %rdx
jne 0x61d6
movl (%rsi), %ecx
movl 0x4(%rsi), %edx
bswapl %ecx
bswapl %edx
movl 0x8(%rsi), %esi
bswapl %esi
movl %ecx, (%rax)
movl %edx, 0x4(%rax)
movl %esi, 0x8(%rax)
movb $0x1, %cl
jmp 0x61de
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %ecx, %ecx
movb %cl, 0xc(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/process.cc
// Function: process::SendDataMsg(std::shared_ptr<udp::Client>, std::function<udp::ServerAction (std::shared_ptr<udp::Client>, char*, unsigned long)>, msg::DataMessage)
void SendDataMsg(const udp::ClientPtr client, const udp::OnReceiveFn handle_ack,
                 msg::DataMessage data_msg) {
  data_msg.type = htonl(msg::kDataMessageType);
  data_msg.sender = htonl(data_msg.sender);
  data_msg.msg_id = htonl(data_msg.msg_id);
  data_msg.data = htonl(data_msg.data);

  char* buf = reinterpret_cast<char*>(&data_msg);
  client->SendWithAck(buf, sizeof(data_msg), udp::kUnlimitedAttempts,
                      handle_ack);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x20(%rsp), %rbx
movl $0x1000000, (%rbx)      # imm = 0x1000000
shrq $0x20, %rdx
bswapl %edx
movl %edx, 0x4(%rbx)
movl %ecx, %eax
bswapl %eax
movl %eax, 0x8(%rbx)
shrq $0x20, %rcx
bswapl %ecx
movl %ecx, 0xc(%rbx)
movq (%rdi), %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x7720
movl $0x10, %edx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x12508
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6249
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6277
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x626f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x5650
movq %rax, %rdi
callq 0x791b
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/process.cc
// Function: process::SendAckMsg(std::shared_ptr<udp::Client>, msg::AckMessage)
void SendAckMsg(const udp::ClientPtr client, msg::AckMessage ack_msg) {
  ack_msg.type = htonl(msg::kAckMessageType);
  ack_msg.sender = htonl(ack_msg.sender);
  ack_msg.msg_id = htonl(ack_msg.msg_id);
  ack_msg.proposed_seq = htonl(ack_msg.proposed_seq);
  ack_msg.proposer = htonl(ack_msg.proposer);

  char* buf = reinterpret_cast<char*>(&ack_msg);
  client->Send(buf, sizeof(ack_msg));
}

// Assembly:
pushq %rax
leaq 0x10(%rsp), %rsi
movl $0x2000000, (%rsi)      # imm = 0x2000000
pxor %xmm0, %xmm0
movdqu 0x4(%rsi), %xmm1
movdqa %xmm1, %xmm2
punpckhbw %xmm0, %xmm2    # xmm2 = xmm2[8],xmm0[8],xmm2[9],xmm0[9],xmm2[10],xmm0[10],xmm2[11],xmm0[11],xmm2[12],xmm0[12],xmm2[13],xmm0[13],xmm2[14],xmm0[14],xmm2[15],xmm0[15]
pshuflw $0x1b, %xmm2, %xmm2     # xmm2 = xmm2[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,7,6,5,4]
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
pshuflw $0x1b, %xmm1, %xmm0     # xmm0 = xmm1[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,7,6,5,4]
packuswb %xmm2, %xmm0
movdqu %xmm0, 0x4(%rsi)
movq (%rdi), %rdi
movl $0x14, %edx
callq 0x1245e
popq %rax
retq