// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxExpr.c
// Function: ExprLex
static int
ExprLex(
    Hax_Interp *interp,			/* Interpreter to use for error
					 * reporting. */
    ExprInfo *infoPtr,		/* Describes the state of the parse. */
    Value *valuePtr		/* Where to store value, if that is
					 * what's parsed from string.  Caller
					 * must have initialized pv field
					 * correctly. */)
{
    Interp *iPtr = (Interp *) interp;
    char *p, c;
    char *var, *term;
    int result;

    p = infoPtr->expr;
    c = *p;
    while (isspace(c)) {
	p++;
	c = *p;
    }
    infoPtr->expr = p+1;
    switch (c) {
	case '0':
	case '1':
	case '2':
	case '3':
	case '4':
	case '5':
	case '6':
	case '7':
	case '8':
	case '9':
	case '.':

	    /*
	     * Number.  First read an integer.  Then if it looks like
	     * there's a floating-point number (or if it's too big a
	     * number to fit in an integer), parse it as a floating-point
	     * number.
	     */

	    infoPtr->token = VALUE;
	    valuePtr->type = TYPE_LLONG;
	    iPtr->internalErrno = 0;
	    valuePtr->llongValue = Strtoul(iPtr, p, &term, 0);
	    c = *term;
	    if ((c == '.') || (c == 'e') || (c == 'E') ||
		(iPtr->internalErrno == HAX_ERANGE)) {
		char *term2;

		iPtr->internalErrno = 0;
		valuePtr->doubleValue = Strtod(iPtr, p, &term2);
		if (iPtr->internalErrno == HAX_ERANGE) {
		    Hax_ResetResult(interp);
		    if (valuePtr->doubleValue == 0.0) {
			interp->result =
				(char *) "floating-point value too small to "
				    "represent";
		    } else {
			interp->result =
				(char *) "floating-point value too large to "
				    "represent";
		    }
		    return HAX_ERROR;
		}
		if (term2 == infoPtr->expr) {
		    interp->result =
			(char *) "poorly-formed floating-point value";
		    return HAX_ERROR;
		}
		valuePtr->type = TYPE_DOUBLE;
		infoPtr->expr = term2;
	    } else {
		infoPtr->expr = term;
	    }
	    return HAX_OK;

	case '$':

	    /*
	     * Variable.  Fetch its value, then see if it makes sense
	     * as an integer or floating-point number.
	     */

	    infoPtr->token = VALUE;
	    var = Hax_ParseVar(interp, p, &infoPtr->expr);
	    if (var == NULL) {
		return HAX_ERROR;
	    }
	    if (((Interp *) interp)->noEval) {
		valuePtr->type = TYPE_LLONG;
		valuePtr->llongValue = 0;
		return HAX_OK;
	    }
	    return ExprParseString(interp, var, valuePtr);

	case '[':
	    infoPtr->token = VALUE;
	    result = Hax_Eval(interp, NULL, p+1, HAX_BRACKET_TERM,
		    &infoPtr->expr);
	    if (result != HAX_OK) {
		return result;
	    }
	    infoPtr->expr++;
	    if (((Interp *) interp)->noEval) {
		valuePtr->type = TYPE_LLONG;
		valuePtr->llongValue = 0;
		Hax_ResetResult(interp);
		return HAX_OK;
	    }
	    result = ExprParseString(interp, interp->result, valuePtr);
	    if (result != HAX_OK) {
		return result;
	    }
	    Hax_ResetResult(interp);
	    return HAX_OK;

	case '"':
	    infoPtr->token = VALUE;
	    result = HaxParseQuotes(interp, infoPtr->expr, '"', 0,
		    &infoPtr->expr, &valuePtr->pv);
	    if (result != HAX_OK) {
		return result;
	    }
	    return ExprParseString(interp, valuePtr->pv.buffer, valuePtr);

	case '{':
	    infoPtr->token = VALUE;
	    result = HaxParseBraces(interp, infoPtr->expr, &infoPtr->expr,
		    &valuePtr->pv);
	    if (result != HAX_OK) {
		return result;
	    }
	    return ExprParseString(interp, valuePtr->pv.buffer, valuePtr);

	case '(':
	    infoPtr->token = OPEN_PAREN;
	    return HAX_OK;

	case ')':
	    infoPtr->token = CLOSE_PAREN;
	    return HAX_OK;

	case '*':
	    infoPtr->token = MULT;
	    return HAX_OK;

	case '/':
	    infoPtr->token = DIVIDE;
	    return HAX_OK;

	case '%':
	    infoPtr->token = MOD;
	    return HAX_OK;

	case '+':
	    infoPtr->token = PLUS;
	    return HAX_OK;

	case '-':
	    infoPtr->token = MINUS;
	    return HAX_OK;

	case '?':
	    infoPtr->token = QUESTY;
	    return HAX_OK;

	case ':':
	    infoPtr->token = COLON;
	    return HAX_OK;

	case '<':
	    switch (p[1]) {
		case '<':
		    infoPtr->expr = p+2;
		    infoPtr->token = LEFT_SHIFT;
		    break;
		case '=':
		    infoPtr->expr = p+2;
		    infoPtr->token = LEQ;
		    break;
		default:
		    infoPtr->token = LESS;
		    break;
	    }
	    return HAX_OK;

	case '>':
	    switch (p[1]) {
		case '>':
		    infoPtr->expr = p+2;
		    infoPtr->token = RIGHT_SHIFT;
		    break;
		case '=':
		    infoPtr->expr = p+2;
		    infoPtr->token = GEQ;
		    break;
		default:
		    infoPtr->token = GREATER;
		    break;
	    }
	    return HAX_OK;

	case '=':
	    if (p[1] == '=') {
		infoPtr->expr = p+2;
		infoPtr->token = EQUAL;
	    } else {
		infoPtr->token = UNKNOWN;
	    }
	    return HAX_OK;

	case '!':
	    if (p[1] == '=') {
		infoPtr->expr = p+2;
		infoPtr->token = NEQ;
	    } else {
		infoPtr->token = NOT;
	    }
	    return HAX_OK;

	case '&':
	    if (p[1] == '&') {
		infoPtr->expr = p+2;
		infoPtr->token = AND;
	    } else {
		infoPtr->token = BIT_AND;
	    }
	    return HAX_OK;

	case '^':
	    infoPtr->token = BIT_XOR;
	    return HAX_OK;

	case '|':
	    if (p[1] == '|') {
		infoPtr->expr = p+2;
		infoPtr->token = OR;
	    } else {
		infoPtr->token = BIT_OR;
	    }
	    return HAX_OK;

	case '~':
	    infoPtr->token = BIT_NOT;
	    return HAX_OK;

	case 0:
	    infoPtr->token = END;
	    infoPtr->expr = p;
	    return HAX_OK;

	default:
	    infoPtr->expr = p+1;
	    infoPtr->token = UNKNOWN;
	    return HAX_OK;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %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
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
callq 0x4630
movq (%rax), %rax
movsbl -0x31(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x11135
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
jmp 0x11101
movq -0x30(%rbp), %rcx
incq %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movsbl -0x31(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x60(%rbp)
subl $0x7e, %eax
ja 0x117bd
movq -0x60(%rbp), %rax
leaq 0xd6ca(%rip), %rcx      # 0x1e82c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0xd0(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x278(%rax)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x48(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4340
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0x2e, %eax
je 0x111e4
movsbl -0x31(%rbp), %eax
cmpl $0x65, %eax
je 0x111e4
movsbl -0x31(%rbp), %eax
cmpl $0x45, %eax
je 0x111e4
movq -0x28(%rbp), %rax
cmpl $0x22, 0x278(%rax)
jne 0x112a4
movq -0x28(%rbp), %rax
movl $0x0, 0x278(%rax)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x4220
movq -0x20(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpl $0x22, 0x278(%rax)
jne 0x11260
movq -0x10(%rbp), %rdi
callq 0x42b0
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x11246
jp 0x11246
movq -0x10(%rbp), %rax
leaq 0xd91a(%rip), %rcx      # 0x1eb5b
movq %rcx, (%rax)
jmp 0x11254
movq -0x10(%rbp), %rax
leaq 0xd936(%rip), %rcx      # 0x1eb87
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117df
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x11288
movq -0x10(%rbp), %rax
leaq 0xd93a(%rip), %rcx      # 0x1ebb3
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x117df
movq -0x20(%rbp), %rax
movl $0x1, 0xd0(%rax)
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x112b0
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
callq 0x43e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x112f3
movl $0x1, -0x4(%rbp)
jmp 0x117df
movq -0x10(%rbp), %rax
cmpl $0x0, 0x194(%rax)
je 0x11325
movq -0x20(%rbp), %rax
movl $0x0, 0xd0(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x118b0
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
addq $0x1, %rdx
movq -0x18(%rbp), %r8
addq $0x8, %r8
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x45b0
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x1137f
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x194(%rax)
je 0x113ca
movq -0x20(%rbp), %rax
movl $0x0, 0xd0(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
callq 0x42b0
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x118b0
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x113f2
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x10(%rbp), %rdi
callq 0x42b0
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %r8
addq $0x8, %r8
movq -0x20(%rbp), %r9
addq $0x10, %r9
movl $0x22, %edx
xorl %ecx, %ecx
callq 0x4470
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x1144e
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x118b0
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
movq -0x20(%rbp), %rcx
addq $0x10, %rcx
callq 0x45c0
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x114ab
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x118b0
movl %eax, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x1, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x2, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x8, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x9, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0xa, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0xb, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0xc, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x1a, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x1b, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x64(%rbp)
subl $0x3c, %eax
je 0x115b3
jmp 0x115a9
movl -0x64(%rbp), %eax
subl $0x3d, %eax
je 0x115d0
jmp 0x115ed
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0xd, 0x10(%rax)
jmp 0x115f8
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x11, 0x10(%rax)
jmp 0x115f8
movq -0x18(%rbp), %rax
movl $0xf, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x68(%rbp)
subl $0x3d, %eax
je 0x1163d
jmp 0x11616
movl -0x68(%rbp), %eax
subl $0x3e, %eax
jne 0x1165a
jmp 0x11620
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0xe, 0x10(%rax)
jmp 0x11665
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x12, 0x10(%rax)
jmp 0x11665
movq -0x18(%rbp), %rax
movl $0x10, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3d, %eax
jne 0x1169b
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x13, 0x10(%rax)
jmp 0x116a6
movq -0x18(%rbp), %rax
movl $0x4, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3d, %eax
jne 0x116dc
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x14, 0x10(%rax)
jmp 0x116e7
movq -0x18(%rbp), %rax
movl $0x1d, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x26, %eax
jne 0x1171d
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x18, 0x10(%rax)
jmp 0x11728
movq -0x18(%rbp), %rax
movl $0x15, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x16, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7c, %eax
jne 0x11775
movq -0x30(%rbp), %rcx
addq $0x2, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x19, 0x10(%rax)
jmp 0x11780
movq -0x18(%rbp), %rax
movl $0x17, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x1e, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x18(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x117df
movq -0x30(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x4, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)