// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x10, %rsp
movq %rsp, %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
cmpb $0x0, 0x144(%rdi)
je 0x35b48
movq %rdi, %rbx
movzbl 0x146(%rdi), %esi
testq %rsi, %rsi
je 0x358b7
leaq 0x1328f(%rip), %rdi     # 0x48b22
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movzwl 0x132(%rbx), %esi
cmpq $0x64, %rsi
je 0x358ef
leaq 0x13261(%rip), %rdi     # 0x48b2c
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x13b(%rbx)
je 0x35971
movzwl 0x12a(%rbx), %esi
cmpq $0x1, %rsi
je 0x35939
leaq 0x13226(%rip), %rdi     # 0x48b32
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x13b(%rbx)
je 0x35971
movzwl 0x128(%rbx), %esi
cmpq $0x1, %rsi
je 0x35971
leaq 0x131f0(%rip), %rdi     # 0x48b3d
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x143(%rbx)
je 0x359ac
leaq 0x131c8(%rip), %rdi     # 0x48b49
leaq 0x131cb(%rip), %rsi     # 0x48b53
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movzwl 0x130(%rbx), %esi
cmpq $0x2, %rsi
jb 0x359e4
leaq 0x131a0(%rip), %rdi     # 0x48b60
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x13d(%rbx)
leaq 0x13187(%rip), %rax     # 0x48b79
leaq 0x13177(%rip), %rsi     # 0x48b70
cmoveq %rax, %rsi
leaq 0xbac6(%rip), %rdi      # 0x414ca
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x14f(%rbx)
je 0x35a63
leaq 0x1314b(%rip), %rdi     # 0x48b83
leaq 0xfd09(%rip), %rsi      # 0x45748
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpw $0x0, 0x130(%rbx)
je 0x35a9d
leaq 0x1311d(%rip), %rdi     # 0x48b91
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movzwl 0x12c(%rbx), %esi
testq %rsi, %rsi
je 0x35ad4
leaq 0x130f4(%rip), %rdi     # 0x48ba4
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movzwl 0x136(%rbx), %esi
testq %rsi, %rsi
je 0x35b0b
leaq 0x130cb(%rip), %rdi     # 0x48bb2
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq (%rbx), %rdi
leaq 0xbfb8(%rip), %rsi      # 0x41acd
movq %rsp, %rbx
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x35b48
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x35b3d
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x35b23
addq $0x10, %rsp
popq %rbx
retq