LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/alan0201tw[P]RayTracer/src/util.cpp
// Function: perlin_interpolate(vec3 (*) [2][2], float, float, float)
float perlin_interpolate(vec3 _data[2][2][2], float _u, float _v, float _w)
{
    // Reference :
    // https://github.com/RayTracing/TheNextWeek/issues/6
    //
    // in the original implementation in the book, the dot product
    // will return negative results, causing the produced image haing
    // several dark bands. 
    // Accoring to the github issue, this can be resolved by rescaling
    // the interpolation result from [-1, 1] to [0, 1].

    float uu = _u * _u * (3 - 2 * _u);
    float vv = _v * _v * (3 - 2 * _v);
    float ww = _w * _w * (3 - 2 * _w);

    float accum = 0.0f;
    for(int i = 0; i < 2; i++)
    {
        for(int j = 0; j < 2; j++)
        {
            for(int k = 0; k < 2; k++)
            {
                vec3 weight(_u - i, _v - j, _w - k);
                accum += (i * uu + (1 - i) * (1 - uu)) *
                         (j * vv + (1 - j) * (1 - vv)) *
                         (k * ww + (1 - k) * (1 - ww)) * dot(_data[i][j][k], weight);
            }
        }
    }
    return 0.5f * (accum + 1.0f);
}

// Assembly:
movaps %xmm0, %xmm3
mulss %xmm0, %xmm3
movss %xmm0, -0x4(%rsp)
movaps %xmm0, %xmm6
addss %xmm0, %xmm6
movss 0x26eac(%rip), %xmm4    # 0x3c4a0
movaps %xmm4, %xmm0
subss %xmm6, %xmm0
mulss %xmm3, %xmm0
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
movaps %xmm1, %xmm7
addss %xmm1, %xmm7
movaps %xmm4, %xmm6
subss %xmm7, %xmm6
mulss %xmm3, %xmm6
movaps %xmm2, %xmm3
mulss %xmm2, %xmm3
movaps %xmm2, %xmm7
addss %xmm2, %xmm7
subss %xmm7, %xmm4
mulss %xmm3, %xmm4
movss 0x26bf2(%rip), %xmm7    # 0x3c228
movaps %xmm7, %xmm8
movss %xmm0, -0x8(%rsp)
subss %xmm0, %xmm8
movaps %xmm7, %xmm9
subss %xmm6, %xmm9
subss %xmm4, %xmm7
addq $0x8, %rdi
xorps %xmm3, %xmm3
xorl %eax, %eax
xorps %xmm10, %xmm10
cvtsi2ss %eax, %xmm10
movss -0x4(%rsp), %xmm11
subss %xmm10, %xmm11
movl $0x1, %ecx
subl %eax, %ecx
xorps %xmm12, %xmm12
cvtsi2ss %ecx, %xmm12
mulss %xmm8, %xmm12
mulss -0x8(%rsp), %xmm10
addss %xmm12, %xmm10
movq %rdi, %rcx
xorl %edx, %edx
xorps %xmm12, %xmm12
cvtsi2ss %edx, %xmm12
movaps %xmm1, %xmm13
movl $0x1, %esi
subl %edx, %esi
xorps %xmm14, %xmm14
cvtsi2ss %esi, %xmm14
subss %xmm12, %xmm13
mulss %xmm9, %xmm14
mulss %xmm6, %xmm12
addss %xmm14, %xmm12
mulss %xmm10, %xmm12
movl $0x1, %esi
xorl %r8d, %r8d
movq %rcx, %r9
xorps %xmm14, %xmm14
cvtsi2ss %r8d, %xmm14
movaps %xmm2, %xmm15
subss %xmm14, %xmm15
xorps %xmm5, %xmm5
cvtsi2ss %esi, %xmm5
mulss %xmm7, %xmm5
mulss %xmm4, %xmm14
addss %xmm5, %xmm14
mulss %xmm12, %xmm14
movss -0x4(%r9), %xmm5
mulss %xmm13, %xmm5
movss -0x8(%r9), %xmm0
mulss %xmm11, %xmm0
addss %xmm5, %xmm0
mulss (%r9), %xmm15
addss %xmm0, %xmm15
mulss %xmm14, %xmm15
addss %xmm15, %xmm3
addq $0xc, %r9
incl %r8d
decq %rsi
je 0x156d7
leaq 0x1(%rdx), %rsi
addq $0x18, %rcx
testq %rdx, %rdx
movq %rsi, %rdx
je 0x15696
leaq 0x1(%rax), %rcx
addq $0x30, %rdi
testq %rax, %rax
movq %rcx, %rax
je 0x1565b
addss 0x26abb(%rip), %xmm3    # 0x3c228
mulss 0x26ab7(%rip), %xmm3    # 0x3c22c
movaps %xmm3, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x23c9c
movaps 0x1867c(%rip), %xmm0    # 0x3c300
movss 0x20(%rbx), %xmm1
xorps %xmm0, %xmm1
movups 0x18(%rbx), %xmm2
xorps %xmm0, %xmm2
movlps %xmm2, 0x18(%rbx)
movss %xmm1, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movss 0x18(%rdi), %xmm4
movaps %xmm2, %xmm5
subss %xmm4, %xmm5
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
subss 0x1c(%rdi), %xmm2
unpcklps %xmm2, %xmm5            # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
subss 0x20(%rdi), %xmm3
movsd 0xc(%rsi), %xmm2
movq 0x14(%rsi), %rax
leaq 0x8(%rsp), %rsi
movlps %xmm5, (%rsi)
movss %xmm3, 0x8(%rsi)
movsd %xmm2, 0xc(%rsi)
movq %rax, 0x14(%rsi)
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *(%rax)
testb %al, %al
je 0x23d3b
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
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x23db7
movsd (%rbx), %xmm0
movsd 0xc(%rbx), %xmm1
movss 0x18(%r14), %xmm2
movss 0x1c(%r14), %xmm3
movaps %xmm0, %xmm4
addss %xmm2, %xmm4
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss %xmm3, %xmm0
unpcklps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
movss 0x20(%r14), %xmm0
movss 0x8(%rbx), %xmm5
addss %xmm0, %xmm5
addss %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
addss %xmm3, %xmm1
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
addss 0x14(%rbx), %xmm0
movlps %xmm4, (%rbx)
movss %xmm5, 0x8(%rbx)
movlps %xmm2, 0xc(%rbx)
movss %xmm0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x24145
movss 0x18(%r14), %xmm0
movss 0x1c(%r14), %xmm1
movss 0xc(%rbx), %xmm2
movss 0x14(%rbx), %xmm3
movaps %xmm0, %xmm4
mulss %xmm3, %xmm4
movaps %xmm1, %xmm5
mulss %xmm2, %xmm5
addss %xmm4, %xmm5
mulss %xmm1, %xmm3
mulss %xmm0, %xmm2
subss %xmm2, %xmm3
movss 0x18(%rbx), %xmm2
movss 0x20(%rbx), %xmm4
movaps %xmm0, %xmm6
mulss %xmm4, %xmm6
movaps %xmm1, %xmm7
mulss %xmm2, %xmm7
addss %xmm6, %xmm7
mulss %xmm4, %xmm1
mulss %xmm2, %xmm0
subss %xmm0, %xmm1
movss %xmm5, 0xc(%rbx)
movss %xmm3, 0x14(%rbx)
movss %xmm7, 0x18(%rbx)
movss %xmm1, 0x20(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
movss 0xc(%rdx), %xmm1
movss 0x10(%rdx), %xmm0
addss 0x18(%rdx), %xmm1
movaps %xmm1, 0x10(%rsp)
addss 0x1c(%rdx), %xmm0
movss %xmm0, 0x8(%rsp)
leaq 0xc(%rdx), %r13
movss 0x14(%rdx), %xmm0
addss 0x20(%rdx), %xmm0
movss %xmm0, 0xc(%rsp)
callq 0x1522a
movaps 0x10(%rsp), %xmm2
addss %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss 0x8(%rsp), %xmm0
subss 0xc(%r14), %xmm2
subss 0x10(%r14), %xmm0
addss 0xc(%rsp), %xmm1
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subss 0x14(%r14), %xmm1
movss 0x18(%rbp), %xmm0
movq 0xc(%r14), %rax
movl 0x14(%r14), %ecx
movl %ecx, 0x8(%r15)
movq %rax, (%r15)
movlps %xmm2, 0xc(%r15)
movss %xmm1, 0x14(%r15)
movss %xmm0, 0x18(%r15)
movq 0x8(%r12), %rdi
movss 0x4(%r14), %xmm0
movss 0x8(%r14), %xmm1
movq (%rdi), %rax
movq %r13, %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_O1/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), %xmm3
movss 0x14(%rsi), %xmm2
movaps %xmm3, %xmm4
shufps $0x55, %xmm3, %xmm4     # xmm4 = xmm4[1,1],xmm3[1,1]
movaps %xmm4, %xmm0
mulss %xmm4, %xmm0
movaps %xmm3, %xmm1
mulss %xmm3, %xmm1
addss %xmm0, %xmm1
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2429a
sqrtss %xmm0, %xmm0
jmp 0x242bf
movss %xmm2, 0xc(%rsp)
movaps %xmm3, 0x20(%rsp)
movaps %xmm4, 0x10(%rsp)
callq 0x6710
movaps 0x10(%rsp), %xmm4
movaps 0x20(%rsp), %xmm3
movss 0xc(%rsp), %xmm2
divss %xmm0, %xmm3
divss %xmm0, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
divss %xmm0, %xmm2
leaq 0x30(%rsp), %rdi
movlps %xmm3, (%rdi)
movss %xmm2, 0x8(%rdi)
leaq 0x18(%r12), %rsi
callq 0x152e1
movaps %xmm0, 0x20(%rsp)
movss %xmm1, 0xc(%rsp)
movss 0x14(%r15), %xmm0
movss %xmm0, 0x10(%rsp)
callq 0x15140
movss 0x10(%rsp), %xmm3
movaps %xmm3, %xmm2
mulss %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
mulss %xmm3, %xmm0
mulss %xmm3, %xmm1
movaps 0x20(%rsp), %xmm3
addss %xmm3, %xmm2
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
addss %xmm0, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
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
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x2ad3a(%rip), %rsi     # 0x4f410
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rdx
callq 0x24af3
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x24733
movq %rax, %r14
testq %rax, %rax
je 0x2471e
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_O1/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, %rbp
movq %rdx, %r14
movq %rsi, %r15
movl $0x8, (%rsp)
leaq 0x1c(%rsp), %r9
callq 0x291ec
testq %rax, %rax
je 0x247c9
movq %rax, %r13
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
je 0x247ee
cmpl $0x10, %eax
jne 0x24820
movl (%r15), %eax
movl (%r14), %r12d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x24787
movl (%rbp), %ecx
movq %rbp, 0x10(%rsp)
imull %eax, %r12d
imull %ecx, %r12d
movslq %r12d, %rdi
callq 0x64c0
testq %rax, %rax
je 0x247ce
movq %rax, %rbp
testl %r12d, %r12d
jle 0x247bf
movl %r12d, %eax
xorl %ecx, %ecx
movb 0x1(%r13,%rcx,2), %dl
movb %dl, (%rbp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x247ae
movq %r13, %rdi
callq 0x6490
jmp 0x247de
xorl %r13d, %r13d
jmp 0x2480e
leaq 0x1af4f(%rip), %rax     # 0x3f724
movq %rax, 0x2ad0c(%rip)     # 0x4f4e8
xorl %ebp, %ebp
movl $0x8, 0x1c(%rsp)
movq %rbp, %r13
movq 0x10(%rsp), %rbp
cmpl $0x0, 0x2acfb(%rip)     # 0x4f4f0
je 0x2480e
testl %ebx, %ebx
jne 0x247fe
movl (%rbp), %ebx
movl (%r15), %esi
movl (%r14), %edx
movq %r13, %rdi
movl %ebx, %ecx
callq 0x2c902
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ad6a(%rip), %rdi     # 0x3f591
leaq 0x1ad7d(%rip), %rsi     # 0x3f5ab
leaq 0x1ad8a(%rip), %rcx     # 0x3f5bf
movl $0x468, %edx            # imm = 0x468
callq 0x6250
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x2abaa(%rip), %rsi     # 0x4f410
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rdx
callq 0x24af3
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x248c3
movq %rax, %r14
testq %rax, %rax
je 0x248ae
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_O1/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, %r15
movl $0x10, (%rsp)
leaq 0x1c(%rsp), %r9
callq 0x291ec
testq %rax, %rax
je 0x24927
movq %rax, %r13
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
je 0x2492f
cmpl $0x10, %eax
je 0x249ad
leaq 0x1b5c4(%rip), %rdi     # 0x3fed3
leaq 0x1ac95(%rip), %rsi     # 0x3f5ab
leaq 0x1b5cf(%rip), %rcx     # 0x3feec
movl $0x480, %edx            # imm = 0x480
callq 0x6250
xorl %r13d, %r13d
jmp 0x249cf
movl (%r15), %eax
movl (%r14), %r12d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x2493e
movl (%rbp), %ecx
movq %rbp, 0x10(%rsp)
imull %eax, %r12d
imull %ecx, %r12d
leal (%r12,%r12), %eax
movslq %eax, %rdi
callq 0x64c0
testq %rax, %rax
je 0x2498d
movq %rax, %rbp
testl %r12d, %r12d
jle 0x24983
movl %r12d, %eax
xorl %ecx, %ecx
movzbl (%r13,%rcx), %edx
movl %edx, %esi
shll $0x8, %esi
orl %edx, %esi
movw %si, (%rbp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x24969
movq %r13, %rdi
callq 0x6490
jmp 0x2499d
leaq 0x1ad90(%rip), %rax     # 0x3f724
movq %rax, 0x2ab4d(%rip)     # 0x4f4e8
xorl %ebp, %ebp
movl $0x10, 0x1c(%rsp)
movq %rbp, %r13
movq 0x10(%rsp), %rbp
cmpl $0x0, 0x2ab3c(%rip)     # 0x4f4f0
je 0x249cf
testl %ebx, %ebx
jne 0x249bd
movl (%rbp), %ebx
movl (%r15), %esi
movl (%r14), %edx
addl %ebx, %ebx
movq %r13, %rdi
movl %ebx, %ecx
callq 0x2c902
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1aa7b(%rip), %rsi     # 0x3f478
callq 0x6480
testq %rax, %rax
je 0x24a2e
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x2483f
movq %rax, %rbx
movq %r13, %rdi
callq 0x63e0
movq %rbx, %rax
jmp 0x24a3e
leaq 0x1aa46(%rip), %rax     # 0x3f47b
movq %rax, 0x2aaac(%rip)     # 0x4f4e8
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1adbf(%rip), %rsi     # 0x40097
callq 0x3807b
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
testl %eax, %eax
jne 0x2530c
leaq 0x1adad(%rip), %rsi     # 0x400a3
movq %rbx, %rdi
callq 0x3807b
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x2a0ad(%rip), %rsi     # 0x4f410
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x24af3
movq %r15, %rdi
callq 0x252cd
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_O1/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 0x19164(%rip), %rsi     # 0x3f478
callq 0x6480
testq %rax, %rax
je 0x26337
movq %rax, %rbx
movq %rax, %rdi
callq 0x2634e
movl %eax, %ebp
movq %rbx, %rdi
callq 0x63e0
movl %ebp, %eax
jmp 0x26347
leaq 0x1913d(%rip), %rax     # 0x3f47b
movq %rax, 0x291a3(%rip)     # 0x4f4e8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi_is_16_bit_from_file
STBIDEF int stbi_is_16_bit_from_file(FILE *f)
{
   int r;
   stbi__context s;
   long pos = ftell(f);
   stbi__start_file(&s, f);
   r = stbi__is_16_main(&s);
   fseek(f,pos,SEEK_SET);
   return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
callq 0x6030
movq %rax, %r14
leaq 0x290a3(%rip), %rsi     # 0x4f410
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x24af3
movq %r15, %rdi
callq 0x263a2
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_O1/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 0x32dd7
testl %eax, %eax
je 0x263d2
cmpl $0x10, 0x20(%rsp)
jne 0x263d2
movl $0x1, %eax
jmp 0x264a0
movq (%rsp), %rax
movups 0xc8(%rax), %xmm0
movups %xmm0, 0xb8(%rax)
movq %rbx, %rdi
callq 0x31ea4
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x31ea4
orl %ebp, %eax
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x26490
movq %rbx, %rdi
callq 0x31ea4
cmpl $0x1, %eax
jne 0x26490
cmpq $0x0, 0x10(%rbx)
je 0x26447
movq 0xc0(%rbx), %rcx
movl 0xb8(%rbx), %edx
movl %ecx, %eax
subl %edx, %eax
cmpl $0x5, %eax
jg 0x26447
movq %rcx, 0xb8(%rbx)
movq 0x28(%rbx), %rdi
movl $0x6, %esi
subl %eax, %esi
callq *0x18(%rbx)
jmp 0x2644f
addq $0x6, 0xb8(%rbx)
movq %rbx, %rdi
callq 0x31ea4
cmpl $0x11, %eax
jae 0x26490
movq %rbx, %rdi
callq 0x31ea4
movq %rbx, %rdi
callq 0x31ea4
movq %rbx, %rdi
callq 0x31ea4
movq %rbx, %rdi
callq 0x31ea4
movq %rbx, %rdi
callq 0x31ea4
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x10, %ecx
je 0x264a0
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_O1/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 0x27ae6
testq %rax, %rax
je 0x281d2
movq %rax, %rbx
leaq 0x173cc(%rip), %rsi     # 0x3f56a
movq %r14, %rdi
callq 0x6480
testq %rax, %rax
je 0x281d6
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 0x281d8
xorl %ebp, %ebp
jmp 0x281e0
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_O1/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 0x16be9(%rip), %rsi     # 0x3f56a
callq 0x6480
movq %rax, %r12
leaq 0x107e0(%rip), %rax     # 0x39170
movq %rax, 0x8(%rsp)
movq %r12, 0x10(%rsp)
testq %r12, %r12
je 0x289c3
leaq 0x8(%rsp), %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
movl %ebx, %r9d
callq 0x2826c
movl %eax, %ebx
movq %r12, %rdi
callq 0x63e0
jmp 0x289c5
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_O1/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 $0x90, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm1, %xmm1
leaq 0x38(%rsp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movups %xmm1, 0x28(%rdx)
movq (%rsi), %rdi
movq (%rdi), %rax
movss 0x14890(%rip), %xmm0    # 0x3d29c
movss 0x13930(%rip), %xmm1    # 0x3c344
movq %r15, %rsi
callq *(%rax)
xorps %xmm1, %xmm1
testb %al, %al
je 0x28b0e
leaq 0x44(%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 0x28b0e
leaq 0x38(%rsp), %rdx
movq 0x28(%rdx), %rdi
movq (%rdi), %rax
leaq 0x4(%rsp), %rcx
leaq 0x74(%rsp), %r8
movq %r15, %rsi
movss %xmm1, (%rsp)
callq *(%rax)
movss (%rsp), %xmm1
testb %al, %al
je 0x28b0e
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x28aa3
movq 0x2650b(%rip), %rcx     # 0x4efa0
cmpb $0x0, (%rcx)
je 0x28a9f
incl 0x8(%rax)
jmp 0x28aa3
lock
incl 0x8(%rax)
incl %ebx
leaq 0x74(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebx, %edx
callq 0x289d6
movss 0x4(%rsp), %xmm2
mulss %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
mulss 0x8(%rsp), %xmm0
mulss 0xc(%rsp), %xmm1
movaps 0x10(%rsp), %xmm3
addss %xmm3, %xmm2
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
addss %xmm0, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movaps %xmm2, 0x10(%rsp)
movss (%rsp), %xmm0
addss %xmm1, %xmm0
movaps %xmm0, %xmm1
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x28b0e
movss %xmm1, (%rsp)
callq 0x7768
movss (%rsp), %xmm1
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x28b27
movss %xmm1, (%rsp)
callq 0x7768
movss (%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x28b52
callq 0x7768
jmp 0x28b52
jmp 0x28b4f
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x28b61
callq 0x7768
movq %rbx, %rdi
callq 0x66e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c9dd
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 0x2c9c5
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 0x2c984
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x2c951
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %ebp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
leaq 0x4(%rdi), %rdx
leaq 0x8(%rdi), %r15
movq %rdi, %rsi
movq %r15, %rcx
callq 0x37513
testl %eax, %eax
je 0x2e285
movl %ebp, 0x4(%rsp)
movl (%r14), %eax
movl %eax, (%r13)
movl 0x4(%r14), %eax
movl %eax, (%r12)
testq %rbx, %rbx
je 0x2e1fb
movl (%r15), %eax
movl %eax, (%rbx)
movl 0x8(%r14), %r13d
movl (%r14), %ebp
movl 0x4(%r14), %ebx
movl %r13d, %edi
movl %ebp, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x32132
testl %eax, %eax
je 0x2e26e
movl %r13d, %edi
movl %ebp, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x32255
testq %rax, %rax
je 0x2e277
movq %rax, %r12
imull %r13d, %ebp
imull %ebx, %ebp
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x3490f
movl 0x4(%rsp), %edx
testl %edx, %edx
je 0x2e288
movl (%r15), %esi
cmpl %edx, %esi
je 0x2e288
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 0x33ff4
leaq 0x114a5(%rip), %rax     # 0x3f71a
jmp 0x2e27e
leaq 0x114a6(%rip), %rax     # 0x3f724
movq %rax, 0x21263(%rip)     # 0x4f4e8
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_O1/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 0x30e09
cmpb $-0x28, %al
jne 0x2fcbe
movl $0x1, %ebp
cmpl $0x1, %ebx
je 0x2fcce
movq %r14, %rdi
callq 0x30e09
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
sete %cl
cmpb $-0x3e, %sil
sete %dl
orb %cl, %dl
jne 0x2fc9c
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x30f3b
testl %eax, %eax
je 0x2fcce
movq %r14, %rdi
callq 0x30e09
cmpb $-0x1, %al
jne 0x2fc88
movq (%r14), %r15
cmpq $0x0, 0x10(%r15)
je 0x2fc76
movq 0x28(%r15), %rdi
callq *0x20(%r15)
testl %eax, %eax
je 0x2fc4d
cmpl $0x0, 0x30(%r15)
je 0x2fcdb
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x2fc4d
jmp 0x2fcdb
cmpb $-0x3e, %al
je 0x2fc9c
movzbl %al, %esi
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0xc0, %ecx
jne 0x2fc3d
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 0x3179b
leaq 0xf967(%rip), %rax      # 0x3f62c
movq %rax, 0x1f81c(%rip)     # 0x4f4e8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf951(%rip), %rax      # 0x3f633
movq %rax, 0x1f7ff(%rip)     # 0x4f4e8
jmp 0x2fcce
// File: /workspace/github_cpp_makefile_star2_O1/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__YCbCr_to_RGB_row(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int)
static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step)
{
   int i;
   for (i=0; i < count; ++i) {
      int y_fixed = (y[i] << 20) + (1<<19); // rounding
      int r,g,b;
      int cr = pcr[i] - 128;
      int cb = pcb[i] - 128;
      r = y_fixed +  cr* stbi__float2fixed(1.40200f);
      g = y_fixed + (cr*-stbi__float2fixed(0.71414f)) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000);
      b = y_fixed                                     +   cb* stbi__float2fixed(1.77200f);
      r >>= 20;
      g >>= 20;
      b >>= 20;
      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
      out[0] = (stbi_uc)r;
      out[1] = (stbi_uc)g;
      out[2] = (stbi_uc)b;
      out[3] = 255;
      out += step;
   }
}

// Assembly:
testl %r8d, %r8d
jle 0x30260
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %r9d, %rax
movl %r8d, %r8d
addq $0x3, %rdi
xorl %r9d, %r9d
xorl %r10d, %r10d
movl $0xff, %ebp
movzbl (%rsi,%r10), %ebx
shll $0x14, %ebx
movzbl (%rcx,%r10), %r14d
addl $-0x80, %r14d
imull $0x166f00, %r14d, %r11d # imm = 0x166F00
addl %ebx, %r11d
addl $0x80000, %r11d         # imm = 0x80000
sarl $0x14, %r11d
testl %r11d, %r11d
cmovlel %r9d, %r11d
cmpl %ebp, %r11d
jl 0x301d6
movl $0xff, %r11d
movzbl (%rdx,%r10), %r15d
addl $-0x80, %r15d
imull $0xfff49300, %r14d, %r14d # imm = 0xFFF49300
leal (%r14,%rbx), %r12d
addl $0x80000, %r12d         # imm = 0x80000
imull $0xfffa7e00, %r15d, %r14d # imm = 0xFFFA7E00
andl $0xffff0000, %r14d      # imm = 0xFFFF0000
addl %r12d, %r14d
sarl $0x14, %r14d
testl %r14d, %r14d
jg 0x3020e
xorl %r14d, %r14d
cmpl %ebp, %r14d
jl 0x30219
movl $0xff, %r14d
imull $0x1c5a00, %r15d, %r15d # imm = 0x1C5A00
addl %r15d, %ebx
addl $0x80000, %ebx          # imm = 0x80000
sarl $0x14, %ebx
testl %ebx, %ebx
cmovlel %r9d, %ebx
cmpl %ebp, %ebx
jl 0x3023b
movl $0xff, %ebx
movb %r11b, -0x3(%rdi)
movb %r14b, -0x2(%rdi)
movb %bl, -0x1(%rdi)
movb $-0x1, (%rdi)
incq %r10
addq %rax, %rdi
cmpq %r10, %r8
jne 0x3019e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x31fd6
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 0x31fc6
addl %r9d, %edx
incq %rcx
cmpq $0x10, %rcx
jne 0x31fb4
movslq %edx, %rax
movb $0x0, 0x500(%rbx,%rax)
xorl %edx, %edx
movl $0x1, %eax
xorl %ebp, %ebp
movl %ebp, %ecx
subl %edx, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %ebp, %rcx
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x32046
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x32037
movw %dx, 0x200(%rbx,%rcx,2)
incl %edx
movzbl 0x501(%rbx,%rcx), %esi
incq %rcx
cmpq %rsi, %rax
je 0x3201b
movl %ecx, %ebp
leal -0x1(%rdx), %esi
movl %eax, %ecx
shrl %cl, %esi
testl %esi, %esi
jne 0x320cd
movb $0x10, %cl
subb %al, %cl
movl %edx, %esi
shll %cl, %esi
movl %esi, 0x604(%rbx,%rax,4)
addl %edx, %edx
incq %rax
cmpq $0x11, %rax
jne 0x31ff3
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 0x320dd
movl %ebp, %edx
xorl %esi, %esi
movzbl 0x500(%rbx,%rsi), %r8d
cmpq $0x9, %r8
ja 0x320c3
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 0x320b1
incq %rsi
cmpq %rdx, %rsi
jne 0x32089
jmp 0x320dd
leaq 0xd5de(%rip), %rax      # 0x3f6b2
movq %rax, 0x1d40d(%rip)     # 0x4f4e8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x32254
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 0x32210
callq 0x6490
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rbx,%r12)
movq -0x10(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x32228
callq 0x6490
movq %r15, -0x10(%rbx,%r12)
movq %r15, (%rbx,%r12)
movq -0x8(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x32240
callq 0x6490
movq $0x0, -0x8(%rbx,%r12)
addq $0x60, %r12
cmpq %r12, %r14
jne 0x321f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %ebp, %ebp
cmpl $0x0, 0x482c(%rbx)
jne 0x3295b
movq (%rbx), %r15
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0x3294d
cmpl $0x0, 0x30(%r15)
je 0x3295b
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r14
movl 0x34(%r15), %edx
movq %r14, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0x32927
movq %r14, 0xb8(%r15)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r15)
jmp 0x32946
movl $0x0, 0x30(%r15)
movq %r14, 0xb8(%r15)
leaq 0x39(%r15), %rax
movq %rax, 0xc0(%r15)
movb $0x0, 0x38(%r15)
movq 0xb8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movzbl (%rax), %ebp
cmpl $0xff, %ebp
jne 0x32a01
movq (%rbx), %r12
leaq 0xb8(%r12), %r15
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0x32990
cmpl $0x0, 0x30(%r12)
jne 0x329c8
xorl %eax, %eax
jmp 0x32999
leaq 0x1(%rax), %rcx
movq %rcx, (%r15)
movb (%rax), %al
cmpb $-0x1, %al
jne 0x329fa
movq (%rbx), %r12
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0x32a53
xorl %eax, %eax
cmpl $0x0, 0x30(%r12)
je 0x32999
leaq 0xb8(%r12), %r15
movq 0x28(%r12), %rdi
leaq 0x38(%r12), %r14
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x32a27
movq %r14, 0xb8(%r12)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r12)
jmp 0x32a4b
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x32a62
movl 0x4824(%rbx), %eax
movb $0x18, %cl
subb %al, %cl
shll %cl, %ebp
orl %ebp, 0x4820(%rbx)
leal 0x8(%rax), %ecx
movl %ecx, 0x4824(%rbx)
cmpl $0x11, %eax
jl 0x328d6
jmp 0x32a72
movl $0x0, 0x30(%r12)
movq %r14, 0xb8(%r12)
leaq 0x39(%r12), %rax
movq %rax, 0xc0(%r12)
movb $0x0, 0x38(%r12)
movq (%r15), %rax
jmp 0x32990
addq $0xb8, %r12
movq %r12, %r15
jmp 0x32990
movb %al, 0x4828(%rbx)
movl $0x1, 0x482c(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq