// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: JimStringMap
static Jim_Obj *JimStringMap(Jim_Interp *interp, Jim_Obj *mapListObjPtr,
    Jim_Obj *objPtr, int nocase)
{
    int numMaps;
    const char *str, *noMatchStart = NULL;
    int strLen, i;
    Jim_Obj *resultObjPtr;

    numMaps = Jim_ListLength(interp, mapListObjPtr);
    if (numMaps % 2) {
        Jim_SetResultString(interp, "list must contain an even number of elements", -1);
        return NULL;
    }

    str = Jim_String(objPtr);
    strLen = Jim_Utf8Length(interp, objPtr);


    resultObjPtr = Jim_NewStringObj(interp, "", 0);
    while (strLen) {
        for (i = 0; i < numMaps; i += 2) {
            Jim_Obj *eachObjPtr;
            const char *k;
            int kl;

            eachObjPtr = Jim_ListGetIndex(interp, mapListObjPtr, i);
            k = Jim_String(eachObjPtr);
            kl = Jim_Utf8Length(interp, eachObjPtr);

            if (strLen >= kl && kl) {
                int rc;
                rc = JimStringCompareUtf8(str, kl, k, kl, nocase);
                if (rc == 0) {
                    if (noMatchStart) {
                        Jim_AppendString(interp, resultObjPtr, noMatchStart, str - noMatchStart);
                        noMatchStart = NULL;
                    }
                    Jim_AppendObj(interp, resultObjPtr, Jim_ListGetIndex(interp, mapListObjPtr, i + 1));
                    str += utf8_index(str, kl);
                    strLen -= kl;
                    break;
                }
            }
        }
        if (i == numMaps) {
            int c;
            if (noMatchStart == NULL)
                noMatchStart = str;
            str += utf8_tounicode(str, &c);
            strLen--;
        }
    }
    if (noMatchStart) {
        Jim_AppendString(interp, resultObjPtr, noMatchStart, str - noMatchStart);
    }
    return resultObjPtr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, -0x4c(%rbp)
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0xe2fe
movq %r15, -0x60(%rbp)
movl 0x20(%r15), %r13d
testb $0x1, %r13b
jne 0x23419
movq %r14, -0x30(%rbp)
movq (%rbx), %r14
testq %r14, %r14
jne 0x2329e
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %r14
testq %r14, %r14
jne 0x2329e
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
xorl %r14d, %r14d
movl 0x14(%rbx), %r12d
movq -0x30(%rbp), %rdi
callq 0xae38
movq %rax, %rbx
leaq 0x13fe3(%rip), %rax     # 0x37298
movq %rax, (%rbx)
movl $0x0, 0x14(%rbx)
movq $0x0, 0x8(%rbx)
movl %r12d, -0x38(%rbp)
testl %r12d, %r12d
je 0x23451
movq %rbx, -0x40(%rbp)
xorl %edx, %edx
movq %r14, %rcx
testl %r13d, %r13d
jle 0x23379
movq %rdx, -0x58(%rbp)
movq %rcx, -0x48(%rbp)
movl $0x1, %r14d
movl %r14d, %ebx
leal -0x1(%rbx), %r14d
movq -0x30(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl %r14d, %edx
callq 0xe803
movq %rax, %r15
movq (%rax), %rdx
testq %rdx, %rdx
jne 0x23334
movq 0x8(%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
movq (%r15), %rdx
testq %rdx, %rdx
jne 0x23334
movq 0x8(%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
xorl %edx, %edx
movl 0x14(%r15), %r15d
movl -0x38(%rbp), %r12d
subl %r15d, %r12d
jl 0x2335d
testl %r15d, %r15d
je 0x2335d
movq -0x48(%rbp), %rdi
movl %r15d, %esi
movl %r15d, %ecx
movl -0x4c(%rbp), %r8d
callq 0xb391
testl %eax, %eax
je 0x23382
leal 0x2(%rbx), %r14d
incl %ebx
cmpl %r13d, %ebx
jl 0x232f4
decl %r14d
movl -0x38(%rbp), %r12d
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rdx
jmp 0x233d9
xorl %r14d, %r14d
movl -0x38(%rbp), %r12d
jmp 0x233d9
movq -0x58(%rbp), %rdx
testq %rdx, %rdx
movq -0x30(%rbp), %rsi
je 0x233a8
movq -0x48(%rbp), %rax
movl %eax, %ecx
subl %edx, %ecx
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x86a0
movq -0x30(%rbp), %rsi
movslq %r15d, %rax
movq %rax, -0x38(%rbp)
movq %rsi, %r15
movq %rsi, %rdi
movq -0x60(%rbp), %rsi
movl %ebx, %edx
callq 0xe803
movq %r15, %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0xaf90
movq -0x48(%rbp), %rcx
addq -0x38(%rbp), %rcx
xorl %edx, %edx
movq %rdx, %rax
testq %rdx, %rdx
cmoveq %rcx, %rdx
xorl %esi, %esi
cmpl %r13d, %r14d
cmovneq %rax, %rdx
sete %sil
addq %rsi, %rcx
subl %esi, %r12d
movl %r12d, -0x38(%rbp)
jne 0x232dd
testq %rdx, %rdx
je 0x23463
subl %edx, %ecx
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rbx
movq %rbx, %rsi
callq 0x86a0
jmp 0x23451
leaq 0x989a(%rip), %rsi      # 0x2ccba
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
movq %rax, %rbx
incl 0x10(%rax)
movq (%r14), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x2344c
movq %r14, %rdi
callq 0x758c
movq %rbx, (%r14)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rbx
jmp 0x23451