LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 %ecx, %r13d
movl %edx, %r12d
movq %rsi, %r14
leaq 0xf(%rsp), %rsi
movq %rdi, %rbx
movb %r13b, (%rsi)
movl $0x1, %edx
callq 0x2158
movl $0x1, %ebp
movl %r13d, %ecx
shll %cl, %ebp
movl $0x200028, %edi         # imm = 0x200028
callq 0x1150
movq %rax, %r15
incl %r13d
movq %rax, %rdi
movl %r13d, %esi
movl $0xc, %edx
movl %ebp, %ecx
movl $0x2, %r8d
movl %ebp, %r9d
callq 0x2640
leaq 0x10(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x10d0
testl %r12d, %r12d
jle 0x2569
movl %r12d, %r13d
leaq 0x10(%rsp), %r12
movzbl (%r14), %esi
movq %r15, %rdi
callq 0x26ae
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x25a4
leaq 0x1(%r14), %r14
decq %r13
jne 0x2544
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x277b
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0x25a4
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_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movzbl %bpl, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x27a9
testl %eax, %eax
js 0x25fa
movl %eax, %r13d
movb (%rbx), %al
incb %al
movzbl %al, %ecx
movb %al, (%rbx)
movb %r13b, (%rbx,%rcx)
cmpb $-0x1, (%rbx)
jne 0x25f5
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2158
movb $0x0, (%rbx)
testl %r13d, %r13d
jns 0x25be
testb %bpl, %bpl
je 0x262f
movzbl (%rbx), %edx
testq %rdx, %rdx
je 0x2615
incq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2158
xorl %ebp, %ebp
leaq 0x7(%rsp), %rsi
movb %bpl, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x2158
movb %bpl, (%rbx)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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:
movq $0x0, (%rdi)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addl %r8d, %ecx
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)
shll %cl, %eax
addq $0x28, %rdi
movslq %eax, %rdx
shlq $0x9, %rdx
xorl %esi, %esi
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O1/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:
movq %rdi, %rax
movslq 0xc(%rdi), %r9
testq %r9, %r9
js 0x2726
movq %r9, %r8
shlq $0x9, %r8
leaq 0x28(%rax,%r8), %rcx
movzbl %sil, %r10d
movzwl (%rcx,%r10,2), %ecx
testl %ecx, %ecx
jne 0x272a
pushq %rbp
pushq %rbx
movl 0x8(%rax), %edx
movl %edx, %ecx
shlq %cl, %r9
orq (%rax), %r9
movl 0x14(%rax), %r11d
movq %r9, (%rax)
movl 0x1c(%rax), %esi
leaq 0x28(%rax), %rdi
addl %esi, %edx
movl %edx, 0x8(%rax)
leal 0x1(%r11), %ebx
movl $0x1, %ebp
movl %esi, %ecx
leaq (%r8,%rdi), %r8
shll %cl, %ebp
movl %ebx, 0x14(%rax)
cmpl %ebp, %r11d
movw %r11w, (%r8,%r10,2)
movl %r10d, 0xc(%rax)
popq %rbx
popq %rbp
jl 0x2725
movl 0x20(%rax), %r8d
cmpl %r8d, %esi
jge 0x272e
incl %esi
movl %esi, 0x1c(%rax)
retq
movzbl %sil, %ecx
movl %ecx, 0xc(%rax)
retq
movslq 0x24(%rax), %r10
movl %edx, %ecx
shlq %cl, %r10
orq %r9, %r10
addl %edx, %esi
movq %r10, (%rax)
movl %esi, 0x8(%rax)
movl $0x1, %edx
movl %r8d, %ecx
movl 0x10(%rax), %r8d
shll %cl, %edx
movl 0x18(%rax), %ecx
movslq %edx, %rdx
shlq $0x9, %rdx
xorl %esi, %esi
movl %r8d, 0x14(%rax)
movl %ecx, 0x1c(%rax)
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O1/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 0x27c3
movq (%rdi), %rax
movq %rax, %rdx
shrq $0x8, %rdx
movq %rdx, (%rdi)
addl $-0x8, %ecx
jmp 0x27e2
testl %ecx, %ecx
setle %al
xorb $0x1, %sil
orb %al, %sil
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x27e8
movq (%rdi), %rax
movq $0x0, (%rdi)
xorl %ecx, %ecx
movzbl %al, %eax
movl %ecx, 0x8(%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x2dd2
addq $0x2, %rax
movq %rax, %rdi
jmp 0x11c0
incl %ecx
cmpl %edi, %ecx
movl %ecx, (%rdx)
jge 0x2de6
movslq (%rdx), %rax
movq (%rsi,%rax,8), %rdi
jmp 0x11c0
pushq %rax
movq (%rsi), %rdi
callq 0x2def
// File: /workspace/github_c_makefile_star2_O1/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 0xf201(%rip), %rbx      # 0x11ff8
movq %rdi, %rdx
movq (%rbx), %rdi
leaq 0xb37a(%rip), %rsi      # 0xe17e
xorl %eax, %eax
callq 0x1120
movq (%rbx), %rdi
movq 0xf78b(%rip), %rdx      # 0x125a0
leaq 0xb386(%rip), %rsi      # 0xe1a2
xorl %eax, %eax
callq 0x1120
movq (%rbx), %rcx
leaq 0xb3af(%rip), %rdi      # 0xe1dc
movl $0x9, %esi
movl $0x1, %edx
callq 0x11e0
movq (%rbx), %rdi
movl 0xf74b(%rip), %edx      # 0x12590
leaq 0xb39a(%rip), %rsi      # 0xe1e6
xorl %eax, %eax
callq 0x1120
cvtss2sd 0xf739(%rip), %xmm0     # 0x12594
movq (%rbx), %rdi
leaq 0xb3af(%rip), %rsi      # 0xe214
movb $0x1, %al
callq 0x1120
movq (%rbx), %rdi
movl 0xf723(%rip), %edx      # 0x12598
leaq 0xb3d8(%rip), %rsi      # 0xe254
xorl %eax, %eax
callq 0x1120
movq (%rbx), %rcx
leaq 0xb3fa(%rip), %rdi      # 0xe287
movl $0x28, %esi
movl $0x1, %edx
callq 0x11e0
movl $0x1, %edi
callq 0x11d0
nop
// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x100, 0x1c00(%rdi,%rax) # imm = 0x100
leaq 0x10(%rcx), %rcx
movl $0x0, 0x1800(%rdi,%rax)
addq $0x4, %rax
jne 0x2eb1
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2eee
movq %rax, %rsi
shlq $0x4, %rsi
movl %eax, 0xc(%rdi,%rsi)
incq %rax
addq $0x10, %rdx
cmpq $0x100, %rax            # imm = 0x100
jne 0x2ee7
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Engine/Neuquant.c
// Function: BuildNeuquantIndex
void BuildNeuquantIndex(Neuquant *self)
{
	int i,j,smallpos,smallval;
	int *p,*q;
	int previouscol,startpos;

	previouscol = 0;
	startpos = 0;
	for (i=0; i<NeuquantNetworkSize; i++) {
		p = self->network[i];
		smallpos = i;
		smallval = p[1];			/* index on g */
		/* find smallest in i..NeuquantNetworkSize-1 */
		for (j=i+1; j<NeuquantNetworkSize; j++) {
			q = self->network[j];
			if (q[1] < smallval) {		/* index on g */
				smallpos = j;
				smallval = q[1];	/* index on g */
			}
		}
		q = self->network[smallpos];
		/* swap p (i) and q (smallpos) entries */
		if (i != smallpos) {
			j = q[0];   q[0] = p[0];   p[0] = j;
			j = q[1];   q[1] = p[1];   p[1] = j;
			j = q[2];   q[2] = p[2];   p[2] = j;
			j = q[3];   q[3] = p[3];   p[3] = j;
		}
		/* smallval entry is now in position i */
		if (smallval != previouscol) {
			self->netindex[previouscol] = (startpos+i)>>1;
			for (j=previouscol+1; j<smallval; j++) self->netindex[j] = i;
			previouscol = smallval;
			startpos = i;
		}
	}
	self->netindex[previouscol] = (startpos+maxnetpos)>>1;
	for (j=previouscol+1; j<256; j++) self->netindex[j] = maxnetpos; /* really 256 */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x14(%rdi), %rax
leaq 0x1000(%rdi), %rcx
xorl %edx, %edx
movq $-0xff, %rsi
xorl %r9d, %r9d
xorl %r8d, %r8d
movq %rdx, %r11
shlq $0x4, %r11
movl 0x4(%rdi,%r11), %ebx
cmpq $0xfe, %rdx
movl %edx, %ebp
movl %ebx, %r10d
ja 0x2fc5
movq %rsi, %r14
movq %rax, %r15
movl %ebx, %r10d
movl %edx, %ebp
movl (%r15), %r12d
leal 0x100(%r14), %r13d
cmpl %r10d, %r12d
cmovll %r13d, %ebp
cmovll %r12d, %r10d
leaq 0x10(%r15), %r15
incq %r14
jne 0x2fa7
movl %ebp, %r14d
cmpq %r14, %rdx
je 0x3018
movslq %ebp, %r14
leaq (%r11,%rdi), %r11
shlq $0x4, %r14
movl (%rdi,%r14), %ebp
movl (%r11), %r15d
movl %r15d, (%rdi,%r14)
movl %ebp, (%r11)
movl 0x4(%rdi,%r14), %ebp
movl %ebx, 0x4(%rdi,%r14)
movl %ebp, 0x4(%r11)
movl 0x8(%rdi,%r14), %ebx
movl 0x8(%r11), %ebp
movl %ebp, 0x8(%rdi,%r14)
movl %ebx, 0x8(%r11)
movl 0xc(%rdi,%r14), %ebx
movl 0xc(%r11), %ebp
movl %ebp, 0xc(%rdi,%r14)
movl %ebx, 0xc(%r11)
cmpl %r8d, %r10d
je 0x3056
addl %edx, %r9d
sarl %r9d
leal 0x1(%r8), %r11d
movslq %r8d, %rbx
cmpl %r10d, %r11d
movl %r9d, 0x1000(%rdi,%rbx,4)
jge 0x3050
movslq %r11d, %r9
notl %r8d
leaq (%rcx,%r9,4), %r9
addl %r10d, %r8d
movl %edx, (%r9)
leaq 0x4(%r9), %r9
decl %r8d
jne 0x3044
movl %r10d, %r8d
movl %edx, %r9d
incq %rdx
addq $0x10, %rax
incq %rsi
cmpq $0x100, %rdx            # imm = 0x100
jne 0x2f82
addl $0xff, %r9d
sarl %r9d
movslq %r8d, %rax
cmpl $0xfe, %eax
movl %r9d, 0x1000(%rdi,%rax,4)
jg 0x309f
addq $-0xff, %rax
movl $0xff, 0x1400(%rdi,%rax,4)
incq %rax
jne 0x308f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1000(%rdi,%rax,4), %r8d
testl %r8d, %r8d
setg %r11b
cmpl $0x100, %r8d            # imm = 0x100
setl %bl
leal -0x1(%r8), %r9d
movl $0x3e8, %r10d           # imm = 0x3E8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x1, %bl
je 0x3140
movslq %r8d, %r14
shlq $0x4, %r14
movl 0x4(%rdi,%r14), %ebx
subl %edx, %ebx
cmpl %r10d, %ebx
jge 0x313a
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 0x3140
movl 0x8(%r14), %r15d
subl %esi, %r15d
movl %r15d, %ebx
negl %ebx
cmovsl %r15d, %ebx
addl %ebp, %ebx
cmpl %r10d, %ebx
jge 0x3140
movl 0xc(%r14), %eax
jmp 0x3143
movl $0x100, %r8d            # imm = 0x100
movl %r10d, %ebx
testb $0x1, %r11b
je 0x31a9
movl %r9d, %r11d
shlq $0x4, %r11
movl %edx, %r10d
subl 0x4(%rdi,%r11), %r10d
cmpl %ebx, %r10d
jge 0x31a3
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 0x31a9
movl 0x8(%r11), %r14d
subl %esi, %r14d
movl %r14d, %r10d
negl %r10d
cmovsl %r14d, %r10d
addl %ebp, %r10d
cmpl %ebx, %r10d
jge 0x31a9
movl 0xc(%r11), %eax
jmp 0x31ac
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 0x30dd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4255
leaq (%rax,%rdx), %rax
movbel 0x4(%rax), %edx
addq %rdx, %r8
cmpq %rcx, %r8
ja 0x4255
movbel 0x8(%rax), %ecx
cmpl $0x49444154, %ecx       # imm = 0x49444154
jne 0x4255
leaq 0xc(%rax), %rcx
movq %rcx, 0x48(%rsi)
movl %edx, 0x50(%rsi)
leaq 0xc(%rax,%rdx), %rax
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x47f9
movl 0x24(%rbx), %edx
subl %ebp, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jl 0x4282
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_O1/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
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
callq 0x47f9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ebp, %ecx
shll %cl, %eax
movl 0x20(%rbx), %edx
notl %eax
andl %edx, %eax
movzwl (%r14,%rax,2), %esi
movl %esi, %ecx
movl 0x24(%rbx), %edi
shrl $0xc, %ecx
subl %ecx, %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jl 0x47f4
cmpw $0x1000, %si            # imm = 0x1000
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jb 0x47f4
shrl %cl, %edx
andl $0xfff, %esi            # imm = 0xFFF
movl %edx, 0x20(%rbx)
movl %edi, 0x24(%rbx)
movl %esi, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl %esi, 0x24(%rdi)
jge 0x4858
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x10(%r14), %rax
cmpq 0x18(%r14), %rax
jb 0x482c
movq (%r14), %rax
testq %rax, %rax
je 0x4850
movq 0x8(%r14), %rsi
movq %r14, %rdi
callq *%rax
movq 0x10(%r14), %rax
cmpq 0x18(%r14), %rax
jae 0x4850
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
movl 0x24(%r14), %ecx
movzbl (%rax), %eax
shll %cl, %eax
orl %eax, 0x20(%r14)
addl $0x8, %ecx
cmpl %ebx, %ecx
movl %ecx, 0x24(%r14)
jl 0x4807
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movl $0x2, %edx
movl %ebp, %ecx
movq %rdi, %r15
shll %cl, %edx
xorl %esi, %esi
xorl %r12d, %r12d
callq 0x10d0
testl %ebp, %ebp
setle %al
jle 0x49be
movl %ebx, %edi
movl $0x1, %edx
movl %ebp, 0x8(%rsp)
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
jle 0x49a0
movb %al, 0x7(%rsp)
movl %ebp, %esi
subl %edx, %esi
movl $0x1, %eax
movl %esi, %ecx
shll %cl, %eax
cmpl $0x1f, %esi
movl %edx, %ecx
sete %bl
shll $0xc, %ecx
movl %ecx, 0x10(%rsp)
cmpl $0x2, %eax
movl $0x1, %ebp
movb $0x10, %cl
movl %eax, 0x14(%rsp)
cmovgel %eax, %ebp
subb %dl, %cl
movl $0x1, %r8d
shll %cl, %r8d
xorl %r9d, %r9d
cmpl %edx, (%r14,%r9,4)
jne 0x4994
cmpl $0x1f, %esi
movl %ebx, %eax
je 0x498d
movl %r12d, %eax
rolw $0x8, %ax
movl %eax, %ecx
shrl $0x4, %ecx
movl $0xf0f, %r10d           # imm = 0xF0F
andl %r10d, %eax
andl %r10d, %ecx
shll $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x2, %eax
movl $0x3333, %r10d          # imm = 0x3333
andl %r10d, %ecx
andl %r10d, %eax
leal (%rax,%rcx,4), %eax
movl %eax, %ecx
shrl %ecx
movl $0x5555, %r10d          # imm = 0x5555
andl %r10d, %ecx
andl %r10d, %eax
leal (%rcx,%rax,2), %r10d
leal (%r10d), %eax
cmpw $0x0, (%r15,%rax,2)
jne 0x49ba
movl 0x10(%rsp), %r13d
orl %r9d, %r13d
leaq (%r15,%rax,2), %rcx
movl $0x1, %r11d
movl %r11d, %eax
cmpl %r11d, %ebp
movw %r13w, (%rcx)
je 0x4986
movl %eax, %r11d
movl %edx, %ecx
shll %cl, %r11d
addl %r10d, %r11d
movslq %r11d, %rcx
leaq (%r15,%rcx,2), %rcx
cmpw $0x0, (%rcx)
leal 0x1(%rax), %r11d
je 0x495e
cmpl 0x14(%rsp), %eax
setge %al
testb %al, %al
je 0x49ba
addl %r8d, %r12d
incq %r9
cmpq %rdi, %r9
jne 0x48e6
movl 0x8(%rsp), %ebp
cmpl %edx, %ebp
leal 0x1(%rdx), %ecx
setle %al
movl %ecx, %edx
movl 0xc(%rsp), %ebx
jne 0x489f
jmp 0x49be
movb 0x7(%rsp), %al
andb $0x1, %al
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9b14(%rip), %xmm0     # 0xe4f0
jbe 0x49f3
pushq %rax
movsd 0x9b21(%rip), %xmm1     # 0xe508
callq 0x1080
leaq 0x8(%rsp), %rsp
jmp 0x4a03
mulsd 0x9afd(%rip), %xmm0     # 0xe4f8
addsd 0x9afd(%rip), %xmm0     # 0xe500
cvtsd2ss %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/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
shrq $0x20, %rax
imull $0x19660d, %eax, %ecx   # imm = 0x19660D
xorl %edi, %eax
imull $0x41c64e6d, %edi, %edx # imm = 0x41C64E6D
imull $0x343fd, %eax, %eax    # imm = 0x343FD
addl $0x3c6ef35f, %ecx       # imm = 0x3C6EF35F
orl $0x10, %ecx
movl %ecx, 0xce35(%rip)      # 0x12108
addl $0x3039, %edx           # imm = 0x3039
addl $0x269ec3, %eax         # imm = 0x269EC3
orl $0x1000, %edx           # imm = 0x1000
orl $0x100000, %eax         # imm = 0x100000
movl %edx, 0xce1d(%rip)      # 0x1210c
movl %eax, 0xce1b(%rip)      # 0x12110
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xce0c(%rip), %eax      # 0x12108
movl %eax, %ecx
shll $0xd, %ecx
xorl %eax, %ecx
movl %eax, %edx
andl $-0x2, %edx
movl 0xcdfe(%rip), %esi      # 0x1210c
shll $0xc, %edx
leal (,%rsi,4), %eax
xorl %esi, %eax
shrl $0x13, %ecx
shll $0x4, %esi
orl %edx, %ecx
andl $-0x80, %esi
shrl $0x19, %eax
movl 0xcde2(%rip), %edx      # 0x12110
orl %esi, %eax
leal (,%rdx,8), %esi
xorl %edx, %esi
movl %eax, 0xcdcd(%rip)      # 0x1210c
andl $-0x10, %edx
shll $0x11, %edx
shrl $0xb, %esi
orl %edx, %esi
xorl %ecx, %eax
xorl %esi, %eax
movl %ecx, 0xcdb4(%rip)      # 0x12108
movl %esi, 0xcdb6(%rip)      # 0x12110
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/Bitmap.c
// Function: InitializeSubBitmap
void InitializeSubBitmap(Bitmap *self,Bitmap *parent,int x,int y,int width,int height)
{
	if(ClipRectangle(&x,&y,&width,&height,parent->width,parent->height))
	{
		InitializeBitmap(self,width,height,parent->bytesperrow,
		BitmapPixelPointer(parent,x,y));
	}
	else
	{
		InitializeBitmap(self,0,0,0,NULL);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movswl (%rsi), %r11d
cmpl %edx, %r11d
leal (%r8,%rdx), %ebx
setle %al
testl %ebx, %ebx
setle %r10b
orb %al, %r10b
movswl 0x2(%rsi), %r10d
movb $0x1, %al
jne 0x5422
cmpl %ecx, %r10d
leal (%r9,%rcx), %eax
setle %bpl
testl %eax, %eax
setle %al
orb %bpl, %al
testb %al, %al
jne 0x546e
xorl %r14d, %r14d
testl %edx, %edx
cmovlel %r14d, %edx
cmovsl %ebx, %r8d
movl %r11d, %ebx
leal (%r8,%rdx), %ebp
subl %edx, %ebx
cmpl %r11d, %ebp
cmovlel %r8d, %ebx
testl %ecx, %ecx
movl $0x0, %r8d
cmovgl %ecx, %r8d
cmovsl %ecx, %r14d
leal (%r14,%r9), %r14d
movl %r10d, %r9d
leal (%r14,%r8), %ecx
subl %r8d, %r9d
cmpl %r10d, %ecx
cmovlel %r14d, %r9d
movl %r8d, %ecx
movl %ebx, %r8d
testb %al, %al
je 0x547a
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
jmp 0x549e
movl 0x4(%rsi), %eax
imull %eax, %ecx
movslq %ecx, %rcx
addq 0x8(%rsi), %rcx
movslq %edx, %rdx
leaq (%rcx,%rdx,4), %rcx
movw %r8w, (%rdi)
movw %r9w, 0x2(%rdi)
movl %eax, 0x4(%rdi)
movq %rcx, 0x8(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x55cc
movl %esi, %ebp
movq %rdi, %r14
movswl (%rdi), %eax
cmpl %esi, %eax
setg %cl
negl %eax
cmpl %esi, %eax
setl %al
andb %cl, %al
cmpb $0x1, %al
jne 0x55cc
movl %edx, %ebx
movswl 0x2(%r14), %r15d
movl %r15d, %eax
subl %edx, %eax
movl %r15d, %ecx
setg %dl
negl %ecx
cmpl %ebx, %ecx
setl %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x55cc
testl %ebp, %ebp
je 0x557a
testl %ebx, %ebx
jle 0x5599
cmpl %ebx, %r15d
jle 0x55cc
movl %ebx, %r12d
notl %r12d
leal (%r12,%r15), %ecx
decl %r15d
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x55fa
cmpl %ebx, %r15d
jg 0x555f
jmp 0x55cc
movl 0x4(%r14), %ecx
movl %ecx, %edx
imull %ebx, %edx
testl %ebx, %ebx
movq 0x8(%r14), %rsi
jle 0x55d5
imull %eax, %ecx
movslq %edx, %rdi
addq %rsi, %rdi
movslq %ecx, %rdx
jmp 0x55ed
movswl 0x2(%r14), %eax
addl %ebx, %eax
jle 0x55cc
movl %ebx, %r12d
negl %r12d
xorl %r15d, %r15d
leal (%r12,%r15), %ecx
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x55fa
movswl 0x2(%r14), %eax
leal 0x1(%r15), %r15d
addl %ebx, %eax
cmpl %eax, %r15d
jl 0x55ab
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl %ebx, %r15d
imull %r15d, %ecx
negl %edx
movslq %edx, %rax
addq %rsi, %rax
movslq %ecx, %rdx
movq %rsi, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11a0
// File: /workspace/github_c_makefile_star2_O1/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
leal 0xf(,%rax,4), %eax
andl $-0x10, %eax
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, %rsp
movswl 0x2(%rdi), %eax
cmpl $0x2, %eax
jl 0x59c2
movq %rdi, %r14
xorl %r13d, %r13d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rdx, -0x38(%rbp)
movl %esi, -0x2c(%rbp)
addl %esi, %eax
movslq 0x4(%r14), %r15
imull %r15d, %eax
movq 0x8(%r14), %rbx
movslq %eax, %r12
addq %rbx, %r12
movq %rdx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1140
movl %r15d, %eax
imull %r13d, %eax
movslq %eax, %rsi
addq %rbx, %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x11a0
movslq 0x4(%r14), %rdx
movslq %r13d, %r13
movq %rdx, %rdi
imulq %r13, %rdi
addq 0x8(%r14), %rdi
movq -0x38(%rbp), %rsi
callq 0x1140
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movswl 0x2(%r14), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
incl %r13d
addl %eax, %ecx
sarl %ecx
decl %esi
cmpl %ecx, %r13d
jl 0x594b
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %r9d, %ebx
movl %ecx, %r12d
movq %rsi, %r14
movl %r8d, %eax
movq %rdi, %r15
orl %edx, %eax
movl 0x58(%rsp), %ebp
movl 0x50(%rsp), %eax
jne 0x5c35
movswl (%r15), %ecx
cmpl %eax, %ecx
jne 0x5c35
movl 0x4(%r14), %esi
movl 0x4(%r15), %ecx
cmpl %ecx, %esi
jne 0x5c35
imull %esi, %ebx
imull %r12d, %ecx
imull %esi, %ebp
movslq %ebx, %rsi
movslq %ecx, %rdi
addq 0x8(%r14), %rsi
addq 0x8(%r15), %rdi
movslq %ebp, %rdx
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11a0
testl %ebp, %ebp
jle 0x5c91
movslq %r8d, %rcx
movq %rcx, 0x10(%rsp)
movslq %eax, %r13
movslq %edx, %rax
movq %rax, 0x8(%rsp)
shlq $0x2, %r13
movslq 0x4(%r14), %rax
movslq %ebx, %rbx
imulq %rbx, %rax
movslq 0x4(%r15), %rcx
movslq %r12d, %r12
imulq %r12, %rcx
addq 0x8(%r14), %rax
addq 0x8(%r15), %rcx
movq 0x10(%rsp), %rdx
leaq (%rax,%rdx,4), %rsi
movq 0x8(%rsp), %rax
leaq (%rcx,%rax,4), %rdi
movq %r13, %rdx
callq 0x11a0
incl %r12d
incl %ebx
decl %ebp
jne 0x5c50
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingBitmaps.c
// Function: CompositePartialBitmapNoClip
void CompositePartialBitmapNoClip(Bitmap *dest,const Bitmap *src,int x,int y,int u,int v,int w,int h,CompositionMode comp)
{
	for(int j=0;j<h;j++)
	for(int i=0;i<w;i++)
	{
		Pixel below=ReadPixelNoClip(dest,x+i,y+j);
		Pixel above=ReadPixelNoClip(src,u+i,v+j);
		DrawPixelNoClip(dest,x+i,y+j,comp(below,above));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x38(%rsp), %rsp
movq %r9, 0x20(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movl %edx, 0x8(%rsp)
cmpl $0x0, 0x78(%rsp)
movq %rsi, 0x30(%rsp)
jle 0x5f2d
movq %rdi, %r13
movq 0x80(%rsp), %r12
movq $0x0, (%rsp)
movq %rdi, 0x28(%rsp)
cmpl $0x0, 0x70(%rsp)
jle 0x5f19
movq 0x18(%rsp), %rax
movq (%rsp), %rcx
addl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x8(%rsp), %r15d
movl 0xc(%rsp), %r14d
movl 0x70(%rsp), %ebp
movq %r13, %rdi
movl %r15d, %esi
movl 0x14(%rsp), %ebx
movl %ebx, %edx
callq 0x7c24
movq %r12, %r13
movl %eax, %r12d
movq 0x30(%rsp), %rdi
movl %r14d, %esi
movl 0x10(%rsp), %edx
callq 0x7c24
movl %r12d, %edi
movq %r13, %r12
movq 0x28(%rsp), %r13
movl %eax, %esi
callq *%r12
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
movl %eax, %ecx
callq 0x7b87
incl %r14d
incl %r15d
decl %ebp
jne 0x5ec8
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
cmpl 0x78(%rsp), %eax
jne 0x5e99
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_O1/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 0x7b86
movswl (%rdi), %eax
cmpl %esi, %eax
jle 0x7b86
movswl 0x2(%rdi), %eax
cmpl %edx, %eax
jle 0x7b86
movslq 0x4(%rdi), %rax
movslq %edx, %rdx
imulq %rax, %rdx
addq 0x8(%rdi), %rdx
movslq %esi, %rax
movl %ecx, (%rdx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7bea
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movswl (%rdi), %eax
cmpl %esi, %eax
jle 0x7be5
movswl 0x2(%rbx), %eax
cmpl %edx, %eax
jle 0x7be5
movslq 0x4(%rbx), %rax
movslq %edx, %r14
imulq %r14, %rax
addq 0x8(%rbx), %rax
movslq %esi, %r15
movl (%rax,%r15,4), %edi
movl %ecx, %esi
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_O1/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 0x7c66
movswl (%rdi), %ecx
cmpl %esi, %ecx
jle 0x7c66
movswl 0x2(%rdi), %ecx
cmpl %edx, %ecx
jle 0x7c66
movslq 0x4(%rdi), %rax
movslq %edx, %rcx
imulq %rax, %rcx
addq 0x8(%rdi), %rcx
movslq %esi, %rax
movl (%rcx,%rax,4), %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 -0x28(%rsp), %rsp
leal (%edx), %r14d
movq %rdi, %rbx
movswl (%rsi), %eax
movswl (%rdi), %ebp
cmpl %edx, %ebp
leal (%rax,%r14), %r13d
setle %dl
testl %r13d, %r13d
setle %dil
orb %dl, %dil
jne 0x8310
leal (%ecx), %r15d
movswl 0x2(%rbx), %edx
movswl 0x2(%rsi), %ecx
movl %edx, %edi
subl %r15d, %edi
leal (%rcx,%r15), %r8d
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x8310
movq $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
cmpl %edx, %r8d
cmovgl %edi, %ecx
testl %r15d, %r15d
movl %eax, 0x20(%rsp)
movl %ecx, 0x24(%rsp)
jns 0x828f
movl %r15d, %eax
leaq 0x8(%rsp), %r12
negl %eax
movl 0x1c(%r12), %ecx
movl %ecx, 0x4(%rsp)
movl %eax, 0x1c(%r12)
movq %r12, %rdi
callq 0x89aa
testb %al, %al
jne 0x827b
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
testl %r14d, %r14d
setns %al
cmpl %ebp, %r13d
setle %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x82fd
leaq 0x8(%rsp), %rdi
callq 0x89aa
testb %al, %al
je 0x8310
movslq %r14d, %r12
movslq %r15d, %r15
leaq 0x8(%rsp), %r14
movslq 0xc(%rsp), %rax
addq %r15, %rax
movslq 0x4(%rbx), %rcx
imulq %rax, %rcx
movslq 0x8(%rsp), %rax
movslq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
leaq (%rax,%r12), %rax
addq 0x8(%rbx), %rcx
leaq (%rcx,%rax,4), %rdi
shlq $0x2, %rdx
callq 0x1140
movq %r14, %rdi
callq 0x89aa
testb %al, %al
jne 0x82bb
jmp 0x8310
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x8320
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x89aa
testb %al, %al
je 0x83ac
movslq %r15d, %r15
movslq %ebp, %r12
movslq (%rbx), %rax
movl 0x8(%rbx), %ecx
movswl (%r14), %edx
leaq (%rax,%r15), %rax
movl %edx, %edi
leal (%rax,%rcx), %esi
subl %eax, %edi
cmpl %edx, %esi
movl %eax, %esi
cmovlel %ecx, %edi
sarl $0x1f, %esi
movl %esi, %ecx
andl %eax, %ecx
addl %edi, %ecx
jle 0x83a0
movslq 0x4(%rbx), %rdx
movslq 0x4(%r14), %rdi
addq %r12, %rdx
imulq %rdi, %rdx
movl %eax, %edi
negl %edi
addq 0x8(%r14), %rdx
andl %edi, %esi
leaq (%rdx,%rax,4), %rax
leaq (%rax,%rsi,4), %rdi
shlq $0x2, %rsi
movl %ecx, %edx
addq 0x10(%rbx), %rsi
shlq $0x2, %rdx
callq 0x1140
movq %rbx, %rdi
callq 0x89aa
testb %al, %al
jne 0x8345
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: CompositeRLEBitmap
void CompositeRLEBitmap(Bitmap *bitmap,const RLEBitmap *src,int x,int y,CompositionMode mode)
{
	if(IsCompletelyOutside(x,y,src->width,src->height,bitmap->width,bitmap->height)) return;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x38(%rsp), %rsp
leal (%edx), %r12d
movq %rdi, %r14
movswl (%rsi), %eax
movswl (%rdi), %ebx
cmpl %edx, %ebx
leal (%rax,%r12), %ebp
setle %dl
testl %ebp, %ebp
setle %dil
orb %dl, %dil
jne 0x84d5
movq %r8, %r15
movswl 0x2(%r14), %edx
movswl 0x2(%rsi), %r11d
movl %edx, %edi
subl %ecx, %edi
leal (%r11,%rcx), %r8d
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x84d5
movq $0x0, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
addq $0x4, %rsi
movq %rsi, 0x28(%rsp)
cmpl %edx, %r8d
cmovgl %edi, %r11d
testl %ecx, %ecx
movl %eax, 0x30(%rsp)
movl %r11d, 0x34(%rsp)
jns 0x84b0
movl %ebx, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movl %ecx, %eax
leaq 0x18(%rsp), %r13
negl %eax
movl 0x1c(%r13), %ebx
movl %eax, 0x1c(%r13)
movq %r13, %rdi
callq 0x89aa
testb %al, %al
jne 0x8497
movl %ebx, 0x34(%rsp)
movq 0x10(%rsp), %rcx
movl 0x8(%rsp), %ebx
testl %r12d, %r12d
setns %al
cmpl %ebx, %ebp
setle %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x84e5
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %r8
callq 0x853e
leaq 0x38(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, 0x10(%rsp)
movq %r12, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x89aa
testb %al, %al
je 0x84d5
movslq 0x20(%rsp), %r12
testq %r12, %r12
jle 0x84ef
movq 0x28(%rsp), %rbx
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r13d
addl 0x10(%rsp), %ebp
addl 0x8(%rsp), %r13d
movl (%rbx), %ecx
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r15, %r8
callq 0x7b9d
incl %r13d
leaq 0x4(%rbx), %rbx
decq %r12
jne 0x851e
jmp 0x84ef
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: CompositeRLEBitmapSpansNoClip
static void CompositeRLEBitmapSpansNoClip(Bitmap *bitmap,RLEBitmapSpanIterator *iterator,int x0,int y0,CompositionMode mode)
{
	while(NextRLEBitmapSpan(iterator))
	{
		int x=RLEBitmapSpanStart(iterator);
		int y=RLEBitmapRow(iterator);
		int length=RLEBitmapSpanLength(iterator);
		const Pixel *pixels=RLEBitmapSpanPixels(iterator);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x18(%rsp), %rsp
movq %r8, %rbx
movl %ecx, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, %rdi
callq 0x89aa
testb %al, %al
je 0x85bf
movq %r14, 0x10(%rsp)
movslq 0x8(%r14), %r14
testq %r14, %r14
jle 0x85ae
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r15
movl 0x4(%rax), %r13d
movl (%rax), %ebp
addl 0xc(%rsp), %r13d
addl 0x8(%rsp), %ebp
movl (%r15), %ecx
movq %r12, %rdi
movl %ebp, %esi
movl %r13d, %edx
movq %rbx, %r8
callq 0x7beb
incl %ebp
leaq 0x4(%r15), %r15
decq %r14
jne 0x8590
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x89aa
testb %al, %al
jne 0x856f
leaq 0x18(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: DrawFilledRLEBitmap
void DrawFilledRLEBitmap(Bitmap *bitmap,const RLEBitmap *src,int x,int y,Pixel c)
{
	if(IsCompletelyOutside(x,y,src->width,src->height,bitmap->width,bitmap->height)) return;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x28(%rsp), %rsp
leal (%edx), %ebx
movq %rdi, %r14
movswl (%rsi), %eax
movswl (%rdi), %r13d
cmpl %edx, %r13d
leal (%rax,%rbx), %ebp
setle %dl
testl %ebp, %ebp
setle %dil
orb %dl, %dil
movl %r8d, (%rsp)
jne 0x872f
leal (%ecx), %r15d
movswl 0x2(%r14), %edx
movswl 0x2(%rsi), %ecx
movl %edx, %edi
subl %r15d, %edi
leal (%rcx,%r15), %r8d
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x872f
movq $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
cmpl %edx, %r8d
cmovgl %edi, %ecx
testl %r15d, %r15d
movl %eax, 0x20(%rsp)
movl %ecx, 0x24(%rsp)
jns 0x86c7
movl %r15d, %eax
leaq 0x8(%rsp), %r12
negl %eax
movl 0x1c(%r12), %ecx
movl %ecx, 0x4(%rsp)
movl %eax, 0x1c(%r12)
movq %r12, %rdi
callq 0x89aa
testb %al, %al
jne 0x86b3
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
testl %ebx, %ebx
setns %al
cmpl %r13d, %ebp
setle %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x86f1
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
movl %r15d, %ecx
movl (%rsp), %r8d
callq 0x873f
jmp 0x872f
leaq 0x8(%rsp), %rdi
callq 0x89aa
testb %al, %al
movl (%rsp), %ebp
je 0x872f
leaq 0x8(%rsp), %r12
movl 0x10(%rsp), %ecx
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
addl %ebx, %esi
addl %r15d, %edx
movq %r14, %rdi
movl %ebp, %r8d
callq 0x8a00
movq %r12, %rdi
callq 0x89aa
testb %al, %al
jne 0x8707
leaq 0x28(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Graphics/DrawingRLEBitmaps.c
// Function: DrawFilledRLEBitmapSpansNoClip
static void DrawFilledRLEBitmapSpansNoClip(Bitmap *bitmap,RLEBitmapSpanIterator *iterator,int x0,int y0,Pixel c)
{
	while(NextRLEBitmapSpan(iterator))
	{
		int x=RLEBitmapSpanStart(iterator);
		int y=RLEBitmapRow(iterator);
		int length=RLEBitmapSpanLength(iterator);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, %rdi
callq 0x89aa
testb %al, %al
je 0x8781
movl 0x8(%r15), %ecx
movl (%r15), %esi
movl 0x4(%r15), %edx
addl %r14d, %esi
addl %ebp, %edx
movq %r12, %rdi
movl %ebx, %r8d
callq 0x58e2
movq %r15, %rdi
jmp 0x8758
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 -0x38(%rsp), %rsp
leal (%edx), %ebx
movq %rdi, %r14
movswl (%rsi), %eax
movswl (%rdi), %r15d
cmpl %edx, %r15d
leal (%rax,%rbx), %ebp
setle %dl
testl %ebp, %ebp
setle %dil
movq %r9, 0x30(%rsp)
orb %dl, %dil
movl %r8d, 0x8(%rsp)
jne 0x88fd
leal (%ecx), %r12d
movswl 0x2(%r14), %edx
movswl 0x2(%rsi), %ecx
movl %edx, %edi
subl %r12d, %edi
leal (%rcx,%r12), %r8d
setle %r9b
testl %r8d, %r8d
setle %r10b
orb %r9b, %r10b
jne 0x88fd
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
addq $0x4, %rsi
movq %rsi, 0x20(%rsp)
cmpl %edx, %r8d
cmovgl %edi, %ecx
testl %r12d, %r12d
movl %eax, 0x28(%rsp)
movl %ecx, 0x2c(%rsp)
jns 0x8886
movl %r12d, %eax
leaq 0x10(%rsp), %r13
negl %eax
movl 0x1c(%r13), %ecx
movl %ecx, 0xc(%rsp)
movl %eax, 0x1c(%r13)
movq %r13, %rdi
callq 0x89aa
testb %al, %al
jne 0x8872
movl 0xc(%rsp), %eax
movl %eax, 0x2c(%rsp)
testl %ebx, %ebx
setns %al
cmpl %r15d, %ebp
setle %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x88b6
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %ebx, %edx
movl %r12d, %ecx
movl 0x8(%rsp), %r8d
movq 0x30(%rsp), %r9
callq 0x890d
jmp 0x88fd
leaq 0x10(%rsp), %rdi
callq 0x89aa
testb %al, %al
movq 0x30(%rsp), %r15
movl 0x8(%rsp), %ebp
je 0x88fd
leaq 0x10(%rsp), %r13
movl 0x18(%rsp), %ecx
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
addl %ebx, %esi
addl %r12d, %edx
movq %r14, %rdi
movl %ebp, %r8d
movq %r15, %r9
callq 0x8ac5
movq %r13, %rdi
callq 0x89aa
testb %al, %al
jne 0x88d2
leaq 0x38(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq