// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_x14_cfvo
STATIC void
_worksheet_write_x14_cfvo(lxw_worksheet *self, uint8_t rule_type,
                          double number, char *string)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    char data[LXW_ATTR_32];
    uint8_t has_value = LXW_FALSE;

    LXW_INIT_ATTRIBUTES();

    if (!string)
        lxw_sprintf_dbl(data, number);

    if (rule_type == LXW_CONDITIONAL_RULE_TYPE_AUTO_MIN) {
        LXW_PUSH_ATTRIBUTES_STR("type", "autoMin");
        has_value = LXW_FALSE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_MINIMUM) {
        LXW_PUSH_ATTRIBUTES_STR("type", "min");
        has_value = LXW_FALSE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_NUMBER) {
        LXW_PUSH_ATTRIBUTES_STR("type", "num");
        has_value = LXW_TRUE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_PERCENT) {
        LXW_PUSH_ATTRIBUTES_STR("type", "percent");
        has_value = LXW_TRUE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_PERCENTILE) {
        LXW_PUSH_ATTRIBUTES_STR("type", "percentile");
        has_value = LXW_TRUE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_FORMULA) {
        LXW_PUSH_ATTRIBUTES_STR("type", "formula");
        has_value = LXW_TRUE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_MAXIMUM) {
        LXW_PUSH_ATTRIBUTES_STR("type", "max");
        has_value = LXW_FALSE;
    }
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_AUTO_MAX) {
        LXW_PUSH_ATTRIBUTES_STR("type", "autoMax");
        has_value = LXW_FALSE;
    }

    if (has_value) {
        lxw_xml_start_tag(self->file, "x14:cfvo", &attributes);

        if (string)
            lxw_xml_data_element(self->file, "xm:f", string, NULL);
        else
            lxw_xml_data_element(self->file, "xm:f", data, NULL);

        lxw_xml_end_tag(self->file, "x14:cfvo");
    }
    else {
        lxw_xml_empty_tag(self->file, "x14:cfvo", &attributes);
    }
    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r12
movq $0x0, (%r12)
movq %r12, 0x8(%r12)
testq %rdx, %rdx
jne 0x3e9a3
leaq 0x27af(%rip), %rdx      # 0x41141
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
movb $0x1, %al
callq 0xc570
movzbl %bpl, %eax
decl %eax
cmpl $0x7, %eax
ja 0x3ea9c
leaq 0x7db7(%rip), %rcx      # 0x46770
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2b1d(%rip), %rsi      # 0x414e6
jmp 0x3ea71
leaq 0xa286(%rip), %rsi      # 0x48c5b
jmp 0x3e9f9
leaq 0xa604(%rip), %rsi      # 0x48fe2
jmp 0x3e9f9
leaq 0xa649(%rip), %rsi      # 0x49030
jmp 0x3e9f9
leaq 0xab28(%rip), %rsi      # 0x49518
jmp 0x3ea71
leaq 0xa633(%rip), %rsi      # 0x4902c
leaq 0x3b50(%rip), %rdi      # 0x42550
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq %rsp, %rdx
movq 0x8(%rdx), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rdx)
movq (%rbx), %rdi
leaq 0xaaf1(%rip), %r15      # 0x49520
movq %r15, %rsi
callq 0xc350
testq %r14, %r14
leaq 0x10(%rsp), %rdx
cmovneq %r14, %rdx
movq (%rbx), %rdi
leaq 0xaadc(%rip), %rsi      # 0x49529
xorl %ecx, %ecx
callq 0xcb30
movq (%rbx), %rdi
movq %r15, %rsi
callq 0xc060
jmp 0x3eaca
leaq 0x2a78(%rip), %rsi      # 0x414e0
jmp 0x3ea71
leaq 0xaa9f(%rip), %rsi      # 0x49510
leaq 0x3ad8(%rip), %rdi      # 0x42550
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq (%rbx), %rdi
leaq 0xaa7a(%rip), %rsi      # 0x49520
movq %rsp, %rdx
callq 0xcc00
jmp 0x3eaca
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3eac5
movq %r12, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
testq %rdi, %rdi
jne 0x3eab0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq