// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_border
STATIC void
_write_border(lxw_styles *self, lxw_format *format, uint8_t is_dxf)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    /* Add attributes for diagonal borders. */
    if (format->diag_type == LXW_DIAGONAL_BORDER_UP) {
        LXW_PUSH_ATTRIBUTES_STR("diagonalUp", "1");
    }
    else if (format->diag_type == LXW_DIAGONAL_BORDER_DOWN) {
        LXW_PUSH_ATTRIBUTES_STR("diagonalDown", "1");
    }
    else if (format->diag_type == LXW_DIAGONAL_BORDER_UP_DOWN) {
        LXW_PUSH_ATTRIBUTES_STR("diagonalUp", "1");
        LXW_PUSH_ATTRIBUTES_STR("diagonalDown", "1");
    }

    /* Ensure that a default diag border is set if the diag type is set. */
    if (format->diag_type && !format->diag_border) {
        format->diag_border = LXW_BORDER_THIN;
    }

    /* Write the start border tag. */
    lxw_xml_start_tag(self->file, "border", &attributes);

    /* Write the <border> sub elements. */
    _write_sub_border(self, "left", format->left, format->left_color);
    _write_sub_border(self, "right", format->right, format->right_color);
    _write_sub_border(self, "top", format->top, format->top_color);
    _write_sub_border(self, "bottom", format->bottom, format->bottom_color);

    if (is_dxf) {
        _write_sub_border(self, "vertical", 0, LXW_COLOR_UNSET);
        _write_sub_border(self, "horizontal", 0, LXW_COLOR_UNSET);
    }

    /* Conditional DXF formats don't allow diagonal borders. */
    if (!is_dxf)
        _write_sub_border(self, "diagonal",
                          format->diag_border, format->diag_color);

    lxw_xml_end_tag(self->file, "border");

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x20e(%rax), %eax
cmpl $0x1, %eax
jne 0x3428d
jmp 0x34247
leaq 0x352f8(%rip), %rdi     # 0x69546
leaq 0x3721b(%rip), %rsi     # 0x6b470
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x34288
jmp 0x34385
movq -0x10(%rbp), %rax
movzbl 0x20e(%rax), %eax
cmpl $0x2, %eax
jne 0x342e5
jmp 0x3429f
leaq 0x352ab(%rip), %rdi     # 0x69551
leaq 0x371c3(%rip), %rsi     # 0x6b470
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x342e0
jmp 0x34383
movq -0x10(%rbp), %rax
movzbl 0x20e(%rax), %eax
cmpl $0x3, %eax
jne 0x34381
jmp 0x342fb
leaq 0x35244(%rip), %rdi     # 0x69546
leaq 0x37167(%rip), %rsi     # 0x6b470
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x3433c
jmp 0x3433e
leaq 0x3520c(%rip), %rdi     # 0x69551
leaq 0x37124(%rip), %rsi     # 0x6b470
callq 0xc030
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x20(%rbp)
jmp 0x3437f
jmp 0x34381
jmp 0x34383
jmp 0x34385
movq -0x10(%rbp), %rax
movzbl 0x20e(%rax), %eax
cmpl $0x0, %eax
je 0x343ad
movq -0x10(%rbp), %rax
cmpb $0x0, 0x20d(%rax)
jne 0x343ad
movq -0x10(%rbp), %rax
movb $0x1, 0x20d(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x351a3(%rip), %rsi     # 0x6955e
leaq -0x28(%rbp), %rdx
callq 0xc390
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x20f(%rax), %al
movq -0x10(%rbp), %rcx
movl 0x21c(%rcx), %ecx
leaq 0x36faa(%rip), %rsi     # 0x6b38d
movzbl %al, %edx
callq 0x34520
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x210(%rax), %al
movq -0x10(%rbp), %rcx
movl 0x220(%rcx), %ecx
leaq 0x3515b(%rip), %rsi     # 0x69565
movzbl %al, %edx
callq 0x34520
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x211(%rax), %al
movq -0x10(%rbp), %rcx
movl 0x224(%rcx), %ecx
leaq 0x3513a(%rip), %rsi     # 0x6956b
movzbl %al, %edx
callq 0x34520
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x20c(%rax), %al
movq -0x10(%rbp), %rcx
movl 0x214(%rcx), %ecx
leaq 0x35117(%rip), %rsi     # 0x6956f
movzbl %al, %edx
callq 0x34520
cmpb $0x0, -0x11(%rbp)
je 0x3448e
movq -0x8(%rbp), %rdi
leaq 0x35105(%rip), %rsi     # 0x69576
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x34520
movq -0x8(%rbp), %rdi
leaq 0x350fa(%rip), %rsi     # 0x6957f
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x34520
cmpb $0x0, -0x11(%rbp)
jne 0x344bb
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x20d(%rax), %al
movq -0x10(%rbp), %rcx
movl 0x218(%rcx), %ecx
leaq 0x350d7(%rip), %rsi     # 0x6958a
movzbl %al, %edx
callq 0x34520
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x35095(%rip), %rsi     # 0x6955e
callq 0xc060
jmp 0x344d0
cmpq $0x0, -0x28(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x344e0
jmp 0x34512
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x1040(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x34505
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x34507
movq -0x30(%rbp), %rdi
callq 0xc0d0
jmp 0x344d0
jmp 0x34514
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)