LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_task.c
// Function: lv_task_create_basic
lv_task_t * lv_task_create_basic(void)
{
    lv_task_t * new_task = NULL;
    lv_task_t * tmp;

    /*Create task lists in order of priority from high to low*/
    tmp = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll));

    /*It's the first task*/
    if(NULL == tmp) {
        new_task = lv_ll_ins_head(&LV_GC_ROOT(_lv_task_ll));
        LV_ASSERT_MEM(new_task);
        if(new_task == NULL) return NULL;
    }
    /*Insert the new task to proper place according to its priority*/
    else {
        do {
            if(tmp->prio <= DEF_PRIO) {
                new_task = lv_ll_ins_prev(&LV_GC_ROOT(_lv_task_ll), tmp);
                LV_ASSERT_MEM(new_task);
                if(new_task == NULL) return NULL;
                break;
            }
            tmp = lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), tmp);
        } while(tmp != NULL);

        /*Only too high priority tasks were found. Add the task to the end*/
        if(tmp == NULL) {
            new_task = lv_ll_ins_tail(&LV_GC_ROOT(_lv_task_ll));
            LV_ASSERT_MEM(new_task);
            if(new_task == NULL) return NULL;
        }
    }

    new_task->period  = DEF_PERIOD;
    new_task->task_cb = NULL;
    new_task->prio    = DEF_PRIO;

    new_task->once     = 0;
    new_task->last_run = lv_tick_get();

    new_task->user_data = NULL;

    task_created = true;

    return new_task;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3f4a7(%rip), %rdi     # 0x684e0
callq 0x2a35c
testq %rax, %rax
je 0x2908c
leaq 0x3f496(%rip), %rbx     # 0x684e0
testb $0x4, 0x18(%rax)
je 0x290b8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2a448
testq %rax, %rax
jne 0x2904a
leaq 0x3f479(%rip), %rdi     # 0x684e0
callq 0x2a378
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
jne 0x290d6
leaq 0x1604e(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x2908a
leaq 0x3f44d(%rip), %rdi     # 0x684e0
callq 0x2a2a0
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
jne 0x290d6
leaq 0x16022(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x290b6
leaq 0x3f421(%rip), %rdi     # 0x684e0
movq %rax, %rsi
callq 0x2a2e9
movq %rax, %rbx
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x29114
testq %rbx, %rbx
je 0x29107
movl $0x1f4, (%rbx)          # imm = 0x1F4
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
movb 0x18(%rbx), %al
andb $-0x10, %al
orb $0x3, %al
movb %al, 0x18(%rbx)
callq 0x87b6
movl %eax, 0x4(%rbx)
movq %r14, 0x10(%rbx)
movb $0x1, 0x373b5(%rip)     # 0x604ba
jmp 0x29109
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x15fb5(%rip), %rdi     # 0x3f0d0
movq %rbx, %rsi
callq 0x8294
jmp 0x29123
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_task.c
// Function: lv_task_create
lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data)
{
    lv_task_t * new_task = lv_task_create_basic();
    LV_ASSERT_MEM(new_task);
    if(new_task == NULL) return NULL;

    lv_task_set_cb(new_task, task_cb);
    lv_task_set_period(new_task, period);
    lv_task_set_prio(new_task, prio);
    new_task->user_data = user_data;

    return new_task;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
callq 0x2902e
movq %rax, %r14
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x29174
testq %r14, %r14
je 0x29168
movq %r12, 0x8(%r14)
movl %r15d, (%r14)
movzbl %bpl, %esi
movq %r14, %rdi
callq 0x2918d
movq %rbx, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15f55(%rip), %rdi     # 0x3f0d0
movq %r14, %rsi
callq 0x8294
jmp 0x29183
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_task.c
// Function: lv_task_set_prio
void lv_task_set_prio(lv_task_t * task, lv_task_prio_t prio)
{
    if(task->prio == prio) return;

    /*Find the tasks with new priority*/
    lv_task_t * i;
    LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i)
    {
        if(i->prio <= prio) {
            if(i != task) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), task, i);
            break;
        }
    }

    /*There was no such a low priority so far then add the node to the tail*/
    if(i == NULL) {
        lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), task, NULL);
    }

    task->prio = prio;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movb 0x18(%rdi), %al
andb $0x7, %al
cmpb %bpl, %al
je 0x29207
movq %rdi, %rbx
leaq 0x3f339(%rip), %rdi     # 0x684e0
callq 0x2a35c
testq %rax, %rax
je 0x291d3
leaq 0x3f328(%rip), %r14     # 0x684e0
movb 0x18(%rax), %cl
andb $0x7, %cl
cmpb %bpl, %cl
jbe 0x291e1
movq %r14, %rdi
movq %rax, %rsi
callq 0x2a448
testq %rax, %rax
jne 0x291b8
leaq 0x3f306(%rip), %rdi     # 0x684e0
movq %rbx, %rsi
xorl %edx, %edx
jmp 0x291f3
cmpq %rbx, %rax
je 0x291f8
leaq 0x3f2f3(%rip), %rdi     # 0x684e0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2a570
movb 0x18(%rbx), %al
andb $0x7, %bpl
andb $-0x8, %al
orb %bpl, %al
movb %al, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_is_ready
bool lv_fs_is_ready(char letter)
{
    lv_fs_drv_t * drv = lv_fs_get_drv(letter);

    if(drv == NULL) return false; /*An unknown driver in not ready*/

    if(drv->ready_cb == NULL) return true; /*Assume the driver is always ready if no handler provided*/

    return drv->ready_cb(drv);
}

