// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingLines.c
// Function: DrawLine
void DrawLine(Bitmap *bitmap,int x1,int y1,int x2,int y2,Pixel c)
{
	if(x1>=0 && y1>=0 && x1<bitmap->width && y1<bitmap->height &&
	x2>=0 && y2>=0 && x2<bitmap->width && y2<bitmap->height)
	{
		DrawLineNoClip(bitmap,x1,y1,x2,y2,c);
		return;
	}

	if(x1<0&&x2<0) return;
	if(y1<0&&y2<0) return;
	if(x1>=bitmap->width && x2>=bitmap->width) return;
	if(y1>=bitmap->height && y2>=bitmap->height) return;

	GenericDrawLine(bitmap,x1,y1,x2,y2,c,NULL,DrawPixelFunction,DrawHorizontalLineFunction,DrawVerticalLineFunction);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movl %r9d, %ebx
movl %edx, %eax
movl %r8d, %ebp
orl %esi, %edx
movq %rdi, %r14
js 0x5f9c
movswl (%r14), %edi
cmpl %esi, %edi
jle 0x5f9c
movswl 0x2(%r14), %edx
cmpl %ebp, %edx
jle 0x5f9c
cmpl %ecx, %edi
jle 0x5f9c
movl %ebp, %edi
orl %ecx, %edi
js 0x5f9c
cmpl %eax, %edx
jle 0x5f9c
movq %r14, %rdi
movl %eax, %edx
movl %ebp, %r8d
movl %ebx, %r9d
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x614e
movl %ecx, %edx
movl %ebp, %edi
andl %esi, %edx
andl %eax, %edi
orl %edx, %edi
js 0x613e
movswl (%r14), %edx
cmpl %esi, %edx
setle %dil
cmpl %ecx, %edx
setle %dl
testb %dl, %dil
jne 0x613e
movswl 0x2(%r14), %edx
cmpl %eax, %edx
setle %dil
cmpl %ebp, %edx
setle %dl
testb %dl, %dil
jne 0x613e
movl %ecx, %r8d
subl %esi, %r8d
jne 0x5ff4
movl %ebp, %ecx
subl %eax, %ecx
jle 0x6011
incl %ecx
movq %r14, %rdi
movl %eax, %edx
jmp 0x601c
movl %ebp, %r9d
subl %eax, %r9d
jne 0x6033
movl %ecx, %r8d
subl %esi, %r8d
jle 0x6051
incl %r8d
movq %r14, %rdi
movl %eax, %edx
movl %r8d, %ecx
jmp 0x605e
subl %ebp, %eax
incl %eax
movq %r14, %rdi
movl %ebp, %edx
movl %eax, %ecx
movl %ebx, %r8d
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b22
movl %r9d, %edx
negl %edx
movl %r8d, %edi
cmovsl %r9d, %edx
negl %edi
cmovsl %r8d, %edi
cmpl %edi, %edx
jbe 0x6075
movl %ecx, %r15d
movl %esi, %r8d
jmp 0x607f
movl %esi, %eax
subl %ecx, %eax
incl %eax
movq %r14, %rdi
movl %ebp, %edx
movl %eax, %ecx
movl %ebx, %r8d
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a00
movl %ebp, %r15d
movl %ecx, %ebp
movl %eax, %r8d
movl %esi, %eax
cmpl %ebp, %eax
jle 0x608c
movl %r8d, %ecx
movl %eax, 0xc(%rsp)
jmp 0x6098
movl %r15d, %ecx
movl %ebp, 0xc(%rsp)
movl %r8d, %r15d
movl %eax, %ebp
movl 0xc(%rsp), %r13d
subl %ebp, %r13d
movl %r13d, 0x14(%rsp)
xorl %eax, %eax
movl %r15d, %esi
subl %ecx, %esi
setl %al
movl %esi, %r12d
negl %r12d
cmovsl %esi, %r12d
sarl %r13d
cmpl %edi, %edx
leal -0x1(%rax,%rax), %eax
movl %eax, 0x10(%rsp)
jbe 0x6104
cmpl %ebp, 0xc(%rsp)
jl 0x613e
incl 0xc(%rsp)
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x7b5c
subl %r12d, %r13d
movl %r13d, %eax
sarl $0x1f, %eax
movl %eax, %ecx
andl 0x14(%rsp), %ecx
addl %ecx, %r13d
andl 0x10(%rsp), %eax
addl %eax, %r15d
incl %ebp
cmpl %ebp, 0xc(%rsp)
jne 0x60d2
jmp 0x613e
cmpl %ebp, 0xc(%rsp)
jl 0x613e
incl 0xc(%rsp)
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x7b5c
subl %r12d, %r13d
movl %r13d, %eax
sarl $0x1f, %eax
movl %eax, %ecx
andl 0x14(%rsp), %ecx
addl %ecx, %r13d
andl 0x10(%rsp), %eax
addl %eax, %r15d
incl %ebp
cmpl %ebp, 0xc(%rsp)
jne 0x610e
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq