LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_cut
void lv_txt_cut(char * txt, uint32_t pos, uint32_t len)
{

    size_t old_len = strlen(txt);

    pos = lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/
    len = lv_txt_encoded_get_byte_id(&txt[pos], len);

    /*Copy the second part into the end to make place to text to insert*/
    uint32_t i;
    for(i = pos; i <= old_len - len; i++) {
        txt[i] = txt[i + len];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
callq 0x2070
movq %rax, %r14
movq %rbx, %rdi
movl %r15d, %esi
callq *0x288f5(%rip)          # 0x53640
movl %eax, %r15d
leaq (%rbx,%r15), %rdi
movl %ebp, %esi
callq *0x288e6(%rip)          # 0x53640
movl %eax, %ecx
subq %rcx, %r14
cmpq %r15, %r14
jb 0x2ad80
addl %r15d, %eax
leal 0x1(%r15), %ecx
movl %eax, %edx
movb (%rbx,%rdx), %dl
movb %dl, (%rbx,%r15)
movl %ecx, %r15d
incl %eax
incl %ecx
cmpq %r15, %r14
jae 0x2ad6b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_math.c
// Function: lv_trigo_sin
int16_t lv_trigo_sin(int16_t angle)
{
    int16_t ret = 0;
    angle       = angle % 360;

    if(angle < 0) angle = 360 + angle;

    if(angle < 90) {
        ret = sin0_90_table[angle];
    } else if(angle >= 90 && angle < 180) {
        angle = 180 - angle;
        ret   = sin0_90_table[angle];
    } else if(angle >= 180 && angle < 270) {
        angle = angle - 180;
        ret   = -sin0_90_table[angle];
    } else { /*angle >=270*/
        angle = 360 - angle;
        ret   = -sin0_90_table[angle];
    }

    return ret;
}

// Assembly:
movslq %edi, %rcx
imulq $-0x49f49f49, %rcx, %rax # imm = 0xB60B60B7
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %edx
shrl $0x1f, %edx
sarl $0x8, %eax
addl %edx, %eax
imull $0x168, %eax, %eax      # imm = 0x168
subl %eax, %ecx
leal 0x168(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
cmpw $0x59, %ax
jg 0x2adc5
movswq %ax, %rax
jmp 0x2adda
movswl %ax, %ecx
cmpl $0xb3, %ecx
jg 0x2ade6
movl $0xb4, %ecx
subl %eax, %ecx
movzwl %cx, %eax
leaq 0x1812f(%rip), %rcx     # 0x42f10
movzwl (%rcx,%rax,2), %eax
retq
cmpl $0x10d, %ecx            # imm = 0x10D
jg 0x2adf8
addl $0xffffff4c, %eax       # imm = 0xFFFFFF4C
movzwl %ax, %ecx
jmp 0x2ae02
movl $0x168, %ecx            # imm = 0x168
subl %eax, %ecx
movzwl %cx, %ecx
leaq 0x18107(%rip), %rdx     # 0x42f10
xorl %eax, %eax
subw (%rdx,%rcx,2), %ax
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_math.c
// Function: lv_bezier3
int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3)
{
    uint32_t t_rem  = 1024 - t;
    uint32_t t_rem2 = (t_rem * t_rem) >> 10;
    uint32_t t_rem3 = (t_rem2 * t_rem) >> 10;
    uint32_t t2     = (t * t) >> 10;
    uint32_t t3     = (t2 * t) >> 10;

    uint32_t v1 = ((uint32_t)t_rem3 * u0) >> 10;
    uint32_t v2 = ((uint32_t)3 * t_rem2 * t * u1) >> 20;
    uint32_t v3 = ((uint32_t)3 * t_rem * t2 * u2) >> 20;
    uint32_t v4 = ((uint32_t)t3 * u3) >> 10;

    return v1 + v2 + v3 + v4;
}

// Assembly:
movl $0x400, %r9d            # imm = 0x400
subl %edi, %r9d
movl %r9d, %r10d
imull %r9d, %r10d
shrl $0xa, %r10d
imull %edi, %edx
imull %r10d, %edx
imull %r9d, %r10d
shrl $0xa, %r10d
movl %edi, %eax
imull %edi, %eax
shrl $0xa, %eax
imull %ecx, %r9d
imull %eax, %r9d
imull %edi, %eax
shrl $0xa, %eax
imull %esi, %r10d
shrl $0xa, %r10d
leal (%rdx,%rdx,2), %ecx
shrl $0x14, %ecx
leal (%r9,%r9,2), %edx
shrl $0x14, %edx
addl %ecx, %edx
imull %r8d, %eax
shrl $0xa, %eax
addl %edx, %eax
addl %r10d, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_math.c
// Function: lv_sqrt
uint32_t lv_sqrt(uint32_t num)
{
    // http://www.codecodex.com/wiki/Calculate_an_integer_square_root#C
    uint32_t root  = 0;
    uint32_t place = 0x40000000;

    while(place > num) place >>= 2;
    while(place) {
        if(num >= root + place) {
            num -= root + place;
            root += (place << 1);
        }
        root >>= 1;
        place >>= 2;
    }
    return root;
}

// Assembly:
movl $0x40000000, %eax       # imm = 0x40000000
movl %eax, %ecx
shrl $0x2, %eax
cmpl %edi, %ecx
ja 0x2af42
testl %ecx, %ecx
je 0x2af7d
xorl %edx, %edx
xorl %esi, %esi
leal (%rcx,%rsi), %r8d
leal (%rcx,%rcx), %eax
cmpl %r8d, %edi
cmovbl %edx, %r8d
cmovbl %edx, %eax
subl %r8d, %edi
addl %esi, %eax
shrl %eax
movl %ecx, %r8d
shrl $0x2, %r8d
movl %eax, %esi
cmpl $0x3, %ecx
movl %r8d, %ecx
ja 0x2af53
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_utils.c
// Function: lv_utils_num_to_str
char * lv_utils_num_to_str(int32_t num, char * buf)
{
    if(num == 0) {
        buf[0] = '0';
        buf[1] = '\0';
        return buf;
    }
    int8_t digitCount = 0;
    int8_t i          = 0;
    if(num < 0) {
        buf[digitCount++] = '-';
        num               = LV_MATH_ABS(num);
        ++i;
    }
    while(num) {
        char digit        = num % 10;
        buf[digitCount++] = digit + 48;
        num /= 10;
    }
    buf[digitCount] = '\0';
    digitCount--;
    while(digitCount > i) {
        char temp       = buf[i];
        buf[i]          = buf[digitCount];
        buf[digitCount] = temp;
        digitCount--;
        i++;
    }
    return buf;
}

// Assembly:
movq %rsi, %rax
testl %edi, %edi
je 0x2af8d
js 0x2af93
xorl %ecx, %ecx
jmp 0x2af9a
movw $0x30, (%rax)
retq
movb $0x2d, (%rax)
negl %edi
movb $0x1, %cl
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %ecx, %esi
movl %edi, %r8d
imulq %rdx, %r8
shrq $0x23, %r8
leal (%r8,%r8), %r9d
leal (%r9,%r9,4), %r9d
movl %edi, %r10d
subl %r9d, %r10d
orb $0x30, %r10b
movsbq %sil, %r9
incb %sil
movb %r10b, (%rax,%r9)
cmpl $0x9, %edi
movl %r8d, %edi
ja 0x2afa1
movsbq %sil, %rdx
movb $0x0, (%rax,%rdx)
decb %dl
cmpb %cl, %dl
jle 0x2b003
movsbq %dl, %rsi
addq %rax, %rsi
movzbl %cl, %ecx
movb (%rax,%rcx), %dil
movb (%rsi), %r8b
movb %r8b, (%rax,%rcx)
movb %dil, (%rsi)
incq %rcx
decb %dl
decq %rsi
cmpb %cl, %dl
jg 0x2afe9
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_utils.c
// Function: lv_utils_bsearch
void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size,
                        int32_t (*cmp)(const void * pRef, const void * pElement))
{
    const char * middle;
    int32_t c;

    for(middle = base; n != 0;) {
        middle += (n / 2) * size;
        if((c = (*cmp)(key, middle)) > 0) {
            n    = (n / 2) - ((n & 1) == 0);
            base = (middle += size);
        } else if(c < 0) {
            n /= 2;
            middle = base;
        } else {
            return (char *)middle;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
testl %edx, %edx
je 0x2b066
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movl %ecx, %eax
movq %rax, 0x8(%rsp)
movl %edx, %ebx
shrl %ebx
movl %ebx, %r13d
imull %ebp, %r13d
addq %r15, %r13
movq %r14, %rdi
movq %r13, %rsi
callq *0x10(%rsp)
testl %eax, %eax
jle 0x2b05d
notl %r12d
andl $0x1, %r12d
subl %r12d, %ebx
addq 0x8(%rsp), %r13
movq %r13, %r15
jmp 0x2b05f
jns 0x2b069
movl %ebx, %r12d
testl %ebx, %ebx
jne 0x2b02f
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_async.c
// Function: lv_async_call
lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data)
{
    /*Allocate an info structure */
    lv_async_info_t *info = lv_mem_alloc(sizeof(lv_async_info_t));
    
    if(info == NULL)
        return LV_RES_INV;
    
    /* Create a new task */
    /* Use highest priority so that it will run before a refresh */
    lv_task_t *task = lv_task_create(lv_async_task_cb, 0, LV_TASK_PRIO_HIGHEST, info);
    
    if(task == NULL) {
        lv_mem_free(info);
        return LV_RES_INV;
    }
    
    info->cb = async_xcb;
    info->user_data = user_data;

    /* Set the task's user data */
    task->user_data = info;
    lv_task_once(task);
    return LV_RES_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x298d9
testq %rax, %rax
je 0x2b0d3
movq %rax, %r15
leaq 0x3b(%rip), %rdi        # 0x2b0db
xorl %esi, %esi
movl $0x5, %edx
movq %rax, %rcx
callq 0x28a94
testq %rax, %rax
je 0x2b0cb
movq %r14, (%r15)
movq %rbx, 0x8(%r15)
movq %r15, 0x10(%rax)
movq %rax, %rdi
callq 0x28bc3
movb $0x1, %al
jmp 0x2b0d5
movq %r15, %rdi
callq 0x29984
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_printf.c
// Function: ntoa_long_long
static size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, unsigned long long value, bool negative, unsigned long long base, unsigned int prec, unsigned int width, unsigned int flags)
{
  char buf[PRINTF_NTOA_BUFFER_SIZE];
  size_t len = 0U;

  // no hash for 0 values
  if (!value) {
    flags &= ~FLAGS_HASH;
  }

  // write if precision != 0 and value is != 0
  if (!(flags & FLAGS_PRECISION) || value) {
    do {
      const char digit = (char)(value % base);
      buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10;
      value /= base;
    } while (value && (len < PRINTF_NTOA_BUFFER_SIZE));
  }

  return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, width, flags);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl 0x70(%rsp), %r12d
movq 0x60(%rsp), %r14
movl 0x78(%rsp), %eax
movl %eax, %r13d
andl $-0x11, %r13d
testq %r8, %r8
sete %dl
cmovnel %eax, %r13d
movl %r13d, %eax
shrl $0xa, %eax
andl $0x1, %eax
testb %al, %dl
jne 0x2bb7c
movq %r8, %r10
movl %r13d, %r8d
andl $0x20, %r8d
xorl $0x61, %r8d
addl $0xf6, %r8d
xorl %ebp, %ebp
movq %r10, %rax
xorl %edx, %edx
divq %r14
leal (%r8,%rdx), %r11d
movl %edx, %r15d
andl $0xfe, %r15d
orb $0x30, %dl
cmpl $0xa, %r15d
movzbl %dl, %edx
cmovael %r11d, %edx
leaq 0x1(%rbp), %r11
movb %dl, (%rsp,%rbp)
cmpq %r14, %r10
jb 0x2bb7f
movq %rax, %r10
cmpq $0x1f, %rbp
movq %r11, %rbp
jb 0x2bb3e
jmp 0x2bb7f
xorl %r11d, %r11d
subq $0x8, %rsp
movzbl %r9b, %eax
leaq 0x8(%rsp), %r8
movq %rbx, %rdx
movq %r11, %r9
pushq %r13
pushq %r12
movl 0x80(%rsp), %r10d
pushq %r10
pushq %r14
pushq %rax
callq 0x2c409
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_printf.c
// Function: out_rev
static size_t _out_rev(out_fct_type out, char* buffer, size_t idx, size_t maxlen, const char* buf, size_t len, unsigned int width, unsigned int flags)
{
  const size_t start_idx = idx;

  // pad spaces up to given width
  if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) {
      size_t i;
      for (i = len; i < width; i++) {
      out(' ', buffer, idx++, maxlen);
    }
  }

  // reverse string
  while (len) {
    out(buf[--len], buffer, idx++, maxlen);
  }

  // append pad spaces up to given width
  if (flags & FLAGS_LEFT) {
    while (idx - start_idx < width) {
      out(' ', buffer, idx++, maxlen);
    }
  }

  return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r13
movq %r8, 0x20(%rsp)
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x68(%rsp), %eax
movq %rdx, (%rsp)
testb $0x3, %al
jne 0x2c60a
movl 0x60(%rsp), %ebp
movq (%rsp), %r14
subq %r13, %rbp
jbe 0x2c60a
movq (%rsp), %rdx
leaq 0x1(%rdx), %r14
movl $0x20, %edi
movq %r15, %rsi
movq %rbx, %rcx
callq *%r12
movq %r14, %rdx
decq %rbp
jne 0x2c5f0
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
testq %r13, %r13
je 0x2c651
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x8(%rsp), %rbx
movq 0x20(%rsp), %rax
movsbl -0x1(%rax,%r13), %edi
leaq 0x1(%r14), %rbp
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq *%rbx
movq %rbp, %r14
decq %r13
jne 0x2c62d
jmp 0x2c654
movq %r14, %rbp
movl 0x68(%rsp), %eax
testb $0x2, %al
je 0x2c6a8
movl 0x60(%rsp), %ebx
movq %rbp, %rax
movq (%rsp), %r13
subq %r13, %rax
cmpq %rbx, %rax
jae 0x2c6a8
negq %r13
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r12
leaq 0x1(%rbp), %r14
movl $0x20, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
callq *%r12
leaq 0x1(,%rbp), %rax
addq %r13, %rax
movq %r14, %rbp
cmpq %rbx, %rax
jb 0x2c67c
jmp 0x2c6ab
movq %rbp, %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_themes/lv_theme_alien.c
// Function: style_mod_edit
static void style_mod_edit(lv_group_t * group, lv_style_t * style)
{
    (void)group; /*Unused*/
#if LV_COLOR_DEPTH != 1
    /*Make the style to be a little bit orange*/
    style->body.border.opa   = LV_OPA_COVER;
    style->body.border.color = LV_COLOR_GREEN;

    /*If not empty or has border then emphasis the border*/
    if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;

    style->body.main_color   = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
    style->body.grad_color   = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
    style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);

    style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
#else
    style->body.border.opa   = LV_OPA_COVER;
    style->body.border.color = LV_COLOR_BLACK;
    style->body.border.width = 3;
#endif
}

// Assembly:
movb $-0x1, 0xf(%rsi)
movw $0x400, 0xa(%rsi)       # imm = 0x400
cmpb $0x0, 0x8(%rsi)
jne 0x2e068
cmpw $0x0, 0xc(%rsi)
je 0x2e06e
movw $0x5, 0xc(%rsi)
pushq %rbx
movzwl 0x2(%rsi), %edx
movl %edx, %eax
shrl $0x8, %eax
andl $-0x8, %eax
imull $0xb2, %eax, %edi
andl $0xf800, %edi           # imm = 0xF800
movl %edx, %eax
shrl $0x5, %eax
andl $0x3f, %eax
imull $0xb2, %eax, %r8d
movl $0x9a0, %eax            # imm = 0x9A0
addl %eax, %r8d
shrl $0x3, %r8d
movl $0x7e0, %ecx            # imm = 0x7E0
andl %ecx, %r8d
andl $0x1f, %edx
imull $0xb2, %edx, %edx
movzbl %dh, %edx
orl %edi, %edx
orl %r8d, %edx
movw %dx, 0x2(%rsi)
movzwl 0x4(%rsi), %edi
movl %edi, %edx
shrl $0x8, %edx
andl $-0x8, %edx
imull $0xb2, %edx, %r8d
movl $0xfffff800, %edx       # imm = 0xFFFFF800
andl %edx, %r8d
movl %edi, %r9d
shrl $0x5, %r9d
andl $0x3f, %r9d
imull $0xb2, %r9d, %r9d
addl %eax, %r9d
shrl $0x3, %r9d
andl %ecx, %r9d
andl $0x1f, %edi
imull $0xb2, %edi, %ebx
movzbl %bh, %edi
orl %r8d, %edi
orl %r9d, %edi
movw %di, 0x4(%rsi)
movzwl 0x10(%rsi), %edi
movl %edi, %r8d
shrl $0x8, %r8d
andl $-0x8, %r8d
imull $0x99, %r8d, %r8d
andl %edx, %r8d
movl %edi, %r9d
shrl $0x5, %r9d
andl $0x3f, %r9d
imull $0x99, %r9d, %r9d
addl $0xcc0, %r9d            # imm = 0xCC0
shrl $0x3, %r9d
andl %ecx, %r9d
andl $0x1f, %edi
imull $0x99, %edi, %ebx
movzbl %bh, %edi
orl %r8d, %edi
orl %r9d, %edi
movw %di, 0x10(%rsi)
movzwl 0x20(%rsi), %edi
movl %edi, %r8d
shrl $0x8, %r8d
andl $-0x8, %r8d
imull $0xb2, %r8d, %r8d
andl %edx, %r8d
movl %edi, %edx
shrl $0x5, %edx
andl $0x3f, %edx
imull $0xb2, %edx, %edx
addl %eax, %edx
shrl $0x3, %edx
andl %ecx, %edx
andl $0x1f, %edi
imull $0xb2, %edi, %eax
movzbl %ah, %eax
orl %r8d, %eax
orl %edx, %eax
movw %ax, 0x20(%rsi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_themes/lv_theme_default.c
// Function: style_mod
static void style_mod(lv_group_t * group, lv_style_t * style)
{
    (void)group; /*Unused*/
#if LV_COLOR_DEPTH != 1
    /*Make the style to be a little bit orange*/
    style->body.border.opa   = LV_OPA_COVER;
    style->body.border.color = LV_COLOR_ORANGE;

    /*If not empty or has border then emphasis the border*/
    if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;

    style->body.main_color   = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70);
    style->body.grad_color   = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70);
    style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60);

    style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
#else
    style->body.border.opa   = LV_OPA_COVER;
    style->body.border.color = LV_COLOR_BLACK;
    style->body.border.width = 2;
#endif
}

// Assembly:
movb $-0x1, 0xf(%rsi)
movw $0xfd20, 0xa(%rsi)      # imm = 0xFD20
cmpb $0x0, 0x8(%rsi)
jne 0x2e843
cmpw $0x0, 0xc(%rsi)
je 0x2e849
movw $0x5, 0xc(%rsi)
pushq %rbx
movzwl 0x2(%rsi), %r8d
movl %r8d, %eax
shrl $0xb, %eax
imull $0x590, %eax, %r9d      # imm = 0x590
movl $0x4a98, %eax           # imm = 0x4A98
addl %eax, %r9d
movl $0xfffff800, %ecx       # imm = 0xFFFFF800
andl %ecx, %r9d
movl %r8d, %edx
shrl $0x5, %edx
andl $0x3f, %edx
imull $0xb2, %edx, %r10d
movl $0xc55, %edx            # imm = 0xC55
addl %edx, %r10d
shrl $0x3, %r10d
movl $0x7e0, %edi            # imm = 0x7E0
andl %edi, %r10d
andl $0x1f, %r8d
imull $0xb2, %r8d, %ebx
movzbl %bh, %ebx
orl %r9d, %ebx
orl %r10d, %ebx
movw %bx, 0x2(%rsi)
movzwl 0x4(%rsi), %r8d
movl %r8d, %r9d
shrl $0xb, %r9d
imull $0x590, %r9d, %r9d      # imm = 0x590
addl %eax, %r9d
andl %ecx, %r9d
movl %r8d, %r10d
shrl $0x5, %r10d
andl $0x3f, %r10d
imull $0xb2, %r10d, %r10d
addl %edx, %r10d
shrl $0x3, %r10d
andl %edi, %r10d
andl $0x1f, %r8d
imull $0xb2, %r8d, %ebx
movzbl %bh, %ebx
orl %r9d, %ebx
orl %r10d, %ebx
movw %bx, 0x4(%rsi)
movzwl 0x10(%rsi), %r8d
movl %r8d, %r9d
shrl $0xb, %r9d
imull $0x4c8, %r9d, %r9d      # imm = 0x4C8
addl $0x62d0, %r9d           # imm = 0x62D0
andl %ecx, %r9d
movl %r8d, %r10d
shrl $0x5, %r10d
andl $0x3f, %r10d
imull $0x99, %r10d, %r10d
addl $0x1056, %r10d          # imm = 0x1056
shrl $0x3, %r10d
andl %edi, %r10d
andl $0x1f, %r8d
imull $0x99, %r8d, %ebx
movzbl %bh, %ebx
orl %r9d, %ebx
orl %r10d, %ebx
movw %bx, 0x10(%rsi)
movzwl 0x20(%rsi), %r8d
movl %r8d, %r9d
shrl $0xb, %r9d
imull $0x590, %r9d, %r9d      # imm = 0x590
addl %eax, %r9d
andl %ecx, %r9d
movl %r8d, %eax
shrl $0x5, %eax
andl $0x3f, %eax
imull $0xb2, %eax, %eax
addl %edx, %eax
shrl $0x3, %eax
andl %edi, %eax
andl $0x1f, %r8d
imull $0xb2, %r8d, %ecx
movzbl %ch, %ecx
orl %r9d, %ecx
orl %eax, %ecx
movw %cx, 0x20(%rsi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_themes/lv_theme_nemo.c
// Function: style_mod
static void style_mod(lv_group_t * group, lv_style_t * style)
{
    (void)group; /*Unused*/
#if LV_COLOR_DEPTH != 1
    style->body.border.width = 2;
    style->body.border.color = LV_COLOR_SILVER;
    style->body.border.opa   = LV_OPA_70;
    style->body.shadow.width = LV_DPI / 20;
    style->body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90);
    style->body.main_color   = lv_color_hsv_to_rgb(_hue, 40, 80);
    style->body.grad_color   = lv_color_hsv_to_rgb(_hue, 40, 80);
#else
    style->body.border.opa   = LV_OPA_COVER;
    style->body.border.color = LV_COLOR_BLACK;
    style->body.border.width = 2;
#endif
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movl $0x2c618, 0xa(%rsi)     # imm = 0x2C618
movb $-0x4e, 0xf(%rsi)
movw $0x5, 0x12(%rsi)
movzwl 0x3b4da(%rip), %edi     # 0x6ff00
movl $0x14, %esi
movl $0x5a, %edx
callq 0x29fe4
movw %ax, 0x10(%rbx)
movzwl 0x3b4c0(%rip), %edi     # 0x6ff00
movl $0x28, %esi
movl $0x50, %edx
callq 0x29fe4
movw %ax, 0x2(%rbx)
movzwl 0x3b4a6(%rip), %edi     # 0x6ff00
movl $0x28, %esi
movl $0x50, %edx
callq 0x29fe4
movw %ax, 0x4(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_basic.c
// Function: lv_draw_px
void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa)
{

    if(opa < LV_OPA_MIN) return;
    if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;

    /*Pixel out of the mask*/
    if(x < mask_p->x1 || x > mask_p->x2 || y < mask_p->y1 || y > mask_p->y2) {
        return;
    }

    lv_disp_t * disp    = lv_refr_get_disp_refreshing();
    lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
    uint32_t vdb_width  = lv_area_get_width(&vdb->area);

    /*Make the coordinates relative to VDB*/
    x -= vdb->area.x1;
    y -= vdb->area.y1;

    if(disp->driver.set_px_cb) {
        disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa);
    } else {
        bool scr_transp = false;
#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
        scr_transp = disp->driver.screen_transp;
#endif

        lv_color_t * vdb_px_p = vdb->buf_act;
        vdb_px_p += y * vdb_width + x;

        if(scr_transp == false) {
            if(opa == LV_OPA_COVER) {
                *vdb_px_p = color;
            } else {
                *vdb_px_p = lv_color_mix(color, *vdb_px_p, opa);
            }
        } else {
#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
            *vdb_px_p = color_mix_2_alpha(*vdb_px_p, (*vdb_px_p).ch.alpha, color, opa);
#endif
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r14d
cmpb $0x10, %r14b
jb 0x35295
movl %edi, %ebp
cmpb $-0x4, %r14b
movzbl %r14b, %eax
movl $0xff, %r13d
cmovbl %eax, %r13d
cmpw %bp, (%rdx)
jg 0x35295
cmpw %bp, 0x4(%rdx)
jl 0x35295
movl %esi, %r15d
cmpw %r15w, 0x2(%rdx)
jg 0x35295
cmpw %r15w, 0x6(%rdx)
jl 0x35295
movl %ecx, %ebx
callq 0x72ad
movq %rax, %r12
movq %rax, %rdi
callq 0x8660
movzwl 0x20(%rax), %ecx
movzwl 0x1c(%rax), %edx
subl %edx, %ecx
incl %ecx
subl %edx, %ebp
subw 0x1e(%rax), %r15w
movq 0x28(%r12), %r10
testq %r10, %r10
je 0x35263
movq 0x10(%rax), %rsi
movzbl %r13b, %eax
movl %eax, (%rsp)
movswl %cx, %edx
movswl %bp, %ecx
movswl %r15w, %r8d
movq %r12, %rdi
movl %ebx, %r9d
callq *%r10
jmp 0x35295
movswl %cx, %ecx
movswl %r15w, %edx
imull %ecx, %edx
movswl %bp, %r15d
addl %edx, %r15d
movq 0x10(%rax), %r12
cmpb $-0x5, %r14b
ja 0x35290
movzwl (%r12,%r15,2), %esi
movzbl %r13b, %edx
movl %ebx, %edi
callq 0x352a4
movl %eax, %ebx
movw %bx, (%r12,%r15,2)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/../lv_misc/lv_color.h
// Function: lv_color_mix
static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix)
{
    lv_color_t ret;
#if LV_COLOR_DEPTH != 1
    /*LV_COLOR_DEPTH == 8, 16 or 32*/
    LV_COLOR_SET_R(ret, (uint16_t)((uint16_t) LV_COLOR_GET_R(c1) * mix + LV_COLOR_GET_R(c2) * (255 - mix)) >> 8);
    LV_COLOR_SET_G(ret, (uint16_t)((uint16_t) LV_COLOR_GET_G(c1) * mix + LV_COLOR_GET_G(c2) * (255 - mix)) >> 8);
    LV_COLOR_SET_B(ret, (uint16_t)((uint16_t) LV_COLOR_GET_B(c1) * mix + LV_COLOR_GET_B(c2) * (255 - mix)) >> 8);
    LV_COLOR_SET_A(ret, 0xFF);
#else
    /*LV_COLOR_DEPTH == 1*/
    ret.full = mix > LV_OPA_50 ? c1.full : c2.full;
#endif

    return ret;
}

// Assembly:
movl $0xffff, %r8d           # imm = 0xFFFF
movl %esi, %ecx
andl %r8d, %ecx
andl %edi, %r8d
shrl $0xb, %r8d
imull %edx, %r8d
shrl $0xb, %ecx
movl %edi, %r9d
shrl $0x5, %r9d
andl $0x3f, %r9d
imull %edx, %r9d
andl $0x1f, %edi
imull %edx, %edi
movl %edx, %eax
xorl $0xff, %eax
imull %eax, %ecx
addl %r8d, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl %esi, %edx
shrl $0x5, %edx
andl $0x3f, %edx
imull %eax, %edx
addl %r9d, %edx
shrl $0x3, %edx
andl $0x7e0, %edx            # imm = 0x7E0
leal (%rdx,%rcx,8), %ecx
andl $0x1f, %esi
imull %esi, %eax
addl %edi, %eax
shrl $0x8, %eax
andl $0x1f, %eax
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw.c
// Function: lv_draw_get_buf
void * lv_draw_get_buf(uint32_t size)
{
    if(size <= draw_buf_size) return LV_GC_ROOT(_lv_draw_buf);

    LV_LOG_TRACE("lv_draw_get_buf: allocate");

    draw_buf_size = size;

    if(LV_GC_ROOT(_lv_draw_buf) == NULL) {
        LV_GC_ROOT(_lv_draw_buf) = lv_mem_alloc(size);
        LV_ASSERT_MEM(LV_GC_ROOT(_lv_draw_buf));
        return LV_GC_ROOT(_lv_draw_buf);
    }

    LV_GC_ROOT(_lv_draw_buf) = lv_mem_realloc(LV_GC_ROOT(_lv_draw_buf), size);
    LV_ASSERT_MEM(LV_GC_ROOT(_lv_draw_buf));
    return LV_GC_ROOT(_lv_draw_buf);
}

// Assembly:
pushq %rbx
cmpl %edi, 0x3b75d(%rip)     # 0x71af0
jae 0x363ea
movl %edi, %eax
movl %edi, 0x3b753(%rip)     # 0x71af0
leaq 0x3220c(%rip), %rbx     # 0x685b0
movq (%rbx), %rdi
movl %eax, %esi
testq %rdi, %rdi
je 0x363d3
callq 0x299f8
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x80d4
testb %al, %al
jne 0x363ea
movq (%rbx), %rsi
leaq 0x8c74(%rip), %rdi      # 0x3f040
callq 0x829e
jmp 0x363d1
movq %rsi, %rdi
callq 0x298d9
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x363f6
leaq 0x321bf(%rip), %rax     # 0x685b0
movq (%rax), %rax
popq %rbx
retq
movq (%rbx), %rsi
leaq 0x8c40(%rip), %rdi      # 0x3f040
callq 0x829e
jmp 0x36405
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw.c
// Function: lv_draw_free_buf
void lv_draw_free_buf(void)
{
    if(LV_GC_ROOT(_lv_draw_buf)) {
        lv_mem_free(LV_GC_ROOT(_lv_draw_buf));
        LV_GC_ROOT(_lv_draw_buf) = NULL;
        draw_buf_size = 0;
    }
}

// Assembly:
pushq %rbx
leaq 0x321a1(%rip), %rbx     # 0x685b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3642d
callq 0x29984
movq $0x0, (%rbx)
movl $0x0, 0x3b6c3(%rip)     # 0x71af0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw.c
// Function: lv_draw_aa_ver_seg
void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color,
                        lv_opa_t opa)
{
    bool aa_inv = false;
    if(length < 0) {
        aa_inv = true;
        length = -length;
    }

    lv_coord_t i;
    for(i = 0; i < length; i++) {
        lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa);
        if(aa_inv) px_opa = opa - px_opa;
        lv_draw_px(x, y + i, mask, color, px_opa);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movq %rcx, 0x10(%rsp)
movl %edx, %ebp
movq %rsi, 0x8(%rsp)
movl %ebp, %r15d
negw %r15w
cmovsw %bp, %r15w
testw %r15w, %r15w
jle 0x36501
xorl %r12d, %r12d
movswl %r15w, %r13d
movzbl %r9b, %ebx
movswl %di, %r14d
movswl %r12w, %r12d
movl %r13d, %edi
movl %r12d, %esi
movl %ebx, %edx
callq 0x3642f
movl %ebx, %ecx
subb %al, %cl
testw %bp, %bp
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
movq 0x8(%rsp), %rax
addl %r12d, %eax
movzbl %cl, %r8d
movswl %ax, %esi
movl %r14d, %edi
movq 0x10(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x351bc
incl %r12d
cmpw %r12w, %r15w
jne 0x364b7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw.c
// Function: lv_draw_aa_hor_seg
void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color,
                        lv_opa_t opa)
{
    bool aa_inv = false;
    if(length < 0) {
        aa_inv = true;
        length = -length;
    }

    lv_coord_t i;
    for(i = 0; i < length; i++) {
        lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa);
        if(aa_inv) px_opa = opa - px_opa;
        lv_draw_px(x + i, y, mask, color, px_opa);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movq %rcx, 0x10(%rsp)
movl %edx, %ebp
movq %rdi, 0x8(%rsp)
movl %ebp, %r15d
negw %r15w
cmovsw %bp, %r15w
testw %r15w, %r15w
jle 0x3659a
xorl %r12d, %r12d
movswl %r15w, %r13d
movzbl %r9b, %ebx
movswl %si, %r14d
movswl %r12w, %r12d
movl %r13d, %edi
movl %r12d, %esi
movl %ebx, %edx
callq 0x3642f
movl %ebx, %ecx
subb %al, %cl
testw %bp, %bp
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
movq 0x8(%rsp), %rax
addl %r12d, %eax
movzbl %cl, %r8d
movswl %ax, %edi
movl %r14d, %esi
movq 0x10(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x351bc
incl %r12d
cmpw %r12w, %r15w
jne 0x36550
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_rect.c
// Function: lv_draw_cont_radius_corr
static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h)
{
    bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());

    if(r >= (w >> 1)) {
        r = (w >> 1);
        if(r != 0) r--;
    }
    if(r >= (h >> 1)) {
        r = (h >> 1);
        if(r != 0) r--;
    }

    if(r > 0) r -= aa;

    return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
callq 0x72ad
movq %rax, %rdi
callq 0x861d
movl %ebp, %ecx
shrl %ecx
movl %ebp, %edx
sarl %edx
cmpw $0x2, %bp
adcw $-0x1, %cx
cmpl %edx, %r14d
cmovll %r14d, %ecx
movl %ebx, %edx
shrl %edx
movl %ebx, %esi
sarl %esi
cmpw $0x2, %bx
adcw $-0x1, %dx
movzwl %cx, %edi
cmpl %esi, %edi
cmovll %ecx, %edx
movzbl %al, %eax
movl %edx, %ecx
subl %eax, %ecx
xorl %eax, %eax
testw %dx, %dx
cmovnel %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_rect.c
// Function: antialias_get_opa_circ
static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_t opa)
{
    /*Empirical non-linear values anti-aliasing values*/
    static const lv_opa_t opa_map2[2] = {210, 80};
    static const lv_opa_t opa_map3[3] = {230, 150, 60};
    static const lv_opa_t opa_map4[4] = {235, 185, 125, 50};
    static const lv_opa_t opa_map8[8] = {250, 242, 219, 191, 158, 117, 76, 40};

#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 1
    if(seg == 1) return 170;
#endif

#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 2
    if(seg == 2) return (opa_map2[px_id] * opa) >> 8;
#endif

#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 3
    if(seg == 3) return (opa_map3[px_id] * opa) >> 8;
#endif

#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 4
    if(seg == 4) return (opa_map4[px_id] * opa) >> 8;
#endif

    uint8_t id = (uint32_t)((uint32_t)px_id * (sizeof(opa_map8) - 1)) / (seg - 1);
    return (uint32_t)((uint32_t)opa_map8[id] * opa) >> 8;
}

// Assembly:
movl %edx, %ecx
cmpl $0x4, %edi
je 0x39ff5
cmpl $0x3, %edi
je 0x39fe8
cmpl $0x2, %edi
jne 0x3a002
movswq %si, %rdx
leaq 0x921e(%rip), %rax      # 0x43204
jmp 0x3a021
movswq %si, %rdx
leaq 0x9213(%rip), %rax      # 0x43206
jmp 0x3a021
movswq %si, %rdx
leaq 0x9209(%rip), %rax      # 0x43209
jmp 0x3a021
movswl %di, %edi
movswl %si, %edx
leal (,%rdx,8), %eax
subl %edx, %eax
decl %edi
xorl %edx, %edx
divl %edi
movzbl %al, %edx
leaq 0x91ec(%rip), %rax      # 0x4320d
addq %rdx, %rax
movzbl (%rax), %edx
movzbl %cl, %eax
imull %edx, %eax
shrl $0x8, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_img.c
// Function: lv_img_buf_set_palette
void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c)
{
    if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && id > 1) || (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && id > 3) ||
       (dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && id > 15) || (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT)) {
        LV_LOG_WARN("lv_img_buf_set_px_alpha: invalid 'id'");
        return;
    }

    lv_color32_t c32;
    c32.full      = lv_color_to32(c);
    uint8_t * buf = (uint8_t *)dsc->data;
    memcpy(&buf[id * sizeof(c32)], &c32, sizeof(c32));
}

// Assembly:
movl (%rdi), %eax
andl $0x1f, %eax
cmpl $0xb, %eax
sete %cl
cmpb $0x2, %sil
setae %r8b
testb %cl, %r8b
jne 0x3c47a
cmpl $0xc, %eax
sete %cl
cmpb $0x4, %sil
setae %r8b
testb %cl, %r8b
jne 0x3c47a
cmpl $0xd, %eax
sete %cl
cmpb $0x10, %sil
setae %r8b
cmpl $0xe, %eax
je 0x3c47a
andb %cl, %r8b
jne 0x3c47a
movzwl %dx, %eax
movl %eax, %ecx
shrl $0xb, %ecx
imull $0x83800, %ecx, %ecx    # imm = 0x83800
shrl $0x5, %eax
andl $0x3f, %eax
andl $0x1f, %edx
imull $0x107, %edx, %edx      # imm = 0x107
addl $0x7, %edx
shrl $0x5, %edx
addl $0x3800, %ecx           # imm = 0x3800
andl $0x1ff0000, %ecx        # imm = 0x1FF0000
imull $0x40c, %eax, %eax      # imm = 0x40C
addl $0xc, %eax
andl $0xff00, %eax           # imm = 0xFF00
orl %ecx, %eax
movzbl %dl, %ecx
orl %eax, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movq 0x8(%rdi), %rax
movzbl %sil, %edx
movl %ecx, (%rax,%rdx,4)
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_img.c
// Function: lv_img_buf_alloc
lv_img_dsc_t *lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
{
    /* Allocate image descriptor */
    lv_img_dsc_t *dsc = lv_mem_alloc(sizeof(lv_img_dsc_t));
    if(dsc == NULL)
        return NULL;
    
    memset(dsc, 0, sizeof(lv_img_dsc_t));
    
    /* Get image data size */
    dsc->data_size = lv_img_buf_get_img_size(w, h, cf);
    if(dsc->data_size == 0) {
        lv_mem_free(dsc);
        return NULL;
    }
    
    /* Allocate raw buffer */
    dsc->data = lv_mem_alloc(dsc->data_size);
    if(dsc->data == NULL) {
        lv_mem_free(dsc);
        return NULL;
    }
    memset((uint8_t *)dsc->data, 0, dsc->data_size);
    
    /* Fill in header */
    dsc->header.always_zero = 0;
    dsc->header.w = w;
    dsc->header.h = h;
    dsc->header.cf = cf;
    return dsc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movl %edi, %r14d
movl $0x10, %edi
callq 0x298d9
testq %rax, %rax
je 0x3c548
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movswl %r14w, %edi
movswl %r15w, %esi
movzbl %bpl, %edx
callq 0x3c558
movl %eax, 0x4(%rbx)
testl %eax, %eax
je 0x3c540
movl %eax, %edi
callq 0x298d9
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3c540
movl 0x4(%rbx), %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20a0
shll $0xa, %r14d
movl $0x300, %eax            # imm = 0x300
andl (%rbx), %eax
shll $0x15, %r15d
andl $0x1ffc00, %r14d        # imm = 0x1FFC00
orl %eax, %r14d
orl %r15d, %r14d
andb $0x1f, %bpl
movzbl %bpl, %eax
orl %r14d, %eax
movl %eax, (%rbx)
jmp 0x3c54a
movq %rbx, %rdi
callq 0x29984
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_img.c
// Function: lv_img_buf_get_img_size
uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
{
    switch(cf) {
        case LV_IMG_CF_TRUE_COLOR: return LV_IMG_BUF_SIZE_TRUE_COLOR(w, h);
        case LV_IMG_CF_TRUE_COLOR_ALPHA: return LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h);
        case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: return LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h);
        case LV_IMG_CF_ALPHA_1BIT: return LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h);
        case LV_IMG_CF_ALPHA_2BIT: return LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h);
        case LV_IMG_CF_ALPHA_4BIT: return LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h);
        case LV_IMG_CF_ALPHA_8BIT: return LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h);
        case LV_IMG_CF_INDEXED_1BIT: return LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h);
        case LV_IMG_CF_INDEXED_2BIT: return LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h);
        case LV_IMG_CF_INDEXED_4BIT: return LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h);
        case LV_IMG_CF_INDEXED_8BIT: return LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h);
        default: return 0;
    }
}

// Assembly:
addl $-0x4, %edx
cmpl $0xa, %edx
ja 0x3c628
leaq 0x6d45(%rip), %rax      # 0x432b0
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movswl %di, %ecx
movswl %si, %eax
imull %ecx, %eax
addl %eax, %eax
retq
leal 0x3(%rdi), %eax
testw %di, %di
cmovnsl %edi, %eax
cwtl
sarl $0x2, %eax
incl %eax
movswl %ax, %ecx
movswl %si, %eax
imull %ecx, %eax
addl $0x10, %eax
retq
movzwl %di, %eax
shrl $0xf, %eax
addl %edi, %eax
cwtl
sarl %eax
jmp 0x3c61c
movswl %di, %eax
movswl %si, %ecx
imull %eax, %ecx
leal (%rcx,%rcx,2), %eax
retq
leal 0x7(%rdi), %eax
testw %di, %di
cmovnsl %edi, %eax
cwtl
sarl $0x3, %eax
incl %eax
movswl %ax, %ecx
movswl %si, %eax
imull %ecx, %eax
addl $0x8, %eax
retq
leal 0x7(%rdi), %eax
testw %di, %di
cmovnsl %edi, %eax
cwtl
sarl $0x3, %eax
jmp 0x3c61c
movzwl %di, %eax
shrl $0xf, %eax
addl %edi, %eax
cwtl
sarl %eax
incl %eax
movswl %ax, %ecx
movswl %si, %eax
imull %ecx, %eax
addl $0x40, %eax
retq
movswl %di, %ecx
movswl %si, %eax
imull %ecx, %eax
addl $0x400, %eax            # imm = 0x400
retq
movswl %di, %ecx
jmp 0x3c621
leal 0x3(%rdi), %eax
testw %di, %di
cmovnsl %edi, %eax
cwtl
sarl $0x2, %eax
incl %eax
movswl %ax, %ecx
movswl %si, %eax
imull %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_img.c
// Function: lv_img_buf_free
void lv_img_buf_free(lv_img_dsc_t *dsc)
{
    if(dsc != NULL) {
        if(dsc->data != NULL)
            lv_mem_free(dsc->data);
        
        lv_mem_free(dsc);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x3c64b
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3c642
callq 0x29984
movq %rbx, %rdi
popq %rbx
jmp 0x29984
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_triangle.c
// Function: lv_draw_triangle
void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
{
    /*Return if the triangle is degenerated*/
    if(points[0].x == points[1].x && points[0].y == points[1].y) return;
    if(points[1].x == points[2].x && points[1].y == points[2].y) return;
    if(points[0].x == points[2].x && points[0].y == points[2].y) return;

    if(points[0].x == points[1].x && points[1].x == points[2].x) return;
    if(points[0].y == points[1].y && points[1].y == points[2].y) return;

    lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;

    /*Is the triangle flat or tall?*/
    lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x);
    lv_coord_t x_max = LV_MATH_MAX(LV_MATH_MAX(points[0].x, points[1].x), points[2].x);
    lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y);
    lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MAX(points[0].y, points[1].y), points[2].y);

    /* Draw the tall rectangles from vertical lines
     * and from the flat triangles from horizontal lines
     * to minimize the number of lines.
     * Some pixels are overdrawn on the common edges of the triangles
     * so use it only if the triangle has no opacity*/

    /* Draw from horizontal lines*/
    if(x_max - x_min < y_max - y_min) {
        tri_draw_tall(points, mask, style, opa);
    }
    /*Else flat so draw from vertical lines*/
    else {
        tri_draw_flat(points, mask, style, opa);
    }
}

// Assembly:
movzwl (%rdi), %r8d
movzwl 0x4(%rdi), %eax
cmpw %ax, %r8w
jne 0x3ce32
movzwl 0x2(%rdi), %r9d
cmpw 0x6(%rdi), %r9w
je 0x3ce78
movzwl 0x8(%rdi), %r10d
cmpw %r10w, %ax
jne 0x3ce49
movzwl 0x6(%rdi), %r9d
cmpw 0xa(%rdi), %r9w
je 0x3ce78
cmpw %r10w, %r8w
jne 0x3ce61
cmpw %ax, %r8w
je 0x3ce78
movzwl 0xa(%rdi), %r9d
cmpw %r9w, 0x2(%rdi)
je 0x3ce78
movzwl 0x2(%rdi), %r11d
movzwl 0x6(%rdi), %r9d
cmpw %r9w, %r11w
jne 0x3ce79
cmpw 0xa(%rdi), %r9w
jne 0x3ce79
retq
pushq %rbx
cmpb $-0x1, %cl
je 0x3ce8e
movzbl %cl, %ebx
movzbl 0x8(%rdx), %ecx
imull %ebx, %ecx
shrl $0x8, %ecx
jmp 0x3ce91
movb 0x8(%rdx), %cl
cmpw %ax, %r8w
movl %eax, %ebx
cmovll %r8d, %ebx
cmovgl %r8d, %eax
cmpw %r10w, %bx
cmovgel %r10d, %ebx
cmpw %r10w, %ax
cmovlel %r10d, %eax
cmpw %r9w, %r11w
movl %r9d, %r8d
cmovll %r11d, %r8d
cmovgl %r11d, %r9d
movzwl 0xa(%rdi), %r10d
cmpw %r10w, %r8w
cmovgel %r10d, %r8d
cmpw %r10w, %r9w
cmovlel %r10d, %r9d
cwtl
movswl %bx, %r10d
subl %r10d, %eax
movswl %r9w, %r9d
movswl %r8w, %r8d
subl %r8d, %r9d
cmpl %r9d, %eax
popq %rbx
movzbl %cl, %ecx
jl 0x3cef8
jmp 0x3d2b8
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_triangle.c
// Function: lv_draw_polygon
void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
                     lv_opa_t opa_scale)
{
    if(point_cnt < 3) return;
    if(points == NULL) return;

    uint32_t i;
    lv_point_t tri[3];
    tri[0].x = points[0].x;
    tri[0].y = points[0].y;
    for(i = 0; i < point_cnt - 1; i++) {
        tri[1].x = points[i].x;
        tri[1].y = points[i].y;
        tri[2].x = points[i + 1].x;
        tri[2].y = points[i + 1].y;
        lv_draw_triangle(tri, mask, style, opa_scale);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
cmpl $0x3, %esi
setb %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x3d766
movq %rdi, %r15
movzwl (%rdi), %eax
movw %ax, 0xc(%rsp)
movzwl 0x2(%rdi), %eax
movw %ax, 0xe(%rsp)
decl %esi
je 0x3d766
movq %rdx, %r14
movl %esi, %r13d
xorl %eax, %eax
movzbl %r8b, %ebp
movzwl (%r15,%rax,4), %ecx
movw %cx, 0x10(%rsp)
movzwl 0x2(%r15,%rax,4), %ecx
movw %cx, 0x12(%rsp)
leaq 0x1(%rax), %r12
movzwl 0x4(%r15,%rax,4), %ecx
movw %cx, 0x14(%rsp)
movzwl 0x6(%r15,%rax,4), %eax
movw %ax, 0x16(%rsp)
leaq 0xc(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x3ce18
movq %r12, %rax
cmpq %r12, %r13
jne 0x3d71d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_init
void lv_img_decoder_init(void)
{
    lv_ll_init(&LV_GC_ROOT(_lv_img_defoder_ll), sizeof(lv_img_decoder_t));

    lv_img_decoder_t * decoder;

    /*Create a decoder for the built in color format*/
    decoder = lv_img_decoder_create();
    if(decoder == NULL) {
        LV_LOG_WARN("lv_img_decoder_init: out of memory");
        LV_ASSERT_MEM(decoder);
        return;
    }

    lv_img_decoder_set_info_cb(decoder, lv_img_decoder_built_in_info);
    lv_img_decoder_set_open_cb(decoder, lv_img_decoder_built_in_open);
    lv_img_decoder_set_read_line_cb(decoder, lv_img_decoder_built_in_read_line);
    lv_img_decoder_set_close_cb(decoder, lv_img_decoder_built_in_close);
}

// Assembly:
pushq %rax
leaq 0x2ae08(%rip), %rdi     # 0x68588
movl $0x20, %esi
callq 0x29bf8
callq 0x3d7de
testq %rax, %rax
je 0x3d7c1
leaq 0x8c(%rip), %rcx        # 0x3d827
movq %rcx, (%rax)
leaq 0x155(%rip), %rcx       # 0x3d8fa
movq %rcx, 0x8(%rax)
leaq 0x426(%rip), %rcx       # 0x3dbd6
movq %rcx, 0x10(%rax)
leaq 0x8f1(%rip), %rcx       # 0x3e0ac
movq %rcx, 0x18(%rax)
jmp 0x3d7cc
xorl %edi, %edi
callq 0x80d4
testb %al, %al
je 0x3d7ce
popq %rax
retq
leaq 0x186b(%rip), %rdi      # 0x3f040
xorl %esi, %esi
callq 0x829e
jmp 0x3d7dc
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_create
lv_img_decoder_t * lv_img_decoder_create(void)
{
    lv_img_decoder_t * decoder;
    decoder = lv_ll_ins_head(&LV_GC_ROOT(_lv_img_defoder_ll));
    LV_ASSERT_MEM(decoder);
    if(decoder == NULL) return NULL;

    memset(decoder, 0, sizeof(lv_img_decoder_t));

    return decoder;
}

// Assembly:
pushq %rbx
leaq 0x2ada2(%rip), %rdi     # 0x68588
callq 0x29c08
movq %rax, %rbx
movq %rax, %rdi
callq 0x80d4
testb %al, %al
je 0x3d80e
testq %rbx, %rbx
je 0x3d81f
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
jmp 0x3d821
leaq 0x182b(%rip), %rdi      # 0x3f040
movq %rbx, %rsi
callq 0x829e
jmp 0x3d81d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_built_in_info
lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header)
{
    (void)decoder; /*Unused*/

    lv_img_src_t src_type = lv_img_src_get_type(src);
    if(src_type == LV_IMG_SRC_VARIABLE) {
        lv_img_cf_t cf = ((lv_img_dsc_t *)src)->header.cf;
        if(cf < CF_BUILT_IN_FIRST || cf > CF_BUILT_IN_LAST) return LV_RES_INV;

        header->w  = ((lv_img_dsc_t *)src)->header.w;
        header->h  = ((lv_img_dsc_t *)src)->header.h;
        header->cf = ((lv_img_dsc_t *)src)->header.cf;
    }
#if LV_USE_FILESYSTEM
    else if(src_type == LV_IMG_SRC_FILE) {
        lv_fs_file_t file;
        lv_fs_res_t res;
        uint32_t rn;
        res = lv_fs_open(&file, src, LV_FS_MODE_RD);
        if(res == LV_FS_RES_OK) {
            res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn);
            lv_fs_close(&file);
        }

        if(header->cf < CF_BUILT_IN_FIRST || header->cf > CF_BUILT_IN_LAST) return LV_RES_INV;

    }
#endif
    else if(src_type == LV_IMG_SRC_SYMBOL) {
        /*The size depend on the font but it is unknown here. It should be handled outside of the
         * function*/
        header->w = 1;
        header->h = 1;
        /* Symbols always have transparent parts. Important because of cover check in the design
         * function. The actual value doesn't matter because lv_draw_label will draw it*/
        header->cf = LV_IMG_CF_ALPHA_1BIT;
    } else {
        LV_LOG_WARN("Image get info found unknown src type");
        return LV_RES_INV;
    }
    return LV_RES_OK;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x3c49f
cmpb $0x2, %al
je 0x3d8dd
movzbl %al, %eax
cmpl $0x1, %eax
je 0x3d895
testl %eax, %eax
jne 0x3d891
movl (%r14), %eax
movl %eax, %ecx
andl $0x1f, %ecx
addl $-0x4, %ecx
cmpl $0xa, %ecx
ja 0x3d891
andl $0x1ffc00, %eax         # imm = 0x1FFC00
movl $0xffe003ff, %ecx       # imm = 0xFFE003FF
andl (%rbx), %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
movl $0xffe00000, %eax       # imm = 0xFFE00000
andl (%r14), %eax
andl $0x1fffff, %ecx         # imm = 0x1FFFFF
orl %eax, %ecx
movl %ecx, (%rbx)
movl (%r14), %eax
andl $0x1f, %eax
andl $-0x20, %ecx
orl %eax, %ecx
movl %ecx, (%rbx)
jmp 0x3d8eb
xorl %eax, %eax
jmp 0x3d8ed
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x28c4f
testb %al, %al
jne 0x3d8cd
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x28dff
movq %r14, %rdi
callq 0x28d42
movl (%rbx), %eax
andl $0x1f, %eax
addl $-0x4, %eax
cmpl $0xb, %eax
setb %al
jmp 0x3d8ed
movl $0x3e0, %eax            # imm = 0x3E0
andl (%rbx), %eax
orl $0x20040b, %eax         # imm = 0x20040B
movl %eax, (%rbx)
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_built_in_close
void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc)
{
    (void)decoder; /*Unused*/

    lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
    if(user_data) {
#if LV_USE_FILESYSTEM
        if(user_data->f) {
            lv_fs_close(user_data->f);
            lv_mem_free(user_data->f);
        }
#endif
        if(user_data->palette) lv_mem_free(user_data->palette);

        lv_mem_free(user_data);

        dsc->user_data = NULL;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x38(%rsi), %r14
testq %r14, %r14
je 0x3e0ef
movq %rsi, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3e0d1
callq 0x28d42
movq (%r14), %rdi
callq 0x29984
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3e0df
callq 0x29984
movq %r14, %rdi
callq 0x29984
movq $0x0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_get_info
lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header)
{
    header->always_zero = 0;

    lv_res_t res = LV_RES_INV;
    lv_img_decoder_t * d;
    LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d)
    {
        res = LV_RES_INV;
        if(d->info_cb) {
            res = d->info_cb(d, src, header);
            if(res == LV_RES_OK) break;
        }
    }

    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
andb $0x1f, (%rsi)
leaq 0x2a479(%rip), %rdi     # 0x68588
callq 0x29cce
testq %rax, %rax
je 0x3e155
movq %rax, %r15
leaq 0x2a465(%rip), %r12     # 0x68588
movq (%r15), %rax
testq %rax, %rax
je 0x3e13e
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *%rax
movl %eax, %ebp
cmpb $0x1, %al
jne 0x3e140
jmp 0x3e157
xorl %ebp, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x29dfb
movq %rax, %r15
testq %rax, %rax
jne 0x3e123
jmp 0x3e157
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq