LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/objects/RenderObjectCollection.cpp
// Function: RayTracer::RenderObjectCollection::hit(RayTracer::Ray const&, double, double, RayTracer::HitRecord&) const
bool RenderObjectCollection::hit(const Ray& ray, double t_min, double t_max, HitRecord& record) const {
    HitRecord temp_record;
    double t_best = t_max;
    bool hit = false;
    // Loop until we found the hit with the smallest t. By overriding t_max, we can easily and elegantly do this.
    for (std::size_t i = 0; i < this->objects.size(); i++) {
        if (this->objects[i]->quick_hit(ray, t_min, t_best) && this->objects[i]->hit(ray, t_min, t_best, temp_record)) {
            hit = true;
            t_best = temp_record.t;
            record = temp_record;
        }
    }
    return hit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rsi, %r14
movq %rdi, %r15
leaq 0x38(%rsp), %rdi
callq 0x729d4
leaq 0x58(%rsp), %rdi
callq 0x729d4
movq 0x80(%r15), %rax
cmpq %rax, 0x88(%r15)
je 0x77dba
leaq 0x18(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x38(%rbx), %r12
leaq 0x58(%rbx), %rcx
movq %rcx, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
movsd (%rsp), %xmm0
movq (%rax,%r13,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movsd 0x8(%rsp), %xmm1
callq *0x20(%rax)
testb %al, %al
je 0x77d92
movq 0x80(%r15), %rax
movq (%rax,%r13,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x20(%rsp), %rdx
callq *0x30(%rax)
testb %al, %al
je 0x77d92
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x72a08
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
callq 0x72a08
leaq 0x78(%rsp), %rax
movups (%rax), %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, (%rax)
movb $0x1, %bpl
incq %r13
movq 0x80(%r15), %rax
movq 0x88(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
movsd (%rsp), %xmm0
jb 0x77d07
jmp 0x77dbc
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/objects/RenderObjectCollection.cpp
// Function: RayTracer::RenderObjectCollection::to_json[abi:cxx11]() const
json RenderObjectCollection::to_json() const {
    json j;

    // First, let the parent class parse all it wants
    this->baseclass_to_json(j);
    
    // Add child-specific properties
    j["objects"] = json::array();
    // Append all the internal objects
    for (std::size_t i = 0; i < this->objects.size(); i++) {
        j["objects"][i] = this->objects[i]->to_json();
    }
    return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x48a06
movq %rbx, %rdi
callq 0x48a06
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x747bc
leaq 0xce14(%rip), %rsi      # 0x84e76
movq %rbx, %rdi
callq 0x416d6
movq %rax, %r15
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x48a06
movb (%r15), %al
movb (%r12), %cl
movb %cl, (%r15)
movb %al, (%r12)
leaq 0x20(%rsp), %r13
movq 0x8(%r15), %rax
movq (%r13), %rcx
movq %rcx, 0x8(%r15)
movq %rax, (%r13)
movq %r15, %rdi
callq 0x48a06
movq %r12, %rdi
callq 0x48a06
movzbl -0x8(%r13), %esi
movq %r13, %rdi
callq 0x48aa8
movq 0x80(%r14), %rax
cmpq %rax, 0x88(%r14)
je 0x7816b
xorl %r12d, %r12d
leaq 0x8(%rsp), %r13
leaq 0xcd99(%rip), %rbp      # 0x84e76
movq (%rax,%r12,8), %rsi
movq (%rsi), %rax
movq %r13, %rdi
callq *0x58(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x416d6
movq %rax, %rdi
movq %r12, %rsi
callq 0x738fa
movq %rax, %r15
movq %r13, %rdi
callq 0x48a06
movb (%r15), %al
movb 0x8(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x8(%rsp)
movq 0x8(%r15), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x48a06
movq %r13, %rdi
callq 0x48a06
movzbl 0x8(%rsp), %esi
leaq 0x10(%rsp), %rdi
callq 0x48aa8
incq %r12
movq 0x80(%r14), %rax
movq 0x88(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jb 0x780dd
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rdi
jmp 0x78196
jmp 0x78189
movq %rax, %r14
jmp 0x7819b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4191c
movq %rbx, %rdi
callq 0x4191c
movq %r14, %rdi
callq 0x3a780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/Random.cpp
// Function: RayTracer::random_double()
double RayTracer::random_double() {
    static std::uniform_real_distribution<double> distribution(0.0, 1.0);
    static std::mt19937 generator;
    static std::function<double()> rand_generator = std::bind(distribution, generator);
    return rand_generator();
}

// Assembly:
pushq %rbx
movb 0x2d2e5(%rip), %al      # 0xa5d50
testb %al, %al
je 0x78a9f
movb 0x2e66b(%rip), %al      # 0xa70e0
testb %al, %al
je 0x78aa6
movb 0x2e689(%rip), %al      # 0xa7108
testb %al, %al
je 0x78aad
cmpq $0x0, 0x2e66d(%rip)     # 0xa70f8
je 0x78b4b
leaq 0x2e650(%rip), %rdi     # 0xa70e8
popq %rbx
jmpq *0x2e661(%rip)          # 0xa7100
callq 0x3ac20
jmp 0x78a6f
callq 0x3ac51
jmp 0x78a79
leaq 0x2e654(%rip), %rdi     # 0xa7108
callq 0x3a7a0
testl %eax, %eax
je 0x78a83
xorps %xmm0, %xmm0
movups %xmm0, 0x2e631(%rip)    # 0xa70f8
movups %xmm0, 0x2e61a(%rip)    # 0xa70e8
movl $0x1398, %edi           # imm = 0x1398
callq 0x3a460
movq %rax, %rbx
movaps 0x2d25e(%rip), %xmm0    # 0xa5d40
movups %xmm0, (%rax)
movq %rax, %rdi
addq $0x10, %rdi
leaq 0x2d265(%rip), %rsi     # 0xa5d58
movl $0x1388, %edx           # imm = 0x1388
callq 0x3a3a0
movq %rbx, 0x2e5e4(%rip)     # 0xa70e8
leaq 0x2e5dd(%rip), %rsi     # 0xa70e8
leaq 0x1d6(%rip), %rax       # 0x78ce8
movq %rax, 0x2e5e7(%rip)     # 0xa7100
leaq 0x1ec(%rip), %rax       # 0x78d0c
movq %rax, 0x2e5d1(%rip)     # 0xa70f8
leaq 0x19c(%rip), %rdi       # 0x78cca
leaq 0x2c903(%rip), %rdx     # 0xa5438
callq 0x3a3e0
leaq 0x2e5c7(%rip), %rdi     # 0xa7108
callq 0x3a2c0
jmp 0x78a83
callq 0x3a1a0
movq %rax, %rbx
leaq 0x2e5ae(%rip), %rdi     # 0xa7108
callq 0x3a2b0
movq %rbx, %rdi
callq 0x3a780
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/Random.cpp
// Function: RayTracer::random_in_unit_sphere()
RayTracer::Vec3 RayTracer::random_in_unit_sphere() {
    Vec3 p;
    do {
        p = 2.0 * Vec3(random_double(), random_double(), random_double()) - 1.0;
    } while (p.squared_length() >= 1.0);
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
callq 0x729d4
leaq 0x18(%rsp), %r14
leaq 0x38(%rsp), %r15
leaq 0x58(%rsp), %r12
callq 0x78a64
movsd %xmm0, 0x10(%rsp)
callq 0x78a64
movsd %xmm0, 0x8(%rsp)
callq 0x78a64
movaps %xmm0, %xmm2
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x729ee
movq %r15, %rdi
movsd 0xb49a(%rip), %xmm0     # 0x84060
movq %r14, %rsi
callq 0x73724
movq %r12, %rdi
movq %r15, %rsi
movsd 0xb464(%rip), %xmm0     # 0x84040
callq 0x7366a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x72a08
movq %rbx, %rdi
callq 0x72e5e
ucomisd 0xb444(%rip), %xmm0     # 0x84040
jae 0x78b89
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/Random.cpp
// Function: RayTracer::random_in_unit_disc()
RayTracer::Vec3 RayTracer::random_in_unit_disc() {
    Vec3 p;
    do {
        p = 2.0 * Vec3(random_double(), random_double(), 0) - Vec3(1, 1, 0);
    } while (dot(p, p) >= 1.0);
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
callq 0x729d4
leaq 0x30(%rsp), %r14
leaq 0x50(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x70(%rsp), %r13
callq 0x78a64
movsd %xmm0, 0x8(%rsp)
callq 0x78a64
movaps %xmm0, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x729ee
movq %r15, %rdi
movsd 0xb3f8(%rip), %xmm0     # 0x84060
movq %r14, %rsi
callq 0x73724
xorps %xmm2, %xmm2
movq %r12, %rdi
movsd 0xb3c2(%rip), %xmm0     # 0x84040
movapd %xmm0, %xmm1
callq 0x729ee
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7363a
movq %rbx, %rdi
movq %r13, %rsi
callq 0x72a08
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x737de
ucomisd 0xb38d(%rip), %xmm0     # 0x84040
jae 0x78c39
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::ProgressBar()
ProgressBar::ProgressBar() {
    this->min = DEFAULT_MIN;
    this->max = DEFAULT_MAX;
    
    this->left = DEFAULT_LEFT;
    this->right = DEFAULT_RIGHT;

    this->width = DEFAULT_WIDTH;
    this->interval = DEFAULT_INTERVAL;

    this->init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %rax
movq %rax, (%rsp)
movq %rax, 0x20(%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %r15
leaq 0x50(%rdi), %rbp
movq %rbp, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc317(%rip), %rdx      # 0x8539b
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x44728
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3a560
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x790b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a470
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xc2d5(%rip), %rdx      # 0x8539b
movq %rdx, %rsi
callq 0x44728
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x3a560
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x790f3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a470
movl $0xffffffff, 0x60(%rbx) # imm = 0xFFFFFFFF
movq $0x1f4, 0x78(%rbx)      # imm = 0x1F4
movb $0x1, 0x6c(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
movb $0x0, (%rbx)
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x78(%rbx), %rdx
movq %rdx, 0x70(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7914a
movq %rax, %rbx
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x79161
movq (%rbp), %rsi
incq %rsi
callq 0x3a470
movq (%r14), %rdi
cmpq (%rsp), %rdi
je 0x79179
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3a470
movq %rbx, %rdi
callq 0x3a780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::init()
void ProgressBar::init() {
    this->var_width = this->width < 0;
    this->progress = this->min;
    this->done = false;

    this->last_draw = chrono::duration_cast<chrono::milliseconds>(chrono::system_clock::now().time_since_epoch()) - this->interval;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x60(%rdi), %eax
shrl $0x1f, %eax
movb %al, 0x6c(%rdi)
movq 0x10(%rdi), %rax
movq %rax, 0x8(%rdi)
movb $0x0, (%rdi)
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x78(%rbx), %rdx
movq %rdx, 0x70(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::ProgressBar(long, long)
ProgressBar::ProgressBar(long min_value, long max_value) {
    this->min = min_value;
    this->max = max_value;
    
    this->left = DEFAULT_LEFT;
    this->right = DEFAULT_RIGHT;

    this->width = DEFAULT_WIDTH;
    this->interval = DEFAULT_INTERVAL;

    this->init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %rax
movq %rax, (%rsp)
movq %rax, 0x20(%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %r15
leaq 0x50(%rdi), %rbp
movq %rbp, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
movq %rsi, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc182(%rip), %rdx      # 0x8539b
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x44728
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3a560
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x7924c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a470
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xc140(%rip), %rdx      # 0x8539b
movq %rdx, %rsi
callq 0x44728
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x3a560
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x79288
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a470
movl $0xffffffff, 0x60(%rbx) # imm = 0xFFFFFFFF
movq $0x1f4, 0x78(%rbx)      # imm = 0x1F4
movb $0x1, 0x6c(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
movb $0x0, (%rbx)
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x78(%rbx), %rdx
movq %rdx, 0x70(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x792df
movq %rax, %rbx
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x792f6
movq (%rbp), %rsi
incq %rsi
callq 0x3a470
movq (%r14), %rdi
cmpq (%rsp), %rdi
je 0x7930e
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3a470
movq %rbx, %rdi
callq 0x3a780
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::ProgressBar(long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ProgressBar::ProgressBar(long min_value, long max_value, std::string left_text, std::string right_text) {
    this->min = min_value;
    this->max = max_value;
    
    this->left = left_text;
    this->right = right_text;

    this->width = DEFAULT_WIDTH;
    this->interval = DEFAULT_INTERVAL;

    this->init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %r15
movq %r15, 0x20(%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %r13
leaq 0x50(%rdi), %rbp
movq %rbp, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
movq %rsi, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
movq %r14, %rdi
movq %rcx, %rsi
callq 0x3a250
movq %r13, %rdi
movq %r12, %rsi
callq 0x3a250
movl $0xffffffff, 0x60(%rbx) # imm = 0xFFFFFFFF
movq $0x1f4, 0x78(%rbx)      # imm = 0x1F4
movb $0x1, 0x6c(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
movb $0x0, (%rbx)
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x78(%rbx), %rdx
movq %rdx, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r13), %rdi
cmpq %rbp, %rdi
je 0x793da
movq (%rbp), %rsi
incq %rsi
callq 0x3a470
movq %r14, %rdi
movq %r15, %rsi
callq 0x3acb6
movq %rbx, %rdi
callq 0x3a780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::ProgressBar(long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
ProgressBar::ProgressBar(long min_value, long max_value, std::string left_text, std::string right_text, int width) {
    this->min = min_value;
    this->max = max_value;
    
    this->left = left_text;
    this->right = right_text;

    this->width = width;
    this->interval = DEFAULT_INTERVAL;

    this->init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %rbx
addq $0x20, %rdi
leaq 0x30(%rbx), %r15
movq %r15, 0x20(%rbx)
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movb %al, 0x30(%rbx)
leaq 0x40(%rbx), %r13
leaq 0x50(%rbx), %r14
movq %r14, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movb %al, 0x50(%rbx)
movq %rsi, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
movq %rdi, (%rsp)
movq %rcx, %rsi
callq 0x3a250
movq %r13, %rdi
movq %r12, %rsi
callq 0x3a250
movl %ebp, 0x60(%rbx)
movq $0x1f4, 0x78(%rbx)      # imm = 0x1F4
shrl $0x1f, %ebp
movb %bpl, 0x6c(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
movb $0x0, (%rbx)
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x78(%rbx), %rdx
movq %rdx, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x794b4
movq (%r14), %rsi
incq %rsi
callq 0x3a470
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x3acca
movq %rbx, %rdi
callq 0x3a780
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::ProgressBar(long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::chrono::duration<long, std::ratio<1l, 1000l>>)
ProgressBar::ProgressBar(long min_value, long max_value, std::string left_text, std::string right_text, int width, chrono::milliseconds update_interval) {
    this->min = min_value;
    this->max = max_value;
    
    this->left = left_text;
    this->right = right_text;

    this->width = width;
    this->interval = update_interval;

    this->init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %rbx
addq $0x20, %rdi
leaq 0x30(%rbx), %r15
movq %r15, 0x20(%rbx)
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movb %al, 0x30(%rbx)
leaq 0x40(%rbx), %r13
leaq 0x50(%rbx), %r14
movq %r14, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movb %al, 0x50(%rbx)
movq %rsi, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
movq %rdi, (%rsp)
movq %rcx, %rsi
callq 0x3a250
movq %r13, %rdi
movq %r12, %rsi
callq 0x3a250
movq 0x40(%rsp), %rax
movl %ebp, 0x60(%rbx)
movq %rax, 0x78(%rbx)
shrl $0x1f, %ebp
movb %bpl, 0x6c(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%rbx)
movb $0x0, (%rbx)
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x78(%rbx), %rdx
movq %rdx, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x7958f
movq (%r14), %rsi
incq %rsi
callq 0x3a470
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x3acde
movq %rbx, %rdi
callq 0x3a780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::win()
void ProgressBar::win() {
    // Make sure progress isn't too large
    if (this->progress > this->max) {
        this->progress = this->max;
    }
    // Do a draw
    this->draw();
    // Print endline to finish it up
    cout << endl;
    this->done = true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq %rax, 0x8(%rdi)
jle 0x798b7
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x795a4
movq 0x2b6c2(%rip), %r14     # 0xa4f88
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3a430
movsbl %al, %esi
movq %r14, %rdi
callq 0x3a050
movq %rax, %rdi
callq 0x3a300
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/ProgressBar.cpp
// Function: std::ProgressBar::set(long)
void ProgressBar::set(long value) {
    if (this->done) {
        return;
    }

    // Update the progress
    this->progress = value;
    
    // Check if we are done
    if (this->progress >= this->max) {
        return this->win();
    }

    // Otherwise, check for draw call
    chrono::milliseconds now = chrono::duration_cast<chrono::milliseconds>(chrono::system_clock::now().time_since_epoch());
    if (now - this->last_draw >= this->interval) {
        // Do the draw call
        this->draw();

        // Update the clock
        this->last_draw += this->interval;

        // Reset to now if we're an entire interval or more behind
        if (now - this->last_draw >= this->interval) {
            this->last_draw = now;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
je 0x79913
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
movq %rsi, 0x8(%rdi)
cmpq %rsi, 0x18(%rdi)
jle 0x79976
callq 0x3a080
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %r14
addq %rax, %r14
movq %r14, %rax
subq 0x70(%rbx), %rax
cmpq 0x78(%rbx), %rax
jl 0x7990b
movq %rbx, %rdi
callq 0x795a4
movq 0x78(%rbx), %rax
movq 0x70(%rbx), %rcx
addq %rax, %rcx
movq %r14, %rdx
subq %rcx, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rcx
movq %rcx, 0x70(%rbx)
jmp 0x7990b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x798a2
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/Camera.cpp
// Function: RayTracer::Camera::get_ray(int, int) const
Ray Camera::get_ray(int x, int y) const {
    // Compute u and v
    double s, t;
    if (this->rays > 1) {
        s = double(x + random_double()) / double(this->width);
        t = double(this->height - 1 - y + random_double()) / double(this->height);
    } else {
        s = double(x) / double(this->width);
        t = double(this->height - 1 - y) / double(this->height);
    }

    // Return a ray shot through this pixel
    Vec3 rd = this->lens_radius * random_in_unit_disc();
    Vec3 offset = this->u * rd.x + this->v * rd.y;
    return Ray(this->origin + offset, this->lower_left_corner + s * this->horizontal + t * this->vertical - this->origin - offset);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
cmpl $0x2, 0x10(%rsi)
cvtsi2sd %edx, %xmm1
jl 0x79df7
movsd %xmm1, 0x8(%rsp)
callq 0x78a64
addsd 0x8(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x8(%r14), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
notl %ebp
addl 0xc(%r14), %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x78a64
addsd 0x10(%rsp), %xmm0
movl 0xc(%r14), %eax
jmp 0x79e16
cvtsi2sdl 0x8(%r14), %xmm0
divsd %xmm0, %xmm1
movl 0xc(%r14), %eax
notl %ebp
addl %eax, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x170(%r14), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x78c0d
leaq 0x128(%rsp), %r12
movq %r12, %rdi
movsd 0x18(%rsp), %xmm0
movq %r15, %rsi
callq 0x73724
leaq 0x110(%r14), %rsi
movsd 0x8(%r12), %xmm0
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x736f6
leaq 0x150(%r14), %rsi
movsd 0x10(%r12), %xmm0
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x736f6
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x735ae
leaq 0xf0(%r14), %r13
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x735ae
leaq 0x90(%r14), %rbp
leaq 0xb0(%r14), %rsi
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x73724
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x735ae
addq $0xd0, %r14
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
movq %r14, %rsi
callq 0x73724
leaq 0xe8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x735ae
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x7363a
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x7363a
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0x62640
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/RenderWorld.cpp
// Function: RayTracer::RenderWorld::bounce_ray(RayTracer::Ray const&, int) const
Vec3 RenderWorld::bounce_ray(const Ray& ray, int depth) const {
    // Find the hit with the smallest hit
    HitRecord record;
    bool hit = this->objects->hit(ray, 0.0, numeric_limits<double>::max(), record);

    // Check if a hit occured
    if (hit) {
        Ray scattered;
        Vec3 attenuation;
        if (depth < 50 && record.material->scatter(ray, record, attenuation, scattered)) {
            return attenuation * this->bounce_ray(scattered, depth + 1);
        } else {
            return Vec3(0, 0, 0);
        }
    } else {
        Vec3 unit = ray.direction.normalize();
        double t = 0.5 * (unit.y + 1.0);
        return (1.0 - t) * Vec3(1, 1, 1) + t * Vec3(0.5, 0.7, 1.0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x729d4
leaq 0xd0(%rsp), %rdi
callq 0x729d4
movq 0x8(%r14), %rdi
movsd 0x107ca(%rip), %xmm1    # 0x8b748
leaq 0x98(%rsp), %rdx
xorps %xmm0, %xmm0
movq %r15, %rsi
callq 0x8282c
testb %al, %al
je 0x7b007
leaq 0x58(%rsp), %rdi
callq 0x625ec
leaq 0x18(%rsp), %rdi
callq 0x729d4
cmpl $0x31, %ebp
jg 0x7b0c5
leaq 0x98(%rsp), %rdx
movq 0x60(%rdx), %rdi
movq (%rdi), %rax
leaq 0x18(%rsp), %rcx
leaq 0x58(%rsp), %r8
movq %r15, %rsi
callq *0x20(%rax)
testb %al, %al
je 0x7b0c5
incl %ebp
leaq 0x38(%rsp), %r15
leaq 0x58(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x7af3e
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x736c6
jmp 0x7b0d6
addq $0x20, %r15
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x72e8e
movsd 0x901d(%rip), %xmm1     # 0x84040
movsd 0x10(%r14), %xmm0
addsd %xmm1, %xmm0
mulsd 0x8feb(%rip), %xmm0     # 0x84020
movsd %xmm0, 0x10(%rsp)
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movapd %xmm1, %xmm0
movapd %xmm1, %xmm2
callq 0x729ee
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
movq %r14, %rsi
callq 0x73724
leaq 0x100(%rsp), %r14
movsd 0x106cc(%rip), %xmm1    # 0x8b750
movq %r14, %rdi
movsd 0x8f91(%rip), %xmm0     # 0x84020
movsd 0x8fa9(%rip), %xmm2     # 0x84040
callq 0x729ee
leaq 0x120(%rsp), %r12
movq %r12, %rdi
movsd 0x10(%rsp), %xmm0
movq %r14, %rsi
callq 0x73724
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x735ae
jmp 0x7b0d6
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq 0x729ee
movq %rbx, %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/RenderWorld.cpp
// Function: RayTracer::RenderWorld::render_pixel(int, int, RayTracer::Camera const&) const
Vec3 RenderWorld::render_pixel(int x, int y, const Camera& cam) const {
    Vec3 col;
    for (int r = 0; r < cam.rays; r++) {
        Ray ray = cam.get_ray(x, y);

        // Get the colour
        col += this->bounce_ray(ray);
    }

    // Compute the colour average
    Vec3 avg_col = col / cam.rays;
    if (cam.gamma) {
        // Gamma-correct the avg_colour
        return Vec3(sqrtf64(avg_col.x), sqrtf64(avg_col.y), sqrtf64(avg_col.z));
    } else {
        return avg_col;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r14
movl %ecx, (%rsp)
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x729d4
movl 0x10(%r14), %eax
testl %eax, %eax
jle 0x7b162
xorl %ebp, %ebp
leaq 0x18(%rsp), %r13
leaq 0x78(%rsp), %rbx
movq %r13, %rdi
movq %r14, %rsi
movl %r15d, %edx
movl (%rsp), %ecx
callq 0x79d8a
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x7af3e
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x72a3c
incl %ebp
movl 0x10(%r14), %eax
cmpl %eax, %ebp
jl 0x7b12a
cvtsi2sd %eax, %xmm0
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x73782
cmpb $0x0, 0x14(%r14)
je 0x7b1c5
movsd 0x20(%rsp), %xmm0
callq 0x3a170
movsd %xmm0, (%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x3a170
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x3a170
movaps %xmm0, %xmm2
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movsd (%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x729ee
jmp 0x7b1ea
leaq 0x28eb4(%rip), %rax     # 0xa4080
addq $0x10, %rax
movq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movups 0x20(%rsp), %xmm0
movups %xmm0, 0x8(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/RenderWorld.cpp
// Function: RayTracer::RenderWorld::update(std::chrono::duration<long, std::ratio<1l, 1000l>>)
void RenderWorld::update(chrono::milliseconds time_passed) {
    // Loop through all objects and update them
    for (size_t i = 0; i < this->objects->size(); i++) {
        this->objects->operator[](i)->update(time_passed);
    }
    // Re-optimise the tree
    this->objects->optimize();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x82820
testq %rax, %rax
je 0x7b245
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x82a28
movq (%rax), %rcx
movq %rax, %rdi
movq %r14, %rsi
callq *0x50(%rcx)
incq %r15
movq 0x8(%rbx), %rdi
callq 0x82820
cmpq %rax, %r15
jb 0x7b21c
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x826dc
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/RenderWorld.cpp
// Function: RayTracer::RenderWorld::operator=(RayTracer::RenderWorld)
RenderWorld& RenderWorld::operator=(RenderWorld other) {
    // Only do some stuff if this != other
    if (this != &other) {
        // Swap this data with the other data
        swap(*this, other);
    }
    return *this;
}

// Assembly:
movq %rdi, %rax
cmpq %rsi, %rdi
je 0x7b276
movq 0x8(%rax), %rcx
movq 0x8(%rsi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/RenderWorld.cpp
// Function: RayTracer::RenderWorld::to_json[abi:cxx11]() const
json RenderWorld::to_json() const {
    json j;
    j["objects"] = json::array();

    for (size_t i = 0; i < this->objects->size(); i++) {
        j["objects"][i] = this->objects->operator[](i)->to_json();
    }

    return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x48a06
movq %rbx, %rdi
callq 0x48a06
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x747bc
leaq 0x9b91(%rip), %rsi      # 0x84e76
movq %rbx, %rdi
callq 0x416d6
movq %rax, %r15
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x48a06
movb (%r15), %al
movb (%r12), %cl
movb %cl, (%r15)
movb %al, (%r12)
leaq 0x20(%rsp), %r13
movq 0x8(%r15), %rax
movq (%r13), %rcx
movq %rcx, 0x8(%r15)
movq %rax, (%r13)
movq %r15, %rdi
callq 0x48a06
movq %r12, %rdi
callq 0x48a06
movzbl -0x8(%r13), %esi
movq %r13, %rdi
callq 0x48aa8
xorl %r12d, %r12d
leaq 0x8(%rsp), %r13
leaq 0x9b2a(%rip), %rbp      # 0x84e76
movq 0x8(%r14), %rdi
callq 0x82820
cmpq %rax, %r12
jae 0x7b3de
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x82a28
movq (%rax), %rcx
movq %r13, %rdi
movq %rax, %rsi
callq *0x58(%rcx)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x416d6
movq %rax, %rdi
movq %r12, %rsi
callq 0x738fa
movq %rax, %r15
movq %r13, %rdi
callq 0x48a06
movb (%r15), %al
movb 0x8(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x8(%rsp)
movq 0x8(%r15), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x48a06
movq %r13, %rdi
callq 0x48a06
movzbl 0x8(%rsp), %esi
leaq 0x10(%rsp), %rdi
callq 0x48aa8
incq %r12
jmp 0x7b34c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rdi
jmp 0x7b404
jmp 0x7b40b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4191c
jmp 0x7b40e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4191c
movq %r14, %rdi
callq 0x3a780
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/materials/Lambertian.cpp
// Function: RayTracer::Lambertian::scatter(RayTracer::Ray const&, RayTracer::HitRecord const&, RayTracer::Vec3&, RayTracer::Ray&) const
bool Lambertian::scatter(const Ray&, const HitRecord& record, Vec3& attenuation, Ray& ray_out) const {
    Vec3 target = record.hitpoint + record.normal + random_in_unit_sphere();
    ray_out = Ray(record.hitpoint, target - record.hitpoint);
    attenuation = this->albedo;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r15
movq %rcx, (%rsp)
movq %rdi, %r14
leaq 0x18(%rdx), %r12
addq $0x38, %rdx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x735ae
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x78b67
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x735ae
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x7363a
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x62640
movq %r15, %rdi
movq %rbx, %rsi
callq 0x72a08
addq $0x20, %r15
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
callq 0x72a08
addq $0x10, %r14
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x72a08
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/materials/Lambertian.cpp
// Function: RayTracer::Lambertian::to_json[abi:cxx11]() const
nlohmann::json Lambertian::to_json() const {
    json j;
    
    // First, let the Material class compile
    this->baseclass_to_json(j);

    // Add our own properties
    j["albedo"] = this->albedo.to_json();
    return j;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x48a06
movq %rbx, %rdi
callq 0x48a06
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *(%rax)
addq $0x10, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x72ef8
leaq 0xd8ce(%rip), %rsi      # 0x8b94e
movq %rbx, %rdi
callq 0x416d6
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x48a06
movb (%r14), %al
movb (%r15), %cl
movb %cl, (%r14)
movb %al, (%r15)
leaq 0x10(%rsp), %r12
movq 0x8(%r14), %rax
movq (%r12), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%r12)
movq %r14, %rdi
callq 0x48a06
movq %r15, %rdi
callq 0x48a06
movzbl -0x8(%r12), %esi
movq %r12, %rdi
callq 0x48aa8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4191c
jmp 0x7e0f8
movq %rax, %r14
movq %rbx, %rdi
callq 0x4191c
movq %r14, %rdi
callq 0x3a780
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/materials/Metal.cpp
// Function: RayTracer::Metal::scatter(RayTracer::Ray const&, RayTracer::HitRecord const&, RayTracer::Vec3&, RayTracer::Ray&) const
bool Metal::scatter(const Ray& ray_in, const HitRecord& record, Vec3& attenuation, Ray& ray_out) const {
    Vec3 reflected = this->reflect(ray_in.direction.normalize(), record.normal);
    ray_out = Ray(record.hitpoint, reflected + this->fuzz*random_in_unit_sphere());
    attenuation = this->albedo;
    return (dot(ray_out.direction, record.normal) > 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %rbx
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movq %rdi, %r15
addq $0x20, %rsi
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
callq 0x72e8e
leaq 0x38(%r13), %r12
movq (%r15), %rax
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq *0x30(%rax)
addq $0x18, %r13
movsd 0x30(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x78(%rsp), %rbp
movq %rbp, %rdi
callq 0x78b67
leaq 0x98(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movq %rbp, %rsi
callq 0x73724
leaq 0xb8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x735ae
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x62640
movq %rbx, %rdi
movq %r14, %rsi
callq 0x72a08
addq $0x20, %rbx
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x72a08
addq $0x10, %r15
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x72a08
movq %rbx, %rdi
movq %r12, %rsi
callq 0x737de
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
seta %al
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/materials/Metal.cpp
// Function: RayTracer::Metal::to_json[abi:cxx11]() const
json Metal::to_json() const {
    json j;

    // First, let the Material class compile
    this->baseclass_to_json(j);

    // Add our own properties
    j["albedo"] = this->albedo.to_json();
    j["fuzz"] = this->fuzz;
    return j;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x48a06
movq %rbx, %rdi
callq 0x48a06
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *(%rax)
leaq 0x10(%r14), %rsi
leaq 0x18(%rsp), %rdi
callq 0x72ef8
leaq 0xd2a3(%rip), %rsi      # 0x8b94e
movq %rbx, %rdi
callq 0x416d6
movq %rax, %r15
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x48a06
movb (%r15), %al
movb (%r12), %cl
movb %cl, (%r15)
movb %al, (%r12)
leaq 0x20(%rsp), %r13
movq 0x8(%r15), %rax
movq (%r13), %rcx
movq %rcx, 0x8(%r15)
movq %rax, (%r13)
movq %r15, %rdi
callq 0x48a06
movq %r12, %rdi
callq 0x48a06
movzbl -0x8(%r13), %esi
movq %r13, %rdi
callq 0x48aa8
leaq 0x8(%rsp), %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movsd 0x30(%r14), %xmm0
movb $0x7, (%r15)
movsd %xmm0, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%r15)
movq %r15, %rdi
callq 0x48a06
movq %r15, %rdi
callq 0x48a06
leaq 0xd235(%rip), %rsi      # 0x8b979
movq %rbx, %rdi
callq 0x416d6
movq %rax, %r14
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x48a06
movb (%r14), %al
movb (%r12), %cl
movb %cl, (%r14)
movb %al, (%r12)
movq 0x8(%r14), %rax
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%r12)
movq %r14, %rdi
callq 0x48a06
movq %r12, %rdi
callq 0x48a06
movzbl (%r12), %esi
movq %r15, %rdi
callq 0x48aa8
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x7e7c1
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x4191c
jmp 0x7e7cb
movq %rax, %r14
movq %rbx, %rdi
callq 0x4191c
movq %r14, %rdi
callq 0x3a780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/materials/Dielectric.cpp
// Function: RayTracer::Dielectric::refract(RayTracer::Vec3 const&, RayTracer::Vec3 const&, double, RayTracer::Vec3&) const
bool Dielectric::refract(const Vec3& v, const Vec3& n, double ni_over_nt, Vec3& refracted) const {
    Vec3 v_normalized = v.normalize();
    double dt = dot(v_normalized, n);
    double D = 1.0 - ni_over_nt * ni_over_nt * (1 - dt * dt);
    // Only refract if there is a real solution to Snell's law
    if (D > 0) {
        refracted = ni_over_nt * (v_normalized - n * dt) - n * sqrtf64(D);
        return true;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %rbx
movsd %xmm0, 0x10(%rsp)
movq %rdx, %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x72e8e
movq %r15, %rdi
movq %r14, %rsi
callq 0x737de
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x4e6a(%rip), %xmm3     # 0x84040
movapd %xmm3, %xmm2
subsd %xmm1, %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x7f288
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movsd %xmm3, 0x8(%rsp)
callq 0x736f6
leaq 0x78(%rsp), %r12
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x7363a
leaq 0x98(%rsp), %r15
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
movq %r12, %rsi
callq 0x73724
movsd 0x8(%rsp), %xmm0
callq 0x3a170
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x736f6
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7363a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x72a08
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm3
ucomisd %xmm1, %xmm3
seta %al
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/animations/camera/CameraRotation.cpp
// Function: RayTracer::CameraRotation::recompute(RayTracer::Camera*)
void CameraRotation::recompute(Camera* target) {
    Vec3 lookat = target->lookat;
    Vec3 lookfrom = target->lookfrom;
    Vec3 lookfrom_circle(lookfrom.x, 0, lookfrom.z);

    this->center = Vec3(lookat.x, 0, lookat.z);
    this->angle = acosf64(dot(Vec3(0, 0, 1), (lookfrom_circle - center).normalize()));
    this->radius = (lookfrom_circle - this->center).length();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movsd 0x48(%rsi), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x58(%rsi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsi), %xmm0
movsd 0x38(%rsi), %xmm2
leaq 0x78(%rsp), %r14
xorps %xmm1, %xmm1
movq %r14, %rdi
callq 0x729ee
leaq 0x18(%rsp), %r12
xorps %xmm1, %xmm1
movq %r12, %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm2
callq 0x729ee
leaq 0x10(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x72a08
leaq 0x18(%rsp), %r12
movsd 0x379a(%rip), %xmm2     # 0x84040
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %r12, %rdi
callq 0x729ee
leaq 0x38(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7363a
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x72e8e
movq %r12, %rdi
movq %rbp, %rsi
callq 0x737de
callq 0x3a400
movsd %xmm0, 0x38(%rbx)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7363a
movq %r12, %rdi
callq 0x72e36
movsd %xmm0, 0x30(%rbx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/animations/camera/CameraRotation.cpp
// Function: RayTracer::CameraRotation::update(std::chrono::duration<long, std::ratio<1l, 1000l>>, RayTracer::Camera*)
void CameraRotation::update(chrono::milliseconds time_passed, Camera* target) {
    // Set the camera lookfrom to this new position
    target->lookfrom = Vec3(
        this->center.x + cosf64(this->angle) * this->radius,
        target->lookfrom.y,
        this->center.z + sinf64(this->angle) * this->radius
    );

    this->angle += this->speed * time_passed.count();
    while (this->angle >= 2 * M_PI) {
        this->angle -= 2 * M_PI;
    }

    // Recompute the camera variables
    target->recompute();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movsd 0x18(%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x38(%rdi), %xmm0
callq 0x3a120
mulsd 0x30(%r14), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x20(%rbx), %r12
movsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x28(%r14), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x38(%r14), %xmm0
callq 0x3a2a0
mulsd 0x30(%r14), %xmm0
movsd 0x10(%rsp), %xmm2
addsd %xmm0, %xmm2
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movsd 0x8(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x729ee
movq %r12, %rdi
movq %r13, %rsi
callq 0x72a08
xorps %xmm0, %xmm0
cvtsi2sd %r15, %xmm0
mulsd 0x40(%r14), %xmm0
addsd 0x38(%r14), %xmm0
ucomisd 0xb0c7(%rip), %xmm0     # 0x8ba98
jb 0x809ed
movsd 0xb0c5(%rip), %xmm1     # 0x8baa0
movsd 0xb0b5(%rip), %xmm2     # 0x8ba98
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jae 0x809e3
movsd %xmm0, 0x38(%r14)
movq %rbx, %rdi
callq 0x79a6a
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/animations/camera/CameraRotation.cpp
// Function: RayTracer::CameraRotation::to_json[abi:cxx11]() const
json CameraRotation::to_json() const {
    json j;
    
    // First, let the parent add their general properties
    this->baseclass_to_json(j);

    // Now, add our own
    j["loop_time"] = this->loop_time.count();

    return j;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x48a06
movq %rbx, %rdi
callq 0x48a06
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *(%rax)
movq 0x48(%r14), %rax
leaq 0x8(%rsp), %r14
movb $0x5, (%r14)
movq %rax, 0x8(%r14)
movq %r14, %rdi
callq 0x48a06
movq %r14, %rdi
callq 0x48a06
leaq 0xb042(%rip), %rsi      # 0x8baa8
movq %rbx, %rdi
callq 0x416d6
movq %rax, %r14
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x48a06
movb (%r14), %al
movb (%r12), %cl
movb %cl, (%r14)
movb %al, (%r12)
movq 0x8(%r14), %rax
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%r12)
movq %r14, %rdi
callq 0x48a06
movq %r12, %rdi
callq 0x48a06
movzbl (%r12), %esi
movq %r15, %rdi
callq 0x48aa8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4191c
jmp 0x80ae1
movq %rax, %r14
movq %rbx, %rdi
callq 0x4191c
movq %r14, %rdi
callq 0x3a780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/BoundingBox.cpp
// Function: RayTracer::BoundingBox::hit(RayTracer::Ray const&, double, double) const
bool BoundingBox::hit(const Ray& ray, double t_min, double t_max) const {
    // Fetch the correct order of the hits
    for (int i = 0; i < 3; i++) {
        // Compute the t's
        double invD = 1.0 / ray.direction.get(i);
        double t0 = (this->p1.get(i) - ray.origin.get(i)) * invD;
        double t1 = (this->p2.get(i) - ray.origin.get(i)) * invD;
        if (invD < 0.0) {
            std::swap(t0, t1);
        }

        // Mix in the given min and max t values
        t_min = t0 > t_min ? t0 : t_min;
        t_max = t1 < t_max ? t1 : t_max;

        if (t_max <= t_min) {
            return false;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsi), %r15
leaq 0x20(%rdi), %r12
xorl %ebp, %ebp
xorl %r13d, %r13d
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movq %r15, %rdi
movl %r13d, %esi
callq 0x72ce8
movsd 0x2ea0(%rip), %xmm1     # 0x84040
divsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movq %r14, %rdi
movl %r13d, %esi
callq 0x72ce8
movapd %xmm0, (%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x72ce8
movapd (%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x20(%rsp), %xmm1
movapd %xmm1, (%rsp)
movq %r12, %rdi
movl %r13d, %esi
callq 0x72ce8
movapd %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x72ce8
movapd 0x30(%rsp), %xmm4
movapd (%rsp), %xmm3
movapd 0x20(%rsp), %xmm2
xorpd %xmm1, %xmm1
subsd %xmm0, %xmm4
mulsd %xmm2, %xmm4
ucomisd %xmm2, %xmm1
movapd %xmm4, %xmm0
ja 0x81220
movapd %xmm3, %xmm0
maxsd 0x10(%rsp), %xmm0
cmpltsd %xmm1, %xmm2
andpd %xmm2, %xmm3
andnpd %xmm4, %xmm2
orpd %xmm3, %xmm2
minsd 0x18(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jae 0x8125f
cmpl $0x2, %r13d
leal 0x1(%r13), %eax
setae %bpl
movl %eax, %r13d
movapd %xmm2, %xmm1
cmpl $0x3, %eax
jne 0x81181
andb $0x1, %bpl
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq