// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x44(%rbp)
movq %r8, %r13
movl %ecx, %r15d
movq %rdx, -0x38(%rbp)
movq %rsi, %r14
movq %rdi, -0x40(%rbp)
cmpl $0x6, %ecx
jb 0x22e44
movslq %r15d, %rsi
shlq $0x2, %rsi
xorl %edi, %edi
callq *0x15449(%rip)          # 0x38288
movq %rax, %rdi
jmp 0x22e48
leaq -0x70(%rbp), %rdi
movl %r15d, %eax
movq %rax, -0x50(%rbp)
testl %r15d, %r15d
movq %rdi, -0x30(%rbp)
jle 0x22e91
movq -0x50(%rbp), %rax
leaq (,%rax,4), %rbx
xorl %r12d, %r12d
movq -0x38(%rbp), %rax
movq (%rax,%r12,2), %rsi
leaq (%rdi,%r12), %rdx
movq -0x40(%rbp), %rdi
callq 0x80b2
testl %eax, %eax
jne 0x22f44
addq $0x4, %r12
cmpq %r12, %rbx
movq -0x30(%rbp), %rdi
jne 0x22e67
movq %r13, -0x58(%rbp)
testl %r15d, %r15d
jle 0x22f4f
xorl %r12d, %r12d
movq %r14, %rbx
testb $0x1, -0x44(%rbp)
sete %r13b
movl (%rdi,%r12,4), %edx
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0xe871
movq %rax, %r15
testq %rax, %rax
setne %al
cmovneq %r15, %rbx
orb %r13b, %al
jne 0x22f29
movq -0x30(%rbp), %rax
movl (%rax,%r12,4), %ebx
testl %ebx, %ebx
movq -0x40(%rbp), %r13
js 0x22eef
movq %r13, %rdi
movq %r14, %rsi
callq 0xe338
cmpl 0x20(%r14), %ebx
jle 0x22f0a
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %rdx
movq %r13, %rdi
leaq 0x9093(%rip), %rsi      # 0x2bf94
xorl %eax, %eax
callq 0x692d
jmp 0x22f26
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %rdx
movq %r13, %rdi
leaq 0xa739(%rip), %rsi      # 0x2d655
movq %r14, %rcx
xorl %eax, %eax
callq 0x692d
movq %r14, %rbx
testq %r15, %r15
je 0x22f6e
incq %r12
movq %rbx, %r14
cmpq %r12, -0x50(%rbp)
movq -0x30(%rbp), %rdi
jne 0x22ea4
jmp 0x22f52
movl $0x1, %ebx
movq -0x30(%rbp), %rdi
jmp 0x22f5b
movq %r14, %rbx
movq -0x58(%rbp), %rax
movq %rbx, (%rax)
xorl %ebx, %ebx
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x22f73
xorl %esi, %esi
callq *0x1531c(%rip)          # 0x38288
jmp 0x22f73
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq