// File: /workspace/github_c_makefile_star2_O1/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 0x455f
movq %rax, %rbx
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x224a2
testq %rbx, %rbx
je 0x224b3
cmpq $0x0, 0x3e061(%rip)     # 0x60430
jne 0x223e0
movq %rbx, %rdi
callq 0x6a6c
movq %rax, 0x3e050(%rip)     # 0x60430
movq %rbx, %rdi
movl $0x2, %esi
callq 0x64bc
movq %rbx, %rdi
callq 0x6ad8
testq %rax, %rax
je 0x224b3
movq %rax, %r14
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x224c4
andw $0xf000, (%r14)         # imm = 0xF000
leaq 0xdd(%rip), %rsi        # 0x224fb
movq %rbx, %rdi
callq 0x645c
testq %r15, %r15
je 0x224d5
movq %r15, %rdi
callq 0x6ad8
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 0x5e38
jmp 0x224b5
leaq 0x1cb97(%rip), %rdi     # 0x3f040
movq %rbx, %rsi
callq 0x829e
jmp 0x224b1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1cb75(%rip), %rdi     # 0x3f040
movq %r14, %rsi
callq 0x829e
jmp 0x224d3
testq %r12, %r12
je 0x224b5
callq 0x2e244
testq %rax, %rax
je 0x224ea
movq 0x18(%rax), %rsi
jmp 0x224f1
leaq 0x3dab7(%rip), %rsi     # 0x5ffa8
movq %rbx, %rdi
callq 0x5d83
jmp 0x224b5