// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_style.c
// Function: lv_style_mix
void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio)
{
    STYLE_ATTR_MIX(body.opa, ratio);
    STYLE_ATTR_MIX(body.radius, ratio);
    STYLE_ATTR_MIX(body.border.width, ratio);
    STYLE_ATTR_MIX(body.border.opa, ratio);
    STYLE_ATTR_MIX(body.shadow.width, ratio);
    STYLE_ATTR_MIX(body.padding.left, ratio);
    STYLE_ATTR_MIX(body.padding.right, ratio);
    STYLE_ATTR_MIX(body.padding.top, ratio);
    STYLE_ATTR_MIX(body.padding.bottom, ratio);
    STYLE_ATTR_MIX(body.padding.inner, ratio);
    STYLE_ATTR_MIX(text.line_space, ratio);
    STYLE_ATTR_MIX(text.letter_space, ratio);
    STYLE_ATTR_MIX(text.opa, ratio);
    STYLE_ATTR_MIX(line.width, ratio);
    STYLE_ATTR_MIX(line.opa, ratio);
    STYLE_ATTR_MIX(image.intense, ratio);
    STYLE_ATTR_MIX(image.opa, ratio);

    lv_opa_t opa = ratio == STYLE_MIX_MAX ? LV_OPA_COVER : ratio;

    res->body.main_color   = lv_color_mix(end->body.main_color, start->body.main_color, opa);
    res->body.grad_color   = lv_color_mix(end->body.grad_color, start->body.grad_color, opa);
    res->body.border.color = lv_color_mix(end->body.border.color, start->body.border.color, opa);
    res->body.shadow.color = lv_color_mix(end->body.shadow.color, start->body.shadow.color, opa);
    res->text.color        = lv_color_mix(end->text.color, start->text.color, opa);
    res->image.color       = lv_color_mix(end->image.color, start->image.color, opa);
    res->line.color        = lv_color_mix(end->line.color, start->line.color, opa);

    if(ratio < (STYLE_MIX_MAX >> 1)) {
        res->body.border.part = start->body.border.part;
        res->glass            = start->glass;
        res->text.font        = start->text.font;
        res->body.shadow.type = start->body.shadow.type;
        res->line.rounded     = start->line.rounded;
    } else {
        res->body.border.part = end->body.border.part;
        res->glass            = end->glass;
        res->text.font        = end->text.font;
        res->body.shadow.type = end->body.shadow.type;
        res->line.rounded     = end->line.rounded;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb 0x8(%rdi), %al
movzbl 0x8(%rsi), %ecx
cmpb %cl, %al
je 0x750a
movzbl %al, %edx
subl %edx, %ecx
movl %ebp, %edx
imull %ecx, %edx
shrl $0x8, %edx
addb %al, %dl
movl %edx, %eax
movb %al, 0x8(%rbx)
movzwl 0x6(%r15), %ecx
movswl 0x6(%r14), %edx
movzwl %bp, %eax
cmpw %dx, %cx
je 0x752c
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x6(%rbx)
movzwl 0xc(%r15), %ecx
movswl 0xc(%r14), %edx
cmpw %dx, %cx
je 0x754c
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0xc(%rbx)
movb 0xf(%r15), %cl
movzbl 0xf(%r14), %edx
cmpb %dl, %cl
je 0x756f
movzbl %cl, %esi
subl %esi, %edx
movl %ebp, %esi
imull %edx, %esi
shrl $0x8, %esi
addb %cl, %sil
movl %esi, %ecx
movb %cl, 0xf(%rbx)
movzwl 0x12(%r15), %ecx
movswl 0x12(%r14), %edx
cmpw %dx, %cx
je 0x758e
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x12(%rbx)
movzwl 0x1a(%r15), %ecx
movswl 0x1a(%r14), %edx
cmpw %dx, %cx
je 0x75ae
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x1a(%rbx)
movzwl 0x1c(%r15), %ecx
movswl 0x1c(%r14), %edx
cmpw %dx, %cx
je 0x75ce
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x1c(%rbx)
movzwl 0x16(%r15), %ecx
movswl 0x16(%r14), %edx
cmpw %dx, %cx
je 0x75ee
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x16(%rbx)
movzwl 0x18(%r15), %ecx
movswl 0x18(%r14), %edx
cmpw %dx, %cx
je 0x760e
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x18(%rbx)
movzwl 0x1e(%r15), %ecx
movswl 0x1e(%r14), %edx
cmpw %dx, %cx
je 0x762e
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x1e(%rbx)
movzwl 0x32(%r15), %ecx
movswl 0x32(%r14), %edx
cmpw %dx, %cx
je 0x764e
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x32(%rbx)
movzwl 0x30(%r15), %ecx
movswl 0x30(%r14), %edx
cmpw %dx, %cx
je 0x766e
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x30(%rbx)
movb 0x34(%r15), %cl
movzbl 0x34(%r14), %edx
cmpb %dl, %cl
je 0x7691
movzbl %cl, %esi
subl %esi, %edx
movl %ebp, %esi
imull %edx, %esi
shrl $0x8, %esi
addb %cl, %sil
movl %esi, %ecx
movb %cl, 0x34(%rbx)
movzwl 0x3e(%r15), %ecx
movswl 0x3e(%r14), %edx
cmpw %dx, %cx
je 0x76b0
movswl %cx, %esi
subl %esi, %edx
imull %eax, %edx
shrl $0x8, %edx
addl %edx, %ecx
movw %cx, 0x3e(%rbx)
movb 0x40(%r15), %al
movzbl 0x40(%r14), %ecx
cmpb %cl, %al
je 0x76d2
movzbl %al, %edx
subl %edx, %ecx
movl %ebp, %edx
imull %ecx, %edx
shrl $0x8, %edx
addb %al, %dl
movl %edx, %eax
movb %al, 0x40(%rbx)
movb 0x3a(%r15), %al
movzbl 0x3a(%r14), %ecx
cmpb %cl, %al
je 0x76f3
movzbl %al, %edx
subl %edx, %ecx
movl %ebp, %edx
imull %ecx, %edx
shrl $0x8, %edx
addb %al, %dl
movl %edx, %eax
movb %al, 0x3a(%rbx)
movb 0x3b(%r15), %al
movzbl 0x3b(%r14), %ecx
cmpb %cl, %al
je 0x7714
movzbl %al, %edx
subl %edx, %ecx
movl %ebp, %edx
imull %ecx, %edx
shrl $0x8, %edx
addb %al, %dl
movl %edx, %eax
cmpw $0x100, %bp             # imm = 0x100
movl $0xff, %ecx
cmovnel %ebp, %ecx
movb %al, 0x3b(%rbx)
movzbl %cl, %r12d
movzwl 0x2(%r15), %esi
movzwl 0x2(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0x2(%rbx)
movzwl 0x4(%r15), %esi
movzwl 0x4(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0x4(%rbx)
movzwl 0xa(%r15), %esi
movzwl 0xa(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0xa(%rbx)
movzwl 0x10(%r15), %esi
movzwl 0x10(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0x10(%rbx)
movl 0x20(%r15), %esi
movl 0x20(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0x20(%rbx)
movl 0x38(%r15), %esi
movl 0x38(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0x38(%rbx)
movl 0x3c(%r15), %esi
movl 0x3c(%r14), %edi
movl %r12d, %edx
callq 0x7803
movw %ax, 0x3c(%rbx)
cmpw $0x80, %bp
cmovbq %r15, %r14
movb 0xe(%r14), %al
movb %al, 0xe(%rbx)
movb (%r14), %al
andb $0x1, %al
movb (%rbx), %cl
movb 0x41(%rbx), %dl
andb $-0x2, %cl
orb %al, %cl
movb %cl, (%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movb 0x14(%r14), %al
movb %al, 0x14(%rbx)
movb 0x41(%r14), %al
andb $0x1, %al
andb $-0x2, %dl
orb %al, %dl
movb %dl, 0x41(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq