// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_SplitCoreCommand
static int Jim_SplitCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    const char *str, *splitChars, *noMatchStart;
    int splitLen, strLen;
    Jim_Obj *resObjPtr;
    int c;
    int len;

    if (argc != 2 && argc != 3) {
        Jim_WrongNumArgs(interp, 1, argv, "string ?splitChars?");
        return JIM_ERR;
    }

    str = Jim_GetString(argv[1], &len);
    if (len == 0) {
        return JIM_OK;
    }
    strLen = Jim_Utf8Length(interp, argv[1]);


    if (argc == 2) {
        splitChars = " \n\t\r";
        splitLen = 4;
    }
    else {
        splitChars = Jim_String(argv[2]);
        splitLen = Jim_Utf8Length(interp, argv[2]);
    }

    noMatchStart = str;
    resObjPtr = Jim_NewListObj(interp, NULL, 0);


    if (splitLen) {
        Jim_Obj *objPtr;
        while (strLen--) {
            const char *sc = splitChars;
            int scLen = splitLen;
            int sl = utf8_tounicode(str, &c);
            while (scLen--) {
                int pc;
                sc += utf8_tounicode(sc, &pc);
                if (c == pc) {
                    objPtr = Jim_NewStringObj(interp, noMatchStart, (str - noMatchStart));
                    Jim_ListAppendElement(interp, resObjPtr, objPtr);
                    noMatchStart = str + sl;
                    break;
                }
            }
            str += sl;
        }
        objPtr = Jim_NewStringObj(interp, noMatchStart, (str - noMatchStart));
        Jim_ListAppendElement(interp, resObjPtr, objPtr);
    }
    else {
        Jim_Obj **commonObj = NULL;
#define NUM_COMMON (128 - 9)
        while (strLen--) {
            int n = utf8_tounicode(str, &c);
#ifdef JIM_OPTIMIZATION
            if (c >= 9 && c < 128) {

                c -= 9;
                if (!commonObj) {
                    commonObj = Jim_Alloc(sizeof(*commonObj) * NUM_COMMON);
                    memset(commonObj, 0, sizeof(*commonObj) * NUM_COMMON);
                }
                if (!commonObj[c]) {
                    commonObj[c] = Jim_NewStringObj(interp, str, 1);
                }
                Jim_ListAppendElement(interp, resObjPtr, commonObj[c]);
                str++;
                continue;
            }
#endif
            Jim_ListAppendElement(interp, resObjPtr, Jim_NewStringObjUtf8(interp, str, 1));
            str += n;
        }
        Jim_Free(commonObj);
    }

    Jim_SetResult(interp, resObjPtr);
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r13d
movq %rdi, %rbx
leal -0x4(%r13), %eax
cmpl $-0x3, %eax
ja 0x203bf
leaq 0xcd95(%rip), %rcx      # 0x2d13c
movl $0x1, %r12d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7446
jmp 0x20585
movq 0x8(%rdx), %r14
movq (%r14), %r15
testq %r15, %r15
jne 0x203de
movq 0x8(%r14), %rax
movq %r14, %rdi
movq %rdx, %r15
callq *0x18(%rax)
movq %r15, %rdx
movq (%r14), %r15
xorl %r12d, %r12d
cmpl $0x0, 0x14(%r14)
je 0x20585
movq 0x8(%rdx), %r14
cmpq $0x0, (%r14)
jne 0x20406
movq 0x8(%r14), %rax
movq %r14, %rdi
movq %rdx, %r12
callq *0x18(%rax)
movq %r12, %rdx
movl 0x14(%r14), %r12d
cmpl $0x2, %r13d
jne 0x2041f
leaq 0xcd39(%rip), %r14      # 0x2d150
movl $0x4, %r13d
jmp 0x2045b
movq 0x10(%rdx), %r13
movq (%r13), %r14
testq %r14, %r14
jne 0x20457
movq 0x8(%r13), %rax
movq %r13, %rdi
movq %rdx, -0x30(%rbp)
callq *0x18(%rax)
movq (%r13), %r14
movq -0x30(%rbp), %rax
movq 0x10(%rax), %r13
cmpq $0x0, (%r13)
jne 0x20457
movq 0x8(%r13), %rax
movq %r13, %rdi
callq *0x18(%rax)
movl 0x14(%r13), %r13d
movq %rbx, %rdi
callq 0xae38
leaq 0x14efe(%rip), %rcx     # 0x35368
movq %rcx, 0x8(%rax)
movq $0x0, (%rax)
xorps %xmm0, %xmm0
movq %rax, -0x30(%rbp)
movups %xmm0, 0x18(%rax)
testl %r13d, %r13d
je 0x204d8
testl %r12d, %r12d
je 0x2053c
movl %r13d, %r13d
movq %r15, %rsi
decl %r12d
movb (%r15), %al
xorl %ecx, %ecx
cmpl %ecx, %r13d
je 0x204ce
leaq 0x1(%rcx), %rdx
cmpb (%r14,%rcx), %al
movq %rdx, %rcx
jne 0x2049c
movl %r15d, %edx
subl %esi, %edx
movq %rbx, %rdi
callq 0x7508
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x7683
leaq 0x1(%r15), %rsi
incq %r15
testl %r12d, %r12d
jne 0x20494
jmp 0x2053f
testl %r12d, %r12d
je 0x2052c
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0xae38
movq %rax, %r14
movl $0x2, %esi
xorl %edi, %edi
callq *0x16d90(%rip)          # 0x37288
movb (%r15,%r13), %cl
movb %cl, (%rax)
movb $0x0, 0x1(%rax)
movq %rax, (%r14)
movl $0x1, 0x14(%r14)
movq $0x0, 0x8(%r14)
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0x7683
incq %r13
cmpl %r13d, %r12d
jne 0x204e0
xorl %edi, %edi
xorl %esi, %esi
callq *0x16d52(%rip)          # 0x37288
movq -0x30(%rbp), %r14
jmp 0x2055f
movq %r15, %rsi
subl %esi, %r15d
movq %rbx, %rdi
movl %r15d, %edx
callq 0x7508
movq %rbx, %rdi
movq -0x30(%rbp), %r14
movq %r14, %rsi
movq %rax, %rdx
callq 0x7683
incl 0x10(%r14)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
movl $0x0, %r12d
jg 0x20582
movq %rbx, %rdi
callq 0x758c
movq %r14, (%rbx)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq