// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
cmpl $0x4, -0x1c(%rbp)
je 0xc181
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x11812(%rip), %rsi     # 0x1d974
leaq 0x11e82(%rip), %rcx     # 0x1dfeb
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xc3b8
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x30(%rbp), %rdx
callq 0x44b0
cmpl $0x0, %eax
je 0xc1a7
movl $0x1, -0x4(%rbp)
jmp 0xc3b8
cmpq $0x0, -0x30(%rbp)
jge 0xc1b6
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
jne 0xc201
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x41b0
movq -0x70(%rbp), %rdi
movq %rax, %rdx
leaq 0x10f43(%rip), %rsi     # 0x1d130
callq 0x40a0
cmpl $0x0, %eax
jne 0xc201
movq $0xf4240, -0x38(%rbp)   # imm = 0xF4240
jmp 0xc258
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x38(%rbp), %rdx
callq 0x44b0
cmpl $0x0, %eax
je 0xc256
movq -0x18(%rbp), %rdi
callq 0x42b0
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x11dc6(%rip), %rsi     # 0x1dffd
leaq 0x11032(%rip), %rcx     # 0x1d270
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xc3b8
jmp 0xc258
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0xc26e
movl $0x0, -0x4(%rbp)
jmp 0xc3b8
movl $0x0, -0x64(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movslq -0x64(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0xc2dc
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x48(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x4350
cltq
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xc2c1
movq -0x40(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0xc3b8
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xc2cf
jmp 0xc2dc
jmp 0xc2d1
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xc281
movq -0x30(%rbp), %rax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x64(%rbp), %rcx
xorl %eax, %eax
cmpq -0x38(%rbp), %rcx
movb %al, -0x71(%rbp)
jg 0xc30a
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0xc313
jmp 0xc353
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x50(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x4350
cltq
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xc346
movq -0x40(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0xc3b8
jmp 0xc348
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xc2eb
jmp 0xc355
callq 0x4630
movq (%rax), %rax
movq -0x50(%rbp), %rcx
movsbl -0x1(%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0xc384
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xc355
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0x51(%rbp)
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq $-0x1, %rdx
callq 0x44e0
movb -0x51(%rbp), %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)