// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x188, %rsp            # imm = 0x188
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jbe 0x7324c
cmpl %r15d, 0xc(%r14)
jbe 0x7324c
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 %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x52220
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
movl %r15d, %esi
callq 0x72430
leaq 0x1d1aa(%rip), %rsi     # 0x90415
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x6e761
leaq 0x1d19c(%rip), %rdx     # 0x90420
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x5a4df
leaq 0x48(%rsp), %rdi
movl %ebp, %esi
callq 0x72430
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x6aac0
leaq 0x1d15d(%rip), %rdx     # 0x90423
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x5a4df
movl 0x8(%r14), %esi
leaq 0x28(%rsp), %rdi
callq 0x72430
leaq 0x108(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x6aac0
leaq 0x1d116(%rip), %rdx     # 0x90420
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x5a4df
movl 0xc(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x72430
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x6aac0
leaq 0x1af69(%rip), %rdx     # 0x8e2b7
leaq 0x168(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x5a4df
movb $0x1, %bpl
leaq 0x168(%rsp), %rsi
movq %rbx, %rdi
callq 0x52680
xorl %ebp, %ebp
movq 0x3ec29(%rip), %rsi     # 0xb1fa8
movq 0x3ec0a(%rip), %rdx     # 0xb1f90
movq %rbx, %rdi
callq 0x52760
movq %rax, %r14
leaq 0x168(%rsp), %rdi
callq 0x52888
jmp 0x733a6
movq %rax, %r14
movb $0x1, %bpl
leaq 0x148(%rsp), %rdi
callq 0x52888
jmp 0x733bb
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x52888
jmp 0x733cd
movq %rax, %r14
movb $0x1, %bpl
leaq 0x128(%rsp), %rdi
callq 0x52888
jmp 0x733e2
movq %rax, %r14
movb $0x1, %bpl
leaq 0x108(%rsp), %rdi
callq 0x52888
jmp 0x733f7
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
callq 0x52888
jmp 0x73409
movq %rax, %r14
movb $0x1, %bpl
leaq 0xe8(%rsp), %rdi
callq 0x52888
jmp 0x7341e
movq %rax, %r14
movb $0x1, %bpl
leaq 0xc8(%rsp), %rdi
callq 0x52888
jmp 0x73433
movq %rax, %r14
movb $0x1, %bpl
leaq 0x48(%rsp), %rdi
callq 0x52888
jmp 0x73445
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa8(%rsp), %rdi
callq 0x52888
jmp 0x7345a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x88(%rsp), %rdi
callq 0x52888
jmp 0x7346f
movq %rax, %r14
movb $0x1, %bpl
leaq 0x68(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x73483
jmp 0x7348b
movq %rax, %r14
movq %rbx, %rdi
callq 0x52350
movq %r14, %rdi
callq 0x527a0
nop