LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 -0x68(%rsp), %rsp
movswl (%rsi), %ebx
movswl (%rdi), %eax
movq %rdi, %r14
cmpl %edx, %eax
leal (%rbx,%rdx), %r11d
setle %dil
testl %r11d, %r11d
setle %r9b
orb %dil, %r9b
jne 0x8ecd
leal (%ecx), %r12d
movswl 0x2(%r14), %ecx
movswl 0x2(%rsi), %r13d
movq %r8, %r15
movl %ecx, %edi
leal (%r13,%r12), %r8d
subl %r12d, %edi
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x8ecd
cmpl %ecx, %r8d
leaq 0x4(%rsi), %r9
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
cmovgl %edi, %r13d
xorl %ebp, %ebp
movq %r9, 0x20(%rsp)
movl %ebx, 0x28(%rsp)
testl %r12d, %r12d
movl %r13d, 0x2c(%rsp)
jns 0x8eab
movl %r12d, %ecx
xorl %edi, %edi
xorl %ebp, %ebp
xorl %r8d, %r8d
xorl %r9d, %r9d
negl %ecx
movl %ecx, 0x2c(%rsp)
addl %r9d, %r8d
leal (%r9d), %r9d
cmpl %ebx, %r8d
leaq 0x4(%rsi,%r9,4), %rsi
jl 0x8e77
incl %ebp
xorl %r8d, %r8d
cmpl %ecx, %ebp
jge 0x8e90
movl %ebp, %edi
movl (%rsi), %r9d
movl %r9d, %r10d
shrl $0x8, %r10d
addl %r10d, %r8d
andl $0xff, %r9d
cmovnel %edi, %ebp
jmp 0x8e5b
xorl %ecx, %ecx
movq %rsi, %r9
movl %ecx, 0x10(%rsp)
movl %ebp, 0x14(%rsp)
movq %rsi, 0x20(%rsp)
movl %ecx, 0x18(%rsp)
movl %r13d, 0x2c(%rsp)
testl %edx, %edx
setns %cl
cmpl %eax, %r11d
setle %al
testb %al, %cl
je 0x8edd
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %r12d, %ecx
movq %r15, %r8
callq 0x8f97
leaq 0x68(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
xorl %esi, %esi
movq %r13, 0x30(%rsp)
movq %rdx, 0x48(%rsp)
movq %rbx, 0x40(%rsp)
movq %r12, 0x38(%rsp)
movl %esi, %r13d
addl %eax, %r13d
cmpl %ebx, %r13d
jl 0x8f0b
incl %ebp
xorl %r13d, %r13d
cmpl 0x30(%rsp), %ebp
jge 0x8ecd
leal (%eax), %eax
leaq (%r9,%rax,4), %r9
movl $0x0, %eax
movl (%r9), %ecx
addq $0x4, %r9
movzbl %cl, %edi
shrl $0x8, %ecx
testq %rdi, %rdi
leal (%rcx,%r13), %esi
je 0x8ef5
addl %edx, %r13d
movq %rbp, 0x60(%rsp)
addl %r12d, %ebp
movq %r9, %r12
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movq %r9, 0x58(%rsp)
movq %rdi, 0x50(%rsp)
addl %ecx, %r13d
movl (%r12), %ecx
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r15, %r8
callq 0x84bd
incl %r13d
leaq 0x4(%r12), %r12
decq %rbx
jne 0x8f4f
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rbx
movq 0x38(%rsp), %r12
movq 0x60(%rsp), %rbp
movq 0x58(%rsp), %r9
movl 0xc(%rsp), %esi
jmp 0x8ef5
// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rsi, %r14
movq %rdi, %rbp
movl %ecx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl 0x18(%r14), %eax
movl (%r14), %r10d
movl 0x8(%r14), %r9d
movq 0x10(%r14), %rdx
addl %r9d, %r10d
movslq %r9d, %rsi
movq %rdx, %rcx
cmpl %eax, %r10d
leaq (%rdx,%rsi,4), %rdx
movl %r10d, %r13d
movl %r10d, (%r14)
jl 0x8ff8
movl $0x0, (%r14)
xorl %r13d, %r13d
movl 0x4(%r14), %edi
incl %edi
movl %edi, 0x4(%r14)
cmpl 0x1c(%r14), %edi
jge 0x905a
movl (%rdx), %edi
addq $0x4, %rdx
xorl %r9d, %r9d
movzbl %dil, %r15d
shrl $0x8, %edi
leal (%rdi,%r13), %r10d
testq %r15, %r15
movl %r10d, (%r14)
movl %r15d, 0x8(%r14)
je 0x8fc6
movq %rdx, 0x10(%r14)
addl 0xc(%rsp), %r13d
leaq 0x4(%rcx,%rsi,4), %rbx
movl 0x4(%r14), %eax
addl %edi, %r13d
addl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
movl (%rbx), %ecx
movq %rbp, %rdi
movl %r13d, %esi
movl 0x14(%rsp), %edx
movq %r12, %r8
callq 0x850b
incl %r13d
leaq 0x4(%rbx), %rbx
decq %r15
jne 0x9035
jmp 0x8fb7
movq %rdx, 0x10(%r14)
movl $0x0, 0x8(%r14)
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 -0x48(%rsp), %rsp
movswl (%rdi), %eax
leal (%edx), %ebx
movswl (%rsi), %r13d
movl %r8d, 0xc(%rsp)
cmpl %edx, %eax
leal (%r13,%rbx), %edx
setle %r10b
testl %edx, %edx
setle %r9b
orb %r10b, %r9b
jne 0x91cf
leal (%ecx), %r14d
movswl 0x2(%rdi), %ecx
movswl 0x2(%rsi), %r15d
movl %ecx, %r11d
leal (%r15,%r14), %r8d
subl %r14d, %r11d
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x91cf
cmpl %ecx, %r8d
leaq 0x4(%rsi), %r9
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
cmovgl %r11d, %r15d
xorl %ebp, %ebp
movq %r9, 0x20(%rsp)
movl %r13d, 0x28(%rsp)
testl %r14d, %r14d
movl %r15d, 0x2c(%rsp)
jns 0x91ad
movl %r14d, %ecx
xorl %r11d, %r11d
xorl %ebp, %ebp
xorl %r8d, %r8d
xorl %r9d, %r9d
negl %ecx
movl %ecx, 0x2c(%rsp)
addl %r9d, %r8d
leal (%r9d), %r9d
cmpl %r13d, %r8d
leaq 0x4(%rsi,%r9,4), %rsi
jl 0x9178
incl %ebp
xorl %r8d, %r8d
cmpl %ecx, %ebp
jge 0x9192
movl %ebp, %r11d
movl (%rsi), %r9d
movl %r9d, %r10d
shrl $0x8, %r10d
addl %r10d, %r8d
andl $0xff, %r9d
cmovnel %r11d, %ebp
jmp 0x915b
xorl %ecx, %ecx
movq %rsi, %r9
movl %ecx, 0x10(%rsp)
movl %ebp, 0x14(%rsp)
movq %rsi, 0x20(%rsp)
movl %ecx, 0x18(%rsp)
movl %r15d, 0x2c(%rsp)
testl %ebx, %ebx
setns %cl
cmpl %eax, %edx
setle %al
testb %al, %cl
je 0x91df
leaq 0x10(%rsp), %rsi
movl %ebx, %edx
movl %r14d, %ecx
movl 0xc(%rsp), %r8d
callq 0x9266
leaq 0x48(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x30(%rsp)
xorl %eax, %eax
xorl %r15d, %r15d
movq %r14, 0x40(%rsp)
movq %r13, 0x38(%rsp)
addl %eax, %r15d
cmpl %r13d, %r15d
jl 0x9206
incl %ebp
xorl %r15d, %r15d
cmpl 0x30(%rsp), %ebp
jge 0x91cf
leal (%eax), %eax
leaq (%r9,%rax,4), %r9
movl %r15d, %eax
movl (%r9), %r12d
addq $0x4, %r9
movl %r12d, %r15d
shrl $0x8, %r15d
addl %eax, %r15d
movl $0x0, %eax
andl $0xff, %r12d
je 0x91f3
leal (%rbp,%r14), %edx
leal (%r15,%rbx), %esi
movl %r12d, %ecx
movl 0xc(%rsp), %r8d
movq %rbx, %r13
movq %rdi, %rbx
movq %r9, %r14
callq 0x95f0
movq %r14, %r9
movq %rbx, %rdi
movq %r13, %rbx
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %r14
movl %r12d, %eax
jmp 0x91f3
// File: /workspace/github_c_makefile_star2_O3/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, %r15d
movq %rsi, %r14
movq %rdi, %r12
movl 0x18(%r14), %eax
movl (%r14), %esi
movl 0x8(%r14), %edi
movq 0x10(%r14), %rdx
addl %edi, %esi
movslq %edi, %rcx
cmpl %eax, %esi
leaq (%rdx,%rcx,4), %rdx
movl %esi, (%r14)
jl 0x92b4
movl $0x0, (%r14)
xorl %esi, %esi
movl 0x4(%r14), %ecx
incl %ecx
movl %ecx, 0x4(%r14)
cmpl 0x1c(%r14), %ecx
jge 0x92ee
movl (%rdx), %ecx
movl %esi, %edi
addq $0x4, %rdx
movl %ecx, %esi
shrl $0x8, %esi
addl %edi, %esi
xorl %edi, %edi
andl $0xff, %ecx
movl %esi, (%r14)
movl %ecx, 0x8(%r14)
je 0x928b
movq %rdx, 0x10(%r14)
addl %r15d, %esi
movq %r12, %rdi
movl %ebx, %r8d
movl 0x4(%r14), %edx
addl %ebp, %edx
callq 0x6166
jmp 0x927c
movq %rdx, 0x10(%r14)
movl $0x0, 0x8(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 -0x48(%rsp), %rsp
movswl (%rdi), %eax
leal (%edx), %r10d
movswl (%rsi), %r15d
movq %r9, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
cmpl %edx, %eax
leal (%r15,%r10), %r14d
movq %r10, %rdx
setle %r11b
testl %r14d, %r14d
setle %r10b
orb %r11b, %r10b
jne 0x9465
leal (%ecx), %ebx
movswl 0x2(%rdi), %ecx
movswl 0x2(%rsi), %r12d
movl %ecx, %r11d
leal (%r12,%rbx), %r8d
subl %ebx, %r11d
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x9465
cmpl %ecx, %r8d
leaq 0x4(%rsi), %r9
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
cmovgl %r11d, %r12d
xorl %ebp, %ebp
movq %r9, 0x20(%rsp)
movl %r15d, 0x28(%rsp)
testl %ebx, %ebx
movl %r12d, 0x2c(%rsp)
jns 0x9440
movl %ebx, %ecx
xorl %r11d, %r11d
xorl %ebp, %ebp
xorl %r8d, %r8d
xorl %r9d, %r9d
negl %ecx
movl %ecx, 0x2c(%rsp)
addl %r9d, %r8d
leal (%r9d), %r9d
cmpl %r15d, %r8d
leaq 0x4(%rsi,%r9,4), %rsi
jl 0x940b
incl %ebp
xorl %r8d, %r8d
cmpl %ecx, %ebp
jge 0x9425
movl %ebp, %r11d
movl (%rsi), %r9d
movl %r9d, %r10d
shrl $0x8, %r10d
addl %r10d, %r8d
andl $0xff, %r9d
cmovnel %r11d, %ebp
jmp 0x93ee
xorl %ecx, %ecx
movq %rsi, %r9
movl %ecx, 0x10(%rsp)
movl %ebp, 0x14(%rsp)
movq %rsi, 0x20(%rsp)
movl %ecx, 0x18(%rsp)
movl %r12d, 0x2c(%rsp)
testl %edx, %edx
setns %cl
cmpl %eax, %r14d
setle %al
testb %al, %cl
je 0x9475
leaq 0x10(%rsp), %rsi
movl %ebx, %ecx
movl 0x4(%rsp), %r8d
movq 0x8(%rsp), %r9
callq 0x9503
leaq 0x48(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0x30(%rsp)
xorl %eax, %eax
xorl %r12d, %r12d
movq %rbx, 0x40(%rsp)
movq %r15, 0x38(%rsp)
addl %eax, %r12d
cmpl %r15d, %r12d
jl 0x949c
incl %ebp
xorl %r12d, %r12d
cmpl 0x30(%rsp), %ebp
jge 0x9465
leal (%eax), %eax
leaq (%r9,%rax,4), %r9
movl %r12d, %eax
movl (%r9), %r13d
addq $0x4, %r9
movl %r13d, %r12d
shrl $0x8, %r12d
addl %eax, %r12d
movl $0x0, %eax
andl $0xff, %r13d
je 0x9489
movq %rdx, %rax
leal (%r12,%rdx), %esi
leal (%rbp,%rbx), %edx
movq %r9, %r14
movl %r13d, %ecx
movl 0x4(%rsp), %r8d
movq 0x8(%rsp), %r9
movq %rdi, %rbx
movq %rax, %r15
callq 0x9686
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %r9
movq 0x38(%rsp), %r15
movq 0x40(%rsp), %rbx
movl %r13d, %eax
jmp 0x9489
// File: /workspace/github_c_makefile_star2_O3/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, %r15d
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r13
movl 0x18(%r14), %eax
movl (%r14), %esi
movl 0x8(%r14), %edi
movq 0x10(%r14), %rdx
addl %edi, %esi
movslq %edi, %rcx
cmpl %eax, %esi
leaq (%rdx,%rcx,4), %rdx
movl %esi, (%r14)
jl 0x9558
movl $0x0, (%r14)
xorl %esi, %esi
movl 0x4(%r14), %ecx
incl %ecx
movl %ecx, 0x4(%r14)
cmpl 0x1c(%r14), %ecx
jge 0x9596
movl (%rdx), %ecx
movl %esi, %edi
addq $0x4, %rdx
movl %ecx, %esi
shrl $0x8, %esi
addl %edi, %esi
xorl %edi, %edi
andl $0xff, %ecx
movl %esi, (%r14)
movl %ecx, 0x8(%r14)
je 0x952f
movq %rdx, 0x10(%r14)
addl %r12d, %esi
movq %r13, %rdi
movl %ebp, %r8d
movq %rbx, %r9
movl 0x4(%r14), %edx
addl %r15d, %edx
callq 0x963c
jmp 0x9520
movq %rdx, 0x10(%r14)
movl $0x0, 0x8(%r14)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movb (%rsi), %al
testb %al, %al
je 0x9872
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
incq %rbx
movzbl %al, %esi
movq 0x8(%r14), %rax
movq %r14, %rdi
callq *%rax
addl %eax, %ebp
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x9859
jmp 0x9874
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Graphics/MonoFont.c
// Function: DrawMonoFontCharacter
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 %r9d, %eax
movl %r8d, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
subl 0x38(%rsi), %eax
jl 0x9a3f
cmpl %r9d, 0x3c(%rsi)
jl 0x9a3f
cltq
movq 0x40(%rsi,%rax,8), %r14
testq %r14, %r14
je 0x9a3f
movzbl 0x2(%r14), %eax
testl %eax, %eax
movl %eax, 0x8(%rsp)
je 0x9a3f
movzbl 0x1(%r14), %ebx
movq %rdi, %r12
addq $0x3, %r14
xorl %ecx, %ecx
testb %bl, %bl
je 0x9a37
movq 0x18(%rsp), %rax
incq %r14
movq %rcx, 0x10(%rsp)
leal (%rcx,%rax), %ebp
xorl %eax, %eax
movzbl -0x1(%r14), %r15d
addl %eax, %r15d
cmpl %ebx, %r15d
jge 0x9a32
movzbl (%r14), %r13d
movq 0x20(%rsp), %rax
movq %r12, %rdi
movl %ebp, %edx
movl 0xc(%rsp), %r8d
leal (%r15,%rax), %esi
movl %r13d, %ecx
callq 0x95f0
addl %r13d, %r15d
addq $0x2, %r14
cmpl %ebx, %r15d
movl %r15d, %eax
jl 0x99f4
decq %r14
movq 0x10(%rsp), %rcx
incl %ecx
cmpl 0x8(%rsp), %ecx
jne 0x99de
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
testl %r8d, %r8d
movq %rdx, 0x10(%rsp)
movl %r8d, 0x4(%rsp)
movq %rsi, 0x8(%rsp)
jle 0x9c23
movl %ecx, %ebp
movq %rdi, %r12
xorl %eax, %eax
xorl %edx, %edx
testl %ebp, %ebp
jle 0x9c0d
movq 0x10(%rsp), %rcx
xorl %ebx, %ebx
movq %rdx, 0x18(%rsp)
leal (%rdx,%rcx), %r13d
xorl %r15d, %r15d
movq %rax, 0x20(%rsp)
movl %ebx, %r14d
cmpl %ebp, %ebx
jge 0x9bc0
cmpl $0xfe, %r15d
ja 0x9bc0
movq 0x8(%rsp), %rax
movq %r12, %rdi
movl %r13d, %edx
leal (%rax,%r14), %esi
callq 0x855a
incl %r15d
leal 0x1(%r14), %ebx
testb %al, %al
jns 0x9b91
xorl %eax, %eax
movl %r14d, %ebx
cmpl %ebp, %r14d
movq %rax, %r15
jge 0x9bf5
cmpl $0xfe, %r15d
ja 0x9bf5
movq 0x8(%rsp), %rax
movq %r12, %rdi
movl %r13d, %edx
leal (%rax,%rbx), %esi
callq 0x855a
testb %al, %al
leal 0x1(%rbx), %r14d
leaq 0x1(%r15), %rax
js 0x9bc2
movq 0x20(%rsp), %rcx
cmpl %ebp, %ebx
leaq 0x1(%rcx,%r15), %rax
jl 0x9b89
leaq 0x1(%rcx,%r15), %rax
movq 0x18(%rsp), %rdx
incl %edx
cmpl 0x4(%rsp), %edx
jne 0x9b71
leaq 0x4(,%rax,4), %rax
jmp 0x9c28
movl $0x4, %eax
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
testl %r9d, %r9d
movw %r8w, (%rdi)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movl %r9d, 0x1c(%rsp)
movw %r9w, 0x2(%rdi)
jle 0x9d8d
addq $0x4, %rdi
xorl %ecx, %ecx
cmpl $0x0, 0x4(%rsp)
jle 0x9d81
movq 0x20(%rsp), %rax
xorl %ebx, %ebx
movq %rcx, 0x28(%rsp)
leal (%rcx,%rax), %r13d
xorl %r14d, %r14d
xorl %eax, %eax
movq %rdi, 0x30(%rsp)
movl %ebx, %r15d
cmpl 0x4(%rsp), %ebx
movl %eax, %ebp
jge 0x9cea
cmpl $0xfe, %r14d
ja 0x9cea
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdi
movl %r13d, %edx
leal (%rax,%r15), %esi
callq 0x855a
incl %r14d
leal 0x1(%r15), %ebx
testb %al, %al
leal 0x100(%rbp), %eax
jns 0x9caf
xorl %eax, %eax
xorl %ecx, %ecx
movl %r15d, %edx
movl %edx, %ebx
cmpl 0x4(%rsp), %edx
movq %rcx, %r14
movl %eax, %r12d
jge 0x9d2d
cmpl $0xfe, %r12d
ja 0x9d2d
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdi
movl %r13d, %edx
leal (%rax,%rbx), %esi
callq 0x855a
testb %al, %al
leal 0x1(%rbx), %edx
leaq 0x4(%r14), %rcx
leal 0x1(%r12), %eax
js 0x9cf1
orl %ebp, %r12d
movq 0x30(%rsp), %rax
movq 0x8(%rsp), %rdx
movslq %r13d, %rcx
addl 0x10(%rsp), %r15d
movl %r12d, (%rax)
leaq (%rax), %r12
movslq 0x4(%rdx), %rax
leaq 0x4(%r12), %rdi
imulq %rax, %rcx
movslq %r15d, %rax
addq 0x8(%rdx), %rcx
movq %r14, %rdx
leaq (%rcx,%rax,4), %rsi
callq 0x1140
cmpl 0x4(%rsp), %ebx
leaq 0x4(%r12,%r14), %rdi
jl 0x9ca5
leaq 0x4(%r12,%r14), %rdi
movq 0x28(%rsp), %rcx
incl %ecx
cmpl 0x1c(%rsp), %ecx
jne 0x9c8a
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_O3/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 -0x20(%rsp), %rsp
movaps %xmm1, %xmm4
movaps %xmm2, %xmm3
movss 0x4258(%rip), %xmm6     # 0xe010
movq %rdi, %rbx
mulps %xmm1, %xmm4
mulss %xmm2, %xmm3
haddps %xmm4, %xmm4
addss %xmm4, %xmm3
xorps %xmm4, %xmm4
rsqrtss %xmm3, %xmm4
movaps %xmm3, %xmm5
andps 0x4255(%rip), %xmm3     # 0xe030
cmpltss 0x4234(%rip), %xmm3     # 0xe018
mulss %xmm4, %xmm5
mulss %xmm5, %xmm6
mulss %xmm4, %xmm5
xorps %xmm4, %xmm4
addss 0x4219(%rip), %xmm5     # 0xe014
mulss %xmm6, %xmm5
andnps %xmm5, %xmm3
xorps %xmm5, %xmm5
ucomiss %xmm4, %xmm3
je 0x9e27
movss 0x41f6(%rip), %xmm4     # 0xe008
divss %xmm3, %xmm4
movsldup %xmm4, %xmm3            # xmm3 = xmm4[0,0,2,2]
mulss %xmm4, %xmm2
mulps %xmm3, %xmm1
movaps %xmm2, %xmm4
movaps %xmm1, %xmm5
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movaps %xmm5, 0x10(%rsp)
movss %xmm4, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1030
movss (%r15), %xmm0
movss 0x41b4(%rip), %xmm2     # 0xe008
movaps 0x10(%rsp), %xmm4
movss 0x4(%rsp), %xmm10
movss (%r14), %xmm5
movq %rbx, %rax
subss %xmm0, %xmm2
movaps %xmm4, %xmm3
movshdup %xmm4, %xmm1            # xmm1 = xmm4[1,1,3,3]
movaps %xmm10, %xmm11
movaps %xmm10, %xmm9
movaps %xmm4, %xmm12
movaps %xmm1, %xmm6
mulss %xmm10, %xmm11
movaps %xmm1, %xmm8
mulss %xmm5, %xmm9
mulss %xmm5, %xmm8
mulss %xmm2, %xmm3
mulss %xmm2, %xmm6
mulss %xmm2, %xmm11
movaps %xmm3, %xmm7
movaps %xmm3, %xmm4
mulss %xmm10, %xmm3
addss %xmm0, %xmm11
mulss %xmm1, %xmm7
mulss %xmm6, %xmm1
mulss %xmm10, %xmm6
mulss %xmm12, %xmm4
mulss %xmm5, %xmm12
movaps %xmm3, %xmm5
movaps %xmm7, %xmm10
movaps %xmm6, %xmm2
addss %xmm0, %xmm4
subss %xmm8, %xmm5
subss %xmm9, %xmm7
addss %xmm0, %xmm1
addss %xmm3, %xmm8
subss %xmm12, %xmm6
addss %xmm9, %xmm10
addss %xmm12, %xmm2
movss %xmm4, (%rbx)
movss %xmm7, 0x4(%rbx)
movss %xmm8, 0x8(%rbx)
movss %xmm10, 0xc(%rbx)
movss %xmm1, 0x10(%rbx)
movss %xmm6, 0x14(%rbx)
movss %xmm5, 0x18(%rbx)
movss %xmm2, 0x1c(%rbx)
movss %xmm11, 0x20(%rbx)
leaq 0x20(%rsp), %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %esi, %edi
movq %rsi, %r8
xorps %xmm0, %xmm0
movq $-0x10, %r9
andl $0x3, %edi
andq $-0x4, %r8
leaq (%rdx,%rdi,4), %rdi
leaq (%rcx,%r8,4), %r8
movss 0x10(%r8,%r9), %xmm1
mulss 0x40(%rdi,%r9,4), %xmm1
addq $0x4, %r9
addss %xmm1, %xmm0
jne 0xa2ea
movss %xmm0, (%rax,%rsi,4)
incq %rsi
cmpq $0x10, %rsi
jne 0xa2cc
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/Matrix.h
// Function: mat3x3inverse
static inline float mat3x3det(mat3x3_t m)
{
	return mat3x3_11(m)*mat3x3_22(m)*mat3x3_33(m)
	      -mat3x3_11(m)*mat3x3_32(m)*mat3x3_23(m)
	      +mat3x3_21(m)*mat3x3_32(m)*mat3x3_13(m)
	      -mat3x3_21(m)*mat3x3_12(m)*mat3x3_33(m)
	      +mat3x3_31(m)*mat3x3_12(m)*mat3x3_23(m)
	      -mat3x3_31(m)*mat3x3_22(m)*mat3x3_13(m);
}

// Assembly:
movups 0x1c(%rsp), %xmm2
movaps 0x8(%rsp), %xmm1
movss 0x18(%rsp), %xmm3
movsd 0x24(%rsp), %xmm0
movq %rdi, %rax
movaps %xmm1, %xmm4
movshdup %xmm1, %xmm7            # xmm7 = xmm1[1,1,3,3]
movddup %xmm0, %xmm6            # xmm6 = xmm0[0,0]
blendps $0xe, %xmm1, %xmm0      # xmm0 = xmm0[0],xmm1[1,2,3]
shufps $0x23, %xmm2, %xmm4     # xmm4 = xmm4[3,0],xmm2[2,0]
movaps %xmm2, %xmm9
movaps %xmm2, %xmm5
movaps %xmm2, %xmm8
unpcklps %xmm2, %xmm7            # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1]
shufps $0x87, %xmm4, %xmm9     # xmm9 = xmm9[3,1],xmm4[0,2]
movaps %xmm1, %xmm4
shufps $0x64, %xmm2, %xmm5     # xmm5 = xmm5[0,1],xmm2[2,1]
shufps $0xec, %xmm2, %xmm8     # xmm8 = xmm8[0,3],xmm2[2,3]
blendps $0xc, %xmm1, %xmm7      # xmm7 = xmm7[0,1],xmm1[2,3]
shufps $0xe8, %xmm1, %xmm4     # xmm4 = xmm4[0,2],xmm1[2,3]
mulps %xmm1, %xmm9
insertps $0x20, %xmm3, %xmm8     # xmm8 = xmm8[0,1],xmm3[0],xmm8[3]
insertps $0x30, %xmm3, %xmm7     # xmm7 = xmm7[0,1,2],xmm3[0]
insertps $0x30, %xmm3, %xmm4     # xmm4 = xmm4[0,1,2],xmm3[0]
mulss %xmm1, %xmm3
shufps $0x64, %xmm8, %xmm8     # xmm8 = xmm8[0,1,2,1]
mulps %xmm2, %xmm7
shufps $0xc4, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,3]
mulps %xmm8, %xmm0
movaps %xmm1, %xmm8
mulps %xmm4, %xmm5
shufps $0xaa, %xmm1, %xmm8     # xmm8 = xmm8[2,2],xmm1[2,2]
movaps %xmm9, %xmm4
movhlps %xmm9, %xmm9            # xmm9 = xmm9[1,1]
shufps $0xd2, %xmm4, %xmm4     # xmm4 = xmm4[2,0,1,3]
insertps $0x4c, %xmm0, %xmm2     # xmm2 = xmm0[1],xmm2[1],zero,zero
movaps %xmm5, %xmm10
insertps $0xcc, %xmm5, %xmm9     # xmm9 = xmm5[3],xmm9[1],zero,zero
subps %xmm5, %xmm4
insertps $0x10, %xmm3, %xmm10    # xmm10 = xmm10[0],xmm3[0],xmm10[2,3]
mulps %xmm8, %xmm9
movsd 0x10(%rsp), %xmm8
mulps %xmm6, %xmm10
movaps %xmm7, %xmm6
insertps $0x50, %xmm8, %xmm7     # xmm7 = xmm7[0],xmm8[1],xmm7[2,3]
mulps %xmm1, %xmm8
shufps $0xe1, %xmm7, %xmm7     # xmm7 = xmm7[1,0,2,3]
shufps $0x4b, %xmm6, %xmm6     # xmm6 = xmm6[3,2,0,1]
mulps %xmm7, %xmm2
movss 0x3655(%rip), %xmm7     # 0xe008
subps %xmm0, %xmm6
addps %xmm10, %xmm9
movshdup %xmm8, %xmm0            # xmm0 = xmm8[1,1,3,3]
subss %xmm0, %xmm3
addps %xmm2, %xmm9
movshdup %xmm9, %xmm2            # xmm2 = xmm9[1,1,3,3]
subss %xmm9, %xmm2
divss %xmm2, %xmm7
movaps %xmm7, %xmm1
mulss %xmm7, %xmm3
shufps $0x0, %xmm7, %xmm1      # xmm1 = xmm1[0,0],xmm7[0,0]
mulps %xmm1, %xmm4
mulps %xmm1, %xmm6
shufps $0xb1, %xmm4, %xmm4     # xmm4 = xmm4[1,0,3,2]
movups %xmm6, (%rdi)
movups %xmm4, 0x10(%rdi)
movss %xmm3, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2952(%rip), %xmm1     # 0xe008
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
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/Matrix.c
// Function: mat4x4transformvec3
vec3_t mat4x4transformvec3(mat4x4_t m,vec3_t v)
{
	float w=v.x*m.m[3]+v.y*m.m[7]+v.z*m.m[11]+m.m[15];
	return vec3(
	(v.x*m.m[0]+v.y*m.m[4]+v.z*m.m[8]+m.m[12])/w,
	(v.x*m.m[1]+v.y*m.m[5]+v.z*m.m[9]+m.m[13])/w,
	(v.x*m.m[2]+v.y*m.m[6]+v.z*m.m[10]+m.m[14])/w);
}

// Assembly:
movsldup %xmm0, %xmm2            # xmm2 = xmm0[0,0,2,2]
movsd 0x10(%rsp), %xmm4
movsldup %xmm1, %xmm3            # xmm3 = xmm1[0,0,2,2]
movsd 0x30(%rsp), %xmm6
movsd 0x20(%rsp), %xmm5
movshdup %xmm0, %xmm0            # xmm0 = xmm0[1,1,3,3]
movsd 0x40(%rsp), %xmm1
movsd 0x18(%rsp), %xmm7
mulps %xmm3, %xmm6
mulps %xmm2, %xmm4
mulps %xmm0, %xmm5
mulps %xmm0, %xmm7
movaps 0x2f86(%rip), %xmm0     # 0xe6a0
addps %xmm6, %xmm1
addps %xmm4, %xmm5
movsd 0x8(%rsp), %xmm6
mulps %xmm2, %xmm6
movsd 0x28(%rsp), %xmm2
mulps %xmm3, %xmm2
movsd 0x38(%rsp), %xmm3
addps %xmm5, %xmm1
addps %xmm6, %xmm7
addps %xmm2, %xmm3
movshdup %xmm1, %xmm4            # xmm4 = xmm1[1,1,3,3]
rcpps %xmm4, %xmm5
divss %xmm4, %xmm1
addps %xmm7, %xmm3
mulps %xmm5, %xmm4
subps %xmm4, %xmm0
mulps %xmm5, %xmm0
addps %xmm5, %xmm0
mulps %xmm3, %xmm0
retq
nop
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat3x3rotate
dmat3x3_t dmat3x3rotate(double angle,dvec3_t axis)
{
	double sine=sin(angle);
	double cosine=cos(angle);
	double one_minus_cosine=1-cosine;

	axis=dvec3norm(axis);

	return dmat3x3(
	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 -0x10(%rsp), %rsp
movq %rsp, %r15
leaq 0x8(%rsp), %r14
movq %rdi, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x10e0
movapd 0x30(%rsp), %xmm2
movsd 0x40(%rsp), %xmm4
movsd 0x28bc(%rip), %xmm6     # 0xe050
xorl %eax, %eax
movapd %xmm2, %xmm0
movapd %xmm4, %xmm1
mulpd %xmm2, %xmm0
mulsd %xmm4, %xmm1
haddpd %xmm0, %xmm0
addsd %xmm1, %xmm0
movapd %xmm6, %xmm1
sqrtsd %xmm0, %xmm3
xorpd %xmm0, %xmm0
divsd %xmm3, %xmm6
ucomisd %xmm0, %xmm3
sete %al
movd %eax, %xmm3
pshufd $0x44, %xmm3, %xmm5     # xmm5 = xmm3[0,1,0,1]
pxor %xmm3, %xmm3
psllq $0x3f, %xmm5
pcmpgtq %xmm5, %xmm3
movsd (%r14), %xmm5
movddup %xmm6, %xmm7            # xmm7 = xmm6[0,0]
mulpd %xmm2, %xmm7
movsd (%r15), %xmm2
subsd %xmm2, %xmm1
pandn %xmm7, %xmm3
je 0xb800
mulsd %xmm6, %xmm4
movapd %xmm4, %xmm0
movdqa %xmm3, %xmm6
movapd %xmm0, %xmm8
pshufd $0xee, %xmm3, %xmm7     # xmm7 = xmm3[2,3,2,3]
movq %rbx, %rax
mulsd %xmm1, %xmm6
movdqa %xmm7, %xmm9
mulsd %xmm5, %xmm8
mulsd %xmm1, %xmm9
movddup %xmm6, %xmm4            # xmm4 = xmm6[0,0]
movddup %xmm8, %xmm11           # xmm11 = xmm8[0,0]
mulsd %xmm0, %xmm6
mulpd %xmm3, %xmm4
mulsd %xmm5, %xmm3
movapd %xmm4, %xmm10
movapd %xmm4, %xmm12
subpd %xmm11, %xmm4
movdqa %xmm7, %xmm11
mulsd %xmm9, %xmm7
mulsd %xmm0, %xmm9
mulsd %xmm0, %xmm0
mulsd %xmm5, %xmm11
addpd %xmm2, %xmm12
unpckhpd %xmm10, %xmm10          # xmm10 = xmm10[1,1]
movapd %xmm6, %xmm5
addsd %xmm8, %xmm10
mulsd %xmm1, %xmm0
movapd %xmm9, %xmm1
addsd %xmm2, %xmm7
subsd %xmm3, %xmm9
subsd %xmm11, %xmm5
addsd %xmm6, %xmm11
addsd %xmm3, %xmm1
movsd %xmm12, %xmm4           # xmm4 = xmm12[0],xmm4[1]
movupd %xmm4, (%rbx)
addsd %xmm2, %xmm0
movsd %xmm11, 0x10(%rbx)
movsd %xmm10, 0x18(%rbx)
movsd %xmm7, 0x20(%rbx)
movsd %xmm9, 0x28(%rbx)
movsd %xmm5, 0x30(%rbx)
movsd %xmm1, 0x38(%rbx)
movsd %xmm0, 0x40(%rbx)
leaq 0x10(%rsp), %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat4x4mul
dmat4x4_t dmat4x4mul(dmat4x4_t a,dmat4x4_t b)
{
        dmat4x4_t res;
        for(int i=0;i<16;i++)
        {
                int row=i&3,column=i&12;
                double 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 0x88(%rsp), %rcx
leaq 0x8(%rsp), %rdx
xorl %esi, %esi
movl %esi, %edi
movq %rsi, %r8
xorpd %xmm0, %xmm0
movq $-0x20, %r9
andl $0x3, %edi
andq $-0x4, %r8
leaq (%rdx,%rdi,8), %rdi
leaq (%rcx,%r8,8), %r8
movsd 0x20(%r8,%r9), %xmm1
mulsd 0x80(%rdi,%r9,4), %xmm1
addq $0x8, %r9
addsd %xmm1, %xmm0
jne 0xbd0e
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
cmpq $0x10, %rsi
jne 0xbcef
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat3x3affinemul
dmat3x3_t dmat3x3affinemul(dmat3x3_t a,dmat3x3_t b)
{
	return dmat3x3(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:
movupd 0x20(%rsp), %xmm3
movddup 0x88(%rsp), %xmm6       # xmm6 = mem[0,0]
movapd 0x8(%rsp), %xmm1
movddup 0x80(%rsp), %xmm5       # xmm5 = mem[0,0]
movddup 0x50(%rsp), %xmm2       # xmm2 = mem[0,0]
movddup 0x68(%rsp), %xmm4       # xmm4 = mem[0,0]
movddup 0x58(%rsp), %xmm0       # xmm0 = mem[0,0]
xorl %ecx, %ecx
movq %rdi, %rax
mulpd %xmm1, %xmm5
mulpd %xmm1, %xmm2
mulpd %xmm1, %xmm4
movddup 0x70(%rsp), %xmm1       # xmm1 = mem[0,0]
mulpd %xmm3, %xmm6
mulpd %xmm3, %xmm0
mulpd %xmm3, %xmm1
addpd %xmm5, %xmm6
addpd %xmm2, %xmm0
addpd %xmm4, %xmm1
addpd 0x38(%rsp), %xmm6
movupd %xmm0, (%rdi)
movq %rcx, 0x10(%rdi)
movupd %xmm1, 0x18(%rdi)
movq %rcx, 0x28(%rdi)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movupd %xmm6, 0x30(%rdi)
movq %rcx, 0x40(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.h
// Function: dmat3x3inverse
static inline double dmat3x3det(dmat3x3_t m)
{
	return dmat3x3_11(m)*dmat3x3_22(m)*dmat3x3_33(m)
	      -dmat3x3_11(m)*dmat3x3_32(m)*dmat3x3_23(m)
	      +dmat3x3_21(m)*dmat3x3_32(m)*dmat3x3_13(m)
	      -dmat3x3_21(m)*dmat3x3_12(m)*dmat3x3_33(m)
	      +dmat3x3_31(m)*dmat3x3_12(m)*dmat3x3_23(m)
	      -dmat3x3_31(m)*dmat3x3_22(m)*dmat3x3_13(m);
}

// Assembly:
movupd 0x40(%rsp), %xmm7
movupd 0x30(%rsp), %xmm10
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm4
movsd 0x18(%rsp), %xmm8
movsd 0x28(%rsp), %xmm6
movapd 0x18(%rsp), %xmm5
movsd 0x38(%rsp), %xmm11
movq %rdi, %rax
movapd %xmm2, %xmm0
movapd %xmm4, %xmm12
movapd %xmm6, %xmm1
movapd %xmm6, %xmm13
movapd %xmm5, %xmm14
movapd %xmm5, %xmm15
unpcklpd %xmm8, %xmm12           # xmm12 = xmm12[0],xmm8[0]
mulsd %xmm4, %xmm1
unpcklpd %xmm4, %xmm13           # xmm13 = xmm13[0],xmm4[0]
movapd %xmm7, %xmm3
movapd %xmm7, %xmm9
unpcklpd %xmm10, %xmm0           # xmm0 = xmm0[0],xmm10[0]
mulpd %xmm10, %xmm12
unpcklpd %xmm7, %xmm11           # xmm11 = xmm11[0],xmm7[0]
unpckhpd %xmm10, %xmm14          # xmm14 = xmm14[1],xmm10[1]
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
movsd %xmm10, %xmm9           # xmm9 = xmm10[0],xmm9[1]
mulpd %xmm10, %xmm0
mulpd %xmm13, %xmm11
mulsd 0x20(%rsp), %xmm2
mulpd %xmm3, %xmm9
mulpd %xmm14, %xmm3
movapd %xmm12, %xmm13
unpcklpd %xmm1, %xmm12           # xmm12 = xmm12[0],xmm1[0]
subsd %xmm2, %xmm1
shufpd $0x1, %xmm0, %xmm15     # xmm15 = xmm15[1],xmm0[0]
mulpd %xmm7, %xmm12
movapd %xmm11, %xmm14
shufpd $0x1, %xmm13, %xmm13    # xmm13 = xmm13[1,0]
movhlps %xmm9, %xmm10           # xmm10 = xmm9[1],xmm10[1]
unpcklpd %xmm3, %xmm14           # xmm14 = xmm14[0],xmm3[0]
subpd %xmm11, %xmm3
mulpd %xmm15, %xmm10
movddup %xmm8, %xmm15           # xmm15 = xmm8[0,0]
mulpd %xmm15, %xmm14
addpd %xmm10, %xmm12
movsd 0x1b2e(%rip), %xmm10    # 0xe050
addpd %xmm12, %xmm14
movapd %xmm14, %xmm12
unpckhpd %xmm14, %xmm12          # xmm12 = xmm12[1],xmm14[1]
subsd %xmm14, %xmm12
movapd %xmm7, %xmm14
movsd %xmm6, %xmm14           # xmm14 = xmm6[0],xmm14[1]
unpcklpd %xmm7, %xmm6            # xmm6 = xmm6[0],xmm7[0]
shufpd $0x1, %xmm8, %xmm7      # xmm7 = xmm7[1],xmm8[0]
mulpd %xmm5, %xmm14
divsd %xmm12, %xmm10
movsd 0x48(%rsp), %xmm12
unpcklpd %xmm5, %xmm12           # xmm12 = xmm12[0],xmm5[0]
movsd %xmm4, %xmm5            # xmm5 = xmm4[0],xmm5[1]
mulpd %xmm6, %xmm12
mulpd %xmm7, %xmm5
subpd %xmm14, %xmm0
subpd %xmm9, %xmm12
subpd %xmm13, %xmm5
movddup %xmm10, %xmm2           # xmm2 = xmm10[0,0]
mulsd %xmm10, %xmm1
mulpd %xmm2, %xmm12
mulpd %xmm2, %xmm3
mulpd %xmm2, %xmm0
mulpd %xmm2, %xmm5
movupd %xmm12, (%rdi)
movupd %xmm3, 0x30(%rdi)
movupd %xmm0, 0x10(%rdi)
movupd %xmm5, 0x20(%rdi)
movsd %xmm1, 0x40(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat3x3transformvec2
dvec2_t dmat3x3transformvec2(dmat3x3_t m,dvec2_t v)
{
	double z=v.x*m.m[2]+v.y*m.m[5]+m.m[8];
	return dvec2(
	(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:
movddup %xmm0, %xmm2            # xmm2 = xmm0[0,0]
movddup %xmm1, %xmm3            # xmm3 = xmm1[0,0]
mulsd 0x18(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm1
mulpd 0x8(%rsp), %xmm2
addsd %xmm0, %xmm1
movsd 0xcb3(%rip), %xmm0      # 0xe050
addsd 0x48(%rsp), %xmm1
divsd %xmm1, %xmm0
movupd 0x20(%rsp), %xmm1
mulpd %xmm3, %xmm1
addpd %xmm2, %xmm1
addpd 0x38(%rsp), %xmm1
movddup %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
retq
// File: /workspace/github_c_makefile_star2_O3/canboat[P]canboat/socketcan-writer/socketcan-writer.c
// Function: time_diff
unsigned long time_diff(struct timeval x, struct timeval y, char *timestamp)
{
  double x_ms, y_ms, diff;

  x_ms = (double) x.tv_sec * 1000000 + (double) x.tv_usec;
  y_ms = (double) y.tv_sec * 1000000 + (double) y.tv_usec;

  diff = (double) y_ms - (double) x_ms;
  if (diff < 0.0)
  {
    logError("Timestamp back in time at %s\n", timestamp);
    return 0;
  }

  return (unsigned long) diff;
}

// Assembly:
pushq %rbx
cvtsi2sd %rdi, %xmm1
cvtsi2sd %rsi, %xmm0
movsd 0x279a(%rip), %xmm2     # 0x5008
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
cvtsi2sd %rcx, %xmm3
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x28ae
leaq 0x27cc(%rip), %rdi      # 0x506c
xorl %ebx, %ebx
movq %r8, %rsi
xorl %eax, %eax
callq 0x2bb0
jmp 0x28cd
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x274e(%rip), %xmm0     # 0x5010
cvttsd2si %xmm0, %rbx
andq %rcx, %rbx
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_test_fib.c
// Function: producer
int producer(void *ctx)
{
	printf("producer\n"); //DELETEME
	struct spsc_queue *q = (struct spsc_queue *) ctx;
	
	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();
	
		/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();
	
	/* Enqueue */
	for (unsigned long count = 0, n1 = 0, n2 = 1; count < N; count++) {
		fibs[count] = n1 + n2;
		
		void *fibptr = (void *) &fibs[count];
		
		if (!spsc_queue_push(q, fibptr)) {
			printf("Queue push failed at count %lu, %d, free slots %d\n", count, 1<<20, spsc_queue_available(q));
			return -1;
		}
		
		n1 = n2; n2 = fibs[count];
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xe8d(%rip), %rdi       # 0x20a7
callq 0x1040
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %r14
imulq $0x10624dd3, %r14, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
cmpl $0x0, 0x2e46(%rip)      # 0x40a0
jne 0x1263
callq 0x1070
jmp 0x1253
testl %r14d, %r14d
je 0x1272
movslq %r14d, %rax
pause
decq %rax
jne 0x126b
movl $0x1, 0x2e34(%rip)      # 0x40b0
leaq 0x2e2d(%rip), %rax      # 0x40b0
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1783
testl %eax, %eax
je 0x12fa
movl $0x1, %ecx
leaq 0x2e0c(%rip), %r12      # 0x40b4
movq $-0x1, %r14
leaq 0x8(%rsp), %r15
cmpq $0x1312cfe, %r14        # imm = 0x1312CFE
je 0x1324
movl -0x4(%r12), %ebp
addl %ebp, %ecx
movl %ecx, (%r12)
movq %r12, 0x8(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1783
addq $0x4, %r12
incq %r14
movl %ebp, %ecx
testl %eax, %eax
jne 0x12b4
xorl %ebp, %ebp
cmpq $0x1312cff, %r14        # imm = 0x1312CFF
sbbl %ebp, %ebp
incq %r14
jmp 0x1302
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x175f
leaq 0xcf3(%rip), %rdi       # 0x2004
movq %r14, %rsi
movl $0x100000, %edx         # imm = 0x100000
movl %eax, %ecx
xorl %eax, %eax
callq 0x1060
jmp 0x1326
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_test_fib.c
// Function: consumer
int consumer(void *ctx)
{
	printf("consumer\n"); 	//DELETEME
	struct spsc_queue *q = (struct spsc_queue *) ctx;
	
	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();
	
	/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();
	
	/* Dequeue */
	for (unsigned long count = 0, n1 = 0, n2 = 1; count < N; count++) {
		int fib = n1 + n2;
		int *pulled;
		
		while (!spsc_queue_pull(q, (void **) &pulled)) {
			//printf("Queue empty: %d\n", temp);
			//return -1;
		}
		
		if (*pulled != fib) {
			printf("Pulled != fib\n");
			return -1;
		}		
		
		n1 = n2; n2 = fib;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xd63(%rip), %rdi       # 0x20b0
callq 0x1040
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %r14
imulq $0x10624dd3, %r14, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
cmpl $0x0, 0x2d13(%rip)      # 0x40a0
jne 0x1396
callq 0x1070
jmp 0x1386
testl %r14d, %r14d
je 0x13a5
movslq %r14d, %rax
pause
decq %rax
jne 0x139e
movl $0x1, %eax
movb $0x1, %dl
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r14
xorl %r13d, %r13d
movb %dl, 0x7(%rsp)
movq %rbp, %r15
movq %rax, %rbp
addq %rax, %r15
movq %r12, 0x10(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17f1
testl %eax, %eax
je 0x13c8
movq 0x8(%rsp), %rax
cmpl %r15d, (%rax)
jne 0x140c
movslq %r15d, %rax
cmpq $0x1312cff, %r13        # imm = 0x1312CFF
leaq 0x1(%r13), %rcx
setb %dl
movq %rcx, %r13
cmpq $0x1312d00, %rcx        # imm = 0x1312D00
jne 0x13bb
xorl %eax, %eax
jmp 0x1422
leaq 0xca6(%rip), %rdi       # 0x20b9
callq 0x1040
movzbl 0x7(%rsp), %eax
andl $0x1, %eax
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_test_fib.c
// Function: test_single_threaded
int test_single_threaded(struct spsc_queue *q)
{
	int resp, resc;
	g_start = 1;
	resp = producer(q);
	if (resp)
		printf("Enqueuing failed\n");
	
	resc = consumer(q);
	if (resc)
		printf("Consumer failed\n");
	
	if (resc || resp)
		printf("Single Thread Test Failed\n");
	else
		printf("Single Thread Test Complete\n");
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, 0x2c5e(%rip)      # 0x40a0
callq 0x1204
movl %eax, %ebx
testl %eax, %eax
je 0x1459
leaq 0xc73(%rip), %rdi       # 0x20c7
callq 0x1040
movq %r14, %rdi
callq 0x1335
movl %eax, %ebp
testl %eax, %eax
je 0x1473
leaq 0xc6a(%rip), %rdi       # 0x20d8
callq 0x1040
orl %ebx, %ebp
leaq 0xc6c(%rip), %rax       # 0x20e8
leaq 0xc81(%rip), %rdi       # 0x2104
cmoveq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_test_fib.c
// Function: test_multi_threaded
int test_multi_threaded(struct spsc_queue *q)
{
	thrd_t thrp, thrc;
	int resp, resc;
	
	g_start = 0;
	
	thrd_create(&thrp, consumer, q);	/** @todo Why producer thread runs earlier? */
	thrd_create(&thrc, producer, q);
	
	sleep(1);

	uint64_t start_tsc_time, end_tsc_time;

	start_tsc_time = rdtscp();
	g_start = 1;

	thrd_join(thrp, &resp);
	thrd_join(thrc, &resc);
	
	end_tsc_time = rdtscp();

	if (resc || resp)
		printf("Queue Test failed\n");
	else
		printf("Two-thread Test Complete\n");

	printf("cycles/op for rdtsc %lu\n", (end_tsc_time - start_tsc_time)/N);

	size_t used = spsc_queue_available(q);
	if (spsc_queue_available(q) != q->capacity)
		printf("%zu slots in use? There is something wrong with the test\n", used);
	
	int ret = spsc_queue_destroy(q);
	if (ret)
		printf("Failed to destroy queue: %d\n", ret);
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x0, 0x2bf2(%rip)      # 0x40a0
leaq -0x180(%rip), %rdx      # 0x1335
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x10c0
leaq -0x2ca(%rip), %rdx      # 0x1204
leaq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x10c0
movl $0x1, %edi
callq 0x10e0
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %r14
movl $0x1, 0x2ba0(%rip)      # 0x40a0
movq (%r15), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x10d0
movq (%r15), %r13
movq (%r12), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x10d0
orl (%r15), %r13d
leaq 0xc0d(%rip), %rax       # 0x2137
leaq 0xbed(%rip), %rdi       # 0x211e
cmovneq %rax, %rdi
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %r15
callq 0x1040
subq %r14, %r15
movabsq $-0x29406b2a1a85bd43, %rcx # imm = 0xD6BF94D5E57A42BD
movq %r15, %rax
mulq %rcx
shrq $0x18, %rdx
leaq 0xad3(%rip), %rdi       # 0x2037
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x175f
movl %eax, %ebp
movq %rbx, %rdi
callq 0x175f
cltq
cmpq %rax, 0x48(%rbx)
je 0x1599
movslq %ebp, %rsi
leaq 0xabe(%rip), %rdi       # 0x2050
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x163b
testl %eax, %eax
je 0x15b5
leaq 0xade(%rip), %rdi       # 0x208a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stv0g[P]c11-queues/spsc_queue.c
// Function: spsc_queue_init
struct spsc_queue * spsc_queue_init(struct spsc_queue * q, size_t size, const struct memtype *mem)
{
	/* Queue size must be 2 exponent */
	if ((size < 2) || ((size & (size - 1)) != 0))
		return NULL;
	
	q = memory_alloc(mem, sizeof(struct spsc_queue) + (sizeof(q->pointers[0]) * size));
	if (!q)
		return NULL;
	
	q->mem = mem;
	
	q->capacity = size - 1;

	atomic_init(&q->_tail, 0);
	atomic_init(&q->_head, 0);

	return q;
}

// Assembly:
cmpq $0x2, %rsi
jae 0x15f1
xorl %eax, %eax
retq
pushq %r14
pushq %rbx
pushq %rax
leaq -0x1(%rsi), %r14
testq %r14, %rsi
jne 0x1631
movq %rdx, %rbx
leaq 0x98(,%rsi,8), %rsi
movq %rdx, %rdi
callq 0x18ec
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x1633
movq %rbx, 0x40(%rcx)
movq %r14, 0x48(%rcx)
movl %eax, 0x50(%rcx)
movl %eax, 0x94(%rcx)
movq %rcx, %rax
jmp 0x1633
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq