// File: /workspace/github_cpp_makefile_star2_O3/Lut99[P]RayTracer/src/lib/Image.cpp
// Function: RayTracer::Image::pixel(unsigned int, unsigned int)
Pixel Image::pixel(unsigned int row, unsigned int col) {
    // Check if the indices are within bounds
    if (row >= this->width || col >= this->height) {
        throw out_of_range("Pixel at (" + to_string(col) + ", " + to_string(row) + ") is out of range for Image with size (" + to_string(this->width) + ", " + to_string(this->height) + ")");
    }

    // Get a pointer to the data
    double* pixel = this->data + 3 * (row * this->width + col);
    return Pixel(pixel);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jbe 0x63ab2
cmpl %r15d, 0xc(%r14)
jbe 0x63ab2
imull %ebp, %eax
addl %r15d, %eax
leal (%rax,%rax,2), %eax
shlq $0x3, %rax
addq (%r14), %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
movl %r15d, %esi
callq 0x64341
leaq 0x247bf(%rip), %rsi     # 0x88295
leaq 0x108(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x5cd14
leaq 0x247ae(%rip), %rsi     # 0x882a0
leaq 0x108(%rsp), %rdi
callq 0x3a810
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x63b20
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x63b2d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
movl %ebp, %esi
callq 0x64341
leaq 0x128(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x643c1
leaq 0x2472e(%rip), %rsi     # 0x882a3
leaq 0x128(%rsp), %rdi
callq 0x3a810
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x63ba5
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x63bb2
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x8(%r14), %esi
leaq 0xc8(%rsp), %rdi
callq 0x64341
leaq 0x148(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x643c1
leaq 0x246a4(%rip), %rsi     # 0x882a0
leaq 0x148(%rsp), %rdi
callq 0x3a810
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x63c2b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x63c38
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0xc(%r14), %esi
leaq 0xa8(%rsp), %rdi
callq 0x64341
leaq 0x168(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x643c1
leaq 0x224b9(%rip), %rsi     # 0x8613b
leaq 0x168(%rsp), %rdi
callq 0x3a810
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x63cb4
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x63cc1
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x3a680
xorl %ebp, %ebp
movq 0x402af(%rip), %rsi     # 0xa3fa0
movq 0x40290(%rip), %rdx     # 0xa3f88
movq %rbx, %rdi
callq 0x3a760
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x63d27
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63d27
movq %rax, %r14
movb $0x1, %bpl
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63d50
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63d50
movq %rax, %r14
movb $0x1, %bpl
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63d79
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63d79
movq %rax, %r14
movb $0x1, %bpl
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x63d98
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63d98
movq %rax, %r14
movb $0x1, %bpl
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63dc1
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63dc1
movq %rax, %r14
movb $0x1, %bpl
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63dea
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63dea
movq %rax, %r14
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x63e09
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63e09
movq %rax, %r14
movb $0x1, %bpl
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63e32
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63e32
movq %rax, %r14
movb $0x1, %bpl
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63e5b
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63e5b
movq %rax, %r14
movb $0x1, %bpl
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x63e7a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63e7a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63e9b
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3a480
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63ebc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %bpl, %bpl
jne 0x63eec
jmp 0x63ef4
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63eec
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x63eec
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a340
movq %r14, %rdi
callq 0x3a790