// File: /workspace/github_cpp_makefile_star2_O1/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 0x63fca
cmpl %r15d, 0xc(%r14)
jbe 0x63fca
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 0xe8(%rsp), %rdi
movl %r15d, %esi
callq 0x6481e
leaq 0x252a7(%rip), %rsi     # 0x89295
leaq 0x108(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
callq 0x5d118
leaq 0x25296(%rip), %rsi     # 0x892a0
leaq 0x108(%rsp), %rdi
callq 0x3a800
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x64038
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x64045
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 0xc8(%rsp), %rdi
movl %ebp, %esi
callq 0x6481e
leaq 0x128(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x6489e
leaq 0x25216(%rip), %rsi     # 0x892a3
leaq 0x128(%rsp), %rdi
callq 0x3a800
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x640bd
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x640ca
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 0xa8(%rsp), %rdi
callq 0x6481e
leaq 0x148(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x6489e
leaq 0x2518c(%rip), %rsi     # 0x892a0
leaq 0x148(%rsp), %rdi
callq 0x3a800
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x64143
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x64150
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 0x88(%rsp), %rdi
callq 0x6481e
leaq 0x168(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x6489e
leaq 0x22fa4(%rip), %rsi     # 0x8713e
leaq 0x168(%rsp), %rdi
callq 0x3a800
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x641cc
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x641d9
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 0x3a670
xorl %ebp, %ebp
movq 0x40d9f(%rip), %rsi     # 0xa4fa8
movq 0x40d80(%rip), %rdx     # 0xa4f90
movq %rbx, %rdi
callq 0x3a750
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6423f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x6423f
movq %rax, %r14
movb $0x1, %bpl
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64268
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64268
movq %rax, %r14
movb $0x1, %bpl
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64291
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64291
movq %rax, %r14
movb $0x1, %bpl
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x642b0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x642b0
movq %rax, %r14
movb $0x1, %bpl
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x642d9
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x642d9
movq %rax, %r14
movb $0x1, %bpl
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64302
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64302
movq %rax, %r14
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x64321
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64321
movq %rax, %r14
movb $0x1, %bpl
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6434a
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x6434a
movq %rax, %r14
movb $0x1, %bpl
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64373
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64373
movq %rax, %r14
movb $0x1, %bpl
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x64392
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64392
movq %rax, %r14
movb $0x1, %bpl
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x643bb
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x643bb
movq %rax, %r14
movb $0x1, %bpl
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x643e4
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x643e4
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x643f1
movq %rbx, %rdi
callq 0x3a330
movq %r14, %rdi
callq 0x3a780
nop