// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_canvas.c
// Function: lv_canvas_create
lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy)
{
    LV_LOG_TRACE("canvas create started");

    /*Create the ancestor of canvas*/
    lv_obj_t * new_canvas = lv_img_create(par, copy);
    LV_ASSERT_MEM(new_canvas);
    if(new_canvas == NULL) return NULL;

    /*Allocate the canvas type specific extended data*/
    lv_canvas_ext_t * ext = lv_obj_allocate_ext_attr(new_canvas, sizeof(lv_canvas_ext_t));
    LV_ASSERT_MEM(ext);
    if(ext == NULL) return NULL;
    if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_canvas);
    if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_canvas);

    /*Initialize the allocated 'ext' */
    ext->dsc.header.always_zero = 0;
    ext->dsc.header.cf          = LV_IMG_CF_TRUE_COLOR;
    ext->dsc.header.h           = 0;
    ext->dsc.header.w           = 0;
    ext->dsc.data_size          = 0;
    ext->dsc.data               = NULL;

    lv_img_set_src(new_canvas, &ext->dsc);

    /*The signal and design functions are not copied so set them here*/
    lv_obj_set_signal_cb(new_canvas, lv_canvas_signal);

    /*Init the new canvas canvas*/
    if(copy == NULL) {

    }
    /*Copy an existing canvas*/
    else {
        /*Refresh the style with new signal function*/
        lv_obj_refresh_style(new_canvas);
    }

    LV_LOG_INFO("canvas created");

    return new_canvas;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x39cb0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x26740
movq -0x20(%rbp), %rsi
leaq 0x4190b(%rip), %rdi     # 0x68044
callq 0xd410
jmp 0x2673e
cmpq $0x0, -0x20(%rbp)
jne 0x26754
movq $0x0, -0x8(%rbp)
jmp 0x26868
movq -0x20(%rbp), %rdi
movl $0x28, %esi
callq 0x9d60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x26785
movq -0x28(%rbp), %rsi
leaq 0x418c6(%rip), %rdi     # 0x68044
callq 0xd410
jmp 0x26783
cmpq $0x0, -0x28(%rbp)
jne 0x26799
movq $0x0, -0x8(%rbp)
jmp 0x26868
cmpq $0x0, 0x62cbf(%rip)     # 0x89460
jne 0x267b3
movq -0x20(%rbp), %rdi
callq 0xa830
movq %rax, 0x62cad(%rip)     # 0x89460
cmpq $0x0, 0x62cad(%rip)     # 0x89468
jne 0x267cd
movq -0x20(%rbp), %rdi
callq 0xa870
movq %rax, 0x62c9b(%rip)     # 0x89468
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xffffff1f, %ecx       # imm = 0xFFFFFF1F
orl $0x0, %ecx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
andl $-0x20, %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0x1fffff, %ecx         # imm = 0x1FFFFF
orl $0x0, %ecx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xffe003ff, %ecx       # imm = 0xFFE003FF
orl $0x0, %ecx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0x3a2c0
movq -0x20(%rbp), %rdi
leaq 0x37(%rip), %rsi        # 0x26880
callq 0x9cc0
cmpq $0x0, -0x18(%rbp)
jne 0x26857
jmp 0x26860
movq -0x20(%rbp), %rdi
callq 0x9250
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)