// File: /workspace/github_c_makefile_star2_O3/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 %edx, %eax
movl %r9d, %ebx
movl %r8d, %ebp
orl %esi, %edx
movq %rdi, %r15
movq 0x50(%rsp), %r14
js 0x6c2f
movswl (%r15), %edi
cmpl %esi, %edi
jle 0x6c2f
movswl 0x2(%r15), %edx
cmpl %ebp, %edx
jle 0x6c2f
cmpl %ecx, %edi
jle 0x6c2f
movl %ebp, %edi
orl %ecx, %edi
js 0x6c2f
cmpl %eax, %edx
jle 0x6c2f
movq %r15, %rdi
movl %eax, %edx
movl %ebp, %r8d
movl %ebx, %r9d
movq %r14, (%rsp)
callq 0x6de9
jmp 0x6dd9
movl %ecx, %edx
movl %ebp, %edi
andl %esi, %edx
andl %eax, %edi
orl %edx, %edi
js 0x6dd9
movswl (%r15), %edx
cmpl %esi, %edx
setle %dil
cmpl %ecx, %edx
setle %dl
testb %dl, %dil
jne 0x6dd9
movswl 0x2(%r15), %edx
cmpl %eax, %edx
setle %dil
cmpl %ebp, %edx
setle %dl
testb %dl, %dil
jne 0x6dd9
movl %ecx, %r8d
subl %esi, %r8d
jne 0x6c87
movl %ebp, %ecx
subl %eax, %ecx
jle 0x6cc2
incl %ecx
movq %r15, %rdi
movl %eax, %edx
jmp 0x6ccd
movl %ebp, %r9d
subl %eax, %r9d
jne 0x6ce7
movl %ecx, %r8d
subl %esi, %r8d
jg 0x6c9d
movl %esi, %r8d
subl %ecx, %r8d
incl %r8d
movq %r15, %rdi
movl %eax, %edx
movq %r14, %r9
movl %r8d, %ecx
movl %ebx, %r8d
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x963c
subl %ebp, %eax
movq %r15, %rdi
movl %ebp, %edx
incl %eax
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 0x979c
movl %r9d, %edx
movl %r8d, %edi
negl %edx
cmovsl %r9d, %edx
negl %edi
cmovsl %r8d, %edi
cmpl %edi, %edx
jbe 0x6d05
movl %ecx, %r12d
movl %esi, %r8d
jmp 0x6d0f
movl %ebp, %r12d
movl %eax, %r8d
movl %ecx, %ebp
movl %esi, %eax
cmpl %ebp, %eax
jle 0x6d1c
movl %r8d, %ecx
movl %eax, 0x8(%rsp)
jmp 0x6d28
movl %r12d, %ecx
movl %ebp, 0x8(%rsp)
movl %r8d, %r12d
movl %eax, %ebp
movl 0x8(%rsp), %r13d
xorl %eax, %eax
movl %r12d, %esi
subl %ebp, %r13d
subl %ecx, %esi
movl %r13d, 0x14(%rsp)
movl %esi, %ecx
setl %al
negl %ecx
leal -0x1(%rax,%rax), %eax
cmovsl %esi, %ecx
sarl %r13d
cmpl %edi, %edx
movl %ecx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
jbe 0x6d9a
cmpl %ebp, 0x8(%rsp)
jl 0x6dd9
incl 0x8(%rsp)
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x84bd
subl 0x10(%rsp), %r13d
incl %ebp
movl %r13d, %eax
sarl $0x1f, %eax
movl %eax, %ecx
andl 0xc(%rsp), %eax
andl 0x14(%rsp), %ecx
addl %eax, %r12d
addl %ecx, %r13d
cmpl %ebp, 0x8(%rsp)
jne 0x6d63
jmp 0x6dd9
cmpl %ebp, 0x8(%rsp)
jl 0x6dd9
incl 0x8(%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %ebx, %ecx
movq %r14, %r8
callq 0x84bd
subl 0x10(%rsp), %r13d
incl %ebp
movl %r13d, %eax
sarl $0x1f, %eax
movl %eax, %ecx
andl 0xc(%rsp), %eax
andl 0x14(%rsp), %ecx
addl %eax, %r12d
addl %ecx, %r13d
cmpl %ebp, 0x8(%rsp)
jne 0x6da4
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq