// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_page.c
// Function: lv_page_create
lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy)
{
    LV_LOG_TRACE("page create started");

    /*Create the ancestor object*/
    lv_obj_t * new_page = lv_cont_create(par, copy);
    LV_ASSERT_MEM(new_page);
    if(new_page == NULL) return NULL;

    if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_page);
    if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_page);

    /*Allocate the object type specific extended data*/
    lv_page_ext_t * ext = lv_obj_allocate_ext_attr(new_page, sizeof(lv_page_ext_t));
    LV_ASSERT_MEM(ext);
    if(ext == NULL) return NULL;

    ext->scrl        = NULL;
    ext->sb.hor_draw = 0;
    ext->sb.ver_draw = 0;
    ext->sb.style    = &lv_style_pretty;
    ext->sb.mode     = LV_SB_MODE_AUTO;
#if LV_USE_ANIMATION
    ext->edge_flash.enabled   = 0;
    ext->edge_flash.bottom_ip = 0;
    ext->edge_flash.top_ip    = 0;
    ext->edge_flash.left_ip   = 0;
    ext->edge_flash.right_ip  = 0;
    ext->edge_flash.state     = 0;
    ext->edge_flash.style     = &lv_style_plain_color;
    ext->anim_time            = LV_PAGE_DEF_ANIM_TIME;
#endif
    ext->scroll_prop    = 0;
    ext->scroll_prop_ip = 0;

    /*Init the new page object*/
    if(copy == NULL) {
        ext->scrl = lv_cont_create(new_page, NULL);
        lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal);
        lv_obj_set_design_cb(ext->scrl, lv_scrl_design);
        lv_obj_set_drag(ext->scrl, true);
        lv_obj_set_drag_throw(ext->scrl, true);
        lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT | LV_PROTECT_PRESS_LOST);
        lv_cont_set_fit4(ext->scrl, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL);
        lv_obj_set_event_cb(ext->scrl, scrl_def_event_cb); /*Propagate some event to the background
                                                              object by default for convenience */

        /* Add the signal function only if 'scrolling' is created
         * because everything has to be ready before any signal is received*/
        lv_obj_set_signal_cb(new_page, lv_page_signal);
        lv_obj_set_design_cb(new_page, lv_page_design);

        lv_page_set_sb_mode(new_page, ext->sb.mode);

        /*Set the default styles*/
        lv_theme_t * th = lv_theme_get_current();
        if(th) {
            if(par == NULL) { /*Different styles if it is screen*/
                lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.bg);
                lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, &lv_style_transp);
            } else {
                lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.page.bg);
                lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, th->style.page.scrl);
            }
            lv_page_set_style(new_page, LV_PAGE_STYLE_SB, th->style.page.sb);
        } else {
            lv_page_set_style(new_page, LV_PAGE_STYLE_BG, &lv_style_pretty_color);
            lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, &lv_style_pretty);
            lv_page_set_style(new_page, LV_PAGE_STYLE_SB, &lv_style_pretty_color);
        }

    } else {
        lv_page_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
        ext->scrl                = lv_cont_create(new_page, copy_ext->scrl);
        lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal);

        lv_page_set_sb_mode(new_page, copy_ext->sb.mode);

        lv_page_set_style(new_page, LV_PAGE_STYLE_BG, lv_page_get_style(copy, LV_PAGE_STYLE_BG));
        lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy, LV_PAGE_STYLE_SCRL));
        lv_page_set_style(new_page, LV_PAGE_STYLE_SB, lv_page_get_style(copy, LV_PAGE_STYLE_SB));

        /* Add the signal function only if 'scrolling' is created
         * because everything has to be ready before any signal is received*/
        lv_obj_set_signal_cb(new_page, lv_page_signal);
        lv_obj_set_design_cb(new_page, lv_page_design);

        /*Refresh the style with new signal function*/
        lv_obj_refresh_style(new_page);
    }

    lv_page_sb_refresh(new_page);

    LV_LOG_INFO("page created");

    return new_page;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
callq 0x22b18
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x25530
testq %rbx, %rbx
je 0x25541
cmpq $0x0, 0x3b099(%rip)     # 0x60468
jne 0x253e0
movq %rbx, %rdi
callq 0x6a8b
movq %rax, 0x3b088(%rip)     # 0x60468
cmpq $0x0, 0x3b088(%rip)     # 0x60470
jne 0x253f9
movq %rbx, %rdi
callq 0x6aaf
movq %rax, 0x3b077(%rip)     # 0x60470
movq %rbx, %rdi
movl $0x50, %esi
callq 0x64db
movq %rax, %r12
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x25548
testq %r12, %r12
je 0x25541
movq $0x0, 0x8(%r12)
movb 0x28(%r12), %al
leaq 0x3ab71(%rip), %rcx     # 0x5ffa8
movq %rcx, 0x10(%r12)
andb $-0x20, %al
orb $0xc, %al
movb %al, 0x28(%r12)
andb $-0x20, 0x40(%r12)
movw $0x0, 0x30(%r12)
leaq 0x3ab06(%rip), %rax     # 0x5ff60
movq %rax, 0x38(%r12)
movw $0x190, 0x48(%r12)      # imm = 0x190
andb $-0x4, 0x4a(%r12)
testq %r15, %r15
je 0x25559
movq %r15, %rdi
callq 0x6af7
movq %rax, %r14
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x22b18
movq %rax, 0x8(%r12)
leaq 0x22c(%rip), %rsi       # 0x256c5
movq %rax, %rdi
callq 0x647b
movzbl 0x28(%r14), %esi
shrl $0x2, %esi
andl $0x7, %esi
movq %rbx, %rdi
callq 0x2636f
movq %r15, %rdi
xorl %esi, %esi
callq 0x264cb
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2640b
movq %r15, %rdi
movl $0x1, %esi
callq 0x264cb
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
callq 0x2640b
movq %r15, %rdi
movl $0x2, %esi
callq 0x264cb
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x2640b
leaq 0x7ec(%rip), %rsi       # 0x25cf8
movq %rbx, %rdi
callq 0x647b
leaq 0xb90(%rip), %rsi       # 0x260ab
movq %rbx, %rdi
callq 0x64ab
movq %rbx, %rdi
callq 0x5e54
jmp 0x256ae
leaq 0x19b99(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x2553f
xorl %ebx, %ebx
jmp 0x256b6
leaq 0x19b81(%rip), %rdi     # 0x3f0d0
movq %r12, %rsi
callq 0x8294
jmp 0x25557
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22b18
movq %rax, 0x8(%r12)
leaq 0x156(%rip), %rsi       # 0x256c5
movq %rax, %rdi
callq 0x647b
movq 0x8(%r12), %rdi
leaq 0x64b(%rip), %rsi       # 0x25bce
callq 0x64ab
movq 0x8(%r12), %rdi
movl $0x1, %esi
callq 0x606c
movq 0x8(%r12), %rdi
movl $0x1, %esi
callq 0x6119
movq 0x8(%r12), %rdi
movl $0x12, %esi
callq 0x6306
movq 0x8(%r12), %rdi
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movl $0x3, %r8d
callq 0x22d84
movq 0x8(%r12), %rdi
leaq 0x6e3(%rip), %rsi       # 0x25cc3
callq 0x6363
leaq 0x70c(%rip), %rsi       # 0x25cf8
movq %rbx, %rdi
callq 0x647b
leaq 0xab0(%rip), %rsi       # 0x260ab
movq %rbx, %rdi
callq 0x64ab
movzbl 0x28(%r12), %esi
shrl $0x2, %esi
andl $0x7, %esi
movq %rbx, %rdi
callq 0x2636f
callq 0x2e91c
testq %rax, %rax
je 0x25643
movq %rax, %r15
testq %r14, %r14
je 0x25678
movq 0x208(%r15), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2640b
movq 0x210(%r15), %rdx
jmp 0x2568d
leaq 0x3a9a6(%rip), %r14     # 0x5fff0
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2640b
leaq 0x3a94a(%rip), %rdx     # 0x5ffa8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2640b
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
jmp 0x256a9
movq 0x8(%r15), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2640b
leaq 0x3a9ab(%rip), %rdx     # 0x60038
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2640b
movq 0x218(%r15), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2640b
movq %rbx, %rdi
callq 0x26538
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq