LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_getsymbol
int scriptfile_getsymbol(scriptfile *sf, int *num)
{
	char *t, *e;
	int v;

	t = scriptfile_gettoken(sf);
	if (!t) return -1;

	v = (int)strtol(t, &e, 10);
	if (*e) {
		// looks like a string, so find it in the symbol table
		if (scriptfile_getsymbolvalue(t, num)) return 0;
		buildprintf("Error on line %s:%d: expecting symbol, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),t);
		return -2;   // not found
	}

	*num = v;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6efc0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6f7f0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6f877
movq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x68a0
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6f867
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6f880
cmpl $0x0, %eax
je 0x6f829
movl $0x0, -0x4(%rbp)
jmp 0x6f877
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6f180
movq -0x38(%rbp), %rsi
movl %eax, %edx
movq -0x20(%rbp), %rcx
leaq 0x4470e(%rip), %rdi     # 0xb3f65
movb $0x0, %al
callq 0x37c90
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6f877
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_getsymbolvalue
int scriptfile_getsymbolvalue(const char *name, int *val)
{
	char *scanner = symbtab;

	if (!symbtab) return 0;
	while (scanner - symbtab < (ptrdiff_t)symbtablength) {
		if (!strcasecmp(name, scanner)) {
			*val = *(int*)(scanner + strlen(scanner) + 1);
			return 1;
		}

		scanner += strlen(scanner) + 1 + sizeof(int);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0x57de61(%rip), %rax    # 0x5ed6f8
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x57de55(%rip)    # 0x5ed6f8
jne 0x6f8ae
movl $0x0, -0x4(%rbp)
jmp 0x6f926
jmp 0x6f8b0
movq -0x20(%rbp), %rax
movq 0x57de3d(%rip), %rcx    # 0x5ed6f8
subq %rcx, %rax
cmpq 0x57de3b(%rip), %rax    # 0x5ed700
jge 0x6f91f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x67c0
cmpl $0x0, %eax
jne 0x6f904
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x63d0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl 0x1(%rax,%rcx), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6f926
movq -0x20(%rbp), %rdi
callq 0x63d0
addq $0x1, %rax
addq $0x4, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x6f8b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_getbraces
int scriptfile_getbraces(scriptfile *sf, char **braceend)
{
	int bracecnt;
	char *bracestart;

	skipoverws(sf);
	if (sf->textptr >= sf->eof)
	{
		buildprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
		return -1;
	}

	if (sf->textptr[0] != '{') {
		buildprintf("Error on line %s:%d: expecting '{'\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
		return -1;
	}
	bracestart = ++sf->textptr; bracecnt = 1;
	while (1)
	{
		if (sf->textptr >= sf->eof) return(0);
		if (sf->textptr[0] == '{') bracecnt++;
		if (sf->textptr[0] == '}') { bracecnt--; if (!bracecnt) break; }
		sf->textptr++;
	}
	(*braceend) = sf->textptr;
	sf->textptr = bracestart;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6f020
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jb 0x6f998
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x6f180
movq -0x30(%rbp), %rsi
movl %eax, %edx
leaq 0x4458b(%rip), %rdi     # 0xb3f10
movb $0x0, %al
callq 0x37c90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6fa8b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
je 0x6f9e5
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x6f180
movq -0x38(%rbp), %rsi
movl %eax, %edx
leaq 0x445c4(%rip), %rdi     # 0xb3f96
movb $0x0, %al
callq 0x37c90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6fa8b
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x18(%rcx)
movq %rax, -0x28(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jb 0x6fa1b
movl $0x0, -0x4(%rbp)
jmp 0x6fa8b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x6fa34
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
jne 0x6fa57
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6fa55
jmp 0x6fa69
jmp 0x6fa57
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x6fa00
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_fromfile
scriptfile *scriptfile_fromfile(const char *fn)
{
	int fp;
	scriptfile *sf;
	char *tx;
	unsigned int flen;

	fp = kopen4load(fn,0);
	if (fp<0) return NULL;

	flen = kfilelength(fp);
	tx = (char *) malloc(flen + 2);
	if (!tx) {
		kclose(fp);
		return NULL;
	}

	sf = (scriptfile*) malloc(sizeof(scriptfile));
	if (!sf) {
		kclose(fp);
		free(tx);
		return NULL;
	}

	kread(fp, tx, flen);
	tx[flen] = tx[flen+1] = 0;

	kclose(fp);

	scriptfile_preparse(sf,tx,flen);
	sf->filename = strdup(fn);

	return sf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x2fee0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x6fefd
movq $0x0, -0x8(%rbp)
jmp 0x6ffc7
movl -0x14(%rbp), %edi
callq 0x30750
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x68f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6ff37
movl -0x14(%rbp), %edi
callq 0x30960
movq $0x0, -0x8(%rbp)
jmp 0x6ffc7
movl $0x40, %edi
callq 0x68f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6ff67
movl -0x14(%rbp), %edi
callq 0x30960
movq -0x28(%rbp), %rdi
callq 0x61c0
movq $0x0, -0x8(%rbp)
jmp 0x6ffc7
movl -0x14(%rbp), %edi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x302b0
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %edi
callq 0x30960
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x6faa0
movq -0x10(%rbp), %rdi
callq 0x6060
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_fromstring
scriptfile *scriptfile_fromstring(const char *string)
{
	scriptfile *sf;
	char *tx;
	size_t flen;

	if (!string) return NULL;

	flen = strlen(string);

	tx = (char *) malloc(flen + 2);
	if (!tx) return NULL;

	sf = (scriptfile*) malloc(sizeof(scriptfile));
	if (!sf) {
		free(tx);
		return NULL;
	}

	memcpy(tx, string, flen);
	tx[flen] = tx[flen+1] = 0;

	scriptfile_preparse(sf,tx,flen);
	sf->filename = NULL;

	return sf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x70000
movq $0x0, -0x8(%rbp)
jmp 0x700a6
movq -0x10(%rbp), %rdi
callq 0x63d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x2, %rdi
callq 0x68f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7002f
movq $0x0, -0x8(%rbp)
jmp 0x700a6
movl $0x40, %edi
callq 0x68f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x70057
movq -0x20(%rbp), %rdi
callq 0x61c0
movq $0x0, -0x8(%rbp)
jmp 0x700a6
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x60c0
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, 0x1(%rax,%rcx)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x6faa0
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_close
void scriptfile_close(scriptfile *sf)
{
	if (!sf) return;
	if (sf->lineoffs) free(sf->lineoffs);
	if (sf->textbuf) free(sf->textbuf);
	if (sf->filename) free(sf->filename);
	sf->textbuf = NULL;
	sf->filename = NULL;
	free(sf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x700c5
jmp 0x7012b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x700dd
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x700f3
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x7010b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rdi
callq 0x61c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_addsymbolvalue
int scriptfile_addsymbolvalue(const char *name, int val)
{
	//int x;
	char *sp;
	//if (scriptfile_getsymbolvalue(name, &x)) return -1;   // already exists

	if (symbtab) {
		char *scanner = symbtab;
		while (scanner - symbtab < (ptrdiff_t)symbtablength) {
			if (!strcasecmp(name, scanner)) {
				*(int*)(scanner + strlen(scanner) + 1) = val;
				return 1;
			}

			scanner += strlen(scanner) + 1 + sizeof(int);
		}
	}
	
	sp = getsymbtabspace(strlen(name) + 1 + sizeof(int));
	if (!sp) return 0;
	strcpy(sp, name);
	sp += strlen(name)+1;
	*(int*)sp = val;
	return 1;   // added
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, 0x57d561(%rip)    # 0x5ed6f8
je 0x70218
movq 0x57d558(%rip), %rax    # 0x5ed6f8
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x57d549(%rip), %rcx    # 0x5ed6f8
subq %rcx, %rax
cmpq 0x57d547(%rip), %rax    # 0x5ed700
jge 0x70216
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x67c0
cmpl $0x0, %eax
jne 0x701fb
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x63d0
movl -0x34(%rbp), %edx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl %edx, 0x1(%rax,%rcx)
movl $0x1, -0x4(%rbp)
jmp 0x70277
movq -0x28(%rbp), %rdi
callq 0x63d0
addq $0x1, %rax
addq $0x4, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x701a4
jmp 0x70218
movq -0x10(%rbp), %rdi
callq 0x63d0
movq %rax, %rdi
addq $0x1, %rdi
addq $0x4, %rdi
callq 0x70280
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x70245
movl $0x0, -0x4(%rbp)
jmp 0x70277
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x63e0
movq -0x10(%rbp), %rdi
callq 0x63d0
addq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: getsymbtabspace
static char * getsymbtabspace(size_t reqd)
{
	char *pos,*np;
	size_t i;

	if (symbtablength + reqd > symbtaballoclength)
	{
		for(i=max(symbtaballoclength,SYMBTABSTARTSIZE);symbtablength+reqd>i;i<<=1);
		np = (char *)realloc(symbtab, i); if (!np) return NULL;
		symbtab = np; symbtaballoclength = i;
	}

	pos = &symbtab[symbtablength];
	symbtablength += reqd;
	return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq 0x57d46d(%rip), %rax    # 0x5ed700
addq -0x10(%rbp), %rax
cmpq 0x57d46a(%rip), %rax    # 0x5ed708
jbe 0x7032c
cmpq $0x100, 0x57d459(%rip) # imm = 0x100
jbe 0x702be
movq 0x57d450(%rip), %rax    # 0x5ed708
movq %rax, -0x30(%rbp)
jmp 0x702c9
movl $0x100, %eax            # imm = 0x100
movq %rax, -0x30(%rbp)
jmp 0x702c9
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x57d428(%rip), %rax    # 0x5ed700
addq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x702f1
jmp 0x702e4
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x28(%rbp)
jmp 0x702d1
movq 0x57d400(%rip), %rdi    # 0x5ed6f8
movq -0x28(%rbp), %rsi
callq 0x6110
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x70316
movq $0x0, -0x8(%rbp)
jmp 0x70358
movq -0x20(%rbp), %rax
movq %rax, 0x57d3d7(%rip)    # 0x5ed6f8
movq -0x28(%rbp), %rax
movq %rax, 0x57d3dc(%rip)    # 0x5ed708
movq 0x57d3c5(%rip), %rax    # 0x5ed6f8
addq 0x57d3c6(%rip), %rax    # 0x5ed700
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq 0x57d3b7(%rip), %rax    # 0x5ed700
movq %rax, 0x57d3b0(%rip)    # 0x5ed700
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/scriptfile.c
// Function: scriptfile_clearsymbols
void scriptfile_clearsymbols(void)
{
	if (symbtab) free(symbtab);
	symbtab = NULL;
	symbtablength = 0;
	symbtaballoclength = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x57d37c(%rip)    # 0x5ed6f8
je 0x7038a
movq 0x57d373(%rip), %rdi    # 0x5ed6f8
callq 0x61c0
movq $0x0, 0x57d363(%rip) # 0x5ed6f8
movq $0x0, 0x57d360(%rip) # 0x5ed700
movq $0x0, 0x57d35d(%rip) # 0x5ed708
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: osdcmd_glinfo
static int osdcmd_glinfo(const osdfuncparm_t *parm)
{
	if (parm->numparms == 0) {
		dumpglinfo();
		buildputs("Use \"glinfo exts\" to list extensions.\n");
	} else if (strcmp(parm->parms[0], "exts") == 0) {
		dumpglexts();
	}
	return OSDCMD_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x71058
callq 0x71f50
leaq 0x44db8(%rip), %rdi     # 0xb5e09
callq 0x4a720
jmp 0x7107b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq 0x3e3c1(%rip), %rsi     # 0xaf42b
callq 0x6820
cmpl $0x0, %eax
jne 0x71079
callq 0x722e0
jmp 0x7107b
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: getproc_
static inline void * getproc_(const char *func, int *err, int fatal)
{
	void *proc = getglprocaddress(func, 1);
	if (!proc && fatal) {
		buildprintf("glbuild_loadfunctions: failed to find %s\n", func);
		*err = 1;
	}
	return proc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xa6a90
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x710de
cmpl $0x0, -0x14(%rbp)
je 0x710de
movq -0x8(%rbp), %rsi
leaq 0x44cd8(%rip), %rdi     # 0xb5da5
movb $0x0, %al
callq 0x37c90
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: glbuild_check_errors
void glbuild_check_errors(const char *file, int line)
{
	GLenum err;
	const char *str;

	while ((err = glfunc.glGetError()) != GL_NO_ERROR) {
		switch (err) {
			case GL_INVALID_ENUM: str = "GL_INVALID_ENUM"; break;
			case GL_INVALID_VALUE: str = "GL_INVALID_VALUE"; break;
			case GL_INVALID_OPERATION: str = "GL_INVALID_OPERATION"; break;
			case GL_INVALID_FRAMEBUFFER_OPERATION: str = "GL_INVALID_FRAMEBUFFER_OPERATION"; break;
			case GL_OUT_OF_MEMORY: str = "GL_OUT_OF_MEMORY"; break;
#ifdef GL_STACK_UNDERFLOW
			case GL_STACK_UNDERFLOW: str = "GL_STACK_UNDERFLOW"; break;
#endif
#ifdef GL_STACK_OVERFLOW
			case GL_STACK_OVERFLOW: str = "GL_STACK_OVERFLOW"; break;
#endif
			default: str = "(unknown)"; break;
		}
		debugprintf("GL error [%s:%d]: (%d) %s\n", file, line, err, str);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
callq *0x57c653(%rip)         # 0x5ed778
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
je 0x711df
movl -0x10(%rbp), %eax
addl $0xfffffb00, %eax       # imm = 0xFFFFFB00
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x6, %eax
ja 0x711b3
movq -0x20(%rbp), %rax
leaq 0x444a1(%rip), %rcx     # 0xb55f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x44985(%rip), %rax     # 0xb5ae4
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x44988(%rip), %rax     # 0xb5af4
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x4498c(%rip), %rax     # 0xb5b05
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x44994(%rip), %rax     # 0xb5b1a
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x449a8(%rip), %rax     # 0xb5b3b
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x449ac(%rip), %rax     # 0xb5b4c
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x449b2(%rip), %rax     # 0xb5b5f
movq %rax, -0x18(%rbp)
jmp 0x711be
leaq 0x449b7(%rip), %rax     # 0xb5b71
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %r8
leaq 0x449a8(%rip), %rdi     # 0xb5b7b
movb $0x0, %al
callq 0xa5110
jmp 0x7111f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: glbuild_compile_shader
GLuint glbuild_compile_shader(GLuint type, const GLchar *source)
{
	GLuint shader;
	GLint status;
	GLchar *cookedsource;

	shader = glfunc.glCreateShader(type);
	if (!shader) {
		return 0;
	}

#if (USE_OPENGL == USE_GLES2)
	cookedsource = glbuild_cook_source(source, "ES2");
#elif (USE_OPENGL == USE_GL3)
	cookedsource = glbuild_cook_source(source, "3");
#else
	cookedsource = glbuild_cook_source(source, "2");
#endif
	if (!cookedsource) {
		glfunc.glDeleteShader(shader);
		return 0;
	}

	glfunc.glShaderSource(shader, 1, (const GLchar**)&cookedsource, NULL);
	glfunc.glCompileShader(shader);
	free(cookedsource);

	glfunc.glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
	if (status == GL_FALSE) {
		GLint loglen = 0;
		GLchar *logtext = NULL;

		glfunc.glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &loglen);

		logtext = (GLchar *)malloc(loglen);
		glfunc.glGetShaderInfoLog(shader, loglen, &loglen, logtext);
		buildprintf("GL shader compile error: %s\n", logtext);
		free(logtext);

		glfunc.glDeleteShader(shader);
		return 0;
	}

	return shader;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x57c66a(%rip), %rax    # 0x5ed870
movl -0x8(%rbp), %edi
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x71220
movl $0x0, -0x4(%rbp)
jmp 0x71318
movq -0x10(%rbp), %rdi
leaq 0x475e0(%rip), %rsi     # 0xb880b
callq 0x71330
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x71253
movq 0x57c63e(%rip), %rax    # 0x5ed880
movl -0x14(%rbp), %edi
callq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x71318
movq 0x57c66e(%rip), %rax    # 0x5ed8c8
movl -0x14(%rbp), %edi
movl $0x1, %esi
leaq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq *%rax
movq 0x57c5ef(%rip), %rax    # 0x5ed860
movl -0x14(%rbp), %edi
callq *%rax
movq -0x20(%rbp), %rdi
callq 0x61c0
movq 0x57c622(%rip), %rax    # 0x5ed8a8
movl -0x14(%rbp), %edi
movl $0x8b81, %esi           # imm = 0x8B81
leaq -0x18(%rbp), %rdx
callq *%rax
cmpl $0x0, -0x18(%rbp)
jne 0x71312
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq 0x57c5f8(%rip), %rax    # 0x5ed8a8
movl -0x14(%rbp), %edi
movl $0x8b84, %esi           # imm = 0x8B84
leaq -0x24(%rbp), %rdx
callq *%rax
movslq -0x24(%rbp), %rdi
callq 0x68f0
movq %rax, -0x30(%rbp)
movq 0x57c5de(%rip), %rax    # 0x5ed8b0
movl -0x14(%rbp), %edi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rcx
leaq -0x24(%rbp), %rdx
callq *%rax
movq -0x30(%rbp), %rsi
leaq 0x448a9(%rip), %rdi     # 0xb5b96
movb $0x0, %al
callq 0x37c90
movq -0x30(%rbp), %rdi
callq 0x61c0
movq 0x57c57c(%rip), %rax    # 0x5ed880
movl -0x14(%rbp), %edi
callq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x71318
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: glbuild_cook_source
static GLchar *glbuild_cook_source(const GLchar *source, const char *spec)
{
	GLchar *cooked, *pos, *match, *end;
	const char *marker = "#glbuild(";
	const int markerlen = 9;

	cooked = strdup(source);
	if (!cooked) {
		debugprintf("glbuild_cook_source: couldn't duplicate source\n");
		return NULL;
	}
	pos = cooked;
	do {
		match = strstr(pos, marker);
		if (!match) break;

		end = strchr(match, ')');
		if (!end) break;

		if (!strncmp(match + markerlen, spec, end-match-markerlen)) {
			// Marker matches the spec. Overwrite it with spaces to uncomment the line.
			for (; match <= end; match++) *match = ' ';
		} else {
			// Overwrite the line with spaces.
			for (; *match && *match != '\n' && *match != '\r'; match++) *match = ' ';
		}
		pos = end;
	} while(pos);

	return cooked;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x44a88(%rip), %rax     # 0xb5dcf
movq %rax, -0x40(%rbp)
movl $0x9, -0x44(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6060
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x71381
leaq 0x44a6c(%rip), %rdi     # 0xb5dd9
movb $0x0, %al
callq 0xa5110
movq $0x0, -0x8(%rbp)
jmp 0x7147b
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x6450
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x713a6
jmp 0x71473
movq -0x30(%rbp), %rdi
movl $0x29, %esi
callq 0x64d0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x713c4
jmp 0x71473
movq -0x30(%rbp), %rdi
addq $0x9, %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rax
subq %rax, %rdx
subq $0x9, %rdx
callq 0x6240
cmpl $0x0, %eax
jne 0x7140c
jmp 0x713eb
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x7140a
movq -0x30(%rbp), %rax
movb $0x20, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x713eb
jmp 0x71460
jmp 0x7140e
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x45(%rbp)
je 0x71440
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x45(%rbp)
je 0x71440
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x71449
jmp 0x7145e
movq -0x30(%rbp), %rax
movb $0x20, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7140e
jmp 0x71460
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x71389
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: glbuild_link_program
GLuint glbuild_link_program(int shadercount, GLuint *shaders)
{
	GLuint program;
	GLint status;
	int i;

	program = glfunc.glCreateProgram();
	if (!program) {
		return 0;
	}

	for (i = 0; i < shadercount; i++) {
		glfunc.glAttachShader(program, shaders[i]);
	}

	glfunc.glLinkProgram(program);

	glfunc.glGetProgramiv(program, GL_LINK_STATUS, &status);
	if (status == GL_FALSE) {
		GLint loglen = 0;
		GLchar *logtext = NULL;

		glfunc.glGetProgramiv(program, GL_INFO_LOG_LENGTH, &loglen);

		logtext = (GLchar *)malloc(loglen);
		glfunc.glGetProgramInfoLog(program, loglen, &loglen, logtext);
		buildprintf("glbuild_link_program: link error: %s\n", logtext);
		free(logtext);

		glfunc.glDeleteProgram(program);
		return 0;
	}

	for (i = 0; i < shadercount; i++) {
		glfunc.glDetachShader(program, shaders[i]);
	}

	return program;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq *0x57c3c3(%rip)         # 0x5ed868
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x714ba
movl $0x0, -0x4(%rbp)
jmp 0x715c1
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x714eb
movq 0x57c388(%rip), %rax    # 0x5ed858
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %esi
callq *%rax
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x714c1
movq 0x57c3ce(%rip), %rax    # 0x5ed8c0
movl -0x14(%rbp), %edi
callq *%rax
movq 0x57c39a(%rip), %rax    # 0x5ed898
movl -0x14(%rbp), %edi
movl $0x8b82, %esi           # imm = 0x8B82
leaq -0x18(%rbp), %rdx
callq *%rax
cmpl $0x0, -0x18(%rbp)
jne 0x7158a
movl $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq 0x57c370(%rip), %rax    # 0x5ed898
movl -0x14(%rbp), %edi
movl $0x8b84, %esi           # imm = 0x8B84
leaq -0x20(%rbp), %rdx
callq *%rax
movslq -0x20(%rbp), %rdi
callq 0x68f0
movq %rax, -0x28(%rbp)
movq 0x57c356(%rip), %rax    # 0x5ed8a0
movl -0x14(%rbp), %edi
movl -0x20(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x20(%rbp), %rdx
callq *%rax
movq -0x28(%rbp), %rsi
leaq 0x4464e(%rip), %rdi     # 0xb5bb3
movb $0x0, %al
callq 0x37c90
movq -0x28(%rbp), %rdi
callq 0x61c0
movq 0x57c2fc(%rip), %rax    # 0x5ed878
movl -0x14(%rbp), %edi
callq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x715c1
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x715bb
movq 0x57c2e8(%rip), %rax    # 0x5ed888
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movl (%rcx,%rdx,4), %esi
callq *%rax
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x71591
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: glbuild_delete_8bit_shader
void glbuild_delete_8bit_shader(glbuild8bit *state)
{
	if (state->program) {
#if (USE_OPENGL != USE_GL3)
		glfunc.glDisableVertexAttribArray(state->attrib_vertex);
		glfunc.glDisableVertexAttribArray(state->attrib_texcoord);
#endif
		glfunc.glUseProgram(0);	// Disable shaders, go back to fixed-function.
		glfunc.glDeleteProgram(state->program);
		state->program = 0;
	}
	if (state->paltex) {
		glfunc.glDeleteTextures(1, &state->paltex);
		state->paltex = 0;
	}
	if (state->frametex) {
		glfunc.glDeleteTextures(1, &state->frametex);
		state->frametex = 0;
	}
#if (USE_OPENGL == USE_GL3)
	if (state->vao) {
		glfunc.glBindVertexArray(0);
		glfunc.glDeleteVertexArrays(1, &state->vao);
		state->vao = 0;
	}
#endif
	if (state->buffer_indexes) {
		glfunc.glDeleteBuffers(1, &state->buffer_indexes);
		state->buffer_indexes = 0;
	}
	if (state->buffer_elements) {
		glfunc.glDeleteBuffers(1, &state->buffer_elements);
		state->buffer_elements = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x71d36
movq 0x57bb44(%rip), %rax    # 0x5ed840
movq -0x8(%rbp), %rcx
movl 0x10(%rcx), %edi
callq *%rax
movq 0x57bb34(%rip), %rax    # 0x5ed840
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %edi
callq *%rax
xorl %edi, %edi
callq *0x57bbe3(%rip)         # 0x5ed900
movq 0x57bb54(%rip), %rax    # 0x5ed878
movq -0x8(%rbp), %rcx
movl (%rcx), %edi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x71d61
movq 0x57ba89(%rip), %rax    # 0x5ed7d0
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x71d8c
movq 0x57ba5e(%rip), %rax    # 0x5ed7d0
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x71db7
movq 0x57ba83(%rip), %rax    # 0x5ed820
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x71de2
movq 0x57ba58(%rip), %rax    # 0x5ed820
movq -0x8(%rbp), %rsi
addq $0x1c, %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: glbuild_update_8bit_frame
void glbuild_update_8bit_frame(glbuild8bit *state, const GLvoid *frame, int resx, int resy, int stride)
{
#if (USE_OPENGL == USE_GLES2)
	GLenum extfmt = GL_LUMINANCE;
#else
	GLenum extfmt = GL_RED;
#endif

	(void)resx;

	glfunc.glActiveTexture(GL_TEXTURE0);
	glfunc.glBindTexture(GL_TEXTURE_2D, state->frametex);
	glfunc.glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, stride, resy, extfmt, GL_UNSIGNED_BYTE, frame);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x1903, -0x20(%rbp)    # imm = 0x1903
movl $0x84c0, %edi           # imm = 0x84C0
callq *0x57b984(%rip)         # 0x5ed850
movq 0x57b905(%rip), %rax    # 0x5ed7d8
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq *%rax
movq 0x57b900(%rip), %rax    # 0x5ed7e8
movl -0x1c(%rbp), %r8d
movl -0x18(%rbp), %r9d
movl -0x20(%rbp), %r11d
movq -0x10(%rbp), %r10
movl $0xde1, %edi            # imm = 0xDE1
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
movl %r11d, (%rsp)
movl $0x1401, 0x8(%rsp)      # imm = 0x1401
movq %r10, 0x10(%rsp)
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/glbuild.c
// Function: dumpglexts
static void dumpglexts(void)
{
	if (!glinfo.loaded) {
		buildputs("OpenGL information not available.\n");
		return;
	}

	buildputs("OpenGL Extensions:\n");
	glbuild_enumerate_exts(indentedputs);
	buildputs("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x148ac5(%rip), %rax    # 0x1badb0
cmpl $0x0, (%rax)
jne 0x722fe
leaq 0x43b47(%rip), %rdi     # 0xb5e3e
callq 0x4a720
jmp 0x72322
leaq 0x43cd3(%rip), %rdi     # 0xb5fd8
callq 0x4a720
leaq 0x1f(%rip), %rdi        # 0x72330
callq 0x70ca0
leaq 0x40bdf(%rip), %rdi     # 0xb2efc
callq 0x4a720
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_texmayhavealpha
int polymost_texmayhavealpha (int dapicnum, int dapalnum)
{
	PTHead * pth;

	pth = PT_GetHead(dapicnum, dapalnum, 0, 1);
	if (!pth) {
		return 1;
	}

	if (!pth->pic[PTHPIC_BASE]) {
		// we haven't got a PTMHead reference yet for the base layer, so we
		// don't know if the texture actually does have alpha, so err on
		// the side of caution
		return 1;
	}

	return ((pth->pic[PTHPIC_BASE]->flags & PTH_HASALPHA) == PTH_HASALPHA);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x9a790
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x72394
movl $0x1, -0x4(%rbp)
jmp 0x723c2
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x723a7
movl $0x1, -0x4(%rbp)
jmp 0x723c2
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x8, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_texinvalidate
void polymost_texinvalidate (int dapicnum, int dapalnum, int dameth)
{
	PTIter iter;
	PTHead * pth;

	iter = PTIterNewMatch(
		PTITER_PICNUM | PTITER_PALNUM | PTITER_FLAGS,
		dapicnum, dapalnum, PTH_CLAMPED, (dameth & METH_CLAMPED) ? PTH_CLAMPED : 0
		);
	while ((pth = PTIterNext(iter)) != 0) {
		if (pth->pic[PTHPIC_BASE]) {
			pth->pic[PTHPIC_BASE]->flags |= PTH_DIRTY;
		}
		/*buildprintf("invalidating picnum:%d palnum:%d effects:%d skyface:%d flags:%04X repldef:%p\n",
			   pth->picnum, pth->palnum, pth->effects, pth->skyface,
			   pth->flags, pth->repldef);*/
	}
	//buildprintf("done\n");
	PTIterFree(iter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %edi
andl $0x4, %edi
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edi
cmovnel %ecx, %eax
movl $0x7, %edi
movl $0x1, %ecx
movzwl %ax, %r8d
callq 0x9a830
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9aa30
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x72443
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x72441
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x4(%rax)
jmp 0x72411
movq -0x18(%rbp), %rdi
callq 0x9aab0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_texinvalidateall
void polymost_texinvalidateall (void)
{
	PTIter iter;
	PTHead * pth;

	iter = PTIterNew();
	while ((pth = PTIterNext(iter)) != 0) {
		if (pth->pic[PTHPIC_BASE]) {
			pth->pic[PTHPIC_BASE]->flags |= PTH_DIRTY;
		}
	}
	PTIterFree(iter);
	clearskins();
	//buildprintf("gltexinvalidateall()\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x9aa10
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9aa30
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x724a3
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x724a1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x4(%rax)
jmp 0x72471
movq -0x8(%rbp), %rdi
callq 0x9aab0
callq 0x8e970
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_glinit
void polymost_glinit(void)
{
	glfunc.glClearColor(0,0,0,0.5); //Black Background
	glfunc.glDisable(GL_DITHER);

	glfunc.glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

	glfunc.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

	if (glmultisample > 0 && glinfo.multisample) {
#if (USE_OPENGL != USE_GLES2)
#ifdef GL_NV_multisample_filter_hint
		if (glinfo.nvmultisamplehint)
			glfunc.glHint(GL_MULTISAMPLE_FILTER_HINT_NV, glnvmultisamplehint ? GL_NICEST:GL_FASTEST);
#endif

		glfunc.glEnable(GL_MULTISAMPLE);

		if (glsampleshading > 0 && glinfo.sampleshading) {
			glfunc.glMinSampleShadingARB(1.f);
			glfunc.glEnable(GL_SAMPLE_SHADING_ARB);
		}
#endif
	}

	polymost_loadshaders();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm2, %xmm2
movss 0x43a49(%rip), %xmm3    # 0xb65c8
leaq 0x57ab8a(%rip), %rax    # 0x5ed710
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq *(%rax)
movl $0xbd0, %edi            # imm = 0xBD0
leaq 0x57ab76(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
movl $0x302, %edi            # imm = 0x302
movl $0x303, %esi            # imm = 0x303
leaq 0x57ab62(%rip), %rax    # 0x5ed710
callq *0x18(%rax)
movl $0xcf5, %edi            # imm = 0xCF5
movl $0x1, %esi
leaq 0x57ab4e(%rip), %rax    # 0x5ed710
callq *0x78(%rax)
cmpl $0x0, 0x57ad90(%rip)    # 0x5ed95c
jle 0x72c69
leaq 0x1481d7(%rip), %rax    # 0x1badb0
movsbl 0x1e(%rax), %eax
cmpl $0x0, %eax
je 0x72c69
leaq 0x1481c3(%rip), %rax    # 0x1badb0
cmpb $0x0, 0x1f(%rax)
je 0x72c1b
leaq 0x57ab16(%rip), %rax    # 0x5ed710
movq 0x70(%rax), %rax
movl 0x57ad5c(%rip), %edx    # 0x5ed960
movl $0x1101, %esi           # imm = 0x1101
movl $0x1102, %ecx           # imm = 0x1102
cmpl $0x0, %edx
cmovnel %ecx, %esi
movl $0x8534, %edi           # imm = 0x8534
callq *%rax
movl $0x809d, %edi           # imm = 0x809D
leaq 0x57aae9(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
cmpl $0x0, 0x57ad33(%rip)    # 0x5ed964
jle 0x72c67
leaq 0x148176(%rip), %rax    # 0x1badb0
movsbl 0x20(%rax), %eax
cmpl $0x0, %eax
je 0x72c67
movss 0x401b5(%rip), %xmm0    # 0xb2e00
leaq 0x57aabe(%rip), %rax    # 0x5ed710
callq *0x90(%rax)
movl $0x8c36, %edi           # imm = 0x8C36
leaq 0x57aaac(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
jmp 0x72c69
callq 0x72c70
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_setview
void polymost_setview(void)
{
	memset(gdrawroomsprojmat,0,sizeof(gdrawroomsprojmat));
	gdrawroomsprojmat[0][0] = (float)ydimen; gdrawroomsprojmat[0][2] = 1.0;
	gdrawroomsprojmat[1][1] = (float)xdimen; gdrawroomsprojmat[1][2] = 1.0;
	gdrawroomsprojmat[2][2] = 1.0; gdrawroomsprojmat[2][3] = (float)ydimen;
	gdrawroomsprojmat[3][2] =-1.0;

	memset(grotatespriteprojmat,0,sizeof(grotatespriteprojmat));
	grotatespriteprojmat[0][0] = grotatespriteprojmat[2][3] = 1.0;
	grotatespriteprojmat[1][1] = ((float)xdim)/((float)ydim);
	grotatespriteprojmat[2][2] = 1.0001;
	grotatespriteprojmat[3][2] = 1-grotatespriteprojmat[2][2];

	memset(gorthoprojmat,0,sizeof(gorthoprojmat));
	gorthoprojmat[0][0] = 2/(float)xdim;
	gorthoprojmat[1][1] = -2/(float)ydim;
	gorthoprojmat[2][2] = -1.0;
	gorthoprojmat[3][3] = 1.0;
	gorthoprojmat[3][0] = -1.0;
	gorthoprojmat[3][1] = 1.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x57a655(%rip), %rdi    # 0x5eda30
xorl %esi, %esi
movl $0x40, %edx
callq 0x62d0
leaq 0x245206(%rip), %rax    # 0x2b85f4
cvtsi2ssl (%rax), %xmm0
movss %xmm0, 0x57a636(%rip)   # 0x5eda30
movss 0x3f9fe(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a62e(%rip)   # 0x5eda38
leaq 0x6d90f(%rip), %rax     # 0xe0d20
cvtsi2ssl (%rax), %xmm0
movss %xmm0, 0x57a627(%rip)   # 0x5eda44
movss 0x3f9db(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a61b(%rip)   # 0x5eda48
movss 0x3f9cb(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a61b(%rip)   # 0x5eda58
leaq 0x2451b0(%rip), %rax    # 0x2b85f4
cvtsi2ssl (%rax), %xmm0
movss %xmm0, 0x57a60c(%rip)   # 0x5eda5c
movss 0x3eca0(%rip), %xmm0    # 0xb20f8
movss %xmm0, 0x57a608(%rip)   # 0x5eda68
leaq 0x57a609(%rip), %rdi    # 0x5eda70
xorl %esi, %esi
movl $0x40, %edx
callq 0x62d0
movss 0x3f985(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a619(%rip)   # 0x5eda9c
movss 0x3f975(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a5dd(%rip)   # 0x5eda70
leaq 0x3cf8b2(%rip), %rax    # 0x442d4c
cvtsi2ssl (%rax), %xmm0
leaq 0x3cf8ab(%rip), %rax    # 0x442d50
cvtsi2ssl (%rax), %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x57a5cf(%rip)   # 0x5eda84
movss 0x43117(%rip), %xmm0    # 0xb65d4
movss %xmm0, 0x57a5d3(%rip)   # 0x5eda98
movss 0x3f933(%rip), %xmm0    # 0xb2e00
subss 0x57a5c3(%rip), %xmm0   # 0x5eda98
movss %xmm0, 0x57a5cb(%rip)   # 0x5edaa8
leaq 0x57a5cc(%rip), %rdi    # 0x5edab0
xorl %esi, %esi
movl $0x40, %edx
callq 0x62d0
leaq 0x3cf855(%rip), %rax    # 0x442d4c
cvtsi2ssl (%rax), %xmm1
movss 0x430cd(%rip), %xmm0    # 0xb65d0
divss %xmm1, %xmm0
movss %xmm0, 0x57a5a1(%rip)   # 0x5edab0
leaq 0x3cf83a(%rip), %rax    # 0x442d50
cvtsi2ssl (%rax), %xmm1
movss 0x430aa(%rip), %xmm0    # 0xb65cc
divss %xmm1, %xmm0
movss %xmm0, 0x57a596(%rip)   # 0x5edac4
movss 0x3ebc2(%rip), %xmm0    # 0xb20f8
movss %xmm0, 0x57a59a(%rip)   # 0x5edad8
movss 0x3f8ba(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a59e(%rip)   # 0x5edaec
movss 0x3eba2(%rip), %xmm0    # 0xb20f8
movss %xmm0, 0x57a582(%rip)   # 0x5edae0
movss 0x3f89a(%rip), %xmm0    # 0xb2e00
movss %xmm0, 0x57a576(%rip)   # 0x5edae4
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: checkindexbuffer
static void checkindexbuffer(unsigned int size)
{
	GLushort *indexes, i;

	if (size <= elementindexbuffersize) return;

	indexes = (GLushort *) malloc(sizeof(GLushort)*size);
	for (i = 0; i < size; i++) indexes[i] = i;
	glfunc.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elementindexbuffer);
	glfunc.glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLushort)*size, indexes, GL_STATIC_DRAW);
	free(indexes);

	elementindexbuffersize = size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x57a084(%rip), %eax    # 0x5ed9a8
ja 0x7392b
jmp 0x739bc
movl -0x4(%rbp), %eax
movl %eax, %edi
shlq %rdi
callq 0x68f0
movq %rax, -0x10(%rbp)
movw $0x0, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
cmpl -0x4(%rbp), %eax
jae 0x73969
movw -0x12(%rbp), %dx
movq -0x10(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movw -0x12(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x12(%rbp)
jmp 0x73942
leaq 0x579da0(%rip), %rax    # 0x5ed710
movq 0xf8(%rax), %rax
movl 0x57a027(%rip), %esi    # 0x5ed9a4
movl $0x8893, %edi           # imm = 0x8893
callq *%rax
leaq 0x579d85(%rip), %rax    # 0x5ed710
movq 0x100(%rax), %rax
movl -0x4(%rbp), %ecx
movl %ecx, %esi
shlq %rsi
movq -0x10(%rbp), %rdx
movl $0x8893, %edi           # imm = 0x8893
movl $0x88e4, %ecx           # imm = 0x88E4
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x61c0
movl -0x4(%rbp), %eax
movl %eax, 0x579fec(%rip)    # 0x5ed9a8
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_palfade
static void polymost_palfade(void)
{
	struct polymostdrawauxcall draw;
	struct polymostvboitem vboitem[4];

	if ((rendmode != 3) || (qsetmode != 200)) return;
	if (palfadedelta == 0) return;

	draw.mode = 2;	// Solid colour.

	draw.colour.r = palfadergb.r / 255.f;
	draw.colour.g = palfadergb.g / 255.f;
	draw.colour.b = palfadergb.b / 255.f;
	draw.colour.a = palfadedelta / 255.f;

	vboitem[0].v.x = 0.f;
	vboitem[0].v.y = 0.f;
	vboitem[0].v.z = 0.f;

	vboitem[1].v.x = (float)xdim;
	vboitem[1].v.y = 0.f;
	vboitem[1].v.z = 0.f;

	vboitem[2].v.x = (float)xdim;
	vboitem[2].v.y = (float)ydim;
	vboitem[2].v.z = 0.f;

	vboitem[3].v.x = 0.f;
	vboitem[3].v.y = (float)ydim;
	vboitem[3].v.z = 0.f;

	draw.indexcount = 4;
	draw.indexes = NULL;
	draw.elementcount = 4;
	draw.elementvbo = vboitem;

	glfunc.glDisable(GL_DEPTH_TEST);
	glfunc.glEnable(GL_BLEND);

	polymost_drawaux_glcall(GL_TRIANGLE_FAN, &draw);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
cmpl $0x3, 0x579f2e(%rip)    # 0x5ed920
jne 0x73a03
leaq 0x181b8d(%rip), %rax    # 0x1f5588
cmpl $0xc8, (%rax)
je 0x73a08
jmp 0x73b80
leaq 0x181b94(%rip), %rax    # 0x1f55a3
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x73a1c
jmp 0x73b80
movl $0x2, -0x24(%rbp)
leaq 0x181b75(%rip), %rax    # 0x1f559f
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x42b9f(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
leaq 0x181b56(%rip), %rax    # 0x1f559f
movzbl 0x1(%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x42b7f(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x40(%rbp)
leaq 0x181b36(%rip), %rax    # 0x1f559f
movzbl 0x2(%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x42b5f(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x3c(%rbp)
leaq 0x181b1a(%rip), %rax    # 0x1f55a3
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x42b40(%rip), %xmm1    # 0xb65d8
divss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xa0(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x9c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x98(%rbp)
leaq 0x3cf283(%rip), %rax    # 0x442d4c
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x8c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x88(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x84(%rbp)
leaq 0x3cf25a(%rip), %rax    # 0x442d4c
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x78(%rbp)
leaq 0x3cf24e(%rip), %rax    # 0x442d50
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x74(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x70(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x64(%rbp)
leaq 0x3cf22e(%rip), %rax    # 0x442d50
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x60(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
movl $0x4, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x4, -0x10(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0xb71, %edi            # imm = 0xB71
leaq 0x579bb0(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
movl $0xbe2, %edi            # imm = 0xBE2
leaq 0x579ba1(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
movl $0x6, %edi
leaq -0x48(%rbp), %rsi
callq 0x8a450
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_bunchfront
static int polymost_bunchfront (int b1, int b2)
{
	double x1b1, x1b2, x2b1, x2b2;
	int b1f, b2f, i;

	b1f = bunchfirst[b1]; x1b1 = dxb1[b1f]; x2b2 = dxb2[bunchlast[b2]]; if (x1b1 >= x2b2) return(-1);
	b2f = bunchfirst[b2]; x1b2 = dxb1[b2f]; x2b1 = dxb2[bunchlast[b1]]; if (x1b2 >= x2b1) return(-1);

	if (x1b1 >= x1b2)
	{
		for(i=b2f;dxb2[i]<=x1b1;i=p2[i]);
		return(wallfront(b1f,i));
	}
	for(i=b1f;dxb2[i]<=x1b2;i=p2[i]);
	return(wallfront(i,b2f));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x38fa87(%rip), %rax    # 0x412520
movswl (%rax,%rcx,2), %eax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rcx
leaq 0x56f105(%rip), %rax    # 0x5f1bb0
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x18(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x391a60(%rip), %rax    # 0x414520
movswq (%rax,%rcx,2), %rcx
leaq 0x5770e4(%rip), %rax    # 0x5f9bb0
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x18(%rbp), %xmm0
ucomisd -0x30(%rbp), %xmm0
jb 0x82aee
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x82be6
movslq -0xc(%rbp), %rcx
leaq 0x38fa27(%rip), %rax    # 0x412520
movswl (%rax,%rcx,2), %eax
movl %eax, -0x38(%rbp)
movslq -0x38(%rbp), %rcx
leaq 0x56f0a5(%rip), %rax    # 0x5f1bb0
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x20(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x391a00(%rip), %rax    # 0x414520
movswq (%rax,%rcx,2), %rcx
leaq 0x577084(%rip), %rax    # 0x5f9bb0
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm0
ucomisd -0x28(%rbp), %xmm0
jb 0x82b4e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x82be6
movsd -0x18(%rbp), %xmm0
ucomisd -0x20(%rbp), %xmm0
jb 0x82ba1
movl -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
movslq -0x3c(%rbp), %rcx
leaq 0x577045(%rip), %rax    # 0x5f9bb0
movsd (%rax,%rcx,8), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x82b91
jmp 0x82b7d
movslq -0x3c(%rbp), %rcx
leaq 0x3979a8(%rip), %rax    # 0x41a530
movswl (%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
jmp 0x82b60
movl -0x34(%rbp), %edi
movl -0x3c(%rbp), %esi
callq 0x35f40
movl %eax, -0x4(%rbp)
jmp 0x82be6
movl -0x34(%rbp), %eax
movl %eax, -0x3c(%rbp)
movslq -0x3c(%rbp), %rcx
leaq 0x576ffe(%rip), %rax    # 0x5f9bb0
movsd (%rax,%rcx,8), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x82bd8
jmp 0x82bc4
movslq -0x3c(%rbp), %rcx
leaq 0x397961(%rip), %rax    # 0x41a530
movswl (%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
jmp 0x82ba7
movl -0x3c(%rbp), %edi
movl -0x38(%rbp), %esi
callq 0x35f40
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop