// File: /workspace/github_c_makefile_star2_O2/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 0x42c9
movq %rax, %rbx
movq %rax, %rdi
callq 0x7994
testb %al, %al
je 0x20ad0
testq %rbx, %rbx
je 0x20ae1
cmpq $0x0, 0x3da31(%rip)     # 0x5e430
jne 0x20a10
movq %rbx, %rdi
callq 0x66db
movq %rax, 0x3da20(%rip)     # 0x5e430
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6146
movq %rbx, %rdi
callq 0x6747
testq %rax, %rax
je 0x20ae1
movq %rax, %r14
movq %rax, %rdi
callq 0x7994
testb %al, %al
je 0x20af2
andw $0xf000, (%r14)         # imm = 0xF000
leaq 0xdd(%rip), %rsi        # 0x20b29
movq %rbx, %rdi
callq 0x60e6
testq %r15, %r15
je 0x20b03
movq %r15, %rdi
callq 0x6747
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 0x5ae7
jmp 0x20ae3
leaq 0x1a569(%rip), %rdi     # 0x3b040
movq %rbx, %rsi
callq 0x7b01
jmp 0x20adf
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1a547(%rip), %rdi     # 0x3b040
movq %r14, %rsi
callq 0x7b01
jmp 0x20b01
testq %r12, %r12
je 0x20ae3
callq 0x2be75
testq %rax, %rax
je 0x20b18
movq 0x18(%rax), %rsi
jmp 0x20b1f
leaq 0x3d489(%rip), %rsi     # 0x5dfa8
movq %rbx, %rdi
callq 0x5a3d
jmp 0x20ae3