// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_win.c
// Function: lv_win_set_style
void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, const lv_style_t * style)
{
    LV_ASSERT_OBJ(win, LV_OBJX_NAME);

    lv_win_ext_t * ext = lv_obj_get_ext_attr(win);

    switch(type) {
        case LV_WIN_STYLE_BG:
            lv_obj_set_style(win, style);
            lv_win_realign(win);
            break;
        case LV_WIN_STYLE_CONTENT: lv_page_set_style(ext->page, LV_PAGE_STYLE_SCRL, style); break;
        case LV_WIN_STYLE_SB: lv_page_set_style(ext->page, LV_PAGE_STYLE_SB, style); break;
        case LV_WIN_STYLE_HEADER:
            lv_obj_set_style(ext->header, style);
            lv_win_realign(win);
            break;
        case LV_WIN_STYLE_BTN_REL: ext->style_btn_rel = style; break;
        case LV_WIN_STYLE_BTN_PR: ext->style_btn_pr = style; break;
    }

    /*Refresh the existing buttons*/
    if(type == LV_WIN_STYLE_BTN_REL || type == LV_WIN_STYLE_BTN_PR) {
        lv_obj_t * btn;
        btn = lv_obj_get_child_back(ext->header, NULL);
        btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/
        while(btn != NULL) {
            if(type == LV_WIN_STYLE_BTN_REL)
                lv_btn_set_style(btn, LV_BTN_STYLE_REL, style);
            else
                lv_btn_set_style(btn, LV_BTN_STYLE_PR, style);
            btn = lv_obj_get_child_back(ext->header, btn);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x40885
movq -0x8(%rbp), %rsi
leaq 0x2787e(%rip), %rdi     # 0x680fc
callq 0xd410
jmp 0x40883
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x20(%rbp)
movzbl -0x9(%rbp), %eax
movq %rax, -0x30(%rbp)
subq $0x5, %rax
ja 0x40934
movq -0x30(%rbp), %rax
leaq 0x27eb1(%rip), %rcx     # 0x68760
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9150
movq -0x8(%rbp), %rdi
callq 0x409d0
jmp 0x40934
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0x3dff0
jmp 0x40934
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl $0x2, %esi
callq 0x3dff0
jmp 0x40934
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x9150
movq -0x8(%rbp), %rdi
callq 0x409d0
jmp 0x40934
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x40934
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movzbl -0x9(%rbp), %eax
cmpl $0x4, %eax
je 0x40946
movzbl -0x9(%rbp), %eax
cmpl $0x5, %eax
jne 0x409bc
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9e20
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x9e20
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x409ba
movzbl -0x9(%rbp), %eax
cmpl $0x4, %eax
jne 0x40991
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x205e0
jmp 0x409a3
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0x205e0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x9e20
movq %rax, -0x28(%rbp)
jmp 0x40970
jmp 0x409bc
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)