// File: /workspace/github_c_makefile_star2_O1/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 0x455f
movq %rax, %rbx
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0xd2c6
testq %rbx, %rbx
je 0xd2d7
cmpq $0x0, 0x53103(%rip)     # 0x602f0
jne 0xd1fe
movq %rbx, %rdi
callq 0x6a6c
movq %rax, 0x530f2(%rip)     # 0x602f0
movq %rbx, %rdi
movl $0x10, %esi
callq 0x64bc
movq %rax, %r15
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0xd2e2
testq %r15, %r15
je 0xd2d7
movw $0x0, 0x8(%r15)
movq $0x0, (%r15)
movb 0xa(%r15), %al
andb $-0x4, %al
incb %al
movb %al, 0xa(%r15)
leaq 0xd3(%rip), %rsi        # 0xd31b
movq %rbx, %rdi
callq 0x648c
leaq 0x2e0(%rip), %rsi       # 0xd537
movq %rbx, %rdi
callq 0x645c
testq %r14, %r14
je 0xd2f3
movq %r14, %rdi
callq 0x6ad8
movq %rax, %r15
movq %r14, %rdi
callq 0xd600
movzbl %al, %esi
movq %rbx, %rdi
callq 0xd59f
movq %r14, %rdi
callq 0xd686
movzbl %al, %esi
movq %rbx, %rdi
callq 0xd62d
movq %r14, %rdi
callq 0xd600
movzbl %al, %esi
movq %rbx, %rdi
callq 0xd59f
movq (%r15), %rsi
movzwl 0x8(%r15), %edx
movq %rbx, %rdi
callq 0xd6b5
movq %rbx, %rdi
callq 0x5e38
jmp 0xd2d9
leaq 0x31d73(%rip), %rdi     # 0x3f040
movq %rbx, %rsi
callq 0x829e
jmp 0xd2d5
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x31d57(%rip), %rdi     # 0x3f040
movq %r15, %rsi
callq 0x829e
jmp 0xd2f1
movq %rbx, %rdi
movl $0x64, %esi
movl $0x64, %edx
callq 0x553f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5d83
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5fd8
jmp 0xd2d9