// File: /workspace/github_c_makefile_star2_O2/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: workbook_set_custom_property_string
lxw_error
workbook_set_custom_property_string(lxw_workbook *self, const char *name,
                                    const char *value)
{
    lxw_custom_property *custom_property;

    if (!name) {
        LXW_WARN_FORMAT("workbook_set_custom_property_string(): "
                        "parameter 'name' cannot be NULL.");
        return LXW_ERROR_NULL_PARAMETER_IGNORED;
    }

    if (!value) {
        LXW_WARN_FORMAT("workbook_set_custom_property_string(): "
                        "parameter 'value' cannot be NULL.");
        return LXW_ERROR_NULL_PARAMETER_IGNORED;
    }

    if (lxw_utf8_strlen(name) > 255) {
        LXW_WARN_FORMAT("workbook_set_custom_property_string(): parameter "
                        "'name' exceeds Excel length limit of 255.");
        return LXW_ERROR_255_STRING_LENGTH_EXCEEDED;
    }

    if (lxw_utf8_strlen(value) > 255) {
        LXW_WARN_FORMAT("workbook_set_custom_property_string(): parameter "
                        "'value' exceeds Excel length limit of 255.");
        return LXW_ERROR_255_STRING_LENGTH_EXCEEDED;
    }

    /* Create a struct to hold the custom property. */
    custom_property = calloc(1, sizeof(struct lxw_custom_property));
    RETURN_ON_MEM_ERROR(custom_property, LXW_ERROR_MEMORY_MALLOC_FAILED);

    custom_property->name = lxw_strdup(name);
    custom_property->u.string = lxw_strdup(value);
    custom_property->type = LXW_CUSTOM_STRING;

    STAILQ_INSERT_TAIL(self->custom_properties, custom_property,
                       list_pointers);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x29aed
movq %rdx, %r14
testq %rdx, %rdx
je 0x29b02
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xd150
cmpq $0x100, %rax            # imm = 0x100
jae 0x29b22
movq %r14, %rdi
callq 0xd150
cmpq $0x100, %rax            # imm = 0x100
jae 0x29b37
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0xc850
testq %rax, %rax
je 0x29b57
movq %rax, %r12
movq %r15, %rdi
callq 0xcd50
movq %rax, 0x8(%r12)
movq %r14, %rdi
callq 0xcd50
movq %rax, 0x10(%r12)
movl $0x1, (%r12)
movq %r12, %rax
addq $0x30, %rax
movq 0x78(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq %r12, (%rcx)
movq 0x78(%rbx), %rcx
movq %rax, 0x8(%rcx)
xorl %eax, %eax
jmp 0x29b7e
movq 0x29504(%rip), %rax     # 0x52ff8
movq (%rax), %rcx
leaq 0x191f2(%rip), %rdi     # 0x42cf0
pushq $0x53
jmp 0x29b15
movq 0x294ef(%rip), %rax     # 0x52ff8
movq (%rax), %rcx
leaq 0x19231(%rip), %rdi     # 0x42d44
pushq $0x54
popq %rsi
pushq $0x1
popq %rdx
callq 0xd000
pushq $0xc
jmp 0x29b7d
movq 0x294cf(%rip), %rax     # 0x52ff8
movq (%rax), %rcx
leaq 0x19266(%rip), %rdi     # 0x42d99
pushq $0x66
jmp 0x29b4a
movq 0x294ba(%rip), %rax     # 0x52ff8
movq (%rax), %rcx
leaq 0x192b8(%rip), %rdi     # 0x42e00
pushq $0x67
popq %rsi
pushq $0x1
popq %rdx
callq 0xd000
pushq $0x14
jmp 0x29b7d
movq 0x2949a(%rip), %rax     # 0x52ff8
movq (%rax), %rdi
leaq 0x13578(%rip), %rsi     # 0x3d0e0
leaq 0x18de2(%rip), %rdx     # 0x42951
movl $0x95e, %ecx            # imm = 0x95E
xorl %eax, %eax
callq 0xc8d0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq