// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x30, %eax
jl 0x118e7
movsbl -0x29(%rbp), %eax
cmpl $0x39, %eax
jle 0x118fd
movsbl -0x29(%rbp), %eax
cmpl $0x2d, %eax
je 0x118fd
movsbl -0x29(%rbp), %eax
cmpl $0x2e, %eax
jne 0x11a5b
movq -0x20(%rbp), %rax
movl $0x0, 0xd0(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x278(%rax)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
jne 0x11961
movq -0x28(%rbp), %rax
cmpl $0x22, 0x278(%rax)
je 0x11961
movl $0x0, -0x4(%rbp)
jmp 0x11ae7
movsbl -0x29(%rbp), %eax
cmpl $0x2e, %eax
je 0x1198d
movsbl -0x29(%rbp), %eax
cmpl $0x65, %eax
je 0x1198d
movsbl -0x29(%rbp), %eax
cmpl $0x45, %eax
je 0x1198d
movq -0x28(%rbp), %rax
cmpl $0x22, 0x278(%rax)
jne 0x11a59
movq -0x28(%rbp), %rax
movl $0x0, 0x278(%rax)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x4220
movq -0x20(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpl $0x22, 0x278(%rax)
jne 0x11a31
movq -0x10(%rbp), %rdi
callq 0x42b0
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x11a03
jp 0x11a03
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xd1e8(%rip), %rsi      # 0x1ebd6
leaq 0xd1f8(%rip), %rcx      # 0x1ebed
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
jmp 0x11a25
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xd1c4(%rip), %rsi      # 0x1ebd6
leaq 0xd1ed(%rip), %rcx      # 0x1ec06
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0x11ae7
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x11a57
movq -0x20(%rbp), %rax
movl $0x1, 0xd0(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x11ae7
jmp 0x11a59
jmp 0x11a5b
movq -0x20(%rbp), %rax
movl $0x2, 0xd0(%rax)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x11ae0
movq -0x18(%rbp), %rdi
callq 0x41b0
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movslq -0x3c(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jle 0x11acf
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x10, %rsi
movl -0x40(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x40d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq