// File: /workspace/github_c_makefile_star2_O1/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_draw_basic.c
// Function: lv_draw_letter
void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter,
                    lv_color_t color, lv_opa_t opa)
{
    /*clang-format off*/
    const uint8_t bpp1_opa_table[2]  = {0, 255};          /*Opacity mapping with bpp = 1 (Just for compatibility)*/
    const uint8_t bpp2_opa_table[4]  = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
    const uint8_t bpp4_opa_table[16] = {0,  17, 34,  51,  /*Opacity mapping with bpp = 4*/
                                        68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255};
    /*clang-format on*/

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

    if(font_p == NULL) {
        LV_LOG_WARN("Font: character's bitmap not found");
        return;
    }

    lv_font_glyph_dsc_t g;
    bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0');
    if(g_ret == false) return;


    lv_coord_t pos_x = pos_p->x + g.ofs_x;
    lv_coord_t pos_y = pos_p->y + (font_p->line_height - font_p->base_line) - g.box_h - g.ofs_y;

    const uint8_t * bpp_opa_table;
    uint8_t bitmask_init;
    uint8_t bitmask;

    /*bpp = 3 should be converted to bpp = 4 in lv_font_get_glyph_bitmap */
    if(g.bpp == 3) g.bpp = 4;

    switch(g.bpp) {
        case 1:
            bpp_opa_table = bpp1_opa_table;
            bitmask_init  = 0x80;
            break;
        case 2:
            bpp_opa_table = bpp2_opa_table;
            bitmask_init  = 0xC0;
            break;
        case 4:
            bpp_opa_table = bpp4_opa_table;
            bitmask_init  = 0xF0;
            break;
        case 8:
            bpp_opa_table = NULL;
            bitmask_init  = 0xFF;
            break;       /*No opa table, pixel value will be used directly*/
        default: return; /*Invalid bpp. Can't render the letter*/
    }

    const uint8_t * map_p = lv_font_get_glyph_bitmap(font_p, letter);

    if(map_p == NULL) return;

    /*If the letter is completely out of mask don't draw it */
    if(pos_x + g.box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g.box_h < mask_p->y1 || pos_y > mask_p->y2) return;

    lv_disp_t * disp    = lv_refr_get_disp_refreshing();
    lv_disp_buf_t * vdb = lv_disp_get_buf(disp);

    lv_coord_t vdb_width     = lv_area_get_width(&vdb->area);
    lv_color_t * vdb_buf_tmp = vdb->buf_act;
    lv_coord_t col, row;

    uint8_t width_byte_scr = g.box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/
    if(g.box_w & 0x7) width_byte_scr++;
    uint16_t width_bit = g.box_w * g.bpp; /*Letter width in bits*/

    bool subpx = font_p->subpx == LV_FONT_SUBPX_NONE ? false : true;

    /* Calculate the col/row start/end on the map*/
    lv_coord_t col_start;
    lv_coord_t col_end;
    lv_coord_t row_start;
    lv_coord_t row_end;

    if(subpx == false) {
        col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x;
        col_end   = pos_x + g.box_w <= mask_p->x2 ? g.box_w : mask_p->x2 - pos_x + 1;
        row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y;
        row_end   = pos_y + g.box_h <= mask_p->y2 ? g.box_h : mask_p->y2 - pos_y + 1;
    } else {
        col_start = pos_x >= mask_p->x1 ? 0 : (mask_p->x1 - pos_x) * 3;
        col_end   = pos_x + g.box_w / 3 <= mask_p->x2 ? g.box_w : (mask_p->x2 - pos_x + 1) * 3;
        row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y;
        row_end   = pos_y + g.box_h <= mask_p->y2 ? g.box_h : mask_p->y2 - pos_y + 1;
    }

    /*Set a pointer on VDB to the first pixel of the letter*/
    vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) + pos_x - vdb->area.x1;

    /*If the letter is partially out of mask the move there on VDB*/
    if(subpx) vdb_buf_tmp += (row_start * vdb_width) + col_start / 3;
    else vdb_buf_tmp += (row_start * vdb_width) + col_start;

    /*Move on the map too*/
    uint32_t bit_ofs = (row_start * width_bit) + (col_start * g.bpp);
    map_p += bit_ofs >> 3;

    uint8_t letter_px;
    lv_opa_t px_opa = 0;
    uint16_t col_bit;
    col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */

    bool scr_transp = false;
#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
    scr_transp = disp->driver.screen_transp;
#endif

    uint8_t font_rgb[3];
    uint8_t txt_rgb[3] = {LV_COLOR_GET_R(color), LV_COLOR_GET_G(color), LV_COLOR_GET_B(color)};

    for(row = row_start; row < row_end; row++) {
        bitmask = bitmask_init >> col_bit;
        uint8_t sub_px_cnt = 0;
        for(col = col_start; col < col_end; col++) {
            letter_px = (*map_p & bitmask) >> (8 - col_bit - g.bpp);

            /*subpx == 0*/
            if(subpx == false) {
                if(letter_px != 0) {
                    if(opa == LV_OPA_COVER) {
                        px_opa = g.bpp == 8 ? letter_px : bpp_opa_table[letter_px];
                    } else {
                        px_opa = g.bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8
                                : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8;
                    }

                    if(disp->driver.set_px_cb) {
                        disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width,
                                (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa);
                    } else if(vdb_buf_tmp->full != color.full) {
                        if(px_opa > LV_OPA_MAX) {
                            *vdb_buf_tmp = color;
                        } else if(px_opa > LV_OPA_MIN) {
                            if(scr_transp == false) {
                                *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa);
                            } else {
#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
        *vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).ch.alpha, color, px_opa);
#endif
                            }
                        }
                    }
                }
                vdb_buf_tmp++;
            }
            /*Handle subpx drawing*/
            else {
                if(letter_px != 0) {
                    if(opa == LV_OPA_COVER) {
                        px_opa = g.bpp == 8 ? letter_px : bpp_opa_table[letter_px];
                    } else {
                        px_opa = g.bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8
                                : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8;
                    }

                    font_rgb[sub_px_cnt] = px_opa;
                } else {
                    font_rgb[sub_px_cnt] = 0;
                }
                sub_px_cnt ++;

                if(sub_px_cnt == 3) {
                    lv_color_t res_color;

                    if(font_rgb[0] == 0 && font_rgb[1] == 0 && font_rgb[2] == 0) {
                        res_color = *vdb_buf_tmp;
                    } else {

                        uint8_t bg_rgb[3] = {LV_COLOR_GET_R(*vdb_buf_tmp), LV_COLOR_GET_G(*vdb_buf_tmp), LV_COLOR_GET_B(*vdb_buf_tmp)};

#if LV_FONT_SUBPX_BGR
                        LV_COLOR_SET_B(res_color, (uint16_t)((uint16_t)txt_rgb[0] * font_rgb[0] + (bg_rgb[2] * (255 - font_rgb[0]))) >> 8);
                        LV_COLOR_SET_R(res_color, (uint16_t)((uint16_t)txt_rgb[2] * font_rgb[2] + (bg_rgb[0] * (255 - font_rgb[2]))) >> 8);
#else
                        LV_COLOR_SET_R(res_color, (uint16_t)((uint16_t)txt_rgb[0] * font_rgb[0] + (bg_rgb[0] * (255 - font_rgb[0]))) >> 8);
                        LV_COLOR_SET_B(res_color, (uint16_t)((uint16_t)txt_rgb[2] * font_rgb[2] + (bg_rgb[2] * (255 - font_rgb[2]))) >> 8);
#endif
                        LV_COLOR_SET_G(res_color, (uint16_t)((uint16_t)txt_rgb[1] * font_rgb[1] + (bg_rgb[1] * (255 - font_rgb[1]))) >> 8);
                    }
                    if(scr_transp == false) {
                        vdb_buf_tmp->full = res_color.full;
#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
                    } else {
                        *vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).ch.alpha, color, px_opa);
#endif
                    }
                    sub_px_cnt = 0;
                    vdb_buf_tmp++;
                }
            }


            if(col_bit < 8 - g.bpp) {
                col_bit += g.bpp;
                bitmask = bitmask >> g.bpp;
            } else {
                col_bit = 0;
                bitmask = bitmask_init;
                map_p++;
            }
        }

        col_bit += ((g.box_w - col_end) + col_start) * g.bpp;

        map_p += (col_bit >> 3);
        col_bit = col_bit & 0x7;

        /*Next row in VDB*/
        if(subpx) vdb_buf_tmp += vdb_width - (col_end - col_start) / 3;
        else vdb_buf_tmp += vdb_width - (col_end - col_start);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, %ebx
