// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: JimInterpolateTokens
static Jim_Obj *JimInterpolateTokens(Jim_Interp *interp, const ScriptToken * token, int tokens, int flags)
{
    int totlen = 0, i;
    Jim_Obj **intv;
    Jim_Obj *sintv[JIM_EVAL_SINTV_LEN];
    Jim_Obj *objPtr;
    char *s;

    if (tokens <= JIM_EVAL_SINTV_LEN)
        intv = sintv;
    else
        intv = Jim_Alloc(sizeof(Jim_Obj *) * tokens);

    for (i = 0; i < tokens; i++) {
        switch (JimSubstOneToken(interp, &token[i], &intv[i])) {
            case JIM_OK:
            case JIM_RETURN:
                break;
            case JIM_BREAK:
                if (flags & JIM_SUBST_FLAG) {

                    tokens = i;
                    continue;
                }


            case JIM_CONTINUE:
                if (flags & JIM_SUBST_FLAG) {
                    intv[i] = NULL;
                    continue;
                }


            default:
                while (i--) {
                    Jim_DecrRefCount(interp, intv[i]);
                }
                if (intv != sintv) {
                    Jim_Free(intv);
                }
                return NULL;
        }
        Jim_IncrRefCount(intv[i]);
        Jim_String(intv[i]);
        totlen += intv[i]->length;
    }


    if (tokens == 1 && intv[0] && intv == sintv) {

        intv[0]->refCount--;
        return intv[0];
    }

    objPtr = Jim_NewStringObjNoAlloc(interp, NULL, 0);

    if (tokens == 4 && token[0].type == JIM_TT_ESC && token[1].type == JIM_TT_ESC
        && token[2].type == JIM_TT_VAR) {

        objPtr->typePtr = &interpolatedObjType;
        objPtr->internalRep.dictSubstValue.varNameObjPtr = token[0].objPtr;
        objPtr->internalRep.dictSubstValue.indexObjPtr = intv[2];
        Jim_IncrRefCount(intv[2]);
    }
    else if (tokens && intv[0] && intv[0]->typePtr == &sourceObjType) {

        int line;
        Jim_Obj *fileNameObj = Jim_GetSourceInfo(interp, intv[0], &line);
        Jim_SetSourceInfo(interp, objPtr, fileNameObj, line);
    }


    s = objPtr->bytes = Jim_Alloc(totlen + 1);
    objPtr->length = totlen;
    for (i = 0; i < tokens; i++) {
        if (intv[i]) {
            memcpy(s, intv[i]->bytes, intv[i]->length);
            s += intv[i]->length;
            Jim_DecrRefCount(interp, intv[i]);
        }
    }
    objPtr->bytes[totlen] = '\0';

    if (intv != sintv) {
        Jim_Free(intv);
    }

    return objPtr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x8, -0x1c(%rbp)
jg 0x13490
leaq -0x70(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x134a9
movq 0x34df9(%rip), %rax     # 0x48290
movslq -0x1c(%rbp), %rsi
shlq $0x3, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x135fe
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x28(%rbp), %rcx
movq %rcx, %rax
shlq $0x4, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
leaq (%rax,%rcx,8), %rdx
callq 0x258a0
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0x4, %eax
ja 0x13547
movq -0x98(%rbp), %rax
leaq 0x22bc5(%rip), %rcx     # 0x360c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x135b5
movl -0x20(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x13521
movl -0x28(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x135f0
jmp 0x13523
movl -0x20(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x13545
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x135f0
jmp 0x13547
jmp 0x13549
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x28(%rbp)
cmpl $0x0, %eax
je 0x1358a
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x13588
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
jmp 0x13549
movq -0x30(%rbp), %rax
leaq -0x70(%rbp), %rcx
cmpq %rcx, %rax
je 0x135a8
movq 0x34cf2(%rip), %rax     # 0x48290
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq $0x0, -0x8(%rbp)
jmp 0x13819
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7960
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x134b0
cmpl $0x1, -0x1c(%rbp)
jne 0x1363b
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1363b
movq -0x30(%rbp), %rax
leaq -0x70(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1363b
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x13819
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0xc780
movq %rax, -0x78(%rbp)
cmpl $0x4, -0x1c(%rbp)
jne 0x136b3
movq -0x18(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x136b3
movq -0x18(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0x136b3
movq -0x18(%rbp), %rax
cmpl $0x3, 0x28(%rax)
jne 0x136b3
movq -0x78(%rbp), %rax
leaq 0x337ab(%rip), %rcx     # 0x46e28
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x13711
cmpl $0x0, -0x1c(%rbp)
je 0x1370f
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1370f
movq -0x30(%rbp), %rax
movq (%rax), %rax
leaq 0x32c17(%rip), %rcx     # 0x462e8
cmpq %rcx, 0x8(%rax)
jne 0x1370f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
leaq -0x84(%rbp), %rdx
callq 0xd3f0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x90(%rbp), %rdx
movl -0x84(%rbp), %ecx
callq 0xd4a0
jmp 0x13711
movq 0x34b78(%rip), %rax     # 0x48290
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq -0x78(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x80(%rbp)
movl -0x24(%rbp), %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x14(%rax)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x137e4
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x137d4
movq -0x80(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x14(%rax), %rdx
callq 0x6340
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x14(%rax), %ecx
movq -0x80(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x137d2
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x7a10
jmp 0x137d4
jmp 0x137d6
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x13743
movq -0x78(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
leaq -0x70(%rbp), %rcx
cmpq %rcx, %rax
je 0x13811
movq 0x34a89(%rip), %rax     # 0x48290
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)