// File: /workspace/github_c_makefile_star2_O3/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 0x8cbc
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x1d4de
testq %rbx, %rbx
je 0x1d4ef
cmpq $0x0, 0x42faf(%rip)     # 0x603d8
jne 0x1d43a
movq %rbx, %rdi
callq 0x6aaf
movq %rax, 0x42f9e(%rip)     # 0x603d8
cmpq $0x0, 0x42f9e(%rip)     # 0x603e0
jne 0x1d453
movq %rbx, %rdi
callq 0x6a8b
movq %rax, 0x42f8d(%rip)     # 0x603e0
movq %rbx, %rdi
movl $0x28, %esi
callq 0x64db
movq %rax, %r15
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x1d4fa
testq %r15, %r15
je 0x1d4ef
movw $0x8000, 0x20(%r15)     # imm = 0x8000
leaq 0x42b22(%rip), %rax     # 0x5ffa8
movq %rax, 0x18(%r15)
andb $-0x2, 0x22(%r15)
leaq 0xe0(%rip), %rsi        # 0x1d576
movq %rbx, %rdi
callq 0x647b
leaq 0x43c(%rip), %rsi       # 0x1d8e1
movq %rbx, %rdi
callq 0x64ab
testq %r14, %r14
je 0x1d50b
movq %r14, %rdi
callq 0x6af7
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 0x5e54
jmp 0x1d4f1
leaq 0x21beb(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x1d4ed
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x21bcf(%rip), %rdi     # 0x3f0d0
movq %r15, %rsi
callq 0x8294
jmp 0x1d509
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5ff7
movq %rbx, %rdi
movl $0x10, %esi
callq 0x6306
callq 0x2e91c
testq %rax, %rax
je 0x1d560
movq %rax, %r14
movq 0xb8(%rax), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1dfe8
movq 0xc0(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1dfe8
movq 0xc8(%r14), %rdx
jmp 0x1d564
movq 0x18(%r15), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1dfe8
jmp 0x1d4f1