// File: /workspace/github_c_makefile_star2_O3/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 0x13104
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x24510
testq %rbx, %rbx
je 0x24521
movq %rbx, %rdi
movl $0x68, %esi
callq 0x64db
movq %rax, %r15
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x2452c
testq %r15, %r15
je 0x24521
cmpq $0x0, 0x3bfbe(%rip)     # 0x60440
jne 0x24493
movq %rbx, %rdi
callq 0x6a8b
movq %rax, 0x3bfad(%rip)     # 0x60440
cmpq $0x0, 0x3bfad(%rip)     # 0x60448
jne 0x244ac
movq %rbx, %rdi
callq 0x6aaf
movq %rax, 0x3bf9c(%rip)     # 0x60448
xorps %xmm0, %xmm0
movups %xmm0, 0x51(%r15)
movups %xmm0, 0x48(%r15)
movups %xmm0, 0x38(%r15)
leaq 0x78(%rip), %rsi        # 0x2453d
movq %rbx, %rdi
callq 0x647b
leaq 0xc5(%rip), %rsi        # 0x24599
movq %rbx, %rdi
callq 0x64ab
testq %r14, %r14
je 0x24523
addq $0x38, %r15
movq %r14, %rdi
callq 0x6af7
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 0x5e54
jmp 0x24523
leaq 0x1abb9(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x2451f
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1ab9d(%rip), %rdi     # 0x3f0d0
movq %r15, %rsi
callq 0x8294
jmp 0x2453b