// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
movb (%r14,%rax), %cl
testb %cl, %cl
je 0xd65d
leal -0x41(%rcx), %edx
movzbl %cl, %esi
orb $0x20, %cl
cmpb $0x1a, %dl
movzbl %cl, %ecx
cmovael %esi, %ecx
movb %cl, 0xe(%rsp,%rax)
incq %rax
cmpq $0x9, %rax
jne 0xd631
movl $0x9, %eax
movl %eax, %eax
movb $0x0, 0xe(%rsp,%rax)
leaq 0xe(%rsp), %r13
movq %r13, %rdi
callq 0x41d0
movq %rax, %r12
movzbl (%r13), %ebp
movl %ebp, %ecx
xorb $0x30, %cl
movb 0x1(%r13), %al
orb %al, %cl
jne 0xd68e
movl $0x0, (%rbx)
jmp 0xd69d
movl %ebp, %ecx
xorb $0x31, %cl
orb %al, %cl
jne 0xd6ae
movl $0x1, (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x73, %ebp
jg 0xd6e5
cmpl $0x66, %ebp
je 0xd732
cmpl $0x6e, %ebp
jne 0xd74e
movslq %r12d, %rdx
leaq 0x94f7(%rip), %rsi      # 0x16bc2
leaq 0xe(%rsp), %rdi
callq 0x40c0
testl %eax, %eax
je 0xd686
cmpl $0x66, %ebp
je 0xd732
cmpl $0x74, %ebp
je 0xd711
jmp 0xd74e
cmpl $0x74, %ebp
je 0xd711
cmpl $0x79, %ebp
jne 0xd74e
movslq %r12d, %rdx
leaq 0x94c5(%rip), %rsi      # 0x16bbe
leaq 0xe(%rsp), %rdi
callq 0x40c0
testl %eax, %eax
je 0xd697
cmpl $0x66, %ebp
je 0xd732
cmpl $0x74, %ebp
jne 0xd6b8
movslq %r12d, %rdx
leaq 0x94aa(%rip), %rsi      # 0x16bc5
leaq 0xe(%rsp), %rdi
callq 0x40c0
testl %eax, %eax
je 0xd697
cmpl $0x66, %ebp
jne 0xd74e
movslq %r12d, %rdx
leaq 0x948e(%rip), %rsi      # 0x16bca
leaq 0xe(%rsp), %rdi
callq 0x40c0
testl %eax, %eax
je 0xd686
cmpl $0x6f, %ebp
sete %al
cmpl $0x2, %r12d
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xd7b0
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
leaq 0x884f(%rip), %rsi      # 0x15fbf
leaq 0xe(%rsp), %rdi
movq %r12, %rdx
callq 0x40c0
testl %eax, %eax
je 0xd697
leaq 0x9444(%rip), %rsi      # 0x16bd0
leaq 0xe(%rsp), %rdi
movq %r12, %rdx
callq 0x40c0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xd69f
movl $0x0, (%rbx)
jmp 0xd69f
leaq 0x941d(%rip), %rsi      # 0x16bd4
leaq 0x7af1(%rip), %rcx      # 0x152af
movq %r15, %rdi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x4500
movl $0x1, %eax
jmp 0xd69f