// File: /workspace/github_c_makefile_star2_O2/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_page_setup
STATIC void
_worksheet_write_page_setup(lxw_worksheet *self)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    if (!self->page_setup_changed)
        return;

    /* Set paper size. */
    if (self->paper_size)
        LXW_PUSH_ATTRIBUTES_INT("paperSize", self->paper_size);

    /* Set the print_scale. */
    if (self->print_scale != 100)
        LXW_PUSH_ATTRIBUTES_INT("scale", self->print_scale);

    /* Set the "Fit to page" properties. */
    if (self->fit_page && self->fit_width != 1)
        LXW_PUSH_ATTRIBUTES_INT("fitToWidth", self->fit_width);

    if (self->fit_page && self->fit_height != 1)
        LXW_PUSH_ATTRIBUTES_INT("fitToHeight", self->fit_height);

    /* Set the page print direction. */
    if (self->page_order)
        LXW_PUSH_ATTRIBUTES_STR("pageOrder", "overThenDown");

    /* Set start page. */
    if (self->page_start > 1)
        LXW_PUSH_ATTRIBUTES_INT("firstPageNumber", self->page_start);

    /* Set page orientation. */
    if (self->orientation)
        LXW_PUSH_ATTRIBUTES_STR("orientation", "portrait");
    else
        LXW_PUSH_ATTRIBUTES_STR("orientation", "landscape");

    if (self->black_white)
        LXW_PUSH_ATTRIBUTES_STR("blackAndWhite", "1");

    /* Set start page active flag. */
    if (self->page_start)
        LXW_PUSH_ATTRIBUTES_INT("useFirstPageNumber", 1);

    /* Set the DPI. Mainly only for testing. */
    if (self->horizontal_dpi)
        LXW_PUSH_ATTRIBUTES_INT("horizontalDpi", self->horizontal_dpi);

    if (self->vertical_dpi)
        LXW_PUSH_ATTRIBUTES_INT("verticalDpi", self->vertical_dpi);

    lxw_xml_empty_tag(self->file, "pageSetup", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq %rbx, 0x8(%rbx)
cmpb $0x0, 0x144(%rdi)
je 0x32ae6
movq %rdi, %r14
movzbl 0x146(%rdi), %esi
testq %rsi, %rsi
je 0x3286d
leaq 0x132c2(%rip), %rdi     # 0x45b0e
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzwl 0x132(%r14), %esi
cmpq $0x64, %rsi
je 0x328a3
leaq 0x13296(%rip), %rdi     # 0x45b18
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x13b(%r14)
je 0x32923
movzwl 0x12a(%r14), %esi
cmpq $0x1, %rsi
je 0x328ed
leaq 0x1325c(%rip), %rdi     # 0x45b1e
callq 0xc1a0
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x13b(%r14)
je 0x32923
movzwl 0x128(%r14), %esi
cmpq $0x1, %rsi
je 0x32923
leaq 0x13227(%rip), %rdi     # 0x45b29
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x143(%r14)
je 0x3295c
leaq 0x13201(%rip), %rdi     # 0x45b35
leaq 0x13204(%rip), %rsi     # 0x45b3f
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzwl 0x130(%r14), %esi
cmpq $0x2, %rsi
jb 0x32992
leaq 0x131db(%rip), %rdi     # 0x45b4c
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x13d(%r14)
leaq 0x131c4(%rip), %rax     # 0x45b65
leaq 0x131b4(%rip), %rsi     # 0x45b5c
cmoveq %rax, %rsi
leaq 0xbb17(%rip), %rdi      # 0x3e4ca
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x14f(%r14)
je 0x32a0d
leaq 0x1318a(%rip), %rdi     # 0x45b6f
leaq 0xfd5c(%rip), %rsi      # 0x42748
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpw $0x0, 0x130(%r14)
je 0x32a43
leaq 0x1315e(%rip), %rdi     # 0x45b7d
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzwl 0x12c(%r14), %esi
testq %rsi, %rsi
je 0x32a78
leaq 0x13139(%rip), %rdi     # 0x45b90
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movzwl 0x136(%r14), %esi
testq %rsi, %rsi
je 0x32aad
leaq 0x13112(%rip), %rdi     # 0x45b9e
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movq (%r14), %rdi
leaq 0xc016(%rip), %rsi      # 0x3eacd
movq %rbx, %rdx
callq 0xcc70
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x32ae6
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x32adf
movq %rbx, 0x10(%rsp)
callq 0xc0d0
jmp 0x32abf
addq $0x18, %rsp
popq %rbx
popq %r14
retq