// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_cf_rule_average
STATIC void
_worksheet_write_cf_rule_average(lxw_worksheet *self,
                                 lxw_cond_format_obj *cond_format)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    uint8_t criteria = cond_format->criteria;

    LXW_INIT_ATTRIBUTES();

    LXW_PUSH_ATTRIBUTES_STR("type", cond_format->type_string);

    if (cond_format->dxf_index != LXW_PROPERTY_UNSET)
        LXW_PUSH_ATTRIBUTES_INT("dxfId", cond_format->dxf_index);

    LXW_PUSH_ATTRIBUTES_INT("priority", cond_format->dxf_priority);

    if (cond_format->stop_if_true)
        LXW_PUSH_ATTRIBUTES_INT("stopIfTrue", 1);

    if (criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW_OR_EQUAL
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_BELOW
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_2_STD_DEV_BELOW
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_3_STD_DEV_BELOW)
        LXW_PUSH_ATTRIBUTES_INT("aboveAverage", 0);

    if (criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE_OR_EQUAL
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW_OR_EQUAL)
        LXW_PUSH_ATTRIBUTES_INT("equalAverage", 1);

    if (criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_ABOVE
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_BELOW)
        LXW_PUSH_ATTRIBUTES_INT("stdDev", 1);

    if (criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_2_STD_DEV_ABOVE
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_2_STD_DEV_BELOW)
        LXW_PUSH_ATTRIBUTES_INT("stdDev", 2);

    if (criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_3_STD_DEV_ABOVE
        || criteria == LXW_CONDITIONAL_CRITERIA_AVERAGE_3_STD_DEV_BELOW)
        LXW_PUSH_ATTRIBUTES_INT("stdDev", 3);

    lxw_xml_empty_tag(self->file, "cfRule", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x29(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x5fcbc
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
leaq 0x86e5(%rip), %rdi      # 0x683b0
callq 0xc030
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5fcfe
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x88(%rax)
je 0x5fd54
jmp 0x5fd0d
movq -0x10(%rbp), %rax
movslq 0x88(%rax), %rsi
leaq 0xea17(%rip), %rdi      # 0x6e736
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5fd52
jmp 0x5fd54
jmp 0x5fd56
movq -0x10(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, %esi
leaq 0xe9d3(%rip), %rdi      # 0x6e73c
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5fd9c
movq -0x10(%rbp), %rax
cmpb $0x0, 0x73(%rax)
je 0x5fde9
jmp 0x5fda8
leaq 0xe996(%rip), %rdi      # 0x6e745
movl $0x1, %esi
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5fde7
jmp 0x5fde9
movzbl -0x29(%rbp), %eax
cmpl $0x18, %eax
je 0x5fe16
movzbl -0x29(%rbp), %eax
cmpl $0x1a, %eax
je 0x5fe16
movzbl -0x29(%rbp), %eax
cmpl $0x1c, %eax
je 0x5fe16
movzbl -0x29(%rbp), %eax
cmpl $0x1e, %eax
je 0x5fe16
movzbl -0x29(%rbp), %eax
cmpl $0x20, %eax
jne 0x5fe58
jmp 0x5fe18
leaq 0xdfcb(%rip), %rdi      # 0x6ddea
xorl %eax, %eax
movl %eax, %esi
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5fe56
jmp 0x5fe58
movzbl -0x29(%rbp), %eax
cmpl $0x19, %eax
je 0x5fe6a
movzbl -0x29(%rbp), %eax
cmpl $0x1a, %eax
jne 0x5fead
jmp 0x5fe6c
leaq 0xec57(%rip), %rdi      # 0x6eaca
movl $0x1, %esi
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5feab
jmp 0x5fead
movzbl -0x29(%rbp), %eax
cmpl $0x1b, %eax
je 0x5febf
movzbl -0x29(%rbp), %eax
cmpl $0x1c, %eax
jne 0x5ff02
jmp 0x5fec1
leaq 0x73ac(%rip), %rdi      # 0x67274
movl $0x1, %esi
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5ff00
jmp 0x5ff02
movzbl -0x29(%rbp), %eax
cmpl $0x1d, %eax
je 0x5ff14
movzbl -0x29(%rbp), %eax
cmpl $0x1e, %eax
jne 0x5ff57
jmp 0x5ff16
leaq 0x7357(%rip), %rdi      # 0x67274
movl $0x2, %esi
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5ff55
jmp 0x5ff57
movzbl -0x29(%rbp), %eax
cmpl $0x1f, %eax
je 0x5ff69
movzbl -0x29(%rbp), %eax
cmpl $0x20, %eax
jne 0x5ffac
jmp 0x5ff6b
leaq 0x7302(%rip), %rdi      # 0x67274
movl $0x3, %esi
callq 0xc1b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x18(%rbp)
jmp 0x5ffaa
jmp 0x5ffac
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xef77(%rip), %rsi      # 0x6ef31
leaq -0x20(%rbp), %rdx
callq 0xcca0
jmp 0x5ffc5
cmpq $0x0, -0x20(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5ffd5
jmp 0x60007
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x1040(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5fffa
leaq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x5fffc
movq -0x28(%rbp), %rdi
callq 0xc0d0
jmp 0x5ffc5
jmp 0x60009
addq $0x30, %rsp
popq %rbp
retq
nop