// File: /workspace/github_c_makefile_star2_O2/haxlang[P]hax/haxCmdIL.c
// Function: Hax_LrangeCmd
int
Hax_LrangeCmd(
    ClientData notUsed,			/* Not used. */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    long int first, last, result;
    char *begin, *end, c, *dummy;
    int count;

    if (argc != 4) {
	Hax_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" list first last\"", (char *) NULL);
	return HAX_ERROR;
    }
    if (Hax_GetLong(interp, argv[2], &first) != HAX_OK) {
	return HAX_ERROR;
    }
    if (first < 0) {
	first = 0;
    }
    if ((*argv[3] == 'e') && (strncmp(argv[3], "end", strlen(argv[3])) == 0)) {
	last = 1000000;
    } else {
	if (Hax_GetLong(interp, argv[3], &last) != HAX_OK) {
	    Hax_ResetResult(interp);
	    Hax_AppendResult(interp,
		    "expected integer or \"end\" but got \"",
		    argv[3], "\"", (char *) NULL);
	    return HAX_ERROR;
	}
    }
    if (first > last) {
	return HAX_OK;
    }

    /*
     * Extract a range of fields.
     */

    for (count = 0, begin = argv[1]; count < first; count++) {
	result = HaxFindElement(interp, begin, &dummy, &begin,
		(long int *) NULL, (int *) NULL);
	if (result != HAX_OK) {
	    return result;
	}
	if (*begin == 0) {
	    break;
	}
    }
    for (count = first, end = begin; (count <= last) && (*end != 0);
	    count++) {
	result = HaxFindElement(interp, end, &dummy, &end, (long int *) NULL,
		(int *) NULL);
	if (result != HAX_OK) {
	    return result;
	}
    }

    /*
     * Chop off trailing spaces.
     */

    while (isspace(end[-1])) {
	end--;
    }
    c = *end;
    *end = 0;
    Hax_SetResult(interp, begin, HAX_VOLATILE);
    *end = c;
    return HAX_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rsi, %rbx
cmpl $0x4, %edx
jne 0x8fc3
movq 0x10(%r14), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x44d0
pushq $0x1
popq %rbp
testl %eax, %eax
jne 0x8fe4
movq (%rsp), %r12
testq %r12, %r12
jns 0x8f5e
andq $0x0, (%rsp)
xorl %r12d, %r12d
movq 0x18(%r14), %r15
cmpb $0x65, (%r15)
jne 0x8f86
movq %r15, %rdi
callq 0x41d0
leaq 0xa1e5(%rip), %rsi      # 0x1315c
movq %r15, %rdi
movq %rax, %rdx
callq 0x40c0
testl %eax, %eax
je 0x9000
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x44d0
testl %eax, %eax
je 0x8ff5
movq %rbx, %rdi
callq 0x42d0
movq 0x18(%r14), %rdx
leaq 0xaf92(%rip), %rsi      # 0x13f3f
leaq 0xa2fb(%rip), %rcx      # 0x132af
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x4520
jmp 0x8fe4
movq (%r14), %rdx
leaq 0xa893(%rip), %rsi      # 0x13860
leaq 0xaf59(%rip), %rcx      # 0x13f2d
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x4520
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %r12
movq 0x10(%rsp), %rax
jmp 0x900e
movq $0xf4240, 0x10(%rsp)    # imm = 0xF4240
movl $0xf4240, %eax          # imm = 0xF4240
xorl %ebp, %ebp
cmpq %rax, %r12
jg 0x8fe4
movq 0x8(%r14), %rsi
leaq 0x18(%rsp), %r14
movq %rsi, (%r14)
pushq $-0x1
popq %r12
leaq 0x20(%rsp), %r15
movq (%rsp), %rax
incq %r12
cmpq %r12, %rax
jle 0x9060
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4380
testl %eax, %eax
jne 0x90ef
movq 0x18(%rsp), %rsi
cmpb $0x0, (%rsi)
jne 0x902a
movq (%rsp), %rax
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
movslq %eax, %r13
decq %r13
leaq 0x20(%rsp), %r12
movq 0x8(%rsp), %r15
incq %r13
cmpq %r13, 0x10(%rsp)
jl 0x90aa
cmpb $0x0, (%r15)
je 0x90aa
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4380
movl %eax, %ebp
testl %eax, %eax
je 0x9073
jmp 0x8fe4
callq 0x4660
decq %r15
movq (%rax), %rcx
movsbq (%r15), %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x90c7
movq %r15, 0x8(%rsp)
jmp 0x90af
movb 0x1(%r15), %bpl
movb $0x0, 0x1(%r15)
movq 0x18(%rsp), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x4500
movq 0x8(%rsp), %rax
movb %bpl, (%rax)
xorl %ebp, %ebp
jmp 0x8fe4
movl %eax, %ebp
jmp 0x8fe4