// File: /workspace/github_c_makefile_star2_O1/neosploit[P]compiler/libfort/lib/fort.c
// Function: ft_row_printf_impl_
static int ft_row_printf_impl_(ft_table_t *table, size_t row, const struct f_string_view *fmt, va_list *va)
{
    size_t i = 0;
    size_t new_cols = 0;

    if (table == NULL)
        return -1;

    f_row_t *new_row = create_row_from_fmt_string(fmt, va);

    if (new_row == NULL) {
        return -1;
    }

    f_row_t **cur_row_p = NULL;
    size_t sz = vector_size(table->rows);
    if (row >= sz) {
        size_t push_n = row - sz + 1;
        for (i = 0; i < push_n; ++i) {
            f_row_t *padding_row = create_row();
            if (padding_row == NULL)
                goto clear;

            if (FT_IS_ERROR(vector_push(table->rows, &padding_row))) {
                destroy_row(padding_row);
                goto clear;
            }
        }
    }
    /* todo: clearing pushed items in case of error ?? */

    new_cols = columns_in_row(new_row);
    cur_row_p = &VECTOR_AT(table->rows, row, f_row_t *);

    switch (table->properties->entire_table_properties.add_strategy) {
        case FT_STRATEGY_INSERT: {
            if (FT_IS_ERROR(insert_row(*cur_row_p, new_row, table->cur_col)))
                goto clear;
            break;
        }
        case FT_STRATEGY_REPLACE: {
            if (FT_IS_ERROR(swap_row(*cur_row_p, new_row, table->cur_col)))
                goto clear;
            break;
        }
        default:
            assert(0 && "Unexpected situation inside libfort");
            break;
    }

    table->cur_col += new_cols;
    destroy_row(new_row);
    return (int)new_cols;

clear:
    destroy_row(new_row);
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, -0x40(%rbp)
movl 0x8(%rdx), %esi
movl $0x400, %edi            # imm = 0x400
callq 0x12f46
testq %rax, %rax
je 0xfd93
movq %rax, %r15
movl 0x8(%rbx), %eax
cmpl $0x2, %eax
movq %r14, -0x38(%rbp)
je 0xfda9
cmpl $0x1, %eax
je 0xfd9f
testl %eax, %eax
jne 0x1053b
movq (%rbx), %rdi
callq 0x13041
jmp 0xfdb1
xorl %r13d, %r13d
movq -0x40(%rbp), %r12
jmp 0x100f5
movq (%rbx), %rdi
callq 0x1307b
jmp 0xfdb1
movq (%rbx), %rdi
callq 0x130b6
movq %rax, -0x30(%rbp)
leaq -0x60(%rbp), %r14
movq 0x10(%r13), %rax
movq %rax, -0x50(%rbp)
movups (%r13), %xmm0
movaps %xmm0, -0x60(%rbp)
movq %r15, %rdi
callq 0x12fd9
movl 0x10(%r15), %ecx
cmpl $0x2, %ecx
je 0xfde8
cmpl $0x1, %ecx
je 0xfdfb
testl %ecx, %ecx
jne 0x1051c
movq (%r15), %rdi
movq (%rbx), %rdx
movq %rax, %rsi
movq %r14, %rcx
callq 0x70b0
jmp 0xfe0c
movq (%r15), %rdi
movq (%rbx), %rdx
movq %rax, %rsi
movq %r14, %rcx
callq 0x7180
movl $0x4, %ecx
testl %eax, %eax
js 0xfe56
movl %eax, %r12d
movq %r15, %rdi
callq 0x12fd9
movl $0x3, %ecx
cmpq %r12, %rax
ja 0xfe56
movq 0x8(%r15), %rdi
addq %rdi, %rdi
callq *0x11591(%rip)          # 0x213c8
movl $0x4, %ecx
testq %rax, %rax
je 0xfe56
movq %rax, %r12
movq (%r15), %rdi
callq *0x113eb(%rip)          # 0x21238
movq %r12, (%r15)
shlq 0x8(%r15)
xorl %ecx, %ecx
testl %ecx, %ecx
je 0xfdb9
cmpl $0x4, %ecx
movq -0x40(%rbp), %r12
movq -0x38(%rbp), %r14
je 0x100d9
cmpl $0x3, %ecx
jne 0xfe94
movl 0x10(%r15), %ebx
cmpl $0x2, %ebx
je 0xfea3
cmpl $0x1, %ebx
je 0xfe99
testl %ebx, %ebx
jne 0x10614
movq (%r15), %rdi
callq 0x13041
jmp 0xfeab
jmp 0x100f5
movq (%r15), %rdi
callq 0x1307b
jmp 0xfeab
movq (%r15), %rdi
callq 0x130b6
movq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jne 0xfee3
cmpl $0x2, %ebx
je 0xfeca
cmpl $0x1, %ebx
je 0xff43
testl %ebx, %ebx
jne 0x10633
movq (%r15), %rdi
callq 0x130f0
movq %rax, %r13
testq %r13, %r13
jne 0x100dc
jmp 0x100d9
cmpq $0x1, %rcx
jne 0x100d9
xorl %edi, %edi
callq 0x12e1d
testq %rax, %rax
je 0x100d9
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x13562
testq %rax, %rax
je 0x10078
movl 0x10(%r15), %ecx
cmpl $0x2, %ecx
je 0x10098
cmpl $0x1, %ecx
je 0x1008b
testl %ecx, %ecx
jne 0x10652
movq (%r15), %rsi
movq %rax, %rdi
callq 0x13338
jmp 0x100ac
movq (%r15), %rbx
xorl %r13d, %r13d
xorl %edi, %edi
callq 0x12e1d
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0xfed5
testq %rbx, %rbx
je 0x10082
movq %rbx, %rdi
callq 0x13475
movq %rax, %rbx
testq %rax, %rax
je 0x104eb
movq $0x0, -0x70(%rbp)
movq %rbx, -0x68(%rbp)
movq %rbx, -0x78(%rbp)
movq -0x30(%rbp), %r12
cmpl $0x0, (%rbx)
je 0x10441
movsbl 0x112a2(%rip), %esi     # 0x21240
movq %rbx, %rdi
callq 0x7240
testq %rax, %rax
je 0xffbe
movq %rax, %rbx
movl $0x0, (%rax)
addq $0x4, %rbx
incq -0x70(%rbp)
jmp 0xffc0
xorl %ebx, %ebx
callq 0x13368
movq %rax, -0x60(%rbp)
movl $0x2, %r13d
testq %rax, %rax
je 0x10058
movq %rax, %rdi
movq -0x68(%rbp), %rsi
callq 0x134b2
testl %eax, %eax
js 0x10015
movq (%r12), %rdi
leaq -0x60(%rbp), %rsi
callq 0xf454
testl %eax, %eax
js 0x10015
xorl %r13d, %r13d
testq %rbx, %rbx
sete %r13b
movq -0x68(%rbp), %rax
cmovneq %rbx, %rax
movq %rax, -0x68(%rbp)
shll $0x2, %r13d
jmp 0x10058
movq -0x60(%rbp), %r14
testq %r14, %r14
je 0x10054
movq (%r14), %r12
testq %r12, %r12
je 0x10041
movq (%r12), %rdi
callq *0x11208(%rip)          # 0x21238
movq $0x0, (%r12)
movq %r12, %rdi
callq *0x111f7(%rip)          # 0x21238
movq %r14, %rdi
callq *0x111ee(%rip)          # 0x21238
movq -0x38(%rbp), %r14
movq -0x30(%rbp), %r12
jmp 0x10058
movq -0x38(%rbp), %r14
testl %r13d, %r13d
je 0xff8e
cmpl $0x2, %r13d
movq -0x40(%rbp), %r12
movq -0x78(%rbp), %rbx
jne 0x10445
jmp 0x104eb
movq %r13, %rdi
callq 0xef82
jmp 0x100d9
movq -0x30(%rbp), %r13
jmp 0xfed5
movq (%r15), %rsi
movq %rax, %rdi
callq 0x134b2
jmp 0x100ac
movq (%r15), %rsi
testq %rsi, %rsi
je 0x10671
movq (%rax), %rdi
callq 0x13615
movl %eax, %ebx
testl %eax, %eax
js 0x100cd
movq (%r15), %rdi
callq *0x1117d(%rip)          # 0x21238
movq $0x0, (%r15)
movq %r15, %rdi
callq *0x1116d(%rip)          # 0x21238
jmp 0x100d5
movq %r13, %rdi
callq 0xef82
testl %ebx, %ebx
jns 0x100f5
xorl %r13d, %r13d
movq (%r15), %rdi
callq *0x11153(%rip)          # 0x21238
movq $0x0, (%r15)
movq %r15, %rdi
callq *0x11143(%rip)          # 0x21238
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r13, %r13
je 0x10432
movq (%r12), %rax
testq %rax, %rax
je 0x10226
movq (%rax), %rax
cmpq %r14, %rax
movq %r13, -0x30(%rbp)
ja 0x10198
movq %r14, %r13
incq %r14
subq %rax, %r14
je 0x10172
cmpq $0x1, %r14
adcq $0x0, %r14
leaq -0x60(%rbp), %rbx
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x12e1d
movq %rax, -0x60(%rbp)
testq %rax, %rax
je 0x10161
movq (%r12), %rdi
movq %rbx, %rsi
callq 0xf454
movb $0x1, %cl
testl %eax, %eax
jns 0x10169
movq -0x60(%rbp), %rdi
callq 0xef82
xorl %ecx, %ecx
movl $0x5, %r15d
testb %cl, %cl
je 0x10175
decq %r14
jne 0x10133
xorl %r15d, %r15d
cmpl $0x5, %r15d
je 0x103ee
testl %r15d, %r15d
movq -0x40(%rbp), %r12
movq %r13, %r14
movq -0x30(%rbp), %r13
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x10432
movq (%r13), %rax
testq %rax, %rax
je 0x101a6
movq (%rax), %rcx
jmp 0x101a8
xorl %ecx, %ecx
movq (%r12), %rax
cmpq %r14, (%rax)
jbe 0x101bc
imulq 0x18(%rax), %r14
addq 0x8(%rax), %r14
jmp 0x101bf
xorl %r14d, %r14d
movq 0x8(%r12), %rax
movl 0x178(%rax), %eax
testl %eax, %eax
movq %rcx, -0x70(%rbp)
je 0x10245
cmpl $0x1, %eax
jne 0x1055a
movq (%r14), %r15
testq %r15, %r15
je 0x10579
movq (%r15), %rax
testq %rax, %rax
je 0x10226
movq 0x20(%r12), %rbx
leaq -0x60(%rbp), %r14
cmpq %rbx, (%rax)
jae 0x10382
callq 0x13368
movq %rax, -0x60(%rbp)
testq %rax, %rax
je 0x103ee
movq (%r15), %rdi
movq %r14, %rsi
callq 0xf454
movq (%r15), %rax
testq %rax, %rax
jne 0x101f8
leaq 0xa58e(%rip), %rdi      # 0x1a7bb
leaq 0x9852(%rip), %rsi      # 0x19a86
leaq 0xb162(%rip), %rcx      # 0x1b39d
movl $0x1c74, %edx           # imm = 0x1C74
callq 0x7130
movq (%r14), %rax
testq %rax, %rax
je 0x10598
movq (%rax), %rbx
testq %rbx, %rbx
je 0x10226
movq 0x20(%r12), %r15
movq (%rbx), %r13
movq %r13, %rcx
orq %r15, %rcx
je 0x103fe
movq -0x30(%rbp), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x105b7
cmpq %r14, %rbx
je 0x105d6
movq 0x18(%rbx), %rax
cmpq 0x18(%r14), %rax
jne 0x105f5
movq (%r14), %rax
testq %rax, %rax
je 0x1041b
movq %rax, -0x38(%rbp)
leaq (%rax,%r15), %rsi
cmpq %rsi, 0x10(%rbx)
jae 0x102c9
movq %rbx, %rdi
movq %rsi, %r12
callq 0x13698
cmpl $-0x1, %eax
je 0x103ee
movq %r12, %rsi
movq %r12, 0x10(%rbx)
movq %rsi, -0x68(%rbp)
movq 0x18(%rbx), %rdi
xorl %ecx, %ecx
movl $0x0, %r12d
subq %r15, %r13
jbe 0x10308
movq -0x38(%rbp), %rax
cmpq %rax, %r13
cmovaeq %rax, %r13
movq %rdi, %r12
imulq %r13, %rdi
callq *0x110d2(%rip)          # 0x213c8
movq %r12, %rdi
movq %r13, %r12
movq %rax, %rcx
testq %rax, %rax
je 0x103ee
imulq %r15, %rdi
movq %rcx, %r15
testq %rcx, %rcx
je 0x10331
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
movq 0x18(%rbx), %rdx
imulq %r12, %rdx
movq %rdi, %r13
movq %r15, %rdi
callq 0x71f0
movq %r13, %rdi
addq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
movq -0x38(%rbp), %rdx
imulq 0x18(%rbx), %rdx
callq 0x71f0
testq %r15, %r15
je 0x10360
movq 0x8(%r14), %rdi
movq 0x18(%rbx), %rdx
imulq %r12, %rdx
movq %r15, %rsi
callq 0x71f0
movq (%rbx), %rax
movq -0x68(%rbp), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rcx, (%rbx)
movq %r12, (%r14)
movq %r15, %rdi
callq *0x10ebb(%rip)          # 0x21238
jmp 0x1041b
movq (%r13), %rax
testq %rax, %rax
je 0x10226
movq (%rax), %r12
xorl %r14d, %r14d
cmpq %r12, %r14
jae 0x1040d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq 0x18(%rax), %rax
imulq %r14, %rax
movq (%rcx,%rax), %rax
movq %rax, -0x60(%rbp)
movq (%r15), %rdi
leaq (%r14,%rbx), %rdx
leaq -0x60(%rbp), %rsi
callq 0xf75c
movl %eax, %r13d
testl %eax, %eax
js 0x103d1
incq %r14
jmp 0x103e9
testq %r14, %r14
je 0x103e9
movq (%r15), %rdi
movq %rbx, %rsi
callq 0xfc0c
decq %r14
jne 0x103d6
xorl %r14d, %r14d
testl %r13d, %r13d
jns 0x10395
movq -0x30(%rbp), %rdi
callq 0xef82
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x10432
movq -0x30(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, (%rax)
movq %rbx, (%rdx)
jmp 0x1041b
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq -0x40(%rbp), %rax
movq -0x70(%rbp), %rbx
addq %rbx, 0x20(%rax)
movq -0x30(%rbp), %rdi
callq 0xef82
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %r12
movq -0x30(%rbp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x10226
incq -0x70(%rbp)
leaq 0xb000(%rip), %rbx      # 0x1b460
leaq -0x60(%rbp), %r14
movq -0x30(%rbp), %r13
movq -0x70(%rbp), %rcx
cmpq %rcx, (%rax)
jae 0x10505
callq 0x13368
movq %rax, -0x60(%rbp)
testq %rax, %rax
je 0x104e3
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x134df
testl %eax, %eax
js 0x104b0
movq (%r13), %rdi
movq %r14, %rsi
callq 0xf454
testl %eax, %eax
js 0x104b0
movq (%r13), %rax
testq %rax, %rax
jne 0x10468
jmp 0x10226
movq -0x60(%rbp), %rbx
testq %rbx, %rbx
je 0x104e3
movq (%rbx), %r14
testq %r14, %r14
je 0x104da
movq (%r14), %rdi
callq *0x10d6e(%rip)          # 0x21238
movq $0x0, (%r14)
movq %r14, %rdi
callq *0x10d5e(%rip)          # 0x21238
movq %rbx, %rdi
callq *0x10d55(%rip)          # 0x21238
movq -0x38(%rbp), %r14
movq -0x78(%rbp), %rbx
movq -0x30(%rbp), %rdi
callq 0xef82
movq %rbx, %rdi
callq *0x10d3b(%rip)          # 0x21238
xorl %r13d, %r13d
jmp 0xfed5
movq -0x78(%rbp), %rdi
callq *0x10d29(%rip)          # 0x21238
movq -0x30(%rbp), %r13
movq -0x38(%rbp), %r14
jmp 0xfed5
leaq 0x9e4d(%rip), %rdi      # 0x1a370
leaq 0x955c(%rip), %rsi      # 0x19a86
leaq 0x9e84(%rip), %rcx      # 0x1a3b5
movl $0x1777, %edx           # imm = 0x1777
callq 0x7130
leaq 0x9e2e(%rip), %rdi      # 0x1a370
leaq 0x953d(%rip), %rsi      # 0x19a86
leaq 0x9e22(%rip), %rcx      # 0x1a372
movl $0xf7e, %edx            # imm = 0xF7E
callq 0x7130
leaq 0x9550(%rip), %rdi      # 0x19ab1
leaq 0x951e(%rip), %rsi      # 0x19a86
leaq 0x9daa(%rip), %rcx      # 0x1a319
movl $0xb78, %edx            # imm = 0xB78
callq 0x7130
leaq 0xa15a(%rip), %rdi      # 0x1a6da
leaq 0x94ff(%rip), %rsi      # 0x19a86
leaq 0xa154(%rip), %rcx      # 0x1a6e2
movl $0x1577, %edx           # imm = 0x1577
callq 0x7130
leaq 0xa13b(%rip), %rdi      # 0x1a6da
leaq 0x94e0(%rip), %rsi      # 0x19a86
leaq 0xa167(%rip), %rcx      # 0x1a714
movl $0x1565, %edx           # imm = 0x1565
callq 0x7130
leaq 0xa1ca(%rip), %rdi      # 0x1a788
leaq 0x94c1(%rip), %rsi      # 0x19a86
leaq 0xa178(%rip), %rcx      # 0x1a744
movl $0x1ce0, %edx           # imm = 0x1CE0
callq 0x7130
leaq 0xa1a0(%rip), %rdi      # 0x1a77d
leaq 0x94a2(%rip), %rsi      # 0x19a86
leaq 0xa159(%rip), %rcx      # 0x1a744
movl $0x1ce1, %edx           # imm = 0x1CE1
callq 0x7130
leaq 0xa193(%rip), %rdi      # 0x1a78f
leaq 0x9483(%rip), %rsi      # 0x19a86
leaq 0xa13a(%rip), %rcx      # 0x1a744
movl $0x1ce2, %edx           # imm = 0x1CE2
callq 0x7130
leaq 0x9d55(%rip), %rdi      # 0x1a370
leaq 0x9464(%rip), %rsi      # 0x19a86
leaq 0x9e5f(%rip), %rcx      # 0x1a488
movl $0xf92, %edx            # imm = 0xF92
callq 0x7130
leaq 0x9d36(%rip), %rdi      # 0x1a370
leaq 0x9445(%rip), %rsi      # 0x19a86
leaq 0x9e85(%rip), %rcx      # 0x1a4cd
movl $0x1758, %edx           # imm = 0x1758
callq 0x7130
leaq 0x9d17(%rip), %rdi      # 0x1a370
leaq 0x9426(%rip), %rsi      # 0x19a86
leaq 0x9fac(%rip), %rcx      # 0x1a613
movl $0xa16, %edx            # imm = 0xA16
callq 0x7130
leaq 0x9e90(%rip), %rdi      # 0x1a508
leaq 0x9407(%rip), %rsi      # 0x19a86
leaq 0x9fd3(%rip), %rcx      # 0x1a659
movl $0x9f7, %edx            # imm = 0x9F7
callq 0x7130