// File: /workspace/github_c_makefile_star2_O2/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 0x7994
testb %al, %al
je 0x1a836
movq %rbx, %rdi
callq 0x6747
cmpb $0x8, %bpl
ja 0x1a89c
movq %rax, %r14
movzbl %bpl, %esi
leaq 0x20fb2(%rip), %rax     # 0x3b7cc
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r15, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24089
leaq 0x20907(%rip), %rdi     # 0x3b144
movq %rbx, %rsi
callq 0x7b01
jmp 0x1a845
movb $0x3, %bpl
pushq $0x68
jmp 0x1a861
movb $0x1, %bpl
pushq $0x58
jmp 0x1a861
movb $0x2, %bpl
pushq $0x60
jmp 0x1a861
movb $0x4, %bpl
pushq $0x70
popq %rax
movq %r15, (%r14,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1afa5
movq %rax, %r12
movzbl %bpl, %r15d
testq %r12, %r12
je 0x1a89c
movq 0x50(%r14,%r15,8), %rdx
movq %r12, %rdi
movl %r15d, %esi
callq 0x126f8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1afa5
movq %rax, %r12
jmp 0x1a877
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x50
popq %rax
xorl %ebp, %ebp
jmp 0x1a862