// File: /workspace/github_c_makefile_star2_O1/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 0x1919b
movl 0x18(%r14), %eax
testl %eax, %eax
setne %r13b
movb $0x1, %r15b
cmpq $0x0, (%r14)
movb $0x1, %bpl
jne 0x1905f
cmpb $0x0, 0x1c(%r14)
movb $0x1, %bpl
jne 0x1905f
cmpb $0x0, 0x1d(%r14)
setne %bpl
testl %eax, %eax
jne 0x19071
testb %bpl, %bpl
jne 0x19071
cmpb $-0x1, 0x1e(%r14)
sete %r15b
movsd 0x8(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x190ac
leaq 0x2819b(%rip), %rdi     # 0x41223
callq 0xcc80
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
testb %r15b, %r15b
je 0x190b8
cmpb $0x0, 0x10(%r14)
je 0x190eb
movzbl 0x10(%r14), %esi
andl $0x1, %esi
leaq 0x26f3e(%rip), %rdi     # 0x40005
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
testb %r15b, %r15b
je 0x190f7
cmpb $0x0, 0x11(%r14)
je 0x1912a
movzbl 0x11(%r14), %esi
andl $0x1, %esi
leaq 0x2f9cd(%rip), %rdi     # 0x48ad3
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 0x19163
leaq 0x295c0(%rip), %rdi     # 0x426f8
leaq 0x280e7(%rip), %rsi     # 0x41226
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 0x191a0
leaq 0x280b5(%rip), %rdi     # 0x4122a
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
jmp 0x191a0
xorl %r13d, %r13d
xorl %ebp, %ebp
movl %ebp, %eax
orb %r13b, %al
movq (%rbx), %rdi
leaq 0x28084(%rip), %rsi     # 0x41233
testb $0x1, %al
je 0x19203
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0xc350
testb %r13b, %r13b
je 0x191d3
movl 0x18(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19311
testb %bpl, %bpl
je 0x192cc
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x19212
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x191fc
movq %r15, 0x10(%rsp)
callq 0xc0c0
jmp 0x191dc
leaq 0x8(%rsp), %rdx
callq 0xcc00
jmp 0x192f8
movq (%r14), %rsi
testq %rsi, %rsi
je 0x19245
leaq 0x2801b(%rip), %rdi     # 0x4123c
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 0x1927a
leaq 0x27fef(%rip), %rdi     # 0x41245
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)
jne 0x19288
cmpb $0x0, 0x1d(%r14)
je 0x192b8
movzbl 0x1d(%r14), %esi
leaq 0x27fbd(%rip), %rdi     # 0x41251
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 0x27f97(%rip), %rsi     # 0x41259
leaq 0x8(%rsp), %rdx
callq 0xcc00
movq (%rbx), %rdi
leaq 0x27f5d(%rip), %rsi     # 0x41233
callq 0xc060
jmp 0x192f8
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x192f3
movq %r12, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x192dd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq