LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: loadgldriver
int loadgldriver(const char *soname)
{
	const char *name = soname;
	if (!name) {
		name = "system OpenGL library";
	}

	buildprintf("Loading %s\n", name);
	if (SDL_GL_LoadLibrary(soname)) return -1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
leaq 0x1154d(%rip), %rsi     # 0x7d670
cmovneq %rdi, %rsi
leaq 0x11558(%rip), %rdi     # 0x7d686
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x24cb4
movq %rbx, %rdi
callq 0x67b0
negl %eax
sbbl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: set_glswapinterval
static int set_glswapinterval(const osdfuncparm_t *parm)
{
	int interval;

	if (glunavailable) {
		buildputs("glswapinterval is not adjustable\n");
		return OSDCMD_OK;
	}
	if (parm->numparms == 0) {
		buildprintf("glswapinterval is %d\n", glswapinterval);
		return OSDCMD_OK;
	}
	if (parm->numparms != 1) return OSDCMD_SHOWHELP;

	interval = atoi(parm->parms[0]);
	if (interval < -1 || interval > 2) return OSDCMD_SHOWHELP;

	if (SDL_GL_SetSwapInterval(interval) < 0) {
		buildprintf("error: could not change swap interval: %s\n", SDL_GetError());
	} else {
		glswapinterval = SDL_GL_GetSwapInterval();
	}
	return OSDCMD_OK;
}

// Assembly:
pushq %rbx
leaq 0x110f94(%rip), %rax    # 0x17d0e8
cmpl $0x0, (%rax)
je 0x6c16b
leaq 0x11532(%rip), %rdi     # 0x7d692
callq 0x32200
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
movl (%rdi), %eax
movl $0x1, %ebx
cmpl $0x1, %eax
je 0x6c196
testl %eax, %eax
jne 0x6c167
leaq 0x36ea6(%rip), %rax     # 0xa3028
movl (%rax), %esi
leaq 0x11529(%rip), %rdi     # 0x7d6b4
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x24cb4
jmp 0x6c167
movq 0x10(%rdi), %rax
movq (%rax), %rdi
callq 0x6310
leal -0x3(%rax), %ecx
cmpl $-0x4, %ecx
jb 0x6c167
movl %eax, %edi
callq 0x6580
testl %eax, %eax
js 0x6c1c5
callq 0x6600
leaq 0x36e67(%rip), %rcx     # 0xa3028
movl %eax, (%rcx)
jmp 0x6c165
callq 0x6b40
leaq 0x114f9(%rip), %rdi     # 0x7d6ca
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x24cb4
jmp 0x6c167
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: uninitinput
void uninitinput(void)
{
	uninitmouse();

	if (controller) {
		SDL_GameControllerClose(controller);
		controller = NULL;
	}
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x6c577
movb $0x0, 0x6600eb(%rip)    # 0x6cc2d9
movq 0x661dfb(%rip), %rdi    # 0x6cdff0
testq %rdi, %rdi
je 0x6c20a
callq 0x6360
movq $0x0, 0x661de6(%rip) # 0x6cdff0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: shutdownvideo
static void shutdownvideo(void)
{
	if (frame) {
		free(frame);
		frame = NULL;
	}
#if USE_OPENGL
	if (!glunavailable) {
		glbuild_delete_8bit_shader(&gl8bit);
	}
	if (sdl_glcontext) {
#if USE_POLYMOST
		polymost_glreset();
#endif

		SDL_GL_DeleteContext(sdl_glcontext);
		sdl_glcontext = NULL;
	}
#endif
	if (sdl_texture) {
		SDL_DestroyTexture(sdl_texture);
		sdl_texture = NULL;
	}
	if (sdl_renderer) {
		SDL_DestroyRenderer(sdl_renderer);
		sdl_renderer = NULL;
	}
	if (sdl_surface) {
		SDL_FreeSurface(sdl_surface);
		sdl_surface = NULL;
	}
	if (sdl_window) {
		SDL_DestroyWindow(sdl_window);
		sdl_window = NULL;
	}
}

// Assembly:
pushq %rax
movq 0x661e3d(%rip), %rdi    # 0x6ce078
testq %rdi, %rdi
je 0x6c250
callq 0x61c0
movq $0x0, 0x661e28(%rip) # 0x6ce078
leaq 0x110e91(%rip), %rax    # 0x17d0e8
cmpl $0x0, (%rax)
jne 0x6c268
leaq 0x661dd5(%rip), %rdi    # 0x6ce038
callq 0x4d49b
cmpq $0x0, 0x661dc0(%rip)    # 0x6ce030
je 0x6c28e
callq 0x4d9ef
movq 0x661db2(%rip), %rdi    # 0x6ce030
callq 0x60d0
movq $0x0, 0x661da2(%rip) # 0x6ce030
movq 0x661d8b(%rip), %rdi    # 0x6ce020
testq %rdi, %rdi
je 0x6c2aa
callq 0x67d0
movq $0x0, 0x661d76(%rip) # 0x6ce020
movq 0x661d67(%rip), %rdi    # 0x6ce018
testq %rdi, %rdi
je 0x6c2c6
callq 0x6620
movq $0x0, 0x661d52(%rip) # 0x6ce018
movq 0x661d5b(%rip), %rdi    # 0x6ce028
testq %rdi, %rdi
je 0x6c2e2
callq 0x6350
movq $0x0, 0x661d46(%rip) # 0x6ce028
movq 0x65ffe7(%rip), %rdi    # 0x6cc2d0
testq %rdi, %rdi
je 0x6c2fe
callq 0x65f0
movq $0x0, 0x65ffd2(%rip) # 0x6cc2d0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: grabmouse
void grabmouse(int a)
{
	if (appactive && moustat) {
		if (a != mouseacquired) {
			SDL_SetRelativeMouseMode(a ? SDL_TRUE : SDL_FALSE);
			mouseacquired = a;
		}
	} else {
		mouseacquired = a;
	}
	mousex = mousey = 0;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x36aab(%rip), %rax     # 0xa302c
cmpb $0x0, (%rax)
je 0x6c5a7
testb $0x1, 0x65fd4c(%rip)    # 0x6cc2d9
je 0x6c5a7
movsbl 0x65fd42(%rip), %eax    # 0x6cc2d8
cmpl %ebx, %eax
je 0x6c5ad
xorl %edi, %edi
testl %ebx, %ebx
setne %dil
callq 0x6540
movb %bl, 0x65fd2b(%rip)     # 0x6cc2d8
leaq 0x110b24(%rip), %rax    # 0x17d0d8
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x110b15(%rip), %rax    # 0x17d0d4
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: readmousexy
void readmousexy(int *x, int *y)
{
	if (!mouseacquired || !appactive || !moustat) { *x = *y = 0; return; }
	*x = mousex;
	*y = mousey;
	mousex = mousey = 0;
}

// Assembly:
cmpb $0x0, 0x65fd0e(%rip)    # 0x6cc2d8
je 0x6c5fd
leaq 0x36a59(%rip), %rax     # 0xa302c
cmpb $0x0, (%rax)
je 0x6c5fd
testb $0x1, 0x65fcfa(%rip)    # 0x6cc2d9
je 0x6c5fd
leaq 0x110aec(%rip), %rax    # 0x17d0d4
movl (%rax), %ecx
movl %ecx, (%rdi)
leaq 0x110ae5(%rip), %rcx    # 0x17d0d8
movl (%rcx), %edx
movl %edx, (%rsi)
movq %rcx, %rsi
movq %rax, %rdi
xorl %eax, %eax
movl %eax, (%rsi)
movl %eax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: inittimer
int inittimer(int tickspersecond, void(*callback)(void))
{
	if (timerfreq) return 0;    // already installed

	buildputs("Initialising timer\n");

	timerfreq = SDL_GetPerformanceFrequency();
	timerticspersec = tickspersecond;
	timerlastsample = (Uint32)(SDL_GetPerformanceCounter() * timerticspersec / timerfreq);

	usertimercallback = callback;

	return 0;
}

// Assembly:
cmpq $0x0, 0x6619b2(%rip)    # 0x6cdff8
jne 0x6c699
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x10e77(%rip), %rdi     # 0x7d4ce
callq 0x32200
callq 0x6c30
movq %rax, 0x661990(%rip)    # 0x6cdff8
movl %ebp, 0x661992(%rip)    # 0x6ce000
callq 0x62a0
movl 0x661987(%rip), %ecx    # 0x6ce000
imulq %rcx, %rax
xorl %edx, %edx
divq 0x661972(%rip)          # 0x6cdff8
movl %eax, 0x661978(%rip)    # 0x6ce004
movq %rbx, 0x661975(%rip)    # 0x6ce008
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: sampletimer
void sampletimer(void)
{
	int n;

	if (!timerfreq) return;

	n = (int)(SDL_GetPerformanceCounter() * timerticspersec / timerfreq) - timerlastsample;
	if (n>0) {
		totalclock += n;
		timerlastsample += n;
	}

	if (usertimercallback) for (; n>0; n--) usertimercallback();
}

// Assembly:
cmpq $0x0, 0x661954(%rip)    # 0x6cdff8
je 0x6c6f9
pushq %rbx
callq 0x62a0
movl 0x66194e(%rip), %ecx    # 0x6ce000
imulq %rcx, %rax
xorl %edx, %edx
divq 0x661939(%rip)          # 0x6cdff8
movl %eax, %ebx
subl 0x66193d(%rip), %ebx    # 0x6ce004
testl %ebx, %ebx
jle 0x6c6da
leaq 0x33ee16(%rip), %rcx    # 0x3ab4e8
addl %ebx, (%rcx)
movl %eax, 0x66192a(%rip)    # 0x6ce004
testl %ebx, %ebx
jle 0x6c6f8
cmpq $0x0, 0x661922(%rip)    # 0x6ce008
je 0x6c6f8
callq *0x66191a(%rip)         # 0x6ce008
leal -0x1(%rbx), %eax
cmpl $0x1, %ebx
movl %eax, %ebx
jg 0x6c6e8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: sortmodes
static int sortmodes(const struct validmode_t *a, const struct validmode_t *b)
{
	int x;

	if ((x = a->fs   - b->fs)   != 0) return x;
	if ((x = a->bpp  - b->bpp)  != 0) return x;
	if ((x = a->xdim - b->xdim) != 0) return x;
	if ((x = a->ydim - b->ydim) != 0) return x;

	return 0;
}

// Assembly:
movzbl 0x9(%rdi), %eax
movzbl 0x9(%rsi), %ecx
subl %ecx, %eax
je 0x6caf7
retq
movzbl 0x8(%rdi), %eax
movzbl 0x8(%rsi), %ecx
subl %ecx, %eax
jne 0x6caf6
movl (%rdi), %eax
subl (%rsi), %eax
jne 0x6caf6
movl 0x4(%rdi), %eax
subl 0x4(%rsi), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/sdlayer2.c
// Function: setsysgamma
int setsysgamma(float shadergamma, float sysgamma)
{
	int r = 0;
#if USE_OPENGL
	if (!glunavailable && bpp == 8) glbuild_set_8bit_gamma(&gl8bit, shadergamma);
#endif
	if (sdl_window) {
		if (sysgamma < 0.f) r = SDL_SetWindowBrightness(sdl_window, 1.0);
		else r = SDL_SetWindowBrightness(sdl_window, sysgamma);
	}
	if (r == 0) { curshadergamma = shadergamma; cursysgamma = sysgamma; }
	return r;
}

// Assembly:
subq $0x18, %rsp
leaq 0x10fbec(%rip), %rax    # 0x17d0e8
cmpl $0x0, (%rax)
jne 0x6d521
leaq 0x10fb9c(%rip), %rax    # 0x17d0a4
cmpl $0x8, (%rax)
jne 0x6d521
leaq 0x660b24(%rip), %rdi    # 0x6ce038
movaps %xmm1, (%rsp)
callq 0x4d5ad
movaps (%rsp), %xmm1
movq 0x65eda8(%rip), %rdi    # 0x6cc2d0
testq %rdi, %rdi
je 0x6d552
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
cmpltss %xmm2, %xmm0
movss 0x8a54(%rip), %xmm2     # 0x75f94
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
addq $0x18, %rsp
jmp 0x6150
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/gtkbits.c
// Function: wmgtk_msgbox
int wmgtk_msgbox(char *name, char *msg)
{
	GtkWidget *dialog;

	if (!gtkenabled) return -1;

	dialog = gtk_message_dialog_new(NULL,
			GTK_DIALOG_DESTROY_WITH_PARENT,
			GTK_MESSAGE_INFO,
			GTK_BUTTONS_OK,
			"%s", msg);
	gtk_window_set_title(GTK_WINDOW(dialog), name);
	gtk_dialog_run(GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x6606be(%rip)    # 0x6ce084
je 0x6da2f
movq %rsi, %r9
movq %rdi, %r14
leaq 0x60cd(%rip), %r8       # 0x73aa2
movl $0x1, %ebx
xorl %edi, %edi
movl $0x2, %esi
xorl %edx, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x6980
movq %rax, %r15
callq 0x6c40
movq %r15, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
movq %r14, %rsi
callq 0x6210
callq 0x66c0
movq %r15, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x6270
movq %r15, %rdi
callq 0x6180
jmp 0x6da34
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/gtkbits.c
// Function: wmgtk_ynbox
int wmgtk_ynbox(char *name, char *msg)
{
	int r;
	GtkWidget *dialog;

	if (!gtkenabled) return -1;

	dialog = gtk_message_dialog_new(NULL,
			GTK_DIALOG_DESTROY_WITH_PARENT,
			GTK_MESSAGE_INFO,
			GTK_BUTTONS_YES_NO,
			"%s", msg);
	gtk_window_set_title(GTK_WINDOW(dialog), name);
	r = gtk_dialog_run(GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);

	if (r == GTK_RESPONSE_YES) return 1;

	return 0;
}

// Assembly:
cmpl $0x0, 0x660641(%rip)    # 0x6ce084
je 0x6dab8
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r9
movq %rdi, %r14
leaq 0x604c(%rip), %r8       # 0x73aa2
xorl %edi, %edi
movl $0x2, %esi
xorl %edx, %edx
movl $0x4, %ecx
xorl %eax, %eax
callq 0x6980
movq %rax, %rbx
callq 0x6c40
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
movq %r14, %rsi
callq 0x6210
callq 0x66c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x6270
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6180
xorl %eax, %eax
cmpl $-0x8, %ebp
sete %al
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/gtkbits.c
// Function: wmgtk_filechooser
int wmgtk_filechooser(const char *initialdir, const char *initialfile, const char *type, int foropen, char **choice)
{
	GtkWidget *dialog;
	GtkFileChooserAction action;
	const char *title;
	gint r;

	GtkFileFilter *filter;
	char typepat[20];

	(void)initialdir;

	*choice = NULL;
	if (!gtkenabled) return -1;

	if (foropen) {
		action = GTK_FILE_CHOOSER_ACTION_OPEN;
		title = "_Open";
	} else {
		action = GTK_FILE_CHOOSER_ACTION_SAVE;
		title = "_Save";
	}
	dialog = gtk_file_chooser_dialog_new(title + 1, NULL, action,
		"_Cancel", GTK_RESPONSE_CANCEL,
		title, GTK_RESPONSE_ACCEPT,
		NULL);

	if (!foropen && initialfile) {
		gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), initialfile);
	}

	filter = gtk_file_filter_new();
	sprintf(typepat, "*.%s", type);
	gtk_file_filter_add_pattern(filter, typepat);
	gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);

	r = gtk_dialog_run(GTK_DIALOG(dialog));
	if (r == GTK_RESPONSE_ACCEPT) {
		GtkFileChooser *chooser = GTK_FILE_CHOOSER(dialog);
		char *fn = gtk_file_chooser_get_filename(chooser);
		if (fn) {
			*choice = strdup(fn);
			g_free(fn);
		}
	}
	gtk_widget_destroy(dialog);

	return r == GTK_RESPONSE_ACCEPT ? 1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq $0x0, (%r8)
cmpl $0x0, 0x6605aa(%rip)    # 0x6ce084
je 0x6dc06
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
xorl %edx, %edx
testl %ecx, %ecx
setne %bpl
sete %dl
leaq 0xfcc3(%rip), %rax      # 0x7d7be
leaq 0xfcb6(%rip), %r9       # 0x7d7b8
cmoveq %rax, %r9
leaq 0xfcb2(%rip), %rax      # 0x7d7bf
leaq 0xfca5(%rip), %rdi      # 0x7d7b9
cmoveq %rax, %rdi
leaq 0xfca5(%rip), %rcx      # 0x7d7c4
xorl %esi, %esi
movl $0xfffffffa, %r8d       # imm = 0xFFFFFFFA
xorl %eax, %eax
pushq $0x0
pushq $-0x3
callq 0x6ba0
addq $0x10, %rsp
movq %rax, %r14
testq %r12, %r12
sete %al
orb %bpl, %al
jne 0x6db5f
callq 0x6830
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
movq %r12, %rsi
callq 0x60e0
callq 0x6520
movq %rax, %r12
leaq 0xfc5e(%rip), %rsi      # 0x7d7cc
movq %rsp, %r13
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x6b00
movq %r12, %rdi
movq %r13, %rsi
callq 0x66f0
callq 0x6830
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
movq %r12, %rsi
callq 0x6650
callq 0x66c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x6270
movl %eax, %ebp
cmpl $-0x3, %eax
jne 0x6dbf4
movq %r14, %rdi
movq %r15, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x68a0
testq %rax, %rax
je 0x6dbf4
movq %rax, %r15
movq %rax, %rdi
callq 0x6060
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x6230
xorl %ebx, %ebx
cmpl $-0x3, %ebp
sete %bl
movq %r14, %rdi
callq 0x6180
jmp 0x6dc0b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/gtkbits.c
// Function: wmgtk_init
void wmgtk_init(int *argc, char ***argv)
{
	GdkPixbuf *appicon = NULL;
	GError *error = NULL;

	gtkenabled = gtk_init_check(argc, argv);
	if (!gtkenabled) {
		return;
	}

	startgtk_register_resource();

	appicon = gdk_pixbuf_new_from_resource("/appicon.png", &error);
	if (!appicon) {
        buildprintf("gdk_pixbuf_new_from_resource error: %s\n", error->message);
	} else {
		gtk_window_set_default_icon(appicon);
		g_object_unref(G_OBJECT(appicon));
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq $0x0, 0x8(%rsp)
callq 0x68b0
movl %eax, 0x66044f(%rip)    # 0x6ce084
testl %eax, %eax
je 0x6dc8d
callq 0xab70
leaq 0x6ef2(%rip), %rdi      # 0x74b37
leaq 0x8(%rsp), %rsi
callq 0x6a30
testq %rax, %rax
je 0x6dc76
movq %rax, %rbx
movq %rax, %rdi
callq 0x69f0
movl $0x50, %esi
movq %rbx, %rdi
callq 0x6140
movq %rax, %rdi
callq 0x6aa0
jmp 0x6dc8d
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xfb4b(%rip), %rdi      # 0x7d7d1
xorl %eax, %eax
callq 0x24cb4
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: hlineasm4
void hlineasm4(int cnt, int skiploadincs, int paloffs, unsigned int by, unsigned int bx, void *p)
{
	unsigned char *palptr, *pp;

	palptr = &ghlinepal[paloffs];
	pp = (unsigned char *)p;
	if (!skiploadincs) { gbxinc = asm1; gbyinc = asm2; }
	for(;cnt>=0;cnt--)
	{
		*pp = palptr[gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))]];
		bx -= gbxinc;
		by -= gbyinc;
		pp--;
	}
}

// Assembly:
movl %ecx, %eax
testl %esi, %esi
jne 0x6dd28
leaq 0x3a7f43(%rip), %rcx    # 0x415c54
movl (%rcx), %ecx
movl %ecx, 0x66039f(%rip)    # 0x6ce0b8
leaq 0x3a7f38(%rip), %rcx    # 0x415c58
movl (%rcx), %ecx
movl %ecx, 0x660394(%rip)    # 0x6ce0bc
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edi, %edi
js 0x6dda2
movslq %edx, %r11
addq 0x660372(%rip), %r11    # 0x6ce0b0
movq 0x660363(%rip), %rbx    # 0x6ce0a8
movl $0x20, %edx
movl $0x20, %esi
subl 0x660347(%rip), %esi    # 0x6ce09c
movl 0x660344(%rip), %r10d   # 0x6ce0a0
subl %r10d, %edx
movl 0x660353(%rip), %ebp    # 0x6ce0b8
movl 0x660350(%rip), %r14d   # 0x6ce0bc
incl %edi
movl %r8d, %r15d
movl %esi, %ecx
shrl %cl, %r15d
movl %r10d, %ecx
shll %cl, %r15d
movl %eax, %r12d
movl %edx, %ecx
shrl %cl, %r12d
addl %r15d, %r12d
movzbl (%rbx,%r12), %ecx
movb (%r11,%rcx), %cl
movb %cl, (%r9)
subl %ebp, %r8d
subl %r14d, %eax
decq %r9
decl %edi
testl %edi, %edi
jg 0x6dd6e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: slopevlin
void slopevlin(void *p, int i, void *slopaloffs, int cnt, int bx, int by)
{
	intptr_t *slopalptr;
	int bz, bzinc;
	unsigned int u, v;
	unsigned char *pp;

	bz = (int)asm3; bzinc = (asm1>>3);
	slopalptr = (intptr_t *)slopaloffs;
	pp = (unsigned char *)p;
	for(;cnt>0;cnt--)
	{
		i = krecip(bz>>6); bz += bzinc;
		u = bx+globalx3*i;
		v = by+globaly3*i;
		*pp = *(unsigned char *)(slopalptr[0]+gbuf[((u>>(32-glogx))<<glogy)+(v>>(32-glogy))]);
		slopalptr--;
		pp += gpinc;
	}
}

// Assembly:
testl %ecx, %ecx
jle 0x6de85
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r13d
movl %ecx, %r14d
movq %rdx, %r15
movq %rdi, %r12
leaq 0x3a7e5f(%rip), %rax    # 0x415c54
movl (%rax), %eax
sarl $0x3, %eax
movl %eax, 0x4(%rsp)
leaq 0x3a7e5b(%rip), %rax    # 0x415c60
movl (%rax), %ebx
incl %r14d
movl %ebx, %edi
sarl $0x6, %edi
callq 0x3577e
addl 0x4(%rsp), %ebx
leaq 0x3e4cd5(%rip), %rcx    # 0x452af4
movl (%rcx), %edx
imull %eax, %edx
addl %r13d, %edx
leaq 0x3e4cca(%rip), %rcx    # 0x452af8
imull (%rcx), %eax
addl %ebp, %eax
xorl %ecx, %ecx
subb 0x660261(%rip), %cl     # 0x6ce09c
shrl %cl, %edx
movb 0x66025d(%rip), %cl     # 0x6ce0a0
shll %cl, %edx
movq (%r15), %rsi
movq 0x660259(%rip), %rdi    # 0x6ce0a8
negb %cl
shrl %cl, %eax
addl %edx, %eax
movzbl (%rdi,%rax), %eax
movb (%rsi,%rax), %al
movb %al, (%r12)
addq $-0x8, %r15
movslq 0x660255(%rip), %rax    # 0x6ce0c0
addq %rax, %r12
decl %r14d
cmpl $0x1, %r14d
jg 0x6de0a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: vlineasm1
void vlineasm1(int vinc, void *paloffs, int cnt, unsigned int vplc, void *bufplc, void *p)
{
	unsigned char *pp;

	gbuf = (unsigned char *)bufplc;
	gpal = (unsigned char *)paloffs;
	pp = (unsigned char *)p;
	for(;cnt>=0;cnt--)
	{
		*pp = gpal[gbuf[vplc>>glogy]];
		pp += bpl;
		vplc += vinc;
	}
}

// Assembly:
movq %r8, 0x660214(%rip)     # 0x6ce0a8
movq %rsi, 0x66022d(%rip)    # 0x6ce0c8
testl %edx, %edx
js 0x6decd
movl %ecx, %eax
movl 0x6601f9(%rip), %ecx    # 0x6ce0a0
movslq 0x6601da(%rip), %r10    # 0x6ce088
incl %edx
movl %eax, %r11d
shrq %cl, %r11
movzbl (%r8,%r11), %r11d
movb (%rsi,%r11), %r11b
movb %r11b, (%r9)
addq %r10, %r9
addl %edi, %eax
decl %edx
testl %edx, %edx
jg 0x6deb0
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: mvlineasm1
void mvlineasm1(int vinc, void *paloffs, int cnt, unsigned int vplc, void *bufplc, void *p)
{
	unsigned char ch, *pp;

	gbuf = (unsigned char *)bufplc;
	gpal = (unsigned char *)paloffs;
	pp = (unsigned char *)p;
	for(;cnt>=0;cnt--)
	{
		ch = gbuf[vplc>>glogy]; if (ch != 255) *pp = gpal[ch];
		pp += bpl;
		vplc += vinc;
	}
}

// Assembly:
movq %r8, 0x6601cc(%rip)     # 0x6ce0a8
movq %rsi, 0x6601e5(%rip)    # 0x6ce0c8
testl %edx, %edx
js 0x6df1e
movl %ecx, %eax
movl 0x6601b1(%rip), %ecx    # 0x6ce0a0
movslq 0x660192(%rip), %r10    # 0x6ce088
incl %edx
movl %eax, %r11d
shrq %cl, %r11
movzbl (%r8,%r11), %r11d
cmpq $0xff, %r11
je 0x6df13
movb (%rsi,%r11), %r11b
movb %r11b, (%r9)
addq %r10, %r9
addl %edi, %eax
decl %edx
testl %edx, %edx
jg 0x6def8
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: tvlineasm1
void tvlineasm1(int vinc, void *paloffs, int cnt, unsigned int vplc, void *bufplc, void *p)
{
	unsigned char ch, *pp;

	gbuf = (unsigned char *)bufplc;
	gpal = (unsigned char *)paloffs;
	pp = (unsigned char *)p;
	if (transmode)
	{
		for(;cnt>=0;cnt--)
		{
			ch = gbuf[vplc>>glogy];
			if (ch != 255) *pp = gtrans[(*pp)+(gpal[ch]<<8)];
			pp += bpl;
			vplc += vinc;
		}
	}
	else
	{
		for(;cnt>=0;cnt--)
		{
			ch = gbuf[vplc>>glogy];
			if (ch != 255) *pp = gtrans[((*pp)<<8)+gpal[ch]];
			pp += bpl;
			vplc += vinc;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
movl %ecx, %eax
movq %r8, 0x660176(%rip)     # 0x6ce0a8
movq %rsi, 0x66018f(%rip)    # 0x6ce0c8
cmpb $0x0, 0x660158(%rip)    # 0x6ce098
je 0x6df95
testl %edx, %edx
js 0x6dfe3
movl 0x660150(%rip), %ecx    # 0x6ce0a0
movq 0x660139(%rip), %r10    # 0x6ce090
movslq 0x66012a(%rip), %r11    # 0x6ce088
incl %edx
movl %eax, %ebx
shrq %cl, %rbx
movzbl (%r8,%rbx), %ebx
cmpq $0xff, %rbx
je 0x6df88
movzbl (%r9), %r14d
movzbl (%rsi,%rbx), %ebx
shll $0x8, %ebx
orq %r14, %rbx
movb (%r10,%rbx), %bl
movb %bl, (%r9)
addq %r11, %r9
addl %edi, %eax
decl %edx
testl %edx, %edx
jg 0x6df60
jmp 0x6dfe3
testl %edx, %edx
js 0x6dfe3
movl 0x660101(%rip), %ecx    # 0x6ce0a0
movq 0x6600ea(%rip), %r10    # 0x6ce090
movslq 0x6600db(%rip), %r11    # 0x6ce088
incl %edx
movl %eax, %ebx
shrq %cl, %rbx
movzbl (%r8,%rbx), %ebx
cmpq $0xff, %rbx
je 0x6dfd8
movzbl (%r9), %r14d
shll $0x8, %r14d
movzbl (%rsi,%rbx), %ebx
orq %r14, %rbx
movb (%r10,%rbx), %bl
movb %bl, (%r9)
addq %r11, %r9
addl %edi, %eax
decl %edx
testl %edx, %edx
jg 0x6dfaf
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: mhline
void mhline(void *bufplc, unsigned int bx, int cntup16, int junk, unsigned int by, void *p)
{
	unsigned char ch, *pp;
	(void)junk;

	gbuf = (unsigned char *)bufplc;
	gpal = (unsigned char *)asm3;
	pp = (unsigned char *)p;
	for(cntup16>>=16;cntup16>0;cntup16--)
	{
		ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
		if (ch != 255) *pp = gpal[ch];
		bx += asm1;
		by += asm2;
		pp++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, 0x6600a5(%rip)    # 0x6ce0a8
leaq 0x3a7c56(%rip), %rax    # 0x415c60
movq (%rax), %rbx
movq %rbx, 0x6600b4(%rip)    # 0x6ce0c8
sarl $0x10, %edx
testl %edx, %edx
jle 0x6e082
movl $0x20, %eax
movl $0x20, %r10d
subl 0x66006f(%rip), %r10d   # 0x6ce09c
movl 0x66006c(%rip), %r11d   # 0x6ce0a0
subl %r11d, %eax
incl %edx
leaq 0x3a7c14(%rip), %r14    # 0x415c54
leaq 0x3a7c11(%rip), %r15    # 0x415c58
movl %esi, %ebp
movl %r10d, %ecx
shrl %cl, %ebp
movl %r11d, %ecx
shll %cl, %ebp
movl %r8d, %r12d
movl %eax, %ecx
shrl %cl, %r12d
addl %ebp, %r12d
movzbl (%rdi,%r12), %ecx
cmpq $0xff, %rcx
je 0x6e072
movb (%rbx,%rcx), %cl
movb %cl, (%r9)
addl (%r14), %esi
addl (%r15), %r8d
incq %r9
decl %edx
cmpl $0x1, %edx
jg 0x6e047
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: thline
void thline(void *bufplc, unsigned int bx, int cntup16, int junk, unsigned int by, void *p)
{
	unsigned char ch, *pp;
	(void)junk;

	gbuf = (unsigned char *)bufplc;
	gpal = (unsigned char *)asm3;
	pp = (unsigned char *)p;
	if (transmode)
	{
		for(cntup16>>=16;cntup16>0;cntup16--)
		{
			ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
			if (ch != 255) *pp = gtrans[(*pp)+(gpal[ch]<<8)];
			bx += asm1;
			by += asm2;
			pp++;
		}
	}
	else
	{
		for(cntup16>>=16;cntup16>0;cntup16--)
		{
			ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
			if (ch != 255) *pp = gtrans[((*pp)<<8)+gpal[ch]];
			bx += asm1;
			by += asm2;
			pp++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, 0x65ffff(%rip)    # 0x6ce0a8
leaq 0x3a7bb0(%rip), %rax    # 0x415c60
movq (%rax), %rbx
movq %rbx, 0x66000e(%rip)    # 0x6ce0c8
sarl $0x10, %edx
cmpb $0x1, 0x65ffd4(%rip)    # 0x6ce098
jne 0x6e155
testl %edx, %edx
jle 0x6e1d8
movl $0x20, %eax
movl $0x20, %r10d
subl 0x65ffb8(%rip), %r10d   # 0x6ce09c
movl 0x65ffb5(%rip), %r11d   # 0x6ce0a0
subl %r11d, %eax
movq 0x65ff9b(%rip), %r14    # 0x6ce090
incl %edx
leaq 0x3a7b56(%rip), %r15    # 0x415c54
leaq 0x3a7b53(%rip), %r12    # 0x415c58
movl %esi, %ebp
movl %r10d, %ecx
shrl %cl, %ebp
movl %r11d, %ecx
shll %cl, %ebp
movl %r8d, %r13d
movl %eax, %ecx
shrl %cl, %r13d
addl %ebp, %r13d
movzbl (%rdi,%r13), %ecx
cmpq $0xff, %rcx
je 0x6e13f
movzbl (%r9), %r13d
movzbl (%rbx,%rcx), %ecx
shll $0x8, %ecx
orq %r13, %rcx
movb (%r14,%rcx), %cl
movb %cl, (%r9)
addl (%r15), %esi
addl (%r12), %r8d
incq %r9
decl %edx
cmpl $0x1, %edx
jg 0x6e105
jmp 0x6e1d8
testl %edx, %edx
jle 0x6e1d8
movl $0x20, %eax
movl $0x20, %r10d
subl 0x65ff31(%rip), %r10d   # 0x6ce09c
movl 0x65ff2e(%rip), %r11d   # 0x6ce0a0
subl %r11d, %eax
movq 0x65ff14(%rip), %r14    # 0x6ce090
incl %edx
leaq 0x3a7acf(%rip), %r15    # 0x415c54
leaq 0x3a7acc(%rip), %r12    # 0x415c58
movl %esi, %ebp
movl %r10d, %ecx
shrl %cl, %ebp
movl %r11d, %ecx
shll %cl, %ebp
movl %r8d, %r13d
movl %eax, %ecx
shrl %cl, %r13d
addl %ebp, %r13d
movzbl (%rdi,%r13), %ecx
cmpq $0xff, %rcx
je 0x6e1c7
movzbl (%r9), %r13d
shll $0x8, %r13d
movzbl (%rbx,%rcx), %ecx
orq %r13, %rcx
movb (%r14,%rcx), %cl
movb %cl, (%r9)
addl (%r15), %esi
addl (%r12), %r8d
incq %r9
decl %edx
cmpl $0x1, %edx
jg 0x6e18c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: spritevline
void spritevline(int bx, int by, int cnt, void *bufplc, void *p)
{
	unsigned char *pp;

	gbuf = (unsigned char *)bufplc;
	pp = (unsigned char *)p;
	for(;cnt>1;cnt--)
	{
		*pp = gpal[gbuf[(bx>>16)*glogy+(by>>16)]];
		bx += gbxinc;
		by += gbyinc;
		pp += bpl;
	}
}

// Assembly:
movq %rcx, 0x65fea4(%rip)    # 0x6ce0a8
cmpl $0x2, %edx
jl 0x6e268
pushq %rbp
pushq %r14
pushq %rbx
movq 0x65feb4(%rip), %rax    # 0x6ce0c8
movl 0x65fe85(%rip), %r9d    # 0x6ce0a0
movl 0x65fe96(%rip), %r10d   # 0x6ce0b8
movl 0x65fe93(%rip), %r11d   # 0x6ce0bc
movslq 0x65fe58(%rip), %rbx    # 0x6ce088
incl %edx
movl %edi, %ebp
sarl $0x10, %ebp
imull %r9d, %ebp
movl %esi, %r14d
sarl $0x10, %r14d
addl %ebp, %r14d
movslq %r14d, %r14
movzbl (%rcx,%r14), %r14d
movb (%rax,%r14), %bpl
movb %bpl, (%r8)
addq %rbx, %r8
addl %r10d, %edi
addl %r11d, %esi
decl %edx
cmpl $0x2, %edx
jg 0x6e232
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: mspritevline
void mspritevline(int bx, int by, int cnt, void *bufplc, void *p)
{
	unsigned char ch, *pp;

	gbuf = (unsigned char *)bufplc;
	pp = (unsigned char *)p;
	for(;cnt>1;cnt--)
	{
		ch = gbuf[(bx>>16)*glogy+(by>>16)];
		if (ch != 255) *pp = gpal[ch];
		bx += gbxinc;
		by += gbyinc;
		pp += bpl;
	}
}

// Assembly:
movq %rcx, 0x65fe1e(%rip)    # 0x6ce0a8
cmpl $0x2, %edx
jl 0x6e2f5
pushq %rbp
pushq %r14
pushq %rbx
movl 0x65fe07(%rip), %eax    # 0x6ce0a0
movq 0x65fe28(%rip), %r9     # 0x6ce0c8
movl 0x65fe11(%rip), %r10d   # 0x6ce0b8
movl 0x65fe0e(%rip), %r11d   # 0x6ce0bc
movslq 0x65fdd3(%rip), %rbx    # 0x6ce088
incl %edx
movl %edi, %ebp
sarl $0x10, %ebp
imull %eax, %ebp
movl %esi, %r14d
sarl $0x10, %r14d
addl %ebp, %r14d
movslq %r14d, %r14
movzbl (%rcx,%r14), %r14d
cmpq $0xff, %r14
je 0x6e2e1
movb (%r9,%r14), %bpl
movb %bpl, (%r8)
addq %rbx, %r8
addl %r10d, %edi
addl %r11d, %esi
decl %edx
cmpl $0x2, %edx
jg 0x6e2b7
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: tspritevline
void tspritevline(int bx, int by, int cnt, void *bufplc, void *p)
{
	unsigned char ch, *pp;

	gbuf = (unsigned char *)bufplc;
	pp = (unsigned char *)p;
	if (transmode)
	{
		for(;cnt>1;cnt--)
		{
			ch = gbuf[(bx>>16)*glogy+(by>>16)];
			if (ch != 255) *pp = gtrans[(*pp)+(gpal[ch]<<8)];
			bx += gbxinc;
			by += gbyinc;
			pp += bpl;
		}
	}
	else
	{
		for(;cnt>1;cnt--)
		{
			ch = gbuf[(bx>>16)*glogy+(by>>16)];
			if (ch != 255) *pp = gtrans[((*pp)<<8)+gpal[ch]];
			bx += gbxinc;
			by += gbyinc;
			pp += bpl;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, 0x65fd89(%rip)    # 0x6ce0a8
cmpb $0x0, 0x65fd72(%rip)    # 0x6ce098
je 0x6e3a6
cmpl $0x2, %edx
jl 0x6e41e
movl 0x65fd69(%rip), %eax    # 0x6ce0a0
movq 0x65fd52(%rip), %r9     # 0x6ce090
movq 0x65fd83(%rip), %r10    # 0x6ce0c8
movl 0x65fd6c(%rip), %r11d   # 0x6ce0b8
movl 0x65fd6a(%rip), %ebx    # 0x6ce0bc
movslq 0x65fd2f(%rip), %r14    # 0x6ce088
incl %edx
movl %edi, %ebp
sarl $0x10, %ebp
imull %eax, %ebp
movl %esi, %r15d
sarl $0x10, %r15d
addl %ebp, %r15d
movslq %r15d, %r15
movzbl (%rcx,%r15), %r15d
cmpq $0xff, %r15
je 0x6e395
movzbl (%r8), %r12d
movzbl (%r10,%r15), %r15d
shll $0x8, %r15d
orq %r12, %r15
movb (%r9,%r15), %bpl
movb %bpl, (%r8)
addq %r14, %r8
addl %r11d, %edi
addl %ebx, %esi
decl %edx
cmpl $0x2, %edx
jg 0x6e35b
jmp 0x6e41e
cmpl $0x2, %edx
jl 0x6e41e
movl 0x65fcef(%rip), %eax    # 0x6ce0a0
movq 0x65fcd8(%rip), %r9     # 0x6ce090
movq 0x65fd09(%rip), %r10    # 0x6ce0c8
movl 0x65fcf2(%rip), %r11d   # 0x6ce0b8
movl 0x65fcf0(%rip), %ebx    # 0x6ce0bc
movslq 0x65fcb5(%rip), %r14    # 0x6ce088
incl %edx
movl %edi, %ebp
sarl $0x10, %ebp
imull %eax, %ebp
movl %esi, %r15d
sarl $0x10, %r15d
addl %ebp, %r15d
movslq %r15d, %r15
movzbl (%rcx,%r15), %r15d
cmpq $0xff, %r15
je 0x6e40f
movzbl (%r8), %r12d
shll $0x8, %r12d
movzbl (%r10,%r15), %r15d
orq %r12, %r15
movb (%r9,%r15), %bpl
movb %bpl, (%r8)
addq %r14, %r8
addl %r11d, %edi
addl %ebx, %esi
decl %edx
cmpl $0x2, %edx
jg 0x6e3d5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: drawslab
void drawslab (int dx, int v, int dy, int vi, void *vptr, void *p)
{
	int x;
	unsigned char *pp, *vpptr;
	
	pp = (unsigned char *)p;
	vpptr = (unsigned char *)vptr;
	while (dy > 0)
	{
		for(x=0;x<dx;x++) *(pp+x) = gpal[(int)(*(vpptr+(v>>16)))];
		pp += bpl; v += vi; dy--;
	}
}

// Assembly:
testl %edx, %edx
jle 0x6e489
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x65fc82(%rip), %rax    # 0x6ce0c8
movslq 0x65fc3b(%rip), %r10    # 0x6ce088
movl %edi, %r11d
testl %edi, %edi
jle 0x6e474
movl %esi, %ebx
sarl $0x10, %ebx
movslq %ebx, %rbx
xorl %r14d, %r14d
movzbl (%r8,%rbx), %r15d
movb (%rax,%r15), %bpl
movb %bpl, (%r9,%r14)
incq %r14
cmpq %r14, %r11
jne 0x6e45f
addq %r10, %r9
addl %ecx, %esi
leal -0x1(%rdx), %ebx
cmpl $0x1, %edx
movl %ebx, %edx
jg 0x6e450
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: stretchhline
void stretchhline (void *p0, int u, int cnt, int uinc, void *rptr, void *p)
{
	unsigned char *pp, *rpptr, *np;
	(void)p0;

	rpptr = (unsigned char *)rptr;
	pp = (unsigned char *)p;
	np = (unsigned char *)((intptr_t)p-(cnt<<2));
	do
	{
		pp--;
		*pp = *(rpptr+(u>>16)); u -= uinc;
	} while (pp > np);
}

// Assembly:
shll $0x2, %edx
movslq %edx, %rdx
movq %r9, %rax
subq %rdx, %rax
movl %esi, %edx
sarl $0x10, %edx
movslq %edx, %rdx
movb (%r8,%rdx), %dl
movb %dl, -0x1(%r9)
decq %r9
subl %ecx, %esi
cmpq %rax, %r9
ja 0x6e496
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/crc32.c
// Function: initcrc32table
void initcrc32table(void)
{
	unsigned int i,j,k;
	
	// algorithm and polynomial same as that used by infozip's zip
	for (i=0; i<256; i++) {
		j = i;
		for (k=8; k; k--)
			j = (j&1) ? (0xedb88320L ^ (j>>1)) : (j>>1);
		crc32table[i] = j;
	}
}

// Assembly:
xorl %eax, %eax
leaq 0x65fc13(%rip), %rcx    # 0x6ce0d0
movl $0xfffffff8, %edx       # imm = 0xFFFFFFF8
movl %eax, %esi
movl %esi, %edi
shrl %edi
movl %edi, %r8d
xorl $0xedb88320, %r8d       # imm = 0xEDB88320
testb $0x1, %sil
movl %r8d, %esi
cmovel %edi, %esi
incl %edx
jne 0x6e4c4
movl %esi, (%rcx,%rax,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x6e4bd
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/crc32.c
// Function: crc32once
unsigned int crc32once(unsigned char *blk, unsigned int len)
{
	unsigned int crc;
	
	crc32init(&crc);
	crc32block(&crc, blk, len);
	return crc32finish(&crc);
}

// Assembly:
testl %esi, %esi
je 0x6e51f
movl %esi, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edx, %edx
leaq 0x65fbcd(%rip), %rsi    # 0x6ce0d0
movb (%rdi,%rdx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rsi,%r8,4), %eax
incq %rdx
cmpl %edx, %ecx
jne 0x6e503
notl %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/alpha.cpp
// Function: squish::CompressAlphaDxt3(unsigned char const*, int, void*)
void CompressAlphaDxt3( u8 const* rgba, int mask, void* block )
{
    u8* bytes = reinterpret_cast< u8* >( block );

    // quantise and pack the alpha values pairwise
    for( int i = 0; i < 8; ++i )
    {
        // quantise down to 4 bits
        float alpha1 = ( float )rgba[8*i + 3] * ( 15.0f/255.0f );
        float alpha2 = ( float )rgba[8*i + 7] * ( 15.0f/255.0f );
        int quant1 = FloatToInt( alpha1, 15 );
        int quant2 = FloatToInt( alpha2, 15 );

        // set alpha to zero where masked
        int bit1 = 1 << ( 2*i );
        int bit2 = 1 << ( 2*i + 1 );
        if( ( mask & bit1 ) == 0 )
            quant1 = 0;
        if( ( mask & bit2 ) == 0 )
            quant2 = 0;

        // pack into the byte
        bytes[i] = ( u8 )( quant1 | ( quant2 << 4 ) );
    }
}

// Assembly:
xorl %ecx, %ecx
movss 0xf2aa(%rip), %xmm0     # 0x7d818
movss 0xad32(%rip), %xmm1     # 0x792a8
movl $0xf, %r10d
movzbl 0x3(%rdi,%rcx,4), %eax
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %eax
cmpl %r10d, %eax
jl 0x6e59e
movl $0xf, %eax
xorl %r8d, %r8d
testl %eax, %eax
jg 0x6e5a7
xorl %eax, %eax
movzbl 0x7(%rdi,%rcx,4), %r9d
xorps %xmm2, %xmm2
cvtsi2ss %r9d, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %r9d
cmpl %r10d, %r9d
jl 0x6e5cd
movl $0xf, %r9d
testl %r9d, %r9d
jg 0x6e5d5
xorl %r9d, %r9d
btl %ecx, %esi
cmovael %r8d, %eax
movl %esi, %r8d
shrl %cl, %r8d
shll $0x1e, %r8d
sarl $0x1f, %r8d
shll $0x4, %r9d
andl %r8d, %r9d
orl %eax, %r9d
movb %r9b, (%rdx)
addq $0x2, %rcx
incq %rdx
cmpq $0x10, %rcx
jne 0x6e57c
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/clusterfit.cpp
// Function: squish::ClusterFit::ClusterFit(squish::ColourSet const*, int, float*)
ClusterFit::ClusterFit( ColourSet const* colours, int flags, float* metric )
  : ColourFit( colours, flags )
{
    // set the iteration count
    m_iterationCount = ( m_flags & kColourIterativeClusterFit ) ? kMaxIterations : 1;

    // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f)
    if( metric )
        m_metric = Vec4( metric[0], metric[1], metric[2], 1.0f );
    else
        m_metric = VEC4_CONST( 1.0f );

    // initialise the best error
    m_besterror = VEC4_CONST( FLT_MAX );

    // cache some values
    int const count = m_colours->GetCount();
    Vec3 const* values = m_colours->GetPoints();

    // get the covariance matrix
    Sym3x3 covariance = ComputeWeightedCovariance( count, values, m_colours->GetWeights() );

    // compute the principle component
    m_principle = ComputePrincipleComponent( covariance );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdi, %rbx
callq 0x70260
leaq 0x22f0f(%rip), %rax     # 0x91bb0
movq %rax, (%rbx)
btl $0x8, 0x10(%rbx)
movl $0x1, %eax
movl $0x8, %ecx
cmovael %eax, %ecx
movl %ecx, 0x14(%rbx)
testq %r14, %r14
je 0x6eccb
movsd (%r14), %xmm0
movss 0x8(%r14), %xmm1
jmp 0x6ecda
movaps 0xeb9e(%rip), %xmm0     # 0x7d870
movss 0x72ba(%rip), %xmm1     # 0x75f94
movlps %xmm0, 0x1b4(%rbx)
movss %xmm1, 0x1bc(%rbx)
movaps 0xeb90(%rip), %xmm0     # 0x7d880
movups %xmm0, 0x1c0(%rbx)
movl $0x7f7fffff, 0x1d0(%rbx) # imm = 0x7F7FFFFF
movq 0x8(%rbx), %rcx
movl (%rcx), %esi
leaq 0x4(%rcx), %rdx
addq $0xc4, %rcx
movq %rsp, %r14
movq %r14, %rdi
callq 0x704cc
movq %r14, %rdi
callq 0x7060d
movlps %xmm0, 0x18(%rbx)
movss %xmm1, 0x20(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/simd_float.h
// Function: squish::Truncate(squish::Vec4 const&)
Vec4 Truncate( Vec4::Arg v )
    {
        return Vec4(
            v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ),
            v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ),
            v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ),
            v.m_w > 0.0f ? std::floor( v.m_w ) : std::ceil( v.m_w )
        );
    }

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movss (%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6fea1
callq 0x6850
jmp 0x6fea6
callq 0x63d0
movaps %xmm0, 0x20(%rsp)
movss 0x4(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6febf
callq 0x6850
jmp 0x6fec4
callq 0x63d0
movaps %xmm0, 0x10(%rsp)
movss 0x8(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6fedd
callq 0x6850
jmp 0x6fee2
callq 0x63d0
movaps %xmm0, (%rsp)
movss 0xc(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6fefa
callq 0x6850
jmp 0x6feff
callq 0x63d0
movaps (%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps 0x20(%rsp), %xmm0
unpcklps 0x10(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/colourblock.cpp
// Function: squish::WriteColourBlock3(squish::Vec3 const&, squish::Vec3 const&, unsigned char const*, void*)
void WriteColourBlock3( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block )
{
    // get the packed values
    int a = FloatTo565( start );
    int b = FloatTo565( end );

    // remap the indices
    u8 remapped[16];
    if( a <= b )
    {
        // use the indices directly
        for( int i = 0; i < 16; ++i )
            remapped[i] = indices[i];
    }
    else
    {
        // swap a and b
        std::swap( a, b );
        for( int i = 0; i < 16; ++i )
        {
            if( indices[i] == 0 )
                remapped[i] = 1;
            else if( indices[i] == 1 )
                remapped[i] = 0;
            else
                remapped[i] = indices[i];
        }
    }

    // write the block
    WriteColourBlock( a, b, remapped, block );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
callq 0x6ff98
movl %eax, %ebp
movq %r15, %rdi
callq 0x6ff98
cmpl %eax, %ebp
jbe 0x6ff76
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
testl %edx, %edx
je 0x6ff62
cmpl $0x1, %edx
jne 0x6ff64
xorl %edx, %edx
jmp 0x6ff64
movb $0x1, %dl
movb %dl, (%rsp,%rcx)
incq %rcx
cmpq $0x10, %rcx
jne 0x6ff50
movl %eax, %edi
movl %ebp, %eax
jmp 0x6ff80
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movl %ebp, %edi
movq %rsp, %rdx
movl %eax, %esi
movq %rbx, %rcx
callq 0x7001f
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/colourblock.cpp
// Function: squish::WriteColourBlock(int, int, unsigned char*, void*)
static void WriteColourBlock( int a, int b, u8* indices, void* block )
{
    // get the block as bytes
    u8* bytes = ( u8* )block;

    // write the endpoints
    bytes[0] = ( u8 )( a & 0xff );
    bytes[1] = ( u8 )( a >> 8 );
    bytes[2] = ( u8 )( b & 0xff );
    bytes[3] = ( u8 )( b >> 8 );

    // write the indices
    for( int i = 0; i < 4; ++i )
    {
        u8 const* ind = indices + 4*i;
        bytes[4 + i] = ind[0] | ( ind[1] << 2 ) | ( ind[2] << 4 ) | ( ind[3] << 6 );
    }
}

// Assembly:
pushq %rbx
movl %esi, %eax
movl %edi, %ebx
movb %bl, (%rcx)
movb %bh, 0x1(%rcx)
movb %al, 0x2(%rcx)
movb %ah, 0x3(%rcx)
xorl %eax, %eax
movb 0x1(%rdx,%rax,4), %sil
movb 0x2(%rdx,%rax,4), %dil
shlb $0x2, %sil
orb (%rdx,%rax,4), %sil
shlb $0x4, %dil
movb 0x3(%rdx,%rax,4), %r8b
shlb $0x6, %r8b
orb %dil, %r8b
orb %sil, %r8b
movb %r8b, 0x4(%rcx,%rax)
incq %rax
cmpq $0x4, %rax
jne 0x70031
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/colourblock.cpp
// Function: squish::WriteColourBlock4(squish::Vec3 const&, squish::Vec3 const&, unsigned char const*, void*)
void WriteColourBlock4( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block )
{
    // get the packed values
    int a = FloatTo565( start );
    int b = FloatTo565( end );

    // remap the indices
    u8 remapped[16];
    if( a < b )
    {
        // swap a and b
        std::swap( a, b );
        for( int i = 0; i < 16; ++i )
            remapped[i] = ( indices[i] ^ 0x1 ) & 0x3;
    }
    else if( a == b )
    {
        // use index 0
        for( int i = 0; i < 16; ++i )
            remapped[i] = 0;
    }
    else
    {
        // use the indices directly
        for( int i = 0; i < 16; ++i )
            remapped[i] = indices[i];
    }

    // write the block
    WriteColourBlock( a, b, remapped, block );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
callq 0x6ff98
movl %eax, %ebp
movq %r15, %rdi
callq 0x6ff98
cmpl %eax, %ebp
jae 0x700a6
movups (%r14), %xmm0
andps 0xd8c9(%rip), %xmm0     # 0x7d960
xorps 0xd8d2(%rip), %xmm0     # 0x7d970
movaps %xmm0, (%rsp)
movl %eax, %edi
jmp 0x700b9
jne 0x700ad
xorps %xmm0, %xmm0
jmp 0x700b1
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movl %ebp, %edi
movl %eax, %ebp
movq %rsp, %rdx
movl %ebp, %esi
movq %rbx, %rcx
callq 0x7001f
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/colourblock.cpp
// Function: squish::DecompressColour(unsigned char*, void const*, bool)
static int Unpack565( u8 const* packed, u8* colour )
{
    // build the packed value
    int value = ( int )packed[0] | ( ( int )packed[1] << 8 );

    // get the components in the stored range
    u8 red = ( u8 )( ( value >> 11 ) & 0x1f );
    u8 green = ( u8 )( ( value >> 5 ) & 0x3f );
    u8 blue = ( u8 )( value & 0x1f );

    // scale up to 8 bits
    colour[0] = ( red << 3 ) | ( red >> 2 );
    colour[1] = ( green << 2 ) | ( green >> 4 );
    colour[2] = ( blue << 3 ) | ( blue >> 2 );
    colour[3] = 255;

    // return the value
    return value;
}

// Assembly:
pushq %rbp
pushq %rbx
movzbl (%rsi), %ecx
movzbl 0x1(%rsi), %r9d
movl %r9d, %eax
shll $0x8, %eax
orl %ecx, %eax
movl %r9d, %r8d
shrb $0x5, %r8b
movl %r9d, %r10d
andb $-0x8, %r10b
orb %r8b, %r10b
movb %r10b, -0x28(%rsp)
movl %eax, %r10d
shrl $0x3, %r10d
movl $0xfc, %r8d
andl %r8d, %r10d
shrl %r9d
andl $0x3, %r9d
orl %r10d, %r9d
movb %r9b, -0x27(%rsp)
leal (,%rcx,8), %r9d
shrb $0x2, %cl
andb $0x7, %cl
orb %r9b, %cl
movb %cl, -0x26(%rsp)
movb $-0x1, %r9b
movb %r9b, -0x25(%rsp)
movzbl 0x2(%rsi), %r10d
movzbl 0x3(%rsi), %r11d
movl %r11d, %ecx
shll $0x8, %ecx
orl %r10d, %ecx
movl %r11d, %ebx
shrb $0x5, %bl
movl %r11d, %ebp
andb $-0x8, %bpl
orb %bl, %bpl
movb %bpl, -0x24(%rsp)
movl %ecx, %ebx
shrl $0x3, %ebx
andl %r8d, %ebx
shrl %r11d
andl $0x3, %r11d
orl %ebx, %r11d
movb %r11b, -0x23(%rsp)
leal (,%r10,8), %r8d
shrb $0x2, %r10b
andb $0x7, %r10b
orb %r8b, %r10b
movb %r10b, -0x22(%rsp)
movb %r9b, -0x21(%rsp)
cmpl %ecx, %eax
setbe %r8b
andb %dl, %r8b
movl $0xc, %r9d
movzbl -0x34(%rsp,%r9), %r11d
movzbl -0x30(%rsp,%r9), %r10d
testb %r8b, %r8b
je 0x701c1
addl %r11d, %r10d
shrl %r10d
movb %r10b, -0x2c(%rsp,%r9)
xorl %r10d, %r10d
jmp 0x701e4
leal (%r10,%r11,2), %ebx
imulq $0x55555556, %rbx, %rbx # imm = 0x55555556
shrq $0x20, %rbx
movb %bl, -0x2c(%rsp,%r9)
leal (%r11,%r10,2), %r10d
imulq $0x55555556, %r10, %r10 # imm = 0x55555556
shrq $0x20, %r10
movb %r10b, -0x28(%rsp,%r9)
incq %r9
cmpq $0xf, %r9
jne 0x701a0
movb $-0x1, -0x1d(%rsp)
cmpl %ecx, %eax
seta %al
notb %dl
orb %al, %dl
andb $0x1, %dl
negb %dl
movb %dl, -0x19(%rsp)
xorl %eax, %eax
movb 0x4(%rsi,%rax), %cl
movl %ecx, %edx
andb $0x3, %dl
movb %dl, -0x18(%rsp,%rax,4)
movl %ecx, %edx
shrb $0x2, %dl
andb $0x3, %dl
movb %dl, -0x17(%rsp,%rax,4)
movl %ecx, %edx
shrb $0x4, %dl
andb $0x3, %dl
movb %dl, -0x16(%rsp,%rax,4)
shrb $0x6, %cl
movb %cl, -0x15(%rsp,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x7020b
xorl %eax, %eax
movb -0x18(%rsp,%rax), %cl
shlb $0x2, %cl
movzbl %cl, %ecx
movl -0x28(%rsp,%rcx), %ecx
movl %ecx, (%rdi,%rax,4)
incq %rax
cmpq $0x10, %rax
jne 0x70242
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/colourfit.cpp
// Function: squish::ColourFit::Compress(void*)
void ColourFit::Compress( void* block )
{
    bool isDxt1 = ( ( m_flags & kDxt1 ) != 0 );
    if( isDxt1 )
    {
        Compress3( block );
        if( !m_colours->IsTransparent() )
            Compress4( block );
    }
    else
        Compress4( block );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testb $0x1, 0x10(%rdi)
movq (%rdi), %rax
je 0x702aa
movq %r14, %rdi
movq %rbx, %rsi
callq *0x10(%rax)
movq 0x8(%r14), %rax
cmpb $0x0, 0x144(%rax)
je 0x702a7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rax
movq 0x18(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/libsquish/colourset.cpp
// Function: squish::ColourSet::RemapIndices(unsigned char const*, unsigned char*) const
void ColourSet::RemapIndices( u8 const* source, u8* target ) const
{
    for( int i = 0; i < 16; ++i )
    {
        int j = m_remap[i];
        if( j == -1 )
            target[i] = 3;
        else
            target[i] = source[j];
    }
}

// Assembly:
xorl %eax, %eax
movslq 0x104(%rdi,%rax,4), %rcx
cmpq $-0x1, %rcx
je 0x704bb
movb (%rsi,%rcx), %cl
jmp 0x704bd
movb $0x3, %cl
movb %cl, (%rdx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x704a8
retq
nop