// File: /workspace/github_c_makefile_star2_O1/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:
movb 0x8(%rdi), %al
movzbl 0x8(%rsi), %r8d
cmpb %r8b, %al
je 0x79bb
movzbl %al, %r9d
subl %r9d, %r8d
movl %ecx, %r9d
imull %r8d, %r9d
shrl $0x8, %r9d
addb %al, %r9b
movl %r9d, %eax
movb %al, 0x8(%rdx)
movzwl 0x6(%rdi), %r8d
movswl 0x6(%rsi), %r9d
movzwl %cx, %eax
cmpw %r9w, %r8w
je 0x79e3
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x6(%rdx)
movzwl 0xc(%rdi), %r8d
movswl 0xc(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7a0a
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0xc(%rdx)
movb 0xf(%rdi), %r8b
movzbl 0xf(%rsi), %r9d
cmpb %r9b, %r8b
je 0x7a35
movzbl %r8b, %r10d
subl %r10d, %r9d
movl %ecx, %r10d
imull %r9d, %r10d
shrl $0x8, %r10d
addb %r8b, %r10b
movl %r10d, %r8d
movb %r8b, 0xf(%rdx)
movzwl 0x12(%rdi), %r8d
movswl 0x12(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7a5b
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x12(%rdx)
movzwl 0x1a(%rdi), %r8d
movswl 0x1a(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7a82
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x1a(%rdx)
movzwl 0x1c(%rdi), %r8d
movswl 0x1c(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7aa9
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x1c(%rdx)
movzwl 0x16(%rdi), %r8d
movswl 0x16(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7ad0
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x16(%rdx)
movzwl 0x18(%rdi), %r8d
movswl 0x18(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7af7
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x18(%rdx)
movzwl 0x1e(%rdi), %r8d
movswl 0x1e(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7b1e
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x1e(%rdx)
movzwl 0x32(%rdi), %r8d
movswl 0x32(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7b45
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x32(%rdx)
movzwl 0x30(%rdi), %r8d
movswl 0x30(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7b6c
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x30(%rdx)
movb 0x34(%rdi), %r8b
movzbl 0x34(%rsi), %r9d
cmpb %r9b, %r8b
je 0x7b97
movzbl %r8b, %r10d
subl %r10d, %r9d
movl %ecx, %r10d
imull %r9d, %r10d
shrl $0x8, %r10d
addb %r8b, %r10b
movl %r10d, %r8d
movb %r8b, 0x34(%rdx)
movzwl 0x3e(%rdi), %r8d
movswl 0x3e(%rsi), %r9d
cmpw %r9w, %r8w
je 0x7bbd
movswl %r8w, %r10d
subl %r10d, %r9d
imull %eax, %r9d
shrl $0x8, %r9d
addl %r9d, %r8d
movw %r8w, 0x3e(%rdx)
movb 0x40(%rdi), %r8b
movzbl 0x40(%rsi), %r9d
cmpb %r9b, %r8b
je 0x7be8
movzbl %r8b, %r10d
subl %r10d, %r9d
movl %ecx, %r10d
imull %r9d, %r10d
shrl $0x8, %r10d
addb %r8b, %r10b
movl %r10d, %r8d
movb %r8b, 0x40(%rdx)
movb 0x3a(%rdi), %r8b
movzbl 0x3a(%rsi), %r9d
cmpb %r9b, %r8b
je 0x7c12
movzbl %r8b, %r10d
subl %r10d, %r9d
movl %ecx, %r10d
imull %r9d, %r10d
shrl $0x8, %r10d
addb %r8b, %r10b
movl %r10d, %r8d
movb %r8b, 0x3a(%rdx)
movb 0x3b(%rdi), %r8b
movzbl 0x3b(%rsi), %r9d
cmpb %r9b, %r8b
je 0x7c3c
movzbl %r8b, %r10d
subl %r10d, %r9d
movl %ecx, %r10d
imull %r9d, %r10d
shrl $0x8, %r10d
addb %r8b, %r10b
movl %r10d, %r8d
pushq %rbp
pushq %r14
pushq %rbx
movb %r8b, 0x3b(%rdx)
movl $0xff, %r8d
andl %r8d, %ecx
movzwl 0x2(%rsi), %r11d
movl %r11d, %r9d
shrl $0xb, %r9d
cmpl $0x100, %eax            # imm = 0x100
movzwl 0x2(%rdi), %r10d
cmovel %r8d, %ecx
imull %ecx, %r9d
movl %r10d, %ebx
shrl $0xb, %ebx
xorl %ecx, %r8d
imull %r8d, %ebx
addl %r9d, %ebx
andl $0xffffff00, %ebx       # imm = 0xFFFFFF00
movl %r11d, %r9d
shrl $0x5, %r9d
andl $0x3f, %r9d
imull %ecx, %r9d
movl %r10d, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %r8d, %ebp
addl %r9d, %ebp
shrl $0x3, %ebp
movl $0x7e0, %r9d            # imm = 0x7E0
andl %r9d, %ebp
andl $0x1f, %r11d
imull %ecx, %r11d
andl $0x1f, %r10d
imull %r8d, %r10d
addl %r11d, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%rbx,8), %r10d
orl %ebp, %r10d
movw %r10w, 0x2(%rdx)
movzwl 0x4(%rsi), %ebx
movzwl 0x4(%rdi), %r10d
movl %ebx, %ebp
shrl $0xb, %ebp
imull %ecx, %ebp
movl %r10d, %r11d
shrl $0xb, %r11d
imull %r8d, %r11d
addl %ebp, %r11d
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %ecx, %ebp
movl %r10d, %r14d
shrl $0x5, %r14d
andl $0x3f, %r14d
imull %r8d, %r14d
addl %ebp, %r14d
shrl $0x3, %r14d
andl %r9d, %r14d
andl $0x1f, %ebx
imull %ecx, %ebx
andl $0x1f, %r10d
imull %r8d, %r10d
addl %ebx, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%r11,8), %r10d
orl %r14d, %r10d
movw %r10w, 0x4(%rdx)
movzwl 0xa(%rsi), %ebx
movzwl 0xa(%rdi), %r10d
movl %ebx, %ebp
shrl $0xb, %ebp
imull %ecx, %ebp
movl %r10d, %r11d
shrl $0xb, %r11d
imull %r8d, %r11d
addl %ebp, %r11d
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %ecx, %ebp
movl %r10d, %r14d
shrl $0x5, %r14d
andl $0x3f, %r14d
imull %r8d, %r14d
addl %ebp, %r14d
shrl $0x3, %r14d
andl %r9d, %r14d
andl $0x1f, %ebx
imull %ecx, %ebx
andl $0x1f, %r10d
imull %r8d, %r10d
addl %ebx, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%r11,8), %r10d
orl %r14d, %r10d
movw %r10w, 0xa(%rdx)
movzwl 0x10(%rsi), %ebx
movzwl 0x10(%rdi), %r10d
movl %ebx, %ebp
shrl $0xb, %ebp
imull %ecx, %ebp
movl %r10d, %r11d
shrl $0xb, %r11d
imull %r8d, %r11d
addl %ebp, %r11d
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %ecx, %ebp
movl %r10d, %r14d
shrl $0x5, %r14d
andl $0x3f, %r14d
imull %r8d, %r14d
addl %ebp, %r14d
shrl $0x3, %r14d
andl %r9d, %r14d
andl $0x1f, %ebx
imull %ecx, %ebx
andl $0x1f, %r10d
imull %r8d, %r10d
addl %ebx, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%r11,8), %r10d
orl %r14d, %r10d
movw %r10w, 0x10(%rdx)
movzwl 0x20(%rsi), %ebx
movzwl 0x20(%rdi), %r10d
movl %ebx, %ebp
shrl $0xb, %ebp
imull %ecx, %ebp
movl %r10d, %r11d
shrl $0xb, %r11d
imull %r8d, %r11d
addl %ebp, %r11d
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %ecx, %ebp
movl %r10d, %r14d
shrl $0x5, %r14d
andl $0x3f, %r14d
imull %r8d, %r14d
addl %ebp, %r14d
shrl $0x3, %r14d
andl %r9d, %r14d
andl $0x1f, %ebx
imull %ecx, %ebx
andl $0x1f, %r10d
imull %r8d, %r10d
addl %ebx, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%r11,8), %r10d
orl %r14d, %r10d
movw %r10w, 0x20(%rdx)
movzwl 0x38(%rsi), %ebx
movzwl 0x38(%rdi), %r10d
movl %ebx, %ebp
shrl $0xb, %ebp
imull %ecx, %ebp
movl %r10d, %r11d
shrl $0xb, %r11d
imull %r8d, %r11d
addl %ebp, %r11d
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %ecx, %ebp
movl %r10d, %r14d
shrl $0x5, %r14d
andl $0x3f, %r14d
imull %r8d, %r14d
addl %ebp, %r14d
shrl $0x3, %r14d
andl %r9d, %r14d
andl $0x1f, %ebx
imull %ecx, %ebx
andl $0x1f, %r10d
imull %r8d, %r10d
addl %ebx, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%r11,8), %r10d
orl %r14d, %r10d
movw %r10w, 0x38(%rdx)
movzwl 0x3c(%rsi), %ebx
movzwl 0x3c(%rdi), %r10d
movl %ebx, %ebp
shrl $0xb, %ebp
imull %ecx, %ebp
movl %r10d, %r11d
shrl $0xb, %r11d
imull %r8d, %r11d
addl %ebp, %r11d
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3f, %ebp
imull %ecx, %ebp
movl %r10d, %r14d
shrl $0x5, %r14d
andl $0x3f, %r14d
imull %r8d, %r14d
addl %ebp, %r14d
shrl $0x3, %r14d
andl %r9d, %r14d
andl $0x1f, %ebx
imull %ecx, %ebx
andl $0x1f, %r10d
imull %r8d, %r10d
addl %ebx, %r10d
shrl $0x8, %r10d
andl $0x1f, %r10d
leal (%r10,%r11,8), %ecx
orl %r14d, %ecx
movw %cx, 0x3c(%rdx)
cmpl $0x80, %eax
cmovbq %rdi, %rsi
movb 0xe(%rsi), %al
movb %al, 0xe(%rdx)
movb (%rsi), %al
andb $0x1, %al
movb (%rdx), %cl
andb $-0x2, %cl
orb %al, %cl
movb %cl, (%rdx)
movq 0x28(%rsi), %rax
movq %rax, 0x28(%rdx)
movb 0x14(%rsi), %al
movb %al, 0x14(%rdx)
movb 0x41(%rsi), %al
andb $0x1, %al
movb 0x41(%rdx), %cl
andb $-0x2, %cl
orb %al, %cl
movb %cl, 0x41(%rdx)
popq %rbx
popq %r14
popq %rbp
retq