// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::SetPixel(smooth::GUI::Point const&, smooth::GUI::Color const&)
S::Int S::GUI::SurfaceCairo::SetPixel(const Point &iPoint, const Color &color)
{
	if (window == NIL) return Success();

	Point	 point = rightToLeft.TranslatePoint(iPoint);

	if (!painting)
	{
		CreateCairoContext();

		cairo_set_source_rgb(context, color.GetRed() / 255.0, color.GetGreen() / 255.0, color.GetBlue() / 255.0);
		cairo_rectangle(context, point.x, point.y, 1.0, 1.0);
		cairo_fill(context);

		DestroyCairoContext();
	}

	cairo_set_source_rgb(paintContextCairo, color.GetRed() / 255.0, color.GetGreen() / 255.0, color.GetBlue() / 255.0);
	cairo_rectangle(paintContextCairo, point.x, point.y, 1.0, 1.0);
	cairo_fill(paintContextCairo);

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, 0x50(%rax)
jne 0x12b8cf
leaq -0x30(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x5ca80
movq -0x70(%rbp), %rdi
callq 0x59680
movl %eax, -0x64(%rbp)
jmp 0x12b8a1
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5a410
jmp 0x12bacf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5a410
jmp 0x12badb
movq -0x60(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rsi
callq 0x73330
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x44(%rbp)
cmpw $0x0, 0xa(%rax)
jne 0x12b9ba
movq -0x60(%rbp), %rdi
callq 0x12b760
movq -0x60(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
callq 0x59f20
cvtsi2sd %eax, %xmm0
movsd 0x5ba2a(%rip), %xmm1    # 0x187350
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5d920
cvtsi2sd %eax, %xmm0
movsd 0x5ba0c(%rip), %xmm1    # 0x187350
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5b650
movq -0x88(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
cvtsi2sd %eax, %xmm2
movsd 0x5b9dd(%rip), %xmm3    # 0x187350
divsd %xmm3, %xmm2
callq 0x5c970
movq -0x60(%rbp), %rax
movq 0xc0(%rax), %rdi
cvtsi2sdl -0x44(%rbp), %xmm0
cvtsi2sdl -0x40(%rbp), %xmm1
movsd 0x5b9cf(%rip), %xmm3    # 0x187368
movaps %xmm3, %xmm2
callq 0x5aa10
movq -0x60(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x5c620
movq -0x60(%rbp), %rdi
callq 0x12b7f0
movq -0x60(%rbp), %rax
movq 0xd0(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x59f20
cvtsi2sd %eax, %xmm0
movsd 0x5b96f(%rip), %xmm1    # 0x187350
movsd %xmm1, -0xb8(%rbp)
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5d920
movsd -0xb8(%rbp), %xmm1
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5b650
movsd -0xb8(%rbp), %xmm3
movq -0xb0(%rbp), %rdi
movsd -0xa8(%rbp), %xmm0
movsd -0xa0(%rbp), %xmm1
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
callq 0x5c970
movq -0x60(%rbp), %rax
movq 0xd0(%rax), %rdi
cvtsi2sdl -0x44(%rbp), %xmm0
cvtsi2sdl -0x40(%rbp), %xmm1
movsd 0x5b900(%rip), %xmm3    # 0x187368
movaps %xmm3, %xmm2
callq 0x5aa10
movq -0x60(%rbp), %rax
movq 0xd0(%rax), %rdi
callq 0x5c620
leaq -0x58(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x5ca80
movq -0x98(%rbp), %rdi
callq 0x59680
movl %eax, -0x8c(%rbp)
jmp 0x12baa4
movl -0x8c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5a410
jmp 0x12bacf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5a410
jmp 0x12badb
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)