// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x850, %rsp            # imm = 0x850
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9e(%rsi), %r15
leaq 0x8(%rsp), %r12
movl $0x81f, %edx            # imm = 0x81F
movq %r12, %rdi
movq %r15, %rsi
callq 0xc170
movb $0x0, 0x81f(%r12)
movq 0x58(%r14), %r13
movq (%r13), %r14
testq %r14, %r14
je 0x328e7
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc800
movl $0x828, %ecx            # imm = 0x828
testl %eax, %eax
js 0x328de
movl $0x830, %ecx            # imm = 0x830
je 0x32c3c
movq (%r14,%rcx), %r14
testq %r14, %r14
jne 0x328bf
movl $0x1, %edi
movl $0x848, %esi            # imm = 0x848
callq 0xc7f0
movq %rax, %r14
testq %rax, %rax
je 0x32c7a
movl $0x81f, %edx            # imm = 0x81F
movq %r14, %rdi
movq %r15, %rsi
callq 0xc170
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x820(%r14)
testq %rax, %rax
je 0x32c81
leaq 0x8c0(%rbx), %rcx
movq $0x0, 0x8c0(%rbx)
movq %rbx, (%rax)
movq %rcx, 0x8(%rax)
movq (%r13), %rcx
testq %rcx, %rcx
je 0x32c20
movq %rcx, %rbx
movq %r14, %rdi
movq %rcx, %rsi
callq 0xc800
movl $0x828, %ecx            # imm = 0x828
testl %eax, %eax
js 0x32979
movl $0x830, %ecx            # imm = 0x830
je 0x32c67
movq (%rbx,%rcx), %rcx
testq %rcx, %rcx
jne 0x32957
movq %rbx, 0x838(%r14)
movl $0x1, 0x840(%r14)
notl %eax
shrl $0x1f, %eax
movq %r14, 0x828(%rbx,%rax,8)
xorl %eax, %eax
cmpl $0x1, 0x840(%rbx)
jne 0x32c1a
movq 0x838(%rbx), %rcx
movq 0x828(%rcx), %rdx
cmpq %rdx, %rbx
je 0x329f0
testq %rdx, %rdx
je 0x329d9
cmpl $0x1, 0x840(%rdx)
jne 0x329d9
movl %eax, 0x840(%rdx)
jmp 0x32a0b
movq 0x828(%rbx), %rdx
cmpq %r14, %rdx
je 0x32a3a
movq %rbx, %rdx
movq %r14, %rbx
jmp 0x32ae4
movq 0x830(%rcx), %rsi
testq %rsi, %rsi
je 0x32a23
cmpl $0x1, 0x840(%rsi)
jne 0x32a23
movl %eax, 0x840(%rsi)
movl %eax, 0x840(%rbx)
movl $0x1, 0x840(%rcx)
movq %rcx, %rbx
jmp 0x32c07
movq 0x830(%rbx), %rsi
cmpq %r14, %rsi
je 0x32a6c
movq %rbx, %rsi
movq %r14, %rbx
jmp 0x32b99
movq 0x830(%rdx), %rsi
movq %rsi, 0x828(%rbx)
testq %rsi, %rsi
je 0x32aa9
movq %rbx, 0x838(%rsi)
movq 0x838(%rbx), %rsi
movq %rsi, 0x838(%rdx)
movq %r13, %rdi
testq %rsi, %rsi
jne 0x32ab7
jmp 0x32ad0
movq 0x828(%rsi), %rdx
movq %rdx, 0x830(%rbx)
testq %rdx, %rdx
je 0x32b57
movq %rbx, 0x838(%rdx)
movq 0x838(%rbx), %rdx
movq %rdx, 0x838(%rsi)
movq %r13, %rdi
testq %rdx, %rdx
jne 0x32b65
jmp 0x32b7e
movq %rcx, 0x838(%rdx)
movq 0x838(%rbx), %rsi
leaq 0x828(%rsi), %r8
leaq 0x830(%rsi), %rdi
cmpq 0x828(%rsi), %rbx
cmoveq %r8, %rdi
movq %rdx, (%rdi)
movq %rbx, 0x830(%rdx)
movq %rdx, 0x838(%rbx)
movq %r14, %rdx
movl $0x0, 0x840(%rdx)
movl $0x1, 0x840(%rcx)
movq 0x830(%rcx), %rdx
movq 0x828(%rdx), %rsi
movq %rsi, 0x830(%rcx)
testq %rsi, %rsi
je 0x32b19
movq %rcx, 0x838(%rsi)
movq 0x838(%rcx), %rdi
movq %rdi, 0x838(%rdx)
movq %r13, %rsi
testq %rdi, %rdi
je 0x32b48
leaq 0x828(%rdi), %r8
leaq 0x830(%rdi), %rsi
cmpq 0x828(%rdi), %rcx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rcx, 0x828(%rdx)
jmp 0x32c00
movq %rcx, 0x838(%rsi)
movq 0x838(%rbx), %rdx
leaq 0x828(%rdx), %r8
leaq 0x830(%rdx), %rdi
cmpq 0x828(%rdx), %rbx
cmoveq %r8, %rdi
movq %rsi, (%rdi)
movq %rbx, 0x828(%rsi)
movq %rsi, 0x838(%rbx)
movq 0x828(%rcx), %rdx
movq %r14, %rsi
movl $0x0, 0x840(%rsi)
movl $0x1, 0x840(%rcx)
movq 0x830(%rdx), %rsi
movq %rsi, 0x828(%rcx)
testq %rsi, %rsi
je 0x32bc7
movq %rcx, 0x838(%rsi)
movq 0x838(%rcx), %rdi
movq %rdi, 0x838(%rdx)
movq %r13, %rsi
testq %rdi, %rdi
je 0x32bf6
leaq 0x828(%rdi), %r8
leaq 0x830(%rdi), %rsi
cmpq 0x828(%rdi), %rcx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rcx, 0x830(%rdx)
movq %rdx, 0x838(%rcx)
movq %rbx, %r14
movq 0x838(%rbx), %rbx
testq %rbx, %rbx
jne 0x329a3
movq (%r13), %r14
jmp 0x32c2f
movl $0x1, 0x840(%r14)
movq %r14, (%r13)
movl $0x0, 0x840(%r14)
jmp 0x32c67
leaq 0x8c0(%rbx), %rax
movq $0x0, 0x8c0(%rbx)
movq 0x820(%r14), %rcx
movq 0x8(%rcx), %rcx
movq %rbx, (%rcx)
movq 0x820(%r14), %rcx
movq %rax, 0x8(%rcx)
xorl %eax, %eax
addq $0x850, %rsp            # imm = 0x850
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10de, %edi           # imm = 0x10DE
jmp 0x32c86
movl $0x10e6, %edi           # imm = 0x10E6
movq %r14, %rsi
callq 0xf0fe
movl $0x1, %eax
jmp 0x32c69