LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/Bitmap.c
// Function: FlipBitmapY
void FlipBitmapY(Bitmap *self) {
	Pixel tempRow[self->width];
	for(int row = 0; row < self->height/2; row++) {
		memmove(tempRow, BitmapRowPointer(self, self->height - row - 1), self->bytesperrow);
		memmove(BitmapRowPointer(self, self->height - row - 1), BitmapRowPointer(self, row), self->bytesperrow);
		memmove(BitmapRowPointer(self, row), tempRow, self->bytesperrow);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movzwl (%rdi), %eax
movq %rsp, %rcx
movq %rdi, %r13
leal 0xf(,%rax,4), %eax
andl $-0x10, %eax
subq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
xorl %ebx, %ebx
pushq $-0x1
popq %r9
movswl 0x2(%r13), %ecx
movw $0x2, %r8w
movl %ecx, %eax
cwtd
idivw %r8w
cwtl
cmpl %eax, %ebx
jge 0x5100
movslq 0x4(%r13), %r15
addl %r9d, %ecx
movq 0x8(%r13), %r14
movq -0x38(%rbp), %rdi
movl %r9d, -0x2c(%rbp)
imull %r15d, %ecx
movq %r15, %rdx
movslq %ecx, %r12
addq %r14, %r12
movq %r12, %rsi
callq 0x1140
movl %r15d, %eax
movq %r12, %rdi
movq %r15, %rdx
imull %ebx, %eax
movslq %eax, %rsi
addq %r14, %rsi
callq 0x11a0
movslq 0x4(%r13), %rdx
movslq %ebx, %rdi
movq -0x38(%rbp), %rsi
imulq %rdx, %rdi
addq 0x8(%r13), %rdi
callq 0x1140
movl -0x2c(%rbp), %r9d
incl %ebx
decl %r9d
jmp 0x5087
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingBitmaps.c
// Function: DrawPartialBitmapNoClip
void DrawPartialBitmapNoClip(Bitmap *dest,const Bitmap *src,int x,int y,int u,int v,int w,int h)
{
	if(x==0&&u==0&&w==dest->width&&src->bytesperrow==dest->bytesperrow) // Yes, dest->width.
	{
		// Fast path for full bitmap row copies.
		const void *srcptr=ConstBitmapPixelPointer(src,0,v);
		void *destptr=BitmapPixelPointer(dest,0,y);
		memmove(destptr,srcptr,src->bytesperrow*h);
	}
	else
	{
		// Normal copy.
		for(int i=0;i<h;i++)
		{
			const void *srcptr=ConstBitmapPixelPointer(src,u,v+i);
			void *destptr=BitmapPixelPointer(dest,x,y+i);
			memmove(destptr,srcptr,w*sizeof(Pixel));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movl %r8d, %eax
movq %rsi, %r15
movl %r9d, %ebx
movl %ecx, %r14d
movq %rdi, %r12
movl 0x50(%rsp), %esi
orl %edx, %eax
movl 0x58(%rsp), %eax
jne 0x52d1
movswl (%r12), %ecx
cmpl %esi, %ecx
jne 0x52d1
movl 0x4(%r15), %ecx
cmpl 0x4(%r12), %ecx
jne 0x52d1
imull %ecx, %ebx
imull %ecx, %r14d
imull %ecx, %eax
movslq %ebx, %rsi
movslq %r14d, %rdi
movslq %eax, %rdx
addq 0x8(%r15), %rsi
addq 0x8(%r12), %rdi
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11a0
movslq %esi, %rcx
xorl %ebp, %ebp
movslq %r8d, %rsi
movslq %edx, %r13
shlq $0x2, %rcx
testl %eax, %eax
movq %rcx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmovgl %eax, %ebp
subl $0x1, %ebp
jb 0x5332
movslq 0x4(%r15), %rax
movslq %ebx, %rbx
movslq 0x4(%r12), %rcx
movslq %r14d, %r14
movq 0x8(%rsp), %rdx
imulq %rbx, %rax
imulq %r14, %rcx
addq 0x8(%r15), %rax
addq 0x8(%r12), %rcx
leaq (%rax,%rdx,4), %rsi
leaq (%rcx,%r13,4), %rdi
movq 0x10(%rsp), %rdx
callq 0x11a0
incl %ebx
incl %r14d
jmp 0x52ef
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/Clipping.h
// Function: ClipRectangle2
static inline bool ClipRectangle2(int *x,int *y,int *u,int *v,int *w,int *h,int clipw,int cliph)
{
	if(IsCompletelyOutside(*x,*y,*w,*h,clipw,cliph)) return false;
	AdjustSpan2(x,u,w,clipw);
	AdjustSpan2(y,v,h,cliph);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movl 0x30(%rsp), %r9d
movl (%rdi), %r10d
xorl %eax, %eax
cmpl %r9d, %r10d
jge 0x539b
addl (%r8), %r10d
testl %r10d, %r10d
jle 0x539b
movq %rcx, %r14
movl 0x38(%rsp), %ebp
movl (%rsi), %ecx
xorl %eax, %eax
movq %rsi, %r15
cmpl %ebp, %ecx
jge 0x539b
addl (%rbx), %ecx
testl %ecx, %ecx
jle 0x539b
movq %rdx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
callq 0x5592
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x5592
movb $0x1, %al
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingBitmaps.c
// Function: CompositePartialBitmapNoClip
void CompositePartialBitmapNoClip(Bitmap *dest,const Bitmap *src,int x,int y,int u,int v,int w,int h,CompositionMode comp)
{
	for(int j=0;j<h;j++)
	for(int i=0;i<w;i++)
	{
		Pixel below=ReadPixelNoClip(dest,x+i,y+j);
		Pixel above=ReadPixelNoClip(src,u+i,v+j);
		DrawPixelNoClip(dest,x+i,y+j,comp(below,above));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x38(%rsp), %rsp
movq %rcx, 0x18(%rsp)
movl 0x70(%rsp), %eax
movl %edx, 0x8(%rsp)
movl 0x78(%rsp), %edx
movq %rdi, %r13
movq %r9, 0x20(%rsp)
movl %r8d, 0xc(%rsp)
movq %rsi, 0x30(%rsp)
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
testl %edx, %edx
cmovlel %ecx, %edx
movl %eax, 0x4(%rsp)
movl %edx, 0x10(%rsp)
cmpl 0x10(%rsp), %ecx
je 0x5582
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %r14d
movl 0x8(%rsp), %r15d
movl 0x4(%rsp), %ebp
movq %rcx, 0x28(%rsp)
leal (%rcx,%rax), %ebx
movq 0x20(%rsp), %rax
addl %ecx, %eax
movl %eax, 0x14(%rsp)
subl $0x1, %ebp
jb 0x5579
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x60f4
movq 0x30(%rsp), %rdi
movl %r14d, %esi
movl 0x14(%rsp), %edx
movl %eax, %r12d
callq 0x60f4
movl %r12d, %edi
movl %eax, %esi
callq *0x80(%rsp)
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
movl %eax, %ecx
callq 0x608b
incl %r15d
incl %r14d
jmp 0x5530
movq 0x28(%rsp), %rcx
incl %ecx
jmp 0x5504
leaq 0x38(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movl %edx, %eax
orl %esi, %eax
js 0x55dd
movswl (%rdi), %r10d
cmpl %esi, %r10d
jle 0x55dd
movswl 0x2(%rdi), %eax
cmpl %r8d, %eax
jle 0x55dd
cmpl %ecx, %r10d
jle 0x55dd
movl %r8d, %r10d
orl %ecx, %r10d
js 0x55dd
cmpl %edx, %eax
jg 0x563d
movl %ecx, %eax
movl %r8d, %r10d
andl %esi, %eax
andl %edx, %r10d
orl %eax, %r10d
js 0x563c
movswl (%rdi), %eax
cmpl %esi, %eax
setle %r10b
cmpl %ecx, %eax
setle %al
testb %al, %r10b
jne 0x563c
movswl 0x2(%rdi), %eax
cmpl %edx, %eax
setle %r10b
cmpl %r8d, %eax
setle %al
testb %al, %r10b
jne 0x563c
pushq %rax
leaq 0x1e7(%rip), %rax       # 0x5803
leaq 0x1db(%rip), %r10       # 0x57fe
leaq 0x1cf(%rip), %r11       # 0x57f9
pushq %rax
pushq %r10
pushq %r11
pushq $0x0
callq 0x5666
leaq 0x20(%rsp), %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movl %edx, %eax
orl %esi, %eax
movq 0x10(%rsp), %rax
js 0x584e
movswl (%rdi), %r11d
cmpl %esi, %r11d
jle 0x584e
movswl 0x2(%rdi), %r10d
cmpl %r8d, %r10d
jle 0x584e
cmpl %ecx, %r11d
jle 0x584e
movl %r8d, %r11d
orl %ecx, %r11d
js 0x584e
cmpl %edx, %r10d
jle 0x584e
popq %rbx
jmp 0x58b5
movl %ecx, %r10d
movl %r8d, %r11d
andl %esi, %r10d
andl %edx, %r11d
orl %r10d, %r11d
js 0x58b3
movswl (%rdi), %r10d
cmpl %esi, %r10d
setle %r11b
cmpl %ecx, %r10d
setle %r10b
testb %r10b, %r11b
jne 0x58b3
movswl 0x2(%rdi), %r10d
cmpl %edx, %r10d
setle %r11b
cmpl %r8d, %r10d
setle %r10b
testb %r10b, %r11b
jne 0x58b3
leaq 0x57(%rip), %r10        # 0x58ec
leaq 0x4b(%rip), %r11        # 0x58e7
leaq 0x3f(%rip), %rbx        # 0x58e2
pushq %r10
pushq %r11
pushq %rbx
pushq %rax
callq 0x5666
leaq 0x20(%rsp), %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingPixels.c
// Function: DrawPixel
void DrawPixel(Bitmap *bitmap,int x,int y,Pixel c)
{
	if(x<0) return;
	if(y<0) return;
	if(x>=bitmap->width) return;
	if(y>=bitmap->height) return;
	DrawPixelNoClip(bitmap,x,y,c);
}

// Assembly:
movl %edx, %eax
orl %esi, %eax
js 0x608a
movswl (%rdi), %eax
cmpl %esi, %eax
jle 0x608a
movswl 0x2(%rdi), %eax
cmpl %edx, %eax
jle 0x608a
movslq 0x4(%rdi), %rax
movslq %edx, %rdx
imulq %rax, %rdx
movslq %esi, %rax
addq 0x8(%rdi), %rdx
movl %ecx, (%rdx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingPixels.c
// Function: ReadPixel
Pixel ReadPixel(const Bitmap *bitmap,int x,int y)
{
	if(x<0) return 0;
	if(y<0) return 0;
	if(x>=bitmap->width) return 0;
	if(y>=bitmap->height) return 0;
	return ReadPixelNoClip(bitmap,x,y);
}

// Assembly:
xorl %eax, %eax
movl %edx, %ecx
orl %esi, %ecx
js 0x6136
movswl (%rdi), %ecx
cmpl %esi, %ecx
jle 0x6136
movswl 0x2(%rdi), %ecx
cmpl %edx, %ecx
jle 0x6136
movslq 0x4(%rdi), %rax
movslq %edx, %rcx
imulq %rax, %rcx
leal (%esi), %eax
addq 0x8(%rdi), %rcx
movl (%rcx,%rax,4), %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRectangles.c
// Function: GenericDrawRectangle
static inline void GenericDrawRectangle(Bitmap *bitmap,int x,int y,int w,int h,Pixel c,CompositionMode comp,
GenericDrawHorizontalLineFunction *hlinefunc,GenericDrawVerticalLineFunction *vlinefunc)
{
	if(w==0||h==0) return;
	if(w==1) GenericDrawVerticalLine(bitmap,x,y,h,c,comp,vlinefunc);
	else if(h==1) GenericDrawHorizontalLine(bitmap,x,y,w,c,comp,hlinefunc);
	else
	{
		GenericDrawHorizontalLine(bitmap,x,y,w,c,comp,hlinefunc);
		GenericDrawHorizontalLine(bitmap,x,y+h-1,w,c,comp,hlinefunc);
		if(h<2) return;
		GenericDrawVerticalLine(bitmap,x,y+1,h-2,c,comp,vlinefunc);
		GenericDrawVerticalLine(bitmap,x+w-1,y+1,h-2,c,comp,vlinefunc);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
testl %ecx, %ecx
movl %ecx, %r14d
sete %al
testl %r8d, %r8d
sete %cl
orb %al, %cl
je 0x618e
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r9d, %ebp
movl %r8d, %ebx
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, %r12
cmpl $0x1, %r14d
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %r9
jne 0x61cc
movq %r12, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %ebx, %ecx
movl %ebp, %r8d
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %rax, 0x8(%rsp)
movq %r12, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movq 0x58(%rsp), %rax
movq %r9, (%rsp)
movq %rax, 0x10(%rsp)
callq *%rax
cmpl $0x1, %ebx
je 0x617e
leal -0x1(%r15,%rbx), %edx
movq %r12, %rdi
movl %r13d, %esi
movl %r14d, %ecx
movl %ebp, %r8d
movq (%rsp), %r9
callq *0x10(%rsp)
cmpl $0x2, %ebx
jl 0x617e
incl %r15d
addl $-0x2, %ebx
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %r8d
movq (%rsp), %r9
movl %r15d, %edx
movl %ebx, %ecx
callq *0x8(%rsp)
leal -0x1(%r13,%r14), %esi
movq %r12, %rdi
movl %r15d, %edx
movl %ebx, %ecx
movl %ebp, %r8d
movq (%rsp), %r9
movq 0x8(%rsp), %rax
jmp 0x61bb
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/Clipping.h
// Function: ClipRectangle
static inline bool ClipRectangle(int *x,int *y,int *w,int *h,int clipw,int cliph)
{
	if(IsCompletelyOutside(*x,*y,*w,*h,clipw,cliph)) return false;
	AdjustSpan(x,w,clipw);
	AdjustSpan(y,h,cliph);
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %r9d, %ebx
movl (%rdi), %r9d
xorl %eax, %eax
cmpl %r8d, %r9d
jge 0x63ab
addl (%rdx), %r9d
testl %r9d, %r9d
jle 0x63ab
movq %rcx, %r14
movl (%rsi), %ecx
xorl %eax, %eax
movq %rsi, %r15
cmpl %ebx, %ecx
jge 0x63ab
addl (%r14), %ecx
testl %ecx, %ecx
jle 0x63ab
movq %rdx, %rsi
movl %r8d, %edx
callq 0x64c8
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x64c8
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: DrawRLEBitmap
void DrawRLEBitmap(Bitmap *bitmap,const RLEBitmap *src,int x,int y)
{
	if(IsCompletelyOutside(x,y,src->width,src->height,bitmap->width,bitmap->height)) return;

	RLEBitmapSpanIterator iterator;
	InitializeRLEBitmapSpanIterator(&iterator,src);
	ClipRLEBitmapSpanIteratorRows(&iterator,bitmap,y);

	if(IsSpanCompletelyInside(x,src->width,bitmap->width)) DrawRLEBitmapSpansNoClip(bitmap,&iterator,x,y);
	else DrawRLEBitmapSpans(bitmap,&iterator,x,y);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq -0x20(%rsp), %rsp
movswl (%rdi), %ebp
leal (%edx), %r14d
movswl (%rsi), %eax
movq %rdi, %rbx
cmpl %edx, %ebp
leal (%rax,%r14), %r12d
setle %dl
testl %r12d, %r12d
setle %dil
orb %dl, %dil
jne 0x65cf
leal (%ecx), %r15d
movswl 0x2(%rbx), %edx
movswl 0x2(%rsi), %ecx
cmpl %r15d, %edx
leal (%rcx,%r15), %edx
setle %dil
testl %edx, %edx
setle %dl
orb %dil, %dl
jne 0x65cf
leaq (%rsp), %rdi
addq $0x4, %rsi
movl %r15d, %edx
andq $0x0, (%rdi)
andl $0x0, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %rbx, %rsi
movl %eax, 0x18(%rdi)
movl %ecx, 0x1c(%rdi)
callq 0x65dd
testl %r14d, %r14d
setns %al
cmpl %ebp, %r12d
setle %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x65be
movq %rsp, %r12
movslq %r14d, %r14
movslq %r15d, %r15
movq %r12, %rdi
callq 0x6b8d
testb %al, %al
je 0x65cf
movslq 0x4(%rsp), %rax
movslq 0x4(%rbx), %rcx
movslq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rsi
addq %r15, %rax
shlq $0x2, %rdx
imulq %rax, %rcx
movslq (%rsp), %rax
leaq (%rax,%r14), %rax
addq 0x8(%rbx), %rcx
leaq (%rcx,%rax,4), %rdi
callq 0x1140
jmp 0x657d
movq %rsp, %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x661e
leaq 0x20(%rsp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/RLEBitmap.h
// Function: ClipRLEBitmapSpanIteratorRows
static inline void ClipRLEBitmapSpanIteratorRows(RLEBitmapSpanIterator *self,const Bitmap *bitmap,int y)
{
	if(y+self->height>bitmap->height) self->height=bitmap->height-y;

	if(y<0)
	{
		int oldheight=self->height;
		self->height=-y;
		while(NextRLEBitmapSpan(self));
		self->height=oldheight;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x1c(%rdi), %r14d
movswl 0x2(%rsi), %eax
movq %rdi, %rbx
leal (%r14,%rdx), %ecx
cmpl %eax, %ecx
jle 0x65fc
subl %edx, %eax
movl %eax, %r14d
movl %eax, 0x1c(%rbx)
testl %edx, %edx
jns 0x6615
negl %edx
movl %edx, 0x1c(%rbx)
movq %rbx, %rdi
callq 0x6b8d
testb %al, %al
jne 0x6605
movl %r14d, 0x1c(%rbx)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: DrawRLEBitmapSpans
static void DrawRLEBitmapSpans(Bitmap *bitmap,RLEBitmapSpanIterator *iterator,int x0,int y0)
{
	while(NextRLEBitmapSpan(iterator))
	{
		int x=RLEBitmapSpanStart(iterator);
		int y=RLEBitmapRow(iterator);
		int length=RLEBitmapSpanLength(iterator);
		const Pixel *pixels=RLEBitmapSpanPixels(iterator);
		Pixel *dest=BitmapPixelPointer(bitmap,x+x0,y+y0);

		int start=0;
		if(x+x0+length>bitmap->width) length=bitmap->width-(x+x0);

		if(x+x0<0)
		{
			int skippixels=-(x+x0);
			start=skippixels;
			length-=skippixels;
		}

		if(length>0) memcpy(&dest[start],&pixels[start],length*sizeof(Pixel));
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %r15
movslq %ecx, %r12
movq %rbx, %rdi
callq 0x6b8d
testb %al, %al
je 0x669b
movslq (%rbx), %rax
movswl (%r14), %edx
movl 0x8(%rbx), %ecx
leaq (%rax,%r15), %rax
movl %edx, %edi
leal (%rax,%rcx), %esi
subl %eax, %edi
cmpl %edx, %esi
movl %eax, %esi
cmovlel %ecx, %edi
sarl $0x1f, %esi
movl %esi, %ecx
andl %eax, %ecx
addl %edi, %ecx
jle 0x6632
movslq 0x4(%rbx), %rdx
movslq 0x4(%r14), %rdi
addq %r12, %rdx
imulq %rdi, %rdx
movl %eax, %edi
negl %edi
andl %edi, %esi
addq 0x8(%r14), %rdx
leaq (%rdx,%rax,4), %rax
movl %ecx, %edx
leaq (%rax,%rsi,4), %rdi
shlq $0x2, %rsi
shlq $0x2, %rdx
addq 0x10(%rbx), %rsi
callq 0x1140
jmp 0x6632
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: CompositeRLEBitmap
void CompositeRLEBitmap(Bitmap *bitmap,const RLEBitmap *src,int x,int y,CompositionMode mode)
{
	if(IsCompletelyOutside(x,y,src->width,src->height,bitmap->width,bitmap->height)) return;

	RLEBitmapSpanIterator iterator;
	InitializeRLEBitmapSpanIterator(&iterator,src);
	ClipRLEBitmapSpanIteratorRows(&iterator,bitmap,y);

	if(IsSpanCompletelyInside(x,src->width,bitmap->width)) CompositeRLEBitmapSpansNoClip(bitmap,&iterator,x,y,mode);
	else CompositeRLEBitmapSpans(bitmap,&iterator,x,y,mode);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x38(%rsp), %rsp
movswl (%rdi), %ebp
leal (%edx), %ebx
movswl (%rsi), %eax
movq %rdi, %r14
cmpl %edx, %ebp
leal (%rax,%rbx), %r13d
setle %dl
testl %r13d, %r13d
setle %dil
orb %dl, %dil
jne 0x677d
leal (%ecx), %r12d
movswl 0x2(%r14), %edx
movswl 0x2(%rsi), %ecx
cmpl %r12d, %edx
leal (%rcx,%r12), %edx
setle %dil
testl %edx, %edx
setle %dl
orb %dil, %dl
jne 0x677d
leaq 0x18(%rsp), %rdi
addq $0x4, %rsi
movl %r12d, %edx
movq %r8, %r15
andq $0x0, (%rdi)
andl $0x0, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %r14, %rsi
movl %eax, 0x18(%rdi)
movl %ecx, 0x1c(%rdi)
callq 0x65dd
testl %ebx, %ebx
setns %al
cmpl %ebp, %r13d
setle %cl
testb %cl, %al
je 0x678d
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
movl %r12d, %ecx
movq %r15, %r8
callq 0x67ee
leaq 0x38(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x6b8d
testb %al, %al
je 0x677d
movl 0x1c(%rsp), %ebp
movl 0x20(%rsp), %r12d
movl 0x18(%rsp), %r13d
movl $0x0, %eax
movq 0x28(%rsp), %rbx
addl 0x8(%rsp), %ebp
testl %r12d, %r12d
cmovlel %eax, %r12d
addl 0x10(%rsp), %r13d
subq $0x1, %r12
jb 0x6797
movl (%rbx), %ecx
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r15, %r8
callq 0x60a1
incl %r13d
addq $0x4, %rbx
jmp 0x67cd
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: CompositeRLEBitmapSpansNoClip
static void CompositeRLEBitmapSpansNoClip(Bitmap *bitmap,RLEBitmapSpanIterator *iterator,int x0,int y0,CompositionMode mode)
{
	while(NextRLEBitmapSpan(iterator))
	{
		int x=RLEBitmapSpanStart(iterator);
		int y=RLEBitmapRow(iterator);
		int length=RLEBitmapSpanLength(iterator);
		const Pixel *pixels=RLEBitmapSpanPixels(iterator);

		for(int i=0;i<length;i++) CompositePixelNoClip(bitmap,x+x0+i,y+y0,pixels[i],mode);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movq %r8, %rbx
movq %rdi, %r12
movl %ecx, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0x6b8d
testb %al, %al
je 0x6866
movl 0x4(%rbp), %r13d
movl 0x8(%rbp), %r14d
movq 0x10(%rbp), %r15
movl (%rbp), %ebp
movl $0x0, %eax
addl 0xc(%rsp), %r13d
testl %r14d, %r14d
cmovlel %eax, %r14d
addl 0x8(%rsp), %ebp
subq $0x1, %r14
jb 0x6810
movl (%r15), %ecx
movq %r12, %rdi
movl %ebp, %esi
movl %r13d, %edx
movq %rbx, %r8
callq 0x60bb
incl %ebp
addq $0x4, %r15
jmp 0x6845
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: DrawFilledRLEBitmap
void DrawFilledRLEBitmap(Bitmap *bitmap,const RLEBitmap *src,int x,int y,Pixel c)
{
	if(IsCompletelyOutside(x,y,src->width,src->height,bitmap->width,bitmap->height)) return;

	RLEBitmapSpanIterator iterator;
	InitializeRLEBitmapSpanIterator(&iterator,src);
	ClipRLEBitmapSpanIteratorRows(&iterator,bitmap,y);

	if(IsSpanCompletelyInside(x,src->width,bitmap->width)) DrawFilledRLEBitmapSpansNoClip(bitmap,&iterator,x,y,c);
	else DrawFilledRLEBitmapSpans(bitmap,&iterator,x,y,c);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x28(%rsp), %rsp
movswl (%rdi), %r12d
leal (%edx), %ebx
movswl (%rsi), %eax
movq %rdi, %r14
cmpl %edx, %r12d
leal (%rax,%rbx), %r13d
setle %dl
testl %r13d, %r13d
setle %dil
orb %dl, %dil
jne 0x694d
leal (%ecx), %r15d
movswl 0x2(%r14), %edx
movswl 0x2(%rsi), %ecx
cmpl %r15d, %edx
leal (%rcx,%r15), %edx
setle %dil
testl %edx, %edx
setle %dl
orb %dil, %dl
jne 0x694d
leaq 0x8(%rsp), %rdi
addq $0x4, %rsi
movl %r15d, %edx
movl %r8d, %ebp
andq $0x0, (%rdi)
andl $0x0, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %r14, %rsi
movl %eax, 0x18(%rdi)
movl %ecx, 0x1c(%rdi)
callq 0x65dd
testl %ebx, %ebx
setns %al
cmpl %r12d, %r13d
setle %cl
testb %cl, %al
je 0x695d
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
movl %r15d, %ecx
movl %ebp, %r8d
callq 0x698c
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6b8d
testb %al, %al
je 0x694d
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
movq %r14, %rdi
movl %ebp, %r8d
addl %ebx, %esi
addl %r15d, %edx
callq 0x6bec
jmp 0x6962
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: DrawFilledRLEBitmapSpansNoClip
static void DrawFilledRLEBitmapSpansNoClip(Bitmap *bitmap,RLEBitmapSpanIterator *iterator,int x0,int y0,Pixel c)
{
	while(NextRLEBitmapSpan(iterator))
	{
		int x=RLEBitmapSpanStart(iterator);
		int y=RLEBitmapRow(iterator);
		int length=RLEBitmapSpanLength(iterator);

		DrawHorizontalLineNoClip(bitmap,x+x0,y+y0,length,c);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
movq %r15, %rdi
callq 0x6b8d
testb %al, %al
je 0x69cb
movl (%r15), %esi
movl 0x4(%r15), %edx
movl 0x8(%r15), %ecx
movq %r12, %rdi
movl %ebx, %r8d
addl %r14d, %esi
addl %ebp, %edx
callq 0x5027
jmp 0x69a2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: CompositeFilledRLEBitmap
void CompositeFilledRLEBitmap(Bitmap *bitmap,const RLEBitmap *src,int x,int y,Pixel c,CompositionMode mode)
{
	if(IsCompletelyOutside(x,y,src->width,src->height,bitmap->width,bitmap->height)) return;

	RLEBitmapSpanIterator iterator;
	InitializeRLEBitmapSpanIterator(&iterator,src);
	ClipRLEBitmapSpanIteratorRows(&iterator,bitmap,y);

	if(IsSpanCompletelyInside(x,src->width,bitmap->width)) CompositeFilledRLEBitmapSpans(bitmap,&iterator,x,y,c,mode);
	else CompositeFilledRLEBitmapSpansNoClip(bitmap,&iterator,x,y,c,mode);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x28(%rsp), %rsp
movswl (%rdi), %r10d
leal (%edx), %ebx
movswl (%rsi), %eax
movq %rdi, %r14
cmpl %edx, %r10d
leal (%rax,%rbx), %r13d
setle %dl
testl %r13d, %r13d
setle %dil
orb %dl, %dil
jne 0x6ab8
leal (%ecx), %r12d
movswl 0x2(%r14), %edx
movswl 0x2(%rsi), %ecx
cmpl %r12d, %edx
leal (%rcx,%r12), %edx
setle %dil
testl %edx, %edx
setle %dl
orb %dil, %dl
jne 0x6ab8
leaq 0x8(%rsp), %rdi
addq $0x4, %rsi
movl %r12d, %edx
movq %r9, %r15
movl %r8d, %ebp
movl %r10d, 0x4(%rsp)
andq $0x0, (%rdi)
andl $0x0, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %r14, %rsi
movl %eax, 0x18(%rdi)
movl %ecx, 0x1c(%rdi)
callq 0x65dd
testl %ebx, %ebx
setns %al
cmpl 0x4(%rsp), %r13d
setle %cl
testb %cl, %al
je 0x6ac8
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
movl %r12d, %ecx
movl %ebp, %r8d
movq %r15, %r9
callq 0x6afa
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x6b8d
testb %al, %al
je 0x6ab8
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
movq %r14, %rdi
movl %ebp, %r8d
movq %r15, %r9
addl %ebx, %esi
addl %r12d, %edx
callq 0x6d13
jmp 0x6acd
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: CompositeFilledRLEBitmapSpans
static void CompositeFilledRLEBitmapSpans(Bitmap *bitmap,RLEBitmapSpanIterator *iterator,int x0,int y0,Pixel c,CompositionMode mode)
{
	while(NextRLEBitmapSpan(iterator))
	{
		int x=RLEBitmapSpanStart(iterator);
		int y=RLEBitmapRow(iterator);
		int length=RLEBitmapSpanLength(iterator);

		CompositeHorizontalLine(bitmap,x+x0,y+y0,length,c,mode);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movq %r12, %rdi
callq 0x6b8d
testb %al, %al
je 0x6b47
movl (%r12), %esi
movl 0x4(%r12), %edx
movl 0x8(%r12), %ecx
movq %r13, %rdi
movl %ebp, %r8d
movq %rbx, %r9
addl %r15d, %esi
addl %r14d, %edx
callq 0x6ca2
jmp 0x6b17
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/RLEBitmap.h
// Function: NextRLEBitmapSpan
static inline bool NextRLEBitmapSpan(RLEBitmapSpanIterator *self)
{
	self->x+=self->spanlength;
	self->pointer+=self->spanlength;
	if(self->x>=self->width)
	{
		self->x=0;
		self->y++;
		if(self->y>=self->height) { self->spanlength=0; return false; }
	}

	Pixel spans=*self->pointer++;
	int empty=spans>>8;
	int filled=spans&0xff;

	self->x+=empty;
	self->spanlength=filled;

	if(!self->spanlength) return NextRLEBitmapSpan(self);
	return true;
}

// Assembly:
movl 0x18(%rdi), %eax
movl (%rdi), %edx
movl 0x8(%rdi), %esi
movq 0x10(%rdi), %rcx
addl %esi, %edx
movslq %esi, %rsi
cmpl %eax, %edx
leaq (%rcx,%rsi,4), %rcx
movl %edx, (%rdi)
jl 0x6bba
andl $0x0, (%rdi)
xorl %edx, %edx
movl 0x4(%rdi), %esi
incl %esi
movl %esi, 0x4(%rdi)
cmpl 0x1c(%rdi), %esi
jge 0x6be1
movl (%rcx), %r8d
addq $0x4, %rcx
movl %r8d, %esi
shrl $0x8, %esi
addl %esi, %edx
xorl %esi, %esi
andl $0xff, %r8d
movl %edx, (%rdi)
movl %r8d, 0x8(%rdi)
je 0x6b99
movb $0x1, %al
movq %rcx, 0x10(%rdi)
retq
xorl %eax, %eax
movq %rcx, 0x10(%rdi)
andl $0x0, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/Font.c
// Function: WidthOfSimpleString
int WidthOfSimpleString(const Font *font,const void *str)
{
	const uint8_t *cstring=str;
	int len=0;
	while(*cstring) len+=WidthOfCharacter(font,*cstring++);
	return len;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movzbl (%rbx), %esi
testl %esi, %esi
je 0x6f0d
movq %r14, %rdi
incq %rbx
callq *0x8(%r14)
addl %eax, %ebp
jmp 0x6ef8
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/Font.c
// Function: DrawSimpleString
void DrawSimpleString(Bitmap *bitmap,const Font *font,int x,int y,Pixel col,const void *str)
{
	const uint8_t *cstring=str;
	while(*cstring)
	{
		DrawCharacter(bitmap,font,x,y,col,*cstring);
		x+=WidthOfCharacter(font,*cstring);
		cstring++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movzbl (%rbx), %r9d
testl %r9d, %r9d
je 0x6f61
movq %r13, %rdi
movq %r12, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq *0x18(%r12)
movzbl (%rbx), %esi
movq %r12, %rdi
callq *0x8(%r12)
addl %eax, %r15d
incq %rbx
jmp 0x6f31
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/Font.c
// Function: CompositeSimpleString
void CompositeSimpleString(Bitmap *bitmap,const Font *font,int x,int y,Pixel col,CompositionMode comp,const void *str)
{
	const uint8_t *cstring=str;
	while(*cstring)
	{
		CompositeCharacter(bitmap,font,x,y,col,comp,*cstring);
		x+=WidthOfCharacter(font,*cstring);
		cstring++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movq 0x50(%rsp), %rbx
movq %r9, 0x10(%rsp)
movzbl (%rbx), %eax
testl %eax, %eax
je 0x6fd2
movq 0x28(%r12), %r10
movq %r13, %rdi
movq %r12, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movq 0x10(%rsp), %r9
movl %eax, (%rsp)
callq *%r10
movzbl (%rbx), %esi
movq %r12, %rdi
callq *0x8(%r12)
addl %eax, %r15d
incq %rbx
jmp 0x6f99
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/MonoFont.c
// Function: GenericDrawCharacter
static inline void GenericDrawCharacter(Bitmap *bitmap,const Font *font,int x,int y,
Pixel col,CompositionMode comp,int c,GenericDrawHorizontalLineFunction *hlinefunc)
{
	const MonoFont *self=(const MonoFont *)font;

	if(c<self->firstglyph || c>self->lastglyph) return;
	if(!self->glyphs[c-self->firstglyph]) return;

	const uint8_t *data=self->glyphs[c-self->firstglyph];
	int width=data[1];
	int height=data[2];
	const uint8_t *spans=&data[3];

	for(int dy=0;dy<height;dy++)
	{
		int dx=0;
		while(dx<width)
		{
			dx+=*spans++;
			if(dx>=width) break;

			int length=*spans++;
			GenericDrawHorizontalLine(bitmap,x+dx,y+dy,length,col,comp,hlinefunc);
			dx+=length;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x28(%rsp), %rsp
movl 0x60(%rsp), %r10d
movq %r9, 0x20(%rsp)
movl %r8d, 0x4(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
movl %r10d, %eax
subl 0x38(%rsi), %eax
jl 0x70de
cmpl %r10d, 0x3c(%rsi)
jl 0x70de
cltq
movq 0x40(%rsi,%rax,8), %rbx
testq %rbx, %rbx
je 0x70de
movzbl 0x2(%rbx), %eax
movzbl 0x1(%rbx), %ebp
movq %rdi, %r12
addq $0x3, %rbx
xorl %ecx, %ecx
movl %eax, (%rsp)
cmpl (%rsp), %ecx
je 0x70de
movq 0x8(%rsp), %rax
incq %rbx
xorl %r15d, %r15d
movq %rcx, 0x10(%rsp)
leal (%rcx,%rax), %r13d
cmpl %ebp, %r15d
jge 0x70d2
movzbl -0x1(%rbx), %eax
addl %eax, %r15d
cmpl %ebp, %r15d
jge 0x70d5
movzbl (%rbx), %r14d
movq 0x18(%rsp), %rax
movq %r12, %rdi
movl %r13d, %edx
movl 0x4(%rsp), %r8d
movq 0x20(%rsp), %r9
leal (%r15,%rax), %esi
movl %r14d, %ecx
callq *0x68(%rsp)
addl %r14d, %r15d
addq $0x2, %rbx
jmp 0x7094
decq %rbx
movq 0x10(%rsp), %rcx
incl %ecx
jmp 0x707b
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/RLEBitmap.c
// Function: SizeOfRLEBitmapFromPartialBitmap
size_t SizeOfRLEBitmapFromPartialBitmap(const Bitmap *bitmap,int x0,int y0,int width,int height)
{
	size_t numpixels=0;

	for(int y=0;y<height;y++)
	{
		int x=0;
		while(x<width)
		{
			int emptystart=x;
			while(x<width && x-emptystart<0xff)
			{
				Pixel p=ReadPixel(bitmap,x+x0,y+y0);
				if(!IsPixelTransparent(p)) break;
				x++;
			}
			//int empty=x-emptystart;

			int filledstart=x;
			while(x<width && x-filledstart<0xff)
			{
				Pixel p=ReadPixel(bitmap,x+x0,y+y0);
				if(IsPixelTransparent(p)) break;
				x++;
			}
			int filled=x-filledstart;

			numpixels+=1+filled;

			#ifdef SingleBytePixels
			if(x<width || filled!=0) numpixels++;
			#endif
		}
	}

	return sizeof(RLEBitmap)+numpixels*sizeof(Pixel);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x28(%rsp), %rsp
movl %ecx, %ebp
xorl %ecx, %ecx
movq %rdx, 0x10(%rsp)
movq %rdi, %r12
movq %rsi, 0x8(%rsp)
testl %r8d, %r8d
cmovlel %ecx, %r8d
xorl %edx, %edx
movl %r8d, 0x4(%rsp)
cmpl 0x4(%rsp), %ecx
je 0x71f1
movq 0x10(%rsp), %rax
xorl %ebx, %ebx
movq %rcx, 0x18(%rsp)
leal (%rcx,%rax), %r13d
cmpl %ebp, %ebx
jge 0x71e5
xorl %r15d, %r15d
movq %rdx, 0x20(%rsp)
movl %ebx, %r14d
cmpl %ebp, %ebx
jge 0x71a4
cmpl $0xfe, %r15d
ja 0x71a4
movq 0x8(%rsp), %rax
movq %r12, %rdi
movl %r13d, %edx
leal (%rax,%r14), %esi
callq 0x610a
incl %r15d
leal 0x1(%r14), %ebx
testb %al, %al
jns 0x7175
xorl %eax, %eax
movl %r14d, %ebx
cmpl %ebp, %r14d
movq %rax, %r15
jge 0x71d9
cmpl $0xfe, %r15d
ja 0x71d9
movq 0x8(%rsp), %rax
movq %r12, %rdi
movl %r13d, %edx
leal (%rax,%rbx), %esi
callq 0x610a
testb %al, %al
leal 0x1(%rbx), %r14d
leaq 0x1(%r15), %rax
js 0x71a6
movq 0x20(%rsp), %rdx
leaq 0x1(%rdx,%r15), %rdx
jmp 0x7169
movq 0x18(%rsp), %rcx
incl %ecx
jmp 0x714f
leaq 0x4(,%rdx,4), %rax
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Graphics/RLEBitmap.c
// Function: InitializeRLEBitmapFromPartialBitmap
void InitializeRLEBitmapFromPartialBitmap(RLEBitmap *self,const Bitmap *bitmap,int x0,int y0,int width,int height)
{
	self->width=width;
	self->height=height;
	Pixel *ptr=self->codes;

	for(int y=0;y<height;y++)
	{
		int x=0;
		while(x<width)
		{
			int emptystart=x;
			while(x<width && x-emptystart<0xff)
			{
				Pixel p=ReadPixel(bitmap,x+x0,y+y0);
				if(!IsPixelTransparent(p)) break;
				x++;
			}
			int empty=x-emptystart;

			int filledstart=x;
			while(x<width && x-filledstart<0xff)
			{
				Pixel p=ReadPixel(bitmap,x+x0,y+y0);
				if(IsPixelTransparent(p)) break;
				x++;
			}
			int filled=x-filledstart;

			#ifdef SingleBytePixels
			*ptr++=empty;
			if(x<width || filled!=0) *ptr++=filled;
			#else
			*ptr++=RLECode(empty,filled);
			memcpy(ptr,ConstBitmapPixelPointer(bitmap,filledstart+x0,y+y0),filled*sizeof(Pixel));
			ptr+=filled;
			#endif
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x38(%rsp), %rsp
movq %rdi, %r12
movq %rcx, 0x20(%rsp)
movw %r8w, (%rdi)
movw %r9w, 0x2(%rdi)
movl %r8d, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
addq $0x4, %r12
xorl %ecx, %ecx
testl %r9d, %r9d
cmovlel %ecx, %r9d
movl %r9d, 0x1c(%rsp)
cmpl 0x1c(%rsp), %ecx
je 0x7359
movq 0x20(%rsp), %rax
xorl %r15d, %r15d
movq %rcx, 0x28(%rsp)
leal (%rcx,%rax), %r14d
cmpl 0x4(%rsp), %r15d
jge 0x734d
xorl %ebx, %ebx
xorl %eax, %eax
movq %r12, 0x30(%rsp)
movl %r15d, %ebp
cmpl 0x4(%rsp), %r15d
movl %eax, %r12d
jge 0x72c7
cmpl $0xfe, %ebx
ja 0x72c7
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdi
movl %r14d, %edx
leal (%rax,%rbp), %esi
callq 0x610a
incl %ebx
leal 0x1(%rbp), %r15d
testb %al, %al
leal 0x100(%r12), %eax
jns 0x728b
xorl %eax, %eax
xorl %ecx, %ecx
movl %ebp, %edx
movl %edx, %r15d
cmpl 0x4(%rsp), %edx
movq %rcx, %rbx
movl %eax, %r13d
jge 0x730b
cmpl $0xfe, %r13d
ja 0x730b
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdi
movl %r14d, %edx
leal (%rax,%r15), %esi
callq 0x610a
testb %al, %al
leal 0x1(%r15), %edx
leaq 0x4(%rbx), %rcx
leal 0x1(%r13), %eax
js 0x72cd
orl %r12d, %r13d
movq 0x30(%rsp), %r12
movq 0x8(%rsp), %rdx
movslq %r14d, %rcx
addl 0x10(%rsp), %ebp
movl %r13d, (%r12)
leaq 0x4(%r12), %rdi
movslq 0x4(%rdx), %rax
imulq %rax, %rcx
movslq %ebp, %rax
addq 0x8(%rdx), %rcx
movq %rbx, %rdx
leaq (%rcx,%rax,4), %rsi
callq 0x1140
leaq 0x4(%r12,%rbx), %r12
jmp 0x7277
movq 0x28(%rsp), %rcx
incl %ecx
jmp 0x725c
leaq 0x38(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat3x3rotate
mat3x3_t mat3x3rotate(float angle,vec3_t axis)
{
	float sine=sinf(angle);
	float cosine=cosf(angle);
	float one_minus_cosine=1-cosine;

	axis=vec3norm(axis);

	return mat3x3(
	cosine + one_minus_cosine*axis.x*axis.x,
	one_minus_cosine*axis.x*axis.y + axis.z*sine,
	one_minus_cosine*axis.x*axis.z - axis.y*sine,

	one_minus_cosine*axis.x*axis.y - axis.z*sine,
	cosine + one_minus_cosine*axis.y*axis.y,
	one_minus_cosine*axis.y*axis.z + axis.x*sine,

	one_minus_cosine*axis.x*axis.z + axis.y*sine,
	one_minus_cosine*axis.y*axis.z - axis.x*sine,
	cosine + one_minus_cosine*axis.z*axis.z);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq -0x30(%rsp), %rsp
leaq 0x18(%rsp), %r15
leaq 0x1c(%rsp), %r14
movq %rdi, %rbx
movss %xmm2, 0xc(%rsp)
movaps %xmm1, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1030
movss (%r15), %xmm1
movss 0x4c62(%rip), %xmm0     # 0xc008
subss %xmm1, %xmm0
movss %xmm1, 0x14(%rsp)
movss 0xc(%rsp), %xmm1
movss %xmm0, 0x8(%rsp)
movss (%r14), %xmm0
movss %xmm0, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
callq 0x74a9
movshdup %xmm0, %xmm2            # xmm2 = xmm0[1,1,3,3]
movss 0x8(%rsp), %xmm6
movaps %xmm0, %xmm3
movaps %xmm1, %xmm8
movss 0x10(%rsp), %xmm9
movss 0x14(%rsp), %xmm11
movq %rbx, %rax
movaps %xmm2, %xmm5
mulss %xmm6, %xmm3
movaps %xmm6, %xmm12
movaps %xmm2, %xmm7
movaps %xmm9, %xmm10
mulss %xmm9, %xmm8
mulss %xmm6, %xmm5
mulss %xmm9, %xmm7
movaps %xmm3, %xmm6
movaps %xmm3, %xmm4
mulss %xmm1, %xmm3
mulss %xmm2, %xmm6
mulss %xmm5, %xmm2
mulss %xmm1, %xmm5
mulss %xmm1, %xmm1
mulss %xmm0, %xmm4
mulss %xmm10, %xmm0
movaps %xmm3, %xmm10
mulss %xmm12, %xmm1
movaps %xmm6, %xmm9
subss %xmm7, %xmm10
addss %xmm3, %xmm7
movaps %xmm5, %xmm3
addss %xmm11, %xmm4
subss %xmm8, %xmm6
addss %xmm11, %xmm2
subss %xmm0, %xmm5
addss %xmm8, %xmm9
addss %xmm0, %xmm3
addss %xmm11, %xmm1
movss %xmm4, (%rbx)
movss %xmm6, 0x4(%rbx)
movss %xmm7, 0x8(%rbx)
movss %xmm9, 0xc(%rbx)
movss %xmm2, 0x10(%rbx)
movss %xmm5, 0x14(%rbx)
movss %xmm10, 0x18(%rbx)
movss %xmm3, 0x1c(%rbx)
movss %xmm1, 0x20(%rbx)
leaq 0x30(%rsp), %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat3x3inverselookat
mat3x3_t mat3x3inverselookat(vec3_t eye,vec3_t center,vec3_t up)
{
	vec3_t backward=vec3norm(vec3sub(eye,center));
	vec3_t right=vec3norm(vec3cross(up,backward));
	vec3_t actualup=vec3norm(vec3cross(backward,right));

	return mat3x3cols(right,actualup,backward);
}

// Assembly:
pushq %rbx
leaq -0x40(%rsp), %rsp
subps %xmm2, %xmm0
subss %xmm3, %xmm1
movss %xmm5, 0x20(%rsp)
movaps %xmm4, 0x10(%rsp)
movq %rdi, %rbx
callq 0x74a9
movaps %xmm0, %xmm2
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, %xmm3
movss %xmm1, 0xc(%rsp)
movaps 0x10(%rsp), %xmm0
movss 0x20(%rsp), %xmm1
callq 0xb078
callq 0x74a9
movaps %xmm0, %xmm2
movaps %xmm0, 0x20(%rsp)
movaps %xmm1, %xmm3
movss %xmm1, 0x10(%rsp)
movaps 0x30(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
callq 0xb078
callq 0x74a9
movaps 0x20(%rsp), %xmm2
movq %rbx, %rax
movlps %xmm2, (%rbx)
movss 0x10(%rsp), %xmm2
movss %xmm2, 0x8(%rbx)
movlps %xmm0, 0xc(%rbx)
movss %xmm1, 0x14(%rbx)
movaps 0x30(%rsp), %xmm2
movss 0xc(%rsp), %xmm1
movlps %xmm2, 0x18(%rbx)
movss %xmm1, 0x20(%rbx)
leaq 0x40(%rsp), %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat4x4mul
mat4x4_t mat4x4mul(mat4x4_t a,mat4x4_t b)
{
        mat4x4_t res;
        for(int i=0;i<16;i++)
        {
                int row=i&3,column=i&12;
                float val=0;
                for(int j=0;j<4;j++) val+=a.m[row+j*4]*b.m[column+j];
                res.m[i]=val;
        }
        return res;
}

// Assembly:
movq %rdi, %rax
leaq 0x48(%rsp), %rcx
leaq 0x8(%rsp), %rdx
xorl %esi, %esi
pushq $-0x10
popq %rdi
cmpq $0x10, %rsi
je 0x77b0
movl %esi, %r8d
movl %esi, %r9d
xorps %xmm0, %xmm0
movq %rdi, %r10
andl $0xc, %r8d
andl $0x3, %r9d
leaq (%rcx,%r8,4), %r8
leaq (%rdx,%r9,4), %r9
testq %r10, %r10
je 0x77a6
movss 0x10(%r8,%r10), %xmm1
mulss 0x40(%r9,%r10,4), %xmm1
addq $0x4, %r10
addss %xmm1, %xmm0
jmp 0x7789
movss %xmm0, (%rax,%rsi,4)
incq %rsi
jmp 0x7767
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat3x2affinemul
mat3x2_t mat3x2affinemul(mat3x2_t a,mat3x2_t b)
{
	return mat3x2(a.m[0]*b.m[0]+a.m[2]*b.m[1],
	              a.m[0]*b.m[2]+a.m[2]*b.m[3],
	              a.m[0]*b.m[4]+a.m[2]*b.m[5]+a.m[4],

	              a.m[1]*b.m[0]+a.m[3]*b.m[1],
	              a.m[1]*b.m[2]+a.m[3]*b.m[3],
	              a.m[1]*b.m[4]+a.m[3]*b.m[5]+a.m[5]);
}

// Assembly:
movss 0x30(%rsp), %xmm3
movss 0x34(%rsp), %xmm4
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movups 0x20(%rsp), %xmm0
movups 0x24(%rsp), %xmm5
movss 0x28(%rsp), %xmm6
movq %rdi, %rax
movsldup %xmm3, %xmm3            # xmm3 = xmm3[0,0,2,2]
movsldup %xmm4, %xmm4            # xmm4 = xmm4[0,0,2,2]
mulps %xmm1, %xmm3
mulps %xmm2, %xmm4
movddup %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movddup %xmm2, %xmm2            # xmm2 = xmm2[0,0]
shufps $0x0, %xmm6, %xmm0      # xmm0 = xmm0[0,0],xmm6[0,0]
movss 0x2c(%rsp), %xmm6
shufps $0x0, %xmm6, %xmm5      # xmm5 = xmm5[0,0],xmm6[0,0]
mulps %xmm1, %xmm0
movsd 0x18(%rsp), %xmm1
mulps %xmm2, %xmm5
addps %xmm3, %xmm4
addps %xmm0, %xmm5
addps %xmm1, %xmm4
movups %xmm5, (%rdi)
movlps %xmm4, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat3x3affinemul
mat3x3_t mat3x3affinemul(mat3x3_t a,mat3x3_t b)
{
	return mat3x3(a.m[0]*b.m[0]+a.m[3]*b.m[1],
	              a.m[0]*b.m[3]+a.m[3]*b.m[4],
	              a.m[0]*b.m[6]+a.m[3]*b.m[7]+a.m[6],

	              a.m[1]*b.m[0]+a.m[4]*b.m[1],
	              a.m[1]*b.m[3]+a.m[4]*b.m[4],
	              a.m[1]*b.m[6]+a.m[4]*b.m[7]+a.m[7],

	              0,0,1);
}

// Assembly:
movups 0x34(%rsp), %xmm6
movss 0x4c(%rsp), %xmm7
movsd 0x8(%rsp), %xmm4
movsd 0x14(%rsp), %xmm5
movups 0x30(%rsp), %xmm0
movups 0x3c(%rsp), %xmm2
movups 0x40(%rsp), %xmm3
movq %rdi, %rax
movsldup %xmm7, %xmm7            # xmm7 = xmm7[0,0,2,2]
mulps %xmm5, %xmm7
movsldup %xmm6, %xmm8            # xmm8 = xmm6[0,0,2,2]
movss 0x48(%rsp), %xmm6
movsldup %xmm0, %xmm1            # xmm1 = xmm0[0,0,2,2]
movsldup %xmm2, %xmm2            # xmm2 = xmm2[0,0,2,2]
movsldup %xmm3, %xmm3            # xmm3 = xmm3[0,0,2,2]
movsldup %xmm6, %xmm6            # xmm6 = xmm6[0,0,2,2]
mulps %xmm4, %xmm1
mulps %xmm5, %xmm8
mulps %xmm4, %xmm2
mulps %xmm5, %xmm3
mulps %xmm4, %xmm6
addps %xmm1, %xmm8
movsd 0x20(%rsp), %xmm1
addps %xmm2, %xmm3
addps %xmm6, %xmm7
movlps %xmm8, (%rdi)
andl $0x0, 0x8(%rdi)
movlps %xmm3, 0xc(%rdi)
andl $0x0, 0x14(%rdi)
addps %xmm1, %xmm7
movlps %xmm7, 0x18(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat4x4det
float mat4x4det(mat4x4_t m)
{
	float a0=m.m[0]*m.m[5]-m.m[1]*m.m[4];
	float a1=m.m[0]*m.m[6]-m.m[2]*m.m[4];
	float a2=m.m[0]*m.m[7]-m.m[3]*m.m[4];
	float a3=m.m[1]*m.m[6]-m.m[2]*m.m[5];
	float a4=m.m[1]*m.m[7]-m.m[3]*m.m[5];
	float a5=m.m[2]*m.m[7]-m.m[3]*m.m[6];
	float b0=m.m[8]*m.m[13]-m.m[9]*m.m[12];
	float b1=m.m[8]*m.m[14]-m.m[10]*m.m[12];
	float b2=m.m[8]*m.m[15]-m.m[11]*m.m[12];
	float b3=m.m[9]*m.m[14]-m.m[10]*m.m[13];
	float b4=m.m[9]*m.m[15]-m.m[11]*m.m[13];
	float b5=m.m[10]*m.m[15]-m.m[11]*m.m[14];
	return a0*b5-a1*b4+a2*b3+a3*b2-a4*b1+a5*b0;
}

// Assembly:
movups 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm5
movss 0x1c(%rsp), %xmm6
movsd 0x20(%rsp), %xmm4
movsd 0x28(%rsp), %xmm8
movsd 0x40(%rsp), %xmm11
movsd 0x30(%rsp), %xmm7
movsd 0x38(%rsp), %xmm9
movaps %xmm5, %xmm1
movaps %xmm7, %xmm10
mulps %xmm9, %xmm10
movaps %xmm0, %xmm2
movaps %xmm0, %xmm3
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movaps %xmm0, %xmm12
shufps $0xa7, %xmm0, %xmm2     # xmm2 = xmm2[3,1],xmm0[2,2]
shufps $0xe3, %xmm0, %xmm3     # xmm3 = xmm3[3,0],xmm0[2,3]
shufps $0xd8, %xmm0, %xmm1     # xmm1 = xmm1[0,2],xmm0[1,3]
shufps $0xe9, %xmm12, %xmm12   # xmm12 = xmm12[1,2,2,3]
insertps $0x10, %xmm6, %xmm2     # xmm2 = xmm2[0],xmm6[0],xmm2[2,3]
insertps $0x10, %xmm6, %xmm3     # xmm3 = xmm3[0],xmm6[0],xmm3[2,3]
movlhps %xmm4, %xmm6            # xmm6 = xmm6[0],xmm4[0]
insertps $0x70, %xmm4, %xmm1     # xmm1 = xmm1[0,1,2],xmm4[1]
shufps $0xd8, %xmm4, %xmm6     # xmm6 = xmm6[0,2],xmm4[1,3]
insertps $0x20, %xmm4, %xmm2     # xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
mulps %xmm12, %xmm3
insertps $0x30, %xmm5, %xmm6     # xmm6 = xmm6[0,1,2],xmm5[0]
mulps %xmm0, %xmm2
movaps %xmm8, %xmm0
movaps %xmm11, %xmm5
mulps %xmm6, %xmm1
movaps %xmm11, %xmm6
insertps $0x6a, %xmm11, %xmm0    # xmm0 = xmm0[0],zero,xmm11[1],zero
mulps %xmm8, %xmm5
shufps $0x22, %xmm11, %xmm0    # xmm0 = xmm0[2,0],xmm11[2,0]
movlhps %xmm8, %xmm6            # xmm6 = xmm6[0],xmm8[0]
insertps $0x6a, %xmm7, %xmm11    # xmm11 = xmm11[0],zero,xmm7[1],zero
shufps $0x28, %xmm7, %xmm11    # xmm11 = xmm11[0,2],xmm7[2,0]
movss %xmm7, %xmm6            # xmm6 = xmm7[0],xmm6[1,2,3]
shufps $0x55, %xmm8, %xmm7     # xmm7 = xmm7[1,1],xmm8[1,1]
insertps $0x60, %xmm9, %xmm0     # xmm0 = xmm0[0,1],xmm9[1],xmm0[3]
shufps $0x48, %xmm9, %xmm7     # xmm7 = xmm7[0,2],xmm9[0,1]
insertps $0x20, %xmm9, %xmm11    # xmm11 = xmm11[0,1],xmm9[0],xmm11[3]
mulps %xmm6, %xmm0
movaps 0x8(%rsp), %xmm6
shufps $0xd8, %xmm7, %xmm7     # xmm7 = xmm7[0,2,1,3]
mulps %xmm4, %xmm6
mulps %xmm11, %xmm7
subps %xmm2, %xmm1
subps %xmm10, %xmm5
subps %xmm3, %xmm6
subps %xmm7, %xmm0
shufps $0xe1, %xmm6, %xmm6     # xmm6 = xmm6[1,0,2,3]
mulps %xmm1, %xmm0
mulps %xmm5, %xmm6
haddps %xmm0, %xmm0
haddps %xmm6, %xmm6
haddps %xmm0, %xmm0
subss %xmm6, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat3x3transform
vec3_t mat3x3transform(mat3x3_t m,vec3_t v)
{
	return vec3(
	v.x*m.m[0]+v.y*m.m[3]+v.z*m.m[6],
	v.x*m.m[1]+v.y*m.m[4]+v.z*m.m[7],
	v.x*m.m[2]+v.y*m.m[5]+v.z*m.m[8]);
}

// Assembly:
movshdup %xmm0, %xmm3            # xmm3 = xmm0[1,1,3,3]
movsd 0x14(%rsp), %xmm5
movsldup %xmm0, %xmm2            # xmm2 = xmm0[0,0,2,2]
movsd 0x8(%rsp), %xmm4
movss 0x10(%rsp), %xmm6
mulps %xmm2, %xmm4
mulps %xmm3, %xmm5
movsldup %xmm1, %xmm2            # xmm2 = xmm1[0,0,2,2]
mulss %xmm0, %xmm6
mulss 0x28(%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
mulps %xmm0, %xmm2
movss 0x1c(%rsp), %xmm0
mulss %xmm3, %xmm0
addss %xmm6, %xmm1
addps %xmm4, %xmm5
addss %xmm0, %xmm1
addps %xmm5, %xmm2
movaps %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat4x3transform
vec3_t mat4x3transform(mat4x3_t m,vec3_t v)
{
	return vec3(
	v.x*m.m[0]+v.y*m.m[3]+v.z*m.m[6]+m.m[9],
	v.x*m.m[1]+v.y*m.m[4]+v.z*m.m[7]+m.m[10],
	v.x*m.m[2]+v.y*m.m[5]+v.z*m.m[8]+m.m[11]);
}

// Assembly:
movss 0x10(%rsp), %xmm5
movsldup %xmm0, %xmm3            # xmm3 = xmm0[0,0,2,2]
movsd 0x8(%rsp), %xmm2
movshdup %xmm0, %xmm4            # xmm4 = xmm0[1,1,3,3]
movsd 0x20(%rsp), %xmm6
mulps %xmm3, %xmm2
movsd 0x14(%rsp), %xmm3
mulss %xmm0, %xmm5
movsldup %xmm1, %xmm0            # xmm0 = xmm1[0,0,2,2]
mulss 0x28(%rsp), %xmm1
mulps %xmm4, %xmm3
mulps %xmm6, %xmm0
movss 0x1c(%rsp), %xmm6
mulss %xmm4, %xmm6
addss %xmm5, %xmm1
movsd 0x2c(%rsp), %xmm5
addps %xmm2, %xmm3
addps %xmm5, %xmm0
addss %xmm6, %xmm1
addps %xmm3, %xmm0
addss 0x34(%rsp), %xmm1
retq
// File: /workspace/github_c_makefile_star2_O2/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat3x3transformvec2
vec2_t mat3x3transformvec2(mat3x3_t m,vec2_t v)
{
	float z=v.x*m.m[2]+v.y*m.m[5]+m.m[8];
	return vec2(
	(v.x*m.m[0]+v.y*m.m[3]+m.m[6])/z,
	(v.x*m.m[1]+v.y*m.m[4]+m.m[7])/z);
}

// Assembly:
movss 0x10(%rsp), %xmm1
movshdup %xmm0, %xmm2            # xmm2 = xmm0[1,1,3,3]
movss 0x1c(%rsp), %xmm3
movsd 0x14(%rsp), %xmm4
mulss %xmm0, %xmm1
mulss %xmm2, %xmm3
movsldup %xmm0, %xmm0            # xmm0 = xmm0[0,0,2,2]
mulps %xmm2, %xmm4
addss %xmm1, %xmm3
movss 0x34b0(%rip), %xmm1     # 0xc008
addss 0x28(%rsp), %xmm3
divss %xmm3, %xmm1
movsd 0x8(%rsp), %xmm3
mulps %xmm0, %xmm3
movsd 0x20(%rsp), %xmm0
addps %xmm3, %xmm4
addps %xmm0, %xmm4
movsldup %xmm1, %xmm0            # xmm0 = xmm1[0,0,2,2]
mulps %xmm4, %xmm0
retq