// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: osdcmd_vars
static int osdcmd_vars(const osdfuncparm_t *parm)
{
	int showval = (parm->numparms < 1);

	if (!Bstrcasecmp(parm->name, "screencaptureformat")) {
		const char *fmts[3] = { "TGA", "PCX", "PNG" };
		if (!showval) {
			int i;
			for (i=0; i<3; i++)
				if (!Bstrcasecmp(parm->parms[0], fmts[i]) || atoi(parm->parms[0]) == i) {
					captureformat = i;
					break;
				}
			if (i == 3) return OSDCMD_SHOWHELP;
		}
		buildprintf("screencaptureformat is %s\n", fmts[captureformat]);
		return OSDCMD_OK;
	}
	else if (!Bstrcasecmp(parm->name, "novoxmips")) {
		if (showval) { buildprintf("novoxmips is %d\n", novoxmips); }
		else { novoxmips = (atoi(parm->parms[0]) != 0); }
		return OSDCMD_OK;
	}
	else if (!Bstrcasecmp(parm->name, "usevoxels")) {
		if (showval) { buildprintf("usevoxels is %d\n", usevoxels); }
		else { usevoxels = (atoi(parm->parms[0]) != 0); }
		return OSDCMD_OK;
	}
	else if (!Bstrcasecmp(parm->name, "usegammabrightness")) {
		const char *types[3] = { "palette", "shader", "system" };
		if (!showval) {
			usegammabrightness = atoi(parm->parms[0]);
			usegammabrightness = min(max(0, usegammabrightness), 2);
#if USE_OPENGL
			if (usegammabrightness == 1 && glunavailable) usegammabrightness = 2;
#endif
		}
		buildprintf("usegammabrightness is %d (%s)\n", usegammabrightness, types[usegammabrightness]);
		return OSDCMD_OK;
	}
	return OSDCMD_SHOWHELP;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %r15d
movq 0x8(%rdi), %r14
leaq 0x56b46(%rip), %rsi     # 0x75d28
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1f280
leaq 0x56b8f(%rip), %rsi     # 0x75d88
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1f2cb
leaq 0x56bc8(%rip), %rsi     # 0x75dd8
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1f31d
leaq 0x56059(%rip), %rsi     # 0x75280
movq %r14, %rdi
callq 0x6880
movl $0x1, %ebp
testl %eax, %eax
jne 0x1f399
testl %r15d, %r15d
jle 0x1f36f
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
movl $0x2, %ecx
cmpl %ecx, %edx
cmovgel %ecx, %edx
cmpl $0x0, 0x15ee7f(%rip)    # 0x17e0e8
cmovel %edx, %ecx
cmpl $0x1, %eax
cmovnel %edx, %ecx
leaq 0x85513(%rip), %rax     # 0xa478c
movl %ecx, (%rax)
jmp 0x1f378
testl %r15d, %r15d
jle 0x1f2f6
movq 0x10(%rbx), %rax
movq (%rax), %rbx
leaq 0x7377d(%rip), %r15     # 0x92a10
xorl %r14d, %r14d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x6880
testl %eax, %eax
je 0x1f2ec
movq %rbx, %rdi
callq 0x6310
movl %eax, %eax
cmpq %rax, %r14
je 0x1f2ec
incq %r14
addq $0x8, %r15
cmpq $0x3, %r14
jne 0x1f296
movl $0x1, %ebp
jmp 0x1f399
testl %r15d, %r15d
jle 0x1f342
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x199716(%rip), %rax    # 0x1b8a00
jmp 0x1f33c
leaq 0x38d201(%rip), %rax    # 0x3ac4f4
movl %r14d, (%rax)
leaq 0x38d1f7(%rip), %rax    # 0x3ac4f4
movslq (%rax), %rax
leaq 0x73709(%rip), %rcx     # 0x92a10
movq (%rcx,%rax,8), %rsi
leaq 0x56c9b(%rip), %rdi     # 0x75fad
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x25221
jmp 0x1f399
testl %r15d, %r15d
jle 0x1f354
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x85444(%rip), %rax     # 0xa4780
movl %ecx, (%rax)
xorl %ebp, %ebp
jmp 0x1f399
leaq 0x1996b7(%rip), %rax    # 0x1b8a00
movl (%rax), %esi
leaq 0x56c76(%rip), %rdi     # 0x75fc8
jmp 0x1f364
leaq 0x85425(%rip), %rax     # 0xa4780
movl (%rax), %esi
leaq 0x56c75(%rip), %rdi     # 0x75fd9
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x25221
jmp 0x1f399
leaq 0x85416(%rip), %rax     # 0xa478c
movl (%rax), %ecx
movslq %ecx, %rsi
leaq 0x56d46(%rip), %rax     # 0x760c8
movslq (%rax,%rsi,4), %rdx
addq %rax, %rdx
leaq 0x56c61(%rip), %rdi     # 0x75ff1
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x25221
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq