// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_ddlist.c
// Function: lv_ddlist_refr_width
static void lv_ddlist_refr_width(lv_obj_t * ddlist)
{
    lv_ddlist_ext_t * ext          = lv_obj_get_ext_attr(ddlist);

    /*Save the current x coordinate because it should be kept after the refrsh*/
    lv_coord_t x;
    if(lv_obj_get_base_dir(ddlist) == LV_BIDI_DIR_RTL) x = lv_obj_get_x(ddlist) + lv_obj_get_width(ddlist);
    else x = lv_obj_get_x(ddlist);

    /*Set the TIGHT fit horizontally the set the width to the content*/
    lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, lv_page_get_scrl_fit_bottom(ddlist));

    /*Revert FILL fit to fill the parent with the options area. It allows to RIGHT/CENTER align the text*/
    lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, lv_page_get_scrl_fit_bottom(ddlist));

    if(lv_obj_get_base_dir(ddlist) == LV_BIDI_DIR_RTL) lv_obj_set_x(ddlist, x - lv_obj_get_width(ddlist));
    else lv_obj_set_x(ddlist, x);

    switch(lv_label_get_align(ext->label)) {
        case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
        case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break;
        case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7180
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x13f81
movq -0x8(%rbp), %rdi
callq 0x7350
cwtl
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8310
movw %ax, %cx
movl -0x18(%rbp), %eax
movswl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x12(%rbp)
jmp 0x13f8e
movq -0x8(%rbp), %rdi
callq 0x7350
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x14fa0
movq -0x28(%rbp), %rdi
movl $0x1, %esi
movzbl %al, %edx
callq 0x13bb0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x14fa0
movq -0x20(%rbp), %rdi
movl $0x3, %esi
movzbl %al, %edx
callq 0x13bb0
movq -0x8(%rbp), %rdi
callq 0x7180
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x14014
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movswl -0x12(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8310
movq -0x38(%rbp), %rdi
movw %ax, %cx
movl -0x2c(%rbp), %eax
movswl %cx, %ecx
subl %ecx, %eax
movswl %ax, %esi
callq 0x80b0
jmp 0x14021
movq -0x8(%rbp), %rdi
movswl -0x12(%rbp), %esi
callq 0x80b0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x2ab50
movzbl %al, %ecx
movl %ecx, -0x3c(%rbp)
testb %al, %al
je 0x1404e
jmp 0x1403a
movl -0x3c(%rbp), %eax
subl $0x1, %eax
je 0x1406c
jmp 0x14044
movl -0x3c(%rbp), %eax
subl $0x2, %eax
je 0x14088
jmp 0x140a4
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x7, %edx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x8500
jmp 0x140a4
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x8500
jmp 0x140a4
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x8, %edx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x8500
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)