// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_list.c
// Function: lv_list_set_style
void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style)
{
    LV_ASSERT_OBJ(list, LV_OBJX_NAME);

    lv_list_ext_t * ext           = lv_obj_get_ext_attr(list);
    lv_btn_style_t btn_style_refr = LV_BTN_STYLE_REL;
    lv_obj_t * btn;

    switch(type) {
        case LV_LIST_STYLE_BG:
            lv_page_set_style(list, LV_PAGE_STYLE_BG, style);
            /*style change signal will call 'refr_btn_width' */
            break;
        case LV_LIST_STYLE_SCRL: lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); break;
        case LV_LIST_STYLE_SB: lv_page_set_style(list, LV_PAGE_STYLE_SB, style); break;
        case LV_LIST_STYLE_EDGE_FLASH: lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); break;
        case LV_LIST_STYLE_BTN_REL:
            ext->styles_btn[LV_BTN_STATE_REL] = style;
            btn_style_refr                    = LV_BTN_STYLE_REL;
            break;
        case LV_LIST_STYLE_BTN_PR:
            ext->styles_btn[LV_BTN_STATE_PR] = style;
            btn_style_refr                   = LV_BTN_STYLE_PR;
            break;
        case LV_LIST_STYLE_BTN_TGL_REL:
            ext->styles_btn[LV_BTN_STATE_TGL_REL] = style;
            btn_style_refr                        = LV_BTN_STYLE_TGL_REL;
            break;
        case LV_LIST_STYLE_BTN_TGL_PR:
            ext->styles_btn[LV_BTN_STATE_TGL_PR] = style;
            btn_style_refr                       = LV_BTN_STYLE_TGL_PR;
            break;
        case LV_LIST_STYLE_BTN_INA:
            ext->styles_btn[LV_BTN_STATE_INA] = style;
            btn_style_refr                    = LV_BTN_STYLE_INA;
            break;
    }

    /*Refresh existing buttons' style*/
    if(type == LV_LIST_STYLE_BTN_PR || type == LV_LIST_STYLE_BTN_REL || type == LV_LIST_STYLE_BTN_TGL_REL ||
       type == LV_LIST_STYLE_BTN_TGL_PR || type == LV_LIST_STYLE_BTN_INA) {
        btn = lv_list_get_prev_btn(list, NULL);
        while(btn != NULL) {
            lv_btn_set_style(btn, btn_style_refr, ext->styles_btn[btn_style_refr]);
            btn = lv_list_get_prev_btn(list, btn);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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 0x2d5f5
movq -0x8(%rbp), %rsi
leaq 0x3ab0e(%rip), %rdi     # 0x680fc
callq 0xd410
jmp 0x2d5f3
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movzbl -0x9(%rbp), %eax
movq %rax, -0x38(%rbp)
subq $0x8, %rax
ja 0x2d6d7
movq -0x38(%rbp), %rax
leaq 0x3afcd(%rip), %rcx     # 0x685f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x3dff0
jmp 0x2d6d7
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0x3dff0
jmp 0x2d6d7
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x2, %esi
callq 0x3dff0
jmp 0x2d6d7
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x3, %esi
callq 0x3dff0
jmp 0x2d6d7
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
movb $0x0, -0x21(%rbp)
jmp 0x2d6d7
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x58(%rax)
movb $0x1, -0x21(%rbp)
jmp 0x2d6d7
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x60(%rax)
movb $0x2, -0x21(%rbp)
jmp 0x2d6d7
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x68(%rax)
movb $0x3, -0x21(%rbp)
jmp 0x2d6d7
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x70(%rax)
movb $0x4, -0x21(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x5, %eax
je 0x2d704
movzbl -0x9(%rbp), %eax
cmpl $0x4, %eax
je 0x2d704
movzbl -0x9(%rbp), %eax
cmpl $0x6, %eax
je 0x2d704
movzbl -0x9(%rbp), %eax
cmpl $0x7, %eax
je 0x2d704
movzbl -0x9(%rbp), %eax
cmpl $0x8, %eax
jne 0x2d74d
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e1b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2d74b
movq -0x30(%rbp), %rdi
movb -0x21(%rbp), %al
movq -0x20(%rbp), %rcx
movzbl -0x21(%rbp), %edx
movq 0x50(%rcx,%rdx,8), %rdx
movzbl %al, %esi
callq 0x205e0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2e1b0
movq %rax, -0x30(%rbp)
jmp 0x2d715
jmp 0x2d74d
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)