// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rdi, %r14
leaq 0x9e(%rsi), %rbx
leaq 0x8(%rsp), %r12
movl $0x81f, %edx            # imm = 0x81F
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc170
movb $0x0, 0x81f(%r12)
movq 0x58(%r14), %r13
movq (%r13), %r14
testq %r14, %r14
je 0x32618
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc800
movl $0x828, %ecx            # imm = 0x828
testl %eax, %eax
js 0x3260f
movl $0x830, %ecx            # imm = 0x830
je 0x3261b
movq (%r14,%rcx), %r14
testq %r14, %r14
jne 0x325f4
xorl %r14d, %r14d
testq %r14, %r14
je 0x32650
leaq 0x8c0(%r15), %rax
movq $0x0, 0x8c0(%r15)
movq 0x820(%r14), %rcx
movq 0x8(%rcx), %rcx
movq %r15, (%rcx)
movq 0x820(%r14), %rcx
movq %rax, 0x8(%rcx)
jmp 0x329ac
movl $0x1, %edi
movl $0x848, %esi            # imm = 0x848
callq 0xc7f0
movq %rax, %r14
testq %rax, %rax
je 0x329bf
movl $0x81f, %edx            # imm = 0x81F
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc170
movb $0x0, 0x81f(%r14)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x820(%r14)
testq %rax, %rax
je 0x329c6
xorl %ebx, %ebx
movq %rbx, (%rax)
movq %rax, 0x8(%rax)
leaq 0x8c0(%r15), %rcx
movq %rbx, 0x8c0(%r15)
movq %r15, (%rax)
movq %rcx, 0x8(%rax)
movq (%r13), %rcx
testq %rcx, %rcx
je 0x32703
movq %rcx, %rbx
movq %r14, %rdi
movq %rcx, %rsi
callq 0xc800
movl $0x828, %ecx            # imm = 0x828
testl %eax, %eax
js 0x326eb
movl $0x830, %ecx            # imm = 0x830
je 0x329ac
movq (%rbx,%rcx), %rcx
testq %rcx, %rcx
jne 0x326c9
notl %eax
shrl $0x1f, %eax
leaq 0x828(,%rax,8), %rax
jmp 0x32708
movl $0x830, %eax            # imm = 0x830
movq %rbx, 0x838(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x828(%r14)
movl $0x1, 0x840(%r14)
testq %rbx, %rbx
je 0x3299a
movq %r14, (%rbx,%rax)
xorl %eax, %eax
cmpl $0x1, 0x840(%rbx)
jne 0x3299e
movq 0x838(%rbx), %rcx
movq 0x828(%rcx), %rdx
cmpq %rdx, %rbx
je 0x32779
testq %rdx, %rdx
je 0x32762
cmpl $0x1, 0x840(%rdx)
je 0x3278e
movq 0x828(%rbx), %rdx
cmpq %r14, %rdx
je 0x327c7
movq %rbx, %rdx
movq %r14, %rbx
jmp 0x3282b
movq 0x830(%rcx), %rdx
testq %rdx, %rdx
je 0x327ac
cmpl $0x1, 0x840(%rdx)
jne 0x327ac
movl %eax, 0x840(%rdx)
movl %eax, 0x840(%rbx)
movl $0x1, 0x840(%rcx)
movq %rcx, %rbx
jmp 0x32985
movq 0x830(%rbx), %rdx
cmpq %r14, %rdx
je 0x328a5
movq %rbx, %rdx
movq %r14, %rbx
jmp 0x32909
movq 0x830(%rdx), %rsi
movq %rsi, 0x828(%rbx)
testq %rsi, %rsi
je 0x327e1
movq %rbx, 0x838(%rsi)
movq 0x838(%rbx), %rdi
movq %rdi, 0x838(%rdx)
movq %r13, %rsi
testq %rdi, %rdi
je 0x32817
movq 0x838(%rbx), %rdi
leaq 0x828(%rdi), %r8
leaq 0x830(%rdi), %rsi
cmpq 0x828(%rdi), %rbx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
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 0x32860
movq %rcx, 0x838(%rsi)
movq 0x838(%rcx), %rdi
movq %rdi, 0x838(%rdx)
movq %r13, %rsi
testq %rdi, %rdi
je 0x32896
movq 0x838(%rcx), %rdi
leaq 0x828(%rdi), %r8
leaq 0x830(%rdi), %rsi
cmpq 0x828(%rdi), %rcx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rcx, 0x828(%rdx)
jmp 0x3297e
movq 0x828(%rdx), %rsi
movq %rsi, 0x830(%rbx)
testq %rsi, %rsi
je 0x328bf
movq %rbx, 0x838(%rsi)
movq 0x838(%rbx), %rdi
movq %rdi, 0x838(%rdx)
movq %r13, %rsi
testq %rdi, %rdi
je 0x328f5
movq 0x838(%rbx), %rdi
leaq 0x828(%rdi), %r8
leaq 0x830(%rdi), %rsi
cmpq 0x828(%rdi), %rbx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rbx, 0x828(%rdx)
movq %rdx, 0x838(%rbx)
movq %r14, %rdx
movl $0x0, 0x840(%rdx)
movl $0x1, 0x840(%rcx)
movq 0x828(%rcx), %rdx
movq 0x830(%rdx), %rsi
movq %rsi, 0x828(%rcx)
testq %rsi, %rsi
je 0x3293e
movq %rcx, 0x838(%rsi)
movq 0x838(%rcx), %rdi
movq %rdi, 0x838(%rdx)
movq %r13, %rsi
testq %rdi, %rdi
je 0x32974
movq 0x838(%rcx), %rdi
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 0x32734
jmp 0x3299e
movq %r14, (%r13)
movq (%r13), %rax
movl $0x0, 0x840(%rax)
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 0x329cb
movl $0x10e6, %edi           # imm = 0x10E6
movq %r14, %rsi
callq 0xed17
movl $0x1, %eax
jmp 0x329ae