cmpb $0x10, %bl
jb 0x35cac
movq %rdx, %r15
cmpb $-0x4, %bl
movzbl %bl, %eax
movl $0xff, %ebp
cmovbl %eax, %ebp
testq %rdx, %rdx
je 0x35cac
movl %ecx, %r14d
movq %rsi, %r13
movq %rdi, %r12
movl %r8d, 0x34(%rsp)
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
movl %ecx, %edx
xorl %ecx, %ecx
callq 0x27d82
testb %al, %al
je 0x35cac
cmpb $0x3, 0x26(%rsp)
jne 0x3566b
movb $0x4, 0x26(%rsp)
movb 0x26(%rsp), %cl
decb %cl
cmpb $0x7, %cl
ja 0x35cac
movzbl %cl, %eax
movl $0x8b, %edx
btl %eax, %edx
jae 0x35cac
movzbl 0x10(%r15), %edx
movzbl 0x11(%r15), %esi
movl %esi, 0x10(%rsp)
movzbl 0x23(%rsp), %esi
movl %esi, 0x1c(%rsp)
addw 0x2(%r12), %dx
movq %rdx, 0x38(%rsp)
movsbl 0x25(%rsp), %edx
movl %edx, 0x2c(%rsp)
movsbl 0x24(%rsp), %esi
shlb $0x3, %cl
movabsq $-0x7f7f7f0f7f3f80, %rdx # imm = 0xFF808080F080C080
shrq %cl, %rdx
movq %rdx, 0x68(%rsp)
addw (%r12), %si
movq %rsi, %r12
leaq 0x1d6c1(%rip), %rcx     # 0x52da0
movq (%rcx,%rax,8), %rax
movq %rax, 0x50(%rsp)
movq %r15, %rdi
movl %r14d, %esi
callq 0x27d7c
testq %rax, %rax
je 0x35cac
movq %r12, %rdx
movq %rax, %r14
movswl %dx, %r12d
movzbl 0x22(%rsp), %eax
addl %r12d, %eax
movswl (%r13), %ecx
cmpl %ecx, %eax
jl 0x35cac
cmpw 0x4(%r13), %dx
jg 0x35cac
movl 0x10(%rsp), %eax
addl 0x1c(%rsp), %eax
addl 0x2c(%rsp), %eax
movq 0x38(%rsp), %rcx
subl %eax, %ecx
movq %rcx, 0x38(%rsp)
movswl %cx, %esi
movzbl 0x23(%rsp), %eax
addl %esi, %eax
movswl 0x2(%r13), %ecx
cmpl %ecx, %eax
jl 0x35cac
movq 0x38(%rsp), %rax
cmpw 0x6(%r13), %ax
jg 0x35cac
movq %rsi, 0x10(%rsp)
movq %rdx, 0x90(%rsp)
callq 0x72ad
movq %rax, 0x98(%rsp)
movq %rax, %rdi
callq 0x8660
movq 0x90(%rsp), %rsi
movq %rax, 0x88(%rsp)
movzbl 0x22(%rsp), %eax
movb 0x12(%r15), %r9b
movzwl (%r13), %ecx
movl %ecx, %edi
subl %esi, %edi
xorl %edx, %edx
testb $0x3, %r9b
je 0x357e1
cmpw %si, %cx
leal (%rdi,%rdi,2), %edi
cmovlel %edx, %edi
movq %rdi, 0x58(%rsp)
movl %eax, %ecx
imulq $0x55555556, %rcx, %rcx # imm = 0x55555556
shrq $0x20, %rcx
addl %r12d, %ecx
movswl 0x4(%r13), %edx
movl %edx, %esi
subl %r12d, %esi
cmpl %edx, %ecx
leal 0x3(%rsi,%rsi,2), %ecx
jmp 0x357fe
cmpw %si, %cx
cmovlel %edx, %edi
movq %rdi, 0x58(%rsp)
leal (%rax,%r12), %edx
movswl 0x4(%r13), %esi
movl %esi, %ecx
subl %r12d, %ecx
incl %ecx
cmpl %esi, %edx
cmovlel %eax, %ecx
movq 0x10(%rsp), %r11
movzwl 0x2(%r13), %r10d
xorl %edx, %edx
subw 0x38(%rsp), %r10w
cmovlel %edx, %r10d
movzbl 0x23(%rsp), %edx
leal (%rdx,%r11), %esi
movswl 0x6(%r13), %edi
movl %edi, %r8d
subl %r11d, %r8d
incl %r8d
cmpl %edi, %esi
cmovlel %edx, %r8d
movswl %r8w, %esi
movswl %r10w, %r13d
movl %esi, 0x7c(%rsp)
cmpl %r13d, %esi
jle 0x35cac
movq %r10, 0x60(%rsp)
movq 0x88(%rsp), %r15
movzwl 0x20(%r15), %esi
movswl 0x1c(%r15), %edi
subl %edi, %esi
incl %esi
movswl %si, %edx
movl %edx, 0x30(%rsp)
movb %r9b, 0xf(%rsp)
movl %r13d, %r9d
imull %edx, %r9d
movl %ecx, %edx
movl %ecx, 0x10(%rsp)
movswl 0x58(%rsp), %ecx
imull $0x5556, %ecx, %r8d     # imm = 0x5556
movl %r8d, %esi
shrl $0x1f, %esi
shrl $0x10, %r8d
addl %esi, %r8d
movswl %dx, %edx
movl %edx, %esi
movl %edx, 0x1c(%rsp)
subl %ecx, %esi
movslq %esi, %rsi
imulq $0x55555555, %rsi, %r10 # imm = 0x55555555
shrq $0x20, %r10
subl %esi, %r10d
movl %r10d, %esi
shrl $0x1f, %esi
sarl %r10d
addl %esi, %r10d
movl %ecx, %esi
subl %edx, %esi
testb $0x3, 0xf(%rsp)
movl %ecx, %edx
cmovnel %r8d, %edx
cmovnel %r10d, %esi
movswl %dx, %r8d
movl 0x34(%rsp), %edx
addl %r9d, %r8d
movq 0x10(%r15), %r9
subl %edi, %r12d
movswl 0x1e(%r15), %edi
movq 0x60(%rsp), %r15
subl %edi, %r11d
movzbl 0x26(%rsp), %edi
imull 0x30(%rsp), %r11d
addl %r12d, %r11d
movslq %r11d, %r10
leaq (%r9,%r10,2), %r11
movq 0x68(%rsp), %r10
movzwl %dx, %r12d
movl %edx, %r9d
andl $0x1f, %r9d
movl %r9d, 0x4c(%rsp)
imull %r13d, %eax
shrl $0x5, %edx
andl $0x3f, %edx
movl %edx, 0x48(%rsp)
addl %ecx, %eax
imull %edi, %eax
movl 0x1c(%rsp), %edi
movl %eax, %edx
shrl $0x3, %edx
addq %rdx, %r14
movl %r12d, 0x80(%rsp)
shrl $0xb, %r12d
movl %r12d, 0x44(%rsp)
movslq %r8d, %rdx
xorl %r8d, %r8d
leaq (%r11,%rdx,2), %rdx
movb 0xf(%rsp), %r9b
movzbl %bpl, %ebp
movl %ebp, 0x2c(%rsp)
movl %ecx, 0x78(%rsp)
subl 0x10(%rsp), %ecx
movl %ecx, 0x74(%rsp)
addl 0x30(%rsp), %esi
movslq %esi, %rcx
movq %rcx, 0xa0(%rsp)
movq %rdx, 0x10(%rsp)
andl $0x7, %eax
cmpl 0x78(%rsp), %edi
movq %r15, 0x60(%rsp)
jle 0x35c69
movl %r10d, %r13d
movl %eax, %ecx
shrb %cl, %r13b
movq 0x38(%rsp), %rcx
addl %r15d, %ecx
movl %ecx, 0x84(%rsp)
xorl %r12d, %r12d
movq 0x58(%rsp), %r15
movb (%r14), %cl
andb %r13b, %cl
movzwl %ax, %ebp
movzbl 0x26(%rsp), %edx
leal (%rdx,%rbp), %esi
movzbl %cl, %eax
movb $0x8, %cl
subb %sil, %cl
shrq %cl, %rax
testb $0x3, %r9b
je 0x359ec
testl %eax, %eax
je 0x35a1b
cmpb $-0x4, %bl
jb 0x35a1f
cmpb $0x8, %dl
je 0x35a35
movq 0x50(%rsp), %rcx
movb (%rcx,%rax), %al
jmp 0x35a35
testl %eax, %eax
je 0x35c28
cmpb $-0x4, %bl
jb 0x35b08
cmpb $0x8, %dl
movq 0x98(%rsp), %rdi
je 0x35b26
movq 0x50(%rsp), %rcx
movb (%rcx,%rax), %al
jmp 0x35b26
xorl %eax, %eax
jmp 0x35a35
cmpb $0x8, %dl
je 0x35a2d
movq 0x50(%rsp), %rcx
movzbl (%rcx,%rax), %eax
imull 0x2c(%rsp), %eax
shrl $0x8, %eax
movzbl %r12b, %r12d
movb %al, 0x29(%rsp,%r12)
incb %r12b
cmpb $0x3, %r12b
jne 0x35c2e
movzbl 0x29(%rsp), %eax
movb 0x2a(%rsp), %cl
movb 0x2b(%rsp), %dl
movl %eax, %esi
orb %cl, %sil
orb %dl, %sil
jne 0x35a71
movq 0x10(%rsp), %r12
movzwl (%r12), %eax
jmp 0x35af2
movzbl %cl, %ecx
movzbl %dl, %edx
movq 0x10(%rsp), %r12
movzwl (%r12), %edi
movl %edi, %r8d
shrl $0xb, %r8d
movl %edi, %esi
shrl $0x5, %esi
andl $0x3f, %esi
andl $0x1f, %edi
movl %eax, %r9d
imull 0x44(%rsp), %r9d
movl $0xff, %r11d
xorl %r11d, %eax
imull %r8d, %eax
addl %r9d, %eax
movb 0xf(%rsp), %r9b
andl $0x3f00, %eax           # imm = 0x3F00
movl %edx, %r8d
imull 0x4c(%rsp), %r8d
xorl %r11d, %edx
imull %edi, %edx
addl %r8d, %edx
xorl %r8d, %r8d
shrl $0x8, %edx
movl %ecx, %edi
imull 0x48(%rsp), %edi
xorl %r11d, %ecx
imull %esi, %ecx
addl %edi, %ecx
movl 0x1c(%rsp), %edi
shrl $0x3, %ecx
andl $0x7e0, %ecx            # imm = 0x7E0
andl $0x1f, %edx
leal (%rdx,%rax,8), %eax
orl %ecx, %eax
movw %ax, (%r12)
addq $0x2, %r12
movq %r12, 0x10(%rsp)
xorl %r12d, %r12d
jmp 0x35c2e
cmpb $0x8, %dl
movq 0x98(%rsp), %rdi
je 0x35b1e
movq 0x50(%rsp), %rcx
movzbl (%rcx,%rax), %eax
imull 0x2c(%rsp), %eax
shrl $0x8, %eax
movq 0x28(%rdi), %r10
testq %r10, %r10
je 0x35b89
movq 0x90(%rsp), %rcx
addl %r15d, %ecx
movq 0x88(%rsp), %r8
subw 0x1c(%r8), %cx
movq 0x10(%r8), %rsi
movl 0x84(%rsp), %edx
subw 0x1e(%r8), %dx
movzbl %al, %eax
movl %eax, (%rsp)
movswl %cx, %ecx
movswl %dx, %r8d
movl 0x30(%rsp), %edx
movl 0x80(%rsp), %r9d
callq *%r10
xorl %r8d, %r8d
movb 0xf(%rsp), %r9b
movq 0x68(%rsp), %r10
movl 0x1c(%rsp), %edi
jmp 0x35c28
movq 0x10(%rsp), %rcx
movzwl (%rcx), %ecx
cmpw 0x34(%rsp), %cx
movq 0x68(%rsp), %r10
movl 0x1c(%rsp), %edi
je 0x35c28
cmpb $-0x4, %al
jb 0x35bb7
movq 0x10(%rsp), %rax
movl 0x34(%rsp), %ecx
movw %cx, (%rax)
jmp 0x35c28
cmpb $0x11, %al
jb 0x35c28
movzbl %al, %edx
movl %edx, %esi
imull 0x44(%rsp), %esi
movl %ecx, %eax
shrl $0xb, %eax
movl %edx, %edi
xorl $0xff, %edi
imull %edi, %eax
addl %esi, %eax
andl $0x3f00, %eax           # imm = 0x3F00
movl %edx, %esi
imull 0x48(%rsp), %esi
movl %ecx, %r8d
shrl $0x5, %r8d
andl $0x3f, %r8d
imull %edi, %r8d
addl %esi, %r8d
shrl $0x3, %r8d
andl $0x7e0, %r8d            # imm = 0x7E0
imull 0x4c(%rsp), %edx
andl $0x1f, %ecx
imull %edi, %ecx
movl 0x1c(%rsp), %edi
addl %edx, %ecx
shrl $0x8, %ecx
andl $0x1f, %ecx
leal (%rcx,%rax,8), %eax
orl %r8d, %eax
xorl %r8d, %r8d
movq 0x10(%rsp), %rcx
movw %ax, (%rcx)
addq $0x2, 0x10(%rsp)
movzbl %r13b, %edx
movzbl 0x26(%rsp), %ecx
movl $0x8, %esi
subl %ecx, %esi
movl %ecx, %eax
addl %ebp, %eax
shrl %cl, %edx
xorl %ecx, %ecx
cmpl %ebp, %esi
cmovlel %r8d, %eax
setle %cl
movzbl %r10b, %r13d
cmovgl %edx, %r13d
addq %rcx, %r14
incl %r15d
movswl %r15w, %ecx
cmpl %ecx, %edi
jg 0x359b2
movzbl 0x22(%rsp), %ecx
addl 0x74(%rsp), %ecx
movzbl 0x26(%rsp), %edx
imull %ecx, %edx
addl %edx, %eax
movzwl %ax, %ecx
shrl $0x3, %ecx
addq %rcx, %r14
movq 0x10(%rsp), %rdx
movq 0xa0(%rsp), %rcx
leaq (%rdx,%rcx,2), %rdx
movq 0x60(%rsp), %r15
incl %r15d
movswl %r15w, %ecx
cmpl %ecx, 0x7c(%rsp)
jg 0x3597c
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq