// File: /workspace/github_c_makefile_star2_O2/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_font
STATIC void
_write_font(lxw_styles *self, lxw_format *format, uint8_t is_dxf,
            uint8_t is_rich_string)
{
    if (is_rich_string)
        lxw_xml_start_tag(self->file, "rPr", NULL);
    else
        lxw_xml_start_tag(self->file, "font", NULL);

    if (format->font_condense)
        _write_font_condense(self);

    if (format->font_extend)
        _write_font_extend(self);

    if (format->bold)
        lxw_xml_empty_tag(self->file, "b", NULL);

    if (format->italic)
        lxw_xml_empty_tag(self->file, "i", NULL);

    if (format->font_strikeout)
        lxw_xml_empty_tag(self->file, "strike", NULL);

    if (format->font_outline)
        lxw_xml_empty_tag(self->file, "outline", NULL);

    if (format->font_shadow)
        lxw_xml_empty_tag(self->file, "shadow", NULL);

    if (format->underline)
        _write_font_underline(self, format->underline);

    if (format->font_script == LXW_FONT_SUPERSCRIPT)
        _write_font_vert_align(self, "superscript");

    if (format->font_script == LXW_FONT_SUBSCRIPT)
        _write_font_vert_align(self, "subscript");

    if (!is_dxf && format->font_size > 0.0)
        _write_font_size(self, format->font_size);

    if (format->theme)
        _write_font_color_theme(self, format->theme);
    else if (format->color_indexed)
        _write_font_color_indexed(self, format->color_indexed);
    else if (format->font_color != LXW_COLOR_UNSET)
        _write_font_color_rgb(self, format->font_color);
    else if (!is_dxf)
        _write_font_color_theme(self, LXW_DEFAULT_FONT_THEME);

    if (!is_dxf) {
        _write_font_name(self, format->font_name, is_rich_string);
        _write_font_family(self, format->font_family);

        /* Only write the scheme element for the default font type if it
         * is a hyperlink. */
        if ((!*format->font_name
             || strcmp(LXW_DEFAULT_FONT_NAME, format->font_name) == 0)
            && !format->hyperlink) {
            _write_font_scheme(self, format->font_scheme);
        }
    }

    if (format->hyperlink) {
        self->has_hyperlink = LXW_TRUE;

        if (self->hyperlink_font_id == 0)
            self->hyperlink_font_id = format->font_index;
    }

    if (is_rich_string)
        lxw_xml_end_tag(self->file, "rPr");
    else
        lxw_xml_end_tag(self->file, "font");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
testl %ecx, %ecx
movq (%rdi), %rdi
leaq 0x1ff8e(%rip), %rax     # 0x40354
leaq 0x1deb6(%rip), %r14     # 0x3e283
movq %r14, %rsi
cmoveq %rax, %rsi
xorl %edx, %edx
callq 0xc380
cmpb $0x0, 0x1d7(%r12)
je 0x20456
movq %rsp, %r13
andq $0x0, (%r13)
movq %r13, 0x8(%r13)
leaq 0x1e053(%rip), %rdi     # 0x3e44c
leaq 0x223a6(%rip), %rsi     # 0x427a6
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x8(%r13), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r13)
movq (%r15), %rdi
leaq 0x1ff5d(%rip), %rsi     # 0x40386
movq %r13, %rdx
callq 0xcc70
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20456
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x2044f
movq %r13, 0x8(%rsp)
callq 0xc0d0
jmp 0x20431
cmpb $0x0, 0x1d8(%r12)
je 0x204d1
movq %rsp, %r13
andq $0x0, (%r13)
movq %r13, 0x8(%r13)
leaq 0x1dfd8(%rip), %rdi     # 0x3e44c
leaq 0x2232b(%rip), %rsi     # 0x427a6
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x8(%r13), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r13)
movq (%r15), %rdi
leaq 0x1feeb(%rip), %rsi     # 0x4038f
movq %r13, %rdx
callq 0xcc70
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x204d1
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x204ca
movq %r13, 0x8(%rsp)
callq 0xc0d0
jmp 0x204ac
cmpb $0x0, 0x1c8(%r12)
je 0x204ed
movq (%r15), %rdi
leaq 0x1cb1f(%rip), %rsi     # 0x3d005
xorl %edx, %edx
callq 0xcc70
cmpb $0x0, 0x1c9(%r12)
je 0x20509
movq (%r15), %rdi
leaq 0x256a6(%rip), %rsi     # 0x45ba8
xorl %edx, %edx
callq 0xcc70
cmpb $0x0, 0x1d1(%r12)
je 0x20525
movq (%r15), %rdi
leaq 0x1fe3b(%rip), %rsi     # 0x40359
xorl %edx, %edx
callq 0xcc70
cmpb $0x0, 0x1d2(%r12)
je 0x20541
movq (%r15), %rdi
leaq 0x1fe26(%rip), %rsi     # 0x40360
xorl %edx, %edx
callq 0xcc70
cmpb $0x0, 0x1d3(%r12)
je 0x2055d
movq (%r15), %rdi
leaq 0x220f1(%rip), %rsi     # 0x42647
xorl %edx, %edx
callq 0xcc70
movb 0x1d0(%r12), %al
testb %al, %al
je 0x205ef
movq %rsp, %r13
andq $0x0, (%r13)
movq %r13, 0x8(%r13)
addb $-0x2, %al
cmpb $0x2, %al
ja 0x205b8
movzbl %al, %eax
leaq 0x204e7(%rip), %rcx     # 0x40a70
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0x1deb5(%rip), %rdi     # 0x3e44c
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq (%r15), %rdi
leaq 0x1f146(%rip), %rsi     # 0x3f708
movq %r13, %rdx
callq 0xcc70
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x205ef
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x205e8
movq %r13, 0x8(%rsp)
callq 0xc0d0
jmp 0x205ca
movb 0x1d4(%r12), %al
cmpb $0x1, %al
jne 0x20612
leaq 0x1fd66(%rip), %rsi     # 0x40368
movq %r15, %rdi
callq 0x21a06
movb 0x1d4(%r12), %al
cmpb $0x2, %al
jne 0x20625
leaq 0x1fd57(%rip), %rsi     # 0x40374
movq %r15, %rdi
callq 0x21a06
testb %bpl, %bpl
jne 0x20646
movsd 0x1c0(%r12), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x20646
movq %r15, %rdi
callq 0x21a84
movb 0x1d9(%r12), %al
testb %al, %al
je 0x2065f
movzbl %al, %esi
movq %r15, %rdi
callq 0x21b02
jmp 0x20676
movb 0x22d(%r12), %al
testb %al, %al
je 0x206cc
movzbl %al, %esi
movq %r15, %rdi
callq 0x21b82
testb %bpl, %bpl
je 0x2077e
cmpb $0x0, 0x1da(%r12)
je 0x206a5
movb $0x1, 0x30(%r15)
cmpw $0x0, 0x32(%r15)
jne 0x206a5
movzwl 0x1b6(%r12), %eax
movw %ax, 0x32(%r15)
testb %bl, %bl
movq (%r15), %rdi
leaq 0x1fca3(%rip), %rax     # 0x40354
cmoveq %rax, %r14
movq %r14, %rsi
callq 0xc060
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1cc(%r12), %ecx
testl %ecx, %ecx
je 0x2076a
andl $0xffffff, %ecx         # imm = 0xFFFFFF
leaq 0x1fce0(%rip), %rdx     # 0x403c9
movq %rsp, %rdi
pushq $0x20
popq %rsi
xorl %eax, %eax
callq 0xc5b0
leaq 0x28(%rsp), %r13
andq $0x0, (%r13)
movq %r13, 0x8(%r13)
leaq 0x1fcc5(%rip), %rdi     # 0x403d0
movq %rsp, %rsi
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x8(%r13), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r13)
movq (%r15), %rdi
leaq 0x21d49(%rip), %rsi     # 0x42480
movq %r13, %rdx
callq 0xcc70
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x20676
movq 0x1040(%rdi), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
jne 0x20763
movq %r13, 0x30(%rsp)
callq 0xc0d0
jmp 0x2073f
testb %bpl, %bpl
jne 0x2067f
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x21b02
leaq 0xb4(%r12), %r13
movzbl %bl, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x21c02
movzbl 0x1d5(%r12), %esi
movq %r15, %rdi
callq 0x21c9b
cmpb $0x0, 0xb4(%r12)
je 0x207c7
leaq 0x1fbc7(%rip), %rdi     # 0x4037e
movq %r13, %rsi
callq 0xc860
testl %eax, %eax
jne 0x2067f
cmpb $0x0, 0x1da(%r12)
jne 0x2067f
movq %rsp, %r13
andq $0x0, (%r13)
movq %r13, 0x8(%r13)
cmpb $0x0, 0x134(%r12)
leaq 0x134(%r12), %rax
leaq 0x1fbda(%rip), %rsi     # 0x403d4
cmovneq %rax, %rsi
leaq 0x1dc47(%rip), %rdi     # 0x3e44c
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x8(%r13), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r13)
movq (%r15), %rdi
leaq 0x1fbac(%rip), %rsi     # 0x403da
movq %r13, %rdx
callq 0xcc70
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2067f
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x20858
movq %r13, 0x8(%rsp)
callq 0xc0d0
jmp 0x20836