// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ebp
movq 0x8(%rdi), %r14
leaq 0x4e081(%rip), %rsi     # 0x6ac68
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1cc40
leaq 0x4e0ce(%rip), %rsi     # 0x6acc8
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1cc8a
leaq 0x4e107(%rip), %rsi     # 0x6ad18
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1cce2
leaq 0x4d598(%rip), %rsi     # 0x6a1c0
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1cd09
pushq $0x1
popq %rbx
jmp 0x1cd9a
testl %ebp, %ebp
jle 0x1ccb8
movq 0x10(%rbx), %rax
movq (%rax), %r14
leaq 0x6ed9e(%rip), %r12     # 0x8b9f0
xorl %r15d, %r15d
pushq $0x1
popq %rbx
cmpq $0x3, %r15
je 0x1cd9a
movq (%r12), %rsi
movq %r14, %rdi
callq 0x6880
testl %eax, %eax
je 0x1ccae
movq %r14, %rdi
callq 0x6310
movl %eax, %eax
cmpq %rax, %r15
je 0x1ccae
incq %r15
addq $0x8, %r12
jmp 0x1cc58
testl %ebp, %ebp
jle 0x1cd43
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x194d54(%rip), %rax    # 0x1b1a00
jmp 0x1cd00
leaq 0x38883f(%rip), %rax    # 0x3a54f4
movl %r15d, (%rax)
leaq 0x388835(%rip), %rax    # 0x3a54f4
movslq (%rax), %rax
leaq 0x6ed27(%rip), %rcx     # 0x8b9f0
movq (%rcx,%rax,8), %rsi
leaq 0x4e219(%rip), %rdi     # 0x6aeed
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22427
jmp 0x1cd9a
testl %ebp, %ebp
jle 0x1cd55
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x80a80(%rip), %rax     # 0x9d780
movl %ecx, (%rax)
xorl %ebx, %ebx
jmp 0x1cd9a
testl %ebp, %ebp
jle 0x1cd70
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
pushq $0x2
popq %rcx
cmpl %ecx, %edx
cmovgel %ecx, %edx
cmpl $0x0, 0x15a3b9(%rip)    # 0x1770e8
cmovel %edx, %ecx
cmpl $0x1, %eax
cmovnel %edx, %ecx
leaq 0x80a4d(%rip), %rax     # 0x9d78c
movl %ecx, (%rax)
jmp 0x1cd79
leaq 0x194cb6(%rip), %rax    # 0x1b1a00
movl (%rax), %esi
leaq 0x4e1b5(%rip), %rdi     # 0x6af08
jmp 0x1cd65
leaq 0x80a24(%rip), %rax     # 0x9d780
movl (%rax), %esi
leaq 0x4e1b4(%rip), %rdi     # 0x6af19
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22427
jmp 0x1cd9a
leaq 0x80a15(%rip), %rax     # 0x9d78c
movl (%rax), %ecx
movslq %ecx, %rsi
leaq 0x4e285(%rip), %rax     # 0x6b008
movslq (%rax,%rsi,4), %rdx
addq %rax, %rdx
leaq 0x4e1a0(%rip), %rdi     # 0x6af31
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22427
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq