// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_cf_rule_color_scale
STATIC void
_worksheet_write_cf_rule_color_scale(lxw_worksheet *self,
                                     lxw_cond_format_obj *cond_format)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    LXW_PUSH_ATTRIBUTES_STR("type", cond_format->type_string);
    LXW_PUSH_ATTRIBUTES_INT("priority", cond_format->dxf_priority);
    lxw_xml_start_tag(self->file, "cfRule", &attributes);

    lxw_xml_start_tag(self->file, "colorScale", NULL);

    if (cond_format->min_value_string) {
        _worksheet_write_cfvo_str(self, cond_format->min_rule_type,
                                  cond_format->min_value_string, LXW_FALSE);
    }
    else {
        _worksheet_write_cfvo_num(self, cond_format->min_rule_type,
                                  cond_format->min_value, LXW_FALSE);
    }

    if (cond_format->type == LXW_CONDITIONAL_3_COLOR_SCALE) {
        if (cond_format->mid_value_string) {
            _worksheet_write_cfvo_str(self, cond_format->mid_rule_type,
                                      cond_format->mid_value_string,
                                      LXW_FALSE);
        }
        else {
            _worksheet_write_cfvo_num(self, cond_format->mid_rule_type,
                                      cond_format->mid_value, LXW_FALSE);
        }
    }

    if (cond_format->max_value_string) {
        _worksheet_write_cfvo_str(self, cond_format->max_rule_type,
                                  cond_format->max_value_string, LXW_FALSE);
    }
    else {
        _worksheet_write_cfvo_num(self, cond_format->max_rule_type,
                                  cond_format->max_value, LXW_FALSE);
    }

    _worksheet_write_color(self, cond_format->min_color);

    if (cond_format->type == LXW_CONDITIONAL_3_COLOR_SCALE)
        _worksheet_write_color(self, cond_format->mid_color);

    _worksheet_write_color(self, cond_format->max_color);

    lxw_xml_end_tag(self->file, "colorScale");
    lxw_xml_end_tag(self->file, "cfRule");

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x607e2
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
leaq 0x7bbf(%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 0x60824
jmp 0x60826
movq -0x10(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, %esi
leaq 0xdf03(%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 0x6086c
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xe6b7(%rip), %rsi      # 0x6ef31
leaq -0x20(%rbp), %rdx
callq 0xc390
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xd5d6(%rip), %rsi      # 0x6de67
xorl %eax, %eax
movl %eax, %edx
callq 0xc390
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x608c4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x18(%rax), %al
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
xorl %ecx, %ecx
movzbl %al, %esi
callq 0x60e30
jmp 0x608e2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x18(%rax), %al
movq -0x10(%rbp), %rcx
movsd 0x8(%rcx), %xmm0
xorl %edx, %edx
movzbl %al, %esi
callq 0x61110
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf, %eax
jne 0x60938
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x60918
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x31(%rax), %al
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdx
xorl %ecx, %ecx
movzbl %al, %esi
callq 0x60e30
jmp 0x60936
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x31(%rax), %al
movq -0x10(%rbp), %rcx
movsd 0x20(%rcx), %xmm0
xorl %edx, %edx
movzbl %al, %esi
callq 0x61110
jmp 0x60938
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x60962
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x49(%rax), %al
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdx
xorl %ecx, %ecx
movzbl %al, %esi
callq 0x60e30
jmp 0x60980
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movb 0x49(%rax), %al
movq -0x10(%rbp), %rcx
movsd 0x38(%rcx), %xmm0
xorl %edx, %edx
movzbl %al, %esi
callq 0x61110
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0x613f0
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf, %eax
jne 0x609ac
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x613f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %esi
callq 0x613f0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xd49d(%rip), %rsi      # 0x6de67
callq 0xc060
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xe554(%rip), %rsi      # 0x6ef31
callq 0xc060
jmp 0x609e4
cmpq $0x0, -0x20(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x609f4
jmp 0x60a26
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x1040(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x60a19
leaq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x60a1b
movq -0x28(%rbp), %rdi
callq 0xc0d0
jmp 0x609e4
jmp 0x60a28
addq $0x30, %rsp
popq %rbp
retq
nop