// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_slider.c
// Function: lv_slider_create
lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy)
{
    LV_LOG_TRACE("slider create started");

    /*Create the ancestor slider*/
    lv_obj_t * new_slider = lv_bar_create(par, copy);
    LV_ASSERT_MEM(new_slider);
    if(new_slider == NULL) return NULL;

    if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_slider);
    if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_slider);

    /*Allocate the slider type specific extended data*/
    lv_slider_ext_t * ext = lv_obj_allocate_ext_attr(new_slider, sizeof(lv_slider_ext_t));
    LV_ASSERT_MEM(ext);
    if(ext == NULL) return NULL;

    /*Initialize the allocated 'ext' */
    ext->drag_value = LV_SLIDER_NOT_PRESSED;
    ext->style_knob = &lv_style_pretty;
    ext->knob_in    = 0;

    /*The signal and design functions are not copied so set them here*/
    lv_obj_set_signal_cb(new_slider, lv_slider_signal);
    lv_obj_set_design_cb(new_slider, lv_slider_design);

    /*Init the new slider slider*/
    if(copy == NULL) {
        lv_obj_set_click(new_slider, true);
        lv_obj_set_protect(new_slider, LV_PROTECT_PRESS_LOST);

        /*Set the default styles*/
        lv_theme_t * th = lv_theme_get_current();
        if(th) {
            lv_slider_set_style(new_slider, LV_SLIDER_STYLE_BG, th->style.slider.bg);
            lv_slider_set_style(new_slider, LV_SLIDER_STYLE_INDIC, th->style.slider.indic);
            lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, th->style.slider.knob);
        } else {
            lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, ext->style_knob);
        }
    }
    /*Copy an existing slider*/
    else {
        lv_slider_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
        ext->style_knob            = copy_ext->style_knob;
        ext->knob_in               = copy_ext->knob_in;
        /*Refresh the style with new signal function*/
        lv_obj_refresh_style(new_slider);
    }

    LV_LOG_INFO("slider created");

    return new_slider;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
callq 0x8d50
movq %rax, %rbx
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x1ccda
testq %rbx, %rbx
je 0x1cceb
cmpq $0x0, 0x437b3(%rip)     # 0x603d8
jne 0x1cc36
movq %rbx, %rdi
callq 0x6a90
movq %rax, 0x437a2(%rip)     # 0x603d8
cmpq $0x0, 0x437a2(%rip)     # 0x603e0
jne 0x1cc4f
movq %rbx, %rdi
callq 0x6a6c
movq %rax, 0x43791(%rip)     # 0x603e0
movq %rbx, %rdi
movl $0x28, %esi
callq 0x64bc
movq %rax, %r15
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x1ccf6
testq %r15, %r15
je 0x1cceb
movw $0x8000, 0x20(%r15)     # imm = 0x8000
leaq 0x43326(%rip), %rax     # 0x5ffa8
movq %rax, 0x18(%r15)
andb $-0x2, 0x22(%r15)
leaq 0xe0(%rip), %rsi        # 0x1cd72
movq %rbx, %rdi
callq 0x645c
leaq 0x472(%rip), %rsi       # 0x1d113
movq %rbx, %rdi
callq 0x648c
testq %r14, %r14
je 0x1cd07
movq %r14, %rdi
callq 0x6ad8
movq 0x18(%rax), %rcx
movq %rcx, 0x18(%r15)
movb 0x22(%rax), %al
andb $0x1, %al
movb 0x22(%r15), %cl
andb $-0x2, %cl
orb %al, %cl
movb %cl, 0x22(%r15)
movq %rbx, %rdi
callq 0x5e38
jmp 0x1cced
leaq 0x2235f(%rip), %rdi     # 0x3f040
movq %rbx, %rsi
callq 0x829e
jmp 0x1cce9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x22343(%rip), %rdi     # 0x3f040
movq %r15, %rsi
callq 0x829e
jmp 0x1cd05
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5fd8
movq %rbx, %rdi
movl $0x10, %esi
callq 0x62e7
callq 0x2e244
testq %rax, %rax
je 0x1cd5c
movq %rax, %r14
movq 0xb8(%rax), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1d7e4
movq 0xc0(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1d7e4
movq 0xc8(%r14), %rdx
jmp 0x1cd60
movq 0x18(%r15), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1d7e4
jmp 0x1cced