// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: validate_conditional_data_bar
lxw_error
_validate_conditional_data_bar(lxw_worksheet *self,
                               lxw_cond_format_obj *cond_format,
                               lxw_conditional_format *user_options)
{
    uint8_t min_rule_type = user_options->min_rule_type;
    uint8_t max_rule_type = user_options->max_rule_type;

    if (user_options->data_bar_2010
        || user_options->bar_solid
        || user_options->bar_no_border
        || user_options->bar_direction
        || user_options->bar_axis_position
        || user_options->bar_negative_color_same
        || user_options->bar_negative_border_color_same
        || user_options->bar_negative_color
        || user_options->bar_border_color
        || user_options->bar_negative_border_color
        || user_options->bar_axis_color) {

        cond_format->data_bar_2010 = LXW_TRUE;
        self->excel_version = 2010;
    }

    if (min_rule_type > LXW_CONDITIONAL_RULE_TYPE_MINIMUM
        && min_rule_type < LXW_CONDITIONAL_RULE_TYPE_MAXIMUM) {
        cond_format->min_rule_type = min_rule_type;
        cond_format->min_value = user_options->min_value;
        cond_format->min_value_string =
            lxw_strdup_formula(user_options->min_value_string);
    }
    else {
        cond_format->min_rule_type = LXW_CONDITIONAL_RULE_TYPE_MINIMUM;
        cond_format->min_value = 0;
    }

    if (max_rule_type > LXW_CONDITIONAL_RULE_TYPE_MINIMUM
        && max_rule_type < LXW_CONDITIONAL_RULE_TYPE_MAXIMUM) {
        cond_format->max_rule_type = max_rule_type;
        cond_format->max_value = user_options->max_value;
        cond_format->max_value_string =
            lxw_strdup_formula(user_options->max_value_string);
    }
    else {
        cond_format->max_rule_type = LXW_CONDITIONAL_RULE_TYPE_MAXIMUM;
        cond_format->max_value = 0;
    }

    if (cond_format->data_bar_2010) {
        if (min_rule_type == LXW_CONDITIONAL_RULE_TYPE_NONE)
            cond_format->auto_min = LXW_TRUE;
        if (max_rule_type == LXW_CONDITIONAL_RULE_TYPE_NONE)
            cond_format->auto_max = LXW_TRUE;
    }

    cond_format->bar_only = user_options->bar_only;
    cond_format->bar_solid = user_options->bar_solid;
    cond_format->bar_no_border = user_options->bar_no_border;
    cond_format->bar_direction = user_options->bar_direction;
    cond_format->bar_axis_position = user_options->bar_axis_position;
    cond_format->bar_negative_color_same =
        user_options->bar_negative_color_same;
    cond_format->bar_negative_border_color_same =
        user_options->bar_negative_border_color_same;

    if (user_options->bar_color != LXW_COLOR_UNSET)
        cond_format->bar_color = user_options->bar_color;
    else
        cond_format->bar_color = 0x638EC6;

    if (user_options->bar_negative_color != LXW_COLOR_UNSET)
        cond_format->bar_negative_color = user_options->bar_negative_color;
    else
        cond_format->bar_negative_color = 0xFF0000;

    if (user_options->bar_border_color != LXW_COLOR_UNSET)
        cond_format->bar_border_color = user_options->bar_border_color;
    else
        cond_format->bar_border_color = cond_format->bar_color;

    if (user_options->bar_negative_border_color != LXW_COLOR_UNSET)
        cond_format->bar_negative_border_color =
            user_options->bar_negative_border_color;
    else
        cond_format->bar_negative_border_color = 0xFF0000;

    if (user_options->bar_axis_color != LXW_COLOR_UNSET)
        cond_format->bar_axis_color = user_options->bar_axis_color;
    else
        cond_format->bar_axis_color = 0x000000;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb 0x30(%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb 0x60(%rax), %al
movb %al, -0x1a(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x6d(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
movzbl 0x6e(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
movzbl 0x7e(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
movzbl 0x7f(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
movzbl 0x80(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
movzbl 0x7c(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
movzbl 0x7d(%rax), %eax
cmpl $0x0, %eax
jne 0x4c891
movq -0x18(%rbp), %rax
cmpl $0x0, 0x70(%rax)
jne 0x4c891
movq -0x18(%rbp), %rax
cmpl $0x0, 0x74(%rax)
jne 0x4c891
movq -0x18(%rbp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x4c891
movq -0x18(%rbp), %rax
cmpl $0x0, 0x84(%rax)
je 0x4c8a6
movq -0x10(%rbp), %rax
movb $0x1, 0x50(%rax)
movq -0x8(%rbp), %rax
movw $0x7da, 0x340(%rax)     # imm = 0x7DA
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
jle 0x4c8ee
movzbl -0x19(%rbp), %eax
cmpl $0x6, %eax
jge 0x4c8ee
movb -0x19(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x18(%rax)
movq -0x18(%rbp), %rax
movsd 0x20(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xc0f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x4c902
movq -0x10(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movzbl -0x1a(%rbp), %eax
cmpl $0x1, %eax
jle 0x4c94a
movzbl -0x1a(%rbp), %eax
cmpl $0x6, %eax
jge 0x4c94a
movb -0x1a(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x49(%rax)
movq -0x18(%rbp), %rax
movsd 0x50(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x38(%rax)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xc0f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x4c95e
movq -0x10(%rbp), %rax
movb $0x6, 0x49(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x4c98c
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x4c979
movq -0x10(%rbp), %rax
movb $0x1, 0x51(%rax)
movzbl -0x1a(%rbp), %eax
cmpl $0x0, %eax
jne 0x4c98a
movq -0x10(%rbp), %rax
movb $0x1, 0x52(%rax)
jmp 0x4c98c
movq -0x18(%rbp), %rax
movb 0x6c(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x53(%rax)
movq -0x18(%rbp), %rax
movb 0x6e(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x54(%rax)
movq -0x18(%rbp), %rax
movb 0x7e(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x57(%rax)
movq -0x18(%rbp), %rax
movb 0x7f(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x58(%rax)
movq -0x18(%rbp), %rax
movb 0x80(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x59(%rax)
movq -0x18(%rbp), %rax
movb 0x7c(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x55(%rax)
movq -0x18(%rbp), %rax
movb 0x7d(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x56(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x4ca0b
movq -0x18(%rbp), %rax
movl 0x68(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5c(%rax)
jmp 0x4ca16
movq -0x10(%rbp), %rax
movl $0x638ec6, 0x5c(%rax)   # imm = 0x638EC6
movq -0x18(%rbp), %rax
cmpl $0x0, 0x70(%rax)
je 0x4ca30
movq -0x18(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
jmp 0x4ca3b
movq -0x10(%rbp), %rax
movl $0xff0000, 0x60(%rax)   # imm = 0xFF0000
movq -0x18(%rbp), %rax
cmpl $0x0, 0x74(%rax)
je 0x4ca55
movq -0x18(%rbp), %rax
movl 0x74(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
jmp 0x4ca63
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x78(%rax)
je 0x4ca7d
movq -0x18(%rbp), %rax
movl 0x78(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x68(%rax)
jmp 0x4ca88
movq -0x10(%rbp), %rax
movl $0xff0000, 0x68(%rax)   # imm = 0xFF0000
movq -0x18(%rbp), %rax
cmpl $0x0, 0x84(%rax)
je 0x4caa8
movq -0x18(%rbp), %rax
movl 0x84(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x6c(%rax)
jmp 0x4cab3
movq -0x10(%rbp), %rax
movl $0x0, 0x6c(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)