// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x6af7
movq %rax, %r14
movq %rbx, %rdi
callq 0x66b6
movq %rax, %r12
testb $0x1, 0x66(%r14)
jne 0xc00d
movq 0x28(%r12), %r15
movq 0x50(%r14), %rdi
callq 0x66b6
movzbl 0x10(%r15), %ecx
movzwl 0x32(%rax), %eax
leal (%rcx,%rax,2), %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x2636f
jmp 0xc037
movzwl 0x68(%r14), %r15d
testw %r15w, %r15w
jne 0xc037
movq %rbx, %rdi
callq 0x2695e
movq %rax, %rdi
callq 0x5697
movl %eax, %r15d
addw 0x16(%r12), %r15w
addw 0x18(%r12), %r15w
testb %bpl, %bpl
je 0xc0c7
movq %rbx, %rdi
callq 0x5697
cmpw %r15w, %ax
je 0xc0ba
movswl %r15w, %ebp
leaq 0x8(%rsp), %r15
movq %rbx, (%r15)
movq %rbx, %rdi
callq 0x5697
cwtl
movl %eax, 0x20(%r15)
movl %ebp, 0x24(%r15)
leaq 0x76e(%rip), %rax       # 0xc7e0
movq %rax, 0x8(%r15)
leaq 0x1db0b(%rip), %rax     # 0x29b88
movq %rax, 0x10(%r15)
leaq 0x7ae(%rip), %rax       # 0xc836
movq %rax, 0x18(%r15)
movw $0x0, 0x2a(%r15)
movq %rbx, %rdi
callq 0x26a3d
movw %ax, 0x28(%r15)
movl $0x0, 0x2c(%r15)
movb $0x0, 0x30(%r15)
orb $0x2, 0x66(%r14)
movq %r15, %rdi
callq 0x29bb4
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movswl %r15w, %esi
movq %rbx, %rdi
callq 0x574b
movq %rbx, %rdi
callq 0xc17d
testb $0x1, 0x66(%r14)
je 0xc0ef
movq %rbx, %rdi
movl $0x5, %esi
callq 0x2636f
leaq 0x6ea(%rip), %rsi       # 0xc7e0
movq %rbx, %rdi
callq 0x29c44
movq %rbx, %rdi
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc7f2