// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingLines.c
// Function: CompositeLine
void CompositeLine(Bitmap *bitmap,int x1,int y1,int x2,int y2,Pixel c,CompositionMode comp)
{
	if(x1>=0 && y1>=0 && x1<bitmap->width && y1<bitmap->height &&
	x2>=0 && y2>=0 && x2<bitmap->width && y2<bitmap->height)
	{
		CompositeLineNoClip(bitmap,x1,y1,x2,y2,c,comp);
		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,comp,CompositePixelFunction,CompositeHorizontalLineFunction,CompositeVerticalLineFunction);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %edx, %eax
orl %esi, %edx
movq %rdi, %r15
movq 0x50(%rsp), %r14
js 0x6336
movswl (%r15), %edi
cmpl %esi, %edi
jle 0x6336
movswl 0x2(%r15), %edx
cmpl %ebp, %edx
jle 0x6336
cmpl %ecx, %edi
jle 0x6336
movl %ebp, %edi
orl %ecx, %edi
js 0x6336
cmpl %eax, %edx
jle 0x6336
movq %r15, %rdi
movl %eax, %edx
movl %ebp, %r8d
movl %ebx, %r9d
movq %r14, (%rsp)
callq 0x64f9
jmp 0x64e9
movl %ecx, %edx
movl %ebp, %edi
andl %esi, %edx
andl %eax, %edi
orl %edx, %edi
js 0x64e9
movswl (%r15), %edx
cmpl %esi, %edx
setle %dil
cmpl %ecx, %edx
setle %dl
testb %dl, %dil
jne 0x64e9
movswl 0x2(%r15), %edx
cmpl %eax, %edx
setle %dil
cmpl %ebp, %edx
setle %dl
testb %dl, %dil
jne 0x64e9
movl %ecx, %r8d
subl %esi, %r8d
jne 0x638e
movl %ebp, %ecx
subl %eax, %ecx
jle 0x63ab
incl %ecx
movq %r15, %rdi
movl %eax, %edx
jmp 0x63b6
movl %ebp, %r9d
subl %eax, %r9d
jne 0x63d0
movl %ecx, %r8d
subl %esi, %r8d
jle 0x63ee
incl %r8d
movq %r15, %rdi
movl %eax, %edx
movl %r8d, %ecx
jmp 0x63fb
subl %ebp, %eax
incl %eax
movq %r15, %rdi
movl %ebp, %edx
movl %eax, %ecx
movl %ebx, %r8d
movq %r14, %r9
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8bec
movl %r9d, %edx
negl %edx
movl %r8d, %edi
cmovsl %r9d, %edx
negl %edi
cmovsl %r8d, %edi
cmpl %edi, %edx
jbe 0x6415
movl %ecx, %r12d
movl %esi, %r8d
jmp 0x641f
movl %esi, %eax
subl %ecx, %eax
incl %eax
movq %r15, %rdi
movl %ebp, %edx
movl %eax, %ecx
movl %ebx, %r8d
movq %r14, %r9
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a64
movl %ebp, %r12d
movl %ecx, %ebp
movl %eax, %r8d
movl %esi, %eax
cmpl %ebp, %eax
jle 0x642c
movl %r8d, %ecx
movl %eax, 0x8(%rsp)
jmp 0x6438
movl %r12d, %ecx
movl %ebp, 0x8(%rsp)
movl %r8d, %r12d
movl %eax, %ebp
movl 0x8(%rsp), %r13d
subl %ebp, %r13d
movl %r13d, 0x14(%rsp)
xorl %eax, %eax
movl %r12d, %esi
subl %ecx, %esi
setl %al
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movl %ecx, 0x10(%rsp)
sarl %r13d
cmpl %edi, %edx
leal -0x1(%rax,%rax), %eax
movl %eax, 0xc(%rsp)
jbe 0x64aa
cmpl %ebp, 0x8(%rsp)
jl 0x64e9
incl 0x8(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x7b9d
subl 0x10(%rsp), %r13d
movl %r13d, %eax
sarl $0x1f, %eax
movl %eax, %ecx
andl 0x14(%rsp), %ecx
addl %ecx, %r13d
andl 0xc(%rsp), %eax
addl %eax, %r12d
incl %ebp
cmpl %ebp, 0x8(%rsp)
jne 0x6473
jmp 0x64e9
cmpl %ebp, 0x8(%rsp)
jl 0x64e9
incl 0x8(%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x7b9d
subl 0x10(%rsp), %r13d
movl %r13d, %eax
sarl $0x1f, %eax
movl %eax, %ecx
andl 0x14(%rsp), %ecx
addl %ecx, %r13d
andl 0xc(%rsp), %eax
addl %eax, %r12d
incl %ebp
cmpl %ebp, 0x8(%rsp)
jne 0x64b4
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq