// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_core/lv_group.c
// Function: lv_group_focus_obj
void lv_group_focus_obj(lv_obj_t * obj)
{
    if(obj == NULL) return;
    lv_group_t * g = obj->group_p;
    if(g == NULL) return;

    if(g->frozen != 0) return;

    /*On defocus edit mode must be leaved*/
    lv_group_set_editing(g, false);

    lv_obj_t ** i;
    LV_LL_READ(g->obj_ll, i)
    {
        if(*i == obj) {
            if(g->obj_focus != NULL) {
                (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
                lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, NULL);
                if(res != LV_RES_OK) return;
                lv_obj_invalidate(*g->obj_focus);
            }

            g->obj_focus = i;

            if(g->obj_focus != NULL) {
                (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL);
                if(g->focus_cb) g->focus_cb(g);
                lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_FOCUSED, NULL);
                if(res != LV_RES_OK) return;
                lv_obj_invalidate(*g->obj_focus);

                /*If the object or its parent has `top == true` bring it to the foregorund*/
                obj_to_foreground(*g->obj_focus);
            }
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x29d8
jmp 0x2b61
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x29f0
jmp 0x2b61
movq -0x10(%rbp), %rax
movb 0x80(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2a09
jmp 0x2b61
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x2b70
movq -0x10(%rbp), %rdi
callq 0x45660
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2b61
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x2b49
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2aa7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx), %rdi
movl $0x11, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
movl $0xd, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x7990
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x1, %eax
je 0x2a97
jmp 0x2b61
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
callq 0x7430
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2b47
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx), %rdi
movl $0x10, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x2b00
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
movl $0xc, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x7990
movb %al, -0x1a(%rbp)
movzbl -0x1a(%rbp), %eax
cmpl $0x1, %eax
je 0x2b27
jmp 0x2b61
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
callq 0x7430
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
callq 0x2c40
jmp 0x2b61
jmp 0x2b4b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x458a0
movq %rax, -0x18(%rbp)
jmp 0x2a21
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)