// File: /workspace/github_c_makefile_star2_O2/neosploit[P]compiler/libfort/lib/fort.c
// Function: print_n_strings
FT_INTERNAL
int print_n_strings(f_conv_context_t *cntx, size_t n, const char *str)
{
    int cod_w;
    int raw_written;

    switch (cntx->b_type) {
        case CHAR_BUF:
            raw_written = snprint_n_strings(cntx, n, str);
            cod_w = raw_written;
            return cod_w;
#ifdef FT_HAVE_WCHAR
        case W_CHAR_BUF:
            cod_w = wsnprint_n_string(cntx->u.wbuf, cntx->raw_avail, n, str);
            if (cod_w < 0)
                return cod_w;
            raw_written = sizeof(wchar_t) * cod_w;

            cntx->u.buf += raw_written;
            cntx->raw_avail -= raw_written;
            return cod_w;
#endif /* FT_HAVE_WCHAR */
#ifdef FT_HAVE_UTF8
        case UTF8_BUF:
            /* Everying is very strange and differs with W_CHAR_BUF */
            raw_written = u8nprint_n_strings(cntx->u.buf, cntx->raw_avail, n, str);
            if (raw_written < 0) {
                fprintf(stderr, " raw_written = %d\n", raw_written);
                return raw_written;
            }

            cntx->u.buf += raw_written;
            cntx->raw_avail -= raw_written;
            return utf8len(str) * n;
#endif /* FT_HAVE_UTF8 */
        default:
            assert(0);
            return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
movl 0x18(%rdi), %eax
cmpl $0x2, %eax
je 0x12c12
cmpl $0x1, %eax
je 0x12bb4
testl %eax, %eax
jne 0x12dec
movq (%r14), %r12
movq 0x8(%r14), %rbx
movq %r15, %rdi
callq 0x70d0
movq %rbx, %rsi
movq %rax, %rbx
imulq %r13, %rbx
movq %r13, %rcx
pushq $-0x1
popq %r13
cmpq %rsi, %rbx
jae 0x12dcb
movq %rcx, -0x30(%rbp)
testq %rcx, %rcx
je 0x12d41
cmpq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
ja 0x12dcb
testq %rax, %rax
je 0x12d41
leaq 0x71d0(%rip), %rdx      # 0x19d44
movq %r12, %rdi
movl %ebx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x7110
testl %eax, %eax
js 0x12dc8
xorl %eax, %eax
movq -0x30(%rbp), %rsi
cmpq %rsi, %rax
je 0x12de0
movq %r15, %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0x12baf
incq %rcx
movb %dl, (%r12)
incq %r12
jmp 0x12b9d
incq %rax
jmp 0x12b91
movq (%r14), %r12
movq 0x8(%r14), %rbx
movq %r15, %rdi
callq 0x70d0
cmpq $0x2, %rax
jb 0x12c84
movq %r15, %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0x12c84
incq %rcx
testb %dl, %dl
jns 0x12bd0
leaq -0x48(%rbp), %rsi
movq %r15, (%rsi)
leaq -0x40(%rbp), %rcx
andq $0x0, (%rcx)
leaq -0x150(%rbp), %rdi
pushq $0x40
popq %rdx
callq 0x71d0
cmpq $0x2, %rax
jb 0x12d5c
pushq $-0x1
popq %r13
jmp 0x12dcb
movq (%r14), %rbx
movq %r14, -0x38(%rbp)
movq 0x8(%r14), %r14
movq %r15, %rdi
callq 0xd5e6
movq %rax, %r12
decq %r12
movq %r13, %rcx
movq %r12, %r13
movq %rcx, -0x30(%rbp)
imulq %rcx, %r13
cmpq %r14, %r13
jae 0x12da7
cmpq $0x0, -0x30(%rbp)
je 0x12d0b
cmpq $0x7fffffff, %r13       # imm = 0x7FFFFFFF
ja 0x12da7
testq %r12, %r12
je 0x12d0b
movq -0x30(%rbp), %r14
subq $0x1, %r14
jb 0x12d11
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x71e0
addq %r12, %rbx
jmp 0x12c67
movq %rax, %rcx
imulq %r13, %rcx
movq %r13, %rdx
pushq $-0x1
popq %r13
cmpq %rbx, %rcx
jae 0x12dcb
movq %rbx, %rsi
testq %rdx, %rdx
je 0x12d57
cmpq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
ja 0x12dcb
testq %rax, %rax
je 0x12d57
movq %rdx, %rbx
leaq 0x7629(%rip), %rdx      # 0x1a2f0
movq %r12, %rdi
movq %rcx, -0x30(%rbp)
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x7190
testl %eax, %eax
js 0x12dc8
xorl %eax, %eax
movq -0x30(%rbp), %r13
cmpq %rbx, %rax
je 0x12d82
movq %r15, %rcx
movsbl (%rcx), %edx
testl %edx, %edx
je 0x12d06
incq %rcx
movl %edx, (%r12)
addq $0x4, %r12
jmp 0x12cf2
incq %rax
jmp 0x12ce6
movq -0x38(%rbp), %rax
jmp 0x12d1f
movb $0x0, (%rbx)
movq -0x38(%rbp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r14
addq %r13, %rbx
movq %rbx, (%rax)
subq %r13, %r14
movq %r14, 0x8(%rax)
movq %r15, %rdi
callq 0xd5f8
movq %rax, %r13
imull -0x30(%rbp), %r13d
jmp 0x12dcb
xorl %ebx, %ebx
movl %ebx, %eax
addq %rax, %r12
movq %r12, (%r14)
subq %rax, %rsi
movq %rsi, 0x8(%r14)
movl %ebx, %r13d
jmp 0x12dcb
xorl %r13d, %r13d
jmp 0x12d8e
andl $0x0, -0x150(%rbp,%rax,4)
xorl %eax, %eax
movl -0x150(%rbp), %ecx
cmpq %rax, %r13
je 0x12d7a
movl %ecx, (%r12,%rax,4)
incq %rax
jmp 0x12d6c
leaq (%r12,%r13,4), %rcx
andl $0x0, (%rcx,%rax,4)
testl %r13d, %r13d
js 0x12da5
movq (%r14), %r12
movq 0x8(%r14), %rsi
leal (,%r13,4), %eax
cltq
addq %rax, %r12
movq %r12, (%r14)
subq %rax, %rsi
movq %rsi, 0x8(%r14)
jmp 0x12dcb
movq 0xd242(%rip), %rax      # 0x1fff0
movq (%rax), %rdi
leaq 0x6f3b(%rip), %rsi      # 0x19cf3
pushq $-0x1
popq %r13
movl %r13d, %edx
xorl %eax, %eax
callq 0x7180
jmp 0x12dcb
movl %eax, %r13d
movl %r13d, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %r12
movq 0x8(%r14), %rsi
jmp 0x12d43
leaq 0x6547(%rip), %rdi      # 0x1933a
leaq 0x5c7c(%rip), %rsi      # 0x18a76
leaq 0x6f05(%rip), %rcx      # 0x19d06
movl $0xfef, %edx            # imm = 0xFEF
callq 0x7120