// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_cont.c
// Function: lv_cont_layout_center
static void lv_cont_layout_center(lv_obj_t * cont)
{
    lv_obj_t * child;
    const lv_style_t * style = lv_obj_get_style(cont);
    uint32_t obj_num         = 0;
    lv_coord_t h_tot         = 0;

    LV_LL_READ(cont->child_ll, child)
    {
        if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;
        h_tot += lv_obj_get_height(child) + style->body.padding.inner;
        obj_num++;
    }

    if(obj_num == 0) return;

    h_tot -= style->body.padding.inner;

    /* Disable child change action because the children will be moved a lot
     * an unnecessary child change signals could be sent*/
    lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG);

    /* Align the children */
    lv_coord_t last_cord = -(h_tot / 2);
    LV_LL_READ_BACK(cont->child_ll, child)
    {
        if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;

        lv_obj_align(child, cont, LV_ALIGN_CENTER, 0, last_cord + lv_obj_get_height(child) / 2);
        last_cord += lv_obj_get_height(child) + style->body.padding.inner;
    }

    lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa080
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movw $0x0, -0x1e(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x45660
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x390db
movq -0x10(%rbp), %rdi
callq 0x7c90
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x39099
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0xa7d0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3909b
jmp 0x390c4
movq -0x10(%rbp), %rdi
callq 0x8350
movswl %ax, %ecx
movq -0x18(%rbp), %rax
movswl 0x1e(%rax), %eax
addl %eax, %ecx
movswl -0x1e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x1e(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x458a0
movq %rax, -0x10(%rbp)
jmp 0x39067
cmpl $0x0, -0x1c(%rbp)
jne 0x390e6
jmp 0x391f2
movq -0x18(%rbp), %rax
movswl 0x1e(%rax), %ecx
movswl -0x1e(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x1e(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x9a50
movswl -0x1e(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movw %ax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x458e0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x391e4
movq -0x10(%rbp), %rdi
callq 0x7c90
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x39163
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0xa7d0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x39165
jmp 0x391ca
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movswl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8350
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
cwtl
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
xorl %ecx, %ecx
movl %ecx, %edx
movswl %ax, %r8d
callq 0x8500
movq -0x10(%rbp), %rdi
callq 0x8350
movswl %ax, %ecx
movq -0x18(%rbp), %rax
movswl 0x1e(%rax), %eax
addl %eax, %ecx
movswl -0x20(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x45690
movq %rax, -0x10(%rbp)
jmp 0x3912d
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x9aa0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)