// File: /workspace/github_c_makefile_star2_O2/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 0x17b80
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rax
andq $0x0, (%rax)
movq %rax, 0x8(%rax)
movq (%rdi), %rdi
leaq 0x26b50(%rip), %rsi     # 0x3e5f0
xorl %edx, %edx
callq 0xc380
movb 0xf6(%r15), %al
addb $-0x2, %al
cmpb $0x7, %al
ja 0x17ac7
movzbl %al, %eax
leaq 0x259d2(%rip), %rcx     # 0x3d490
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0x17ace
leaq 0x26b2e(%rip), %rsi     # 0x3e5fc
leaq 0x26977(%rip), %rdi     # 0x3e44c
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq %rsp, %r14
movq 0x8(%r14), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r14)
movq (%rbx), %rdi
leaq 0x26b64(%rip), %rsi     # 0x3e665
movq %r14, %rdx
callq 0xcc70
cmpb $0x0, 0xf7(%r15)
je 0x17b43
movq (%rbx), %rdi
leaq 0x26b56(%rip), %r15     # 0x3e673
movq %r15, %rsi
xorl %edx, %edx
callq 0xc380
movq (%rbx), %rdi
leaq 0x2669b(%rip), %rsi     # 0x3e1cc
xorl %edx, %edx
callq 0xcc70
movq (%rbx), %rdi
movq %r15, %rsi
callq 0xc060
movq (%rbx), %rdi
leaq 0x26aa3(%rip), %rsi     # 0x3e5f0
callq 0xc060
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x17b77
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x17b70
movq %r14, 0x8(%rsp)
callq 0xc0d0
jmp 0x17b52
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq