// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_SetResultFormatted
void Jim_SetResultFormatted(Jim_Interp *interp, const char *format, ...)
{

    int len = strlen(format);
    int extra = 0;
    int n = 0;
    const char *params[5];
    int nobjparam = 0;
    Jim_Obj *objparam[5];
    char *buf;
    va_list args;
    int i;

    va_start(args, format);

    for (i = 0; i < len && n < 5; i++) {
        int l;

        if (strncmp(format + i, "%s", 2) == 0) {
            params[n] = va_arg(args, char *);

            l = strlen(params[n]);
        }
        else if (strncmp(format + i, "%#s", 3) == 0) {
            Jim_Obj *objPtr = va_arg(args, Jim_Obj *);

            params[n] = Jim_GetString(objPtr, &l);
            objparam[nobjparam++] = objPtr;
            Jim_IncrRefCount(objPtr);
        }
        else {
            if (format[i] == '%') {
                i++;
            }
            continue;
        }
        n++;
        extra += l;
    }

    len += extra;
    buf = Jim_Alloc(len + 1);
    len = snprintf(buf, len + 1, format, params[0], params[1], params[2], params[3], params[4]);

    va_end(args);

    Jim_SetResult(interp, Jim_NewStringObjNoAlloc(interp, buf, len));

    for (i = 0; i < nobjparam; i++) {
        Jim_DecrRefCount(interp, objparam[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
testb %al, %al
je 0x6b87
movaps %xmm0, -0x140(%rbp)
movaps %xmm1, -0x130(%rbp)
movaps %xmm2, -0x120(%rbp)
movaps %xmm3, -0x110(%rbp)
movaps %xmm4, -0x100(%rbp)
movaps %xmm5, -0xf0(%rbp)
movaps %xmm6, -0xe0(%rbp)
movaps %xmm7, -0xd0(%rbp)
movq %r9, -0x148(%rbp)
movq %r8, -0x150(%rbp)
movq %rcx, -0x158(%rbp)
movq %rdx, -0x160(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6190
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x54(%rbp)
leaq -0xa0(%rbp), %rax
leaq -0x170(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x171(%rbp)
jge 0x6c1d
cmpl $0x5, -0x1c(%rbp)
setl %al
movb %al, -0x171(%rbp)
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x6c2c
jmp 0x6e0f
movq -0x10(%rbp), %rdi
movslq -0xa4(%rbp), %rax
addq %rax, %rdi
leaq 0x34e3d(%rip), %rsi     # 0x3ba7e
movl $0x2, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x6cde
leaq -0xa0(%rbp), %rax
movq %rax, -0x180(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x178(%rbp)
cmpl $0x28, %eax
ja 0x6c95
movq -0x180(%rbp), %rcx
movl -0x178(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x188(%rbp)
jmp 0x6cb2
movq -0x180(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq (%rax), %rcx
movslq -0x1c(%rbp), %rax
movq %rcx, -0x50(%rbp,%rax,8)
movslq -0x1c(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rdi
callq 0x6190
movl %eax, -0xa8(%rbp)
jmp 0x6de6
movq -0x10(%rbp), %rdi
movslq -0xa4(%rbp), %rax
addq %rax, %rdi
leaq 0x36c26(%rip), %rsi     # 0x3d919
movl $0x3, %edx
callq 0x60b0
cmpl $0x0, %eax
jne 0x6dbf
leaq -0xa0(%rbp), %rax
movq %rax, -0x198(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x18c(%rbp)
cmpl $0x28, %eax
ja 0x6d47
movq -0x198(%rbp), %rcx
movl -0x18c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1a0(%rbp)
jmp 0x6d64
movq -0x198(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x89b0
movq %rax, %rcx
movslq -0x1c(%rbp), %rax
movq %rcx, -0x50(%rbp,%rax,8)
movq -0xb0(%rbp), %rcx
movl -0x54(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x54(%rbp)
cltq
movq %rcx, -0x80(%rbp,%rax,8)
movq -0xb0(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x6de4
movq -0x10(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x25, %eax
jne 0x6de2
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x6dfb
jmp 0x6de6
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0xa8(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x6bfd
movl -0x18(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq 0x41471(%rip), %rax     # 0x48290
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x10(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %r9
movq -0x38(%rbp), %r10
movq -0x30(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x61f0
movl %eax, -0x14(%rbp)
leaq -0xa0(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x88(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xc780
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x6ec6
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
callq 0x7a10
movq -0xb8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x6f2b
movslq -0xa4(%rbp), %rax
movq -0x80(%rbp,%rax,8), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x6f18
movq -0x8(%rbp), %rdi
movslq -0xa4(%rbp), %rax
movq -0x80(%rbp,%rax,8), %rsi
callq 0x7a10
jmp 0x6f1a
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x6ede
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopw %cs:(%rax,%rax)