// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/RenderImage.cpp
// Function: RenderImage::render_tile(image_tile)
void RenderImage::render_tile(image_tile img_t){
    Eigen::Vector3d ray_pt, ray_dir, color, ampl;
    Ray ray;
    double t_value = 0;
    for (int i=img_t.x; i<img_t.x + img_t.x_len; i++){
        for (int j=img_t.y; j<img_t.y + img_t.y_len; j++){
            ray_pt = scene->get_camera().get_pixel_position(i, j);
            ray_dir = (ray_pt - scene->get_camera().get_eye()).normalized();
            ray = Ray(ray_pt, ray_dir);
            color << 0,0,0;
            ampl << 1,1,1;
            ray_trace(ray, color, ampl, scene->get_recursion(), t_value);
            scene->get_image().write_pixel(i, j, color);
            scene->get_image().write_t_value(i, j, t_value);
        }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movq %rsi, %r12
shrq $0x20, %r12
movq %rdx, %r13
shrq $0x20, %r13
leaq 0x160(%rsp), %rdi
callq 0x17cc8
leaq 0x18(%rsp), %rax
andq $0x0, (%rax)
leal (%r15,%rbx), %eax
movl %eax, 0x8(%rsp)
movq %r12, 0x20(%rsp)
addl %r12d, %r13d
movq %r13, 0x30(%rsp)
leaq 0x100(%rsp), %r12
leaq 0x70(%rsp), %r15
movq 0x20(%rsp), %rax
movl %eax, %ebp
cmpl 0x8(%rsp), %ebx
movq %rbx, 0x28(%rsp)
jge 0xd5ac
cmpl 0x30(%rsp), %ebp
jge 0xd5a5
movq 0x10(%rsp), %r13
movq (%r13), %rdi
callq 0x1041c
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %edx
movl %ebp, 0xc(%rsp)
movl %ebp, %ecx
callq 0x5150
movq %r15, %rbx
movq %r12, %r15
leaq 0x148(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x52e8
movq (%r13), %rdi
leaq 0x88(%rsp), %r13
pushq $0x1
popq %rbp
callq 0x1041c
movq %r15, %rdi
movq %rax, %rsi
callq 0x52b4
movq %r12, 0x70(%rsp)
movq %r15, %r12
movq %rbx, %r15
movq %r12, 0x78(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x537a
leaq 0x130(%rsp), %rdi
movq %r14, %rsi
callq 0x5806
movups 0x148(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0xf0(%rsp)
movups 0x130(%rsp), %xmm0
movaps %xmm0, 0xc0(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq %r14, %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x17d1e
leaq 0x160(%rsp), %rdi
movq %r14, %rsi
callq 0xdf16
movq %r13, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
movq %rbp, 0x48(%rsp)
andq $0x0, 0x88(%rsp)
movq %rbp, 0x50(%rsp)
andq $0x0, 0x70(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6232
andq $0x0, 0x100(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x6232
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x62da
leaq 0x118(%rsp), %rax
movq %rax, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
movq %rbp, 0x48(%rsp)
movq %rbp, 0x50(%rsp)
movabsq $0x3ff0000000000000, %r14 # imm = 0x3FF0000000000000
movq %r14, 0x118(%rsp)
movq %r14, 0x70(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6232
movq %r14, 0x100(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x6232
leaq 0x38(%rsp), %rdi
callq 0x62da
movq 0x10(%rsp), %r14
movq (%r14), %rdi
callq 0x10432
movq %r14, %rdi
leaq 0x160(%rsp), %rsi
movq %r13, %rdx
leaq 0x118(%rsp), %rcx
movl %eax, %r8d
leaq 0x18(%rsp), %r9
callq 0xd5da
movq (%r14), %rdi
callq 0x10422
movups 0x88(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x98(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq %rax, %rdi
movq 0x28(%rsp), %rbx
movl %ebx, %esi
movl 0xc(%rsp), %ebp
movl %ebp, %edx
leaq 0xa0(%rsp), %rcx
callq 0x3aba
movq (%r14), %rdi
callq 0x10422
movsd 0x18(%rsp), %xmm0
movq %rax, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x3b42
incl %ebp
jmp 0xd368
incl %ebx
jmp 0xd352
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd5c4
jmp 0xd5c4
jmp 0xd5c4
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x62da
movq %rbx, %rdi
callq 0x3490
nop