// File: /workspace/github_c_makefile_star2_O2/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
leaq 0x8(%rsp), %r12
andq $0x0, (%r12)
movq %rsi, %r14
movq %rdi, %rbx
movq %r12, 0x8(%r12)
testq %rsi, %rsi
je 0x1637c
movl 0x18(%r14), %eax
testl %eax, %eax
setne %bpl
movb $0x1, %r13b
cmpq $0x0, (%r14)
movb $0x1, %r15b
jne 0x163a7
cmpb $0x0, 0x1c(%r14)
je 0x16386
movb $0x1, %r13b
jmp 0x163a7
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x164e6
testl %eax, %eax
setne %al
cmpb $0x0, 0x1d(%r14)
setne %r13b
orb %r13b, %al
testb $0x1, %al
jne 0x163a7
cmpb $-0x1, 0x1e(%r14)
sete %r15b
xorl %r13d, %r13d
movsd 0x8(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x163df
leaq 0x27e5d(%rip), %rdi     # 0x3e21b
callq 0xccf0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzbl 0x10(%r14), %esi
testb %r15b, %r15b
je 0x16422
testq %rsi, %rsi
je 0x16419
andl $0x1, %esi
leaq 0x26c0d(%rip), %rdi     # 0x3d005
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x11(%r14)
jne 0x1644d
jmp 0x1647d
andl $0x1, %esi
leaq 0x26bd9(%rip), %rdi     # 0x3d005
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzbl 0x11(%r14), %esi
andl $0x1, %esi
leaq 0x2f74c(%rip), %rdi     # 0x45ba8
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x12(%r14)
je 0x164b3
leaq 0x2927d(%rip), %rdi     # 0x3f708
leaq 0x27d8c(%rip), %rsi     # 0x3e21e
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movsbq 0x1e(%r14), %rsi
cmpq $-0x1, %rsi
je 0x164e6
leaq 0x27d5d(%rip), %rdi     # 0x3e222
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movl %r13d, %eax
orb %bpl, %al
movq (%rbx), %rdi
leaq 0x27d35(%rip), %rsi     # 0x3e22b
testb $0x1, %al
je 0x1654a
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0xc380
testb %bpl, %bpl
je 0x1651a
movl 0x18(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x16654
testb %r13b, %r13b
je 0x1660f
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x16559
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x16543
movq %r15, 0x10(%rsp)
callq 0xc0d0
jmp 0x16523
leaq 0x8(%rsp), %rdx
callq 0xcc70
jmp 0x1663b
movq (%r14), %rsi
testq %rsi, %rsi
je 0x16589
leaq 0x27ccc(%rip), %rdi     # 0x3e234
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzbl 0x1c(%r14), %esi
testq %rsi, %rsi
je 0x165c8
leaq 0x27ca3(%rip), %rdi     # 0x3e23d
callq 0xc1a0
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x1c(%r14)
je 0x165c8
movb 0x1d(%r14), %al
jmp 0x165d0
movb 0x1d(%r14), %al
testb %al, %al
je 0x165fb
movzbl %al, %esi
leaq 0x27c6f(%rip), %rdi     # 0x3e249
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movq (%rbx), %rdi
leaq 0x27c4c(%rip), %rsi     # 0x3e251
leaq 0x8(%rsp), %rdx
callq 0xcc70
movq (%rbx), %rdi
leaq 0x27c12(%rip), %rsi     # 0x3e22b
callq 0xc060
jmp 0x1663b
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x16636
movq %r12, 0x10(%rsp)
callq 0xc0d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x16620
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq