// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_list.c
// Function: lv_list_btn_signal
static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
{
    lv_res_t res;

    /* Include the ancient signal function */
    res = ancestor_btn_signal(btn, sign, param);
    if(res != LV_RES_OK) return res;
    if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");

    if(sign == LV_SIGNAL_RELEASED) {
        lv_obj_t * list          = lv_obj_get_parent(lv_obj_get_parent(btn));
        lv_list_ext_t * ext      = lv_obj_get_ext_attr(list);
        ext->page.scroll_prop_ip = 0;

#if LV_USE_GROUP
        lv_group_t * g = lv_obj_get_group(list);
        if(lv_group_get_focused(g) == list && lv_indev_is_dragging(lv_indev_get_act()) == false) {
            /* Is the list is focused then be sure only the button being released
             * has a pressed state to indicate the selected state on the list*/
            lv_obj_t * btn_i = lv_list_get_prev_btn(list, NULL);
            while(btn_i) {
                lv_btn_state_t s = lv_btn_get_state(btn_i);
                if(s == LV_BTN_STATE_PR)
                    lv_btn_set_state(btn_i, LV_BTN_STATE_REL);
                else if(s == LV_BTN_STATE_TGL_PR)
                    lv_btn_set_state(btn_i, LV_BTN_STATE_TGL_REL);
                btn_i = lv_list_get_prev_btn(list, btn_i);
            }

            /*Make the released button "selected"*/
            lv_list_set_btn_selected(list, btn);
        }

        /* If `click_focus == 1` then LV_SIGNAL_FOCUS need to know which button triggered the focus
         * to mark it as selected (pressed state)*/
        ext->last_clicked_btn = btn;
#endif
        if(lv_indev_is_dragging(lv_indev_get_act()) == false && ext->single_mode) {
            lv_list_btn_single_select(btn);
        }
    } else if(sign == LV_SIGNAL_PRESS_LOST) {
        lv_obj_t * list          = lv_obj_get_parent(lv_obj_get_parent(btn));
        lv_list_ext_t * ext      = lv_obj_get_ext_attr(list);
        ext->page.scroll_prop_ip = 0;
    } else if(sign == LV_SIGNAL_CLEANUP) {

#if LV_USE_GROUP
        lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
        lv_obj_t * sel  = lv_list_get_btn_selected(list);
        if(sel == btn) lv_list_set_btn_selected(list, lv_list_get_next_btn(list, btn));
#endif
    }

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq 0x5b7d0(%rip), %rax     # 0x89490
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rdx
movzbl %cl, %esi
callq *%rax
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x1, %eax
je 0x2dce7
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x2ded8
movzbl -0x11(%rbp), %eax
cmpl $0x7, %eax
jne 0x2dd08
movq -0x20(%rbp), %rdi
leaq 0x3e41a(%rip), %rsi     # 0x6c115
callq 0xaa80
movb %al, -0x1(%rbp)
jmp 0x2ded8
movzbl -0x11(%rbp), %eax
cmpl $0xb, %eax
jne 0x2de39
movq -0x10(%rbp), %rdi
callq 0x71b0
movq %rax, %rdi
callq 0x71b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb 0x4a(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x4a(%rax)
movq -0x30(%rbp), %rdi
callq 0x77c0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3010
cmpq -0x30(%rbp), %rax
jne 0x2ddf1
callq 0x4b70
movq %rax, %rdi
callq 0x4dc0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2ddf1
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e1b0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x2dde4
movq -0x48(%rbp), %rdi
callq 0x20930
movb %al, -0x49(%rbp)
movzbl -0x49(%rbp), %eax
cmpl $0x1, %eax
jne 0x2ddb8
movq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x20730
jmp 0x2ddd1
movzbl -0x49(%rbp), %eax
cmpl $0x3, %eax
jne 0x2ddcf
movq -0x48(%rbp), %rdi
movl $0x2, %esi
callq 0x20730
jmp 0x2ddd1
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x2e1b0
movq %rax, -0x48(%rbp)
jmp 0x2dd8f
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2def0
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x98(%rax)
callq 0x4b70
movq %rax, %rdi
callq 0x4dc0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2de34
movq -0x38(%rbp), %rax
movb 0x82(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2de34
movq -0x10(%rbp), %rdi
callq 0x2ec90
jmp 0x2ded2
movzbl -0x11(%rbp), %eax
cmpl $0xa, %eax
jne 0x2de76
movq -0x10(%rbp), %rdi
callq 0x71b0
movq %rax, %rdi
callq 0x71b0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movb 0x4a(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x4a(%rax)
jmp 0x2ded0
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x2dece
movq -0x10(%rbp), %rdi
callq 0x71b0
movq %rax, %rdi
callq 0x71b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x2e720
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x2decc
movq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2d760
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x2def0
jmp 0x2dece
jmp 0x2ded0
jmp 0x2ded2
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)