LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_chg_list
void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head)
{
    lv_ll_rem(ll_ori_p, node);

    if(head) {
        /*Set node as head*/
        node_set_prev(ll_new_p, node, NULL);
        node_set_next(ll_new_p, node, ll_new_p->head);

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

        ll_new_p->head = node;       /*Set the new head in the dsc.*/
        if(ll_new_p->tail == NULL) { /*If there is no tail (first node) set the tail too*/
            ll_new_p->tail = node;
        }
    } else {
        /*Set node as tail*/
        node_set_prev(ll_new_p, node, ll_new_p->tail);
        node_set_next(ll_new_p, node, NULL);

        if(ll_new_p->tail != NULL) { /*If there is old tail then after it goes the new*/
            node_set_next(ll_new_p, ll_new_p->tail, node);
        }

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdx, %rsi
callq 0x2a3c2
testl %ebp, %ebp
je 0x2a4e7
testq %rbx, %rbx
je 0x2a525
movl (%r14), %eax
movq $0x0, (%rbx,%rax)
leaq 0x8(%r14), %rax
movq 0x8(%r14), %rcx
movl (%r14), %edx
movq %rcx, 0x8(%rbx,%rdx)
jmp 0x2a529
movq 0x10(%r14), %rax
testq %rbx, %rbx
je 0x2a507
movl (%r14), %ecx
movq %rax, (%rbx,%rcx)
movl (%r14), %eax
movq $0x0, 0x8(%rbx,%rax)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x2a514
movl (%r14), %ecx
movq %rbx, 0x8(%rax,%rcx)
movq %rbx, 0x10(%r14)
cmpq $0x0, 0x8(%r14)
jne 0x2a54a
addq $0x8, %r14
jmp 0x2a547
leaq 0x8(%r14), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2a538
movl (%r14), %ecx
movq %rbx, (%rax,%rcx)
movq %rbx, 0x8(%r14)
cmpq $0x0, 0x10(%r14)
jne 0x2a54a
addq $0x10, %r14
movq %rbx, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_get_len
uint32_t lv_ll_get_len(const lv_ll_t * ll_p)
{
    uint32_t len = 0;
    void * node;

    for(node = lv_ll_get_head(ll_p); node != NULL; node = lv_ll_get_next(ll_p, node)) {
        len++;
    }

    return len;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x2a56f
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x2a56f
movl (%rdi), %edx
xorl %eax, %eax
incl %eax
movq 0x8(%rcx,%rdx), %rcx
testq %rcx, %rcx
jne 0x2a563
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_ll.c
// Function: lv_ll_move_before
void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after)
{
    if(n_act == n_after) return; /*Can't move before itself*/

    void * n_before;
    if(n_after != NULL)
        n_before = lv_ll_get_prev(ll_p, n_after);
    else
        n_before = lv_ll_get_tail(ll_p); /*if `n_after` is NULL `n_act` should be the new tail*/

    if(n_act == n_before) return; /*Already before `n_after`*/

    /*It's much easier to remove from the list and add again*/
    lv_ll_rem(ll_p, n_act);

    /*Add again by setting the prev. and next nodes*/
    node_set_next(ll_p, n_before, n_act);
    node_set_prev(ll_p, n_act, n_before);
    node_set_prev(ll_p, n_after, n_act);
    node_set_next(ll_p, n_act, n_after);

    /*If `n_act` was moved before NULL then it become the new tail*/
    if(n_after == NULL) ll_p->tail = n_act;

    /*If `n_act` was moved before `NULL` then it's the new head*/
    if(n_before == NULL) ll_p->head = n_act;
}

// Assembly:
cmpq %rdx, %rsi
je 0x2a60a
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x2a59d
testq %r14, %r14
je 0x2a5a8
movl (%r14), %eax
movq (%r15,%rax), %r12
jmp 0x2a5ab
testq %r14, %r14
je 0x2a5a8
movq 0x10(%r14), %r12
jmp 0x2a5ab
xorl %r12d, %r12d
cmpq %rbx, %r12
je 0x2a5ff
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a3c2
testq %r12, %r12
je 0x2a5c8
movl (%r14), %eax
movq %rbx, 0x8(%r12,%rax)
testq %rbx, %rbx
je 0x2a5d4
movl (%r14), %eax
movq %r12, (%rbx,%rax)
testq %r15, %r15
je 0x2a5e0
movl (%r14), %eax
movq %rbx, (%r15,%rax)
testq %rbx, %rbx
je 0x2a5ed
movl (%r14), %eax
movq %r15, 0x8(%rbx,%rax)
testq %r15, %r15
jne 0x2a5f6
movq %rbx, 0x10(%r14)
testq %r12, %r12
jne 0x2a5ff
movq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_color.c
// Function: lv_color_hsv_to_rgb
lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v)
{
    h = (uint32_t)((uint32_t)h * 255) / 360;
    s = (uint16_t)((uint16_t)s * 255) / 100;
    v = (uint16_t)((uint16_t)v * 255) / 100;

    uint8_t r, g, b;

    uint8_t region, remainder, p, q, t;

    if(s == 0) {
        r = v;
        g = v;
        b = v;
        return lv_color_make(v, v, v);
    }

    region    = h / 43;
    remainder = (h - (region * 43)) * 6;

    p = (v * (255 - s)) >> 8;
    q = (v * (255 - ((s * remainder) >> 8))) >> 8;
    t = (v * (255 - ((s * (255 - remainder)) >> 8))) >> 8;

    switch(region) {
        case 0:
            r = v;
            g = t;
            b = p;
            break;
        case 1:
            r = q;
            g = v;
            b = p;
            break;
        case 2:
            r = p;
            g = v;
            b = t;
            break;
        case 3:
            r = p;
            g = q;
            b = v;
            break;
        case 4:
            r = t;
            g = p;
            b = v;
            break;
        default:
            r = v;
            g = p;
            b = q;
            break;
    }

    lv_color_t result = lv_color_make(r, g, b);
    return result;
}

// Assembly:
movl %esi, %eax
shll $0x8, %eax
subl %esi, %eax
movl $0xffff, %esi           # imm = 0xFFFF
andl %esi, %eax
shrl $0x2, %eax
imull $0x147b, %eax, %ecx     # imm = 0x147B
shrl $0x11, %ecx
movl %edx, %eax
shll $0x8, %eax
subl %edx, %eax
andl %esi, %eax
shrl $0x2, %eax
imull $0x147b, %eax, %eax     # imm = 0x147B
shrl $0x11, %eax
andw $0xff, %cx
je 0x2a6f4
movzwl %cx, %r8d
movzwl %di, %ecx
movl %ecx, %edx
shll $0x8, %edx
subl %ecx, %edx
imulq $0xb60b61, %rdx, %rcx   # imm = 0xB60B61
shrq $0x20, %rcx
imulq $0x10ef32b, %rdx, %rdi  # imm = 0x10EF32B
shrq $0x26, %rdi
imull $0xd5, %edi, %edx
addl %ecx, %edx
addl %edx, %edx
leal (%rdx,%rdx,2), %esi
movzwl %ax, %r10d
movl $0xff, %r9d
andl %r9d, %r10d
movl %r8d, %edx
xorl %r9d, %edx
imull %r10d, %edx
shrl $0x8, %edx
andl %r9d, %esi
movl %esi, %ecx
imull %r8d, %ecx
shrl $0x8, %ecx
xorl %r9d, %ecx
imull %r10d, %ecx
shrl $0x8, %ecx
cmpb $0x4, %dil
ja 0x2a72e
xorl %r9d, %esi
imull %r8d, %esi
shrl $0x8, %esi
xorl %r9d, %esi
imull %r10d, %esi
shrl $0x8, %esi
andl %edi, %r9d
leaq 0x189a9(%rip), %rdi     # 0x4308c
movslq (%rdi,%r9,4), %r8
addq %rdi, %r8
jmpq *%r8
movl %esi, %edi
movl %edx, %r8d
jmp 0x2a733
movzwl %ax, %eax
movl %eax, %ecx
shrl $0x3, %ecx
movl %ecx, %edx
andl $0x1f, %edx
andl $0xfc, %eax
shll $0xb, %ecx
leal (%rcx,%rax,8), %eax
jmp 0x2a753
movl %edx, %edi
movl %eax, %r8d
movl %esi, %ecx
jmp 0x2a735
movl %eax, %edi
movl %esi, %r8d
jmp 0x2a723
movl %ecx, %edi
movl %eax, %r8d
movl %edx, %ecx
jmp 0x2a735
movl %eax, %edi
movl %edx, %r8d
jmp 0x2a735
movl %edx, %edi
movl %ecx, %r8d
movl %eax, %ecx
shrb $0x3, %r8b
movzbl %r8b, %eax
shrb $0x2, %dil
movzbl %dil, %edx
shll $0x5, %edx
orl %eax, %edx
shrb $0x3, %cl
movzbl %cl, %eax
shll $0xb, %eax
orl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_color.c
// Function: lv_color_rgb_to_hsv
lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8)
{
    uint16_t r = ((uint32_t)r8 << 10) / 255;
    uint16_t g = ((uint32_t)g8 << 10) / 255;
    uint16_t b = ((uint32_t)b8 << 10) / 255;

    uint16_t rgbMin = r < g ? (r < b ? r : b) : (g < b ? g : b);
    uint16_t rgbMax = r > g ? (r > b ? r : b) : (g > b ? g : b);

    lv_color_hsv_t hsv;

    // https://en.wikipedia.org/wiki/HSL_and_HSV#Lightness
    hsv.v = (100 * rgbMax) >> 10;

    int32_t delta = rgbMax - rgbMin;
    if (LV_MATH_ABS(delta) < 3) {
        hsv.h = 0;
        hsv.s = 0;
        return hsv;
    }

    // https://en.wikipedia.org/wiki/HSL_and_HSV#Saturation
    hsv.s = 100 * delta / rgbMax;
    if(hsv.s < 3) {
        hsv.h = 0;
        return hsv;
    }

    // https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
    int32_t h;
    if(rgbMax == r)
        h = (((g - b) << 10) / delta) + (g < b ? (6 << 10) : 0); // between yellow & magenta
    else if(rgbMax == g)
        h = (((b - r) << 10) / delta) + (2 << 10); // between cyan & yellow
    else if(rgbMax == b)
        h = (((r - g) << 10) / delta) + (4 << 10); // between magenta & cyan
    else
        h = 0;
    h *= 60;
    h >>= 10;
    if (h < 0) h += 360;

    hsv.h = h;
    return hsv;
}

// Assembly:
pushq %rbp
pushq %rbx
shll $0xa, %edi
imulq $0x1010102, %rdi, %r10  # imm = 0x1010102
shrq $0x20, %r10
shll $0xa, %esi
imulq $0x1010102, %rsi, %r9   # imm = 0x1010102
shrq $0x20, %r9
shll $0xa, %edx
imulq $0x1010102, %rdx, %rsi  # imm = 0x1010102
shrq $0x20, %rsi
movl %r10d, %edi
subl %r9d, %edi
movl %r9d, %eax
cmovbl %r10d, %eax
movl %r9d, %ebx
cmoval %r10d, %ebx
cmpl %esi, %eax
cmovael %esi, %eax
cmpl %esi, %ebx
movl %esi, %r8d
cmoval %ebx, %r8d
movl %r8d, %r11d
subl %eax, %r11d
movl %r11d, %eax
negl %eax
cmovsl %r11d, %eax
xorl %ebp, %ebp
cmpl $0x3, %eax
jae 0x2a7be
xorl %ecx, %ecx
jmp 0x2a831
imull $0x64, %r11d, %eax
cltd
idivl %r8d
movl %eax, %ecx
movzbl %cl, %eax
cmpl $0x3, %eax
jb 0x2a831
cmpl %r10d, %r8d
jne 0x2a7f1
movl %r9d, %eax
subl %esi, %eax
shll $0xa, %eax
cltd
idivl %r11d
movl %eax, %edx
leal 0x1800(%rdx), %eax
cmpl %esi, %r9d
cmovael %edx, %eax
jmp 0x2a81d
cmpl %r9d, %r8d
jne 0x2a809
subl %r10d, %esi
shll $0xa, %esi
movl %esi, %eax
cltd
idivl %r11d
addl $0x800, %eax            # imm = 0x800
jmp 0x2a81d
xorl %eax, %eax
cmpl %ebx, %esi
jb 0x2a81d
shll $0xa, %edi
movl %edi, %eax
cltd
idivl %r11d
addl $0x1000, %eax           # imm = 0x1000
imull $0x3c, %eax, %eax
sarl $0xa, %eax
leal 0x168(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movzwl %dx, %ebp
imull $0x190000, %r8d, %edx   # imm = 0x190000
andl $0x7f000000, %edx       # imm = 0x7F000000
orl %ebp, %edx
movzbl %cl, %eax
shll $0x10, %eax
orl %edx, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_utf8_size
static uint8_t lv_txt_utf8_size(const char * str)
{
    if((str[0] & 0x80) == 0)
        return 1;
    else if((str[0] & 0xE0) == 0xC0)
        return 2;
    else if((str[0] & 0xF0) == 0xE0)
        return 3;
    else if((str[0] & 0xF8) == 0xF0)
        return 4;
    return 0; /*If the char was invalid tell it's 1 byte long*/
}

// Assembly:
movzbl (%rdi), %ecx
movb $0x1, %al
testb %cl, %cl
js 0x2a8a6
retq
movl %ecx, %edx
andl $-0x20, %edx
movb $0x2, %al
cmpl $0xc0, %edx
je 0x2a8a5
movl %ecx, %edx
andl $-0x10, %edx
movb $0x3, %al
cmpl $0xe0, %edx
je 0x2a8a5
andl $-0x8, %ecx
cmpl $0xf0, %ecx
sete %al
shlb $0x2, %al
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_unicode_to_utf8
static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni)
{
    if(letter_uni < 128) return letter_uni;
    uint8_t bytes[4];

    if(letter_uni < 0x0800) {
        bytes[0] = ((letter_uni >> 6) & 0x1F) | 0xC0;
        bytes[1] = ((letter_uni >> 0) & 0x3F) | 0x80;
        bytes[2] = 0;
        bytes[3] = 0;
    } else if(letter_uni < 0x010000) {
        bytes[0] = ((letter_uni >> 12) & 0x0F) | 0xE0;
        bytes[1] = ((letter_uni >> 6) & 0x3F) | 0x80;
        bytes[2] = ((letter_uni >> 0) & 0x3F) | 0x80;
        bytes[3] = 0;
    } else if(letter_uni < 0x110000) {
        bytes[0] = ((letter_uni >> 18) & 0x07) | 0xF0;
        bytes[1] = ((letter_uni >> 12) & 0x3F) | 0x80;
        bytes[2] = ((letter_uni >> 6) & 0x3F) | 0x80;
        bytes[3] = ((letter_uni >> 0) & 0x3F) | 0x80;
    }

    uint32_t * res_p = (uint32_t *)bytes;
    return *res_p;
}

