// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_sheet_protection
STATIC void
_worksheet_write_sheet_protection(lxw_worksheet *self,
                                  lxw_protection_obj *protect)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    if (!protect->is_configured)
        return;

    LXW_INIT_ATTRIBUTES();

    if (*protect->hash)
        LXW_PUSH_ATTRIBUTES_STR("password", protect->hash);

    if (!protect->no_sheet)
        LXW_PUSH_ATTRIBUTES_INT("sheet", 1);

    if (!protect->no_content)
        LXW_PUSH_ATTRIBUTES_INT("content", 1);

    if (!protect->objects)
        LXW_PUSH_ATTRIBUTES_INT("objects", 1);

    if (!protect->scenarios)
        LXW_PUSH_ATTRIBUTES_INT("scenarios", 1);

    if (protect->format_cells)
        LXW_PUSH_ATTRIBUTES_INT("formatCells", 0);

    if (protect->format_columns)
        LXW_PUSH_ATTRIBUTES_INT("formatColumns", 0);

    if (protect->format_rows)
        LXW_PUSH_ATTRIBUTES_INT("formatRows", 0);

    if (protect->insert_columns)
        LXW_PUSH_ATTRIBUTES_INT("insertColumns", 0);

    if (protect->insert_rows)
        LXW_PUSH_ATTRIBUTES_INT("insertRows", 0);

    if (protect->insert_hyperlinks)
        LXW_PUSH_ATTRIBUTES_INT("insertHyperlinks", 0);

    if (protect->delete_columns)
        LXW_PUSH_ATTRIBUTES_INT("deleteColumns", 0);

    if (protect->delete_rows)
        LXW_PUSH_ATTRIBUTES_INT("deleteRows", 0);

    if (protect->no_select_locked_cells)
        LXW_PUSH_ATTRIBUTES_INT("selectLockedCells", 1);

    if (protect->sort)
        LXW_PUSH_ATTRIBUTES_INT("sort", 0);

    if (protect->autofilter)
        LXW_PUSH_ATTRIBUTES_INT("autoFilter", 0);

    if (protect->pivot_tables)
        LXW_PUSH_ATTRIBUTES_INT("pivotTables", 0);

    if (protect->no_select_unlocked_cells)
        LXW_PUSH_ATTRIBUTES_INT("selectUnlockedCells", 1);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
cmpb $0x0, 0x12(%rsi)
je 0x35498
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
cmpb $0x0, 0x13(%rsi)
je 0x350cb
leaq 0x13(%r14), %rsi
leaq 0x13947(%rip), %rdi     # 0x489ee
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x11(%r14)
jne 0x35102
leaq 0xde87(%rip), %rdi      # 0x42f60
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0xf(%r14)
jne 0x35139
leaq 0x138e7(%rip), %rdi     # 0x489f7
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0xe(%r14)
jne 0x35170
leaq 0x138b8(%rip), %rdi     # 0x489ff
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0xd(%r14)
jne 0x351a7
leaq 0x13889(%rip), %rdi     # 0x48a07
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x2(%r14)
je 0x351db
leaq 0x1385c(%rip), %rdi     # 0x48a11
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x3(%r14)
je 0x3520f
leaq 0x13834(%rip), %rdi     # 0x48a1d
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x4(%r14)
je 0x35243
leaq 0x1380e(%rip), %rdi     # 0x48a2b
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x5(%r14)
je 0x35277
leaq 0x137e5(%rip), %rdi     # 0x48a36
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x6(%r14)
je 0x352ab
leaq 0x137bf(%rip), %rdi     # 0x48a44
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x7(%r14)
je 0x352df
leaq 0x13796(%rip), %rdi     # 0x48a4f
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x8(%r14)
je 0x35313
leaq 0x13773(%rip), %rdi     # 0x48a60
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x9(%r14)
je 0x35347
leaq 0x1374d(%rip), %rdi     # 0x48a6e
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, (%r14)
je 0x3537d
leaq 0x13725(%rip), %rdi     # 0x48a79
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0xa(%r14)
je 0x353b1
leaq 0x13700(%rip), %rdi     # 0x48a8b
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0xb(%r14)
je 0x353e5
leaq 0xe6fd(%rip), %rdi      # 0x43abc
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0xc(%r14)
je 0x35419
leaq 0x1369d(%rip), %rdi     # 0x48a90
xorl %esi, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
cmpb $0x0, 0x1(%r14)
je 0x35450
leaq 0x13675(%rip), %rdi     # 0x48a9c
movl $0x1, %esi
callq 0xc180
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movq (%rbx), %rdi
leaq 0x13656(%rip), %rsi     # 0x48ab0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x35491
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x35485
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x3546a
addq $0x18, %rsp
popq %rbx
popq %r14
retq