// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x66b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x15e00
movq -0x20(%rbp), %rsi
leaq 0x5224b(%rip), %rdi     # 0x68044
callq 0xd410
jmp 0x15dfe
cmpq $0x0, -0x20(%rbp)
jne 0x15e14
movq $0x0, -0x8(%rbp)
jmp 0x15f92
cmpq $0x0, 0x735a4(%rip)     # 0x893c0
jne 0x15e2e
movq -0x20(%rbp), %rdi
callq 0xa830
movq %rax, 0x73592(%rip)     # 0x893c0
movq -0x20(%rbp), %rdi
movl $0x10, %esi
callq 0x9d60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd120
testb $0x1, %al
jne 0x15e5f
movq -0x28(%rbp), %rsi
leaq 0x521ec(%rip), %rdi     # 0x68044
callq 0xd410
jmp 0x15e5d
cmpq $0x0, -0x28(%rbp)
jne 0x15e73
movq $0x0, -0x8(%rbp)
jmp 0x15f92
movq -0x28(%rbp), %rax
movw $0x0, 0x8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movb 0xa(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0xa(%rax)
movq -0x28(%rbp), %rax
movb 0xa(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0xa(%rax)
movq -0x20(%rbp), %rdi
leaq 0xed(%rip), %rsi        # 0x15fa0
callq 0x9d10
movq -0x20(%rbp), %rdi
leaq 0x46d(%rip), %rsi       # 0x16330
callq 0x9cc0
cmpq $0x0, -0x18(%rbp)
jne 0x15efc
movq -0x20(%rbp), %rdi
movl $0x64, %edx
movl %edx, %esi
callq 0x8180
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9150
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x94b0
jmp 0x15f8a
movq -0x18(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x16490
movq -0x48(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x163e0
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x16590
movq -0x40(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x164f0
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x16490
movq -0x38(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x163e0
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movzwl 0x8(%rax), %edx
callq 0x16600
movq -0x20(%rbp), %rdi
callq 0x9250
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)