// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: store_conditional_format_object
lxw_error
_store_conditional_format_object(lxw_worksheet *self,
                                 lxw_cond_format_obj *cond_format)
{
    lxw_cond_format_hash_element tmp_hash_element;
    lxw_cond_format_hash_element *found_hash_element = NULL;
    lxw_cond_format_hash_element *new_hash_element = NULL;

    /* Create a temp hash element to do the lookup. */
    LXW_ATTRIBUTE_COPY(tmp_hash_element.sqref, cond_format->sqref);
    found_hash_element = RB_FIND(lxw_cond_format_hash,
                                 self->conditional_formats,
                                 &tmp_hash_element);

    if (found_hash_element) {
        /* If the RB element exists then add the conditional format to the
         * list for the sqref range.*/
        STAILQ_INSERT_TAIL(found_hash_element->cond_formats, cond_format,
                           list_pointers);
    }
    else {
        /* Create a new RB hash element. */
        new_hash_element = calloc(1, sizeof(lxw_cond_format_hash_element));
        GOTO_LABEL_ON_MEM_ERROR(new_hash_element, mem_error);

        /* Use the sqref as the key. */
        LXW_ATTRIBUTE_COPY(new_hash_element->sqref, cond_format->sqref);

        /* Also create the list where we store the cond format objects. */
        new_hash_element->cond_formats =
            calloc(1, sizeof(struct lxw_cond_format_list));
        GOTO_LABEL_ON_MEM_ERROR(new_hash_element->cond_formats, mem_error);

        /* Initialize the list and add the conditional format object. */
        STAILQ_INIT(new_hash_element->cond_formats);
        STAILQ_INSERT_TAIL(new_hash_element->cond_formats, cond_format,
                           list_pointers);

        /* Now insert the RB hash element into the tree. */
        RB_INSERT(lxw_cond_format_hash, self->conditional_formats,
                  new_hash_element);

    }

    return LXW_NO_ERROR;

mem_error:
    free(new_hash_element);
    return LXW_ERROR_MEMORY_MALLOC_FAILED;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x870, %rsp            # imm = 0x870
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x868(%rbp)
movq $0x0, -0x870(%rbp)
leaq -0x860(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x9e, %rsi
movl $0x81f, %edx            # imm = 0x81F
callq 0xc1a0
movb $0x0, -0x41(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
leaq -0x860(%rbp), %rsi
callq 0x4b750
movq %rax, -0x868(%rbp)
cmpq $0x0, -0x868(%rbp)
je 0x4b5ba
jmp 0x4b570
movq -0x18(%rbp), %rax
movq $0x0, 0x8c0(%rax)
movq -0x18(%rbp), %rcx
movq -0x868(%rbp), %rax
movq 0x820(%rax), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
addq $0x8c0, %rcx            # imm = 0x8C0
movq -0x868(%rbp), %rax
movq 0x820(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x4b71f
movl $0x1, %edi
movl $0x848, %esi            # imm = 0x848
callq 0xc870
movq %rax, -0x870(%rbp)
cmpq $0x0, -0x870(%rbp)
jne 0x4b603
movq 0x31a17(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1aae5(%rip), %rsi     # 0x660d0
leaq 0x20e02(%rip), %rdx     # 0x6c3f4
movl $0x10de, %ecx           # imm = 0x10DE
movb $0x0, %al
callq 0xc8f0
jmp 0x4b728
jmp 0x4b605
jmp 0x4b607
movq -0x870(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x9e, %rsi
movl $0x81f, %edx            # imm = 0x81F
callq 0xc1a0
movq -0x870(%rbp), %rax
movb $0x0, 0x81f(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x870(%rbp), %rax
movq %rcx, 0x820(%rax)
movq -0x870(%rbp), %rax
cmpq $0x0, 0x820(%rax)
jne 0x4b68b
movq 0x3198f(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1aa5d(%rip), %rsi     # 0x660d0
leaq 0x20d7a(%rip), %rdx     # 0x6c3f4
movl $0x10e6, %ecx           # imm = 0x10E6
movb $0x0, %al
callq 0xc8f0
jmp 0x4b728
jmp 0x4b68d
jmp 0x4b68f
movq -0x870(%rbp), %rax
movq 0x820(%rax), %rax
movq $0x0, (%rax)
movq -0x870(%rbp), %rax
movq 0x820(%rax), %rcx
movq -0x870(%rbp), %rax
movq 0x820(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x4b6c6
movq -0x18(%rbp), %rax
movq $0x0, 0x8c0(%rax)
movq -0x18(%rbp), %rcx
movq -0x870(%rbp), %rax
movq 0x820(%rax), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
addq $0x8c0, %rcx            # imm = 0x8C0
movq -0x870(%rbp), %rax
movq 0x820(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x870(%rbp), %rsi
callq 0x4b7d0
movl $0x0, -0x4(%rbp)
jmp 0x4b73b
movq -0x870(%rbp), %rdi
callq 0xc0d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x870, %rsp            # imm = 0x870
popq %rbp
retq
nopw (%rax,%rax)