LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/util.cpp
// Function: refract(vec3 const&, vec3 const&, float, vec3&)
bool refract(const vec3& _ray_direction, const vec3& _normal, float ni_over_nt, vec3& refracted)
{
    vec3 unit_direction = unit_vector(_ray_direction);
    float dt = dot(unit_direction, _normal);
    float discriminant = 1.0f - ni_over_nt * ni_over_nt * (1 - dt * dt);
    if(discriminant > 0.0f)
    {
        refracted = ni_over_nt * (unit_direction - _normal * dt) - _normal * sqrt(discriminant);
        return true;
    }
    return false;
}

// Assembly:
movaps %xmm0, %xmm4
movsd (%rdi), %xmm6
movss 0x8(%rdi), %xmm5
movaps %xmm6, %xmm0
mulps %xmm6, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm6, %xmm1
mulss %xmm6, %xmm1
addss %xmm0, %xmm1
movaps %xmm5, %xmm0
mulss %xmm5, %xmm0
addss %xmm1, %xmm0
sqrtss %xmm0, %xmm0
divss %xmm0, %xmm5
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
divps %xmm0, %xmm6
movsd (%rsi), %xmm7
movaps %xmm7, %xmm0
mulps %xmm6, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm6, %xmm2
mulss %xmm7, %xmm2
addss %xmm0, %xmm2
movss 0x8(%rsi), %xmm0
movaps %xmm5, %xmm1
mulss %xmm0, %xmm1
addss %xmm2, %xmm1
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
movss 0x275f4(%rip), %xmm8    # 0x3c204
movaps %xmm8, %xmm3
subss %xmm2, %xmm3
movaps %xmm4, %xmm2
mulss %xmm4, %xmm2
mulss %xmm3, %xmm2
subss %xmm2, %xmm8
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm8
jbe 0x14cdd
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
mulss %xmm1, %xmm0
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
mulps %xmm1, %xmm7
subss %xmm0, %xmm5
mulss %xmm4, %xmm5
ucomiss %xmm2, %xmm8
jb 0x14c65
xorps %xmm0, %xmm0
sqrtss %xmm8, %xmm0
jmp 0x14ca9
movaps %xmm8, %xmm0
movaps %xmm4, 0x30(%rsp)
movss %xmm5, 0xc(%rsp)
movaps %xmm6, 0x20(%rsp)
movaps %xmm7, 0x10(%rsp)
movss %xmm8, 0x8(%rsp)
callq 0x6710
xorps %xmm2, %xmm2
movss 0x8(%rsp), %xmm8
movaps 0x10(%rsp), %xmm7
movaps 0x20(%rsp), %xmm6
movss 0xc(%rsp), %xmm5
movaps 0x30(%rsp), %xmm4
movss 0x8(%r14), %xmm1
mulss %xmm0, %xmm1
subss %xmm1, %xmm5
subps %xmm7, %xmm6
unpcklps %xmm4, %xmm4            # xmm4 = xmm4[0,0,1,1]
mulps %xmm6, %xmm4
movsd (%r14), %xmm1
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
mulps %xmm1, %xmm0
subps %xmm0, %xmm4
movlps %xmm4, (%rbx)
movss %xmm5, 0x8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
ucomiss %xmm2, %xmm8
seta %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/util.cpp
// Function: get_sphere_uv(vec3 const&, float&, float&)
void get_sphere_uv(const vec3& point_on_surface, float& _u, float& _v)
{
    float phi = std::atan2(point_on_surface.z(), point_on_surface.x());
    float theta = std::asin(point_on_surface.y());
    _u = 1 - (phi + M_PI) / (2.0f * M_PI);
    _v = (theta + M_PI / 2.0f) / M_PI;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movss (%rdi), %xmm1
movss 0x8(%rdi), %xmm0
callq 0x64f0
movss %xmm0, 0xc(%rsp)
movss 0x4(%r15), %xmm0
callq 0x6610
xorps %xmm1, %xmm1
cvtss2sd 0xc(%rsp), %xmm1
movsd 0x27a07(%rip), %xmm2    # 0x3c798
addsd %xmm2, %xmm1
divsd 0x27a03(%rip), %xmm1    # 0x3c7a0
addsd 0x27a03(%rip), %xmm1    # 0x3c7a8
cvtsd2ss %xmm1, %xmm1
movss %xmm1, (%r14)
cvtss2sd %xmm0, %xmm0
addsd 0x279f6(%rip), %xmm0    # 0x3c7b0
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/flip_normals.cpp
// Function: flip_normals::hit(ray const&, float, float, hit_record&) const
bool flip_normals::hit(const ray& _ray, float t_min, float t_max, hit_record& rec) const
{
    if(target->hit(_ray, t_min, t_max, rec) == true)
    {
        rec.normal = -rec.normal;
        return true;
    }
    return false;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *(%rax)
testb %al, %al
je 0x232c9
movsd 0x18(%rbx), %xmm0
movaps 0x1906b(%rip), %xmm1    # 0x3c320
xorps %xmm1, %xmm0
movss 0x20(%rbx), %xmm2
xorps %xmm1, %xmm2
movlps %xmm0, 0x18(%rbx)
movss %xmm2, 0x20(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/transform.cpp
// Function: translate::hit(ray const&, float, float, hit_record&) const
bool translate::hit(const ray& _ray, float t_min, float t_max, hit_record& rec) const
{
    ray moved_ray(_ray.origin() - displacement, _ray.direction(), _ray.get_time());
    if(target->hit(moved_ray, t_min, t_max, rec) == true)
    {
        rec.hit_point += displacement;
        return true;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movsd (%rsi), %xmm2
movss 0x8(%rsi), %xmm3
movsd 0x18(%rdi), %xmm4
subps %xmm4, %xmm2
subss 0x20(%rdi), %xmm3
movsd 0xc(%rsi), %xmm4
leaq 0x8(%rsp), %rax
movlps %xmm2, (%rax)
movss %xmm3, 0x8(%rax)
movsd %xmm4, 0xc(%rax)
movsd 0x14(%rsi), %xmm2
movsd %xmm2, 0x14(%rax)
movq 0x8(%rdi), %rdi
movq (%rdi), %rcx
movq %rax, %rsi
callq *(%rcx)
testb %al, %al
je 0x23360
movss 0x18(%r14), %xmm0
addss 0xc(%rbx), %xmm0
movss %xmm0, 0xc(%rbx)
movss 0x1c(%r14), %xmm0
addss 0x10(%rbx), %xmm0
movss %xmm0, 0x10(%rbx)
movss 0x20(%r14), %xmm0
addss 0x14(%rbx), %xmm0
movss %xmm0, 0x14(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/transform.cpp
// Function: translate::bounding_box(float, float, aabb&) const
bool translate::bounding_box(float t0, float t1, aabb& _box) const
{
    if(target->bounding_box(t0, t1, _box) == true)
    {
        _box = aabb(_box.get_min() + displacement, _box.get_max() + displacement);
        return true;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testb %al, %al
je 0x233ba
movss 0x20(%r14), %xmm0
movss 0x8(%rbx), %xmm1
addss %xmm0, %xmm1
movsd (%rbx), %xmm2
movsd 0xc(%rbx), %xmm3
movsd 0x18(%r14), %xmm4
addps %xmm4, %xmm2
addps %xmm4, %xmm3
addss 0x14(%rbx), %xmm0
movlps %xmm2, (%rbx)
movss %xmm1, 0x8(%rbx)
movlps %xmm3, 0xc(%rbx)
movss %xmm0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/material.cpp
// Function: lambertian::scatter(ray const&, hit_record const&, vec3&, ray&) const
bool lambertian::scatter(const ray& _incoming_ray, const hit_record& _record, vec3& _attenuation, ray& _scattered_ray) const
{
    // Reference github issue :
    // https://github.com/RayTracing/raytracing.github.io/issues/145
    // here we use a normalized random_in_unit_sphere(random_on_unit_sphere) instead.
    vec3 target = _record.hit_point + _record.normal + random_on_unit_sphere();
    _scattered_ray = ray(_record.hit_point, target - _record.hit_point, _incoming_ray.get_time());
    _attenuation = albedo->value_at_uv(_record.u, _record.v, _record.hit_point);
    
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %r13
movss 0x14(%rdx), %xmm0
addss 0x20(%rdx), %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0xc(%rdx), %r12
movsd 0xc(%rdx), %xmm0
movsd 0x18(%rdx), %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0x10(%rsp)
callq 0x14ada
addps 0x10(%rsp), %xmm0
addss 0xc(%rsp), %xmm1
movsd 0xc(%r14), %xmm2
subps %xmm2, %xmm0
subss 0x14(%r14), %xmm1
movss 0x18(%rbp), %xmm2
movl 0x14(%r14), %eax
movq 0xc(%r14), %rcx
movq %rcx, (%r15)
movl %eax, 0x8(%r15)
movlps %xmm0, 0xc(%r15)
movss %xmm1, 0x14(%r15)
movss %xmm2, 0x18(%r15)
movq 0x8(%r13), %rdi
movss 0x4(%r14), %xmm0
movss 0x8(%r14), %xmm1
movq (%rdi), %rax
movq %r12, %rsi
callq *(%rax)
movlps %xmm0, (%rbx)
movss %xmm1, 0x8(%rbx)
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/material.cpp
// Function: metal::scatter(ray const&, hit_record const&, vec3&, ray&) const
bool metal::scatter(const ray& _incoming_ray, const hit_record& _record, vec3& _attenuation, ray& _scattered_ray) const
{
    vec3 reflected = reflect(unit_vector(_incoming_ray.direction()), _record.normal);
    _scattered_ray = ray(_record.hit_point, reflected + fuzziness * random_in_unit_sphere(), _incoming_ray.get_time());
    _attenuation = albedo;

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movsd 0xc(%rsi), %xmm0
movss 0x14(%rsi), %xmm1
movaps %xmm0, %xmm2
mulps %xmm0, %xmm2
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
movaps %xmm0, %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
addss %xmm3, %xmm2
sqrtss %xmm2, %xmm2
divss %xmm2, %xmm1
unpcklps %xmm2, %xmm2            # xmm2 = xmm2[0,0,1,1]
divps %xmm2, %xmm0
leaq 0x30(%rsp), %rdi
movlps %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
leaq 0x18(%rdx), %rsi
callq 0x14b53
movaps %xmm0, 0x20(%rsp)
movss %xmm1, 0xc(%rsp)
movss 0x14(%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
callq 0x14a37
movaps 0x10(%rsp), %xmm2
mulss %xmm2, %xmm1
unpcklps %xmm2, %xmm2            # xmm2 = xmm2[0,0,1,1]
mulps %xmm0, %xmm2
addps 0x20(%rsp), %xmm2
addss 0xc(%rsp), %xmm1
movss 0x18(%r13), %xmm0
movl 0x14(%r12), %eax
movq 0xc(%r12), %rcx
movq %rcx, (%r14)
movl %eax, 0x8(%r14)
movlps %xmm2, 0xc(%r14)
movss %xmm1, 0x14(%r14)
movss %xmm0, 0x18(%r14)
movq 0x8(%r15), %rax
movq %rax, (%rbx)
movl 0x10(%r15), %eax
movl %eax, 0x8(%rbx)
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi_load_from_file
STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
{
   unsigned char *result;
   stbi__context s;
   stbi__start_file(&s,f);
   result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
   if (result) {
      // need to 'unget' all the characters in the IO buffer
      fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);
   }
   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x23ca8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x23d27
movq %rax, %r14
testq %rax, %rax
je 0x23c93
movl 0xb8(%rsp), %eax
subl 0xc0(%rsp), %eax
movslq %eax, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6450
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__load_and_postprocess_8bit(stbi__context*, int*, int*, int*, int)
static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   stbi__result_info ri;
   void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8);

   if (result == NULL)
      return NULL;

   if (ri.bits_per_channel != 8) {
      STBI_ASSERT(ri.bits_per_channel == 16);
      result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp);
      ri.bits_per_channel = 8;
   }

   // @TODO: move stbi__convert_format to here

   if (stbi__vertically_flip_on_load) {
      int channels = req_comp ? req_comp : *comp;
      stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc));
   }

   return (unsigned char *) result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movl $0x8, (%rsp)
leaq 0x1c(%rsp), %r9
callq 0x287f2
testq %rax, %rax
je 0x23dbe
movq %rax, %rbp
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
movq %r13, 0x10(%rsp)
je 0x23dc3
cmpl $0x10, %eax
jne 0x23e0c
movl (%r15), %eax
movl (%r14), %r12d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x23d81
movl (%r13), %ecx
imull %eax, %r12d
imull %ecx, %r12d
movslq %r12d, %rdi
callq 0x64c0
movq %rax, %r13
testq %rax, %rax
je 0x23dc8
testl %r12d, %r12d
jle 0x23db4
movl %r12d, %eax
xorl %ecx, %ecx
movb 0x1(%rbp,%rcx,2), %dl
movb %dl, (%r13,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x23da3
movq %rbp, %rdi
callq 0x6490
jmp 0x23dd6
xorl %r13d, %r13d
jmp 0x23dfa
movq %rbp, %r13
jmp 0x23dd6
leaq 0x1bbbd(%rip), %rax     # 0x3f98c
movq %rax, 0x2b6f2(%rip)     # 0x4f4c8
cmpl $0x0, 0x2b6f3(%rip)     # 0x4f4d0
je 0x23dfa
testl %ebx, %ebx
jne 0x23dea
movq 0x10(%rsp), %rax
movl (%rax), %ebx
movl (%r15), %esi
movl (%r14), %edx
movq %r13, %rdi
movl %ebx, %ecx
callq 0x2c36f
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b9e6(%rip), %rdi     # 0x3f7f9
leaq 0x1b9f9(%rip), %rsi     # 0x3f813
leaq 0x1ba06(%rip), %rcx     # 0x3f827
movl $0x468, %edx            # imm = 0x468
callq 0x6250
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi_load_from_file_16
STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp)
{
   stbi__uint16 *result;
   stbi__context s;
   stbi__start_file(&s,f);
   result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp);
   if (result) {
      // need to 'unget' all the characters in the IO buffer
      fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);
   }
   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x23ca8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x23ea8
movq %rax, %r14
testq %rax, %rax
je 0x23e93
movl 0xb8(%rsp), %eax
subl 0xc0(%rsp), %eax
movslq %eax, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6450
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int)
static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   stbi__result_info ri;
   void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16);

   if (result == NULL)
      return NULL;

   if (ri.bits_per_channel != 16) {
      STBI_ASSERT(ri.bits_per_channel == 8);
      result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp);
      ri.bits_per_channel = 16;
   }

   // @TODO: move stbi__convert_format16 to here
   // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision

   if (stbi__vertically_flip_on_load) {
      int channels = req_comp ? req_comp : *comp;
      stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16));
   }

   return (stbi__uint16 *) result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r12
movl $0x10, (%rsp)
leaq 0x1c(%rsp), %r9
callq 0x287f2
testq %rax, %rax
je 0x23f0c
movq %rax, %r15
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
je 0x23f14
cmpl $0x10, %eax
je 0x23f8c
leaq 0x1c243(%rip), %rdi     # 0x40137
leaq 0x1b918(%rip), %rsi     # 0x3f813
leaq 0x1c24e(%rip), %rcx     # 0x40150
movl $0x480, %edx            # imm = 0x480
callq 0x6250
xorl %r15d, %r15d
jmp 0x23faf
movl (%r12), %eax
movl (%r14), %r13d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x23f24
movl (%rbp), %ecx
movq %rbp, 0x10(%rsp)
imull %eax, %r13d
imull %ecx, %r13d
leal (,%r13,2), %eax
movslq %eax, %rdi
callq 0x64c0
movq %rax, %rbp
testq %rax, %rax
je 0x23f76
testl %r13d, %r13d
jle 0x23f6c
movl %r13d, %eax
xorl %ecx, %ecx
movzbl (%r15,%rcx), %edx
movl %edx, %esi
shll $0x8, %esi
orl %edx, %esi
movw %si, (%rbp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x23f53
movq %r15, %rdi
callq 0x6490
jmp 0x23f84
leaq 0x1ba0f(%rip), %rax     # 0x3f98c
movq %rax, 0x2b544(%rip)     # 0x4f4c8
movq %rbp, %r15
movq 0x10(%rsp), %rbp
cmpl $0x0, 0x2b53d(%rip)     # 0x4f4d0
je 0x23faf
testl %ebx, %ebx
jne 0x23f9c
movl (%rbp), %ebx
movl (%r12), %esi
movl (%r14), %edx
addl %ebx, %ebx
movq %r15, %rdi
movl %ebx, %ecx
callq 0x2c36f
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi_load_16
STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp)
{
   FILE *f = stbi__fopen(filename, "rb");
   stbi__uint16 *result;
   if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file");
   result = stbi_load_from_file_16(f,x,y,comp,req_comp);
   fclose(f);
   return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
leaq 0x1b703(%rip), %rsi     # 0x3f6e0
callq 0x6480
testq %rax, %rax
je 0x2400e
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x23e2b
movq %rax, %rbx
movq %r13, %rdi
callq 0x63e0
movq %rbx, %rax
jmp 0x2401e
leaq 0x1b6ce(%rip), %rax     # 0x3f6e3
movq %rax, 0x2b4ac(%rip)     # 0x4f4c8
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__hdr_test(stbi__context*)
static int stbi__hdr_test(stbi__context* s)
{
   int r = stbi__hdr_test_core(s, "#?RADIANCE\n");
   stbi__rewind(s);
   if(!r) {
       r = stbi__hdr_test_core(s, "#?RGBE\n");
       stbi__rewind(s);
   }
   return r;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1b9f1(%rip), %rsi     # 0x402fb
callq 0x37e44
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
testl %eax, %eax
je 0x24928
movl $0x1, %eax
popq %rbx
retq
leaq 0x1b9d8(%rip), %rsi     # 0x40307
movq %rbx, %rdi
callq 0x37e44
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi_is_hdr_from_file
STBIDEF int stbi_is_hdr_from_file(FILE *f)
{
   #ifndef STBI_NO_HDR
   long pos = ftell(f);
   int res;
   stbi__context s;
   stbi__start_file(&s,f);
   res = stbi__hdr_test(&s);
   fseek(f, pos, SEEK_SET);
   return res;
   #else
   STBI_NOTUSED(f);
   return 0;
   #endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
callq 0x6030
movq %rax, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x23ca8
movq %r15, %rdi
callq 0x248ff
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6450
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi_is_16_bit
STBIDEF int stbi_is_16_bit(char const *filename)
{
    FILE *f = stbi__fopen(filename, "rb");
    int result;
    if (!f) return stbi__err("can't fopen", "Unable to open file");
    result = stbi_is_16_bit_from_file(f);
    fclose(f);
    return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x19d72(%rip), %rsi     # 0x3f6e0
callq 0x6480
testq %rax, %rax
je 0x25991
movq %rax, %rbx
movq %rax, %rdi
callq 0x259a8
movl %eax, %ebp
movq %rbx, %rdi
callq 0x63e0
movl %ebp, %eax
jmp 0x259a1
leaq 0x19d4b(%rip), %rax     # 0x3f6e3
movq %rax, 0x29b29(%rip)     # 0x4f4c8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__is_16_main(stbi__context*)
static int stbi__is_16_main(stbi__context *s)
{
   #ifndef STBI_NO_PNG
   if (stbi__png_is16(s))  return 1;
   #endif

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

   return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, (%rdi)
movl $0x2, %esi
xorl %edx, %edx
callq 0x32e8e
testl %eax, %eax
je 0x25a25
cmpl $0x10, 0x20(%rsp)
jne 0x25a25
movl $0x1, %eax
jmp 0x25b02
movq (%rsp), %rax
movups 0xc8(%rax), %xmm0
movups %xmm0, 0xb8(%rax)
movq %rbx, %rdi
callq 0x31b23
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x31b23
orl %ebp, %eax
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x25af2
movq %rbx, %rdi
callq 0x31b23
cmpl $0x1, %eax
jne 0x25af2
cmpq $0x0, 0x10(%rbx)
je 0x25a9f
movq 0xb8(%rbx), %rax
movq 0xc0(%rbx), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x5, %ecx
jg 0x25aa6
movq %rdx, 0xb8(%rbx)
movq 0x28(%rbx), %rdi
movl $0x6, %esi
subl %ecx, %esi
callq *0x18(%rbx)
jmp 0x25ab1
movq 0xb8(%rbx), %rax
addq $0x6, %rax
movq %rax, 0xb8(%rbx)
movq %rbx, %rdi
callq 0x31b23
cmpl $0x10, %eax
ja 0x25af2
movq %rbx, %rdi
callq 0x31b23
movq %rbx, %rdi
callq 0x31b23
movq %rbx, %rdi
callq 0x31b23
movq %rbx, %rdi
callq 0x31b23
movq %rbx, %rdi
callq 0x31b23
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x10, %ecx
je 0x25b02
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image_write.h
// 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((const unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;

   f = stbiw__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 0x270c4
testq %rax, %rax
je 0x27785
movq %rax, %rbx
leaq 0x18081(%rip), %rsi     # 0x3f7d2
movq %r14, %rdi
callq 0x6480
testq %rax, %rax
je 0x27789
movq %rax, %r14
movslq 0xc(%rsp), %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x6770
movq %r14, %rdi
callq 0x63e0
movl $0x1, %ebp
jmp 0x2778b
xorl %ebp, %ebp
jmp 0x27793
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x6490
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image_write.h
// Function: stbi_write_jpg
STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality)
{
   stbi__write_context s;
   if (stbi__start_write_file(&s,filename)) {
      int r = stbi_write_jpg_core(&s, x, y, comp, data, quality);
      stbi__end_write_file(&s);
      return r;
   } else
      return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r13d
leaq 0x177c6(%rip), %rsi     # 0x3f7d2
callq 0x6480
movq %rax, %r12
leaq 0x10e54(%rip), %rax     # 0x38e6f
movq %rax, 0x8(%rsp)
movq %r12, 0x10(%rsp)
testq %r12, %r12
je 0x2804e
leaq 0x8(%rsp), %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
movl %ebx, %r9d
callq 0x2781f
movl %eax, %ebx
movq %r12, %rdi
callq 0x63e0
jmp 0x28050
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/main.cpp
// Function: get_color(ray const&, std::shared_ptr<hitable>, int)
vec3 get_color(const ray& _ray, std::shared_ptr<hitable> _world, int depth)
{
    hit_record rec;
    if(_world->hit(_ray, 0.001f, MAXFLOAT, rec))
    {
        ray scattered;
        vec3 attenuation;
        vec3 emitted = rec.material_ref->emitted(rec.u, rec.v, rec.hit_point);

        if(depth < 50 && rec.material_ref->scatter(_ray, rec, attenuation, scattered))
        {
            return emitted + attenuation * get_color(scattered, _world, depth + 1);
        }
        else
        {
            return emitted;
        }
    }
    else // here is where the "clear color", or the "background color" lays
    {
        return vec3(0.0f, 0.0f, 0.0f);
        //return vec3(0.1f, 0.1f, 0.1f);

        // the color here will also provide "brightness" when returning to last recursion

        // vec3 unit_direction = unit_vector(_ray.direction());
        // float t = 0.5f * (unit_direction.y() + 1.0f);
        // return (1.0 - t) * vec3(1.0, 1.0, 1.0) + t * vec3(0.5, 0.7, 1.0);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm1, %xmm1
leaq 0x48(%rsp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movups %xmm1, 0x28(%rdx)
movq (%rsi), %rdi
movq (%rdi), %rax
movss 0x153bd(%rip), %xmm0    # 0x3d454
movss 0x142c5(%rip), %xmm1    # 0x3c364
movq %r15, %rsi
callq *(%rax)
xorps %xmm1, %xmm1
testb %al, %al
je 0x2818d
leaq 0x54(%rsp), %rsi
movq 0x1c(%rsi), %rdi
movss -0x8(%rsi), %xmm0
movss -0x4(%rsi), %xmm1
movq (%rdi), %rax
callq *0x8(%rax)
movaps %xmm0, 0x10(%rsp)
cmpl $0x31, %ebx
jg 0x2818d
leaq 0x48(%rsp), %rdx
movq 0x28(%rdx), %rdi
movq (%rdi), %rax
leaq 0x38(%rsp), %rcx
leaq 0x84(%rsp), %r8
movq %r15, %rsi
movss %xmm1, 0xc(%rsp)
callq *(%rax)
movss 0xc(%rsp), %xmm1
testb %al, %al
je 0x2818d
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x28133
movq 0x26e7b(%rip), %rcx     # 0x4efa0
cmpb $0x0, (%rcx)
je 0x2812f
incl 0x8(%rax)
jmp 0x28133
lock
incl 0x8(%rax)
incl %ebx
leaq 0x84(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebx, %edx
callq 0x28061
mulss 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
mulps %xmm2, %xmm0
movaps 0x10(%rsp), %xmm2
addps %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
movss 0xc(%rsp), %xmm0
addss %xmm1, %xmm0
movaps %xmm0, %xmm1
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2818d
movss %xmm1, 0xc(%rsp)
callq 0x7774
movss 0xc(%rsp), %xmm1
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x281a8
movss %xmm1, 0xc(%rsp)
callq 0x7774
movss 0xc(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x281d3
callq 0x7774
jmp 0x281d3
jmp 0x281d0
movq %rax, %rbx
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x281e2
callq 0x7774
movq %rbx, %rdi
callq 0x66e0
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__vertical_flip(void*, int, int, int)
static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel)
{
   int row;
   size_t bytes_per_row = (size_t)w * bytes_per_pixel;
   stbi_uc temp[2048];
   stbi_uc *bytes = (stbi_uc *)image;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %rdi, 0x20(%rsp)
movl %edx, 0x14(%rsp)
movl %edx, %eax
sarl %eax
testl %eax, %eax
jle 0x2c44a
movslq %esi, %rdx
movslq %ecx, %rcx
imulq %rdx, %rcx
movq %rcx, 0x18(%rsp)
movl %eax, %eax
movq %rax, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x800, %ebx            # imm = 0x800
leaq 0x30(%rsp), %r15
cmpq $0x0, 0x18(%rsp)
je 0x2c432
movq 0x8(%rsp), %rcx
movl %ecx, %eax
notl %eax
addl 0x14(%rsp), %eax
movslq %eax, %r12
movq 0x18(%rsp), %r14
imulq %r14, %r12
movq 0x20(%rsp), %rax
addq %rax, %r12
movq %r14, %r13
imulq %rcx, %r13
addq %rax, %r13
cmpq %rbx, %r14
movl $0x800, %ebp            # imm = 0x800
cmovbq %r14, %rbp
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x6330
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x6330
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x6330
addq %rbp, %r13
addq %rbp, %r12
subq %rbp, %r14
jne 0x2c3f1
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x2c3be
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__pnm_load(stbi__context*, int*, int*, int*, int, stbi__result_info*)
static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri)
{
   stbi_uc *out;
   STBI_NOTUSED(ri);

   if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n))
      return 0;

   *x = s->img_x;
   *y = s->img_y;
   if (comp) *comp = s->img_n;

   if (!stbi__mad3sizes_valid(s->img_n, s->img_x, s->img_y, 0))
      return stbi__errpuc("too large", "PNM too large");

   out = (stbi_uc *) stbi__malloc_mad3(s->img_n, s->img_x, s->img_y, 0);
   if (!out) return stbi__errpuc("outofmem", "Out of memory");
   stbi__getn(s, out, s->img_n * s->img_x * s->img_y);

   if (req_comp && req_comp != s->img_n) {
      out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);
      if (out == NULL) return out; // stbi__convert_format frees input on failure
   }
   return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, 0x4(%rsp)
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
leaq 0x4(%rdi), %r12
leaq 0x8(%rdi), %r15
movq %rdi, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x36fc6
testl %eax, %eax
je 0x2e749
movl (%r14), %eax
movl %eax, (%rbp)
movl 0x4(%r14), %ebp
movl %ebp, (%r13)
movl 0x8(%r14), %r13d
testq %rbx, %rbx
je 0x2e6c7
movl %r13d, (%rbx)
movl (%r12), %ebp
movl (%r14), %ebx
movl %r13d, %edi
movl %ebx, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x31db0
testl %eax, %eax
je 0x2e732
movl %r13d, %edi
movl %ebx, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x31ec4
testq %rax, %rax
je 0x2e73b
movq %rax, %r12
imull %r13d, %ebx
imull %ebp, %ebx
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x345e4
movl 0x4(%rsp), %edx
testl %edx, %edx
je 0x2e74c
movl (%r15), %esi
cmpl %edx, %esi
je 0x2e74c
movl (%r14), %ecx
movl 0x4(%r14), %r8d
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33d4f
leaq 0x11249(%rip), %rax     # 0x3f982
jmp 0x2e742
leaq 0x1124a(%rip), %rax     # 0x3f98c
movq %rax, 0x20d7f(%rip)     # 0x4f4c8
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__decode_jpeg_header(stbi__jpeg*, int)
static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
{
   int m;
   z->jfif = 0;
   z->app14_color_transform = -1; // valid values are 0,1,2
   z->marker = STBI__MARKER_none; // initialize cached marker to empty
   m = stbi__get_marker(z);
   if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG");
   if (scan == STBI__SCAN_type) return 1;
   m = stbi__get_marker(z);
   while (!stbi__SOF(m)) {
      if (!stbi__process_marker(z,m)) return 0;
      m = stbi__get_marker(z);
      while (m == STBI__MARKER_none) {
         // some files have extra padding after their blocks, so ok, we'll scan
         if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG");
         m = stbi__get_marker(z);
      }
   }
   z->progressive = stbi__SOF_progressive(m);
   if (!stbi__process_frame_header(z, scan)) return 0;
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x4848(%rdi)
movb $-0x1, 0x4828(%rdi)
callq 0x30b5b
cmpb $-0x28, %al
jne 0x3002c
movl $0x1, %ebp
cmpl $0x1, %ebx
je 0x3003c
movq %r14, %rdi
callq 0x30b5b
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
sete %cl
cmpb $-0x3e, %sil
sete %dl
orb %cl, %dl
jne 0x3000a
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x30c74
testl %eax, %eax
je 0x3003c
movq %r14, %rdi
callq 0x30b5b
cmpb $-0x1, %al
jne 0x2fff6
movq (%r14), %r15
cmpq $0x0, 0x10(%r15)
je 0x2ffe4
movq 0x28(%r15), %rdi
callq *0x20(%r15)
testl %eax, %eax
je 0x2ffbb
cmpl $0x0, 0x30(%r15)
je 0x30049
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x2ffbb
jmp 0x30049
cmpb $-0x3e, %al
je 0x3000a
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
jne 0x2ffab
xorl %ecx, %ecx
cmpb $-0x3e, %al
sete %cl
movl %ecx, 0x4830(%r14)
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31461
leaq 0xf861(%rip), %rax      # 0x3f894
movq %rax, 0x1f48e(%rip)     # 0x4f4c8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf84b(%rip), %rax      # 0x3f89b
movq %rax, 0x1f471(%rip)     # 0x4f4c8
jmp 0x3003c
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__build_huffman(stbi__huffman*, int*)
static int stbi__build_huffman(stbi__huffman *h, int *count)
{
   int i,j,k=0;
   unsigned int code;
   // build size list for each symbol (from JPEG spec)
   for (i=0; i < 16; ++i)
      for (j=0; j < count[i]; ++j)
         h->size[k++] = (stbi_uc) (i+1);
   h->size[k] = 0;

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

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x0, (%rsi,%rcx,4)
jle 0x31c41
leal 0x1(%rcx), %edi
movslq %edx, %r8
addq %rax, %r8
xorl %r9d, %r9d
movb %dil, (%r8,%r9)
incq %r9
cmpl (%rsi,%rcx,4), %r9d
jl 0x31c31
addl %r9d, %edx
incq %rcx
cmpq $0x10, %rcx
jne 0x31c1f
movslq %edx, %rax
movb $0x0, 0x500(%rbx,%rax)
leaq 0x200(%rbx), %rdx
leaq 0x501(%rbx), %rsi
xorl %edi, %edi
movl $0x1, %eax
xorl %ebp, %ebp
movl %ebp, %ecx
subl %edi, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %ebp, %rcx
movzbl 0x500(%rbx,%rcx), %r8d
cmpq %r8, %rax
jne 0x31cb9
leaq (%rdx,%rcx,2), %r8
addq %rsi, %rcx
movw %di, (%r8)
incl %edi
movzbl (%rcx), %r9d
addq $0x2, %r8
incl %ebp
incq %rcx
cmpq %r9, %rax
je 0x31c8f
leal -0x1(%rdi), %r8d
movl %eax, %ecx
shrl %cl, %r8d
testl %r8d, %r8d
jne 0x31d43
movb $0x10, %cl
subb %al, %cl
movl %edi, %r8d
shll %cl, %r8d
movl %r8d, 0x604(%rbx,%rax,4)
addl %edi, %edi
incq %rax
cmpq $0x11, %rax
jne 0x31c6c
movl $0xffffffff, 0x648(%rbx) # imm = 0xFFFFFFFF
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x6210
movl $0x1, %eax
testl %ebp, %ebp
jle 0x31d53
movl %ebp, %edx
xorl %esi, %esi
movzbl 0x500(%rbx,%rsi), %r8d
cmpq $0x9, %r8
ja 0x31d39
movzwl 0x200(%rbx,%rsi,2), %edi
movl $0x9, %ecx
subq %r8, %rcx
shlq %cl, %rdi
addq %rbx, %rdi
xorl %r8d, %r8d
movb %sil, (%rdi,%r8)
incq %r8
movl %r8d, %r9d
shrl %cl, %r9d
testl %r9d, %r9d
je 0x31d27
incq %rsi
cmpq %rdx, %rsi
jne 0x31cff
jmp 0x31d53
leaq 0xdbd0(%rip), %rax      # 0x3f91a
movq %rax, 0x1d777(%rip)     # 0x4f4c8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__mad4sizes_valid(int, int, int, int, int)
static int stbi__mul2sizes_valid(int a, int b)
{
   if (a < 0 || b < 0) return 0;
   if (b == 0) return 1; // mul-by-0 is always safe
   // portable way to check for no overflows in a*b
   return a <= INT_MAX/b;
}

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

// Assembly:
testl %esi, %esi
jle 0x31ec3
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
addq $0x46f0, %rbx           # imm = 0x46F0
shlq $0x5, %rax
leaq (%rax,%rax,2), %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq -0x18(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x31e7f
callq 0x6490
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rbx,%r12)
movq -0x10(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x31e97
callq 0x6490
movq %r15, -0x10(%rbx,%r12)
movq %r15, (%rbx,%r12)
movq -0x8(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x31eaf
callq 0x6490
movq $0x0, -0x8(%rbx,%r12)
addq $0x60, %r12
cmpq %r12, %r14
jne 0x31e67
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__grow_buffer_unsafe(stbi__jpeg*)
static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
{
   do {
      unsigned int b = j->nomore ? 0 : stbi__get8(j->s);
      if (b == 0xff) {
         int c = stbi__get8(j->s);
         while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes
         if (c != 0) {
            j->marker = (unsigned char) c;
            j->nomore = 1;
            return;
         }
      }
      j->code_buffer |= b << (24 - j->code_bits);
      j->code_bits += 8;
   } while (j->code_bits <= 24);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x482c(%rbx)
je 0x329cf
xorl %eax, %eax
jmp 0x32ae4
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jae 0x329f1
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movb (%rax), %al
jmp 0x32a3f
cmpl $0x0, 0x30(%r15)
je 0x329c8
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x32a1a
movslq %eax, %rcx
addq %r14, %rcx
movb (%r14), %al
jmp 0x32a2d
movl $0x0, 0x30(%r15)
leaq 0x39(%r15), %rcx
movb $0x0, 0x38(%r15)
xorl %eax, %eax
movq %rcx, 0xc0(%r15)
leaq 0x39(%r15), %rcx
movq %rcx, 0xb8(%r15)
cmpb $-0x1, %al
jne 0x32ae4
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jae 0x32a69
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movb (%rax), %al
jmp 0x32a72
cmpl $0x0, 0x30(%r15)
jne 0x32a92
xorl %eax, %eax
cmpb $-0x1, %al
jne 0x32adb
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x32a5a
xorl %eax, %eax
cmpl $0x0, 0x30(%r15)
je 0x32a72
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x32ab4
movslq %eax, %rcx
addq %r14, %rcx
movb (%r14), %al
jmp 0x32ac7
movl $0x0, 0x30(%r15)
leaq 0x39(%r15), %rcx
movb $0x0, 0x38(%r15)
xorl %eax, %eax
movq %rcx, 0xc0(%r15)
leaq 0x39(%r15), %rcx
movq %rcx, 0xb8(%r15)
jmp 0x32a72
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x32b0d
movb $-0x1, %al
movzbl %al, %eax
movl 0x4824(%rbx), %edx
movb $0x18, %cl
subb %dl, %cl
shll %cl, %eax
orl %eax, 0x4820(%rbx)
leal 0x8(%rdx), %eax
movl %eax, 0x4824(%rbx)
cmpl $0x11, %edx
jl 0x329bf
jmp 0x32b1d
movb %al, 0x4828(%rbx)
movl $0x1, 0x482c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__compute_transparency16(stbi__png*, unsigned short*, int)
static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n)
{
   stbi__context *s = z->s;
   stbi__uint32 i, pixel_count = s->img_x * s->img_y;
   stbi__uint16 *p = (stbi__uint16*) z->out;

   // compute color-based transparency, assuming we've
   // already got 65535 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 : 65535);
         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:
imull %esi, %edi
cmpl $0x2, %r8d
je 0x346cc
cmpl $0x4, %r8d
jne 0x346f3
testl %edi, %edi
je 0x346f2
movl %edi, %eax
xorl %esi, %esi
movzwl (%rdx,%rsi,8), %edi
cmpw (%rcx), %di
jne 0x346c3
movzwl 0x2(%rdx,%rsi,8), %edi
cmpw 0x2(%rcx), %di
jne 0x346c3
movzwl 0x4(%rdx,%rsi,8), %edi
cmpw 0x4(%rcx), %di
jne 0x346c3
movw $0x0, 0x6(%rdx,%rsi,8)
incq %rsi
cmpl %esi, %eax
jne 0x3469d
jmp 0x346f2
testl %edi, %edi
je 0x346f2
movl %edi, %eax
xorl %esi, %esi
movzwl (%rdx,%rsi,4), %edi
xorl %r8d, %r8d
cmpw (%rcx), %di
setne %r8b
negl %r8d
movw %r8w, 0x2(%rdx,%rsi,4)
incq %rsi
cmpl %esi, %eax
jne 0x346d4
retq
pushq %rax
leaq 0xb60d(%rip), %rdi      # 0x3fd08
leaq 0xb111(%rip), %rsi      # 0x3f813
leaq 0xb618(%rip), %rcx      # 0x3fd21
movl $0x124d, %edx           # imm = 0x124D
callq 0x6250
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// 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:
imull %esi, %edi
cmpl $0x2, %r8d
je 0x34757
cmpl $0x4, %r8d
jne 0x3477a
testl %edi, %edi
je 0x34779
movl %edi, %eax
xorl %esi, %esi
movb (%rdx,%rsi,4), %dil
cmpb (%rcx), %dil
jne 0x3474e
movb 0x1(%rdx,%rsi,4), %dil
cmpb 0x1(%rcx), %dil
jne 0x3474e
movb 0x2(%rdx,%rsi,4), %dil
cmpb 0x2(%rcx), %dil
jne 0x3474e
movb $0x0, 0x3(%rdx,%rsi,4)
incq %rsi
cmpl %esi, %eax
jne 0x3472a
jmp 0x34779
testl %edi, %edi
je 0x34779
movl %edi, %eax
xorl %esi, %esi
movb (%rdx,%rsi,2), %dil
cmpb (%rcx), %dil
setne %dil
negb %dil
movb %dil, 0x1(%rdx,%rsi,2)
incq %rsi
cmpl %esi, %eax
jne 0x3475f
retq
pushq %rax
leaq 0xb586(%rip), %rdi      # 0x3fd08
leaq 0xb08a(%rip), %rsi      # 0x3f813
leaq 0xb5d4(%rip), %rcx      # 0x3fd64
movl $0x1234, %edx           # imm = 0x1234
callq 0x6250
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__shiftsigned(unsigned int, int, int)
static int stbi__shiftsigned(unsigned int v, int shift, int bits)
{
   static unsigned int mul_table[9] = {
      0,
      0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/,
      0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/,
   };
   static unsigned int shift_table[9] = {
      0, 0,0,1,0,2,4,6,0,
   };
   if (shift < 0)
      v <<= -shift;
   else
      v >>= shift;
   STBI_ASSERT(v >= 0 && v < 256);
   v >>= (8-bits);
   STBI_ASSERT(bits >= 0 && bits <= 8);
   return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];
}

// Assembly:
pushq %rax
movl %esi, %ecx
negb %cl
movl %edi, %eax
shll %cl, %eax
movl %esi, %ecx
shrl %cl, %edi
testl %esi, %esi
cmovsl %eax, %edi
cmpl $0x100, %edi            # imm = 0x100
jae 0x35b80
cmpl $0x9, %edx
jge 0x35b9f
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %edi
movl %edx, %eax
leaq 0x7ef4(%rip), %rcx      # 0x3da60
imull (%rcx,%rax,4), %edi
leaq 0x7f19(%rip), %rcx      # 0x3da90
movb (%rcx,%rax,4), %cl
sarl %cl, %edi
movl %edi, %eax
popq %rcx
retq
leaq 0xa360(%rip), %rdi      # 0x3fee7
leaq 0x9c85(%rip), %rsi      # 0x3f813
leaq 0xa364(%rip), %rcx      # 0x3fef9
movl $0x13f9, %edx           # imm = 0x13F9
callq 0x6250
leaq 0xa381(%rip), %rdi      # 0x3ff27
leaq 0x9c66(%rip), %rsi      # 0x3f813
leaq 0xa345(%rip), %rcx      # 0x3fef9
movl $0x13fb, %edx           # imm = 0x13FB
callq 0x6250
// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__out_gif_code(stbi__gif*, unsigned short)
static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
{
   stbi_uc *p, *c;
   int idx; 

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

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

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

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

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

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x834(%rdi,%r14,4), %eax
testw %ax, %ax
js 0x36d1d
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x36cfa
movslq 0x8860(%rbx), %rcx
cmpl 0x8858(%rbx), %ecx
jge 0x36e00
movslq 0x885c(%rbx), %rax
addq %rcx, %rax
movq 0x8(%rbx), %rcx
leal 0x3(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movq 0x18(%rbx), %rsi
sarl $0x2, %edx
movslq %edx, %rdx
movb $0x1, (%rsi,%rdx)
movq 0x8838(%rbx), %rdx
movzbl 0x837(%rbx,%r14,4), %esi
cmpb $-0x7f, 0x3(%rdx,%rsi,4)
jb 0x36d8f
movb 0x2(%rdx,%rsi,4), %dil
movb %dil, (%rcx,%rax)
movb 0x1(%rdx,%rsi,4), %dil
movb %dil, 0x1(%rcx,%rax)
movb (%rdx,%rsi,4), %dil
movb %dil, 0x2(%rcx,%rax)
movb 0x3(%rdx,%rsi,4), %dl
movb %dl, 0x3(%rcx,%rax)
movl 0x885c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x885c(%rbx)
cmpl 0x8854(%rbx), %eax
jl 0x36e00
movl 0x884c(%rbx), %ecx
movl 0x8858(%rbx), %eax
movl %ecx, 0x885c(%rbx)
movl 0x8860(%rbx), %ecx
addl 0x8844(%rbx), %ecx
movl %ecx, 0x8860(%rbx)
cmpl %eax, %ecx
jl 0x36e00
movl 0x8840(%rbx), %ecx
testl %ecx, %ecx
jle 0x36e00
movl 0x8864(%rbx), %edx
shll %cl, %edx
movl %edx, 0x8844(%rbx)
sarl %edx
addl 0x8850(%rbx), %edx
movl %edx, 0x8860(%rbx)
decl %ecx
movl %ecx, 0x8840(%rbx)
cmpl %eax, %edx
jge 0x36dd4
addq $0x8, %rsp
popq %rbx
popq %r14
retq