LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Quasi.c
// Function: Configure
void Configure(float* paramsIn, int* paletteIn)
{
    SetDuration(3.0);
    SetAspect(1.0 / 1.0);
    for(int i = 0; i < 256; i++) {
        palette[i] = RGBi(paletteIn[i * 3], paletteIn[i * 3 + 1], paletteIn[i * 3 + 2]);
    }
    
    for(int i = 0; i < 16; i++) {
        params[i] = paramsIn[i];
    }
    printf("Lin %f / Pol %f / OfLin %f / OfPol %f\n", params[0], params[1], params[2], params[3]);
    printf("Pal entry 0: %d %d %d\n", paletteIn[0], paletteIn[1], paletteIn[2]);
    printf("Pal entry 255: %d %d %d\n", paletteIn[768 - 3], paletteIn[768 - 2], paletteIn[768 - 1]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movss 0xc86c(%rip), %xmm0     # 0xe004
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2dc4
movss 0xc85d(%rip), %xmm0     # 0xe008
callq 0x2dbb
movq $-0xc00, %rax           # imm = 0xF400
leaq 0x11982(%rip), %rcx     # 0x13140
movss 0xc846(%rip), %xmm0     # 0xe00c
movl 0xc00(%rbx,%rax), %edx
testl %edx, %edx
js 0x17eb
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
minss %xmm0, %xmm1
cvttss2si %xmm1, %edx
shll $0x8, %edx
orl $0xff, %edx
jmp 0x17f0
movl $0xff, %edx
movl 0xc04(%rbx,%rax), %r8d
xorl %esi, %esi
movl $0x0, %edi
testl %r8d, %r8d
js 0x1817
xorps %xmm1, %xmm1
cvtsi2ss %r8d, %xmm1
minss %xmm0, %xmm1
cvttss2si %xmm1, %edi
shll $0x10, %edi
movl 0xc08(%rbx,%rax), %r8d
testl %r8d, %r8d
js 0x1837
xorps %xmm1, %xmm1
cvtsi2ss %r8d, %xmm1
minss %xmm0, %xmm1
cvttss2si %xmm1, %esi
shll $0x18, %esi
orl %edx, %edi
orl %esi, %edi
movl %edi, (%rcx)
addq $0x4, %rcx
addq $0xc, %rax
jne 0x17c6
xorl %eax, %eax
leaq 0x11cec(%rip), %rcx     # 0x13540
movss (%r14,%rax), %xmm0
movss %xmm0, (%rax,%rcx)
leaq 0x4(%rax), %rax
cmpq $0x40, %rax
jne 0x1854
xorps %xmm0, %xmm0
cvtss2sd 0x11ccc(%rip), %xmm0    # 0x13540
xorps %xmm1, %xmm1
cvtss2sd 0x11cc5(%rip), %xmm1    # 0x13544
cvtss2sd 0x11cc1(%rip), %xmm2    # 0x13548
cvtss2sd 0x11cbd(%rip), %xmm3    # 0x1354c
leaq 0xc7da(%rip), %rdi      # 0xe070
movb $0x4, %al
callq 0x10b0
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movl 0x8(%rbx), %ecx
leaq 0xc7eb(%rip), %rdi      # 0xe097
xorl %eax, %eax
callq 0x10b0
movl 0xbf4(%rbx), %esi
movl 0xbf8(%rbx), %edx
leaq 0xc7e8(%rip), %rdi      # 0xe0ae
movl 0xbfc(%rbx), %ecx
xorl %eax, %eax
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Quasi.c
// Function: PixelLoop
Pixel PixelLoop(float x, float y, float time)
{
    float crystal = quasi(vec2(x, y), time * 2.0f * M_PI);
    int crystal_quant = (int)(crystal*255.0);

    crystal_quant = crystal_quant < 0 ? 0 : crystal_quant;
    crystal_quant = crystal_quant > 255 ? 255 : crystal_quant;

    return(palette[crystal_quant]);
}

// Assembly:
pushq %rax
addss %xmm2, %xmm2
insertps $0x10, %xmm1, %xmm0     # xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
cvtss2sd %xmm2, %xmm2
mulsd 0xc168(%rip), %xmm2     # 0xe058
cvtsd2ss %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x18e8
cvtss2sd %xmm0, %xmm0
xorl %ecx, %ecx
movl $0xff, %edx
mulsd 0xc159(%rip), %xmm0     # 0xe068
cvttsd2si %xmm0, %eax
testl %eax, %eax
cmovgl %eax, %ecx
leaq 0x11221(%rip), %rax     # 0x13140
cmpl %edx, %ecx
cmovgel %edx, %ecx
movl (%rax,%rcx,4), %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/./Engine/Helpers.h
// Function: Render
static inline void RunPixelLoop(Bitmap *screen,float time,PixelLoopFunction *func)
{
	for(int sy=0;sy<screen->height;sy++)
	for(int sx=0;sx<screen->width;sx++)
	{
		float x=ScreenXToPixelLoop(screen,sx);
		float y=ScreenYToPixelLoop(screen,sy);

		DrawPixelNoClip(screen,sx,sy,func(x,y,time));
	}
}

// Assembly:
movzwl 0x2(%rdi), %ecx
testw %cx, %cx
jle 0x2054
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
addss %xmm0, %xmm0
movq %rdi, %rbx
movzwl (%rdi), %eax
movaps 0xc0ce(%rip), %xmm4     # 0xe020
leaq 0x111e7(%rip), %r12     # 0x13140
xorl %r14d, %r14d
movl $0xff, %r15d
cvtss2sd %xmm0, %xmm0
mulsd 0xc0ea(%rip), %xmm0     # 0xe058
cvtsd2ss %xmm0, %xmm1
movss %xmm1, (%rsp)
testw %ax, %ax
jle 0x2036
leal 0x1(%r14,%r14), %edx
movzwl %ax, %ecx
xorl %ebp, %ebp
movl $0x1, %r13d
movl %edx, 0x4(%rsp)
movl %r13d, %edx
movswl 0x2(%rbx), %esi
movss 0xc065(%rip), %xmm3     # 0xe008
subl %ecx, %edx
cmpw %si, %ax
xorps %xmm2, %xmm2
cvtsi2ss %edx, %xmm2
cmovlel %esi, %eax
cwtl
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl 0x4(%rsp), %eax
subl %esi, %eax
divss %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
xorps %xmm4, %xmm0
insertps $0x10, %xmm0, %xmm2     # xmm2 = xmm2[0],xmm0[0],xmm2[2,3]
movsldup %xmm3, %xmm0            # xmm0 = xmm3[0,0,2,2]
mulps %xmm2, %xmm0
callq 0x18e8
cvtss2sd %xmm0, %xmm0
movl $0x0, %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
mulsd 0xc06f(%rip), %xmm0     # 0xe068
cvttsd2si %xmm0, %eax
testl %eax, %eax
cmovlel %ecx, %eax
cmpl %r15d, %eax
cmovgel %r15d, %eax
movl (%r12,%rax,4), %ecx
callq 0x84a7
movzwl (%rbx), %eax
incl %ebp
addl $0x2, %r13d
movaps 0xbffe(%rip), %xmm4     # 0xe020
movss (%rsp), %xmm1
movswl %ax, %ecx
cmpl %ecx, %ebp
jl 0x1f94
movzwl 0x2(%rbx), %ecx
incl %r14d
movswl %cx, %edx
cmpl %edx, %r14d
jl 0x1f77
leaq 0x8(%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/Engine/GIF.c
// Function: WriteGIFHeader
void WriteGIFHeader(FILE *fh,int width,int height,Palette palette,int numcolours,int background)
{
	uint8_t flags=0;

	int palettesize=0;
	if(palette && numcolours>0)
	{
		int exp;
		if(numcolours>128) exp=8;
		else if(numcolours>64) exp=7;
		else if(numcolours>32) exp=6;
		else if(numcolours>16) exp=5;
		else if(numcolours>8) exp=4;
		else if(numcolours>4) exp=3;
		else if(numcolours>2) exp=2;
		else exp=1;

		flags|=0x80|0x70|0x00|(exp-1); // GCT present, 8-bit entries, not sorted, number of entries.
		palettesize=1<<exp;
	}

	uint8_t header[]=
	{
		'G','I','F','8','9','a',
		width&0xff,width>>8,
		height&0xff,height>>8,
		flags,
		background,
		0, // Pixel Aspect Ratio
	};

	Write(fh,header,sizeof(header));
	for(int i=0;i<palettesize;i++)
	{
		uint8_t entry[3]={0,0,0};
		if(i<numcolours)
		{
			entry[0]=ExtractRed(palette[i]);
			entry[1]=ExtractGreen(palette[i]);
			entry[2]=ExtractBlue(palette[i]);
		}
		Write(fh,entry,3);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x28(%rsp), %rsp
testq %rcx, %rcx
movq %rcx, 0x10(%rsp)
movl %r8d, %ebp
movl %esi, %eax
movq %rdi, %r14
movl $0x0, %ebx
sete %cl
testl %r8d, %r8d
setle %r10b
xorl %r8d, %r8d
orb %cl, %r10b
jne 0x2447
cmpl $0x80, %ebp
movl $0x8, %ecx
ja 0x2438
cmpl $0x40, %ebp
movl $0x7, %ecx
ja 0x2438
cmpl $0x20, %ebp
movl $0x6, %ecx
ja 0x2438
cmpl $0x10, %ebp
movl $0x5, %ecx
ja 0x2438
cmpl $0x8, %ebp
movl $0x4, %ecx
ja 0x2438
cmpl $0x4, %ebp
movl $0x3, %ecx
ja 0x2438
cmpl $0x3, %ebp
movl $0x1, %ecx
sbbl $-0x1, %ecx
leal -0x1(%rcx), %r8d
movl $0x1, %ebx
orb $-0x10, %r8b
shll %cl, %ebx
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movl $0x38464947, (%rsi)     # imm = 0x38464947
movw $0x6139, 0x4(%rsi)      # imm = 0x6139
movb %al, 0x6(%rsi)
movb %ah, 0x1f(%rsp)
movb %dl, 0x8(%rsi)
movb %dh, 0x21(%rsp)
movl $0xd, %edx
movb %r8b, 0xa(%rsi)
movb %r9b, 0xb(%rsi)
movb $0x0, 0xc(%rsi)
callq 0x2531
testl %ebx, %ebx
je 0x2521
movslq %ebp, %r12
movl %ebx, %r13d
movl $0xff, %ebp
leaq 0xc(%rsp), %r15
xorl %ebx, %ebx
cmpq %r12, %rbx
movb $0x0, 0xe(%rsp)
movw $0x0, 0xc(%rsp)
jge 0x2505
movq 0x10(%rsp), %rax
movl (%rax,%rbx,4), %edi
movl %edi, %esi
andl $0xff, %esi
je 0x24ff
movl %edi, %ecx
xorl %edx, %edx
shrl $0x8, %ecx
andl %ebp, %ecx
movl %ecx, %eax
shll $0x8, %eax
subl %ecx, %eax
divw %si
movl %edi, %edx
shrl $0x18, %edi
shrl $0x10, %edx
andl %ebp, %edx
movl %edx, %ecx
shll $0x8, %ecx
subl %edx, %ecx
xorl %edx, %edx
movb %al, 0xc(%rsp)
movl %ecx, %eax
movl %edi, %ecx
divw %si
shll $0x8, %ecx
subl %edi, %ecx
xorl %edx, %edx
movb %al, 0xd(%rsp)
movl %ecx, %eax
divw %si
jmp 0x2501
xorl %eax, %eax
movb %al, 0xe(%rsp)
movl $0x3, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2531
incq %rbx
cmpq %rbx, %r13
jne 0x2499
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/Engine/GIF.c
// Function: WriteGIFGraphicControlExtension
void WriteGIFGraphicControlExtension(FILE *fh,int disposal,int delay,int transparent)
{
	int flags=(disposal<<2)|0x00; // Disposal Method, No User Input
	if(transparent>=0) flags|=0x01;

	uint8_t gce[]=
	{
		0x21,0xf9, // Extension Introducer, Graphic Control Label
		0x04, // Block size
		flags,
		delay&0xff,delay>>8,
		transparent>=0?transparent:0, // Transparent Color Index
		0x00, // Block Terminator
	};

	Write(fh,gce,sizeof(gce));
}

// Assembly:
pushq %rax
shll $0x2, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
leaq (%rsp), %rax
testl %ecx, %ecx
movw $0xf921, (%rax)         # imm = 0xF921
movb $0x4, 0x2(%rax)
setns %r9b
cmovnsl %ecx, %r8d
orl %esi, %r9d
movq %rax, %rsi
movb %r9b, 0x3(%rax)
movb %dl, 0x4(%rax)
movb %dh, 0x5(%rsp)
movl $0x8, %edx
movb %r8b, 0x6(%rax)
movb $0x0, 0x7(%rax)
callq 0x2531
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/GIF.c
// Function: WriteGIFApplicationExtension
void WriteGIFApplicationExtension(FILE *fh,char name[8],uint8_t authentication[3],uint8_t *content,int length)
{
	uint8_t appext[]=
	{
		0x21,0xff, // Extension Introducer, Application Label
		0x0b, // Block size
		name[0],name[1],name[2],name[3],name[4],name[5],name[6],name[7],
		authentication[0],authentication[1],authentication[2],
	};

	Write(fh,appext,sizeof(appext));

	while(length)
	{
		int blocklen=length;
		if(blocklen>255) blocklen=255;

		Write(fh,(uint8_t[1]){blocklen},1);
		Write(fh,content,blocklen);

		content+=blocklen;
		length-=blocklen;
	}
	Write(fh,(uint8_t[1]){0x00},1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
leaq 0xa(%rsp), %rax
movq %rcx, %r14
movl %r8d, %ebp
movq %rdi, %rbx
movw $0xff21, (%rax)         # imm = 0xFF21
movb $0xb, 0x2(%rax)
movq (%rsi), %rsi
movq %rsi, 0x3(%rax)
movb (%rdx), %sil
movb %sil, 0xb(%rax)
movb 0x1(%rdx), %sil
movb %sil, 0xc(%rax)
movq %rax, %rsi
movb 0x2(%rdx), %cl
movl $0xe, %edx
movb %cl, 0xd(%rax)
callq 0x2531
testl %ebp, %ebp
je 0x2648
movl $0xff, %r13d
leaq 0x8(%rsp), %r15
cmpl %r13d, %ebp
movl $0xff, %r12d
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
cmovll %ebp, %r12d
movb %r12b, 0x8(%rsp)
callq 0x2531
movslq %r12d, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2531
addq %r12, %r14
subl %r12d, %ebp
jne 0x260d
leaq 0x9(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
movb $0x0, (%rsi)
callq 0x2531
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/Engine/GIF.c
// Function: WriteLZWData
static void WriteLZWData(FILE *fh,uint8_t *pixels,int numpixels,int numbits)
{
	Write(fh,(uint8_t[1]){numbits},1);

	int numliterals=1<<numbits;
	int clearcode=numliterals;
	int endcode=numliterals+1;

	LZWEncoder *lzw=malloc(sizeof(LZWEncoder));
	InitializeLZWEncoder(lzw,numbits+1,12,numliterals,2,clearcode);

	uint8_t buffer[256]={0};

	for(int i=0;i<numpixels;i++)
	{
		EmitLZWByte(lzw,pixels[i]);
		DrainLZWToFile(fh,lzw,buffer,false);
	}

	EmitLZWEndCode(lzw,endcode);
	DrainLZWToFile(fh,lzw,buffer,true);

	free(lzw);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x118(%rsp), %rsp
movl %edx, %r12d
movq %rsi, %r14
movl %ecx, %r13d
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
movq %rdi, %rbx
movb %r13b, (%rsi)
callq 0x2531
movl $0x200028, %edi         # imm = 0x200028
movl $0x1, %ebp
movl %r13d, %ecx
shll %cl, %ebp
callq 0x1150
incl %r13d
movq %rax, %rdi
movl $0xc, %edx
movl %ebp, %ecx
movl $0x2, %r8d
movl %ebp, %r9d
movq %rax, %r15
movl %r13d, %esi
callq 0x29e8
leaq 0x10(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x10d0
testl %r12d, %r12d
jle 0x290a
movl %r12d, %r13d
leaq 0x10(%rsp), %r12
movzbl (%r14), %esi
movq %r15, %rdi
callq 0x2a56
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x2945
leaq 0x1(%r14), %r14
decq %r13
jne 0x28e5
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x2b1f
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0x2945
movq %r15, %rdi
leaq 0x118(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/GIF.c
// Function: DrainLZWToFile
static void DrainLZWToFile(FILE *fh,LZWEncoder *lzw,uint8_t buffer[256],bool flush)
{
	for(;;)
	{
		int byte=NextLZWOutputByte(lzw,flush);
		if(byte<0) break;

		buffer[0]++;
		buffer[buffer[0]]=byte;

		if(buffer[0]==255)
		{
			Write(fh,buffer,256);
			buffer[0]=0;
		}
	}

	if(flush)
	{
		if(buffer[0]!=0) Write(fh,buffer,buffer[0]+1);
		Write(fh,(uint8_t[1]){0x00},1);
		buffer[0]=0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq -0x10(%rsp), %rsp
movq %rdi, %r14
movq %rsi, %r15
movq %rsi, %rdi
movl %ecx, %esi
movl %ecx, %ebp
movq %rdx, %rbx
callq 0x2b4d
testl %eax, %eax
js 0x29a2
movzbl %bpl, %r12d
movb (%rbx), %cl
incb %cl
movzbl %cl, %edx
movb %cl, (%rbx)
movb %al, (%rbx,%rdx)
cmpb $-0x1, (%rbx)
jne 0x2993
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2531
movb $0x0, (%rbx)
movq %r15, %rdi
movl %r12d, %esi
callq 0x2b4d
testl %eax, %eax
jns 0x296f
testb %bpl, %bpl
je 0x29d7
movzbl (%rbx), %edx
testq %rdx, %rdx
je 0x29bd
incq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2531
xorl %ebp, %ebp
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
movq %r14, %rdi
movb %bpl, (%rsi)
callq 0x2531
movb %bpl, (%rbx)
leaq 0x10(%rsp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/LZW.c
// Function: InitializeLZWEncoder
void InitializeLZWEncoder(LZWEncoder *self,int minimumcodelength,
int maximumcodelength,int numliterals,int numreservedcodes,int resetcode)
{
	self->bits=0;
	self->numbits=0;

	self->code=-1;

	self->initialnumcodes=numliterals+numreservedcodes;
	self->initialcodelength=minimumcodelength;
	self->maximumcodelength=maximumcodelength;
	self->resetcode=resetcode;

	ResetLZWEncoder(self);
}

// Assembly:
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addl %r8d, %ecx
movq $0x0, (%rdi)
movq %rax, 0x8(%rdi)
movl %ecx, 0x10(%rdi)
movl %esi, 0x18(%rdi)
movl %edx, 0x20(%rdi)
movl %r9d, 0x24(%rdi)
movl %ecx, 0x14(%rdi)
movl $0x1, %eax
movl %edx, %ecx
movl %esi, 0x1c(%rdi)
addq $0x28, %rdi
xorl %esi, %esi
shll %cl, %eax
movslq %eax, %rdx
shlq $0x9, %rdx
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/LZW.c
// Function: EmitLZWByte
void EmitLZWByte(LZWEncoder *self,uint8_t byte)
{
	if(self->code<0)
	{
		self->code=byte;
		return;
	}

	uint16_t newcode=self->codes[self->code].next[byte];
	if(newcode)
	{
		self->code=newcode;
	}
	else
	{
		EmitLZWCode(self,self->code);
		self->codes[self->code].next[byte]=self->numcodes++;
		self->code=byte;

		if(self->numcodes>(1<<self->codelength))
		{
			if(self->codelength<self->maximumcodelength)
			{
				self->codelength++;
			}
			else
			{
				EmitLZWCode(self,self->resetcode);
				ResetLZWEncoder(self);
			}
		}
	}
}

// Assembly:
movslq 0xc(%rdi), %r9
movq %rdi, %rax
testq %r9, %r9
js 0x2ac6
movq %r9, %rcx
movzbl %sil, %r8d
shlq $0x9, %rcx
leaq 0x28(%rax,%rcx), %rdi
movzwl (%rdi,%r8,2), %ecx
testl %ecx, %ecx
jne 0x2aca
pushq %rbx
movl 0x8(%rax), %edx
movl 0x14(%rax), %r10d
movl $0x1, %r11d
movl %edx, %ecx
leal 0x1(%r10), %ebx
shlq %cl, %r9
orq (%rax), %r9
movq %r9, (%rax)
movl 0x1c(%rax), %esi
movl %esi, %ecx
addl %esi, %edx
shll %cl, %r11d
movl %edx, 0x8(%rax)
movl %ebx, 0x14(%rax)
movw %r10w, (%rdi,%r8,2)
movl %r8d, 0xc(%rax)
cmpl %r11d, %r10d
popq %rbx
jl 0x2ac5
movl 0x20(%rax), %r8d
cmpl %r8d, %esi
jge 0x2ace
incl %esi
movl %esi, 0x1c(%rax)
retq
movzbl %sil, %ecx
movl %ecx, 0xc(%rax)
retq
movslq 0x24(%rax), %r10
movl %edx, %ecx
addl %edx, %esi
movl $0x1, %edx
leaq 0x28(%rax), %rdi
shlq %cl, %r10
movl %r8d, %ecx
shll %cl, %edx
orq %r9, %r10
movslq %edx, %rdx
movq %r10, (%rax)
movl %esi, 0x8(%rax)
xorl %esi, %esi
shlq $0x9, %rdx
movl 0x10(%rax), %r8d
movl 0x18(%rax), %ecx
movl %r8d, 0x14(%rax)
movl %ecx, 0x1c(%rax)
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/LZW.c
// Function: NextLZWOutputByte
int NextLZWOutputByte(LZWEncoder *self,bool flush)
{
	if(self->numbits>=8)
	{
		int output=self->bits&0xff;
		self->bits>>=8;
		self->numbits-=8;
		return output;
	}
	else if(flush && self->numbits>0)
	{
		int output=self->bits&0xff;
		self->bits=0;
		self->numbits=0;
		return output;
	}
	else
	{
		return -1;
	}
}

// Assembly:
movl 0x8(%rdi), %ecx
cmpl $0x8, %ecx
jl 0x2b67
movq (%rdi), %rax
addl $-0x8, %ecx
movq %rax, %rdx
shrq $0x8, %rdx
movq %rdx, (%rdi)
jmp 0x2b86
testl %ecx, %ecx
setle %al
xorb $0x1, %sil
orb %al, %sil
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x2b8c
movq (%rdi), %rax
xorl %ecx, %ecx
movq $0x0, (%rdi)
movzbl %al, %eax
movl %ecx, 0x8(%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Main.c
// Function: ParseIntArgument
static int ParseIntArgument(int argc,const char **argv,int *index)
{
	if(argv[*index][2]!=0)
	{
		return atoi(&argv[*index][2]);
	}
	else
	{
		(*index)++;
		if(*index>=argc) PrintUsageAndExit(argv[0]);
		return atoi(argv[*index]);
	}
}

// Assembly:
movslq (%rdx), %rcx
movq (%rsi,%rcx,8), %rax
cmpb $0x0, 0x2(%rax)
je 0x2dfd
addq $0x2, %rax
movq %rax, %rdi
jmp 0x11c0
leal 0x1(%rcx), %eax
cmpl %edi, %eax
movl %eax, (%rdx)
jge 0x2e10
movq 0x8(%rsi,%rcx,8), %rdi
jmp 0x11c0
pushq %rax
movq (%rsi), %rdi
callq 0x2e19
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Main.c
// Function: PrintUsageAndExit
static void PrintUsageAndExit(const char *name)
{
	fprintf(stderr,"Usage: %s [options] [filename.gif]\n",name);
	fprintf(stderr,"(Filename defaults to \"%s\" if not explicitly specified.)\n",Filename);	
	fprintf(stderr,"Options:\n");
	fprintf(stderr,"  -s size      Size in pixels. (Default: %d)\n",Size);
	fprintf(stderr,"  -f framerate Framerate in frames per second. (Default: %.1f)\n",FPS);
	fprintf(stderr,"  -o factor    Oversampling factor. (Default: %d)\n",Oversampling);
	fprintf(stderr,"  -h           Print this help message.\n");
	exit(1);
}

// Assembly:
pushq %rbx
movq 0x101d7(%rip), %rbx     # 0x12ff8
movq %rdi, %rdx
leaq 0xb393(%rip), %rsi      # 0xe1be
xorl %eax, %eax
movq (%rbx), %rdi
callq 0x1120
movq (%rbx), %rdi
movq 0x10761(%rip), %rdx     # 0x135a0
leaq 0xb39c(%rip), %rsi      # 0xe1e2
xorl %eax, %eax
callq 0x1120
movq (%rbx), %rcx
leaq 0xb3c5(%rip), %rdi      # 0xe21c
movl $0x9, %esi
movl $0x1, %edx
callq 0x11e0
movq (%rbx), %rdi
movl 0x10721(%rip), %edx     # 0x13590
leaq 0xb3b0(%rip), %rsi      # 0xe226
xorl %eax, %eax
callq 0x1120
cvtss2sd 0x1070f(%rip), %xmm0    # 0x13594
movq (%rbx), %rdi
leaq 0xb3c5(%rip), %rsi      # 0xe254
movb $0x1, %al
callq 0x1120
movq (%rbx), %rdi
movl 0x106f9(%rip), %edx     # 0x13598
leaq 0xb3ee(%rip), %rsi      # 0xe294
xorl %eax, %eax
callq 0x1120
movq (%rbx), %rcx
leaq 0xb410(%rip), %rdi      # 0xe2c7
movl $0x28, %esi
movl $0x1, %edx
callq 0x11e0
movl $0x1, %edi
callq 0x11d0
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Neuquant.c
// Function: InitializeNeuquantNetwork
void InitializeNeuquantNetwork(Neuquant *self)
{
	for(int i=0;i<NeuquantNetworkSize;i++)
	{
		self->network[i][0]=self->network[i][1]=self->network[i][2]=(i<<(netbiasshift+8))/NeuquantNetworkSize;
		self->freq[i]=intbias/NeuquantNetworkSize;
		self->bias[i]=0;
	}
}

// Assembly:
movq $-0x400, %rax           # imm = 0xFC00
xorl %ecx, %ecx
movl %ecx, 0x8(%rdi,%rcx)
movl %ecx, 0x4(%rdi,%rcx)
movl %ecx, (%rdi,%rcx)
leaq 0x10(%rcx), %rcx
movl $0x100, 0x1c00(%rdi,%rax) # imm = 0x100
movl $0x0, 0x1800(%rdi,%rax)
addq $0x4, %rax
jne 0x2ed9
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Neuquant.c
// Function: UnbiasNeuquantNetwork
void UnbiasNeuquantNetwork(Neuquant *self)
{
	int i,j,temp;

	for (i=0; i<NeuquantNetworkSize; i++) {
		for (j=0; j<3; j++) {
			/* OLD CODE: network[i][j] >>= netbiasshift; */
			/* Fix based on bug report by Juergen Weigert jw@suse.de */
			temp = (self->network[i][j] + (1 << (netbiasshift - 1))) >> netbiasshift;
			if (temp > 255) temp = 255;
			self->network[i][j] = temp;
		}
		self->network[i][3] = i;			/* record colour no */
	}
}

// Assembly:
xorl %eax, %eax
movl $0xff, %ecx
movq %rdi, %rdx
movq $-0x3, %rsi
movl 0xc(%rdx,%rsi,4), %r8d
addl $0x8, %r8d
sarl $0x4, %r8d
cmpl %ecx, %r8d
cmovgel %ecx, %r8d
movl %r8d, 0xc(%rdx,%rsi,4)
incq %rsi
jne 0x2f16
movq %rax, %rsi
addq $0x10, %rdx
shlq $0x4, %rsi
movl %eax, 0xc(%rdi,%rsi)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x2f0f
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Neuquant.c
// Function: SearchNeuquantIndex
int SearchNeuquantIndex(Neuquant *self,int r,int g,int b)
{
	int i,j,dist,a,bestd;
	int *p;
	int best;

	bestd = 1000;		/* biggest possible dist is 256*3 */
	best = -1;
	i = self->netindex[g];	/* index on g */
	j = i-1;		/* start at netindex[g] and work outwards */

	while ((i<NeuquantNetworkSize) || (j>=0)) {
		if (i<NeuquantNetworkSize) {
			p = self->network[i];
			dist = p[1] - g;		/* inx key */
			if (dist >= bestd) i = NeuquantNetworkSize;	/* stop iter */
			else {
				i++;
				if (dist<0) dist = -dist;
				a = p[0] - b;   if (a<0) a = -a;
				dist += a;
				if (dist<bestd) {
					a = p[2] - r;   if (a<0) a = -a;
					dist += a;
					if (dist<bestd) {bestd=dist; best=p[3];}
				}
			}
		}
		if (j>=0) {
			p = self->network[j];
			dist = g - p[1]; /* inx key - reverse dif */
			if (dist >= bestd) j = -1; /* stop iter */
			else {
				j--;
				if (dist<0) dist = -dist;
				a = p[0] - b;   if (a<0) a = -a;
				dist += a;
				if (dist<bestd) {
					a = p[2] - r;   if (a<0) a = -a;
					dist += a;
					if (dist<bestd) {bestd=dist; best=p[3];}
				}
			}
		}
	}
	return(best);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %edx, %rax
movl $0x3e8, %r10d           # imm = 0x3E8
movl 0x1000(%rdi,%rax,4), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %r8d, %r8d
leal -0x1(%r8), %r9d
setg %r11b
cmpl $0x100, %r8d            # imm = 0x100
setl %bl
testb $0x1, %bl
je 0x32bc
movslq %r8d, %r14
shlq $0x4, %r14
movl 0x4(%rdi,%r14), %ebx
subl %edx, %ebx
cmpl %r10d, %ebx
jge 0x32b6
leaq (%r14,%rdi), %r14
incl %r8d
movl %ebx, %r15d
negl %r15d
movl (%r14), %r12d
cmovsl %ebx, %r15d
subl %ecx, %r12d
movl %r12d, %ebp
negl %ebp
cmovsl %r12d, %ebp
addl %r15d, %ebp
cmpl %r10d, %ebp
jge 0x32bc
movl 0x8(%r14), %r15d
subl %esi, %r15d
movl %r15d, %ebx
negl %ebx
cmovsl %r15d, %ebx
addl %ebp, %ebx
cmpl %r10d, %ebx
jae 0x32bc
movl 0xc(%r14), %eax
jmp 0x32bf
movl $0x100, %r8d            # imm = 0x100
movl %r10d, %ebx
testb $0x1, %r11b
je 0x3325
movl %r9d, %r11d
movl %edx, %r10d
shlq $0x4, %r11
subl 0x4(%rdi,%r11), %r10d
cmpl %ebx, %r10d
jge 0x331f
leaq (%r11,%rdi), %r11
decl %r9d
movl %r10d, %r14d
negl %r14d
movl (%r11), %r15d
cmovsl %r10d, %r14d
subl %ecx, %r15d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
addl %r14d, %ebp
cmpl %ebx, %ebp
jge 0x3325
movl 0x8(%r11), %r14d
subl %esi, %r14d
movl %r14d, %r10d
negl %r10d
cmovsl %r14d, %r10d
addl %ebp, %r10d
cmpl %ebx, %r10d
jae 0x3325
movl 0xc(%r11), %eax
jmp 0x3328
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl %ebx, %r10d
cmpl $0x100, %r8d            # imm = 0x100
setl %bl
testl %r9d, %r9d
setns %r11b
movl %ebx, %ebp
orb %r11b, %bpl
jne 0x3259
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/PNG.h
// Function: PNGInputCallback
static void PNGInputCallback(DeflateReader *reader,void *context)
{
	PNGLoader *self=context;
	const uint8_t *end=self->bytes+self->length;

	const uint8_t *ptr=self->idatstart+self->idatsize+4;
	if(ptr+12>end) return;

	uint32_t size=PNGGetUInt32BE(&ptr[0]);
	uint32_t type=PNGGetUInt32BE(&ptr[4]);

	if(ptr+12+size>end) return;

	if(type==PNGMakeID('I','D','A','T'))
	{
		self->idatstart=ptr+8;
		self->idatsize=size;
		ProvideDeflateInputBuffer(reader,self->idatstart,self->idatsize);
	}
}

// Assembly:
movq (%rsi), %rcx
movq 0x48(%rsi), %rax
movl 0x50(%rsi), %edx
addq 0x8(%rsi), %rcx
leaq 0x10(%rax,%rdx), %r8
cmpq %rcx, %r8
ja 0x44df
leaq (%rax,%rdx), %rax
movbel 0x4(%rax), %edx
addq %rdx, %r8
cmpq %rcx, %r8
ja 0x44df
movbel 0x8(%rax), %ecx
cmpl $0x49444154, %ecx       # imm = 0x49444154
jne 0x44df
leaq 0xc(%rax), %rcx
leaq 0xc(%rax,%rdx), %rax
movq %rcx, 0x48(%rsi)
movl %edx, 0x50(%rsi)
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/BitStreamReader.h
// Function: ReadBitString
static int ReadBitString(BitStreamReader *self,int length)
{
	if(length==0) return 0;

	FillBits(self,length);
	if(self->numbits<length) return -1;

	uint32_t bitstring=self->bits&((1<<length)-1);

	DiscardBits(self,length);

	return bitstring;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4ad0
movl 0x24(%rbx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ebp, %edx
jl 0x450c
movl %ebp, %ecx
movl 0x20(%rbx), %esi
shll %cl, %eax
notl %eax
andl %esi, %eax
shrl %cl, %esi
movl %esi, 0x20(%rbx)
movl %edx, 0x24(%rbx)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/BitStreamReader.h
// Function: ReadHuffmanCode
static int ReadHuffmanCode(BitStreamReader *self,uint16_t *table,int maxlength)
{
	FillBits(self,maxlength);

	int index=self->bits&((1<<maxlength)-1);
	uint16_t entry=table[index];
	int value=ValueOfHuffmanTableEntry(entry);
	int length=LengthOfHuffmanTableEntry(entry);

	if(self->numbits<length) return -1;
	if(length==0) return -2;

	DiscardBits(self,length);

	return value;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edx, %esi
movl %edx, %ebp
movq %rdi, %rbx
callq 0x4ad0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ebp, %ecx
movl 0x20(%rbx), %edx
movl 0x24(%rbx), %edi
shll %cl, %eax
notl %eax
andl %edx, %eax
movzwl (%r14,%rax,2), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %esi, %ecx
shrl $0xc, %ecx
subl %ecx, %edi
jl 0x4acb
cmpw $0x1000, %si            # imm = 0x1000
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jb 0x4acb
andl $0xfff, %esi            # imm = 0xFFF
shrl %cl, %edx
movl %esi, %eax
movl %edx, 0x20(%rbx)
movl %edi, 0x24(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/BitStreamReader.h
// Function: FillBits
static void FillBits(BitStreamReader *self,int required)
{
	while(self->numbits<required)
	{
		if(self->pos>=self->end)
		{
			if(self->callback) self->callback(self,self->context);
			else return;

			if(self->pos>=self->end) return;
		}

		uint32_t b=*self->pos++;

		self->bits|=b<<self->numbits;
		self->numbits+=8;
	}
}

// Assembly:
movl 0x24(%rdi), %ecx
cmpl %esi, %ecx
jge 0x4b31
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %ebp
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rax
cmpq %rax, %rdx
jb 0x4b0d
movq (%rbx), %rax
testq %rax, %rax
je 0x4b2a
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq *%rax
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rax
cmpq %rax, %rdx
jae 0x4b2a
movl 0x24(%rbx), %ecx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rbx)
movzbl (%rdx), %edx
shll %cl, %edx
addl $0x8, %ecx
orl %edx, 0x20(%rbx)
movq %rsi, %rdx
movl %ecx, 0x24(%rbx)
cmpl %ebp, %ecx
jl 0x4ae7
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/BitStreamReader.h
// Function: BuildHuffmanTableFromLengths
static bool BuildHuffmanTableFromLengths(uint16_t *table,int maxlength,int *lengths,int numcodes)
{
	InitializeHuffmanTable(table,maxlength);

	uint32_t code=0;
	for(int len=1;len<=maxlength;len++)
	{
		for(int i=0;i<numcodes;i++)
		{
			if(lengths[i]!=len) continue;

			if(!AddHuffmanCodeToTable(table,maxlength,ReverseBits(code),len,i)) return false;
			code+=1<<(16-len);
		}
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movl %esi, %ebp
movl %ecx, %ebx
movq %rdx, %r14
movl $0x2, %edx
xorl %esi, %esi
movq %rdi, %r15
xorl %r12d, %r12d
movl %ebp, %ecx
shll %cl, %edx
callq 0x10d0
testl %ebp, %ebp
movl %ebp, 0x4(%rsp)
jle 0x4c86
movl %ebx, %edi
movl $0x1, %edx
xorl %eax, %eax
movl %ebx, 0x8(%rsp)
testl %ebx, %ebx
jle 0x4c67
movl 0x4(%rsp), %esi
movq %rax, 0x10(%rsp)
movl %edx, %eax
movl $0x1, %r11d
movl $0x1, %ebx
movl $0x1, %ebp
subl %edx, %esi
shll $0xc, %eax
movl %esi, %ecx
movl %eax, 0xc(%rsp)
shll %cl, %r11d
movb $0x10, %cl
cmpl $0x2, %r11d
cmovgel %r11d, %ebx
subb %dl, %cl
xorl %r8d, %r8d
shll %cl, %ebp
cmpl %edx, (%r14,%r8,4)
jne 0x4c5b
cmpl $0x1f, %esi
je 0x4c58
movl %r12d, %eax
movl $0xf0f, %r9d            # imm = 0xF0F
rolw $0x8, %ax
movl %eax, %ecx
andl %r9d, %eax
shrl $0x4, %ecx
shll $0x4, %eax
andl %r9d, %ecx
movl $0x3333, %r9d           # imm = 0x3333
orl %ecx, %eax
movl %eax, %ecx
shrl $0x2, %eax
andl %r9d, %ecx
andl %r9d, %eax
movl $0x5555, %r9d           # imm = 0x5555
leal (%rax,%rcx,4), %eax
movl %eax, %ecx
andl %r9d, %eax
shrl %ecx
andl %r9d, %ecx
leal (%rcx,%rax,2), %r9d
leal (%r9d), %eax
cmpw $0x0, (%r15,%rax,2)
jne 0x4c7f
movl 0xc(%rsp), %r13d
leaq (%r15,%rax,2), %rcx
movl $0x1, %eax
orl %r8d, %r13d
movl %eax, %r10d
cmpl %eax, %ebx
movw %r13w, (%rcx)
je 0x4c53
movl %r10d, %eax
movl %edx, %ecx
shll %cl, %eax
addl %r9d, %eax
cltq
leaq (%r15,%rax,2), %rcx
leal 0x1(%r10), %eax
cmpw $0x0, (%rcx)
je 0x4c2e
cmpl %r11d, %r10d
jl 0x4c7f
addl %ebp, %r12d
incq %r8
cmpq %rdi, %r8
jne 0x4bb9
cmpl %edx, 0x4(%rsp)
leal 0x1(%rdx), %ecx
movl 0x8(%rsp), %ebx
setle %al
movl %ecx, %edx
jne 0x4b77
jmp 0x4c88
movq 0x10(%rsp), %rax
jmp 0x4c88
movb $0x1, %al
andb $0x1, %al
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Quantize.c
// Function: H
float H(float q) {
    float value;

    if ( q > 0.008856 ) {
        value = pow ( q, 0.333333 );
        return value;
    }
    else {
        value = 7.787*q + 0.137931;
        return value;
    }
}

// Assembly:
cvtss2sd %xmm0, %xmm0
ucomisd 0x9998(%rip), %xmm0     # 0xe640
jbe 0x4cbf
pushq %rax
movsd 0x99a5(%rip), %xmm1     # 0xe658
callq 0x1080
leaq 0x8(%rsp), %rsp
jmp 0x4ccf
mulsd 0x9981(%rip), %xmm0     # 0xe648
addsd 0x9981(%rip), %xmm0     # 0xe650
cvtsd2ss %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Random.c
// Function: SeedRandom64
void SeedRandom64(uint64_t seed)
{
	uint32_t a=seed>>32,b=(uint32_t)seed;

	s1=(a*1664525+1013904223)|0x10;
	s2=(b*1103515245+12345)|0x1000;
	s3=((a^b)*214013+2531011)|0x100000;
}

// Assembly:
movq %rdi, %rax
imull $0x41c64e6d, %edi, %edx # imm = 0x41C64E6D
shrq $0x20, %rax
imull $0x19660d, %eax, %ecx   # imm = 0x19660D
xorl %edi, %eax
imull $0x343fd, %eax, %eax    # imm = 0x343FD
addl $0x3039, %edx           # imm = 0x3039
orl $0x1000, %edx           # imm = 0x1000
addl $0x3c6ef35f, %ecx       # imm = 0x3C6EF35F
movl %edx, 0xdb0c(%rip)      # 0x1310c
addl $0x269ec3, %eax         # imm = 0x269EC3
orl $0x10, %ecx
orl $0x100000, %eax         # imm = 0x100000
movl %ecx, 0xdaf5(%rip)      # 0x13108
movl %eax, 0xdaf7(%rip)      # 0x13110
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Engine/Random.c
// Function: RandomInteger
uint32_t RandomInteger()
{
	s1=((s1&0xfffffffe)<<12)^(((s1<<13)^s1)>>19);
	s2=((s2&0xfffffff8)<<4)^(((s2<<2)^s2)>>25);
	s3=((s3&0xfffffff0)<<17)^(((s3<<3)^s3)>>11);
	return s1^s2^s3;
}

// Assembly:
movl 0xdae8(%rip), %eax      # 0x13108
movl 0xdae6(%rip), %esi      # 0x1310c
movl %eax, %ecx
movl %eax, %edx
shll $0xd, %ecx
andl $-0x2, %edx
xorl %eax, %ecx
leal (,%rsi,4), %eax
shll $0xc, %edx
xorl %esi, %eax
shrl $0x13, %ecx
shll $0x4, %esi
orl %edx, %ecx
shrl $0x19, %eax
movl 0xdac1(%rip), %edx      # 0x13110
andl $-0x80, %esi
movl %ecx, 0xdab0(%rip)      # 0x13108
orl %esi, %eax
leal (,%rdx,8), %esi
xorl %edx, %esi
movl %eax, 0xdaa3(%rip)      # 0x1310c
xorl %ecx, %eax
andl $-0x10, %edx
shrl $0xb, %esi
shll $0x11, %edx
orl %edx, %esi
xorl %esi, %eax
movl %esi, 0xda92(%rip)      # 0x13110
retq
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Graphics/Bitmap.c
// Function: ScrollBitmap
void ScrollBitmap(Bitmap *self,int dx,int dy)
{
	if(dx==0 && dy==0) return;
	if(dx>=self->width || dx<=-self->width) return;
	if(dy>=self->height || dy<=-self->height) return;

	if(dx==0)
	{
		if(dy<=0) memmove(BitmapPixelPointer(self,0,0),BitmapPixelPointer(self,0,-dy),(self->height+dy)*self->bytesperrow);
		else memmove(BitmapPixelPointer(self,0,dy),BitmapPixelPointer(self,0,0),(self->height-dy)*self->bytesperrow);
	}
	else
	{
		if(dy<=0) for(int y=0;y<self->height+dy;y++) ScrollBitmapRow(self,dx,y,y-dy);
		else for(int y=self->height-1;y>=dy;y--) ScrollBitmapRow(self,dx,y,y-dy);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %eax
orl %esi, %eax
je 0x5998
movswl (%rdi), %eax
movl %esi, %ebp
movq %rdi, %r14
cmpl %esi, %eax
setg %cl
negl %eax
cmpl %esi, %eax
setl %al
andb %cl, %al
cmpb $0x1, %al
jne 0x5998
movswl 0x2(%r14), %r15d
movl %edx, %ebx
movl %r15d, %eax
movl %r15d, %ecx
subl %edx, %eax
setg %dl
negl %ecx
cmpl %ebx, %ecx
setl %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x5998
testl %ebp, %ebp
je 0x594c
testl %ebx, %ebx
jle 0x5969
movl %ebx, %r12d
notl %r12d
leal (%r12,%r15), %ecx
decl %r15d
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x59cd
cmpl %ebx, %r15d
jg 0x5931
jmp 0x5998
testl %ebx, %ebx
jle 0x59a1
movl 0x4(%r14), %ecx
movq 0x8(%r14), %rsi
imull %ecx, %ebx
imull %ecx, %eax
movslq %ebx, %rdi
movslq %eax, %rdx
addq %rsi, %rdi
jmp 0x59c0
addl %ebx, %r15d
jle 0x5998
movl %ebx, %r12d
xorl %r15d, %r15d
negl %r12d
leal (%r12,%r15), %ecx
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x59cd
movswl 0x2(%r14), %eax
leal 0x1(%r15), %r15d
addl %ebx, %eax
cmpl %eax, %r15d
jl 0x5977
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%r14), %eax
addl %ebx, %r15d
movq 0x8(%r14), %rdi
movl %eax, %ecx
imull %eax, %r15d
imull %ebx, %ecx
movslq %r15d, %rdx
negl %ecx
movslq %ecx, %rsi
addq %rdi, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11a0
// File: /workspace/github_c_makefile_star2_O3/halcy[P]quasi_crystals_bot/Graphics/Bitmap.c
// Function: FillPartialBitmapRow
static void FillPartialBitmapRow(Bitmap *self,int x,int y,int width,Pixel c)
{
	if(sizeof(Pixel)==4)
	{
		uint32_t *row=(uint32_t *)BitmapPixelPointer(self,x,y);
		for(int x=0;x<width;x++) row[x]=c;
	}
	else if(sizeof(Pixel)==2)
	{
		uint32_t *row;
		if(x&1)
		{
			uint16_t *row16=(uint16_t *)BitmapPixelPointer(self,x,y);
			*row16=c;

			row=(uint32_t *)(row16+1);
			width--;
		}
		else
		{
			row=(uint32_t *)BitmapPixelPointer(self,x,y);
		}

		for(int x=0;x<width/2;x++) row[x]=((uint32_t)c<<16)|c;

		if(width&1)
		{
			uint16_t *alignedrow16=(uint16_t *)row;
			alignedrow16[width-1]=c;
		}
	}
	else if(sizeof(Pixel)==1)
	{
		uint32_t *row=(uint32_t *)BitmapPixelPointer(self,x,y);
		memset(row,c,width);
	}
}

// Assembly:
testl %ecx, %ecx
jle 0x6234
imull 0x4(%rdi), %edx
movq 0x8(%rdi), %rax
movl %ecx, %edi
movslq %esi, %rsi
addl $0x3, %ecx
movdqa 0x818a(%rip), %xmm2     # 0xe310
pmovsxbq 0x8503(%rip), %xmm1     # 0xe692
pmovsxbq 0x84fc(%rip), %xmm3     # 0xe694
pcmpeqd %xmm4, %xmm4
pmovsxbq 0x84f1(%rip), %xmm5     # 0xe696
decq %rdi
andl $-0x4, %ecx
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
pxor %xmm2, %xmm0
movslq %edx, %rdx
leaq (%rdx,%rsi,4), %rdx
leaq 0xc(%rax,%rdx), %rax
movdqa %xmm3, %xmm6
pxor %xmm2, %xmm6
pcmpgtq %xmm0, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x61e1
movl %r8d, -0xc(%rax)
pxor %xmm4, %xmm6
pextrb $0x8, %xmm6, %edx
testb $0x1, %dl
je 0x61f4
movl %r8d, -0x8(%rax)
movdqa %xmm1, %xmm6
pxor %xmm2, %xmm6
pcmpgtq %xmm0, %xmm6
pxor %xmm4, %xmm6
pextrb $0x0, %xmm6, %edx
testb $0x1, %dl
je 0x6214
movl %r8d, -0x4(%rax)
pextrb $0x8, %xmm6, %edx
testb $0x1, %dl
je 0x6222
movl %r8d, (%rax)
addq $0x10, %rax
paddq %xmm5, %xmm3
paddq %xmm5, %xmm1
addq $-0x4, %rcx
jne 0x61c5
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rdx
leal 0xf(,%rax,4), %eax
andl $-0x10, %eax
subq %rax, %rdx
movq %rdx, %rsp
movzwl 0x2(%rdi), %eax
cmpw $0x2, %ax
jl 0x62f5
movq %rdi, %r14
xorl %r13d, %r13d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rdx, -0x38(%rbp)
cwtl
movslq 0x4(%r14), %r15
movq 0x8(%r14), %rbx
movq %rdx, %rdi
movl %esi, -0x2c(%rbp)
addl %esi, %eax
movq %r15, %rdx
imull %r15d, %eax
movslq %eax, %r12
addq %rbx, %r12
movq %r12, %rsi
callq 0x1140
movl %r15d, %eax
movq %r12, %rdi
movq %r15, %rdx
imull %r13d, %eax
movslq %eax, %rsi
addq %rbx, %rsi
callq 0x11a0
movslq 0x4(%r14), %rdx
movslq %r13d, %r13
movq -0x38(%rbp), %rsi
movq %rdx, %rdi
imulq %r13, %rdi
addq 0x8(%r14), %rdi
callq 0x1140
movzwl 0x2(%r14), %eax
movl -0x2c(%rbp), %esi
incl %r13d
movq -0x38(%rbp), %rdx
movl %eax, %ecx
decl %esi
shrl $0xf, %ecx
addl %eax, %ecx
movswl %cx, %ecx
sarl %ecx
cmpl %ecx, %r13d
jl 0x627a
leaq -0x28(%rbp), %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/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
movl %r9d, %ebx
movl %ecx, %r14d
movq %rsi, %r15
movq %rdi, %r12
movl 0x58(%rsp), %ebp
orl %edx, %eax
movl 0x50(%rsp), %eax
jne 0x6552
movswl (%r12), %ecx
cmpl %eax, %ecx
jne 0x6552
movl 0x4(%r15), %ecx
cmpl 0x4(%r12), %ecx
jne 0x6552
imull %ecx, %ebx
imull %ecx, %r14d
imull %ecx, %ebp
movslq %ebx, %rsi
movslq %r14d, %rdi
movslq %ebp, %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
testl %ebp, %ebp
jle 0x65b0
movslq %eax, %r13
movslq %r8d, %rcx
movslq %edx, %rax
shlq $0x2, %r13
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movslq 0x4(%r15), %rax
movslq %ebx, %rbx
movslq 0x4(%r12), %rcx
movslq %r14d, %r14
movq 0x10(%rsp), %rdx
imulq %rbx, %rax
imulq %r14, %rcx
addq 0x8(%r15), %rax
addq 0x8(%r12), %rcx
leaq (%rax,%rdx,4), %rsi
movq 0x8(%rsp), %rax
movq %r13, %rdx
leaq (%rcx,%rax,4), %rdi
callq 0x11a0
incl %r14d
incl %ebx
decl %ebp
jne 0x656d
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/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
cmpl $0x0, 0x78(%rsp)
movq %r9, 0x20(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movl %edx, 0x8(%rsp)
movq %rsi, 0x30(%rsp)
jle 0x6837
movq %rdi, %r13
movq 0x80(%rsp), %r12
movq $0x0, (%rsp)
movq %rdi, 0x28(%rsp)
cmpl $0x0, 0x70(%rsp)
jle 0x6823
movq 0x18(%rsp), %rax
movq (%rsp), %rcx
movl 0x8(%rsp), %r15d
movl 0xc(%rsp), %r14d
movl 0x70(%rsp), %ebp
addl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %ebx
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x8544
movq 0x30(%rsp), %rdi
movl %r14d, %esi
movl 0x10(%rsp), %edx
movq %r12, %r13
movl %eax, %r12d
callq 0x8544
movl %r12d, %edi
movq %r13, %r12
movl %eax, %esi
movq 0x28(%rsp), %r13
callq *%r12
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
movl %eax, %ecx
callq 0x84a7
incl %r14d
incl %r15d
decl %ebp
jne 0x67d2
movq (%rsp), %rax
incl %eax
cmpl 0x78(%rsp), %eax
movq %rax, (%rsp)
jne 0x67a3
leaq 0x38(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x84a6
movswl (%rdi), %eax
cmpl %esi, %eax
jle 0x84a6
movswl 0x2(%rdi), %eax
cmpl %edx, %eax
jle 0x84a6
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_O3/halcy[P]quasi_crystals_bot/Graphics/DrawingPixels.c
// Function: CompositePixel
void CompositePixel(Bitmap *bitmap,int x,int y,Pixel c,CompositionMode comp)
{
	if(x<0) return;
	if(y<0) return;
	if(x>=bitmap->width) return;
	if(y>=bitmap->height) return;
	CompositePixelNoClip(bitmap,x,y,c,comp);
}

// Assembly:
movl %edx, %eax
orl %esi, %eax
js 0x850a
pushq %r15
pushq %r14
pushq %rbx
movswl (%rdi), %eax
movq %rdi, %rbx
cmpl %esi, %eax
jle 0x8505
movswl 0x2(%rbx), %eax
cmpl %edx, %eax
jle 0x8505
movslq 0x4(%rbx), %rax
movslq %edx, %r14
movslq %esi, %r15
movl %ecx, %esi
imulq %r14, %rax
addq 0x8(%rbx), %rax
movl (%rax,%r15,4), %edi
callq *%r8
movslq 0x4(%rbx), %rcx
imulq %r14, %rcx
addq 0x8(%rbx), %rcx
movl %eax, (%rcx,%r15,4)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8586
movswl (%rdi), %ecx
cmpl %esi, %ecx
jle 0x8586
movswl 0x2(%rdi), %ecx
cmpl %edx, %ecx
jle 0x8586
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_O3/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 %r13
pushq %r12
pushq %rbx
leaq -0x38(%rsp), %rsp
movswl (%rdi), %eax
leal (%edx), %r11d
movswl (%rsi), %r13d
movq %rdi, %r14
cmpl %edx, %eax
leal (%r13,%r11), %edx
setle %dil
testl %edx, %edx
setle %r8b
orb %dil, %r8b
jne 0x8c93
movswl 0x2(%r14), %ebx
movswl 0x2(%rsi), %r15d
movl %ebx, %edi
leal (%r15,%rcx), %r8d
subl %ecx, %edi
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x8c93
cmpl %ebx, %r8d
leaq 0x4(%rsi), %rbp
movq $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
cmovgl %edi, %r15d
xorl %r12d, %r12d
movq %rbp, 0x10(%rsp)
movl %r13d, 0x18(%rsp)
testl %ecx, %ecx
movl %r15d, 0x1c(%rsp)
jns 0x8bc9
movl %ecx, %ebx
xorl %edi, %edi
xorl %r12d, %r12d
xorl %r8d, %r8d
xorl %r9d, %r9d
negl %ebx
movl %ebx, 0x1c(%rsp)
addl %r9d, %r8d
leal (%r9d), %r9d
cmpl %r13d, %r8d
leaq 0x4(%rsi,%r9,4), %rsi
jl 0x8b94
incl %r12d
xorl %r8d, %r8d
cmpl %ebx, %r12d
jge 0x8bae
movl %r12d, %edi
movl (%rsi), %r9d
movl %r9d, %r10d
shrl $0x8, %r10d
addl %r10d, %r8d
andl $0xff, %r9d
cmovnel %edi, %r12d
jmp 0x8b75
xorl %edi, %edi
movq %rsi, %rbp
movl %edi, (%rsp)
movl %r12d, 0x4(%rsp)
movq %rsi, 0x10(%rsp)
movl %edi, 0x8(%rsp)
movl %r15d, 0x1c(%rsp)
testl %r11d, %r11d
setns %sil
cmpl %eax, %edx
setle %al
andb %sil, %al
cmpb $0x1, %al
jne 0x8c85
movq %r15, 0x20(%rsp)
xorl %eax, %eax
xorl %r15d, %r15d
movq %rcx, 0x28(%rsp)
addl %eax, %r15d
cmpl %r13d, %r15d
jl 0x8c08
incl %r12d
xorl %r15d, %r15d
cmpl 0x20(%rsp), %r12d
jge 0x8c93
leal (%eax), %eax
movl %r15d, %edx
leaq (%rbp,%rax,4), %rbp
movl (%rbp), %eax
addq $0x4, %rbp
movl %eax, %r15d
movzbl %al, %ebx
movl $0x0, %eax
shrl $0x8, %r15d
addl %edx, %r15d
testq %rbx, %rbx
je 0x8bef
leal (%r12,%rcx), %eax
movslq 0x4(%r14), %rdx
movq %rbp, %rsi
movq %r12, 0x30(%rsp)
movq %r13, %r12
movq %r14, %r13
cltq
imulq %rdx, %rax
leal (%r15,%r11), %edx
movslq %edx, %rdx
addq 0x8(%r14), %rax
movq %r11, %r14
leaq (%rax,%rdx,4), %rdi
leal (,%rbx,4), %edx
callq 0x1140
movq %r14, %r11
movq %r13, %r14
movq %r12, %r13
movq 0x30(%rsp), %r12
movq 0x28(%rsp), %rcx
movl %ebx, %eax
jmp 0x8bef
movq %rsp, %rsi
movq %r14, %rdi
movl %r11d, %edx
callq 0x8ca3
leaq 0x38(%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: 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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movslq %ecx, %r15
movl 0x18(%rbx), %edx
movl (%rbx), %ecx
movl 0x8(%rbx), %edi
movq 0x10(%rbx), %rax
addl %edi, %ecx
movslq %edi, %rsi
cmpl %edx, %ecx
leaq (%rax,%rsi,4), %rax
movl %ecx, (%rbx)
jl 0x8ce5
movl $0x0, (%rbx)
xorl %ecx, %ecx
movl 0x4(%rbx), %esi
incl %esi
movl %esi, 0x4(%rbx)
cmpl 0x1c(%rbx), %esi
jge 0x8d63
movl (%rax), %esi
movl %ecx, %edi
addq $0x4, %rax
movl %esi, %ecx
shrl $0x8, %ecx
addl %edi, %ecx
xorl %edi, %edi
andl $0xff, %esi
movl %ecx, (%rbx)
movl %esi, 0x8(%rbx)
je 0x8cc1
movq %rax, 0x10(%rbx)
leal (%rcx,%rbp), %ecx
movswl (%r14), %edx
leal (%rcx,%rsi), %r8d
movl %edx, %edi
subl %ecx, %edi
cmpl %edx, %r8d
movl %ecx, %r8d
cmovlel %esi, %edi
sarl $0x1f, %r8d
movl %r8d, %edx
andl %ecx, %edx
addl %edi, %edx
jle 0x8cb5
movslq 0x4(%rbx), %rsi
movslq 0x4(%r14), %rdi
movl %edx, %edx
addq %r15, %rsi
shlq $0x2, %rdx
imulq %rsi, %rdi
movslq %ecx, %rsi
negl %ecx
andl %ecx, %r8d
addq 0x8(%r14), %rdi
leaq (%rdi,%rsi,4), %rcx
leaq (%rax,%r8,4), %rsi
leaq (%rcx,%r8,4), %rdi
callq 0x1140
jmp 0x8cb5
movq %rax, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq