LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/somethingnew2-0[P]CS537-P4/cs537.c
// Function: open_listenfd
int open_listenfd(int port) 
{
    int listenfd, optval=1;
    struct sockaddr_in serveraddr;
  
    /* Create a socket descriptor */
    if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
      fprintf(stderr, "socket failed\n");
      return -1;
    }
 
    /* Eliminates "Address already in use" error from bind. */
    if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, 
                   (const void *)&optval , sizeof(int)) < 0) {
      fprintf(stderr, "setsockopt failed\n");
      return -1;
    }

    /* Listenfd will be an endpoint for all requests to port
       on any IP address for this host */
    bzero((char *) &serveraddr, sizeof(serveraddr));
    serveraddr.sin_family = AF_INET; 
    serveraddr.sin_addr.s_addr = htonl(INADDR_ANY); 
    serveraddr.sin_port = htons((unsigned short)port); 
    if (bind(listenfd, (SA *)&serveraddr, sizeof(serveraddr)) < 0) {
      fprintf(stderr, "bind failed\n");
      return -1;
    }

    /* Make it a listening socket ready to accept connection requests */
    if (listen(listenfd, LISTENQ) < 0) {
      fprintf(stderr, "listen failed\n");
      return -1;
    }
    return listenfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x12a0
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jge 0x243f
movq 0x2bd6(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xdd1(%rip), %rsi       # 0x31fd
movb $0x0, %al
callq 0x1150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2523
movl -0xc(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x10(%rbp), %rcx
movl $0x4, %r8d
callq 0x1040
cmpl $0x0, %eax
jge 0x2484
movq 0x2b91(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xd9b(%rip), %rsi       # 0x320c
movb $0x0, %al
callq 0x1150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2523
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movw $0x2, -0x20(%rbp)
xorl %edi, %edi
callq 0x10e0
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %eax
movzwl %ax, %edi
callq 0x10a0
movw %ax, -0x1e(%rbp)
movl -0xc(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x10, %edx
callq 0x11c0
cmpl $0x0, %eax
jge 0x24ea
movq 0x2b28(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xd45(%rip), %rsi       # 0x321f
movb $0x0, %al
callq 0x1150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2523
movl -0xc(%rbp), %edi
movl $0x400, %esi            # imm = 0x400
callq 0x11a0
cmpl $0x0, %eax
jge 0x251d
movq 0x2af5(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xd1f(%rip), %rsi       # 0x322c
movb $0x0, %al
callq 0x1150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2523
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/somethingnew2-0[P]CS537-P4/cs537.c
// Function: Open_clientfd
int Open_clientfd(char *hostname, int port) 
{
    int rc;

    if ((rc = open_clientfd(hostname, port)) < 0) {
        if (rc == -1)
            unix_error("Open_clientfd Unix error");
        else        
            dns_error("Open_clientfd DNS error");
    }
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2320
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
jge 0x2575
cmpl $-0x1, -0x10(%rbp)
jne 0x2567
leaq 0xcdb(%rip), %rdi       # 0x323b
callq 0x1650
jmp 0x2573
leaq 0xce6(%rip), %rdi       # 0x3254
callq 0x16f0
jmp 0x2575
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss 0x15cdf(%rip), %xmm0    # 0x17008
callq 0x3b10
movss 0x15cce(%rip), %xmm0    # 0x17004
callq 0x3af0
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0x13c8
movq -0x10(%rbp), %rax
imull $0x3, -0x14(%rbp), %ecx
movslq %ecx, %rcx
cvtsi2ssl (%rax,%rcx,4), %xmm0
movss 0x15ca9(%rip), %xmm1    # 0x1700c
divss %xmm1, %xmm0
movq -0x10(%rbp), %rax
imull $0x3, -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
cvtsi2ssl (%rax,%rcx,4), %xmm1
movss 0x15c8a(%rip), %xmm2    # 0x1700c
divss %xmm2, %xmm1
movq -0x10(%rbp), %rax
imull $0x3, -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
cvtsi2ssl (%rax,%rcx,4), %xmm2
movss 0x15c6b(%rip), %xmm3    # 0x1700c
divss %xmm3, %xmm2
callq 0x1490
movl %eax, %edx
movslq -0x14(%rbp), %rcx
leaq 0x1bd99(%rip), %rax     # 0x1d150
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1342
movl $0x0, -0x18(%rbp)
cmpl $0x10, -0x18(%rbp)
jge 0x13fd
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movslq -0x18(%rbp), %rcx
leaq 0x1c163(%rip), %rax     # 0x1d550
movss %xmm0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x13cf
movss 0x1c14b(%rip), %xmm0    # 0x1d550
cvtss2sd %xmm0, %xmm0
movss 0x1c143(%rip), %xmm1    # 0x1d554
cvtss2sd %xmm1, %xmm1
movss 0x1c13b(%rip), %xmm2    # 0x1d558
cvtss2sd %xmm2, %xmm2
movss 0x1c133(%rip), %xmm3    # 0x1d55c
cvtss2sd %xmm3, %xmm3
leaq 0x15c24(%rip), %rdi     # 0x17058
movb $0x4, %al
callq 0x10c0
movq -0x10(%rbp), %rax
movl (%rax), %esi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
leaq 0x15c29(%rip), %rdi     # 0x1707f
movb $0x0, %al
callq 0x10c0
movq -0x10(%rbp), %rax
movl 0xbf4(%rax), %esi
movq -0x10(%rbp), %rax
movl 0xbf8(%rax), %edx
movq -0x10(%rbp), %rax
movl 0xbfc(%rax), %ecx
leaq 0x15c14(%rip), %rdi     # 0x17096
movb $0x0, %al
callq 0x10c0
leaq 0x20(%rsp), %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movss %xmm2, -0xc(%rbp)
movss -0x4(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
callq 0x1de0
movlpd %xmm0, -0x18(%rbp)
movss -0xc(%rbp), %xmm0
addss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x152ef(%rip), %xmm1    # 0x17040
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
callq 0x1640
movss %xmm0, -0x10(%rbp)
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x152d7(%rip), %xmm1    # 0x17050
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x1d91
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0x1d97
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0xff, -0x1c(%rbp)
jle 0x1db0
movl $0xff, %eax
movl %eax, -0x24(%rbp)
jmp 0x1db6
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x1b389(%rip), %rax     # 0x1d150
movl (%rax,%rcx,4), %eax
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/./Engine/Helpers.h
// Function: RunPixelLoop
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:
pushq %rbp
movq %rsp, %rbp
leaq -0x40(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1efc
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x1eec
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x1f70
movss %xmm0, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x1fe0
movss %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movss -0x24(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss -0xc(%rbp), %xmm2
callq *%rax
movq -0x38(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %edx
movl %eax, %ecx
callq 0xabc0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1e77
jmp 0x1eee
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1e5d
leaq 0x40(%rsp), %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %eax
shll $0x2, %eax
orl $0x0, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x29f1
movl -0x18(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x18(%rbp)
movb $0x21, -0x20(%rbp)
movb $-0x7, -0x1f(%rbp)
movb $0x4, -0x1e(%rbp)
movl -0x18(%rbp), %eax
movb %al, -0x1d(%rbp)
movl -0x10(%rbp), %eax
andl $0xff, %eax
movb %al, -0x1c(%rbp)
movl -0x10(%rbp), %eax
sarl $0x8, %eax
movb %al, -0x1b(%rbp)
leaq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x2a31
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x2a38
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2a38
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb %cl, (%rax)
movb $0x0, -0x19(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x8, %edx
callq 0x2930
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
leaq -0x40(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movb $0x21, -0x32(%rbp)
movb $-0x1, -0x31(%rbp)
movb $0xb, -0x30(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x2f(%rbp)
movq -0x10(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x2e(%rbp)
movq -0x10(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x2d(%rbp)
movq -0x10(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movb 0x4(%rax), %al
movb %al, -0x2b(%rbp)
movq -0x10(%rbp), %rax
movb 0x5(%rax), %al
movb %al, -0x2a(%rbp)
movq -0x10(%rbp), %rax
movb 0x6(%rax), %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rax
movb 0x7(%rax), %al
movb %al, -0x28(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x27(%rbp)
movq -0x18(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x26(%rbp)
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x25(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x32(%rbp), %rsi
movl $0xe, %edx
callq 0x2930
cmpl $0x0, -0x24(%rbp)
je 0x2b6a
movl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
cmpl $0xff, -0x38(%rbp)
jle 0x2b23
movl $0xff, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %eax
movb %al, -0x39(%rbp)
leaq -0x39(%rbp), %rsi
movl $0x1, %edx
callq 0x2930
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x38(%rbp), %rdx
callq 0x2930
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x38(%rbp), %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
jmp 0x2b07
movq -0x8(%rbp), %rdi
movb $0x0, -0x3a(%rbp)
leaq -0x3a(%rbp), %rsi
movl $0x1, %edx
callq 0x2930
leaq 0x40(%rsp), %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
leaq -0x140(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %eax
movb %al, -0x19(%rbp)
leaq -0x19(%rbp), %rsi
movl $0x1, %edx
callq 0x2930
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl $0x200028, %edi         # imm = 0x200028
callq 0x1160
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x18(%rbp), %esi
addl $0x1, %esi
movl -0x20(%rbp), %ecx
movl -0x24(%rbp), %r9d
movl $0xc, %edx
movl $0x2, %r8d
callq 0x30b0
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x10f0
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2fa4
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x134(%rbp), %rcx
movzbl (%rax,%rcx), %esi
callq 0x3190
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x130(%rbp), %rdx
xorl %ecx, %ecx
callq 0x2fe0
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x2f5a
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x32f0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x130(%rbp), %rdx
movl $0x1, %ecx
callq 0x2fe0
movq -0x30(%rbp), %rdi
callq 0x1030
leaq 0x140(%rsp), %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x3330
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x3018
jmp 0x305f
movq -0x18(%rbp), %rax
movb (%rax), %cl
addb $0x1, %cl
movb %cl, (%rax)
movl -0x20(%rbp), %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
jne 0x305d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x2930
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x2ffc
testb $0x1, -0x19(%rbp)
je 0x30a8
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x308b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x2930
movq -0x8(%rbp), %rdi
movb $0x0, -0x21(%rbp)
leaq -0x21(%rbp), %rsi
movl $0x1, %edx
callq 0x2930
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x8(%rbp), %rdi
callq 0x3130
leaq 0x20(%rsp), %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
leaq -0x10(%rsp), %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x31bd
movzbl -0x9(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x329a
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq -0x8(%rbp), %rcx
movslq 0xc(%rcx), %rcx
shlq $0x9, %rcx
addq %rcx, %rax
movzbl -0x9(%rbp), %ecx
movw (%rax,%rcx,2), %ax
movw %ax, -0xc(%rbp)
cmpw $0x0, -0xc(%rbp)
je 0x31f7
movzwl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x329a
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x32b0
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x14(%rcx)
movw %ax, %dx
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq -0x8(%rbp), %rcx
movslq 0xc(%rcx), %rcx
shlq $0x9, %rcx
addq %rcx, %rax
movzbl -0x9(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movzbl -0x9(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jle 0x3298
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x327d
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
jmp 0x3296
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x32b0
movq -0x8(%rbp), %rdi
callq 0x3130
jmp 0x3298
jmp 0x329a
leaq 0x10(%rsp), %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x8, 0x8(%rax)
jl 0x337d
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0xff, %rax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
shrq $0x8, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
subl $0x8, %ecx
movl %ecx, 0x8(%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33c2
testb $0x1, -0x11(%rbp)
je 0x33bb
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x33bb
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0xff, %rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33c2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/Main.c
// Function: ParseArguments
static void ParseArguments(int argc,const char **argv)
{
	const char *filename=NULL;
	for(int i=1;i<argc;i++)
	{
		if(argv[i][0]=='-')
		{
			switch(argv[i][1])
			{
				case 's':
					Size=ParseIntArgument(argc,argv,&i);
				break;

				case 'f':
					FPS=ParseFloatArgument(argc,argv,&i);
				break;

				case 'o':
					Oversampling=ParseIntArgument(argc,argv,&i);
				break;

				default:
					PrintUsageAndExit(argv[0]);
				break;
			}
		}
		else
		{
			if(!filename) filename=argv[i];
			else PrintUsageAndExit(argv[0]);
		}
	}
	if(filename) Filename=filename;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x37b0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3779
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x20(%rbp)
subl $0x66, %eax
je 0x3739
jmp 0x370d
movl -0x20(%rbp), %eax
subl $0x6f, %eax
je 0x3753
jmp 0x3717
movl -0x20(%rbp), %eax
subl $0x73, %eax
jne 0x376b
jmp 0x3721
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x3c10
movl %eax, 0x19e69(%rip)     # 0x1d5a0
jmp 0x3777
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x3ca0
movss %xmm0, 0x19e53(%rip)    # 0x1d5a4
jmp 0x3777
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x3c10
movl %eax, 0x19e3f(%rip)     # 0x1d5a8
jmp 0x3777
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3d40
jmp 0x37a0
cmpq $0x0, -0x18(%rbp)
jne 0x3792
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x379e
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3d40
jmp 0x37a0
jmp 0x37a2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x36cf
cmpq $0x0, -0x18(%rbp)
je 0x37c2
movq -0x18(%rbp), %rax
movq %rax, 0x19dee(%rip)     # 0x1d5b0
leaq 0x20(%rsp), %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x3c59
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
callq 0x11e0
movl %eax, -0x4(%rbp)
jmp 0x3c92
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jl 0x3c7b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3d40
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x20(%rsp), %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/Main.c
// Function: ParseFloatArgument
static float ParseFloatArgument(int argc,const char **argv,int *index)
{
	if(argv[*index][2]!=0)
	{
		return atof(&argv[*index][2]);
	}
	else
	{
		(*index)++;
		if(*index>=argc) PrintUsageAndExit(argv[0]);
		return atof(argv[*index]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x3cef
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
callq 0x1080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x3d2e
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jl 0x3d11
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3d40
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
leaq 0x20(%rsp), %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
leaq -0x10(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq 0x192a4(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x133fc(%rip), %rsi     # 0x1715e
movb $0x0, %al
callq 0x1130
movq 0x19288(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
movq 0x19836(%rip), %rdx     # 0x1d5b0
leaq 0x13401(%rip), %rsi     # 0x17182
movb $0x0, %al
callq 0x1130
movq 0x19269(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
leaq 0x13423(%rip), %rsi     # 0x171bc
movb $0x0, %al
callq 0x1130
movq 0x19251(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
movl 0x197f0(%rip), %edx     # 0x1d5a0
leaq 0x1340f(%rip), %rsi     # 0x171c6
movb $0x0, %al
callq 0x1130
movq 0x19233(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
movss 0x197d4(%rip), %xmm0    # 0x1d5a4
cvtss2sd %xmm0, %xmm0
leaq 0x13419(%rip), %rsi     # 0x171f4
movb $0x1, %al
callq 0x1130
movq 0x1920f(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
movl 0x197b6(%rip), %edx     # 0x1d5a8
leaq 0x1343b(%rip), %rsi     # 0x17234
movb $0x0, %al
callq 0x1130
movq 0x191f1(%rip), %rax     # 0x1cff8
movq (%rax), %rdi
leaq 0x13456(%rip), %rsi     # 0x17267
movb $0x0, %al
callq 0x1130
movl $0x1, %edi
callq 0x11f0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0x3ebe
movl -0xc(%rbp), %eax
shll $0xc, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %eax, %ecx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl $0x100, 0x1800(%rax,%rcx,4) # imm = 0x100
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl $0x0, 0x1400(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3e3f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0x3f5f
movl $0x0, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jge 0x3f3c
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x8, %eax
sarl $0x4, %eax
movl %eax, -0x14(%rbp)
cmpl $0xff, -0x14(%rbp)
jle 0x3f18
movl $0xff, -0x14(%rbp)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3ee3
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3ecf
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/Neuquant.c
// Function: altersingle
static void altersingle(Neuquant *self,int alpha,int i,int b,int g,int r)
{
	register int *n;

	n = self->network[i];				/* alter hit neuron */
	*n -= (alpha*(*n - b)) / initalpha;
	n++;
	*n -= (alpha*(*n - g)) / initalpha;
	n++;
	*n -= (alpha*(*n - r)) / initalpha;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
subl -0x14(%rbp), %ecx
imull %ecx, %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %eax, %edx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
subl -0x18(%rbp), %ecx
imull %ecx, %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %eax, %edx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
subl -0x1c(%rbp), %ecx
imull %ecx, %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %eax, %edx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/PNG.h
// Function: InitializePNGLoader
static void InitializePNGLoader(PNGLoader *self,const void *bytes,size_t length)
{
	self->bytes=bytes;
	self->length=length;
	self->width=0;
	self->height=0;

	self->bitdepth=0;
	self->colourtype=0;
	self->bytesperrow=0;
	self->bytesperpixel=0;

	self->palettestart=NULL;
	self->palettecount=0;

	self->transparencystart=NULL;
	self->transparencycount=0;

	self->idatstart=NULL;
	self->idatsize=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x50(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/DeflateReader.h
// Function: InitializeDeflateReader
static void InitializeDeflateReader(DeflateReader *self)
{
	InitializeBitStreamReader(&self->bitstream);

	self->pos=0;
	self->isstoredblock=true; // This will trigger a header read.
	self->islastblock=false;
	self->storedbytesleft=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x10(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6270
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x2c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x2d(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
leaq 0x10(%rsp), %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x50(%rcx), %ecx
addq %rcx, %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xc, %rax
cmpq -0x20(%rbp), %rax
jbe 0x60b6
jmp 0x6125
movq -0x28(%rbp), %rdi
callq 0x5670
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
addq $0x4, %rdi
callq 0x5670
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0xc, %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0x60e8
jmp 0x6125
cmpl $0x49444154, -0x30(%rbp) # imm = 0x49444154
jne 0x6125
movq -0x28(%rbp), %rcx
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, %edx
callq 0x6000
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/DeflateReader.h
// Function: CopyBytesFromDeflateWindow
static void CopyBytesFromDeflateWindow(DeflateReader *self,void *destination,uint32_t pos,uint32_t length)
{
	uint32_t start=pos&0x7fff;

	if(start+length>0x8000)
	{
		uint32_t firstlength=0x8000-start;
		memcpy(destination,&self->window[start],firstlength);
		memcpy((uint8_t *)destination+firstlength,&self->window[0],length-firstlength);
	}
	else
	{
		memcpy(destination,&self->window[start],length);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jbe 0x6219
movl $0x8000, %eax           # imm = 0x8000
subl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x34, %rsi
movl -0x1c(%rbp), %eax
addq %rax, %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x1150
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %eax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0x34, %rsi
movl -0x18(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x1150
jmp 0x6235
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x34, %rsi
movl -0x1c(%rbp), %eax
addq %rax, %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
callq 0x1150
leaq 0x20(%rsp), %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/BitStreamReader.h
// Function: InitializeBitStreamReader
static void InitializeBitStreamReader(BitStreamReader *self)
{
	self->callback=NULL;
	self->context=NULL;
	self->pos=NULL;
	self->end=NULL;
	self->bits=0;
	self->numbits=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
leaq -0x20(%rsp), %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x65bf
movl $0x0, -0x4(%rbp)
jmp 0x660d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x6ba0
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x65e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x660d
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x6c60
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x20(%rsp), %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x6ba0
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl -0x1c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x22(%rbp)
movzwl -0x22(%rbp), %edi
callq 0x7170
movl %eax, -0x28(%rbp)
movzwl -0x22(%rbp), %edi
callq 0x7190
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x2c(%rbp), %eax
jge 0x6af8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6b19
cmpl $0x0, -0x2c(%rbp)
jne 0x6b07
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6b19
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x6c60
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
leaq -0x10(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x6c4e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x6c0b
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6bf3
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
jmp 0x6bf5
jmp 0x6c4e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x6c09
jmp 0x6c4e
jmp 0x6c0b
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rcx)
movzbl (%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x24(%rax)
jmp 0x6bb0
leaq 0x10(%rsp), %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/DeflateReader.h
// Function: InitializeDeflateFixedLiteralCode
static void InitializeDeflateFixedLiteralCode(uint16_t *table)
{
	int lengths[288];
	for(int i=0;i<144;i++) lengths[i]=8;
	for(int i=144;i<256;i++) lengths[i]=9;
	for(int i=256;i<280;i++) lengths[i]=7;
	for(int i=280;i<288;i++) lengths[i]=8;

	BuildHuffmanTableFromLengths(table,15,lengths,288);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x4a0(%rsp), %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x494(%rbp)
cmpl $0x90, -0x494(%rbp)
jge 0x6d19
movslq -0x494(%rbp), %rax
movl $0x8, -0x490(%rbp,%rax,4)
movl -0x494(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x494(%rbp)
jmp 0x6cea
movl $0x90, -0x498(%rbp)
cmpl $0x100, -0x498(%rbp)    # imm = 0x100
jge 0x6d52
movslq -0x498(%rbp), %rax
movl $0x9, -0x490(%rbp,%rax,4)
movl -0x498(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x498(%rbp)
jmp 0x6d23
movl $0x100, -0x49c(%rbp)    # imm = 0x100
cmpl $0x118, -0x49c(%rbp)    # imm = 0x118
jge 0x6d8b
movslq -0x49c(%rbp), %rax
movl $0x7, -0x490(%rbp,%rax,4)
movl -0x49c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x49c(%rbp)
jmp 0x6d5c
movl $0x118, -0x4a0(%rbp)    # imm = 0x118
cmpl $0x120, -0x4a0(%rbp)    # imm = 0x120
jge 0x6dc4
movslq -0x4a0(%rbp), %rax
movl $0x8, -0x490(%rbp,%rax,4)
movl -0x4a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4a0(%rbp)
jmp 0x6d95
movq -0x8(%rbp), %rdi
leaq -0x490(%rbp), %rdx
movl $0xf, %esi
movl $0x120, %ecx            # imm = 0x120
callq 0x6f00
leaq 0x4a0(%rsp), %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
leaq -0x40(%rsp), %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x6fe0
movl $0x0, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x6fc7
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x6fb7
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x2c(%rbp), %eax
je 0x6f5e
jmp 0x6fac
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
movzwl %ax, %edi
callq 0x70d0
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
movzwl %ax, %edx
callq 0x7020
testb $0x1, %al
jne 0x6f97
movb $0x0, -0x1(%rbp)
jmp 0x6fcb
movl $0x10, %ecx
subl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6f44
jmp 0x6fb9
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6f31
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
leaq 0x40(%rsp), %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/halcy[P]quasi_crystals_bot/Engine/../Graphics/Tools/BitStreamReader.h
// Function: AddHuffmanCodeToTable
static bool AddHuffmanCodeToTable(uint16_t *table,int maxlength,uint16_t code,int length,int value)
{
	for(int i=0;i<1<<(maxlength-length);i++)
	{
		if(table[code+(i<<length)]) return false;
		table[code+(i<<length)]=MakeHuffmanTableEntry(value,length);
		//table[(code<<maxlength-length)+i]=MakeHuffmanTableEntry(value,length);
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq -0x30(%rsp), %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jge 0x70bb
movq -0x10(%rbp), %rax
movzwl -0x16(%rbp), %ecx
movl %ecx, -0x28(%rbp)
movl -0x24(%rbp), %edx
movl -0x1c(%rbp), %ecx
shll %cl, %edx
movl -0x28(%rbp), %ecx
addl %edx, %ecx
movslq %ecx, %rcx
cmpw $0x0, (%rax,%rcx,2)
je 0x7083
movb $0x0, -0x1(%rbp)
jmp 0x70bf
movl -0x20(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x7150
movw %ax, %dx
movq -0x10(%rbp), %rax
movzwl -0x16(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
movl -0x24(%rbp), %esi
movl -0x1c(%rbp), %ecx
shll %cl, %esi
movl -0x2c(%rbp), %ecx
addl %esi, %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7045
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
leaq 0x30(%rsp), %rsp
popq %rbp
retq
nopl (%rax,%rax)