// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_mbox.c
// Function: lv_mbox_start_auto_close
void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay)
{
    LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);

#if LV_USE_ANIMATION
    if(lv_mbox_get_anim_time(mbox) != 0) {
        /*Add shrinking animations*/
        lv_anim_t a;
        a.var            = mbox;
        a.start          = lv_obj_get_height(mbox);
        a.end            = 0;
        a.exec_cb        = (lv_anim_exec_xcb_t)lv_obj_set_height;
        a.path_cb        = lv_anim_path_linear;
        a.ready_cb       = NULL;
        a.act_time       = -delay;
        a.time           = lv_mbox_get_anim_time(mbox);
        a.playback       = 0;
        a.playback_pause = 0;
        a.repeat         = 0;
        a.repeat_pause   = 0;
        lv_anim_create(&a);

        a.start    = lv_obj_get_width(mbox);
        a.exec_cb  = (lv_anim_exec_xcb_t)lv_obj_set_width;
        a.ready_cb = lv_mbox_close_ready_cb;
        lv_anim_create(&a);

        /*Disable fit to let shrinking work*/
        lv_cont_set_fit(mbox, LV_FIT_NONE);
    } else {
        /*Create an animation to delete the mbox `delay` ms later*/
        lv_anim_t a;
        a.var            = mbox;
        a.start          = 0;
        a.end            = 1;
        a.exec_cb        = (lv_anim_exec_xcb_t)NULL;
        a.path_cb        = lv_anim_path_linear;
        a.ready_cb       = lv_mbox_close_ready_cb;
        a.act_time       = -delay;
        a.time           = 0;
        a.playback       = 0;
        a.playback_pause = 0;
        a.repeat         = 0;
        a.repeat_pause   = 0;
        lv_anim_create(&a);
    }
#else
    (void)delay; /*Unused*/
    lv_obj_del(mbox);
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x80e4
testb %al, %al
je 0xdde0
movq %rbx, %rdi
callq 0xde4a
testw %ax, %ax
je 0xddf1
movq %rsp, %r14
movq %rbx, (%r14)
movq %rbx, %rdi
callq 0x5697
cwtl
movl %eax, 0x20(%r14)
xorl %r15d, %r15d
movl %r15d, 0x24(%r14)
leaq -0x861b(%rip), %rax     # 0x574b
movq %rax, 0x8(%r14)
leaq 0x1be17(%rip), %rax     # 0x29b88
movq %rax, 0x10(%r14)
movq $0x0, 0x18(%r14)
negl %ebp
movw %bp, 0x2a(%r14)
movq %rbx, %rdi
callq 0xde4a
movw %ax, 0x28(%r14)
movl %r15d, 0x2c(%r14)
movb $0x0, 0x30(%r14)
movq %r14, %rdi
callq 0x29bb4
movq %rbx, %rdi
callq 0x566d
cwtl
movl %eax, 0x20(%r14)
leaq -0x86a9(%rip), %rax     # 0x570d
movq %rax, 0x8(%r14)
leaq 0xb5(%rip), %rax        # 0xde76
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0x29bb4
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x22d84
jmp 0xde3f
leaq 0x313fd(%rip), %rdi     # 0x3f1e4
movq %rbx, %rsi
callq 0x8294
jmp 0xddef
movq %rsp, %rdi
movq %rbx, (%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x20(%rdi)
movq $0x0, 0x8(%rdi)
leaq 0x1bd74(%rip), %rax     # 0x29b88
movq %rax, 0x10(%rdi)
leaq 0x57(%rip), %rax        # 0xde76
movq %rax, 0x18(%rdi)
negl %ebp
movw %bp, 0x2a(%rdi)
movw $0x0, 0x28(%rdi)
movl $0x0, 0x2c(%rdi)
movb $0x0, 0x30(%rdi)
callq 0x29bb4
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq