// File: /workspace/github_c_makefile_star2_O2/haxlang[P]hax/haxExpr.c
// Function: ExprParseString
static int
ExprParseString(
    Hax_Interp *interp,		/* Where to store error message. */
    char *string,		/* String to turn into value. */
    Value *valuePtr		/* Where to store value information.
				 * Caller must have initialized pv field. */)
{
    Interp *iPtr = (Interp *) interp;
    char c;

    /*
     * Try to convert the string to a number.
     */

    c = *string;
    if (((c >= '0') && (c <= '9')) || (c == '-') || (c == '.')) {
	char *term;

	valuePtr->type = TYPE_LLONG;
	iPtr->internalErrno = 0;
	valuePtr->llongValue = Strtol(iPtr, string, &term, 0);
	c = *term;
	if ((c == '\0') && (iPtr->internalErrno != HAX_ERANGE)) {
	    return HAX_OK;
	}
	if ((c == '.') || (c == 'e') || (c == 'E') ||
	    (iPtr->internalErrno == HAX_ERANGE)) {
	    iPtr->internalErrno = 0;
	    valuePtr->doubleValue = Strtod(iPtr, string, &term);
	    if (iPtr->internalErrno == HAX_ERANGE) {
		Hax_ResetResult(interp);
		if (valuePtr->doubleValue == 0.0) {
		    Hax_AppendResult(interp, "floating-point value \"",
			    string, "\" too small to represent",
			    (char *) NULL);
		} else {
		    Hax_AppendResult(interp, "floating-point value \"",
			    string, "\" too large to represent",
			    (char *) NULL);
		}
		return HAX_ERROR;
	    }
	    if (*term == '\0') {
		valuePtr->type = TYPE_DOUBLE;
		return HAX_OK;
	    }
	}
    }

    /*
     * Not a valid number.  Save a string value (but don't do anything
     * if it's already the value).
     */

    valuePtr->type = TYPE_STRING;
    if (string != valuePtr->pv.buffer) {
	int length, shortfall;

	length = strlen(string);
	valuePtr->pv.next = valuePtr->pv.buffer;
	shortfall = length - (valuePtr->pv.end - valuePtr->pv.buffer);
	if (shortfall > 0) {
	    (*valuePtr->pv.expandProc)(interp, &valuePtr->pv, shortfall);
	}
	strcpy(valuePtr->pv.buffer, string);
    }
    return HAX_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setae %cl
addb $-0x2d, %al
cmpb $0x2, %al
setae %al
testb %al, %cl
jne 0xc352
andl $0x0, 0xd0(%r15)
andl $0x0, 0x278(%r14)
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x43e0
movq %rax, (%r15)
movq (%r12), %rax
movzbl (%rax), %eax
leal -0x2e(%rax), %ecx
cmpl $0x37, %ecx
ja 0xc32e
movabsq $0x80000000800001, %rdx # imm = 0x80000000800001
btq %rcx, %rdx
jae 0xc32e
andl $0x0, 0x278(%r14)
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4240
movsd %xmm0, 0x8(%r15)
cmpl $0x22, 0x278(%r14)
jne 0xc312
movq %r14, %rdi
callq 0x42d0
movsd 0x8(%r15), %xmm0
xorpd %xmm1, %xmm1
leaq 0x861b(%rip), %rsi      # 0x14911
ucomisd %xmm1, %xmm0
jne 0xc39d
jp 0xc39d
leaq 0x861b(%rip), %rcx      # 0x14928
jmp 0xc3a4
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
jne 0xc352
movl $0x1, 0xd0(%r15)
xorl %ebp, %ebp
jmp 0xc3b7
testl %eax, %eax
jne 0xc344
xorl %ebp, %ebp
cmpl $0x22, 0x278(%r14)
je 0xc2b5
jmp 0xc3b7
cmpl $0x22, 0x278(%r14)
je 0xc2b5
movl $0x2, 0xd0(%r15)
movq 0x10(%r15), %r12
xorl %ebp, %ebp
cmpq %rbx, %r12
je 0xc3b7
movq %rbx, %rdi
callq 0x41d0
movq %r12, 0x18(%r15)
addl %r12d, %eax
subl 0x20(%r15), %eax
testl %eax, %eax
jle 0xc390
leaq 0x10(%r15), %rsi
movq %r14, %rdi
movl %eax, %edx
callq *0x28(%r15)
movq 0x10(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x40f0
jmp 0xc3b7
leaq 0x859d(%rip), %rcx      # 0x14941
movq %r14, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x4520
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop