// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
callq 0x80d4
testb %al, %al
je 0x1bdc4
movq %rbx, %rdi
callq 0x6ad8
movq %rax, %r14
cmpb $0x8, %bpl
ja 0x1be08
movzbl %bpl, %eax
leaq 0x239e7(%rip), %rcx     # 0x3f790
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x25d1f
jmp 0x1be0b
leaq 0x23369(%rip), %rdi     # 0x3f134
movq %rbx, %rsi
callq 0x829e
jmp 0x1bdd3
movq %r15, 0x50(%r14)
jmp 0x1be08
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x1be00
movq %rbx, %rdi
movl $0x3, %esi
jmp 0x1be00
movq %r15, 0x68(%r14)
movb $0x3, %r12b
jmp 0x1be0b
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0x25d1f
xorl %r12d, %r12d
addb $-0x4, %bpl
cmpb $0x4, %bpl
ja 0x1be4e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1c5a9
testq %rax, %rax
je 0x1be4e
movq %rax, %r15
movzbl %r12b, %r12d
movq 0x50(%r14,%r12,8), %rdx
movq %r15, %rdi
movl %r12d, %esi
callq 0x1353c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c5a9
movq %rax, %r15
testq %rax, %rax
jne 0x1be2b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x58(%r14)
movb $0x1, %r12b
jmp 0x1be0b
movq %r15, 0x60(%r14)
movb $0x2, %r12b
jmp 0x1be0b
movq %r15, 0x70(%r14)
movb $0x4, %r12b
jmp 0x1be0b