// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/chart.c
// Function: chart_write_a_def_rpr
STATIC void
_chart_write_a_def_rpr(lxw_chart *self, lxw_chart_font *font)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    uint8_t has_color = LXW_FALSE;
    uint8_t has_latin = LXW_FALSE;
    uint8_t use_font_default = LXW_FALSE;

    LXW_INIT_ATTRIBUTES();

    if (font) {
        has_color = !!font->color;
        has_latin = font->name || font->pitch_family || font->charset;
        use_font_default = !(has_color || has_latin || font->baseline == -1);

        /* Set the font attributes. */
        if (font->size > 0.0)
            LXW_PUSH_ATTRIBUTES_DBL("sz", font->size);

        if (use_font_default || font->bold)
            LXW_PUSH_ATTRIBUTES_INT("b", font->bold & 0x1);

        if (use_font_default || font->italic)
            LXW_PUSH_ATTRIBUTES_INT("i", font->italic & 0x1);

        if (font->underline)
            LXW_PUSH_ATTRIBUTES_STR("u", "sng");

        if (font->baseline != -1)
            LXW_PUSH_ATTRIBUTES_INT("baseline", font->baseline);
    }

    /* There are sub-elements if the font name or color have changed. */
    if (has_latin || has_color) {

        lxw_xml_start_tag(self->file, "a:defRPr", &attributes);

        if (has_color) {
            _chart_write_a_solid_fill(self, font->color, LXW_FALSE);
        }

        if (has_latin) {
            /* Free and reuse the attribute list for the latin attributes. */
            LXW_FREE_ATTRIBUTES();

            if (font->name)
                LXW_PUSH_ATTRIBUTES_STR("typeface", font->name);

            if (font->pitch_family)
                LXW_PUSH_ATTRIBUTES_INT("pitchFamily", font->pitch_family);

            if (font->pitch_family || font->charset)
                LXW_PUSH_ATTRIBUTES_INT("charset", font->charset);

            /* Write the <a:latin> element. */
            lxw_xml_empty_tag(self->file, "a:latin", &attributes);
        }

        lxw_xml_end_tag(self->file, "a:defRPr");
    }
    else {
        lxw_xml_empty_tag(self->file, "a:defRPr", &attributes);
    }

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movq %r12, 0x8(%r12)
testq %rsi, %rsi
je 0x192af
movl 0x18(%r14), %eax
testl %eax, %eax
setne %bpl
movb $0x1, %r13b
cmpq $0x0, (%r14)
movb $0x1, %r15b
jne 0x192da
cmpb $0x0, 0x1c(%r14)
je 0x192b9
movb $0x1, %r13b
jmp 0x192da
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x1942b
testl %eax, %eax
setne %al
cmpb $0x0, 0x1d(%r14)
setne %r13b
orb %r13b, %al
testb $0x1, %al
jne 0x192da
cmpb $-0x1, 0x1e(%r14)
sete %r15b
xorl %r13d, %r13d
movsd 0x8(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x19315
leaq 0x27f2a(%rip), %rdi     # 0x4121b
callq 0xcc80
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzbl 0x10(%r14), %esi
testb %r15b, %r15b
je 0x1935b
testq %rsi, %rsi
je 0x19352
andl $0x1, %esi
leaq 0x26cd7(%rip), %rdi     # 0x40005
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x11(%r14)
jne 0x19389
jmp 0x193bc
andl $0x1, %esi
leaq 0x26ca0(%rip), %rdi     # 0x40005
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzbl 0x11(%r14), %esi
andl $0x1, %esi
leaq 0x2f824(%rip), %rdi     # 0x48bbc
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x12(%r14)
je 0x193f5
leaq 0x2933e(%rip), %rdi     # 0x42708
leaq 0x27e4d(%rip), %rsi     # 0x4121e
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movsbq 0x1e(%r14), %rsi
cmpq $-0x1, %rsi
je 0x1942b
leaq 0x27e1b(%rip), %rdi     # 0x41222
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movl %r13d, %eax
orb %bpl, %al
movq (%rbx), %rdi
leaq 0x27df0(%rip), %rsi     # 0x4122b
testb $0x1, %al
je 0x1948f
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0xc350
testb %bpl, %bpl
je 0x1945f
movl 0x18(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x195a2
testb %r13b, %r13b
je 0x1955d
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1949e
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x19488
movq %r15, 0x10(%rsp)
callq 0xc0c0
jmp 0x19468
leaq 0x8(%rsp), %rdx
callq 0xcc00
jmp 0x19589
movq (%r14), %rsi
testq %rsi, %rsi
je 0x194d1
leaq 0x27d87(%rip), %rdi     # 0x41234
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzbl 0x1c(%r14), %esi
testq %rsi, %rsi
je 0x19513
leaq 0x27d5b(%rip), %rdi     # 0x4123d
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x1c(%r14)
je 0x19513
movb 0x1d(%r14), %al
jmp 0x1951b
movb 0x1d(%r14), %al
testb %al, %al
je 0x19549
movzbl %al, %esi
leaq 0x27d24(%rip), %rdi     # 0x41249
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movq (%rbx), %rdi
leaq 0x27cfe(%rip), %rsi     # 0x41251
leaq 0x8(%rsp), %rdx
callq 0xcc00
movq (%rbx), %rdi
leaq 0x27cc4(%rip), %rsi     # 0x4122b
callq 0xc060
jmp 0x19589
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x19584
movq %r12, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x1956e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq