// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_cont.c
// Function: lv_cont_create
lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy)
{

    LV_LOG_TRACE("container create started");

    /*Create a basic object*/
    lv_obj_t * new_cont = lv_obj_create(par, copy);
    LV_ASSERT_MEM(new_cont);
    if(new_cont == NULL) return NULL;

    if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_cont);

    lv_obj_allocate_ext_attr(new_cont, sizeof(lv_cont_ext_t));
    lv_cont_ext_t * ext = lv_obj_get_ext_attr(new_cont);
    if(ext == NULL) return NULL;

    LV_ASSERT_MEM(ext);
    ext->fit_left   = LV_FIT_NONE;
    ext->fit_right  = LV_FIT_NONE;
    ext->fit_top    = LV_FIT_NONE;
    ext->fit_bottom = LV_FIT_NONE;
    ext->layout     = LV_LAYOUT_OFF;

    lv_obj_set_signal_cb(new_cont, lv_cont_signal);

    /*Init the new container*/
    if(copy == NULL) {
        /*Set the default styles if it's not screen*/
        if(par != NULL) {
            lv_theme_t * th = lv_theme_get_current();
            if(th) {
                lv_cont_set_style(new_cont, LV_CONT_STYLE_MAIN, th->style.cont);
            } else {
                lv_cont_set_style(new_cont, LV_CONT_STYLE_MAIN, &lv_style_pretty);
            }
        }
    }
    /*Copy an existing object*/
    else {
        lv_cont_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
        ext->fit_left            = copy_ext->fit_left;
        ext->fit_right           = copy_ext->fit_right;
        ext->fit_top             = copy_ext->fit_top;
        ext->fit_bottom          = copy_ext->fit_bottom;
        ext->layout              = copy_ext->layout;

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

    LV_LOG_INFO("container created");

    return new_cont;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r12
callq 0x454f
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x22c22
testq %rbx, %rbx
je 0x22c33
cmpq $0x0, 0x3d8e1(%rip)     # 0x60430
jne 0x22b60
movq %rbx, %rdi
callq 0x6a8b
movq %rax, 0x3d8d0(%rip)     # 0x60430
movq %rbx, %rdi
movl $0x2, %esi
callq 0x64db
movq %rbx, %rdi
callq 0x6af7
testq %rax, %rax
je 0x22c33
movq %rax, %r14
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x22c44
andw $0xf000, (%r14)         # imm = 0xF000
leaq 0xdd(%rip), %rsi        # 0x22c7b
movq %rbx, %rdi
callq 0x647b
testq %r15, %r15
je 0x22c55
movq %r15, %rdi
callq 0x6af7
movzwl (%rax), %edx
andl $0x30, %edx
movzwl (%r14), %ecx
andl $-0x31, %ecx
orl %edx, %ecx
movw %cx, (%r14)
movzwl (%rax), %edx
andl $0xc0, %edx
andl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
orl %edx, %ecx
movw %cx, (%r14)
movzwl (%rax), %edx
andl $0x300, %edx            # imm = 0x300
andl $0xfffffcff, %ecx       # imm = 0xFFFFFCFF
orl %edx, %ecx
movw %cx, (%r14)
movzwl (%rax), %edx
andl $0xc00, %edx            # imm = 0xC00
andl $0xfffff3ff, %ecx       # imm = 0xFFFFF3FF
orl %edx, %ecx
movw %cx, (%r14)
movzwl (%rax), %eax
andl $0xf, %eax
andl $-0x10, %ecx
orl %eax, %ecx
movw %cx, (%r14)
movq %rbx, %rdi
callq 0x5e54
jmp 0x22c35
leaq 0x1c4a7(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x22c31
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1c485(%rip), %rdi     # 0x3f0d0
movq %r14, %rsi
callq 0x8294
jmp 0x22c53
testq %r12, %r12
je 0x22c35
callq 0x2e91c
testq %rax, %rax
je 0x22c6a
movq 0x18(%rax), %rsi
jmp 0x22c71
leaq 0x3d337(%rip), %rsi     # 0x5ffa8
movq %rbx, %rdi
callq 0x5d9f
jmp 0x22c35