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

    /*Create the ancestor of image button*/
    lv_obj_t * new_imgbtn = lv_btn_create(par, copy);
    LV_ASSERT_MEM(new_imgbtn);
    if(new_imgbtn == NULL) return NULL;

    /*Allocate the image button type specific extended data*/
    lv_imgbtn_ext_t * ext = lv_obj_allocate_ext_attr(new_imgbtn, sizeof(lv_imgbtn_ext_t));
    LV_ASSERT_MEM(ext);
    if(ext == NULL) return NULL;
    if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_imgbtn);
    if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_imgbtn);

        /*Initialize the allocated 'ext' */
#if LV_IMGBTN_TILED == 0
    memset((void*)ext->img_src, 0, sizeof(ext->img_src));
#else
    memset(ext->img_src_left, 0, sizeof(ext->img_src_left));
    memset(ext->img_src_mid, 0, sizeof(ext->img_src_mid));
    memset(ext->img_src_right, 0, sizeof(ext->img_src_right));
#endif

    ext->act_cf = LV_IMG_CF_UNKNOWN;

    /*The signal and design functions are not copied so set them here*/
    lv_obj_set_signal_cb(new_imgbtn, lv_imgbtn_signal);
    lv_obj_set_design_cb(new_imgbtn, lv_imgbtn_design);

    /*Init the new image button image button*/
    if(copy == NULL) {

    }
    /*Copy an existing image button*/
    else {
        lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
#if LV_IMGBTN_TILED == 0
        memcpy((void*)ext->img_src, copy_ext->img_src, sizeof(ext->img_src));
#else
        memcpy((void*)ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
        memcpy((void*)ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
        memcpy((void*)ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
#endif
        /*Refresh the style with new signal function*/
        lv_obj_refresh_style(new_imgbtn);
    }

    LV_LOG_INFO("image button created");

    return new_imgbtn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
callq 0x130d4
movq %rax, %rbx
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x23db4
testq %rbx, %rbx
je 0x23dc5
movq %rbx, %rdi
movl $0x68, %esi
callq 0x64bc
movq %rax, %r15
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x23dd0
testq %r15, %r15
je 0x23dc5
cmpq $0x0, 0x3c71a(%rip)     # 0x60440
jne 0x23d37
movq %rbx, %rdi
callq 0x6a6c
movq %rax, 0x3c709(%rip)     # 0x60440
cmpq $0x0, 0x3c709(%rip)     # 0x60448
jne 0x23d50
movq %rbx, %rdi
callq 0x6a90
movq %rax, 0x3c6f8(%rip)     # 0x60448
xorps %xmm0, %xmm0
movups %xmm0, 0x51(%r15)
movups %xmm0, 0x48(%r15)
movups %xmm0, 0x38(%r15)
leaq 0x78(%rip), %rsi        # 0x23de1
movq %rbx, %rdi
callq 0x645c
leaq 0xc2(%rip), %rsi        # 0x23e3a
movq %rbx, %rdi
callq 0x648c
testq %r14, %r14
je 0x23dc7
addq $0x38, %r15
movq %r14, %rdi
callq 0x6ad8
movups 0x38(%rax), %xmm0
movups 0x48(%rax), %xmm1
movups %xmm0, (%r15)
movups %xmm1, 0x10(%r15)
movq 0x58(%rax), %rax
movq %rax, 0x20(%r15)
movq %rbx, %rdi
callq 0x5e38
jmp 0x23dc7
leaq 0x1b285(%rip), %rdi     # 0x3f040
movq %rbx, %rsi
callq 0x829e
jmp 0x23dc3
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1b269(%rip), %rdi     # 0x3f040
movq %r15, %rsi
callq 0x829e
jmp 0x23ddf