// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_FormatString
Jim_Obj *Jim_FormatString(Jim_Interp *interp, Jim_Obj *fmtObjPtr, int objc, Jim_Obj *const *objv)
{
    const char *span, *format, *formatEnd, *msg;
    int numBytes = 0, objIndex = 0, gotXpg = 0, gotSequential = 0;
    static const char * const mixedXPG =
            "cannot mix \"%\" and \"%n$\" conversion specifiers";
    static const char * const badIndex[2] = {
        "not enough arguments for all format specifiers",
        "\"%n$\" argument index out of range"
    };
    int formatLen;
    Jim_Obj *resultPtr;

    char *num_buffer = NULL;
    int num_buffer_size = 0;

    span = format = Jim_GetString(fmtObjPtr, &formatLen);
    formatEnd = format + formatLen;
    resultPtr = Jim_NewEmptyStringObj(interp);

    while (format != formatEnd) {
        char *end;
        int gotMinus, sawFlag;
        int gotPrecision, useShort;
        long width, precision;
        int newXpg;
        int ch;
        int step;
        int doubleType;
        char pad = ' ';
        char spec[2*JIM_INTEGER_SPACE + 12];
        char *p;

        int formatted_chars;
        int formatted_bytes;
        const char *formatted_buf;

        step = utf8_tounicode(format, &ch);
        format += step;
        if (ch != '%') {
            numBytes += step;
            continue;
        }
        if (numBytes) {
            Jim_AppendString(interp, resultPtr, span, numBytes);
            numBytes = 0;
        }


        step = utf8_tounicode(format, &ch);
        if (ch == '%') {
            span = format;
            numBytes = step;
            format += step;
            continue;
        }


        newXpg = 0;
        if (isdigit(ch)) {
            int position = strtoul(format, &end, 10);
            if (*end == '$') {
                newXpg = 1;
                objIndex = position - 1;
                format = end + 1;
                step = utf8_tounicode(format, &ch);
            }
        }
        if (newXpg) {
            if (gotSequential) {
                msg = mixedXPG;
                goto errorMsg;
            }
            gotXpg = 1;
        } else {
            if (gotXpg) {
                msg = mixedXPG;
                goto errorMsg;
            }
            gotSequential = 1;
        }
        if ((objIndex < 0) || (objIndex >= objc)) {
            msg = badIndex[gotXpg];
            goto errorMsg;
        }

        p = spec;
        *p++ = '%';

        gotMinus = 0;
        sawFlag = 1;
        do {
            switch (ch) {
            case '-':
                gotMinus = 1;
                break;
            case '0':
                pad = ch;
                break;
            case ' ':
            case '+':
            case '#':
                break;
            default:
                sawFlag = 0;
                continue;
            }
            *p++ = ch;
            format += step;
            step = utf8_tounicode(format, &ch);

        } while (sawFlag && (p - spec <= 5));


        width = 0;
        if (isdigit(ch)) {
            width = strtoul(format, &end, 10);
            format = end;
            step = utf8_tounicode(format, &ch);
        } else if (ch == '*') {
            if (objIndex >= objc - 1) {
                msg = badIndex[gotXpg];
                goto errorMsg;
            }
            if (Jim_GetLong(interp, objv[objIndex], &width) != JIM_OK) {
                goto error;
            }
            if (width < 0) {
                width = -width;
                if (!gotMinus) {
                    *p++ = '-';
                    gotMinus = 1;
                }
            }
            objIndex++;
            format += step;
            step = utf8_tounicode(format, &ch);
        }


        gotPrecision = precision = 0;
        if (ch == '.') {
            gotPrecision = 1;
            format += step;
            step = utf8_tounicode(format, &ch);
        }
        if (isdigit(ch)) {
            precision = strtoul(format, &end, 10);
            format = end;
            step = utf8_tounicode(format, &ch);
        } else if (ch == '*') {
            if (objIndex >= objc - 1) {
                msg = badIndex[gotXpg];
                goto errorMsg;
            }
            if (Jim_GetLong(interp, objv[objIndex], &precision) != JIM_OK) {
                goto error;
            }


            if (precision < 0) {
                precision = 0;
            }
            objIndex++;
            format += step;
            step = utf8_tounicode(format, &ch);
        }


        useShort = 0;
        if (ch == 'h') {
            useShort = 1;
            format += step;
            step = utf8_tounicode(format, &ch);
        } else if (ch == 'l') {

            format += step;
            step = utf8_tounicode(format, &ch);
            if (ch == 'l') {
                format += step;
                step = utf8_tounicode(format, &ch);
            }
        }

        format += step;
        span = format;


        if (ch == 'i') {
            ch = 'd';
        }

        doubleType = 0;

        switch (ch) {
        case '\0':
            msg = "format string ended in middle of field specifier";
            goto errorMsg;
        case 's': {
            formatted_buf = Jim_GetString(objv[objIndex], &formatted_bytes);
            formatted_chars = Jim_Utf8Length(interp, objv[objIndex]);
            if (gotPrecision && (precision < formatted_chars)) {

                formatted_chars = precision;
                formatted_bytes = utf8_index(formatted_buf, precision);
            }
            break;
        }
        case 'c': {
            jim_wide code;

            if (Jim_GetWide(interp, objv[objIndex], &code) != JIM_OK) {
                goto error;
            }

            formatted_bytes = utf8_getchars(spec, code);
            formatted_buf = spec;
            formatted_chars = 1;
            break;
        }
        case 'b': {
                unsigned jim_wide w;
                int length;
                int i;
                int j;

                if (Jim_GetWide(interp, objv[objIndex], (jim_wide *)&w) != JIM_OK) {
                    goto error;
                }
                length = sizeof(w) * 8;



                if (num_buffer_size < length + 1) {
                    num_buffer_size = length + 1;
                    num_buffer = Jim_Realloc(num_buffer, num_buffer_size);
                }

                j = 0;
                for (i = length; i > 0; ) {
                        i--;
                        if (w & ((unsigned jim_wide)1 << i)) {
                                num_buffer[j++] = '1';
                        }
                        else if (j || i == 0) {
                                num_buffer[j++] = '0';
                        }
                }
                num_buffer[j] = 0;
                formatted_chars = formatted_bytes = j;
                formatted_buf = num_buffer;
                break;
        }

        case 'e':
        case 'E':
        case 'f':
        case 'g':
        case 'G':
            doubleType = 1;

        case 'd':
        case 'u':
        case 'o':
        case 'x':
        case 'X': {
            jim_wide w;
            double d;
            int length;


            if (width) {
                p += sprintf(p, "%ld", width);
            }
            if (gotPrecision) {
                p += sprintf(p, ".%ld", precision);
            }


            if (doubleType) {
                if (Jim_GetDouble(interp, objv[objIndex], &d) != JIM_OK) {
                    goto error;
                }
                length = MAX_FLOAT_WIDTH;
            }
            else {
                if (Jim_GetWide(interp, objv[objIndex], &w) != JIM_OK) {
                    goto error;
                }
                length = JIM_INTEGER_SPACE;
                if (useShort) {
                    if (ch == 'd') {
                        w = (short)w;
                    }
                    else {
                        w = (unsigned short)w;
                    }
                }
                *p++ = 'l';
#ifdef HAVE_LONG_LONG
                if (sizeof(long long) == sizeof(jim_wide)) {
                    *p++ = 'l';
                }
#endif
            }

            *p++ = (char) ch;
            *p = '\0';


            if (width > 10000 || length > 10000 || precision > 10000) {
                Jim_SetResultString(interp, "format too long", -1);
                goto error;
            }



            if (width > length) {
                length = width;
            }
            if (gotPrecision) {
                length += precision;
            }


            if (num_buffer_size < length + 1) {
                num_buffer_size = length + 1;
                num_buffer = Jim_Realloc(num_buffer, num_buffer_size);
            }

            if (doubleType) {
                snprintf(num_buffer, length + 1, spec, d);
            }
            else {
                formatted_bytes = snprintf(num_buffer, length + 1, spec, w);
            }
            formatted_chars = formatted_bytes = strlen(num_buffer);
            formatted_buf = num_buffer;
            break;
        }

        default: {

            spec[0] = ch;
            spec[1] = '\0';
            Jim_SetResultFormatted(interp, "bad field specifier \"%s\"", spec);
            goto error;
        }
        }

        if (!gotMinus) {
            while (formatted_chars < width) {
                Jim_AppendString(interp, resultPtr, &pad, 1);
                formatted_chars++;
            }
        }

        Jim_AppendString(interp, resultPtr, formatted_buf, formatted_bytes);

        while (formatted_chars < width) {
            Jim_AppendString(interp, resultPtr, &pad, 1);
            formatted_chars++;
        }

        objIndex += gotSequential;
    }
    if (numBytes) {
        Jim_AppendString(interp, resultPtr, span, numBytes);
    }

    Jim_Free(num_buffer);
    return resultPtr;

  errorMsg:
    Jim_SetResultString(interp, msg, -1);
  error:
    Jim_FreeNewObj(interp, resultPtr);
    Jim_Free(num_buffer);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %r12
movq %rdx, -0xa8(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
testq %r15, %r15
jne 0x12079
movq 0x8(%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %r15
movslq 0x14(%rbx), %rbx
movq %r14, %rdi
callq 0xae38
movq %rax, %r13
leaq 0x25209(%rip), %rax     # 0x37298
movq %rax, (%r13)
movl $0x0, 0x14(%r13)
movq $0x0, 0x8(%r13)
testq %rbx, %rbx
je 0x1289c
movq %rbx, %rdx
movq %r12, -0x70(%rbp)
addq %r15, %rdx
movq -0xa8(%rbp), %rax
decl %eax
movl %eax, -0x84(%rbp)
leaq 0x1901b(%rip), %rax     # 0x2b0e7
movq %rax, -0x90(%rbp)
movq %r15, %rbx
movl $0x0, -0x54(%rbp)
movq $0x0, -0x50(%rbp)
xorl %ecx, %ecx
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x30(%rbp)
movq %rdx, -0xb0(%rbp)
movq %r13, -0x98(%rbp)
movq %r14, -0x40(%rbp)
movb $0x20, -0x29(%rbp)
leaq 0x1(%rbx), %r12
cmpb $0x25, (%rbx)
jne 0x12154
testl %ecx, %ecx
je 0x12134
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x86a0
movq -0xb0(%rbp), %rdx
movzbl (%r12), %r14d
cmpq $0x25, %r14
jne 0x1215e
addq $0x2, %rbx
movl $0x1, %ecx
movq %r12, %r15
movq -0x40(%rbp), %r14
jmp 0x126fb
incl %ecx
movq %r12, %rbx
jmp 0x126fb
callq 0x64e0
movq %rax, %r13
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
je 0x121b4
movq %r12, %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x6460
movq -0x80(%rbp), %rcx
cmpb $0x24, (%rcx)
jne 0x121b4
cmpl $0x0, -0x5c(%rbp)
jne 0x128d1
decl %eax
movb 0x1(%rcx), %r14b
incq %rcx
movl $0x0, -0x5c(%rbp)
movl $0x1, -0x58(%rbp)
movq %rcx, %r12
movl %eax, %r15d
jmp 0x121d0
cmpl $0x0, -0x58(%rbp)
jne 0x128d1
movl $0x1, -0x5c(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x30(%rbp), %r15d
testl %r15d, %r15d
js 0x128be
cmpl -0xa8(%rbp), %r15d
jge 0x128be
movzbl %r14b, %ebx
movb $0x25, -0x100(%rbp)
movl $0x1, %ecx
xorl %r14d, %r14d
movb $0x20, %al
movzbl %bl, %edx
cmpl $0x2a, %edx
jle 0x1221a
cmpl $0x2b, %edx
je 0x12228
cmpl $0x30, %edx
je 0x12226
cmpl $0x2d, %edx
jne 0x12241
movl $0x1, %r14d
jmp 0x12228
cmpl $0x20, %edx
je 0x12228
cmpl $0x23, %edx
je 0x12228
jmp 0x12241
movb $0x30, %al
movb %bl, -0x100(%rbp,%rcx)
incq %rcx
movzbl 0x1(%r12), %ebx
incq %r12
cmpq $0x6, %rcx
jne 0x121fb
addq %rbp, %rcx
addq $-0x100, %rcx
movq %rcx, -0x38(%rbp)
movb %al, -0x29(%rbp)
movq (%r13), %rax
movl %ebx, %ecx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x122bb
cmpl $0x2a, %ebx
jne 0x122d5
cmpl -0x84(%rbp), %r15d
jge 0x128be
movl %r14d, %ebx
movl %r15d, -0x30(%rbp)
movl %r15d, %eax
movq -0x70(%rbp), %rcx
movq (%rcx,%rax,8), %r15
leaq 0x23066(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r15)
movq -0x40(%rbp), %r14
je 0x122ac
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xd6c3
testl %eax, %eax
jne 0x12960
movq 0x18(%r15), %r8
testq %r8, %r8
js 0x122da
movl -0x30(%rbp), %r15d
jmp 0x122e9
movq %r12, %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x6460
movq %rax, %r8
movq -0x80(%rbp), %r12
jmp 0x122f2
xorl %r8d, %r8d
jmp 0x122f7
negq %r8
testl %ebx, %ebx
movl -0x30(%rbp), %r15d
je 0x1279d
movl %ebx, %r14d
incl %r15d
incq %r12
movzbl (%r12), %ebx
cmpl $0x2e, %ebx
jne 0x12307
movzbl 0x1(%r12), %edx
incq %r12
jmp 0x12309
movl %ebx, %edx
movq (%r13), %rax
movl %edx, %ecx
testb $0x8, 0x1(%rax,%rcx,2)
movq %r8, -0x48(%rbp)
movl %r14d, -0xa0(%rbp)
jne 0x1238f
cmpl $0x2a, %edx
jne 0x123b2
cmpl -0x84(%rbp), %r15d
jge 0x128be
movl %r15d, -0x30(%rbp)
movl %r15d, %eax
movq -0x70(%rbp), %rcx
movq (%rcx,%rax,8), %r13
leaq 0x22fa3(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r13)
movq -0x40(%rbp), %r14
je 0x12373
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xd6c3
movq -0x48(%rbp), %r8
testl %eax, %eax
jne 0x12960
movq 0x18(%r13), %r13
testq %r13, %r13
movl $0x0, %eax
cmovleq %rax, %r13
movl -0x30(%rbp), %r15d
incl %r15d
incq %r12
jmp 0x123ab
movq %r12, %rdi
leaq -0x80(%rbp), %rsi
movl $0xa, %edx
callq 0x6460
movq -0x48(%rbp), %r8
movq %rax, %r13
movq -0x80(%rbp), %r12
movzbl (%r12), %edx
jmp 0x123b5
xorl %r13d, %r13d
movl $0x1, %eax
cmpl $0x68, %edx
jne 0x123c9
movzbl (%r12,%rax), %r14d
addq %rax, %r12
jmp 0x123e7
cmpl $0x6c, %edx
jne 0x123e4
movzbl 0x1(%r12), %r14d
movl $0x2, %eax
cmpl $0x6c, %r14d
je 0x123bf
incq %r12
jmp 0x123e7
movl %edx, %r14d
cmpl $0x69, %r14d
movl $0x64, %eax
cmovel %eax, %r14d
cmpl $0x57, %r14d
movl %r15d, -0x30(%rbp)
jle 0x1246f
movb $0x1, %al
movl %eax, -0x68(%rbp)
leal -0x62(%r14), %eax
cmpl $0x16, %eax
ja 0x12709
leaq 0x14de5(%rip), %rcx     # 0x271fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r15d, %eax
movq -0x70(%rbp), %rcx
movq (%rcx,%rax,8), %r13
leaq 0x22ebe(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r13)
movq -0x40(%rbp), %r14
je 0x12458
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xd6c3
movq -0x48(%rbp), %r8
testl %eax, %eax
jne 0x12960
movq 0x18(%r13), %rbx
cmpl $0x40, -0x54(%rbp)
jle 0x12827
movq -0x50(%rbp), %r15
jmp 0x12844
cmpl $0x45, %r14d
je 0x1247f
cmpl $0x47, %r14d
jne 0x12996
movl $0x0, -0x68(%rbp)
movl %edx, -0x9c(%rbp)
testq %r8, %r8
je 0x124b2
movq -0x38(%rbp), %r15
movq %r15, %rdi
leaq 0x18c7a(%rip), %rsi     # 0x2b119
movq %r8, %rdx
xorl %eax, %eax
callq 0x6480
cltq
addq %rax, %r15
movq %r15, -0x38(%rbp)
cmpl $0x2e, %ebx
movq -0x50(%rbp), %r15
movq %r13, -0xb8(%rbp)
jne 0x124e3
movq %r13, %rdx
movq -0x38(%rbp), %r13
movq %r13, %rdi
leaq 0x18c45(%rip), %rsi     # 0x2b118
xorl %eax, %eax
callq 0x6480
cltq
addq %rax, %r13
movq %r13, -0x38(%rbp)
movl -0x30(%rbp), %eax
movq -0x70(%rbp), %rcx
movq (%rcx,%rax,8), %r13
cmpb $0x0, -0x68(%rbp)
je 0x12543
leaq 0x22df5(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r13)
movq -0x48(%rbp), %rdx
je 0x12522
movq -0x40(%rbp), %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xd6c3
movq -0x48(%rbp), %rdx
testl %eax, %eax
jne 0x1295c
movq 0x18(%r13), %rax
movq %rax, -0x78(%rbp)
cmpl $0x68, -0x9c(%rbp)
jne 0x12573
cmpl $0x64, %r14d
jne 0x12568
movq -0x78(%rbp), %rax
movswq %ax, %rax
jmp 0x1256f
movq -0x40(%rbp), %rdi
movq %r13, %rsi
leaq -0xc0(%rbp), %rdx
callq 0xe040
movl $0x140, %ecx            # imm = 0x140
testl %eax, %eax
movq -0x48(%rbp), %rdx
je 0x12586
jmp 0x1295c
movq -0x78(%rbp), %rax
movzwl %ax, %eax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movb $0x6c, (%rax)
incq %rax
movq %rax, -0x38(%rbp)
movl $0x18, %ecx
movq -0x38(%rbp), %rax
movb %r14b, (%rax)
movb $0x0, 0x1(%rax)
cmpq $0x2710, %rdx           # imm = 0x2710
movq -0xb8(%rbp), %rsi
jg 0x12922
cmpq $0x2711, %rsi           # imm = 0x2711
jge 0x12922
movl %ecx, %eax
cmpq %rax, %rdx
movl %edx, %eax
cmovlel %ecx, %eax
cmpl $0x2e, %ebx
movl $0x0, %ecx
cmovnel %ecx, %esi
leal (%rax,%rsi), %ecx
leal (%rax,%rsi), %ebx
incl %ebx
movslq %ebx, %r13
cmpl %ecx, -0x54(%rbp)
movq -0x40(%rbp), %r14
jg 0x125ed
movq %r15, %rdi
movq %r13, %rsi
callq *0x24ca1(%rip)          # 0x37288
movq %rax, %r15
movl %ebx, -0x54(%rbp)
cmpb $0x0, -0x68(%rbp)
je 0x1260d
movq %r15, %rdi
movq %r13, %rsi
leaq -0x100(%rbp), %rdx
movq -0x78(%rbp), %rcx
xorl %eax, %eax
callq 0x61e0
jmp 0x12629
movsd -0xc0(%rbp), %xmm0
movq %r15, %rdi
movq %r13, %rsi
leaq -0x100(%rbp), %rdx
movb $0x1, %al
callq 0x61e0
movq %r15, %rdi
callq 0x6180
movq %rax, %r9
movq %r15, %rdx
movq -0x48(%rbp), %r8
movslq %eax, %rbx
cmpl $0x0, -0xa0(%rbp)
movq %r15, -0x50(%rbp)
jne 0x126a5
cmpq %rbx, %r8
jle 0x126a5
movq %rdx, -0x68(%rbp)
movq %r9, -0x38(%rbp)
movq %r14, %r15
movq %rbx, %r14
shlq $0x20, %r14
movq -0x98(%rbp), %r13
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r14
movq %r15, %rdi
movq %r13, %rsi
leaq -0x29(%rbp), %rdx
movl $0x1, %ecx
callq 0x86a0
incq %rbx
cmpq %rbx, -0x48(%rbp)
jg 0x12669
sarq $0x20, %r14
movq %r14, %rbx
movq %r15, %r14
movq -0x38(%rbp), %r9
movq -0x68(%rbp), %rdx
movq %r14, %rdi
movq -0x98(%rbp), %r13
movq %r13, %rsi
movl %r9d, %ecx
callq 0x86a0
cmpq %rbx, -0x48(%rbp)
leaq -0x29(%rbp), %r15
jle 0x126e0
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x86a0
incq %rbx
cmpq %rbx, -0x48(%rbp)
jg 0x126c4
incq %r12
movl -0x30(%rbp), %eax
addl -0x5c(%rbp), %eax
movl %eax, -0x30(%rbp)
xorl %ecx, %ecx
movq %r12, %rbx
movq %r12, %r15
movq -0xb0(%rbp), %rdx
cmpq %rdx, %rbx
jne 0x1210e
jmp 0x128a3
cmpl $0x58, %r14d
je 0x12486
jmp 0x1299f
movl %r15d, %r14d
movq -0x70(%rbp), %r15
movq (%r15,%r14,8), %rsi
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x127b6
movl 0x14(%rsi), %r9d
movq -0x40(%rbp), %r14
movq -0x50(%rbp), %r15
jmp 0x12805
movl %r15d, %eax
movq -0x70(%rbp), %rcx
movq (%rcx,%rax,8), %r13
leaq 0x22b9e(%rip), %rax     # 0x352f0
cmpq %rax, 0x8(%r13)
movq -0x40(%rbp), %r14
je 0x12778
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0xd6c3
movq -0x48(%rbp), %r8
testl %eax, %eax
jne 0x12960
movb 0x18(%r13), %al
movb %al, -0x100(%rbp)
movl $0x1, %r9d
movl $0x1, %eax
leaq -0x100(%rbp), %rdx
movq -0x50(%rbp), %r15
jmp 0x1263b
movq -0x38(%rbp), %rax
movb $0x2d, (%rax)
incq %rax
movq %rax, -0x38(%rbp)
movl $0x1, %r14d
jmp 0x122ec
movq 0x8(%rsi), %rax
movq %rsi, %rdi
movq %rsi, -0x38(%rbp)
callq *0x18(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rdx
movq (%r15,%r14,8), %rsi
cmpq $0x0, (%rsi)
movl 0x14(%rax), %r9d
movq -0x50(%rbp), %r15
jne 0x127fd
movq 0x8(%rsi), %rax
movq %rsi, %r14
movq %rsi, %rdi
movq %r9, -0x38(%rbp)
movq %rdx, -0x68(%rbp)
callq *0x18(%rax)
movq -0x68(%rbp), %rdx
movq -0x38(%rbp), %r9
movq %r14, %rsi
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r8
cmpl $0x2e, %ebx
sete %cl
movl 0x14(%rsi), %eax
cltq
cmpq %rax, %r13
setl %sil
testb %sil, %cl
cmovnel %r13d, %r9d
cmovnel %r13d, %eax
jmp 0x1263b
movl $0x41, %esi
movq -0x50(%rbp), %rdi
callq *0x24a52(%rip)          # 0x37288
movq -0x48(%rbp), %r8
movq %rax, %r15
movl $0x41, -0x54(%rbp)
xorl %ecx, %ecx
movl $0x3f, %eax
movb $0x31, %dl
btq %rax, %rbx
jb 0x1286a
testl %ecx, %ecx
sete %sil
testq %rax, %rax
setne %dil
xorl %r9d, %r9d
movb $0x30, %dl
testb %dil, %sil
jne 0x12876
movslq %ecx, %rsi
incl %ecx
movb %dl, (%r15,%rsi)
movl %ecx, %r9d
leaq -0x1(%rax), %rdx
incq %rax
movl %r9d, %ecx
cmpq $0x1, %rax
movq %rdx, %rax
ja 0x1284b
movslq %r9d, %rax
movb $0x0, (%r15,%rax)
movl %r9d, %eax
movq %r15, %rdx
jmp 0x1263b
xorl %edi, %edi
jmp 0x12979
testl %ecx, %ecx
je 0x12975
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x86a0
jmp 0x12975
movl -0x58(%rbp), %eax
leaq 0x14e60(%rip), %rcx     # 0x27728
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmp 0x128d8
leaq 0x1878f(%rip), %rax     # 0x2b067
movq %rax, -0x90(%rbp)
movq -0x40(%rbp), %r14
movq %r14, %rdi
movq -0x90(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
movq %rax, %r15
incl 0x10(%rax)
movq (%r14), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
movq -0x98(%rbp), %rbx
jg 0x1291d
movq %r14, %rdi
callq 0x758c
movq %r15, (%r14)
jmp 0x12967
leaq 0x187f4(%rip), %rsi     # 0x2b11d
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
movq %rax, %r15
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x12959
movq %rbx, %rdi
callq 0x758c
movq %r15, (%rbx)
movq -0x40(%rbp), %r14
movq -0x98(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x758c
xorl %r13d, %r13d
movq -0x50(%rbp), %rdi
xorl %esi, %esi
callq *0x24907(%rip)          # 0x37288
movq %r13, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r14d, %r14d
je 0x128df
leaq -0x100(%rbp), %rdx
movb %r14b, (%rdx)
movb $0x0, 0x1(%rdx)
leaq 0x18779(%rip), %rsi     # 0x2b12d
movq -0x40(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x6923
jmp 0x12960