// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_ddlist.c
// Function: lv_ddlist_refr_size
static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim)
{
#if LV_USE_ANIMATION == 0
    anim = false;
#endif
    lv_ddlist_ext_t * ext    = lv_obj_get_ext_attr(ddlist);
    const lv_style_t * style = lv_obj_get_style(ddlist);
    lv_coord_t new_height;

    /*Open the list*/
    if(ext->opened) {
        if(ext->fix_height == 0) {
            new_height =
                lv_obj_get_height(lv_page_get_scrl(ddlist)) + style->body.padding.top + style->body.padding.bottom;
        } else {
            new_height = ext->fix_height;
        }

    }
    /*Close the list*/
    else {
        const lv_font_t * font         = style->text.font;
        const lv_style_t * label_style = lv_obj_get_style(ext->label);
        lv_coord_t font_h              = lv_font_get_line_height(font);
        new_height                     = font_h + 2 * label_style->text.line_space;

        lv_page_set_sb_mode(ddlist, LV_SB_MODE_HIDE);
    }

    if(anim == LV_ANIM_OFF) {
        lv_obj_set_height(ddlist, new_height);
        lv_ddlist_pos_current_option(ddlist);
        if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE);
#if LV_USE_ANIMATION
        lv_anim_del(ddlist, (lv_anim_exec_xcb_t)lv_ddlist_adjust_height); /*If an animation is in progress then
                                                                 it will overwrite this changes*/

        /*Force animation complete to fix highlight selection*/
        lv_ddlist_anim_finish(ddlist);
    } else {
        /*Run the animation only if the the size will be different*/
        if(lv_obj_get_height(ddlist) != new_height) {
            lv_anim_t a;
            a.var            = ddlist;
            a.start          = lv_obj_get_height(ddlist);
            a.end            = new_height;
            a.exec_cb        = (lv_anim_exec_xcb_t)lv_ddlist_adjust_height;
            a.path_cb        = lv_anim_path_linear;
            a.ready_cb       = lv_ddlist_anim_ready_cb;
            a.act_time       = 0;
            a.time           = lv_ddlist_get_anim_time(ddlist);
            a.playback       = 0;
            a.playback_pause = 0;
            a.repeat         = 0;
            a.repeat_pause   = 0;

            ext->force_sel = 1; /*Keep the list item selected*/
            lv_anim_create(&a);
        }
#endif
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa080
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movb 0x66(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
je 0x14133
movq -0x18(%rbp), %rax
movswl 0x68(%rax), %eax
cmpl $0x0, %eax
jne 0x14125
movq -0x8(%rbp), %rdi
callq 0x3e970
movq %rax, %rdi
callq 0x8350
cwtl
movq -0x20(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x22(%rbp)
jmp 0x14131
movq -0x18(%rbp), %rax
movw 0x68(%rax), %ax
movw %ax, -0x22(%rbp)
jmp 0x14182
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xa080
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x14bc0
movzbl %al, %eax
movw %ax, -0x3a(%rbp)
movswl -0x3a(%rbp), %eax
movq -0x38(%rbp), %rcx
movswl 0x32(%rcx), %ecx
shll %ecx
addl %ecx, %eax
movw %ax, -0x22(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x3dec0
movzbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jne 0x141da
movq -0x8(%rbp), %rdi
movswl -0x22(%rbp), %esi
callq 0x84a0
movq -0x8(%rbp), %rdi
callq 0x14360
movq -0x18(%rbp), %rax
movb 0x66(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
je 0x141bc
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x3dec0
movq -0x8(%rbp), %rdi
leaq 0xcf9(%rip), %rsi       # 0x14ec0
callq 0x44560
movq -0x8(%rbp), %rdi
callq 0x14ef0
jmp 0x1427b
movq -0x8(%rbp), %rdi
callq 0x8350
cwtl
movswl -0x22(%rbp), %ecx
cmpl %ecx, %eax
je 0x14279
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8350
cwtl
movl %eax, -0x58(%rbp)
movswl -0x22(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0xcad(%rip), %rax       # 0x14ec0
movq %rax, -0x70(%rbp)
leaq 0x30212(%rip), %rax     # 0x44430
movq %rax, -0x68(%rbp)
leaq 0xd27(%rip), %rax       # 0x14f50
movq %rax, -0x60(%rbp)
movw $0x0, -0x4e(%rbp)
movq -0x8(%rbp), %rdi
callq 0x14f80
movw %ax, -0x50(%rbp)
movb -0x48(%rbp), %al
andb $-0x2, %al
orb $0x0, %al
movb %al, -0x48(%rbp)
movw $0x0, -0x4c(%rbp)
movb -0x48(%rbp), %al
andb $-0x3, %al
orb $0x0, %al
movb %al, -0x48(%rbp)
movw $0x0, -0x4a(%rbp)
movq -0x18(%rbp), %rax
movb 0x66(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0x66(%rax)
leaq -0x78(%rbp), %rdi
callq 0x444a0
jmp 0x1427b
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)