// File: /workspace/github_c_makefile_star2_O1/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 0x351c4
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 0x34df7
leaq 0x13(%r14), %rsi
leaq 0x13b32(%rip), %rdi     # 0x48905
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 0x34e2e
leaq 0xe14b(%rip), %rdi      # 0x42f50
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 0x34e65
leaq 0x13ad2(%rip), %rdi     # 0x4890e
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 0x34e9c
leaq 0x13aa3(%rip), %rdi     # 0x48916
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 0x34ed3
leaq 0x13a74(%rip), %rdi     # 0x4891e
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 0x34f07
leaq 0x13a47(%rip), %rdi     # 0x48928
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 0x34f3b
leaq 0x13a1f(%rip), %rdi     # 0x48934
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 0x34f6f
leaq 0x139f9(%rip), %rdi     # 0x48942
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 0x34fa3
leaq 0x139d0(%rip), %rdi     # 0x4894d
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 0x34fd7
leaq 0x139aa(%rip), %rdi     # 0x4895b
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 0x3500b
leaq 0x13981(%rip), %rdi     # 0x48966
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 0x3503f
leaq 0x1395e(%rip), %rdi     # 0x48977
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 0x35073
leaq 0x13938(%rip), %rdi     # 0x48985
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 0x350a9
leaq 0x13910(%rip), %rdi     # 0x48990
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 0x350dd
leaq 0x138eb(%rip), %rdi     # 0x489a2
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 0x35111
leaq 0xe9c1(%rip), %rdi      # 0x43aac
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 0x35145
leaq 0x13888(%rip), %rdi     # 0x489a7
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 0x3517c
leaq 0x13860(%rip), %rdi     # 0x489b3
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 0x13841(%rip), %rsi     # 0x489c7
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x351bd
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x351b1
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x35196
addq $0x18, %rsp
popq %rbx
popq %r14
retq