// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_line.c
// Function: lv_line_create
lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy)
{
    LV_LOG_TRACE("line create started");

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

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

    /*Extend the basic object to line object*/
    lv_line_ext_t * ext = lv_obj_allocate_ext_attr(new_line, sizeof(lv_line_ext_t));
    LV_ASSERT_MEM(ext);
    if(ext == NULL) return NULL;

    ext->point_num   = 0;
    ext->point_array = NULL;
    ext->auto_size   = 1;
    ext->y_inv       = 0;

    lv_obj_set_design_cb(new_line, lv_line_design);
    lv_obj_set_signal_cb(new_line, lv_line_signal);

    /*Init the new line*/
    if(copy == NULL) {
        lv_obj_set_size(new_line, LV_DPI,
                        LV_DPI);          /*Auto size is enables, but set default size until no points are added*/
        lv_obj_set_style(new_line, NULL); /*Inherit parent's style*/
        lv_obj_set_click(new_line, false);
    }
    /*Copy an existing object*/
    else {
        lv_line_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
        lv_line_set_auto_size(new_line, lv_line_get_auto_size(copy));
        lv_line_set_y_invert(new_line, lv_line_get_y_invert(copy));
        lv_line_set_auto_size(new_line, lv_line_get_auto_size(copy));
        lv_line_set_points(new_line, copy_ext->point_array, copy_ext->point_num);
        /*Refresh the style with new signal function*/
        lv_obj_refresh_style(new_line);
    }

    LV_LOG_INFO("line created");

    return new_line;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
callq 0x454f
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0xd206
testq %rbx, %rbx
je 0xd217
cmpq $0x0, 0x531c3(%rip)     # 0x602f0
jne 0xd13e
movq %rbx, %rdi
callq 0x6a8b
movq %rax, 0x531b2(%rip)     # 0x602f0
movq %rbx, %rdi
movl $0x10, %esi
callq 0x64db
movq %rax, %r15
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0xd222
testq %r15, %r15
je 0xd217
movw $0x0, 0x8(%r15)
movq $0x0, (%r15)
movb 0xa(%r15), %al
andb $-0x4, %al
incb %al
movb %al, 0xa(%r15)
leaq 0xd3(%rip), %rsi        # 0xd25b
movq %rbx, %rdi
callq 0x64ab
leaq 0x2db(%rip), %rsi       # 0xd472
movq %rbx, %rdi
callq 0x647b
testq %r14, %r14
je 0xd233
movq %r14, %rdi
callq 0x6af7
movq %rax, %r15
movq %r14, %rdi
callq 0xd53d
movzbl %al, %esi
movq %rbx, %rdi
callq 0xd4dc
movq %r14, %rdi
callq 0xd5c3
movzbl %al, %esi
movq %rbx, %rdi
callq 0xd56a
movq %r14, %rdi
callq 0xd53d
movzbl %al, %esi
movq %rbx, %rdi
callq 0xd4dc
movq (%r15), %rsi
movzwl 0x8(%r15), %edx
movq %rbx, %rdi
callq 0xd5f2
movq %rbx, %rdi
callq 0x5e54
jmp 0xd219
leaq 0x31ec3(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0xd215
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x31ea7(%rip), %rdi     # 0x3f0d0
movq %r15, %rsi
callq 0x8294
jmp 0xd231
movq %rbx, %rdi
movl $0x64, %esi
movl $0x64, %edx
callq 0x5557
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5d9f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5ff7
jmp 0xd219