// Assembly:
movl %edi, %eax
cmpl $0x80, %edi
jb 0x2a987
cmpl $0x7ff, %eax            # imm = 0x7FF
ja 0x2a904
movl %eax, %ecx
shrl $0x6, %ecx
orl $0xc0, %ecx
andl $0x3f, %eax
orl $0x80, %eax
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
jmp 0x2a979
cmpl $0xffff, %eax           # imm = 0xFFFF
ja 0x2a930
movl %eax, %ecx
shrl $0xc, %ecx
orl $0xe0, %ecx
movl %eax, %edx
shrl $0x6, %edx
andl $0x3f, %edx
movl $0x80, %esi
orl %esi, %edx
andl $0x3f, %eax
orl %esi, %eax
xorl %edi, %edi
movl %eax, %esi
jmp 0x2a979
xorl %edi, %edi
movl $0x0, %esi
movl $0x0, %edx
movl $0x0, %ecx
cmpl $0x10ffff, %eax         # imm = 0x10FFFF
ja 0x2a979
movl %eax, %ecx
shrl $0x12, %ecx
orl $0xf0, %ecx
movl %eax, %edx
shrl $0xc, %edx
andl $0x3f, %edx
movl $0x80, %edi
orl %edi, %edx
movl %eax, %esi
shrl $0x6, %esi
andl $0x3f, %esi
orl %edi, %esi
andl $0x3f, %eax
shll $0x18, %eax
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, %edi
shll $0x10, %esi
orl %edi, %esi
shll $0x8, %edx
orl %esi, %edx
orl %ecx, %edx
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_utf8_prev
static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i)
{
    uint8_t c_size;
    uint8_t cnt = 0;

    /*Try to find a !0 long UTF-8 char by stepping one character back*/
    (*i)--;
    do {
        if(cnt >= 4) return 0; /*No UTF-8 char found before the initial*/

        c_size = lv_txt_encoded_size(&txt[*i]);
        if(c_size == 0) {
            if(*i != 0)
                (*i)--;
            else
                return 0;
        }
        cnt++;
    } while(c_size == 0);

    uint32_t i_tmp  = *i;
    uint32_t letter = lv_txt_encoded_next(txt, &i_tmp); /*Character found, get it*/

    return letter;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ecx
decl %ecx
movl %ecx, (%rsi)
movb $0x4, %bpl
movl %ecx, %edi
addq %rbx, %rdi
callq *0x28a49(%rip)          # 0x53618
testb %al, %al
jne 0x2abe8
movl (%r14), %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x2abfb
decl %ecx
movl %ecx, (%r14)
decb %bpl
jne 0x2abc4
jmp 0x2abfb
movl (%r14), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq *0x28a35(%rip)          # 0x53630
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_utf8_get_byte_id
static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id)
{
    uint32_t i;
    uint32_t byte_cnt = 0;
    for(i = 0; i < utf8_id; i++) {
        uint8_t c_size = lv_txt_encoded_size(&txt[byte_cnt]);
        byte_cnt += c_size > 0 ? c_size : 1;
    }

    return byte_cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x2ac3b
movl %esi, %ebx
movq %rdi, %r14
xorl %ebp, %ebp
movl $0x1, %r15d
movl %ebp, %edi
addq %r14, %rdi
callq *0x289f1(%rip)          # 0x53618
movzbl %al, %eax
cmpb $0x2, %al
cmovbl %r15d, %eax
movzbl %al, %eax
addl %eax, %ebp
decl %ebx
jne 0x2ac1c
jmp 0x2ac3d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_utf8_get_char_id
static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id)
{
    uint32_t i        = 0;
    uint32_t char_cnt = 0;

    while(i < byte_id) {
        lv_txt_encoded_next(txt, &i); /*'i' points to the next letter so use the prev. value*/
        char_cnt++;
    }

    return char_cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x0, 0x4(%rsp)
testl %esi, %esi
je 0x2ac7f
movl %esi, %ebx
movq %rdi, %r14
xorl %ebp, %ebp
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq *0x289bb(%rip)          # 0x53630
incl %ebp
cmpl %ebx, 0x4(%rsp)
jb 0x2ac69
jmp 0x2ac81
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_utf8_get_length
static uint32_t lv_txt_utf8_get_length(const char * txt)
{
    uint32_t len = 0;
    uint32_t i   = 0;

    while(txt[i] != '\0') {
        lv_txt_encoded_next(txt, &i);
        len++;
    }

    return len;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
cmpb $0x0, (%rdi)
je 0x2acc7
movq %rdi, %rbx
xorl %ebp, %ebp
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq *0x28977(%rip)          # 0x53630
incl %ebp
movl 0xc(%rsp), %eax
cmpb $0x0, (%rbx,%rax)
jne 0x2acad
jmp 0x2acc9
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_misc/lv_txt.c
// Function: lv_txt_get_width
lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, lv_coord_t letter_space,
                            lv_txt_flag_t flag)
{
    if(txt == NULL) return 0;
    if(font == NULL) return 0;

    uint32_t i                   = 0;
    lv_coord_t width             = 0;
    lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT;
    uint32_t letter;
    uint32_t letter_next;

    if(length != 0) {
        while(i < length) {
            letter      = lv_txt_encoded_next(txt, &i);
            letter_next = lv_txt_encoded_next(&txt[i], NULL);
            if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
                if(lv_txt_is_cmd(&cmd_state, letter) != false) {
                    continue;
                }
            }

            lv_coord_t char_width = lv_font_get_glyph_width(font, letter, letter_next);
            if(char_width > 0) {
                width += char_width;
                width += letter_space;
            }
        }

        if(width > 0) {
            width -= letter_space; /*Trim the last letter space. Important if the text is center
                                      aligned */
        }
    }

    return width;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %dil
orb %al, %dil
jne 0x2b3a8
movl $0x0, 0x4(%rsp)
testw %si, %si
je 0x2b3a8
movl %r8d, %ebp
movq %rdx, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
movzwl %si, %ebx
xorl %ecx, %ecx
leaq 0x4(%rsp), %r12
xorl %edx, %edx
movq %rcx, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
movl %edx, %r14d
movq %r15, %rdi
movq %r12, %rsi
callq *0x28322(%rip)          # 0x53630
movl %eax, %r13d
movl 0x4(%rsp), %edi
addq %r15, %rdi
xorl %esi, %esi
callq *0x28310(%rip)          # 0x53630
testb $0x1, %bpl
je 0x2b35a
cmpl $0x23, %r13d
jne 0x2b340
movb $0x1, %cl
testb %r14b, %r14b
je 0x2b34f
movzbl %r14b, %ecx
cmpl $0x2, %ecx
jne 0x2b398
xorl %ecx, %ecx
jmp 0x2b34f
cmpb $0x1, %r14b
jne 0x2b362
cmpl $0x20, %r13d
sete %cl
incb %cl
movl %ecx, %r14d
cmpl %ebx, 0x4(%rsp)
jb 0x2b302
jmp 0x2b3ac
movq 0x20(%rsp), %rcx
movl %ecx, %r14d
movq 0x18(%rsp), %rdi
movl %r13d, %esi
movl %eax, %edx
callq 0x28487
movl %eax, %ecx
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
addl %edx, %eax
addl %ecx, %eax
testw %cx, %cx
cmovlel %edx, %eax
movl %eax, %ecx
movl %r14d, %edx
cmpl %ebx, 0x4(%rsp)
jb 0x2b2f5
jmp 0x2b3b1
movl $0x23, %r13d
cmpl $0x1, %ecx
jne 0x2b362
xorl %r14d, %r14d
jmp 0x2b362
xorl %eax, %eax
jmp 0x2b3c0
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
testw %ax, %ax
movq 0x8(%rsp), %rdx
cmovlel %ecx, %edx
subl %edx, %eax
addq $0x28, %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_txt.c
// Function: lv_txt_ins
void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt)
{
    size_t old_len = strlen(txt_buf);
    size_t ins_len = strlen(ins_txt);
    size_t new_len = ins_len + old_len;
    pos              = lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/

    /*Copy the second part into the end to make place to text to insert*/
    size_t i;
    for(i = new_len; i >= pos + ins_len; i--) {
        txt_buf[i] = txt_buf[i - ins_len];
    }

    /* Copy the text into the new space*/
    memcpy(txt_buf + pos, ins_txt, ins_len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x2070
movq %rax, %r12
movq %rbx, %rdi
callq 0x2070
movq %rax, %r15
leaq (%rax,%r12), %r13
movq %r14, %rdi
movl %ebp, %esi
callq *0x28209(%rip)          # 0x53640
movl %eax, %eax
movq %r15, %rcx
addq %rax, %rcx
cmpq %rcx, %r13
jb 0x2b454
movb (%r14,%r12), %dl
movb %dl, (%r14,%r13)
decq %r13
decq %r12
jmp 0x2b43f
addq %rax, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O3/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 *0x281aa(%rip)          # 0x53640
movl %eax, %r15d
leaq (%rbx,%r15), %rdi
movl %ebp, %esi
callq *0x2819b(%rip)          # 0x53640
movl %eax, %ecx
subq %rcx, %r14
cmpq %r15, %r14
jb 0x2b4cb
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 0x2b4b6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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:
imull $0x2d83, %edi, %eax     # imm = 0x2D83
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x16, %eax
addl %ecx, %eax
imull $0x168, %eax, %eax      # imm = 0x168
subl %eax, %edi
leal 0x168(%rdi), %eax
testw %di, %di
cmovnsl %edi, %eax
cmpw $0x59, %ax
ja 0x2b507
movzwl %ax, %eax
jmp 0x2b51c
movzwl %ax, %ecx
cmpl $0xb3, %ecx
ja 0x2b528
movl $0xb4, %ecx
subl %eax, %ecx
movzwl %cx, %eax
leaq 0x17b8d(%rip), %rcx     # 0x430b0
movzwl (%rcx,%rax,2), %eax
retq
cmpl $0x10d, %ecx            # imm = 0x10D
ja 0x2b53a
addl $0xffffff4c, %eax       # imm = 0xFFFFFF4C
movzwl %ax, %ecx
jmp 0x2b544
movl $0x168, %ecx            # imm = 0x168
subl %eax, %ecx
movzwl %cx, %ecx
leaq 0x17b65(%rip), %rdx     # 0x430b0
xorl %eax, %eax
subw (%rdx,%rcx,2), %ax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2b684
testl %ecx, %ecx
je 0x2b6bf
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 0x2b695
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x2b6d1
js 0x2b6d7
xorl %ecx, %ecx
jmp 0x2b6de
movw $0x30, (%rax)
retq
movb $0x2d, (%rax)
negl %edi
movb $0x1, %cl
movl $0xcccccccd, %esi       # imm = 0xCCCCCCCD
movl %ecx, %edx
movl %edi, %r8d
imulq %rsi, %r8
shrq $0x23, %r8
leal (%r8,%r8), %r9d
leal (%r9,%r9,4), %r9d
movl %edi, %r10d
subl %r9d, %r10d
orb $0x30, %r10b
movsbq %dl, %r9
incb %dl
movb %r10b, (%rax,%r9)
cmpl $0x9, %edi
movl %r8d, %edi
ja 0x2b6e5
movsbq %dl, %rdi
movb $0x0, (%rax,%rdi)
decb %dil
cmpb %cl, %dil
jle 0x2b754
addb $-0x2, %dl
movzbl %cl, %ecx
movsbq %dl, %rsi
movsbq %dil, %rdx
movb (%rax,%rcx), %dil
movb (%rax,%rdx), %r8b
movb %r8b, (%rax,%rcx)
movb %dil, (%rax,%rdx)
incq %rcx
leaq -0x1(%rsi), %rdi
decq %rdx
cmpq %rsi, %rcx
movq %rdi, %rsi
jl 0x2b732
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2b7b7
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 0x2b7ae
notl %r12d
andl $0x1, %r12d
subl %r12d, %ebx
addq 0x8(%rsp), %r13
movq %r13, %r15
jmp 0x2b7b0
jns 0x2b7ba
movl %ebx, %r12d
testl %ebx, %ebx
jne 0x2b780
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %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_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 0x29f85
testq %rax, %rax
je 0x2b823
movq %rax, %r15
leaq 0x3b(%rip), %rdi        # 0x2b82b
xorl %esi, %esi
movl $0x5, %edx
movq %rax, %rcx
callq 0x29125
testq %rax, %rax
je 0x2b81b
movq %r14, (%r15)
movq %rbx, 0x8(%r15)
movq %r15, 0x10(%rax)
movq %rax, %rdi
callq 0x29250
movb $0x1, %al
jmp 0x2b825
movq %r15, %rdi
callq 0x2a006
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2c2b8
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 0x2c2bb
movq %rax, %r10
cmpq $0x1f, %rbp
movq %r11, %rbp
jb 0x2c27a
jmp 0x2c2bb
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 0x2cb6c
addq $0x58, %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_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 0x2cd68
movl 0x60(%rsp), %ebp
movq (%rsp), %r14
subq %r13, %rbp
jbe 0x2cd68
movq (%rsp), %rdx
leaq 0x1(%rdx), %r14
movl $0x20, %edi
movq %r15, %rsi
movq %rbx, %rcx
callq *%r12
movq %r14, %rdx
decq %rbp
jne 0x2cd4e
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
testq %r13, %r13
je 0x2cdaf
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 0x2cd8b
jmp 0x2cdb2
movq %r14, %rbp
movl 0x68(%rsp), %eax
testb $0x2, %al
je 0x2ce06
movl 0x60(%rsp), %ebx
movq %rbp, %rax
movq (%rsp), %r13
subq %r13, %rax
cmpq %rbx, %rax
jae 0x2ce06
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 0x2cdda
jmp 0x2ce09
movq %rbp, %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x2e72a
cmpw $0x0, 0xc(%rsi)
je 0x2e730
movw $0x5, 0xc(%rsi)
movd 0x2(%rsi), %xmm0
movdqa %xmm0, %xmm1
psrlw $0x8, %xmm1
pand 0x1142a(%rip), %xmm1    # 0x3fb70
movdqa 0x10932(%rip), %xmm2    # 0x3f080
pmullw %xmm2, %xmm1
pand 0x10906(%rip), %xmm1    # 0x3f060
movdqa %xmm0, %xmm3
psrlw $0x5, %xmm3
pand 0x10905(%rip), %xmm3    # 0x3f070
pmullw %xmm2, %xmm3
paddw 0x10949(%rip), %xmm3    # 0x3f0c0
psrlw $0x3, %xmm3
pand 0x1091c(%rip), %xmm3    # 0x3f0a0
pand 0x10924(%rip), %xmm0    # 0x3f0b0
pmullw %xmm2, %xmm0
psrlw $0x8, %xmm0
por %xmm1, %xmm0
por %xmm3, %xmm0
movd %xmm0, 0x2(%rsi)
movzwl 0x10(%rsi), %edx
movl %edx, %eax
shrl $0x8, %eax
andl $-0x8, %eax
imull $0x99, %eax, %edi
movl $0xf800, %eax           # imm = 0xF800
andl %eax, %edi
movl %edx, %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
imull $0x99, %ecx, %r8d
addl $0xcc0, %r8d            # imm = 0xCC0
shrl $0x3, %r8d
movl $0x7e0, %ecx            # imm = 0x7E0
andl %ecx, %r8d
andl $0x1f, %edx
imull $0x99, %edx, %edx
shrl $0x8, %edx
orl %edi, %edx
orl %r8d, %edx
movw %dx, 0x10(%rsi)
movzwl 0x20(%rsi), %edx
movl %edx, %edi
shrl $0x8, %edi
andl $-0x8, %edi
imull $0xb2, %edi, %edi
andl %eax, %edi
movl %edx, %eax
shrl $0x5, %eax
andl $0x3f, %eax
imull $0xb2, %eax, %eax
addl $0x9a0, %eax            # imm = 0x9A0
shrl $0x3, %eax
andl %ecx, %eax
andl $0x1f, %edx
imull $0xb2, %edx, %ecx
shrl $0x8, %ecx
orl %edi, %ecx
orl %eax, %ecx
movw %cx, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/OnionIoT[P]lv_example/lvgl/src/lv_themes/lv_theme.c
// Function: lv_theme_set_current
void lv_theme_set_current(lv_theme_t * th)
{
#if LV_THEME_LIVE_UPDATE == 0
    current_theme = th;

#if LV_USE_GROUP
    /*Copy group style modification callback functions*/
    memcpy(&current_theme->group, &th->group, sizeof(th->group));
#endif

    /*Let the object know their style might change*/
    lv_obj_report_style_mod(NULL);

#else
    uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/

    if(!inited) {
        /*Initialize the style pointers `current_theme` to point to the `th_styles` style array */
        uint16_t i;
        lv_style_t ** cur_th_style_p = (lv_style_t **)&current_theme.style;
        for(i = 0; i < style_num; i++) {
            uintptr_t adr = (uintptr_t)&th_styles[i];
            memcpy(&cur_th_style_p[i], &adr, sizeof(lv_style_t *));
        }
        inited = true;
    }

    /*Copy the styles pointed by the new theme to the `th_styles` style array*/
    uint16_t i;
    lv_style_t ** th_style = (lv_style_t **)&th->style;
    for(i = 0; i < style_num; i++) {
        uintptr_t s = (uintptr_t)th_style[i];
        if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t));
    }

#if LV_USE_GROUP
    /*Copy group style modification callback functions*/
    memcpy(&current_theme.group, &th->group, sizeof(th->group));
#endif

    /*Let the object know their style might change*/
    lv_obj_report_style_mod(NULL);

#endif

#if LV_USE_GROUP
    lv_group_report_style_mod(NULL);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x3b172(%rip)     # 0x699c0
jne 0x2e8c0
movdqa 0x10d98(%rip), %xmm0    # 0x3f5f0
xorl %eax, %eax
movdqa 0x14aee(%rip), %xmm1    # 0x43350
leaq 0x3b4c7(%rip), %rcx     # 0x69d30
movq %rcx, %xmm2
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
leaq 0x3b14e(%rip), %rcx     # 0x699c8
movdqa 0x14ade(%rip), %xmm3    # 0x43360
movdqa %xmm0, %xmm4
pmuludq %xmm1, %xmm4
paddq %xmm2, %xmm4
movdqa %xmm0, %xmm5
psrlq $0x20, %xmm5
pmuludq %xmm1, %xmm5
psllq $0x20, %xmm5
paddq %xmm4, %xmm5
movdqu %xmm5, (%rax,%rcx)
paddq %xmm3, %xmm0
addq $0x10, %rax
cmpq $0x350, %rax            # imm = 0x350
jne 0x2e882
movb $0x1, 0x3b100(%rip)     # 0x699c0
xorl %r14d, %r14d
leaq 0x3b466(%rip), %r15     # 0x69d30
movq %rbx, %r12
movq (%r12), %rsi
testq %rsi, %rsi
je 0x2e8e4
leaq (%r15,%r14), %rdi
movl $0x48, %edx
callq 0x20f0
addq $0x8, %r12
addq $0x48, %r14
cmpq $0x1dd0, %r14           # imm = 0x1DD0
jne 0x2e8cd
movups 0x350(%rbx), %xmm0
movups %xmm0, 0x3b415(%rip)    # 0x69d18
xorl %edi, %edi
callq 0x5e90
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2b46
// File: /workspace/github_c_makefile_star2_O3/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 0x2ef23
cmpw $0x0, 0xc(%rsi)
je 0x2ef29
movw $0x5, 0xc(%rsi)
movd 0x2(%rsi), %xmm0
movdqa %xmm0, %xmm1
psrlw $0xb, %xmm1
pmullw 0x10101(%rip), %xmm1    # 0x3f040
paddw 0x10109(%rip), %xmm1    # 0x3f050
pand 0x10111(%rip), %xmm1    # 0x3f060
movdqa %xmm0, %xmm2
psrlw $0x5, %xmm2
pand 0x10110(%rip), %xmm2    # 0x3f070
movdqa 0x10118(%rip), %xmm3    # 0x3f080
pmullw %xmm3, %xmm2
paddw 0x1011c(%rip), %xmm2    # 0x3f090
psrlw $0x3, %xmm2
pand 0x1011f(%rip), %xmm2    # 0x3f0a0
pand 0x10127(%rip), %xmm0    # 0x3f0b0
pmullw %xmm3, %xmm0
psrlw $0x8, %xmm0
por %xmm1, %xmm0
por %xmm2, %xmm0
movd %xmm0, 0x2(%rsi)
movzwl 0x10(%rsi), %edx
movl %edx, %eax
shrl $0xb, %eax
imull $0x4c8, %eax, %edi      # imm = 0x4C8
addl $0x62d0, %edi           # imm = 0x62D0
movl $0xf800, %eax           # imm = 0xF800
andl %eax, %edi
movl %edx, %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
imull $0x99, %ecx, %r8d
addl $0x1056, %r8d           # imm = 0x1056
shrl $0x3, %r8d
movl $0x7e0, %ecx            # imm = 0x7E0
andl %ecx, %r8d
andl $0x1f, %edx
imull $0x99, %edx, %edx
shrl $0x8, %edx
orl %edi, %edx
orl %r8d, %edx
movw %dx, 0x10(%rsi)
movzwl 0x20(%rsi), %edx
movl %edx, %edi
shrl $0xb, %edi
imull $0x590, %edi, %edi      # imm = 0x590
addl $0x4a98, %edi           # imm = 0x4A98
andl %eax, %edi
movl %edx, %eax
shrl $0x5, %eax
andl $0x3f, %eax
imull $0xb2, %eax, %eax
addl $0xc55, %eax            # imm = 0xC55
shrl $0x3, %eax
andl %ecx, %eax
andl $0x1f, %edx
imull $0xb2, %edx, %ecx
shrl $0x8, %ecx
orl %edi, %ecx
orl %eax, %ecx
movw %cx, 0x20(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3b036(%rip), %edi     # 0x6ff00
movl $0x14, %esi
movl $0x5a, %edx
callq 0x2a624
movw %ax, 0x10(%rbx)
movzwl 0x3b01c(%rip), %edi     # 0x6ff00
movl $0x28, %esi
movl $0x50, %edx
callq 0x2a624
movw %ax, 0x2(%rbx)
movzwl 0x3b002(%rip), %edi     # 0x6ff00
movl $0x28, %esi
movl $0x50, %edx
callq 0x2a624
movw %ax, 0x4(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movl %r8d, %r15d
cmpb $0x10, %r15b
jb 0x35718
movl %edi, %ebp
cmpb $-0x4, %r15b
movzbl %r15b, %r12d
movl $0xff, %r13d
cmovbl %r12d, %r13d
cmpw %bp, (%rdx)
jg 0x35718
cmpw %bp, 0x4(%rdx)
jl 0x35718
movl %esi, %r14d
cmpw %r14w, 0x2(%rdx)
jg 0x35718
cmpw %r14w, 0x6(%rdx)
jl 0x35718
movl %ecx, %ebx
callq 0x7293
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0x85d8
movq 0x10(%rsp), %rdi
movzwl 0x1c(%rax), %edx
movzwl 0x20(%rax), %ecx
subl %edx, %ecx
incl %ecx
subl %edx, %ebp
subw 0x1e(%rax), %r14w
movq 0x28(%rdi), %r10
testq %r10, %r10
je 0x356e5
movq 0x10(%rax), %rsi
movzbl %r13b, %eax
movl %eax, (%rsp)
movswl %cx, %edx
movswl %bp, %ecx
movswl %r14w, %r8d
movl %ebx, %r9d
callq *%r10
jmp 0x35718
movswl %cx, %ecx
movswl %r14w, %edx
imull %ecx, %edx
movswl %bp, %r14d
addl %edx, %r14d
movq 0x10(%rax), %r13
cmpb $-0x5, %r15b
ja 0x35712
movzwl (%r13,%r14,2), %esi
movl %ebx, %edi
movl %r12d, %edx
callq 0x35727
movl %eax, %ebx
movw %bx, (%r13,%r14,2)
addq $0x18, %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_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, 0x3b3a1(%rip)     # 0x71af0
jae 0x367a6
movl %edi, %eax
movl %edi, 0x3b397(%rip)     # 0x71af0
leaq 0x31e50(%rip), %rbx     # 0x685b0
movq (%rbx), %rdi
movl %eax, %esi
testq %rdi, %rdi
je 0x3678f
callq 0x2a06f
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x80e4
testb %al, %al
jne 0x367a6
movq (%rbx), %rsi
leaq 0x8948(%rip), %rdi      # 0x3f0d0
callq 0x8294
jmp 0x3678d
movq %rsi, %rdi
callq 0x29f85
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x80e4
testb %al, %al
je 0x367b2
leaq 0x31e03(%rip), %rax     # 0x685b0
movq (%rax), %rax
popq %rbx
retq
movq (%rbx), %rsi
leaq 0x8914(%rip), %rdi      # 0x3f0d0
callq 0x8294
jmp 0x367c1
// File: /workspace/github_c_makefile_star2_O3/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 0x31de5(%rip), %rbx     # 0x685b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x367e9
callq 0x2a006
movq $0x0, (%rbx)
movl $0x0, 0x3b307(%rip)     # 0x71af0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x368bd
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 0x367eb
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 0x35638
incl %r12d
cmpw %r12w, %r15w
jne 0x36873
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq