LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: ft_write_impl_
static int ft_write_impl_(ft_table_t *table, const f_string_view_t *cell_content)
{
    assert(table);
    f_string_buffer_t *buf = get_cur_str_buffer_and_create_if_not_exists(table);
    if (buf == NULL)
        return FT_GEN_ERROR;

    int status = FT_SUCCESS;
    switch (cell_content->type) {
        case CHAR_BUF:
            status = fill_buffer_from_string(buf, cell_content->u.cstr);
            break;
#ifdef FT_HAVE_WCHAR
        case W_CHAR_BUF:
            status = fill_buffer_from_wstring(buf, cell_content->u.wstr);
            break;
#endif
#ifdef FT_HAVE_UTF8
        case UTF8_BUF:
            status = fill_buffer_from_u8string(buf, cell_content->u.u8str);
            break;
#endif
        default:
            status = FT_GEN_ERROR;
    }
    if (FT_IS_SUCCESS(status)) {
        table->cur_col++;
    }
    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x18aa9
jmp 0x18ac8
leaq 0xa0e0(%rip), %rdi      # 0x22b90
leaq 0xa0df(%rip), %rsi      # 0x22b96
movl $0xbda, %edx            # imm = 0xBDA
leaq 0xaeef(%rip), %rcx      # 0x239b2
callq 0x7120
movq -0x10(%rbp), %rdi
callq 0x18b80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x18ae8
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x18b75
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
testl %eax, %eax
je 0x18b13
jmp 0x18aff
movl -0x28(%rbp), %eax
subl $0x1, %eax
je 0x18b28
jmp 0x18b09
movl -0x28(%rbp), %eax
subl $0x2, %eax
je 0x18b3d
jmp 0x18b52
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x181d0
movl %eax, -0x24(%rbp)
jmp 0x18b59
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x18390
movl %eax, -0x24(%rbp)
jmp 0x18b59
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x18610
movl %eax, -0x24(%rbp)
jmp 0x18b59
movl $0xfffffffc, -0x24(%rbp) # imm = 0xFFFFFFFC
cmpl $0x0, -0x24(%rbp)
jl 0x18b6f
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: get_cur_str_buffer_and_create_if_not_exists
FT_INTERNAL
f_string_buffer_t *get_cur_str_buffer_and_create_if_not_exists(ft_table_t *table)
{
    assert(table);

    f_row_t *row = get_row_and_create_if_not_exists(table, table->cur_row);
    if (row == NULL)
        return NULL;

    f_cell_t *cell = NULL;
    fort_entire_table_properties_t *table_props = &table->properties->entire_table_properties;
    switch (table_props->add_strategy) {
        case FT_STRATEGY_INSERT:
            cell = create_cell_in_position(row, table->cur_col);
            break;
        case FT_STRATEGY_REPLACE:
            cell = get_cell_and_create_if_not_exists(row, table->cur_col);
            break;
        default:
            assert(0 && "Unexpected situation inside libfort");
            break;
    }

    if (cell == NULL)
        return NULL;

    return cell_get_string_buffer(cell);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x18b95
jmp 0x18bb4
leaq 0x9ff4(%rip), %rdi      # 0x22b90
leaq 0x9ff3(%rip), %rsi      # 0x22b96
movl $0x1b41, %edx           # imm = 0x1B41
leaq 0xae3d(%rip), %rcx      # 0x239ec
callq 0x7120
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x16640
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x18bdd
movq $0x0, -0x8(%rbp)
jmp 0x18c7c
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x168, %rax            # imm = 0x168
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x18c28
jmp 0x18c07
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x18c3f
jmp 0x18c11
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x18c90
movq %rax, -0x20(%rbp)
jmp 0x18c5e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x17970
movq %rax, -0x20(%rbp)
jmp 0x18c5e
leaq 0x9f7b(%rip), %rdi      # 0x22bc1
leaq 0x9f49(%rip), %rsi      # 0x22b96
movl $0x1b51, %edx           # imm = 0x1B51
leaq 0xad93(%rip), %rcx      # 0x239ec
callq 0x7120
cmpq $0x0, -0x20(%rbp)
jne 0x18c6f
movq $0x0, -0x8(%rbp)
jmp 0x18c7c
movq -0x20(%rbp), %rdi
callq 0x18d30
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: create_cell_in_position
FT_INTERNAL
f_cell_t *create_cell_in_position(f_row_t *row, size_t col)
{
    if (row == NULL || row->cells == NULL) {
        return NULL;
    }

    f_cell_t *new_cell = create_cell();
    if (new_cell == NULL)
        return NULL;
    if (FT_IS_ERROR(vector_insert(row->cells, &new_cell, col))) {
        destroy_cell(new_cell);
        return NULL;
    }
    return VECTOR_AT(row->cells, col, f_cell_t *);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x18cb1
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x18cbb
movq $0x0, -0x8(%rbp)
jmp 0x18d18
callq 0x18140
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x18cd5
movq $0x0, -0x8(%rbp)
jmp 0x18d18
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x13b40
cmpl $0x0, %eax
jge 0x18d01
movq -0x20(%rbp), %rdi
callq 0x17010
movq $0x0, -0x8(%rbp)
jmp 0x18d18
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x13350
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: buffer_check_align
FT_INTERNAL
int buffer_check_align(f_string_buffer_t *buffer)
{
    assert(buffer);
    assert(buffer->str.data);

    switch (buffer->type) {
        case CHAR_BUF:
            return 1;
#ifdef FT_HAVE_WCHAR
        case W_CHAR_BUF:
            return (((uintptr_t)buffer->str.data) & (sizeof(wchar_t) - 1)) == 0;
#endif
#ifdef FT_HAVE_UTF8
        case UTF8_BUF:
            return 1;
#endif
        default:
            assert(0);
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x18e05
jmp 0x18e24
leaq 0xac6d(%rip), %rdi      # 0x23a79
leaq 0x9d83(%rip), %rsi      # 0x22b96
movl $0x1ace, %edx           # imm = 0x1ACE
leaq 0xace2(%rip), %rcx      # 0x23b01
callq 0x7120
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x18e30
jmp 0x18e4f
leaq 0xacf6(%rip), %rdi      # 0x23b2d
leaq 0x9d58(%rip), %rsi      # 0x22b96
movl $0x1acf, %edx           # imm = 0x1ACF
leaq 0xacb7(%rip), %rcx      # 0x23b01
callq 0x7120
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x18e73
jmp 0x18e5f
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x18e7c
jmp 0x18e69
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x18e98
jmp 0x18ea1
movl $0x1, -0x4(%rbp)
jmp 0x18ec0
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0x3, %rax
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x18ec0
movl $0x1, -0x4(%rbp)
jmp 0x18ec0
leaq 0xa5d6(%rip), %rdi      # 0x2347e
leaq 0x9ce7(%rip), %rsi      # 0x22b96
movl $0x1add, %edx           # imm = 0x1ADD
leaq 0xac46(%rip), %rcx      # 0x23b01
callq 0x7120
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: max_border_elem_strlen
FT_INTERNAL
size_t max_border_elem_strlen(struct f_table_properties *properties)
{
    assert(properties);
    size_t result = 1;
    int i = 0;
    for (i = 0; i < BORDER_ITEM_POS_SIZE; ++i) {
        result = MAX(result, strlen(properties->border_style.border_chars[i]));
    }

    for (i = 0; i < BORDER_ITEM_POS_SIZE; ++i) {
        result = MAX(result, strlen(properties->border_style.header_border_chars[i]));
    }

    for (i = 0; i < SEPARATOR_ITEM_POS_SIZE; ++i) {
        result = MAX(result, strlen(properties->border_style.separator_chars[i]));
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x19fa5
jmp 0x19fc4
leaq 0xa545(%rip), %rdi      # 0x244f1
leaq 0x8be3(%rip), %rsi      # 0x22b96
movl $0x142a, %edx           # imm = 0x142A
leaq 0x9b07(%rip), %rcx      # 0x23ac6
callq 0x7120
movq $0x1, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x13, -0x14(%rbp)
jge 0x1a037
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x70d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jbe 0x1a00f
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x1a024
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x70d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x19fda
movl $0x0, -0x14(%rbp)
cmpl $0x13, -0x14(%rbp)
jge 0x1a0a3
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x98(%rax,%rcx,8), %rdi
callq 0x70d0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jbe 0x1a077
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1a090
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x98(%rax,%rcx,8), %rdi
callq 0x70d0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a03e
movl $0x0, -0x14(%rbp)
cmpl $0x6, -0x14(%rbp)
jge 0x1a10f
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x130(%rax,%rcx,8), %rdi
callq 0x70d0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jbe 0x1a0e3
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1a0fc
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x130(%rax,%rcx,8), %rdi
callq 0x70d0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a0aa
movq -0x10(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: get_table_sizes
FT_INTERNAL
f_status get_table_sizes(const ft_table_t *table, size_t *rows, size_t *cols)
{
    *rows = 0;
    *cols = 0;
    if (table && table->rows) {
        *rows = vector_size(table->rows);
        size_t row_index = 0;
        for (row_index = 0; row_index < vector_size(table->rows); ++row_index) {
            f_row_t *row = VECTOR_AT(table->rows, row_index, f_row_t *);
            size_t cols_in_row = columns_in_row(row);
            if (cols_in_row > *cols)
                *cols = cols_in_row;
        }
    }
    return FT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x8(%rbp)
je 0x1a1f7
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1a1f7
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x132b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x132b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x1a1f5
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x13350
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x14270
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x1a1e5
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1a1e7
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1a189
jmp 0x1a1f7
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: cell_vis_width
FT_INTERNAL
size_t cell_vis_width(const f_cell_t *cell, const f_context_t *context)
{
    /* todo:
     * At the moment min width includes paddings. Maybe it is better that min width weren't include
     * paddings but be min width of the cell content without padding
     */

    assert(cell);
    assert(context);

    f_table_properties_t *properties = context->table_properties;
    size_t row = context->row;
    size_t column = context->column;

    size_t padding_left = get_cell_property_hierarchically(properties, row, column, FT_CPROP_LEFT_PADDING);
    size_t padding_right = get_cell_property_hierarchically(properties, row, column, FT_CPROP_RIGHT_PADDING);
    size_t result = padding_left + padding_right;
    if (cell->str_buffer && cell->str_buffer->str.data) {
        result += buffer_text_visible_width(cell->str_buffer);
    }
    result = MAX(result, (size_t)get_cell_property_hierarchically(properties, row, column, FT_CPROP_MIN_WIDTH));
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1a2c9
jmp 0x1a2e8
leaq 0x9383(%rip), %rdi      # 0x23653
leaq 0x88bf(%rip), %rsi      # 0x22b96
movl $0x93e, %edx            # imm = 0x93E
leaq 0x98f6(%rip), %rcx      # 0x23bd9
callq 0x7120
cmpq $0x0, -0x10(%rbp)
je 0x1a2f1
jmp 0x1a310
leaq 0x991e(%rip), %rdi      # 0x23c16
leaq 0x8897(%rip), %rsi      # 0x22b96
movl $0x93f, %edx            # imm = 0x93F
leaq 0x98ce(%rip), %rcx      # 0x23bd9
callq 0x7120
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x10, %ecx
callq 0x1a550
cltq
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x20, %ecx
callq 0x1a550
cltq
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1a3a2
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x1a3a2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1aa90
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x1, %ecx
callq 0x1a550
movl %eax, %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jbe 0x1a3d8
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x1a3f4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x1, %ecx
callq 0x1a550
cltq
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: hint_height_cell
FT_INTERNAL
size_t hint_height_cell(const f_cell_t *cell, const f_context_t *context)
{
    assert(cell);
    assert(context);
    f_table_properties_t *properties = context->table_properties;
    size_t row = context->row;
    size_t column = context->column;

    size_t padding_top = get_cell_property_hierarchically(properties, row, column, FT_CPROP_TOP_PADDING);
    size_t padding_bottom = get_cell_property_hierarchically(properties, row, column, FT_CPROP_BOTTOM_PADDING);
    size_t empty_string_height = get_cell_property_hierarchically(properties, row, column, FT_CPROP_EMPTY_STR_HEIGHT);

    size_t result = padding_top + padding_bottom;
    if (cell->str_buffer && cell->str_buffer->str.data) {
        size_t text_height = buffer_text_visible_height(cell->str_buffer);
        result += text_height == 0 ? empty_string_height : text_height;
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1a429
jmp 0x1a448
leaq 0x9223(%rip), %rdi      # 0x23653
leaq 0x875f(%rip), %rsi      # 0x22b96
movl $0x96f, %edx            # imm = 0x96F
leaq 0x980d(%rip), %rcx      # 0x23c50
callq 0x7120
cmpq $0x0, -0x10(%rbp)
je 0x1a451
jmp 0x1a470
leaq 0x97be(%rip), %rdi      # 0x23c16
leaq 0x8737(%rip), %rsi      # 0x22b96
movl $0x970, %edx            # imm = 0x970
leaq 0x97e5(%rip), %rcx      # 0x23c50
callq 0x7120
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x4, %ecx
callq 0x1a550
cltq
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x8, %ecx
callq 0x1a550
cltq
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x40, %ecx
callq 0x1a550
cltq
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1a53f
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x1a53f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1b560
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x1a52b
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1a533
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: get_cell_property_hierarchically
FT_INTERNAL
int get_cell_property_hierarchically(const f_table_properties_t *propertiess, size_t row, size_t column, uint32_t property)
{
    assert(propertiess);
    size_t row_origin = row;

    const f_cell_props_t *opt = NULL;
    if (propertiess->cell_properties != NULL) {
        while (1) {
            opt = cget_cell_prop(propertiess->cell_properties, row, column);
            if (opt != NULL && PROP_IS_SET(opt->properties_flags, property))
                break;

            if (row != FT_ANY_ROW && column != FT_ANY_COLUMN) {
                row = FT_ANY_ROW;
                continue;
            } else if (row == FT_ANY_ROW && column != FT_ANY_COLUMN) {
                row = row_origin;
                column = FT_ANY_COLUMN;
                continue;
            } else if (row != FT_ANY_ROW  && column == FT_ANY_COLUMN) {
                row = FT_ANY_ROW;
                column = FT_ANY_COLUMN;
                continue;
            }

            opt = NULL;
            break;
        }
    }

    return get_prop_value_if_exists_otherwise_default(opt, property);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1a570
jmp 0x1a58f
leaq 0x9787(%rip), %rdi      # 0x23cfe
leaq 0x8618(%rip), %rsi      # 0x22b96
movl $0x1204, %edx           # imm = 0x1204
leaq 0x9780(%rip), %rcx      # 0x23d0a
callq 0x7120
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x160(%rax)
je 0x1a672
jmp 0x1a5b3
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1b880
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1a5ea
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
je 0x1a5ea
jmp 0x1a670
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x10(%rbp)
je 0x1a60b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x18(%rbp)
je 0x1a60b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x10(%rbp)
jmp 0x1a5b3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x10(%rbp)
jne 0x1a637
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x18(%rbp)
je 0x1a637
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x18(%rbp)
jmp 0x1a5b3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x10(%rbp)
je 0x1a664
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x18(%rbp)
jne 0x1a664
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x10(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x18(%rbp)
jmp 0x1a5b3
jmp 0x1a666
jmp 0x1a668
movq $0x0, -0x30(%rbp)
jmp 0x1a672
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x1b940
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: cell_invis_codes_width
FT_INTERNAL
size_t cell_invis_codes_width(const f_cell_t *cell, const f_context_t *context)
{
    assert(cell);
    assert(context);

    f_table_properties_t *properties = context->table_properties;
    size_t row = context->row;
    size_t column = context->column;

    size_t result = 0;
    char cell_style_tag[TEXT_STYLE_TAG_MAX_SIZE];
    get_style_tag_for_cell(properties, row, column, cell_style_tag, TEXT_STYLE_TAG_MAX_SIZE);
    result += strlen(cell_style_tag);

    char reset_cell_style_tag[TEXT_STYLE_TAG_MAX_SIZE];
    get_reset_style_tag_for_cell(properties, row, column, reset_cell_style_tag, TEXT_STYLE_TAG_MAX_SIZE);
    result += strlen(reset_cell_style_tag);

    char content_style_tag[TEXT_STYLE_TAG_MAX_SIZE];
    get_style_tag_for_content(properties, row, column, content_style_tag, TEXT_STYLE_TAG_MAX_SIZE);
    result += strlen(content_style_tag);

    char reset_content_style_tag[TEXT_STYLE_TAG_MAX_SIZE];
    get_reset_style_tag_for_content(properties, row, column, reset_content_style_tag, TEXT_STYLE_TAG_MAX_SIZE);
    result += strlen(reset_content_style_tag);
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1a6ac
jmp 0x1a6cb
leaq 0x8fa0(%rip), %rdi      # 0x23653
leaq 0x84dc(%rip), %rsi      # 0x22b96
movl $0x952, %edx            # imm = 0x952
leaq 0x96fc(%rip), %rcx      # 0x23dc2
callq 0x7120
cmpq $0x0, -0x10(%rbp)
je 0x1a6d4
jmp 0x1a6f3
leaq 0x953b(%rip), %rdi      # 0x23c16
leaq 0x84b4(%rip), %rsi      # 0x22b96
movl $0x953, %edx            # imm = 0x953
leaq 0x96d4(%rip), %rcx      # 0x23dc2
callq 0x7120
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
movl $0x80, %r8d
callq 0x1bb40
leaq -0xb0(%rbp), %rdi
callq 0x70d0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x130(%rbp), %rcx
movl $0x80, %r8d
callq 0x1bc50
leaq -0x130(%rbp), %rdi
callq 0x70d0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x1b0(%rbp), %rcx
movl $0x80, %r8d
callq 0x1bd50
leaq -0x1b0(%rbp), %rdi
callq 0x70d0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x230(%rbp), %rcx
movl $0x80, %r8d
callq 0x1bea0
leaq -0x230(%rbp), %rdi
callq 0x70d0
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: group_cell_number
FT_INTERNAL
size_t group_cell_number(const f_row_t *row, size_t master_cell_col)
{
    assert(row);
    const f_cell_t *master_cell = get_cell_c(row, master_cell_col);
    if (master_cell == NULL)
        return 0;

    if (get_cell_type(master_cell) != GROUP_MASTER_CELL)
        return 1;

    size_t total_cols = vector_size(row->cells);
    size_t slave_col = master_cell_col + 1;
    while (slave_col < total_cols) {
        const f_cell_t *cell = get_cell_c(row, slave_col);
        if (cell && get_cell_type(cell) == GROUP_SLAVE_CELL) {
            ++slave_col;
        } else {
            break;
        }
    }
    return slave_col - master_cell_col;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1a819
jmp 0x1a838
leaq 0x9024(%rip), %rdi      # 0x23844
leaq 0x836f(%rip), %rsi      # 0x22b96
movl $0x1596, %edx           # imm = 0x1596
leaq 0x9839(%rip), %rcx      # 0x2406c
callq 0x7120
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1a230
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1a85d
movq $0x0, -0x8(%rbp)
jmp 0x1a8df
movq -0x20(%rbp), %rdi
callq 0x1a260
cmpl $0x1, %eax
je 0x1a875
movq $0x1, -0x8(%rbp)
jmp 0x1a8df
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x132b0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1a8d3
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1a230
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x1a8cf
movq -0x38(%rbp), %rdi
callq 0x1a260
cmpl $0x2, %eax
jne 0x1a8cf
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1a8d1
jmp 0x1a8d3
jmp 0x1a891
movq -0x30(%rbp), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: get_row_impl
static
f_row_t *get_row_impl(ft_table_t *table, size_t row, enum f_get_policy policy)
{
    if (table == NULL || table->rows == NULL) {
        return NULL;
    }

    switch (policy) {
        case DONT_CREATE_ON_NULL:
            if (row < vector_size(table->rows)) {
                return VECTOR_AT(table->rows, row, f_row_t *);
            }
            return NULL;
        case CREATE_ON_NULL:
            while (row >= vector_size(table->rows)) {
                f_row_t *new_row = create_row();
                if (new_row == NULL)
                    return NULL;
                if (FT_IS_ERROR(vector_push(table->rows, &new_row))) {
                    destroy_row(new_row);
                    return NULL;
                }
            }
            return VECTOR_AT(table->rows, row, f_row_t *);
    }

    assert(0 && "Shouldn't be here!");
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1a944
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1a951
movq $0x0, -0x8(%rbp)
jmp 0x1aa52
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x1a9b4
jmp 0x1a95d
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x1aa33
jmp 0x1a96b
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x132b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x1a9a7
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x13350
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1aa52
movq $0x0, -0x8(%rbp)
jmp 0x1aa52
jmp 0x1a9b6
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x132b0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jb 0x1aa1a
callq 0x171f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1a9f0
movq $0x0, -0x8(%rbp)
jmp 0x1aa52
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x13720
cmpl $0x0, %eax
jge 0x1aa18
movq -0x28(%rbp), %rdi
callq 0x13300
movq $0x0, -0x8(%rbp)
jmp 0x1aa52
jmp 0x1a9b6
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x13350
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1aa52
leaq 0x8ce7(%rip), %rdi      # 0x23721
leaq 0x8155(%rip), %rsi      # 0x22b96
movl $0x1b25, %edx           # imm = 0x1B25
leaq 0x911c(%rip), %rcx      # 0x23b69
callq 0x7120
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: str_n_substring
FT_INTERNAL
void str_n_substring(const char *str, char ch_separator, size_t n, const char **begin, const char **end)
{
    const char *beg = str_n_substring_beg(str, ch_separator, n);
    if (beg == NULL) {
        *begin = NULL;
        *end = NULL;
        return;
    }

    const char *en = strchr(beg, ch_separator);
    if (en == NULL) {
        en = str + strlen(str);
    }

    *begin = beg;
    *end = en;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movb -0x9(%rbp), %al
movq -0x18(%rbp), %rdx
movsbl %al, %esi
callq 0x1b060
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1ad34
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
jmp 0x1ad81
movq -0x30(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x70e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1ad6b
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x70d0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: wstr_n_substring
FT_INTERNAL
void wstr_n_substring(const wchar_t *str, wchar_t ch_separator, size_t n, const wchar_t **begin, const wchar_t **end)
{
    const wchar_t *beg = wstr_n_substring_beg(str, ch_separator, n);
    if (beg == NULL) {
        *begin = NULL;
        *end = NULL;
        return;
    }

    const wchar_t *en = wcschr(beg, ch_separator);
    if (en == NULL) {
        en = str + wcslen(str);
    }

    *begin = beg;
    *end = en;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x1b130
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1adde
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
jmp 0x1ae2e
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7220
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1ae18
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7100
movq %rax, %rcx
movq -0x40(%rbp), %rax
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: mk_wcswidth
FT_INTERNAL
int mk_wcswidth(const wchar_t *pwcs, size_t n)
{
    int width = 0;

    for (; *pwcs && n-- > 0; pwcs++) {
        int w;
        if ((w = mk_wcwidth(*pwcs)) < 0)
            return -1;
        else
            width += w;
    }

    return width;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x21(%rbp)
je 0x1ae7e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
seta %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1ae87
jmp 0x1aebc
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x1b200
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0x1aea3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1aec2
movl -0x20(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x1aeae
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x1ae57
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: utf8_n_substring
FT_INTERNAL
void utf8_n_substring(const void *str, utf8_int32_t ch_separator, size_t n, const void **begin, const void **end)
{
    const char *beg = (const char *)utf8_n_substring_beg(str, ch_separator, n);
    if (beg == NULL) {
        *begin = NULL;
        *end = NULL;
        return;
    }

    const char *en = (const char *)utf8chr(beg, ch_separator);
    if (en == NULL) {
        en = (const char *)str + strlen((const char *)str);
    }

    *begin = beg;
    *end = en;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x1b470
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1af1e
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
jmp 0x1af6a
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x10c60
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1af54
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x70d0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: utf8_width
static
size_t utf8_width(const void *beg, const void *end)
{
    if (_custom_u8strwid) {
        size_t width = 0;
        if (!_custom_u8strwid(beg, end, &width))
            return width;
    }

    size_t sz = (size_t)((const char *)end - (const char *)beg);
    char *tmp = (char *)F_MALLOC(sizeof(char) * (sz + 1));
    // @todo: add check to tmp
    assert(tmp);

    memcpy(tmp, beg, sz);
    tmp[sz] = '\0';
    size_t result = utf8width(tmp);
    F_FREE(tmp);
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, 0x10de8(%rip)     # 0x2bd70
je 0x1afbb
movq $0x0, -0x20(%rbp)
movq 0x10dd7(%rip), %rax     # 0x2bd70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x1afb9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b04a
jmp 0x1afbb
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq 0xf3e7(%rip), %rax      # 0x2a3b8
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1afec
jmp 0x1b00b
leaq 0x8c2b(%rip), %rdi      # 0x23c1e
leaq 0x7b9c(%rip), %rsi      # 0x22b96
movl $0x19fa, %edx           # imm = 0x19FA
leaq 0x8c1c(%rip), %rcx      # 0x23c22
callq 0x7120
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x71d0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
callq 0x11680
movq %rax, -0x38(%rbp)
movq 0xf1ec(%rip), %rax      # 0x2a228
movq -0x30(%rbp), %rdi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: str_n_substring_beg
FT_INTERNAL
const char *str_n_substring_beg(const char *str, char ch_separator, size_t n)
{
    if (str == NULL)
        return NULL;

    if (n == 0)
        return str;

    str = strchr(str, ch_separator);
    --n;
    while (n > 0) {
        if (str == NULL)
            return NULL;
        --n;
        str++;
        str = strchr(str, ch_separator);
    }
    return str ? (str + 1) : NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b08a
movq $0x0, -0x8(%rbp)
jmp 0x1b123
cmpq $0x0, -0x20(%rbp)
jne 0x1b09e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b123
movq -0x10(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x70e0
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x1b0fe
cmpq $0x0, -0x10(%rbp)
jne 0x1b0d3
movq $0x0, -0x8(%rbp)
jmp 0x1b123
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x70e0
movq %rax, -0x10(%rbp)
jmp 0x1b0bb
cmpq $0x0, -0x10(%rbp)
je 0x1b113
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1b11b
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x1b11b
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: wstr_n_substring_beg
FT_INTERNAL
const wchar_t *wstr_n_substring_beg(const wchar_t *str, wchar_t ch_separator, size_t n)
{
    if (str == NULL)
        return NULL;

    if (n == 0)
        return str;

    str = wcschr(str, ch_separator);
    --n;
    while (n > 0) {
        if (str == NULL)
            return NULL;
        --n;
        str++;
        str = wcschr(str, ch_separator);
    }
    return str ? (str + 1) : NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b157
movq $0x0, -0x8(%rbp)
jmp 0x1b1ee
cmpq $0x0, -0x20(%rbp)
jne 0x1b16b
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b1ee
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7220
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x1b1c9
cmpq $0x0, -0x10(%rbp)
jne 0x1b19f
movq $0x0, -0x8(%rbp)
jmp 0x1b1ee
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7220
movq %rax, -0x10(%rbp)
jmp 0x1b187
cmpq $0x0, -0x10(%rbp)
je 0x1b1de
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x1b1e6
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x1b1e6
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: bisearch
static int bisearch(int32_t ucs, const struct interval *table, int max)
{
    int min = 0;

    if (ucs < table[0].first || ucs > table[max].last)
        return 0;
    while (max >= min) {
        int mid = (min + max) / 2;
        if (ucs > table[mid].last)
            min = mid + 1;
        else if (ucs < table[mid].first)
            max = mid - 1;
        else
            return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x1b3f1
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
cmpl 0x4(%rcx,%rdx,8), %eax
jle 0x1b3fa
movl $0x0, -0x4(%rbp)
jmp 0x1b460
jmp 0x1b3fc
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jl 0x1b459
movl -0x18(%rbp), %eax
addl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
cmpl 0x4(%rcx,%rdx,8), %eax
jle 0x1b431
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1b457
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
cmpl (%rcx,%rdx,8), %eax
jge 0x1b44c
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1b455
movl $0x1, -0x4(%rbp)
jmp 0x1b460
jmp 0x1b457
jmp 0x1b3fc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: utf8_n_substring_beg
FT_INTERNAL
const void *utf8_n_substring_beg(const void *str, utf8_int32_t ch_separator, size_t n)
{
    if (str == NULL)
        return NULL;

    if (n == 0)
        return str;

    str = utf8chr(str, ch_separator);
    --n;
    while (n > 0) {
        if (str == NULL)
            return NULL;
        --n;
        str = ut8next(str);
        str = utf8chr(str, ch_separator);
    }
    return str ? (ut8next(str)) : NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b497
movq $0x0, -0x8(%rbp)
jmp 0x1b530
cmpq $0x0, -0x20(%rbp)
jne 0x1b4ab
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b530
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x10c60
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x1b50a
cmpq $0x0, -0x10(%rbp)
jne 0x1b4df
movq $0x0, -0x8(%rbp)
jmp 0x1b530
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1b540
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x10c60
movq %rax, -0x10(%rbp)
jmp 0x1b4c7
cmpq $0x0, -0x10(%rbp)
je 0x1b520
movq -0x10(%rbp), %rdi
callq 0x1b540
movq %rax, -0x28(%rbp)
jmp 0x1b528
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x1b528
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: buffer_text_visible_height
FT_INTERNAL
size_t buffer_text_visible_height(const f_string_buffer_t *buffer)
{
    if (buffer == NULL || buffer->str.data == NULL || buf_str_len(buffer) == 0) {
        return 0;
    }
    if (buffer->type == CHAR_BUF)
        return 1 + strchr_count(buffer->str.cstr, '\n');
#ifdef FT_HAVE_WCHAR
    else if (buffer->type == W_CHAR_BUF)
        return 1 + wstrchr_count(buffer->str.wstr, L'\n');
#endif /* FT_HAVE_WCHAR */
#ifdef FT_HAVE_UTF8
    else if (buffer->type == UTF8_BUF)
        return 1 + utf8chr_count(buffer->str.u8str, '\n');
#endif /* FT_HAVE_WCHAR */

    assert(0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b58c
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1b58c
movq -0x10(%rbp), %rdi
callq 0x1b640
cmpq $0x0, %rax
jne 0x1b599
movq $0x0, -0x8(%rbp)
jmp 0x1b62b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x1b5be
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0xa, %esi
callq 0x1b700
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1b62b
movq -0x10(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x1b5e3
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0xa, %esi
callq 0x1b780
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1b62b
movq -0x10(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x1b608
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0xa, %esi
callq 0x1b800
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1b62b
jmp 0x1b60a
jmp 0x1b60c
leaq 0x7e6b(%rip), %rdi      # 0x2347e
leaq 0x757c(%rip), %rsi      # 0x22b96
movl $0x19d4, %edx           # imm = 0x19D4
leaq 0x8669(%rip), %rcx      # 0x23c8f
callq 0x7120
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: buf_str_len
static size_t buf_str_len(const f_string_buffer_t *buf)
{
    assert(buf);

    switch (buf->type) {
        case CHAR_BUF:
            return strlen(buf->str.cstr);
#ifdef FT_HAVE_WCHAR
        case W_CHAR_BUF:
            return wcslen(buf->str.wstr);
#endif
#ifdef FT_HAVE_UTF8
        case UTF8_BUF:
            return utf8len(buf->str.u8str);
#endif
    }

    assert(0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b655
jmp 0x1b674
leaq 0x8670(%rip), %rdi      # 0x23ccc
leaq 0x7533(%rip), %rsi      # 0x22b96
movl $0x1845, %edx           # imm = 0x1845
leaq 0x8661(%rip), %rcx      # 0x23cd0
callq 0x7120
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x1b698
jmp 0x1b684
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x1b6aa
jmp 0x1b68e
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x1b6bc
jmp 0x1b6ce
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x70d0
movq %rax, -0x8(%rbp)
jmp 0x1b6ed
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x7100
movq %rax, -0x8(%rbp)
jmp 0x1b6ed
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x111f0
movq %rax, -0x8(%rbp)
jmp 0x1b6ed
leaq 0x7da9(%rip), %rdi      # 0x2347e
leaq 0x74ba(%rip), %rsi      # 0x22b96
movl $0x1854, %edx           # imm = 0x1854
leaq 0x85e8(%rip), %rcx      # 0x23cd0
callq 0x7120
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: strchr_count
FT_INTERNAL
size_t strchr_count(const char *str, char ch)
{
    if (str == NULL)
        return 0;

    size_t count = 0;
    str = strchr(str, ch);
    while (str) {
        count++;
        str++;
        str = strchr(str, ch);
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b723
movq $0x0, -0x8(%rbp)
jmp 0x1b776
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x70e0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b76e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x70e0
movq %rax, -0x10(%rbp)
jmp 0x1b73c
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: wstrchr_count
FT_INTERNAL
size_t wstrchr_count(const wchar_t *str, wchar_t ch)
{
    if (str == NULL)
        return 0;

    size_t count = 0;
    str = wcschr(str, ch);
    while (str) {
        count++;
        str++;
        str = wcschr(str, ch);
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b7a0
movq $0x0, -0x8(%rbp)
jmp 0x1b7f1
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7220
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b7e9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7220
movq %rax, -0x10(%rbp)
jmp 0x1b7b8
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/libfort/lib/fort.c
// Function: utf8chr_count
FT_INTERNAL
size_t utf8chr_count(const void *str, utf8_int32_t ch)
{
    if (str == NULL)
        return 0;

    size_t count = 0;
    str = utf8chr(str, ch);
    while (str) {
        count++;
        str = ut8next(str);
        str = utf8chr(str, ch);
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b820
movq $0x0, -0x8(%rbp)
jmp 0x1b872
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x10c60
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b86a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1b540
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x10c60
movq %rax, -0x10(%rbp)
jmp 0x1b838
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)