// File: /workspace/github_c_makefile_star2_O2/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
movq %rsp, %r12
andq $0x0, (%r12)
movl %esi, %ebp
movq %rdi, %rbx
movq %r12, 0x8(%r12)
testq %rdx, %rdx
jne 0x3bd2b
leaq 0x241d(%rip), %rdx      # 0x3e139
leaq 0x10(%rsp), %rdi
pushq $0x20
popq %rsi
movb $0x1, %al
callq 0xc5b0
movzbl %bpl, %eax
decl %eax
cmpl $0x7, %eax
ja 0x3be1e
leaq 0x7b07(%rip), %rcx      # 0x43848
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x278d(%rip), %rsi      # 0x3e4de
jmp 0x3bdf6
leaq 0x9fd3(%rip), %rsi      # 0x45d30
jmp 0x3bd81
leaq 0xa351(%rip), %rsi      # 0x460b7
jmp 0x3bd81
leaq 0xa396(%rip), %rsi      # 0x46105
jmp 0x3bd81
leaq 0xa875(%rip), %rsi      # 0x465ed
jmp 0x3bdf6
leaq 0xa380(%rip), %rsi      # 0x46101
leaq 0x37d8(%rip), %rdi      # 0x3f560
callq 0xc030
leaq 0x1040(%rax), %rcx
andq $0x0, 0x1040(%rax)
movq %rsp, %rdx
movq 0x8(%rdx), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rdx)
movq (%rbx), %rdi
leaq 0xa841(%rip), %r15      # 0x465f5
movq %r15, %rsi
callq 0xc380
testq %r14, %r14
leaq 0x10(%rsp), %rdx
cmovneq %r14, %rdx
movq (%rbx), %rdi
leaq 0xa82c(%rip), %rsi      # 0x465fe
xorl %ecx, %ecx
callq 0xcba0
movq (%rbx), %rdi
movq %r15, %rsi
callq 0xc060
jmp 0x3be4c
leaq 0x26eb(%rip), %rsi      # 0x3e4d8
jmp 0x3bdf6
leaq 0xa7ef(%rip), %rsi      # 0x465e5
leaq 0x3763(%rip), %rdi      # 0x3f560
callq 0xc030
andq $0x0, 0x1040(%rax)
leaq 0x1040(%rax), %rcx
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq (%rbx), %rdi
leaq 0xa7cd(%rip), %rsi      # 0x465f5
movq %rsp, %rdx
callq 0xcc70
jmp 0x3be4c
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3be47
movq %r12, 0x8(%rsp)
callq 0xc0d0
movq (%rsp), %rdi
testq %rdi, %rdi
jne 0x3be32
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq