// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x381b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x3c440
movq -0x20(%rbp), %rsi
leaq 0x2bc0b(%rip), %rdi     # 0x68044
callq 0xd410
jmp 0x3c43e
cmpq $0x0, -0x20(%rbp)
jne 0x3c454
movq $0x0, -0x8(%rbp)
jmp 0x3c85e
cmpq $0x0, 0x4d0dc(%rip)     # 0x89538
jne 0x3c46e
movq -0x20(%rbp), %rdi
callq 0xa830
movq %rax, 0x4d0ca(%rip)     # 0x89538
cmpq $0x0, 0x4d0ca(%rip)     # 0x89540
jne 0x3c488
movq -0x20(%rbp), %rdi
callq 0xa870
movq %rax, 0x4d0b8(%rip)     # 0x89540
movq -0x20(%rbp), %rdi
movl $0x50, %esi
callq 0x9d60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x3c4b9
movq -0x28(%rbp), %rsi
leaq 0x2bb92(%rip), %rdi     # 0x68044
callq 0xd410
jmp 0x3c4b7
cmpq $0x0, -0x28(%rbp)
jne 0x3c4cd
movq $0x0, -0x8(%rbp)
jmp 0x3c85e
movq -0x28(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x28(%rbp), %rax
movb 0x28(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x28(%rax)
movq -0x28(%rbp), %rax
movb 0x28(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x28(%rax)
movq -0x28(%rbp), %rax
leaq 0x4cb74(%rip), %rcx     # 0x89078
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movb 0x28(%rax), %cl
andb $-0x1d, %cl
orb $0xc, %cl
movb %cl, 0x28(%rax)
movq -0x28(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x28(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x28(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x28(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x11, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x28(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x9, %cl
orb $0x0, %cl
movb %cl, 0x40(%rax)
movq -0x28(%rbp), %rax
movw $0x0, 0x30(%rax)
movq -0x28(%rbp), %rax
leaq 0x4cab3(%rip), %rcx     # 0x89030
movq %rcx, 0x38(%rax)
movq -0x28(%rbp), %rax
movw $0x190, 0x48(%rax)      # imm = 0x190
movq -0x28(%rbp), %rax
movb 0x4a(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x4a(%rax)
movq -0x28(%rbp), %rax
movb 0x4a(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x4a(%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x3c760
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x381b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x293(%rip), %rsi       # 0x3c870
callq 0x9cc0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xb2f(%rip), %rsi       # 0x3d120
callq 0x9d10
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x95a0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x96c0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x12, %esi
callq 0x9a50
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x3, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x38640
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xc29(%rip), %rsi       # 0x3d280
callq 0x9b00
movq -0x20(%rbp), %rdi
leaq 0xcc9(%rip), %rsi       # 0x3d330
callq 0x9cc0
movq -0x20(%rbp), %rdi
leaq 0x1299(%rip), %rsi      # 0x3d910
callq 0x9d10
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x2, %al
andb $0x7, %al
movzbl %al, %esi
callq 0x3dec0
callq 0x4cfc0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3c71f
cmpq $0x0, -0x10(%rbp)
jne 0x3c6d5
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
xorl %esi, %esi
callq 0x3dff0
movq -0x20(%rbp), %rdi
movl $0x1, %esi
leaq 0x4ca3a(%rip), %rdx     # 0x89108
callq 0x3dff0
jmp 0x3c704
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x208(%rax), %rdx
xorl %esi, %esi
callq 0x3dff0
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x210(%rax), %rdx
movl $0x1, %esi
callq 0x3dff0
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x218(%rax), %rdx
movl $0x2, %esi
callq 0x3dff0
jmp 0x3c75b
movq -0x20(%rbp), %rdi
xorl %esi, %esi
leaq 0x4c994(%rip), %rdx     # 0x890c0
callq 0x3dff0
movq -0x20(%rbp), %rdi
movl $0x1, %esi
leaq 0x4c937(%rip), %rdx     # 0x89078
callq 0x3dff0
movq -0x20(%rbp), %rdi
movl $0x2, %esi
leaq 0x4c96a(%rip), %rdx     # 0x890c0
callq 0x3dff0
jmp 0x3c84d
movq -0x18(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x381b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xd8(%rip), %rsi        # 0x3c870
callq 0x9cc0
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movb 0x28(%rax), %al
shrb $0x2, %al
andb $0x7, %al
movzbl %al, %esi
callq 0x3dec0
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x3e100
movq -0x50(%rbp), %rdi
movq %rax, %rdx
xorl %esi, %esi
callq 0x3dff0
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x3e100
movq -0x48(%rbp), %rdi
movq %rax, %rdx
movl $0x1, %esi
callq 0x3dff0
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x3e100
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movl $0x2, %esi
callq 0x3dff0
movq -0x20(%rbp), %rdi
leaq 0xb01(%rip), %rsi       # 0x3d330
callq 0x9cc0
movq -0x20(%rbp), %rdi
leaq 0x10d1(%rip), %rsi      # 0x3d910
callq 0x9d10
movq -0x20(%rbp), %rdi
callq 0x9250
movq -0x20(%rbp), %rdi
callq 0x3e1c0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)