// Assembly:
pushq %rax
callq 0x2929f
testq %rax, %rax
je 0x29297
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x2929b
movq %rax, %rdi
popq %rax
jmpq *%rcx
xorl %eax, %eax
jmp 0x2929d
movb $0x1, %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_open
lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode)
{
    file_p->drv    = NULL;
    file_p->file_d = NULL;

    if(path == NULL) return LV_FS_RES_INV_PARAM;

    char letter = path[0];

    file_p->drv = lv_fs_get_drv(letter);

    if(file_p->drv == NULL) {
        file_p->file_d = NULL;
        return LV_FS_RES_NOT_EX;
    }

    if(file_p->drv->ready_cb != NULL) {
        if(file_p->drv->ready_cb(file_p->drv) == false) {
            file_p->drv    = NULL;
            file_p->file_d = NULL;
            return LV_FS_RES_HW_ERR;
        }
    }

    file_p->file_d = lv_mem_alloc(file_p->drv->file_size);
    LV_ASSERT_MEM(file_p->file_d);
    if(file_p->file_d == NULL) {
        file_p->drv = NULL;
        return LV_FS_RES_OUT_OF_MEM; /* Out of memory */
    }

    if(file_p->drv->open_cb == NULL) {
        return LV_FS_RES_NOT_IMP;
    }

    const char * real_path = lv_fs_get_real_path(path);
    lv_fs_res_t res        = file_p->drv->open_cb(file_p->drv, file_p->file_d, real_path, mode);

    if(res != LV_FS_RES_OK) {
        lv_mem_free(file_p->file_d);
        file_p->file_d = NULL;
        file_p->drv    = NULL;
    }

    return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
testq %rsi, %rsi
je 0x2936e
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movsbl (%rsi), %edi
callq 0x2929f
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x29373
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x2931d
movq %rax, %rdi
callq *%rcx
testb %al, %al
je 0x2938d
movq 0x8(%rbx), %rax
movzwl 0x2(%rax), %edi
callq 0x29f85
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x80e4
movq (%rbx), %rsi
testb %al, %al
je 0x2937f
testq %rsi, %rsi
je 0x293b7
movq 0x8(%rbx), %rdi
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x293c4
incq %r14
movabsq $0x200000000801, %rcx   # imm = 0x200000000801
movzbl (%r14), %edx
addl $-0x2f, %edx
cmpl $0x2d, %edx
ja 0x29398
btq %rdx, %rcx
jae 0x29398
incq %r14
jmp 0x29357
movb $0xb, %bpl
jmp 0x293cb
movq $0x0, (%rbx)
movb $0x3, %bpl
jmp 0x293cb
leaq 0x15d4a(%rip), %rdi     # 0x3f0d0
callq 0x8294
jmp 0x2938b
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movb $0x1, %bpl
jmp 0x293cb
movzbl %bpl, %ecx
movq %r14, %rdx
callq *%rax
testb %al, %al
je 0x293c9
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x2a006
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x293cb
movq $0x0, 0x8(%rbx)
movb $0xa, %bpl
jmp 0x293cb
movb $0x9, %bpl
jmp 0x293cb
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_close
lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p)
{
    if(file_p->drv == NULL) {
        return LV_FS_RES_INV_PARAM;
    }

    if(file_p->drv->close_cb == NULL) {
        return LV_FS_RES_NOT_IMP;
    }

    lv_fs_res_t res = file_p->drv->close_cb(file_p->drv, file_p->file_d);

    lv_mem_free(file_p->file_d); /*Clean up*/
    file_p->file_d = NULL;
    file_p->drv    = NULL;
    file_p->file_d = NULL;

    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x29403
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x29407
movq (%rbx), %rsi
callq *%rax
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x2a006
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl %ebp, %eax
jmp 0x29409
movb $0xb, %al
jmp 0x29409
movb $0x9, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_remove
lv_fs_res_t lv_fs_remove(const char * path)
{
    if(path == NULL) return LV_FS_RES_INV_PARAM;
    lv_fs_drv_t * drv = NULL;

    char letter = path[0];

    drv = lv_fs_get_drv(letter);
    if(drv == NULL) return LV_FS_RES_NOT_EX;
    if(drv->ready_cb != NULL) {
        if(drv->ready_cb(drv) == false) return LV_FS_RES_HW_ERR;
    }

    if(drv->remove_cb == NULL) return LV_FS_RES_NOT_IMP;

    const char * real_path = lv_fs_get_real_path(path);
    lv_fs_res_t res        = drv->remove_cb(drv, real_path);

    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2946e
movq %rdi, %rbx
movsbl (%rdi), %edi
callq 0x2929f
testq %rax, %rax
je 0x29472
movq %rax, %r14
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x29442
movq %r14, %rdi
callq *%rax
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x29487
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x29485
incq %rbx
movabsq $0x200000000801, %rcx   # imm = 0x200000000801
movzbl (%rbx), %edx
addl $-0x2f, %edx
cmpl $0x2d, %edx
ja 0x29476
btq %rdx, %rcx
jae 0x29476
incq %rbx
jmp 0x29458
movb $0xb, %al
jmp 0x29487
movb $0x3, %al
jmp 0x29487
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movb $0x9, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_read
lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br)
{
    if(br != NULL) *br = 0;
    if(file_p->drv == NULL) return LV_FS_RES_INV_PARAM;
    if(file_p->drv->read_cb == NULL) return LV_FS_RES_NOT_IMP;

    uint32_t br_tmp = 0;
    lv_fs_res_t res = file_p->drv->read_cb(file_p->drv, file_p->file_d, buf, btr, &br_tmp);
    if(br != NULL) *br = br_tmp;

    return res;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movl %edx, %ecx
movq %rsi, %rdx
testq %rbx, %rbx
je 0x294a7
movl $0x0, (%rbx)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x294db
movq 0x28(%rax), %r9
testq %r9, %r9
je 0x294df
leaq 0xc(%rsp), %r8
movl $0x0, (%r8)
movq (%rdi), %rsi
movq %rax, %rdi
callq *%r9
testq %rbx, %rbx
je 0x294e1
movl 0xc(%rsp), %ecx
movl %ecx, (%rbx)
jmp 0x294e1
movb $0xb, %al
jmp 0x294e1
movb $0x9, %al
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_write
lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw)
{
    if(bw != NULL) *bw = 0;

    if(file_p->drv == NULL) {
        return LV_FS_RES_INV_PARAM;
    }

    if(file_p->drv->write_cb == NULL) {
        return LV_FS_RES_NOT_IMP;
    }

    uint32_t bw_tmp = 0;
    lv_fs_res_t res = file_p->drv->write_cb(file_p->drv, file_p->file_d, buf, btw, &bw_tmp);
    if(bw != NULL) *bw = bw_tmp;

    return res;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movl %edx, %ecx
movq %rsi, %rdx
testq %rbx, %rbx
je 0x294ff
movl $0x0, (%rbx)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x29533
movq 0x30(%rax), %r9
testq %r9, %r9
je 0x29537
leaq 0xc(%rsp), %r8
movl $0x0, (%r8)
movq (%rdi), %rsi
movq %rax, %rdi
callq *%r9
testq %rbx, %rbx
je 0x29539
movl 0xc(%rsp), %ecx
movl %ecx, (%rbx)
jmp 0x29539
movb $0xb, %al
jmp 0x29539
movb $0x9, %al
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_size
lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size)
{
    if(file_p->drv == NULL) {
        return LV_FS_RES_INV_PARAM;
    }

    if(file_p->drv->size_cb == NULL) return LV_FS_RES_NOT_IMP;

    if(size == NULL) return LV_FS_RES_INV_PARAM;

    lv_fs_res_t res = file_p->drv->size_cb(file_p->drv, file_p->file_d, size);

    return res;
}

// Assembly:
movq %rdi, %rcx
movq 0x8(%rdi), %rdi
movb $0xb, %al
testq %rdi, %rdi
je 0x295cb
movq 0x50(%rdi), %r8
testq %r8, %r8
je 0x295cc
movq %rsi, %rdx
testq %rsi, %rsi
je 0x295cb
movq (%rcx), %rsi
jmpq *%r8
retq
movb $0x9, %al
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_rename
lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname)
{
    if(!oldname || !newname) return LV_FS_RES_INV_PARAM;

    char letter = oldname[0];

    lv_fs_drv_t * drv = lv_fs_get_drv(letter);

    if(!drv) {
        return LV_FS_RES_NOT_EX;
    }

    if(drv->ready_cb != NULL) {
        if(drv->ready_cb(drv) == false) {
            return LV_FS_RES_HW_ERR;
        }
    }

    if(drv->rename_cb == NULL) return LV_FS_RES_NOT_IMP;

    const char * old_real = lv_fs_get_real_path(oldname);
    const char * new_real = lv_fs_get_real_path(newname);

    lv_fs_res_t res = drv->rename_cb(drv, old_real, new_real);

    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
movb $0xb, %al
orb %cl, %dl
jne 0x2966d
movq %rsi, %rbx
movq %rdi, %r14
movsbl (%rdi), %edi
callq 0x2929f
testq %rax, %rax
je 0x29667
movq %rax, %r15
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x29616
movq %r15, %rdi
callq *%rax
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x2966d
movq 0x58(%r15), %rax
testq %rax, %rax
je 0x2966b
incq %r14
movabsq $0x200000000801, %rcx   # imm = 0x200000000801
movzbl (%r14), %edx
addl $-0x2f, %edx
cmpl $0x2d, %edx
ja 0x29649
btq %rdx, %rcx
jae 0x29649
incq %r14
jmp 0x2962c
btq %rdx, %rcx
jae 0x29657
incq %rbx
movzbl (%rbx), %edx
addl $-0x2f, %edx
cmpl $0x2d, %edx
jbe 0x29643
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
movb $0x3, %al
jmp 0x2966d
movb $0x9, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_dir_open
lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path)
{
    if(path == NULL) return LV_FS_RES_INV_PARAM;

    char letter = path[0];

    rddir_p->drv = lv_fs_get_drv(letter);

    if(rddir_p->drv == NULL) {
        rddir_p->dir_d = NULL;
        return LV_FS_RES_NOT_EX;
    }

    rddir_p->dir_d = lv_mem_alloc(rddir_p->drv->rddir_size);
    LV_ASSERT_MEM(rddir_p->dir_d);
    if(rddir_p->dir_d == NULL) {
        rddir_p->dir_d = NULL;
        return LV_FS_RES_OUT_OF_MEM; /* Out of memory */
    }

    if(rddir_p->drv->dir_open_cb == NULL) {
        return LV_FS_RES_NOT_IMP;
    }

    const char * real_path = lv_fs_get_real_path(path);

    lv_fs_res_t res = rddir_p->drv->dir_open_cb(rddir_p->drv, rddir_p->dir_d, real_path);

    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x296e3
movq %rsi, %rbx
movq %rdi, %r14
movsbl (%rsi), %edi
callq 0x2929f
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x296e7
movzwl 0x4(%rax), %edi
callq 0x29f85
movq %rax, (%r14)
movq %rax, %rdi
callq 0x80e4
movq (%r14), %rsi
testb %al, %al
je 0x296f2
testq %rsi, %rsi
je 0x2970c
movq 0x8(%r14), %rdi
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0x29710
incq %rbx
movabsq $0x200000000801, %rcx   # imm = 0x200000000801
movzbl (%rbx), %edx
addl $-0x2f, %edx
cmpl $0x2d, %edx
ja 0x29700
btq %rdx, %rcx
jae 0x29700
incq %rbx
jmp 0x296cd
movb $0xb, %al
jmp 0x29712
movq $0x0, (%r14)
movb $0x3, %al
jmp 0x29712
leaq 0x159d7(%rip), %rdi     # 0x3f0d0
callq 0x8294
jmp 0x296fe
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movb $0xa, %al
jmp 0x29712
movb $0x9, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_dir_read
lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn)
{
    if(rddir_p->drv == NULL || rddir_p->dir_d == NULL) {
        fn[0] = '\0';
        return LV_FS_RES_INV_PARAM;
    }

    if(rddir_p->drv->dir_read_cb == NULL) {
        return LV_FS_RES_NOT_IMP;
    }

    lv_fs_res_t res = rddir_p->drv->dir_read_cb(rddir_p->drv, rddir_p->dir_d, fn);

    return res;
}

// Assembly:
movq %rsi, %rdx
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x2973c
movq (%rax), %rsi
testq %rsi, %rsi
je 0x2973c
movq 0x70(%rdi), %rax
testq %rax, %rax
je 0x29742
jmpq *%rax
movb $0x0, (%rdx)
movb $0xb, %al
retq
movb $0x9, %al
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_dir_close
lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p)
{
    if(rddir_p->drv == NULL || rddir_p->dir_d == NULL) {
        return LV_FS_RES_INV_PARAM;
    }

    lv_fs_res_t res;

    if(rddir_p->drv->dir_close_cb == NULL) {
        res = LV_FS_RES_NOT_IMP;
    } else {
        res = rddir_p->drv->dir_close_cb(rddir_p->drv, rddir_p->dir_d);
    }

    lv_mem_free(rddir_p->dir_d); /*Clean up*/
    rddir_p->dir_d = NULL;
    rddir_p->drv   = NULL;
    rddir_p->dir_d = NULL;

    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movb $0xb, %bpl
testq %rdi, %rdi
je 0x29782
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x29782
movq 0x78(%rdi), %rax
testq %rax, %rax
je 0x29771
callq *%rax
movl %eax, %ebp
movq (%rbx), %rsi
jmp 0x29774
movb $0x9, %bpl
movq %rsi, %rdi
callq 0x2a006
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_free_space
lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p)
{
    lv_fs_drv_t * drv = lv_fs_get_drv(letter);

    if(drv == NULL) {
        return LV_FS_RES_INV_PARAM;
    }

    lv_fs_res_t res;

    if(drv->free_space_cb == NULL) {
        res = LV_FS_RES_NOT_IMP;
    } else {
        uint32_t total_tmp = 0;
        uint32_t free_tmp  = 0;
        res                = drv->free_space_cb(drv, &total_tmp, &free_tmp);

        if(total_p != NULL) *total_p = total_tmp;
        if(free_p != NULL) *free_p = free_tmp;
    }

    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0x2929f
testq %rax, %rax
je 0x297d3
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0x297d7
xorl %edi, %edi
leaq 0x4(%rsp), %rsi
movl %edi, (%rsi)
movq %rsp, %rdx
movl %edi, (%rdx)
movq %rax, %rdi
callq *%rcx
testq %r14, %r14
je 0x297c7
movl 0x4(%rsp), %ecx
movl %ecx, (%r14)
testq %rbx, %rbx
je 0x297d9
movl (%rsp), %ecx
movl %ecx, (%rbx)
jmp 0x297d9
movb $0xb, %al
jmp 0x297d9
movb $0x9, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_drv_register
void lv_fs_drv_register(lv_fs_drv_t * drv_p)
{
    /*Save the new driver*/
    lv_fs_drv_t * new_drv;
    new_drv = lv_ll_ins_head(&LV_GC_ROOT(_lv_drv_ll));
    LV_ASSERT_MEM(new_drv);
    if(new_drv == NULL) return;

    memcpy(new_drv, drv_p, sizeof(lv_fs_drv_t));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3ed16(%rip), %rdi     # 0x68528
callq 0x2a2a0
movq %rax, %r14
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x29841
testq %r14, %r14
je 0x29839
movl $0x10, %ecx
movq %r14, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x15888(%rip), %rdi     # 0x3f0d0
movq %r14, %rsi
callq 0x8294
jmp 0x29850
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_get_letters
char * lv_fs_get_letters(char * buf)
{
    lv_fs_drv_t * drv;
    uint8_t i = 0;

    LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv)
    {
        buf[i] = drv->letter;
        i++;
    }

    buf[i] = '\0';

    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x3ecc7(%rip), %rdi     # 0x68528
callq 0x2a35c
testq %rax, %rax
je 0x29898
xorl %r15d, %r15d
leaq 0x3ecb3(%rip), %r14     # 0x68528
movb (%rax), %cl
movzbl %r15b, %r15d
movb %cl, (%rbx,%r15)
incb %r15b
movq %r14, %rdi
movq %rax, %rsi
callq 0x2a448
testq %rax, %rax
jne 0x29875
movzbl %r15b, %eax
jmp 0x2989a
xorl %eax, %eax
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_get_ext
const char * lv_fs_get_ext(const char * fn)
{
    size_t i;
    for(i = strlen(fn); i > 0; i--) {
        if(fn[i] == '.') {
            return &fn[i + 1];
        } else if(fn[i] == '/' || fn[i] == '\\') {
            return ""; /*No extension if a '\' or '/' found*/
        }
    }

    return ""; /*Empty string if no '.' in the file name. */
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2070
movq %rax, %rcx
leaq 0x19d03(%rip), %rax     # 0x435bd
testq %rcx, %rcx
je 0x298e6
leaq (%rcx,%rbx), %rdx
incq %rdx
movzbl -0x1(%rdx), %esi
cmpl $0x5c, %esi
je 0x298e6
cmpl $0x2f, %esi
je 0x298e6
cmpl $0x2e, %esi
je 0x298e3
decq %rdx
decq %rcx
jne 0x298c6
jmp 0x298e6
movq %rdx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_up
char * lv_fs_up(char * path)
{
    size_t len = strlen(path);
    if(len == 0) return path;

    len--; /*Go before the trailing '\0'*/

    /*Ignore trailing '/' or '\'*/
    while(path[len] == '/' || path[len] == '\\') {
        path[len] = '\0';
        if(len > 0)
            len--;
        else
            return path;
    }

    size_t i;
    for(i = len; i > 0; i--) {
        if(path[i] == '/' || path[i] == '\\') break;
    }

    if(i > 0) path[i] = '\0';

    return path;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2070
testq %rax, %rax
je 0x29911
decq %rax
movzbl (%rbx,%rax), %ecx
cmpl $0x2f, %ecx
je 0x29907
cmpl $0x5c, %ecx
jne 0x29916
movb $0x0, (%rbx,%rax)
addq $-0x1, %rax
jb 0x298f9
movq %rbx, %rax
popq %rbx
retq
testq %rax, %rax
je 0x29911
movzbl (%rbx,%rax), %ecx
cmpl $0x2f, %ecx
je 0x29930
cmpl $0x5c, %ecx
je 0x29930
decq %rax
jne 0x2991b
jmp 0x29911
movb $0x0, (%rbx,%rax)
jmp 0x29911
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_fs.c
// Function: lv_fs_get_last
const char * lv_fs_get_last(const char * path)
{
    size_t len = strlen(path);
    if(len == 0) return path;

    len--; /*Go before the trailing '\0'*/

    /*Ignore trailing '/' or '\'*/
    while(path[len] == '/' || path[len] == '\\') {
        if(len > 0)
            len--;
        else
            return path;
    }

    size_t i;
    for(i = len; i > 0; i--) {
        if(path[i] == '/' || path[i] == '\\') break;
    }

    /*No '/' or '\' in the path so return with path itself*/
    if(i == 0) return path;

    return &path[i + 1];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2070
testq %rax, %rax
je 0x29977
movzbl -0x1(%rbx,%rax), %ecx
cmpl $0x2f, %ecx
je 0x29953
cmpl $0x5c, %ecx
jne 0x2996c
decq %rax
jne 0x29944
jmp 0x29977
movzbl -0x1(%rbx,%rax), %ecx
cmpl $0x2f, %ecx
je 0x29974
cmpl $0x5c, %ecx
je 0x29974
decq %rax
cmpq $0x1, %rax
jne 0x2995a
jmp 0x29977
addq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_init
void lv_anim_init(lv_anim_t * a)
{
    memset(a, 0, sizeof(lv_anim_t));
    a->time    = 500;
    a->start   = 0;
    a->end     = 100;
    a->path_cb = lv_anim_path_linear;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x30(%rdi)
movw $0x1f4, 0x28(%rdi)      # imm = 0x1F4
movl $0x64, 0x24(%rdi)
leaq 0x5(%rip), %rax         # 0x29b88
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_create
void lv_anim_create(lv_anim_t * a)
{
    LV_LOG_TRACE("animation create started")
    /* Do not let two animations for the  same 'var' with the same 'fp'*/
    if(a->exec_cb != NULL) lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/

    /*Add the new animation to the animation linked list*/
    lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll));
    LV_ASSERT_MEM(new_anim);
    if(new_anim == NULL) return;

    /*Initialize the animation descriptor*/
    a->playback_now = 0;
    memcpy(new_anim, a, sizeof(lv_anim_t));

    /*Set the start value*/
    if(new_anim->exec_cb) new_anim->exec_cb(new_anim->var, new_anim->start);

    /* Creating an animation changed the linked list.
     * It's important if it happens in a ready callback. (see `anim_task`)*/
    anim_list_changed = true;

    LV_LOG_TRACE("animation created")
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x29bcc
movq (%rbx), %rdi
callq 0x29c44
leaq 0x3e985(%rip), %rdi     # 0x68558
callq 0x2a2a0
movq %rax, %r14
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x29c33
testq %r14, %r14
je 0x29c2b
andb $-0x5, 0x30(%rbx)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm0, (%r14)
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r14)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x29c24
movq (%r14), %rdi
movswl 0x20(%r14), %esi
callq *%rax
movb $0x1, 0x36895(%rip)     # 0x604c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x15496(%rip), %rdi     # 0x3f0d0
movq %r14, %rsi
callq 0x8294
jmp 0x29c42
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_del
bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb)
{
    lv_anim_t * a;
    lv_anim_t * a_next;
    bool del = false;
    a        = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
    while(a != NULL) {
        /*'a' might be deleted, so get the next object while 'a' is valid*/
        a_next = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);

        if(a->var == var && (a->exec_cb == exec_cb || exec_cb == NULL)) {
            lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a);
            lv_mem_free(a);
            anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in
                                         the linked list*/
            del = true;
        }

        a = a_next;
    }

    return del;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3e8fc(%rip), %rdi     # 0x68558
callq 0x2a35c
testq %rax, %rax
je 0x29cb9
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x3e8e6(%rip), %r15     # 0x68558
movq %r15, %rdi
movq %r12, %rsi
callq 0x2a448
movq %rax, %r13
cmpq %r14, (%r12)
jne 0x29caf
testq %rbx, %rbx
je 0x29c92
cmpq %rbx, 0x8(%r12)
jne 0x29caf
movq %r15, %rdi
movq %r12, %rsi
callq 0x2a3c2
movq %r12, %rdi
callq 0x2a006
movb $0x1, 0x36814(%rip)     # 0x604c0
movb $0x1, %bpl
movq %r13, %r12
testq %r13, %r13
jne 0x29c72
jmp 0x29cbb
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_count_running
uint16_t lv_anim_count_running(void)
{
    uint16_t cnt = 0;
    lv_anim_t * a;
    LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++;

    return cnt++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3e87d(%rip), %rdi     # 0x68558
callq 0x2a35c
xorl %ebx, %ebx
testq %rax, %rax
je 0x29d00
leaq 0x3e86a(%rip), %r14     # 0x68558
incl %ebx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2a448
testq %rax, %rax
jne 0x29cee
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_path_ease_in
lv_anim_value_t lv_anim_path_ease_in(const lv_anim_t * a)
{
    /*Calculate the current step*/
    uint32_t t;
    if(a->time == a->act_time)
        t = 1024;
    else
        t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;

    int32_t step = lv_bezier3(t, 0, 1, 1, 1024);

    int32_t new_value;
    new_value = (int32_t)step * (a->end - a->start);
    new_value = new_value >> 10;
    new_value += a->start;

    return (lv_anim_value_t)new_value;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x28(%rdi), %ecx
movswl 0x2a(%rdi), %eax
movl $0x400, %edi            # imm = 0x400
cmpl %eax, %ecx
je 0x29d54
shll $0xa, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %edi
xorl %esi, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x400, %r8d            # imm = 0x400
callq 0x2b552
movl 0x20(%rbx), %ecx
movl 0x24(%rbx), %edx
subl %ecx, %edx
imull %edx, %eax
shrl $0xa, %eax
addl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_path_ease_in_out
lv_anim_value_t lv_anim_path_ease_in_out(const lv_anim_t * a)
{
    /*Calculate the current step*/

    uint32_t t;
    if(a->time == a->act_time)
        t = 1024;
    else
        t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;

    int32_t step = lv_bezier3(t, 0, 100, 924, 1024);

    int32_t new_value;
    new_value = (int32_t)step * (a->end - a->start);
    new_value = new_value >> 10;
    new_value += a->start;

    return (lv_anim_value_t)new_value;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x28(%rdi), %ecx
movswl 0x2a(%rdi), %eax
movl $0x400, %edi            # imm = 0x400
cmpl %eax, %ecx
je 0x29de2
shll $0xa, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %edi
xorl %esi, %esi
movl $0x64, %edx
movl $0x39c, %ecx            # imm = 0x39C
movl $0x400, %r8d            # imm = 0x400
callq 0x2b552
movl 0x20(%rbx), %ecx
movl 0x24(%rbx), %edx
subl %ecx, %edx
imull %edx, %eax
shrl $0xa, %eax
addl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_path_overshoot
lv_anim_value_t lv_anim_path_overshoot(const lv_anim_t * a)
{
    /*Calculate the current step*/

    uint32_t t;
    if(a->time == a->act_time)
        t = 1024;
    else
        t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;

    int32_t step = lv_bezier3(t, 0, 600, 1300, 1024);

    int32_t new_value;
    new_value = (int32_t)step * (a->end - a->start);
    new_value = new_value >> 10;
    new_value += a->start;

    return (lv_anim_value_t)new_value;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x28(%rdi), %ecx
movswl 0x2a(%rdi), %eax
movl $0x400, %edi            # imm = 0x400
cmpl %eax, %ecx
je 0x29e29
shll $0xa, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %edi
xorl %esi, %esi
movl $0x258, %edx            # imm = 0x258
movl $0x514, %ecx            # imm = 0x514
movl $0x400, %r8d            # imm = 0x400
callq 0x2b552
movl 0x20(%rbx), %ecx
movl 0x24(%rbx), %edx
subl %ecx, %edx
imull %edx, %eax
shrl $0xa, %eax
addl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_anim.c
// Function: lv_anim_path_bounce
lv_anim_value_t lv_anim_path_bounce(const lv_anim_t * a)
{
    /*Calculate the current step*/
    uint32_t t;
    if(a->time == a->act_time)
        t = 1024;
    else
        t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;

    int32_t diff = (a->end - a->start);

    /*3 bounces has 5 parts: 3 down and 2 up. One part is t / 5 long*/

    if(t < 408) {
        /*Go down*/
        t = (t * 2500) >> 10; /*[0..1024] range*/
    } else if(t >= 408 && t < 614) {
        /*First bounce back*/
        t -= 408;
        t    = t * 5; /*to [0..1024] range*/
        t    = 1024 - t;
        diff = diff / 6;
    } else if(t >= 614 && t < 819) {
        /*Fall back*/
        t -= 614;
        t    = t * 5; /*to [0..1024] range*/
        diff = diff / 6;
    } else if(t >= 819 && t < 921) {
        /*Second bounce back*/
        t -= 819;
        t    = t * 10; /*to [0..1024] range*/
        t    = 1024 - t;
        diff = diff / 16;
    } else if(t >= 921 && t <= 1024) {
        /*Fall back*/
        t -= 921;
        t    = t * 10; /*to [0..1024] range*/
        diff = diff / 16;
    }

    if(t > 1024) t = 1024;

    int32_t step = lv_bezier3(t, 1024, 1024, 800, 0);

    int32_t new_value;
    new_value = (int32_t)step * diff;
    new_value = new_value >> 10;
    new_value = a->end - new_value;

    return (lv_anim_value_t)new_value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rcx
movzwl 0x28(%rdi), %esi
movswl 0x2a(%rdi), %eax
cmpl %eax, %esi
jne 0x29e93
leaq 0x24(%rcx), %rbx
movl 0x24(%rcx), %r14d
subl 0x20(%rcx), %r14d
movl $0x400, %edi            # imm = 0x400
leal (%rdi,%rdi,4), %eax
leal -0x23fa(,%rax,2), %edi
leal 0xf(%r14), %eax
testl %r14d, %r14d
cmovnsl %r14d, %eax
sarl $0x4, %eax
movl %eax, %r14d
jmp 0x29ef7
shll $0xa, %eax
xorl %edx, %edx
divl %esi
movl %eax, %edi
leaq 0x24(%rcx), %rbx
movl 0x24(%rcx), %r14d
subl 0x20(%rcx), %r14d
cmpl $0x197, %eax            # imm = 0x197
ja 0x29eba
imull $0x9c4, %edi, %edi      # imm = 0x9C4
shrl $0xa, %edi
jmp 0x29ef7
cmpl $0x265, %edi            # imm = 0x265
ja 0x29ece
leal (%rdi,%rdi,4), %eax
movl $0xbf8, %edi            # imm = 0xBF8
subl %eax, %edi
jmp 0x29edf
cmpl $0x332, %edi            # imm = 0x332
ja 0x29f2d
leal (%rdi,%rdi,4), %edi
addl $0xfffff402, %edi       # imm = 0xFFFFF402
movslq %r14d, %rax
imulq $0x2aaaaaab, %rax, %r14 # imm = 0x2AAAAAAB
movq %r14, %rax
shrq $0x3f, %rax
shrq $0x20, %r14
addl %eax, %r14d
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %edi
cmovael %eax, %edi
movl $0x400, %esi            # imm = 0x400
movl $0x400, %edx            # imm = 0x400
movl $0x320, %ecx            # imm = 0x320
xorl %r8d, %r8d
callq 0x2b552
imull %r14d, %eax
shrl $0xa, %eax
movl (%rbx), %ecx
subl %eax, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x398, %edi            # imm = 0x398
ja 0x29f46
addl %edi, %edi
leal (%rdi,%rdi,4), %eax
movl $0x23fe, %edi           # imm = 0x23FE
subl %eax, %edi
jmp 0x29e80
cmpl $0x400, %edi            # imm = 0x400
jbe 0x29e76
jmp 0x29ef7
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_mem.c
// Function: lv_mem_realloc
void * lv_mem_realloc(void * data_p, size_t new_size)
{
    /*data_p could be previously freed pointer (in this case it is invalid)*/
    if(data_p != NULL) {
        lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t));
        if(e->header.s.used == 0) {
            data_p = NULL;
        }
    }

    uint32_t old_size = lv_mem_get_size(data_p);
    if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/

#if LV_MEM_CUSTOM == 0
    /* Truncate the memory if the new size is smaller. */
    if(new_size < old_size) {
        lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t));
        ent_trunc(e, new_size);
        return &e->first_data;
    }
#endif

    void * new_p;
    new_p = lv_mem_alloc(new_size);

    if(new_p != NULL && data_p != NULL) {
        /*Copy the old data to the new. Use the smaller size*/
        if(old_size != 0) {
            memcpy(new_p, data_p, LV_MATH_MIN(new_size, old_size));
            lv_mem_free(data_p);
        }
    }

    if(new_p == NULL) LV_LOG_WARN("Couldn't allocate memory");

    return new_p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2a0a6
xorl %eax, %eax
testb $0x1, -0x4(%rdi)
sete %cl
movl $0x0, %ebx
cmovneq %rdi, %rbx
leaq 0x3e446(%rip), %rdx     # 0x684d8
cmpq %rdx, %rbx
sete %dl
orb %cl, %dl
jne 0x2a0aa
movl -0x4(%rdi), %eax
shrl %eax
movq %rdi, %rbx
jmp 0x2a0aa
xorl %ebx, %ebx
xorl %eax, %eax
movl %eax, %r14d
cmpq %rsi, %r14
je 0x2a0f2
jbe 0x2a0bf
leaq -0x4(%rbx), %rdi
callq 0x2a11a
jmp 0x2a0f2
movq %rsi, %rdi
callq 0x29f85
movq %rax, %r15
testq %r14, %r14
je 0x2a0ef
testq %rbx, %rbx
je 0x2a0ef
testq %r15, %r15
je 0x2a0ef
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20f0
movq %rbx, %rdi
callq 0x2a006
movq %r15, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_mem.c
// Function: lv_mem_defrag
void lv_mem_defrag(void)
{
#if LV_MEM_CUSTOM == 0
    lv_mem_ent_t * e_free;
    lv_mem_ent_t * e_next;
    e_free = ent_get_next(NULL);

    while(1) {
        /*Search the next free entry*/
        while(e_free != NULL) {
            if(e_free->header.s.used != 0) {
                e_free = ent_get_next(e_free);
            } else {
                break;
            }
        }

        if(e_free == NULL) return;

        /*Joint the following free entries to the free*/
        e_next = ent_get_next(e_free);
        while(e_next != NULL) {
            if(e_next->header.s.used == 0) {
                e_free->header.s.d_size += e_next->header.s.d_size + sizeof(e_next->header);
            } else {
                break;
            }

            e_next = ent_get_next(e_next);
        }

        if(e_next == NULL) return;

        /*Continue from the lastly checked entry*/
        e_free = e_next;
    }
#endif
}

// Assembly:
movq 0x3e36b(%rip), %rdi     # 0x684d0
testq %rdi, %rdi
je 0x2a1ef
movq 0x3e35b(%rip), %rax     # 0x684d0
leaq 0x8000(%rax), %rcx
movq %rdi, %rdx
addq $0x8000, %rdi           # imm = 0x8000
movq %rdx, %rsi
movl (%rsi), %r8d
movl %r8d, %r9d
shrl %r9d
leaq (%rsi,%r9), %rdx
addq $0x4, %rdx
addq %rsi, %r9
addq $0x8, %r9
testb $0x1, %r8b
je 0x2a1b1
movq %rdx, %rsi
cmpq %rdi, %r9
jb 0x2a189
jmp 0x2a1ef
cmpq %rdi, %r9
jae 0x2a1ef
movl (%rdx), %r9d
testb $0x1, %r9b
jne 0x2a186
addl %r9d, %r8d
addl $0x8, %r8d
movl %r8d, (%rsi)
movl (%rdx), %edi
shrl %edi
leaq (%rdx,%rdi), %r9
addq $0x8, %r9
cmpq %rcx, %r9
jae 0x2a1ef
addq %rdi, %rdx
addq $0x4, %rdx
movl (%rdx), %r9d
testb $0x1, %r9b
je 0x2a1bf
movq %rax, %rdi
jmp 0x2a17f
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_mem.c
// Function: lv_mem_monitor
void lv_mem_monitor(lv_mem_monitor_t * mon_p)
{
    /*Init the data*/
    memset(mon_p, 0, sizeof(lv_mem_monitor_t));
#if LV_MEM_CUSTOM == 0
    lv_mem_ent_t * e;
    e = NULL;

    e = ent_get_next(e);

    while(e != NULL) {
        if(e->header.s.used == 0) {
            mon_p->free_cnt++;
            mon_p->free_size += e->header.s.d_size;
            if(e->header.s.d_size > mon_p->free_biggest_size) {
                mon_p->free_biggest_size = e->header.s.d_size;
            }
        } else {
            mon_p->used_cnt++;
        }

        e = ent_get_next(e);
    }
    mon_p->total_size = LV_MEM_SIZE;
    mon_p->used_pct   = 100 - (100U * mon_p->free_size) / mon_p->total_size;
    mon_p->frag_pct   = (uint32_t)mon_p->free_biggest_size * 100U / mon_p->free_size;
    mon_p->frag_pct   = 100 - mon_p->frag_pct;
#endif
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x3e2cb(%rip), %rax     # 0x684d0
testq %rax, %rax
je 0x2a267
xorl %edx, %edx
xorl %ecx, %ecx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
testb $0x1, (%rax,%r9)
jne 0x2a244
incl %esi
movl %esi, 0x4(%rdi)
movl (%rax,%r9), %r10d
shrl %r10d
addl %r10d, %ecx
movl %ecx, 0x8(%rdi)
movl (%rax,%r9), %r10d
shrl %r10d
cmpl %edx, %r10d
jbe 0x2a24b
movl %r10d, 0xc(%rdi)
movl %r10d, %edx
jmp 0x2a24b
incl %r8d
movl %r8d, 0x10(%rdi)
movl (%rax,%r9), %r10d
shrl %r10d
addq %r10, %r9
addq $0x4, %r9
cmpq $0x7ffc, %r9            # imm = 0x7FFC
jl 0x2a216
imull $0x64, %edx, %eax
jmp 0x2a26b
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x8000, (%rdi)         # imm = 0x8000
imull $0x64, %ecx, %edx
shrl $0xf, %edx
movb $0x64, %sil
movb $0x64, %r8b
subb %dl, %r8b
movb %r8b, 0x14(%rdi)
xorl %edx, %edx
divl %ecx
subb %al, %sil
movb %sil, 0x15(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_ins_head
void * lv_ll_ins_head(lv_ll_t * ll_p)
{
    lv_ll_node_t * n_new;

    n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);

    if(n_new != NULL) {
        node_set_prev(ll_p, n_new, NULL);       /*No prev. before the new head*/
        node_set_next(ll_p, n_new, ll_p->head); /*After new comes the old head*/

        if(ll_p->head != NULL) { /*If there is old head then before it goes the new*/
            node_set_prev(ll_p, ll_p->head, n_new);
        }

        ll_p->head = n_new;      /*Set the new head in the dsc.*/
        if(ll_p->tail == NULL) { /*If there is no tail (1. node) set the tail too*/
            ll_p->tail = n_new;
        }
    }

    return n_new;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
addq $0x10, %rdi
callq 0x29f85
testq %rax, %rax
je 0x2a2e7
movl (%rbx), %ecx
movq $0x0, (%rax,%rcx)
movq 0x8(%rbx), %rcx
movl (%rbx), %edx
movq %rcx, 0x8(%rax,%rdx)
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x2a2d8
movl (%rbx), %edx
movq %rax, (%rcx,%rdx)
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x10(%rbx)
jne 0x2a2e7
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_ins_prev
void * lv_ll_ins_prev(lv_ll_t * ll_p, void * n_act)
{
    lv_ll_node_t * n_new;
    lv_ll_node_t * n_prev;

    if(NULL == ll_p || NULL == n_act) return NULL;

    if(lv_ll_get_head(ll_p) == n_act) {
        n_new = lv_ll_ins_head(ll_p);
        if(n_new == NULL) return NULL;
    } else {
        n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
        if(n_new == NULL) return NULL;

        n_prev = lv_ll_get_prev(ll_p, n_act);
        node_set_next(ll_p, n_prev, n_new);
        node_set_prev(ll_p, n_new, n_prev);
        node_set_prev(ll_p, n_act, n_new);
        node_set_next(ll_p, n_new, n_act);
    }

    return n_new;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x2a301
xorl %eax, %eax
jmp 0x2a345
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x8(%rdi)
je 0x2a34d
movl (%r14), %edi
addq $0x10, %rdi
callq 0x29f85
testq %rax, %rax
je 0x2a2fd
movl (%r14), %ecx
movq (%rbx,%rcx), %rdx
testq %rdx, %rdx
je 0x2a332
movq %rax, 0x8(%rdx,%rcx)
movl (%r14), %ecx
movq %rdx, (%rax,%rcx)
movl (%r14), %ecx
movq %rax, (%rbx,%rcx)
movl (%r14), %ecx
movq %rbx, 0x8(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a2a0
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_ins_tail
void * lv_ll_ins_tail(lv_ll_t * ll_p)
{
    lv_ll_node_t * n_new;

    n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
    if(n_new == NULL) return NULL;

    if(n_new != NULL) {
        node_set_next(ll_p, n_new, NULL);       /*No next after the new tail*/
        node_set_prev(ll_p, n_new, ll_p->tail); /*The prev. before new is tho old tail*/
        if(ll_p->tail != NULL) {                /*If there is old tail then the new comes after it*/
            node_set_next(ll_p, ll_p->tail, n_new);
        }

        ll_p->tail = n_new;      /*Set the new tail in the dsc.*/
        if(ll_p->head == NULL) { /*If there is no head (1. node) set the head too*/
            ll_p->head = n_new;
        }
    }

    return n_new;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
addq $0x10, %rdi
callq 0x29f85
testq %rax, %rax
je 0x2a3c0
movl (%rbx), %ecx
movq $0x0, 0x8(%rax,%rcx)
movq 0x10(%rbx), %rcx
movl (%rbx), %edx
movq %rcx, (%rax,%rdx)
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x2a3b1
movl (%rbx), %edx
movq %rax, 0x8(%rcx,%rdx)
movq %rax, 0x10(%rbx)
cmpq $0x0, 0x8(%rbx)
jne 0x2a3c0
movq %rax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_rem
void lv_ll_rem(lv_ll_t * ll_p, void * node_p)
{
    if(lv_ll_get_head(ll_p) == node_p) {
        /*The new head will be the node after 'n_act'*/
        ll_p->head = lv_ll_get_next(ll_p, node_p);
        if(ll_p->head == NULL) {
            ll_p->tail = NULL;
        } else {
            node_set_prev(ll_p, ll_p->head, NULL);
        }
    } else if(lv_ll_get_tail(ll_p) == node_p) {
        /*The new tail will be the  node before 'n_act'*/
        ll_p->tail = lv_ll_get_prev(ll_p, node_p);
        if(ll_p->tail == NULL) {
            ll_p->head = NULL;
        } else {
            node_set_next(ll_p, ll_p->tail, NULL);
        }
    } else {
        lv_ll_node_t * n_prev = lv_ll_get_prev(ll_p, node_p);
        lv_ll_node_t * n_next = lv_ll_get_next(ll_p, node_p);

        node_set_next(ll_p, n_prev, n_next);
        node_set_prev(ll_p, n_next, n_prev);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2a3ea
cmpq %rsi, 0x8(%rdi)
je 0x2a3f0
movl (%rdi), %edx
movq (%rsi,%rdx), %rax
cmpq %rsi, 0x10(%rdi)
je 0x2a409
movq 0x8(%rsi,%rdx), %rcx
testq %rax, %rax
je 0x2a431
movq %rcx, 0x8(%rax,%rdx)
jmp 0x2a433
testq %rsi, %rsi
je 0x2a41c
retq
movl (%rdi), %eax
movq 0x8(%rsi,%rax), %rcx
movq %rcx, 0x8(%rdi)
testq %rcx, %rcx
je 0x2a428
movq $0x0, (%rcx,%rax)
retq
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x2a43f
movq $0x0, 0x8(%rax,%rdx)
retq
movq $0x0, 0x8
movq $0x0, 0x10(%rdi)
retq
xorl %eax, %eax
testq %rcx, %rcx
je 0x2a3ef
movl (%rdi), %edx
movq %rax, (%rcx,%rdx)
retq
movq $0x0, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_clear
void * lv_ll_get_head(const lv_ll_t * ll_p)
{
    void * head = NULL;

    if(ll_p != NULL) {
        head = ll_p->head;
    }

    return head;
}

// Assembly:
testq %rdi, %rdi
je 0x2a4ac
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x2a4a7
testq %rbx, %rbx
je 0x2a489
movl (%rbx), %eax
movq 0x8(%r14,%rax), %r15
jmp 0x2a48c
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a3c2
movq %r14, %rdi
callq 0x2a006
movq %r15, %r14
testq %r15, %r15
jne 0x2a47b
popq %rbx
popq %r14
popq %r15
retq