// File: /workspace/github_c_makefile_star2_O2/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 0x3247e
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rbx
andq $0x0, (%rbx)
movq %rbx, 0x8(%rbx)
cmpb $0x0, 0x13(%rsi)
je 0x320f8
leaq 0x13(%r15), %rsi
leaq 0x13903(%rip), %rdi     # 0x459da
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x11(%r15)
jne 0x3212a
leaq 0xde5a(%rip), %rdi      # 0x3ff60
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0xf(%r15)
jne 0x3215c
leaq 0x138ab(%rip), %rdi     # 0x459e3
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0xe(%r15)
jne 0x3218e
leaq 0x13881(%rip), %rdi     # 0x459eb
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0xd(%r15)
jne 0x321c0
leaq 0x13857(%rip), %rdi     # 0x459f3
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x2(%r15)
je 0x321f1
leaq 0x1382f(%rip), %rdi     # 0x459fd
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x3(%r15)
je 0x32222
leaq 0x1380a(%rip), %rdi     # 0x45a09
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x4(%r15)
je 0x32253
leaq 0x137e7(%rip), %rdi     # 0x45a17
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x5(%r15)
je 0x32284
leaq 0x137c1(%rip), %rdi     # 0x45a22
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x6(%r15)
je 0x322b5
leaq 0x1379e(%rip), %rdi     # 0x45a30
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x7(%r15)
je 0x322e6
leaq 0x13778(%rip), %rdi     # 0x45a3b
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x8(%r15)
je 0x32317
leaq 0x13758(%rip), %rdi     # 0x45a4c
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x9(%r15)
je 0x32348
leaq 0x13735(%rip), %rdi     # 0x45a5a
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, (%r15)
je 0x32379
leaq 0x13710(%rip), %rdi     # 0x45a65
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0xa(%r15)
je 0x323aa
leaq 0x136f0(%rip), %rdi     # 0x45a77
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0xb(%r15)
je 0x323db
leaq 0xe704(%rip), %rdi      # 0x40abc
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0xc(%r15)
je 0x3240c
leaq 0x13693(%rip), %rdi     # 0x45a7c
xorl %esi, %esi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
cmpb $0x0, 0x1(%r15)
je 0x3243e
leaq 0x1366e(%rip), %rdi     # 0x45a88
pushq $0x1
popq %rsi
callq 0xc1a0
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq (%r14), %rdi
leaq 0x13654(%rip), %rsi     # 0x45a9c
movq %rbx, %rdx
callq 0xcc70
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x32475
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3246e
movq %rbx, 0x8(%rsp)
callq 0xc0d0
jmp 0x32450
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq