// File: /workspace/github_c_makefile_star2_O1/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 0x55eeb(%rip), %rsi     # 0x74c38
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1ee0f
leaq 0x55f34(%rip), %rsi     # 0x74c98
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1ee5a
leaq 0x55f6d(%rip), %rsi     # 0x74ce8
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1eeb7
leaq 0x55406(%rip), %rsi     # 0x74198
movq %r14, %rdi
callq 0x6880
movl $0x1, %ebp
testl %eax, %eax
jne 0x1ef07
testl %r15d, %r15d
jle 0x1ede2
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
movl $0x2, %edx
cmpl %edx, %ecx
cmovgel %edx, %ecx
leaq 0x849bc(%rip), %rsi     # 0xa378c
cmpl $0x0, 0x15e311(%rip)    # 0x17d0e8
cmovel %ecx, %edx
cmpl $0x1, %eax
cmovnel %ecx, %edx
movl %edx, (%rsi)
leaq 0x849a3(%rip), %rax     # 0xa378c
movslq (%rax), %rsi
leaq 0x561e5(%rip), %rax     # 0x74fd8
movslq (%rax,%rsi,4), %rdx
addq %rax, %rdx
leaq 0x56100(%rip), %rdi     # 0x74f01
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x24cb4
jmp 0x1ef07
testl %r15d, %r15d
jle 0x1ee90
movq 0x10(%rbx), %rax
movq (%rax), %rbx
leaq 0x72bae(%rip), %r15     # 0x919d0
xorl %r14d, %r14d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x6880
testl %eax, %eax
je 0x1ee7b
movq %rbx, %rdi
callq 0x6310
movl %eax, %eax
cmpq %rax, %r14
je 0x1ee7b
incq %r14
addq $0x8, %r15
cmpq $0x3, %r14
jne 0x1ee25
movl $0x1, %ebp
jmp 0x1ef07
testl %r15d, %r15d
jle 0x1eedc
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x198b87(%rip), %rax    # 0x1b7a00
jmp 0x1eed6
leaq 0x38c672(%rip), %rax    # 0x3ab4f4
movl %r14d, (%rax)
movl $0x1, %ebp
cmpq $0x3, %r14
je 0x1ef07
leaq 0x38c65d(%rip), %rax    # 0x3ab4f4
movslq (%rax), %rax
leaq 0x72b2f(%rip), %rcx     # 0x919d0
movq (%rcx,%rax,8), %rsi
leaq 0x56011(%rip), %rdi     # 0x74ebd
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x24cb4
jmp 0x1ef07
testl %r15d, %r15d
jle 0x1eeee
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x848aa(%rip), %rax     # 0xa3780
movl %ecx, (%rax)
xorl %ebp, %ebp
jmp 0x1ef07
leaq 0x198b1d(%rip), %rax    # 0x1b7a00
movl (%rax), %esi
leaq 0x55fec(%rip), %rdi     # 0x74ed8
jmp 0x1eefe
leaq 0x8488b(%rip), %rax     # 0xa3780
movl (%rax), %esi
leaq 0x55feb(%rip), %rdi     # 0x74ee9
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x24cb4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq