// File: /workspace/github_c_makefile_star2_O3/neosploit[P]compiler/libfort/lib/fort.c
// Function: set_border_props_for_props
static void set_border_props_for_props(f_table_properties_t *properties, const struct ft_border_style *style)
{
    if (style >= built_in_external_styles && style < (built_in_external_styles + BUILT_IN_STYLES_SZ)) {
        size_t pos = (size_t)(style - built_in_external_styles);
        memcpy(&(properties->border_style), built_in_styles[pos], sizeof(struct fort_border_style));
        return;
    }

    const struct ft_border_chars *border_chs = &(style->border_chs);
    const struct ft_border_chars *header_border_chs = &(style->header_border_chs);

#define BOR_CHARS properties->border_style.border_chars
#define H_BOR_CHARS properties->border_style.header_border_chars
#define SEP_CHARS properties->border_style.separator_chars

    BOR_CHARS[TT_bip] = border_chs->top_border_ch;
    BOR_CHARS[IH_bip] = border_chs->separator_ch;
    BOR_CHARS[BB_bip] = border_chs->bottom_border_ch;
    BOR_CHARS[LL_bip] = BOR_CHARS[IV_bip] = BOR_CHARS[RR_bip] = border_chs->side_border_ch;

    BOR_CHARS[TL_bip] = BOR_CHARS[TV_bip] = BOR_CHARS[TR_bip] = border_chs->out_intersect_ch;
    BOR_CHARS[LH_bip] = BOR_CHARS[RH_bip] = border_chs->out_intersect_ch;
    BOR_CHARS[BL_bip] = BOR_CHARS[BV_bip] = BOR_CHARS[BR_bip] = border_chs->out_intersect_ch;
    BOR_CHARS[II_bip] = border_chs->in_intersect_ch;

    BOR_CHARS[LI_bip] = BOR_CHARS[TI_bip] = BOR_CHARS[RI_bip] = BOR_CHARS[BI_bip] = border_chs->in_intersect_ch;

    if (strlen(border_chs->separator_ch) == 0 && strlen(border_chs->in_intersect_ch) == 0) {
        BOR_CHARS[LH_bip] = BOR_CHARS[RH_bip] = "\0";
    }

    H_BOR_CHARS[TT_bip] = header_border_chs->top_border_ch;
    H_BOR_CHARS[IH_bip] = header_border_chs->separator_ch;
    H_BOR_CHARS[BB_bip] = header_border_chs->bottom_border_ch;
    H_BOR_CHARS[LL_bip] = H_BOR_CHARS[IV_bip] = H_BOR_CHARS[RR_bip] = header_border_chs->side_border_ch;

    H_BOR_CHARS[TL_bip] = H_BOR_CHARS[TV_bip] = H_BOR_CHARS[TR_bip] = header_border_chs->out_intersect_ch;
    H_BOR_CHARS[LH_bip] = H_BOR_CHARS[RH_bip] = header_border_chs->out_intersect_ch;
    H_BOR_CHARS[BL_bip] = H_BOR_CHARS[BV_bip] = H_BOR_CHARS[BR_bip] = header_border_chs->out_intersect_ch;
    H_BOR_CHARS[II_bip] = header_border_chs->in_intersect_ch;

    H_BOR_CHARS[LI_bip] = H_BOR_CHARS[TI_bip] = H_BOR_CHARS[RI_bip] = H_BOR_CHARS[BI_bip] = header_border_chs->in_intersect_ch;

    if (strlen(header_border_chs->separator_ch) == 0 && strlen(header_border_chs->in_intersect_ch) == 0) {
        BOR_CHARS[LH_bip] = BOR_CHARS[RH_bip] = "\0";
    }

    SEP_CHARS[LH_sip] = SEP_CHARS[RH_sip] = SEP_CHARS[II_sip] = header_border_chs->out_intersect_ch;
    SEP_CHARS[TI_sip] = SEP_CHARS[BI_sip] = header_border_chs->out_intersect_ch;
    SEP_CHARS[IH_sip] = style->hor_separator_char;


#undef BOR_CHARS
#undef H_BOR_CHARS
#undef SEP_CHARS
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xd68e(%rip), %rcx      # 0x1f710
movq %rsi, %rax
subq %rcx, %rax
setae %dl
addq $0x618, %rcx            # imm = 0x618
cmpq %rcx, %rsi
setb %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x120c7
shrq $0x3, %rax
movabsq $0x7627627627627628, %rcx # imm = 0x7627627627627628
imulq %rax, %rcx
leaq 0xdc78(%rip), %rax      # 0x1fd30
movq (%rcx,%rax), %rsi
movl $0x160, %edx            # imm = 0x160
popq %rbp
jmp 0x71e0
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x40(%rdi)
movq 0x10(%rsi), %rax
movq %rax, 0x60(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x30(%rdi)
movq %rax, 0x28(%rdi)
movq %rax, 0x20(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x18(%rdi)
movq %rax, 0x10(%rdi)
movq %rax, (%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x50(%rdi)
movq %rax, 0x38(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x70(%rdi)
movq %rax, 0x68(%rdi)
movq %rax, 0x58(%rdi)
movq 0x28(%rsi), %rax
movq %rax, 0x48(%rdi)
movq %rax, 0x90(%rdi)
movq %rax, 0x88(%rdi)
movq %rax, 0x80(%rdi)
movq %rax, 0x78(%rdi)
movq 0x8(%rsi), %rax
cmpb $0x0, (%rax)
jne 0x1215b
movq 0x28(%rsi), %rax
cmpb $0x0, (%rax)
jne 0x1215b
leaq 0x7421(%rip), %rax      # 0x19574
movq %rax, 0x50(%rdi)
movq %rax, 0x38(%rdi)
movq 0x30(%rsi), %rax
movq %rax, 0xa0(%rdi)
movq 0x38(%rsi), %rax
movq %rax, 0xd8(%rdi)
movq 0x40(%rsi), %rax
movq %rax, 0xf8(%rdi)
movq 0x48(%rsi), %rax
movq %rax, 0xc8(%rdi)
movq %rax, 0xc0(%rdi)
movq %rax, 0xb8(%rdi)
movq 0x50(%rsi), %rax
movq %rax, 0xb0(%rdi)
movq %rax, 0xa8(%rdi)
movq %rax, 0x98(%rdi)
movq 0x50(%rsi), %rax
movq %rax, 0xe8(%rdi)
movq %rax, 0xd0(%rdi)
movq 0x50(%rsi), %rax
movq %rax, 0x108(%rdi)
movq %rax, 0x100(%rdi)
movq %rax, 0xf0(%rdi)
movq 0x58(%rsi), %rax
movq %rax, 0xe0(%rdi)
movq %rax, 0x128(%rdi)
movq %rax, 0x120(%rdi)
movq %rax, 0x118(%rdi)
movq %rax, 0x110(%rdi)
movq 0x38(%rsi), %rax
cmpb $0x0, (%rax)
jne 0x12221
movq 0x58(%rsi), %rax
cmpb $0x0, (%rax)
jne 0x12221
leaq 0x735b(%rip), %rax      # 0x19574
movq %rax, 0x50(%rdi)
movq %rax, 0x38(%rdi)
movq 0x50(%rsi), %rax
movq %rax, 0x140(%rdi)
movq %rax, 0x148(%rdi)
movq %rax, 0x130(%rdi)
movq 0x50(%rsi), %rax
movq %rax, 0x158(%rdi)
movq %rax, 0x150(%rdi)
movq 0x60(%rsi), %rax
movq %rax, 0x138(%rdi)
popq %rbp
retq