// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/chart.c
// Function: chart_write_disp_units
STATIC void
_chart_write_disp_units(lxw_chart *self, lxw_chart_axis *axis)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    if (!axis->display_units)
        return;

    LXW_INIT_ATTRIBUTES();

    lxw_xml_start_tag(self->file, "c:dispUnits", NULL);

    if (axis->display_units == LXW_CHART_AXIS_UNITS_HUNDREDS)
        LXW_PUSH_ATTRIBUTES_STR("val", "hundreds");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_THOUSANDS)
        LXW_PUSH_ATTRIBUTES_STR("val", "thousands");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_TEN_THOUSANDS)
        LXW_PUSH_ATTRIBUTES_STR("val", "tenThousands");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_HUNDRED_THOUSANDS)
        LXW_PUSH_ATTRIBUTES_STR("val", "hundredThousands");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_MILLIONS)
        LXW_PUSH_ATTRIBUTES_STR("val", "millions");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_TEN_MILLIONS)
        LXW_PUSH_ATTRIBUTES_STR("val", "tenMillions");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_HUNDRED_MILLIONS)
        LXW_PUSH_ATTRIBUTES_STR("val", "hundredMillions");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_BILLIONS)
        LXW_PUSH_ATTRIBUTES_STR("val", "billions");
    else if (axis->display_units == LXW_CHART_AXIS_UNITS_TRILLIONS)
        LXW_PUSH_ATTRIBUTES_STR("val", "trillions");
    else
        LXW_PUSH_ATTRIBUTES_STR("val", "hundreds");

    lxw_xml_empty_tag(self->file, "c:builtInUnit", &attributes);

    if (axis->display_units_visible) {
        lxw_xml_start_tag(self->file, "c:dispUnitsLbl", NULL);
        lxw_xml_empty_tag(self->file, "c:layout", NULL);
        lxw_xml_end_tag(self->file, "c:dispUnitsLbl");
    }

    lxw_xml_end_tag(self->file, "c:dispUnits");

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
cmpb $0x0, 0xf6(%rsi)
je 0x1a8f2
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
movq (%rdi), %rdi
leaq 0x26de9(%rip), %rsi     # 0x415f8
xorl %edx, %edx
callq 0xc350
movb 0xf6(%r15), %al
decb %al
cmpb $0x8, %al
ja 0x1a836
movzbl %al, %eax
leaq 0x25c67(%rip), %rcx     # 0x40494
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0x1a83d
leaq 0x26dc7(%rip), %rsi     # 0x41604
leaq 0x26c10(%rip), %rdi     # 0x41454
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq %rsp, %r14
movq 0x8(%r14), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r14)
movq (%rbx), %rdi
leaq 0x26dfa(%rip), %rsi     # 0x4166d
movq %r14, %rdx
callq 0xcc00
cmpb $0x0, 0xf7(%r15)
je 0x1a8b5
movq (%rbx), %rdi
leaq 0x26dec(%rip), %r15     # 0x4167b
movq %r15, %rsi
xorl %edx, %edx
callq 0xc350
movq (%rbx), %rdi
leaq 0x26931(%rip), %rsi     # 0x411d4
xorl %edx, %edx
callq 0xcc00
movq (%rbx), %rdi
movq %r15, %rsi
callq 0xc060
movq (%rbx), %rdi
leaq 0x26d39(%rip), %rsi     # 0x415f8
callq 0xc060
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1a8e9
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x1a8e2
movq %r14, 0x8(%rsp)
callq 0xc0c0
jmp 0x1a8c4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq