// File: /workspace/github_c_makefile_star2_O3/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 0x80e4
testb %al, %al
je 0x1c5e7
movq %rbx, %rdi
callq 0x6af7
cmpb $0x8, %bpl
ja 0x1c664
movq %rax, %r14
movzbl %bpl, %esi
leaq 0x2330d(%rip), %rax     # 0x3f8d8
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 0x2640b
leaq 0x22bf6(%rip), %rdi     # 0x3f1e4
movq %rbx, %rsi
callq 0x8294
jmp 0x1c5f6
movb $0x3, %bpl
movl $0x68, %eax
jmp 0x1c627
movb $0x1, %bpl
movl $0x58, %eax
jmp 0x1c627
movb $0x2, %bpl
movl $0x60, %eax
jmp 0x1c627
movb $0x4, %bpl
movl $0x70, %eax
jmp 0x1c627
movl $0x50, %eax
xorl %ebp, %ebp
movq %r15, (%r14,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1cdad
testq %rax, %rax
je 0x1c664
movq %rax, %r15
movzbl %bpl, %r12d
movq 0x50(%r14,%r12,8), %rdx
movq %r15, %rdi
movl %r12d, %esi
callq 0x13534
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1cdad
movq %rax, %r15
testq %rax, %rax
jne 0x1c641
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq