// File: /workspace/github_c_makefile_star2_O2/haxlang[P]hax/haxGet.c
// Function: Hax_GetBoolean
int
Hax_GetBoolean(
    Hax_Interp *interp,		/* Interpreter to use for error reporting. */
    char *string,		/* String containing a boolean number
				 * specified either as 1/0 or true/false or
				 * yes/no. */
    int *boolPtr		/* Place to store converted result, which
				 * will be 0 or 1. */)
{
    char c;
    char lowerCase[10];
    int i, length;

    /*
     * Convert the input string to all lower-case.
     */

    for (i = 0; i < 9; i++) {
	c = string[i];
	if (c == 0) {
	    break;
	}
	if ((c >= 'A') && (c <= 'Z')) {
	    c += 'a' - 'A';
	}
	lowerCase[i] = c;
    }
    lowerCase[i] = 0;

    length = strlen(lowerCase);
    c = lowerCase[0];
    if ((c == '0') && (lowerCase[1] == '\0')) {
	*boolPtr = 0;
    } else if ((c == '1') && (lowerCase[1] == '\0')) {
	*boolPtr = 1;
    } else if ((c == 'y') && (strncmp(lowerCase, "yes", length) == 0)) {
	*boolPtr = 1;
    } else if ((c == 'n') && (strncmp(lowerCase, "no", length) == 0)) {
	*boolPtr = 0;
    } else if ((c == 't') && (strncmp(lowerCase, "true", length) == 0)) {
	*boolPtr = 1;
    } else if ((c == 'f') && (strncmp(lowerCase, "false", length) == 0)) {
	*boolPtr = 0;
    } else if ((c == 'o') && (length >= 2)) {
	if (strncmp(lowerCase, "on", length) == 0) {
	    *boolPtr = 1;
	} else if (strncmp(lowerCase, "off", length) == 0) {
	    *boolPtr = 0;
	}
    } else {
	Hax_AppendResult(interp, "expected boolean value but got \"",
		string, "\"", (char *) NULL);
	return HAX_ERROR;
    }
    return HAX_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
cmpq $0x9, %rax
je 0xc631
movb (%r14,%rax), %cl
testb %cl, %cl
je 0xc631
leal -0x41(%rcx), %edx
movzbl %cl, %esi
orb $0x20, %cl
cmpb $0x1a, %dl
movzbl %cl, %ecx
cmovael %esi, %ecx
movb %cl, 0x6(%rsp,%rax)
incq %rax
jmp 0xc608
movb $0x0, 0x6(%rsp,%rax)
leaq 0x6(%rsp), %r13
movq %r13, %rdi
callq 0x41d0
movq %rax, %r12
movzbl (%r13), %eax
movl %eax, %edx
xorb $0x30, %dl
movb 0x1(%r13), %cl
orb %cl, %dl
jne 0xc65d
andl $0x0, (%rbx)
jmp 0xc66c
movl %eax, %edx
xorb $0x31, %dl
orb %cl, %dl
jne 0xc67c
movl $0x1, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpl $0x66, %eax
je 0xc6c2
cmpl $0x6e, %eax
je 0xc69c
cmpl $0x74, %eax
je 0xc6a8
cmpl $0x79, %eax
jne 0xc6df
movslq %r12d, %rdx
leaq 0x8304(%rip), %rsi      # 0x1499e
jmp 0xc6b2
movslq %r12d, %rdx
leaq 0x82fc(%rip), %rsi      # 0x149a2
jmp 0xc6cc
movslq %r12d, %rdx
leaq 0x82f3(%rip), %rsi      # 0x149a5
leaq 0x6(%rsp), %rdi
callq 0x40c0
testl %eax, %eax
jne 0xc73e
jmp 0xc666
movslq %r12d, %rdx
leaq 0x82de(%rip), %rsi      # 0x149aa
leaq 0x6(%rsp), %rdi
callq 0x40c0
testl %eax, %eax
jne 0xc73e
jmp 0xc658
cmpl $0x6f, %eax
sete %al
cmpl $0x2, %r12d
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc73e
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
leaq 0x771a(%rip), %rsi      # 0x13e1b
leaq 0x6(%rsp), %rdi
movq %r12, %rdx
callq 0x40c0
testl %eax, %eax
je 0xc666
leaq 0x8293(%rip), %rsi      # 0x149b0
leaq 0x6(%rsp), %rdi
movq %r12, %rdx
callq 0x40c0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xc66e
andl $0x0, (%rbx)
jmp 0xc66e
leaq 0x826f(%rip), %rsi      # 0x149b4
leaq 0x6b63(%rip), %rcx      # 0x132af
movq %r15, %rdi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x4520
pushq $0x1
popq %rax
jmp 0xc66e