// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_cont.c
// Function: lv_cont_layout_row
static void lv_cont_layout_row(lv_obj_t * cont)
{
    lv_layout_t type = lv_cont_get_layout(cont);
    lv_obj_t * child;

    /*Adjust margin and get the alignment type*/
    lv_align_t align;
    const lv_style_t * style = lv_obj_get_style(cont);
    lv_coord_t vpad_corr;
    lv_bidi_dir_t base_dir = lv_obj_get_base_dir(cont);
    switch(type) {
        case LV_LAYOUT_ROW_T:
            vpad_corr = style->body.padding.top;
            align     = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_TOP_RIGHT : LV_ALIGN_IN_TOP_LEFT;
            break;
        case LV_LAYOUT_ROW_M:
            vpad_corr = 0;
            align     = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_RIGHT_MID: LV_ALIGN_IN_LEFT_MID;
            break;
        case LV_LAYOUT_ROW_B:
            vpad_corr = -style->body.padding.bottom;
            align     = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_BOTTOM_RIGHT: LV_ALIGN_IN_BOTTOM_LEFT;
            break;
        default:
            vpad_corr = 0;
            align     = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_TOP_RIGHT : LV_ALIGN_IN_TOP_LEFT;
            break;
    }

    /* 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;
    if(base_dir == LV_BIDI_DIR_RTL) last_cord = style->body.padding.right;
    else last_cord = style->body.padding.left;

    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;

//        last_cord -= lv_obj_get_width(child);

        if(base_dir == LV_BIDI_DIR_RTL) lv_obj_align(child, cont, align, -last_cord, vpad_corr);
        else lv_obj_align(child, cont, align, last_cord, vpad_corr);

        last_cord += lv_obj_get_width(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 0x387b0
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa080
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7180
movb %al, -0x2b(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, -0x34(%rbp)
subl $0x5, %eax
je 0x393b3
jmp 0x3939f
movl -0x34(%rbp), %eax
subl $0x6, %eax
je 0x393d8
jmp 0x393a9
movl -0x34(%rbp), %eax
subl $0x7, %eax
je 0x393f7
jmp 0x39420
movq -0x28(%rbp), %rax
movw 0x16(%rax), %ax
movw %ax, -0x2a(%rbp)
movzbl -0x2b(%rbp), %edx
movl $0x1, %eax
movl $0x3, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movb %al, -0x19(%rbp)
jmp 0x3943d
movw $0x0, -0x2a(%rbp)
movzbl -0x2b(%rbp), %edx
movl $0x7, %eax
movl $0x8, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movb %al, -0x19(%rbp)
jmp 0x3943d
movq -0x28(%rbp), %rax
movswl 0x18(%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movw %ax, -0x2a(%rbp)
movzbl -0x2b(%rbp), %edx
movl $0x4, %eax
movl $0x6, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movb %al, -0x19(%rbp)
jmp 0x3943d
movw $0x0, -0x2a(%rbp)
movzbl -0x2b(%rbp), %edx
movl $0x1, %eax
movl $0x3, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x9a50
movzbl -0x2b(%rbp), %eax
cmpl $0x1, %eax
jne 0x39462
movq -0x28(%rbp), %rax
movw 0x1c(%rax), %ax
movw %ax, -0x2e(%rbp)
jmp 0x3946e
movq -0x28(%rbp), %rax
movw 0x1a(%rax), %ax
movw %ax, -0x2e(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x458e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3953e
movq -0x18(%rbp), %rdi
callq 0x7c90
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x394b5
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0xa7d0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x394b7
jmp 0x39524
movzbl -0x2b(%rbp), %eax
cmpl $0x1, %eax
jne 0x394e5
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movb -0x19(%rbp), %cl
movswl -0x2e(%rbp), %edx
xorl %eax, %eax
subl %edx, %eax
movzbl %cl, %edx
movswl %ax, %ecx
movswl -0x2a(%rbp), %r8d
callq 0x8500
jmp 0x39504
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movb -0x19(%rbp), %cl
movw -0x2e(%rbp), %ax
movzbl %cl, %edx
movswl %ax, %ecx
movswl -0x2a(%rbp), %r8d
callq 0x8500
movq -0x18(%rbp), %rdi
callq 0x8310
movswl %ax, %ecx
movq -0x28(%rbp), %rax
movswl 0x1e(%rax), %eax
addl %eax, %ecx
movswl -0x2e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x2e(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x45690
movq %rax, -0x18(%rbp)
jmp 0x3947f
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x9aa0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)