LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/src/util.cpp
// Function: two_perlin_sphere()
std::shared_ptr<hitable> two_perlin_sphere()
{
    std::shared_ptr<texture> _perlin_texture = std::make_shared<perlin_noise_texture>(4.0f);

    std::vector<std::shared_ptr<hitable>> list;
    list.reserve(50);

    list.push_back(std::make_shared<sphere>(vec3(0.0f, -1000.0f, 0.0f), 1000.0f, std::make_shared<lambertian>(_perlin_texture)));
    list.push_back(std::make_shared<sphere>(vec3(0.0f,  2.0f, 0.0f), 2.0f, std::make_shared<lambertian>(_perlin_texture)));

    return std::make_shared<bvh_node>(list, 0.0f, 1.0f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
leaq 0x30(%rsp), %rsi
movl $0x40800000, (%rsi)     # imm = 0x40800000
leaq 0x40(%rsp), %rdi
callq 0x16d98
leaq 0x78(%rsp), %rbx
leaq 0x48(%rsp), %r15
movaps -0x8(%r15), %xmm0
movaps %xmm0, -0x8(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
movq %r15, %rdi
callq 0x7426
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
andq $0x0, 0x8(%r15)
leaq 0x40(%rsp), %rdi
pushq $0x32
popq %rsi
callq 0x71e8
movsd 0x1d72b(%rip), %xmm0    # 0x30570
movsd %xmm0, 0x20(%rsp)
andl $0x0, 0x28(%rsp)
movl $0x447a0000, 0xc(%rsp)  # imm = 0x447A0000
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x16bf0
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x16d74
leaq 0x38(%rsp), %r12
leaq 0x68(%rsp), %r15
movaps -0x8(%r15), %xmm0
movaps %xmm0, -0x8(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7b8a
movq %r12, %rdi
callq 0x7426
movq %r15, %rdi
callq 0x7426
leaq 0x18(%rsp), %rdi
callq 0x7426
movsd 0x1d742(%rip), %xmm0    # 0x30610
movsd %xmm0, 0x20(%rsp)
andl $0x0, 0x28(%rsp)
movl $0x40000000, 0xc(%rsp)  # imm = 0x40000000
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x16bf0
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x16d74
leaq 0x38(%rsp), %r12
leaq 0x68(%rsp), %r15
movaps -0x8(%r15), %xmm0
movaps %xmm0, -0x8(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7b8a
movq %r12, %rdi
callq 0x7426
movq %r15, %rdi
callq 0x7426
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x7426
leaq 0x60(%rsp), %rdx
andl $0x0, (%rdx)
movl $0x3f800000, -0x8(%r15) # imm = 0x3F800000
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rcx
callq 0x16d50
leaq 0x38(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%r14)
andq $0x0, -0x8(%rdi)
callq 0x7426
leaq 0x40(%rsp), %rdi
callq 0x7404
movq %rbx, %rdi
callq 0x7426
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x12fe3
jmp 0x12fbd
jmp 0x12fd2
jmp 0x12fe3
movq %rax, %r14
movq %r12, %rdi
callq 0x7426
movq %r15, %rdi
callq 0x7426
jmp 0x12fd5
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x7426
jmp 0x12fe6
jmp 0x12fe3
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x7404
movq %rbx, %rdi
callq 0x7426
movq %r14, %rdi
callq 0x6710
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/tiny_obj_loader.h
// Function: tinyobj::parseReal(char const**, float*)
static inline bool parseReal(const char **token, real_t *out) {
  (*token) += strspn((*token), " \t");
  const char *end = (*token) + strcspn((*token), " \t\r");
  double val;
  bool ret = tryParseDouble((*token), end, &val);
  if (ret) {
    real_t f = static_cast<real_t>(val);
    (*out) = f;
  }
  (*token) = end;
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r12
leaq 0x1a4e5(%rip), %rsi     # 0x307b0
movq %r12, %rdi
callq 0x6180
addq %rax, %r12
movq %r12, (%rbx)
leaq 0x1aac5(%rip), %rsi     # 0x30da5
movq %r12, %rdi
callq 0x6050
movq %rax, %r15
addq %r12, %r15
movq %rsp, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x16041
testb %al, %al
je 0x1630a
cvtsd2ss (%rsp), %xmm0
movss %xmm0, (%r14)
movq %r15, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %r12
movsd (%rsi), %xmm0
movss 0x8(%rsi), %xmm1
leaq 0x10(%rsp), %rdi
movsd %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
leaq 0x18(%r12), %r14
movq %r14, %rsi
callq 0x9449
movsd 0xc(%r15), %xmm2
leaq 0x20(%rsp), %rsi
movlps %xmm0, (%rsi)
movss %xmm1, 0x8(%rsi)
movsd %xmm2, 0xc(%rsi)
movsd 0x14(%r15), %xmm0
movsd %xmm0, 0x14(%rsi)
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
movq %rbx, %rdx
callq *(%rax)
movl %eax, %ebp
testb %al, %al
je 0x1f136
addq $0xc, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f552
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, %ebp
testb %al, %al
je 0x1f1ce
movsd (%rbx), %xmm0
movss 0x8(%rbx), %xmm1
leaq 0x30(%rsp), %rdi
movsd %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
addq $0x18, %r14
movq %r14, %rsi
callq 0x896a
movaps %xmm0, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
movsd 0xc(%rbx), %xmm0
movss 0x14(%rbx), %xmm1
leaq 0x20(%rsp), %rdi
movsd %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
movq %r14, %rsi
callq 0x896a
movaps 0x10(%rsp), %xmm2
movlps %xmm2, (%rbx)
movss 0xc(%rsp), %xmm2
movss %xmm2, 0x8(%rbx)
movlps %xmm0, 0xc(%rbx)
movss %xmm1, 0x14(%rbx)
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/src/transform.cpp
// Function: rotate_y::hit(ray const&, float, float, hit_record&) const
bool rotate_y::hit(const ray& _ray, float t_min, float t_max, hit_record& rec) const
{
    vec3 origin = _ray.origin();
    vec3 direction = _ray.direction();
    origin[0] = cos_theta * _ray.origin()[0] - sin_theta * _ray.origin()[2];
    origin[2] = sin_theta * _ray.origin()[0] + cos_theta * _ray.origin()[2];
    direction[0] = cos_theta * _ray.direction()[0] - sin_theta * _ray.direction()[2];
    direction[2] = sin_theta * _ray.direction()[0] + cos_theta * _ray.direction()[2];

    ray rotated_ray(origin, direction, _ray.get_time());
    if(target->hit(rotated_ray, t_min, t_max, rec) == true)
    {
        vec3 hit_point = rec.hit_point;
        vec3 normal = rec.normal;

        hit_point[0] = cos_theta * rec.hit_point[0] + sin_theta * rec.hit_point[2];
        hit_point[2] = -sin_theta * rec.hit_point[0] + cos_theta * rec.hit_point[2];
        normal[0] = cos_theta * rec.normal[0] + sin_theta * rec.normal[2];
        normal[2] = -sin_theta * rec.normal[0] + cos_theta * rec.normal[2];

        rec.hit_point = hit_point;
        rec.normal = normal;
        return true;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movsd (%rsi), %xmm2
movss 0x8(%rsi), %xmm5
movsd 0xc(%rsi), %xmm3
movss 0x14(%rsi), %xmm6
movss 0x18(%rdi), %xmm4
movss 0x1c(%rdi), %xmm7
movaps %xmm5, %xmm8
mulss %xmm4, %xmm8
movaps %xmm7, %xmm9
mulss %xmm2, %xmm9
subss %xmm8, %xmm9
mulss %xmm7, %xmm5
movaps %xmm4, %xmm8
mulss %xmm2, %xmm8
movss %xmm9, %xmm2            # xmm2 = xmm9[0],xmm2[1,2,3]
addss %xmm5, %xmm8
movaps %xmm6, %xmm5
mulss %xmm4, %xmm5
mulss %xmm7, %xmm6
mulss %xmm3, %xmm7
subss %xmm5, %xmm7
mulss %xmm3, %xmm4
movss %xmm7, %xmm3            # xmm3 = xmm7[0],xmm3[1,2,3]
addss %xmm6, %xmm4
movss 0x18(%rsi), %xmm5
leaq 0x8(%rsp), %rsi
movlps %xmm2, (%rsi)
movss %xmm8, 0x8(%rsi)
movlps %xmm3, 0xc(%rsi)
movss %xmm4, 0x14(%rsi)
movss %xmm5, 0x18(%rsi)
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *(%rax)
testb %al, %al
je 0x1f537
movss 0xc(%rbx), %xmm2
movss 0x14(%rbx), %xmm3
movss 0x18(%rbx), %xmm0
movss 0x20(%rbx), %xmm4
movsd 0x18(%r14), %xmm5
movaps %xmm5, %xmm6
mulss %xmm3, %xmm6
movaps %xmm5, %xmm1
shufps $0x55, %xmm5, %xmm1     # xmm1 = xmm1[1,1],xmm5[1,1]
movaps %xmm1, %xmm7
mulss %xmm2, %xmm7
addss %xmm6, %xmm7
movaps 0x10e21(%rip), %xmm6    # 0x30320
xorps %xmm5, %xmm6
mulss %xmm4, %xmm1
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
mulps %xmm5, %xmm4
shufps $0xd4, %xmm5, %xmm6     # xmm6 = xmm6[0,1],xmm5[1,3]
shufps $0x52, %xmm5, %xmm6     # xmm6 = xmm6[2,0],xmm5[1,1]
mulss %xmm0, %xmm5
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
mulps %xmm6, %xmm0
addps %xmm4, %xmm0
subss %xmm5, %xmm1
movss %xmm7, 0xc(%rbx)
shufps $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movlps %xmm0, 0x14(%rbx)
movss %xmm1, 0x20(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/vec3.hpp
// Function: vec3::operator+=(vec3 const&)
inline vec3& vec3::operator+=(const vec3 &v){
    e[0]  += v.e[0];
    e[1]  += v.e[1];
    e[2]  += v.e[2];
    return *this;
}

// Assembly:
movq %rdi, %rax
movss (%rsi), %xmm0
addss (%rdi), %xmm0
movss %xmm0, (%rdi)
movss 0x4(%rsi), %xmm0
addss 0x4(%rdi), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0x8(%rsi), %xmm0
addss 0x8(%rdi), %xmm0
movss %xmm0, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r13
leaq 0xc(%rdx), %r14
leaq 0x18(%rdx), %rsi
movq %r14, %rdi
callq 0x896a
movaps %xmm0, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
callq 0x11d9a
addps 0x10(%rsp), %xmm0
addss 0xc(%rsp), %xmm1
leaq 0x28(%rsp), %rdi
movlps %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
movq %r14, %rsi
callq 0x9449
movss 0x18(%rbp), %xmm2
movl 0x14(%r15), %eax
movq 0xc(%r15), %rcx
movq %rcx, (%r12)
movl %eax, 0x8(%r12)
movlps %xmm0, 0xc(%r12)
movss %xmm1, 0x14(%r12)
movss %xmm2, 0x18(%r12)
movq 0x8(%r13), %rdi
movss 0x4(%r15), %xmm0
movss 0x8(%r15), %xmm1
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
movlps %xmm0, (%rbx)
movss %xmm1, 0x8(%rbx)
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
callq 0xbbab
leaq 0x30(%rsp), %rdi
movlps %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
leaq 0x18(%r12), %rsi
callq 0x11de8
movaps %xmm0, 0x20(%rsp)
movss %xmm1, 0xc(%rsp)
movss 0x14(%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
callq 0x11d11
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_O2/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 0x1fabe
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x1facd
movq %rax, %r14
testq %rax, %rax
je 0x1faa9
movl 0xb8(%rsp), %eax
subl 0xc0(%rsp), %eax
movslq %eax, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x64a0
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_O2/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 0x23d04
testq %rax, %rax
je 0x1fb5b
movq %rax, %rbp
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
movq %r13, 0x10(%rsp)
je 0x1fb60
cmpl $0x10, %eax
jne 0x1fbb3
movl (%r15), %eax
movl (%r14), %r12d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x1fb27
movl (%r13), %ecx
imull %eax, %r12d
imull %ecx, %r12d
movslq %r12d, %rdi
callq 0x6510
movq %rax, %r13
testq %rax, %rax
je 0x1fb6f
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
cmpq %rax, %r12
je 0x1fb65
movb 0x1(%rbp,%rax,2), %cl
movb %cl, (%r13,%rax)
incq %rax
jmp 0x1fb48
xorl %r13d, %r13d
jmp 0x1fba1
movq %rbp, %r13
jmp 0x1fb7d
movq %rbp, %rdi
callq 0x64d0
jmp 0x1fb7d
leaq 0x13d1e(%rip), %rax     # 0x33894
movq %rax, 0x2899b(%rip)     # 0x48518
cmpl $0x0, 0x2899c(%rip)     # 0x48520
je 0x1fba1
testl %ebx, %ebx
jne 0x1fb91
movq 0x10(%rsp), %rax
movl (%rax), %ebx
movl (%r15), %esi
movl (%r14), %edx
movq %r13, %rdi
movl %ebx, %ecx
callq 0x2713f
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13b47(%rip), %rdi     # 0x33701
leaq 0x13b5a(%rip), %rsi     # 0x3371b
leaq 0x13b67(%rip), %rcx     # 0x3372f
movl $0x468, %edx            # imm = 0x468
callq 0x6280
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1fabe
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x1fc4d
movq %rax, %r14
testq %rax, %rax
je 0x1fc38
movl 0xb8(%rsp), %eax
subl 0xc0(%rsp), %eax
movslq %eax, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x64a0
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_O2/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 0x23d04
testq %rax, %rax
je 0x1fcb1
movq %rax, %r15
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
je 0x1fcb9
cmpl $0x10, %eax
je 0x1fd31
leaq 0x143a6(%rip), %rdi     # 0x3403f
leaq 0x13a7b(%rip), %rsi     # 0x3371b
leaq 0x143b1(%rip), %rcx     # 0x34058
movl $0x480, %edx            # imm = 0x480
callq 0x6280
xorl %r15d, %r15d
jmp 0x1fd54
movl (%r12), %eax
movl (%r14), %r13d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x1fcc9
movl (%rbp), %ecx
movq %rbp, 0x10(%rsp)
imull %eax, %r13d
imull %ecx, %r13d
leal (,%r13,2), %eax
movslq %eax, %rdi
callq 0x6510
movq %rax, %rbp
testq %rax, %rax
je 0x1fd1b
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
cmpq %rax, %r13
je 0x1fd11
movzbl (%r15,%rax), %ecx
imull $0x101, %ecx, %ecx      # imm = 0x101
movw %cx, (%rbp,%rax,2)
incq %rax
jmp 0x1fcf7
movq %r15, %rdi
callq 0x64d0
jmp 0x1fd29
leaq 0x13b72(%rip), %rax     # 0x33894
movq %rax, 0x287ef(%rip)     # 0x48518
movq %rbp, %r15
movq 0x10(%rsp), %rbp
cmpl $0x0, 0x287e8(%rip)     # 0x48520
je 0x1fd54
testl %ebx, %ebx
jne 0x1fd41
movl (%rbp), %ebx
movl (%r12), %esi
movl (%r14), %edx
addl %ebx, %ebx
movq %r15, %rdi
movl %ebx, %ecx
callq 0x2713f
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_O2/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 0x13866(%rip), %rsi     # 0x335e8
callq 0x64c0
testq %rax, %rax
je 0x1fdb3
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x1fbd2
movq %rax, %rbx
movq %r13, %rdi
callq 0x6430
movq %rbx, %rax
jmp 0x1fdc3
leaq 0x13831(%rip), %rax     # 0x335eb
movq %rax, 0x28757(%rip)     # 0x48518
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x13cc3(%rip), %rsi     # 0x34203
callq 0x2cd07
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
testl %eax, %eax
je 0x2055c
pushq $0x1
popq %rax
popq %rbx
retq
leaq 0x13cac(%rip), %rsi     # 0x3420f
movq %rbx, %rdi
callq 0x2cd07
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1fabe
movq %r15, %rdi
callq 0x20535
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x64a0
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1215c(%rip), %rsi     # 0x335e8
callq 0x64c0
testq %rax, %rax
je 0x214af
movq %rax, %rbx
movq %rax, %rdi
callq 0x214c6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6430
movl %ebp, %eax
jmp 0x214bf
leaq 0x12135(%rip), %rax     # 0x335eb
movq %rax, 0x2705b(%rip)     # 0x48518
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rbx, (%rdi)
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2cd4a
testl %eax, %eax
je 0x21551
cmpl $0x10, 0x28(%rsp)
jne 0x2153e
pushq $0x1
popq %rax
jmp 0x215b2
movq 0x8(%rsp), %rax
movups 0xc8(%rax), %xmm0
movups %xmm0, 0xb8(%rax)
movq %rbx, %rdi
callq 0x2a9e5
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x215a2
movq %rbx, %rdi
callq 0x28be3
cmpl $0x1, %eax
jne 0x215a2
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x28d59
movq %rbx, %rdi
callq 0x28be3
cmpl $0x10, %eax
ja 0x215a2
movq %rbx, %rdi
callq 0x2a9e5
movq %rbx, %rdi
callq 0x2a9e5
movq %rbx, %rdi
callq 0x28be3
cmpl $0x10, %eax
je 0x21539
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x229c0
testq %rax, %rax
je 0x230b6
movq %rax, %rbx
leaq 0x10654(%rip), %rsi     # 0x336da
movq %r14, %rdi
callq 0x64c0
testq %rax, %rax
je 0x230ba
movq %rax, %r14
movslq 0xc(%rsp), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x67c0
movq %r14, %rdi
callq 0x6430
pushq $0x1
popq %rbp
jmp 0x230bc
xorl %ebp, %ebp
jmp 0x230c4
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x64d0
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xdb7c(%rip), %xmm0     # 0x3140c
movss 0xcab4(%rip), %xmm1     # 0x3034c
movq %r15, %rsi
callq *(%rax)
xorps %xmm1, %xmm1
testb %al, %al
je 0x2395d
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 0x2395d
leaq 0x48(%rsp), %rdx
movq 0x28(%rdx), %rdi
movq (%rdi), %rax
leaq 0x28(%rsp), %rcx
leaq 0x84(%rsp), %r8
movq %r15, %rsi
movss %xmm1, 0xc(%rsp)
callq *(%rax)
movss 0xc(%rsp), %xmm1
testb %al, %al
je 0x2395d
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7666
incl %ebx
leaq 0x84(%rsp), %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x2385a
mulss 0x30(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
mulps %xmm2, %xmm0
movaps 0x10(%rsp), %xmm2
addps %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
movss 0xc(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x7426
movss 0xc(%rsp), %xmm1
movss %xmm1, 0xc(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x7426
movaps 0x10(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x7426
jmp 0x23999
jmp 0x23996
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x7426
movq %rbx, %rdi
callq 0x6710
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/src/main.cpp
// Function: main
int main()
{
    //srand48(int(time(nullptr)));

    {
        // since the destructor of ThreadPool joins all threads
        // I use a simple scope to wait for all works to be done
        ThreadPool pool(8);

        // Into the screen is negative z axis
        for(int j = image_height - 1; j >= 0; j--)
        {
            for(int i = 0; i < image_width; i++)
            {
                pool.enqueue(thread_entry, i, j);
            }
        }
    }
    
    stbi_flip_vertically_on_write(true);
    if(stbi_write_png("output.png", image_width, image_height, 3, image, 0) == 0)
    {
        std::cerr << "Error when saving image\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
leaq 0x20(%rsp), %rbx
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x2db12
movl $0x31f, %eax            # imm = 0x31F
leaq 0x18(%rsp), %r14
leaq -0x26e(%rip), %r15      # 0x239ab
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0xc(%rsp), %rbp
movl %eax, 0xc(%rsp)
testl %eax, %eax
js 0x23c69
xorl %eax, %eax
movl %eax, 0x8(%rsp)
cmpl $0x320, %eax            # imm = 0x320
jge 0x23c61
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x2dbb8
movq %r14, %rdi
callq 0x7426
movl 0x8(%rsp), %eax
incl %eax
jmp 0x23c32
movl 0xc(%rsp), %eax
decl %eax
jmp 0x23c28
leaq 0x20(%rsp), %rdi
callq 0x2dcea
movl $0x1, 0x248af(%rip)     # 0x4852c
leaq 0xfa59(%rip), %rdi      # 0x336dd
leaq 0x24945(%rip), %r8      # 0x485d0
pushq $0x3
popq %rcx
movl $0x320, %esi            # imm = 0x320
movl $0x320, %edx            # imm = 0x320
xorl %r9d, %r9d
callq 0x23050
testl %eax, %eax
jne 0x23cb7
movq 0x24335(%rip), %rdi     # 0x47fe0
leaq 0xfa36(%rip), %rsi      # 0x336e8
callq 0x6420
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2dcea
movq %rbx, %rdi
callq 0x6710
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x18(%rsp)
movslq %esi, %rax
movslq %ecx, %rcx
imulq %rax, %rcx
movq %rcx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %edx, %eax
sarl %eax
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
movq %rax, 0x20(%rsp)
movl $0x800, %ebx            # imm = 0x800
leaq 0x30(%rsp), %r15
cmpq 0x20(%rsp), %rdx
je 0x27207
movq 0x10(%rsp), %r14
movq %r14, %r12
imulq %rdx, %r12
movq 0x18(%rsp), %rcx
addq %rcx, %r12
movq %rdx, 0x28(%rsp)
movl %edx, %eax
notl %eax
addl 0xc(%rsp), %eax
movslq %eax, %r13
imulq %r14, %r13
addq %rcx, %r13
testq %r14, %r14
je 0x271fa
cmpq %rbx, %r14
movl $0x800, %ebp            # imm = 0x800
cmovbq %r14, %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x6360
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x6360
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x6360
addq %rbp, %r12
addq %rbp, %r13
subq %rbp, %r14
jmp 0x271b4
movq 0x28(%rsp), %rdx
incq %rdx
jmp 0x27182
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movslq %edx, %rdi
cmpq $0x10, %rcx
je 0x28c44
leal 0x1(%rcx), %r8d
addq %rax, %rdi
xorl %r9d, %r9d
cmpl (%rsi,%rcx,4), %r9d
jge 0x28c3c
movb %r8b, (%rdi,%r9)
incq %r9
jmp 0x28c2d
addl %r9d, %edx
incq %rcx
jmp 0x28c1a
movb $0x0, 0x500(%rbx,%rdi)
leaq 0x200(%rbx), %rdx
leaq 0x501(%rbx), %rsi
xorl %r14d, %r14d
pushq $0x1
popq %rax
xorl %edi, %edi
cmpq $0x11, %rax
je 0x28cd5
movl %r14d, %ecx
subl %edi, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %r14d, %rcx
movzbl 0x500(%rbx,%rcx), %r9d
cmpq %r9, %rax
jne 0x28cbc
leaq (%rdx,%rcx,2), %r8
addq %rsi, %rcx
movzbl %r9b, %r9d
cmpq %r9, %rax
jne 0x28caa
movw %di, (%r8)
incl %edi
movb (%rcx), %r9b
incl %r14d
addq $0x2, %r8
incq %rcx
jmp 0x28c8c
leal -0x1(%rdi), %r8d
movl %eax, %ecx
shrl %cl, %r8d
testl %r8d, %r8d
jne 0x28d41
movb $0x10, %cl
subb %al, %cl
movl %edi, %r8d
shll %cl, %r8d
movl %r8d, 0x604(%rbx,%rax,4)
addl %edi, %edi
incq %rax
jmp 0x28c62
orl $-0x1, 0x648(%rbx)
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x6230
xorl %edx, %edx
testl %r14d, %r14d
cmovlel %edx, %r14d
pushq $0x1
popq %rax
pushq $0x9
popq %rsi
cmpq %r14, %rdx
je 0x28d51
movzbl 0x500(%rbx,%rdx), %r8d
cmpq $0x9, %r8
ja 0x28d3c
movzwl 0x200(%rbx,%rdx,2), %edi
movq %rsi, %rcx
subq %r8, %rcx
shlq %cl, %rdi
addq %rbx, %rdi
xorl %r8d, %r8d
movl %r8d, %r9d
shrl %cl, %r9d
testl %r9d, %r9d
jne 0x28d3c
movb %dl, (%rdi,%r8)
incq %r8
jmp 0x28d28
incq %rdx
jmp 0x28cfd
leaq 0xaada(%rip), %rax      # 0x33822
movq %rax, 0x1f7c9(%rip)     # 0x48518
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c746
movl %edx, %ecx
testl %esi, %esi
je 0x2c70d
xorl %r8d, %r8d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %esi
cmpl %edi, %eax
jl 0x2c749
imull %edi, %esi
movl %esi, %eax
orl %ecx, %eax
js 0x2c746
testl %ecx, %ecx
je 0x2c72a
xorl %r8d, %r8d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
cmpl %esi, %eax
jl 0x2c749
imull %ecx, %esi
movl $0x0, %r8d
testl %esi, %esi
js 0x2c749
xorl %r8d, %r8d
cmpl $0x20000000, %esi       # imm = 0x20000000
setb %r8b
jmp 0x2c749
xorl %r8d, %r8d
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %esi
movq %rdi, %rbx
imulq $0x60, %rsi, %r15
addq $0x46f0, %rbx           # imm = 0x46F0
cmpq %r14, %r15
je 0x28eae
movq -0x18(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x28e79
callq 0x64d0
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rbx,%r14)
movq -0x10(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x28e93
callq 0x64d0
andq $0x0, -0x10(%rbx,%r14)
andq $0x0, (%rbx,%r14)
movq -0x8(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x28ea8
callq 0x64d0
andq $0x0, -0x8(%rbx,%r14)
addq $0x60, %r14
jmp 0x28e5c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__jpeg_reset(stbi__jpeg*)
static void stbi__jpeg_reset(stbi__jpeg *j)
{
   j->code_bits = 0;
   j->code_buffer = 0;
   j->nomore = 0;
   j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0;
   j->marker = STBI__MARKER_none;
   j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
   j->eob_run = 0;
   // no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
   // since we don't even allow 1<<30 pixels
}

// Assembly:
andq $0x0, 0x4820(%rdi)
andl $0x0, 0x482c(%rdi)
andl $0x0, 0x47d8(%rdi)
andl $0x0, 0x4778(%rdi)
andl $0x0, 0x4718(%rdi)
andl $0x0, 0x46b8(%rdi)
movb $-0x1, 0x4828(%rdi)
movl 0x4868(%rdi), %eax
testl %eax, %eax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmovnel %eax, %ecx
movl %ecx, 0x486c(%rdi)
andl $0x0, 0x4844(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
cmpl $0x0, 0x482c(%rbx)
je 0x29201
xorl %eax, %eax
jmp 0x29222
movq (%rbx), %rdi
callq 0x28b62
cmpb $-0x1, %al
jne 0x29222
movq (%rbx), %rdi
callq 0x28b62
cmpb $-0x1, %al
je 0x2920d
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x29247
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 0x291f4
jmp 0x29257
movb %al, 0x4828(%rbx)
movl $0x1, 0x482c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2baff
cmpl $0x9, %edx
jge 0x2bb1e
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %edi
movl %edx, %eax
leaq 0x5e75(%rip), %rcx      # 0x31960
imull (%rcx,%rax,4), %edi
leaq 0x5e9a(%rip), %rcx      # 0x31990
movb (%rcx,%rax,4), %cl
sarl %cl, %edi
movl %edi, %eax
popq %rcx
retq
leaq 0x82e9(%rip), %rdi      # 0x33def
leaq 0x7c0e(%rip), %rsi      # 0x3371b
leaq 0x82ed(%rip), %rcx      # 0x33e01
movl $0x13f9, %edx           # imm = 0x13F9
callq 0x6280
leaq 0x830a(%rip), %rdi      # 0x33e2f
leaq 0x7bef(%rip), %rsi      # 0x3371b
leaq 0x82ce(%rip), %rcx      # 0x33e01
movl $0x13fb, %edx           # imm = 0x13FB
callq 0x6280
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c320
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x2c2fd
movslq 0x8860(%rbx), %rax
cmpl 0x8858(%rbx), %eax
jge 0x2c3a3
movslq 0x885c(%rbx), %rcx
addq %rax, %rcx
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
pushq $0x4
popq %r8
movl %ecx, %eax
cltd
idivl %r8d
cltq
movb $0x1, (%rdi,%rax)
movq 0x8838(%rbx), %rax
movzbl 0x837(%rbx,%r14,4), %edx
cmpb $-0x7f, 0x3(%rax,%rdx,4)
jb 0x2c38c
movb 0x2(%rax,%rdx,4), %dil
movb %dil, (%rsi,%rcx)
movb 0x1(%rax,%rdx,4), %dil
movb %dil, 0x1(%rsi,%rcx)
movb (%rax,%rdx,4), %dil
movb %dil, 0x2(%rsi,%rcx)
movb 0x3(%rax,%rdx,4), %al
movb %al, 0x3(%rsi,%rcx)
movl 0x885c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x885c(%rbx)
cmpl 0x8854(%rbx), %eax
jge 0x2c3ab
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x884c(%rbx), %ecx
movl 0x8858(%rbx), %eax
movl %ecx, 0x885c(%rbx)
movl 0x8860(%rbx), %edx
addl 0x8844(%rbx), %edx
movl %edx, 0x8860(%rbx)
cmpl %eax, %edx
jl 0x2c3a3
movl 0x8840(%rbx), %ecx
testl %ecx, %ecx
jle 0x2c3a3
movl 0x8864(%rbx), %edx
shll %cl, %edx
movl %edx, 0x8844(%rbx)
sarl %edx
addl 0x8850(%rbx), %edx
movl %edx, 0x8860(%rbx)
decl %ecx
movl %ecx, 0x8840(%rbx)
jmp 0x2c3cf
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__pnm_info(stbi__context*, int*, int*, int*)
static int      stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
{
   int maxv, dummy;
   char c, p, t;

   if (!x) x = &dummy;
   if (!y) y = &dummy;
   if (!comp) comp = &dummy;

   stbi__rewind(s);

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

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movups 0xc8(%rdi), %xmm0
movups %xmm0, 0xb8(%rdi)
callq 0x28b62
movl %eax, %ebp
movq %rbx, %rdi
callq 0x28b62
cmpb $0x50, %bpl
sete %cl
leal -0x37(%rax), %edx
cmpb $-0x2, %dl
setae %dl
testb %dl, %cl
jne 0x2c520
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
jmp 0x2c5b9
testq %r12, %r12
je 0x2c537
xorl %ecx, %ecx
cmpb $0x36, %al
sete %cl
leal 0x1(,%rcx,2), %eax
movl %eax, (%r12)
movq %rbx, %rdi
callq 0x28b62
leaq 0xf(%rsp), %r12
movb %al, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2c5cd
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2c645
testq %r15, %r15
je 0x2c566
movl %eax, (%r15)
leaq 0xf(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2c5cd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2c645
testq %r14, %r14
je 0x2c589
movl %eax, (%r14)
leaq 0xf(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c5cd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c645
cmpl $0x100, %eax            # imm = 0x100
jl 0x2c5bd
leaq 0x7987(%rip), %rax      # 0x33f39
movq %rax, 0x1bf5f(%rip)     # 0x48518
xorl %eax, %eax
jmp 0x2c5c0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__tga_get_comp(int, int, int*)
static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16)
{
   // only RGB or RGBA (incl. 16bit) or grey allowed
   if (is_rgb16) *is_rgb16 = 0;
   switch(bits_per_pixel) {
      case 8:  return STBI_grey;
      case 16: if(is_grey) return STBI_grey_alpha;
               // fallthrough
      case 15: if(is_rgb16) *is_rgb16 = 1;
               return STBI_rgb;
      case 24: // fallthrough
      case 32: return bits_per_pixel/8;
      default: return 0;
   }
}

// Assembly:
testq %rdx, %rdx
je 0x2c865
andl $0x0, (%rdx)
cmpl $0x8, %edi
je 0x2c8b3
pushq $0x3
popq %rax
cmpl $0xf, %edi
je 0x2c8a4
cmpl $0x20, %edi
je 0x2c89e
cmpl $0x18, %edi
je 0x2c89e
cmpl $0x10, %edi
jne 0x2c8b0
testq %rdx, %rdx
sete %dil
xorl %ecx, %ecx
testl %esi, %esi
setne %sil
orb %sil, %dil
je 0x2c8a9
movb %sil, %cl
xorl $0x3, %ecx
movl %ecx, %eax
retq
shrl $0x3, %edi
movl %edi, %eax
retq
testq %rdx, %rdx
je 0x2c8b2
movl $0x1, (%rdx)
retq
xorl %eax, %eax
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__hdr_test_core(stbi__context*, char const*)
static int stbi__hdr_test_core(stbi__context *s, const char *signature)
{
   int i;
   for (i=0; signature[i]; ++i)
      if (stbi__get8(s) != signature[i])
          return 0;
   stbi__rewind(s);
   return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, (%r14)
je 0x2cd31
movq %rbx, %rdi
callq 0x28b62
movzbl %al, %eax
movsbl (%r14), %ecx
incq %r14
cmpl %ecx, %eax
je 0x2cd11
xorl %eax, %eax
jmp 0x2cd42
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq