// File: /workspace/github_c_makefile_star2_O1/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 0x35874
movq %rdi, %rbx
movzbl 0x146(%rdi), %esi
testq %rsi, %rsi
je 0x355e3
leaq 0x1347a(%rip), %rdi     # 0x48a39
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 0x3561b
leaq 0x1344c(%rip), %rdi     # 0x48a43
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 0x3565c
movzwl 0x12a(%rbx), %esi
cmpq $0x1, %rsi
je 0x3565c
leaq 0x13411(%rip), %rdi     # 0x48a49
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 0x3569d
movzwl 0x128(%rbx), %esi
cmpq $0x1, %rsi
je 0x3569d
leaq 0x133db(%rip), %rdi     # 0x48a54
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 0x356d8
leaq 0x133b3(%rip), %rdi     # 0x48a60
leaq 0x133b6(%rip), %rsi     # 0x48a6a
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 0x35710
leaq 0x1338b(%rip), %rdi     # 0x48a77
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 0x13372(%rip), %rax     # 0x48a90
leaq 0x13362(%rip), %rsi     # 0x48a87
cmoveq %rax, %rsi
leaq 0xbda2(%rip), %rdi      # 0x414d2
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 0x3578f
leaq 0x13336(%rip), %rdi     # 0x48a9a
leaq 0xffcd(%rip), %rsi      # 0x45738
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 0x357c9
leaq 0x13308(%rip), %rdi     # 0x48aa8
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 0x35800
leaq 0x132df(%rip), %rdi     # 0x48abb
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 0x35837
leaq 0x132b6(%rip), %rdi     # 0x48ac9
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 0xc294(%rip), %rsi      # 0x41ad5
movq %rsp, %rbx
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x35874
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x35869
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x3584f
addq $0x10, %rsp
popq %rbx
retq