// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_ListIndices
static int Jim_ListIndices(Jim_Interp *interp, Jim_Obj *listPtr,
    Jim_Obj *const *indexv, int indexc, Jim_Obj **resultObj, int flags)
{
    int i;
    int static_idxes[5];
    int *idxes = static_idxes;
    int ret = JIM_OK;

    if (indexc > sizeof(static_idxes) / sizeof(*static_idxes)) {
        idxes = Jim_Alloc(indexc * sizeof(*idxes));
    }

    for (i = 0; i < indexc; i++) {
        ret = Jim_GetIndex(interp, indexv[i], &idxes[i]);
        if (ret != JIM_OK) {
            goto err;
        }
    }

    for (i = 0; i < indexc; i++) {
        Jim_Obj *objPtr = Jim_ListGetIndex(interp, listPtr, idxes[i]);
        if (!objPtr) {
            if (flags & JIM_ERRMSG) {
                if (idxes[i] < 0 || idxes[i] > Jim_ListLength(interp, listPtr)) {
                    Jim_SetResultFormatted(interp, "index \"%#s\" out of range", indexv[i]);
                }
                else {
                    Jim_SetResultFormatted(interp, "element %#s missing from sublist \"%#s\"", indexv[i], listPtr);
                }
            }
            return -1;
        }
        listPtr = objPtr;
    }
    *resultObj = listPtr;
err:
    if (idxes != static_idxes)
        Jim_Free(idxes);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x5, %rax
jbe 0x2f421
movq 0x18e81(%rip), %rax     # 0x48290
movslq -0x24(%rbp), %rsi
shlq $0x2, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2f46f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x58(%rbp), %rdx
movslq -0x38(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
callq 0x87a0
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x2f462
jmp 0x2f554
jmp 0x2f464
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x2f428
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2f549
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x58(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %edx
callq 0x101d0
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x2f533
movl -0x34(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2f52a
movq -0x58(%rbp), %rax
movslq -0x38(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x2f4e6
movq -0x58(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9b50
movl %eax, %ecx
movl -0x6c(%rbp), %eax
cmpl %ecx, %eax
jle 0x2f506
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xbbec(%rip), %rsi      # 0x3b0e9
movb $0x0, %al
callq 0x6b40
jmp 0x2f528
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rcx
leaq 0xd498(%rip), %rsi      # 0x3c9b9
movb $0x0, %al
callq 0x6b40
jmp 0x2f52a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2f578
movq -0x68(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x2f476
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
leaq -0x50(%rbp), %rcx
cmpq %rcx, %rax
je 0x2f572
movq 0x18d28(%rip), %rax     # 0x48290
movq -0x58(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x5c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)