// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_indev.c
// Function: lv_indev_read_task
void lv_indev_read_task(lv_task_t * task)
{
    LV_LOG_TRACE("indev read task started");

    lv_indev_data_t data;

    indev_act = task->user_data;

    /*Read and process all indevs*/
    if(indev_act->driver.disp == NULL) return; /*Not assigned to any displays*/

    /*Handle reset query before processing the point*/
    indev_proc_reset_query_handler(indev_act);

    if(indev_act->proc.disabled) return;
    bool more_to_read;
    do {
        /*Read the data*/
        more_to_read = lv_indev_read(indev_act, &data);

        /*The active object might deleted even in the read function*/
        indev_proc_reset_query_handler(indev_act);
        indev_obj_act = NULL;

        indev_act->proc.state = data.state;

        /*Save the last activity time*/
        if(indev_act->proc.state == LV_INDEV_STATE_PR) {
            indev_act->driver.disp->last_activity_time = lv_tick_get();
        } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER && data.enc_diff) {
            indev_act->driver.disp->last_activity_time = lv_tick_get();
        }

        if(indev_act->driver.type == LV_INDEV_TYPE_POINTER) {
            indev_pointer_proc(indev_act, &data);
        } else if(indev_act->driver.type == LV_INDEV_TYPE_KEYPAD) {
            indev_keypad_proc(indev_act, &data);
        } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER) {
            indev_encoder_proc(indev_act, &data);
        } else if(indev_act->driver.type == LV_INDEV_TYPE_BUTTON) {
            indev_button_proc(indev_act, &data);
        }
        /*Handle reset query if it happened in during processing*/
        indev_proc_reset_query_handler(indev_act);
    } while(more_to_read);

    /*End of indev processing, so no act indev*/
    indev_act     = NULL;
    indev_obj_act = NULL;

    LV_LOG_TRACE("indev read task finished");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8547d(%rip)     # 0x88f68
movq 0x85476(%rip), %rax     # 0x88f68
cmpq $0x0, 0x18(%rax)
jne 0x3afe
jmp 0x3c6d
movq 0x85463(%rip), %rdi     # 0x88f68
callq 0x3c80
movq 0x85457(%rip), %rax     # 0x88f68
movb 0x78(%rax), %al
shrb $0x2, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x3b22
jmp 0x3c6d
jmp 0x3b24
movq 0x8543d(%rip), %rdi     # 0x88f68
leaq -0x18(%rbp), %rsi
callq 0xdf20
andb $0x1, %al
movb %al, -0x19(%rbp)
movq 0x85428(%rip), %rdi     # 0x88f68
callq 0x3c80
movq $0x0, 0x85420(%rip) # 0x88f70
movb -0xa(%rbp), %cl
movq 0x8540e(%rip), %rax     # 0x88f68
movb %cl, 0x30(%rax)
movq 0x85404(%rip), %rax     # 0x88f68
movzbl 0x30(%rax), %eax
cmpl $0x1, %eax
jne 0x3b87
callq 0xdfe0
movl %eax, %ecx
movq 0x853ed(%rip), %rax     # 0x88f68
movq 0x18(%rax), %rax
movl %ecx, 0x19c(%rax)
jmp 0x3bb9
movq 0x853da(%rip), %rax     # 0x88f68
movzbl (%rax), %eax
cmpl $0x4, %eax
jne 0x3bb7
movswl -0xc(%rbp), %eax
cmpl $0x0, %eax
je 0x3bb7
callq 0xdfe0
movl %eax, %ecx
movq 0x853bb(%rip), %rax     # 0x88f68
movq 0x18(%rax), %rax
movl %ecx, 0x19c(%rax)
jmp 0x3bb9
movq 0x853a8(%rip), %rax     # 0x88f68
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x3bda
movq 0x85399(%rip), %rdi     # 0x88f68
leaq -0x18(%rbp), %rsi
callq 0x3d50
jmp 0x3c41
movq 0x85387(%rip), %rax     # 0x88f68
movzbl (%rax), %eax
cmpl $0x2, %eax
jne 0x3bfb
movq 0x85378(%rip), %rdi     # 0x88f68
leaq -0x18(%rbp), %rsi
callq 0x3e30
jmp 0x3c3f
movq 0x85366(%rip), %rax     # 0x88f68
movzbl (%rax), %eax
cmpl $0x4, %eax
jne 0x3c1c
movq 0x85357(%rip), %rdi     # 0x88f68
leaq -0x18(%rbp), %rsi
callq 0x43f0
jmp 0x3c3d
movq 0x85345(%rip), %rax     # 0x88f68
movzbl (%rax), %eax
cmpl $0x3, %eax
jne 0x3c3b
movq 0x85336(%rip), %rdi     # 0x88f68
leaq -0x18(%rbp), %rsi
callq 0x4aa0
jmp 0x3c3d
jmp 0x3c3f
jmp 0x3c41
movq 0x85320(%rip), %rdi     # 0x88f68
callq 0x3c80
testb $0x1, -0x19(%rbp)
jne 0x3b24
movq $0x0, 0x85306(%rip) # 0x88f68
movq $0x0, 0x85303(%rip) # 0x88f70
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)