// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxCmdIL.c
// Function: Hax_LindexCmd
int
Hax_LindexCmd(
    ClientData dummy,			/* Not used. */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    Interp *iPtr = (Interp *) interp;
    Hax_Memoryp *memoryp = iPtr->memoryp;
    char *p, *element;
    int parenthesized, result;
    long int index, size;

    if (argc != 3) {
	Hax_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" list index\"", (char *) NULL);
	return HAX_ERROR;
    }
    if (Hax_GetLong(interp, argv[2], &index) != HAX_OK) {
	return HAX_ERROR;
    }
    if (index < 0) {
	return HAX_OK;
    }
    for (p = argv[1] ; index >= 0; index--) {
	result = HaxFindElement(interp, p, &element, &p, &size,
		&parenthesized);
	if (result != HAX_OK) {
	    return result;
	}
    }
    if (size == 0) {
	return HAX_OK;
    }
    if (size >= HAX_RESULT_SIZE) {
	interp->result = (char *) ckalloc(memoryp, (unsigned) size+1);
	interp->freeProc = (Hax_FreeProc *) free;
    }
    if (parenthesized) {
	memcpy(interp->result, element, size);
	interp->result[size] = 0;
    } else {
	HaxCopyAndCollapse(size, element, interp->result);
    }
    return HAX_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x280(%rax), %rax
movq %rax, -0x38(%rbp)
cmpl $0x3, -0x1c(%rbp)
je 0xbc45
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x11d4e(%rip), %rsi     # 0x1d974
leaq 0x12387(%rip), %rcx     # 0x1dfb4
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xbd70
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x58(%rbp), %rdx
callq 0x44b0
cmpl $0x0, %eax
je 0xbc6b
movl $0x1, -0x4(%rbp)
jmp 0xbd70
cmpq $0x0, -0x58(%rbp)
jge 0xbc7e
movl $0x0, -0x4(%rbp)
jmp 0xbd70
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x58(%rbp)
jl 0xbcd2
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x60(%rbp), %r8
leaq -0x4c(%rbp), %r9
callq 0x4350
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
je 0xbcc2
movl -0x50(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xbd70
jmp 0xbcc4
movq -0x58(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0xbc8a
cmpq $0x0, -0x60(%rbp)
jne 0xbce5
movl $0x0, -0x4(%rbp)
jmp 0xbd70
cmpq $0xc7, -0x60(%rbp)
jl 0xbd28
movq -0x38(%rbp), %rdi
movq -0x60(%rbp), %rax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x122a4(%rip), %rdx     # 0x1dfa9
movl $0x2a5, %ecx            # imm = 0x2A5
callq 0x44c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x17284(%rip), %rcx     # 0x22fa8
movq %rcx, 0x8(%rax)
cmpl $0x0, -0x4c(%rbp)
je 0xbd53
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x4390
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xbd69
movq -0x60(%rbp), %rax
movl %eax, %edi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x4140
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)