// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/graphics/backends/surfacebackend.cpp
// Function: smooth::GUI::SurfaceBackend::Bar(smooth::GUI::Point const&, smooth::GUI::Point const&, int)
S::Int S::GUI::SurfaceBackend::Bar(const Point &iP1, const Point &iP2, Int orientation)
{
	Point	 p1 = rightToLeft.TranslatePoint(iP1);
	Point	 p2 = rightToLeft.TranslatePoint(iP2);

	if (rightToLeft.GetRightToLeft())
	{
		if (orientation == OR_HORZ) { p1 = rightToLeft.TranslatePoint(iP2);	p2 = rightToLeft.TranslatePoint(iP1); }
		if (orientation == OR_VERT) { p1 -= Point(2, 0);			p2 -= Point(2, 0); }
	}

	Bool	 preRTL = rightToLeft.GetRightToLeft();

	rightToLeft.SetRightToLeft(False);

	if (orientation == OR_HORZ)
	{
		Line(p1, p2, Color(Math::Max(Setup::BackgroundColor.GetRed() - 64, 0), Math::Max(Setup::BackgroundColor.GetGreen() - 64, 0), Math::Max(Setup::BackgroundColor.GetBlue() - 64, 0)));
		p1.y++;
		p2.y++;
		Line(p1, p2, Color(Math::Min(Setup::BackgroundColor.GetRed() + 64, 255), Math::Min(Setup::BackgroundColor.GetGreen() + 64, 255), Math::Min(Setup::BackgroundColor.GetBlue() + 64, 255)));
	}
	else if (orientation == OR_VERT)
	{
		p2.y++;
		Line(p1, p2, Color(Math::Max(Setup::BackgroundColor.GetRed() - 64, 0), Math::Max(Setup::BackgroundColor.GetGreen() - 64, 0), Math::Max(Setup::BackgroundColor.GetBlue() - 64, 0)));
		p1.x++;
		p2.x++;
		Line(p1, p2, Color(Math::Min(Setup::BackgroundColor.GetRed() + 64, 255), Math::Min(Setup::BackgroundColor.GetGreen() + 64, 255), Math::Min(Setup::BackgroundColor.GetBlue() + 64, 255)));
	}

	rightToLeft.SetRightToLeft(preRTL);

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
callq 0x73330
movq -0xb8(%rbp), %rdi
movq %rax, -0x24(%rbp)
addq $0x28, %rdi
movq -0x18(%rbp), %rsi
callq 0x73330
movq -0xb8(%rbp), %rdi
movq %rax, -0x2c(%rbp)
addq $0x28, %rdi
callq 0x73480
testb $0x1, %al
jne 0x6f787
jmp 0x6f80f
cmpl $0x1, -0x1c(%rbp)
jne 0x6f7cd
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rsi
callq 0x73330
movq -0xb8(%rbp), %rdi
movq %rax, -0x34(%rbp)
movq -0x34(%rbp), %rax
movq %rax, -0x24(%rbp)
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
callq 0x73330
movq %rax, -0x3c(%rbp)
movq -0x3c(%rbp), %rax
movq %rax, -0x2c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0x6f80d
leaq -0x44(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x24(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0x5cd40
leaq -0x4c(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x2c(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x5cd40
jmp 0x6f80f
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x73480
movq -0xb8(%rbp), %rdi
andb $0x1, %al
movb %al, -0x4d(%rbp)
addq $0x28, %rdi
xorl %esi, %esi
callq 0x73460
cmpl $0x1, -0x1c(%rbp)
jne 0x6f96e
movq 0x198c61(%rip), %rdi    # 0x2084a8
callq 0x59f20
movl %eax, %edi
subl $0x40, %edi
xorl %esi, %esi
callq 0x5aae0
movl %eax, -0xc8(%rbp)
movq 0x198c43(%rip), %rdi    # 0x2084a8
callq 0x5d920
movl %eax, %edi
subl $0x40, %edi
xorl %esi, %esi
callq 0x5aae0
movl %eax, -0xc4(%rbp)
movq 0x198c25(%rip), %rdi    # 0x2084a8
callq 0x5b650
movl %eax, %edi
subl $0x40, %edi
xorl %esi, %esi
callq 0x5aae0
movl -0xc8(%rbp), %esi
movl -0xc4(%rbp), %edx
movl %eax, %ecx
leaq -0x60(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0xb8(%rbp), %rdi
movq (%rdi), %rax
leaq -0x24(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x60(%rbp), %rcx
callq *0x60(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq 0x198bc8(%rip), %rdi    # 0x2084a8
callq 0x59f20
movl %eax, %edi
addl $0x40, %edi
movl $0xff, %esi
callq 0x5ce90
movl %eax, -0xc0(%rbp)
movq 0x198ba7(%rip), %rdi    # 0x2084a8
callq 0x5d920
movl %eax, %edi
addl $0x40, %edi
movl $0xff, %esi
callq 0x5ce90
movl %eax, -0xbc(%rbp)
movq 0x198b86(%rip), %rdi    # 0x2084a8
callq 0x5b650
movl %eax, %edi
addl $0x40, %edi
movl $0xff, %esi
callq 0x5ce90
movl -0xc0(%rbp), %esi
movl -0xbc(%rbp), %edx
movl %eax, %ecx
leaq -0x70(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0xb8(%rbp), %rdi
movq (%rdi), %rax
leaq -0x24(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq *0x60(%rax)
jmp 0x6fab2
cmpl $0x2, -0x1c(%rbp)
jne 0x6fab0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq 0x198b20(%rip), %rdi    # 0x2084a8
callq 0x59f20
movl %eax, %edi
subl $0x40, %edi
xorl %esi, %esi
callq 0x5aae0
movl %eax, -0xd8(%rbp)
movq 0x198b02(%rip), %rdi    # 0x2084a8
callq 0x5d920
movl %eax, %edi
subl $0x40, %edi
xorl %esi, %esi
callq 0x5aae0
movl %eax, -0xd4(%rbp)
movq 0x198ae4(%rip), %rdi    # 0x2084a8
callq 0x5b650
movl %eax, %edi
subl $0x40, %edi
xorl %esi, %esi
callq 0x5aae0
movl -0xd8(%rbp), %esi
movl -0xd4(%rbp), %edx
movl %eax, %ecx
leaq -0x80(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0xb8(%rbp), %rdi
movq (%rdi), %rax
leaq -0x24(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq *0x60(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq 0x198a87(%rip), %rdi    # 0x2084a8
callq 0x59f20
movl %eax, %edi
addl $0x40, %edi
movl $0xff, %esi
callq 0x5ce90
movl %eax, -0xd0(%rbp)
movq 0x198a66(%rip), %rdi    # 0x2084a8
callq 0x5d920
movl %eax, %edi
addl $0x40, %edi
movl $0xff, %esi
callq 0x5ce90
movl %eax, -0xcc(%rbp)
movq 0x198a45(%rip), %rdi    # 0x2084a8
callq 0x5b650
movl %eax, %edi
addl $0x40, %edi
movl $0xff, %esi
callq 0x5ce90
movl -0xd0(%rbp), %esi
movl -0xcc(%rbp), %edx
movl %eax, %ecx
leaq -0x90(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0xb8(%rbp), %rdi
movq (%rdi), %rax
leaq -0x24(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq *0x60(%rax)
jmp 0x6fab2
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movzbl -0x4d(%rbp), %esi
andl $0x1, %esi
callq 0x73460
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x5ca80
movq -0xe8(%rbp), %rdi
callq 0x59680
movl %eax, -0xdc(%rbp)
jmp 0x6faf0
leaq -0xa0(%rbp), %rdi
callq 0x5a410
movl -0xdc(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5a410
movq -0xa8(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)