// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_objx/lv_table.c
// Function: get_row_height
static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id)
{
    lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
    lv_point_t txt_size;
    lv_coord_t txt_w;
    const lv_style_t * cell_style;

    uint16_t row_start = row_id * ext->col_cnt;
    uint16_t cell;
    uint16_t col;
    lv_coord_t h_max = lv_font_get_line_height(ext->cell_style[0]->text.font) + ext->cell_style[0]->body.padding.top +
                       ext->cell_style[0]->body.padding.bottom;

    for(cell = row_start, col = 0; cell < row_start + ext->col_cnt; cell++, col++) {
        if(ext->cell_data[cell] != NULL) {

            txt_w              = ext->col_w[col];
            uint16_t col_merge = 0;
            for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge++) {

                if(ext->cell_data[cell + col_merge] != NULL) {
                    lv_table_cell_format_t format;
                    format.format_byte = ext->cell_data[cell + col_merge][0];
                    if(format.s.right_merge)
                        txt_w += ext->col_w[col + col_merge + 1];
                    else
                        break;
                } else {
                    break;
                }
            }

            lv_table_cell_format_t format;
            format.format_byte = ext->cell_data[cell][0];
            cell_style         = ext->cell_style[format.s.type];

            /*With text crop assume 1 line*/
            if(format.s.crop) {
                h_max = LV_MATH_MAX(lv_font_get_line_height(cell_style->text.font) + cell_style->body.padding.top +
                                        cell_style->body.padding.bottom,
                                    h_max);
            }
            /*Without text crop calculate the height of the text in the cell*/
            else {
                txt_w -= cell_style->body.padding.left + cell_style->body.padding.right;

                lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font,
                                cell_style->text.letter_space, cell_style->text.line_space, txt_w, LV_TXT_FLAG_NONE);

                h_max = LV_MATH_MAX(txt_size.y + cell_style->body.padding.top + cell_style->body.padding.bottom, h_max);
                cell += col_merge;
                col += col_merge;
            }
        }
    }

    return h_max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa8f0
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl (%rcx), %ecx
imull %ecx, %eax
movw %ax, -0x2a(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x1bc20
movzbl %al, %eax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x30(%rbp)
movw -0x2a(%rbp), %ax
movw %ax, -0x2c(%rbp)
movw $0x0, -0x2e(%rbp)
movzwl -0x2c(%rbp), %eax
movzwl -0x2a(%rbp), %ecx
movq -0x18(%rbp), %rdx
movzwl (%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x1bbf2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movzwl -0x2c(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x1bbd3
movq -0x18(%rbp), %rax
movzwl -0x2e(%rbp), %ecx
movw 0x30(%rax,%rcx,2), %ax
movw %ax, -0x1e(%rbp)
movw $0x0, -0x32(%rbp)
movw $0x0, -0x32(%rbp)
movzwl -0x32(%rbp), %eax
movzwl -0x2e(%rbp), %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzwl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1ba61
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movzwl -0x2c(%rbp), %ecx
movzwl -0x32(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1ba4c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movzwl -0x2c(%rbp), %ecx
movzwl -0x32(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movb (%rax), %al
movb %al, -0x33(%rbp)
movb -0x33(%rbp), %al
shrb $0x2, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x1ba48
movq -0x18(%rbp), %rax
movzwl -0x2e(%rbp), %ecx
movzwl -0x32(%rbp), %edx
addl %edx, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movswl 0x30(%rax,%rcx,2), %ecx
movswl -0x1e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x1e(%rbp)
jmp 0x1ba4a
jmp 0x1ba61
jmp 0x1ba4e
jmp 0x1ba61
jmp 0x1ba50
movw -0x32(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x32(%rbp)
jmp 0x1b9c1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movzwl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movb (%rax), %al
movb %al, -0x34(%rbp)
movq -0x18(%rbp), %rax
movb -0x34(%rbp), %cl
shrb $0x3, %cl
andb $0x3, %cl
movzbl %cl, %ecx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movb -0x34(%rbp), %al
shrb $0x5, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x1bb03
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x1bc20
movzbl %al, %eax
movq -0x28(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movswl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jle 0x1baf0
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x1bc20
movzbl %al, %eax
movq -0x28(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
jmp 0x1baf7
movswl -0x30(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movw %ax, -0x30(%rbp)
jmp 0x1bbd1
movq -0x28(%rbp), %rax
movswl 0x1a(%rax), %ecx
movq -0x28(%rbp), %rax
movswl 0x1c(%rax), %eax
addl %eax, %ecx
movswl -0x1e(%rbp), %eax
subl %ecx, %eax
movw %ax, -0x1e(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movzwl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
addq $0x1, %rsi
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x28(%rbp), %rax
movw 0x30(%rax), %cx
movq -0x28(%rbp), %rax
movw 0x32(%rax), %ax
leaq -0x1c(%rbp), %rdi
xorl %r8d, %r8d
movswl %cx, %ecx
movswl %ax, %r8d
movswl -0x1e(%rbp), %r9d
movl $0x0, (%rsp)
callq 0x46820
movswl -0x1a(%rbp), %eax
movq -0x28(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movswl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jle 0x1bba7
movswl -0x1a(%rbp), %eax
movq -0x28(%rbp), %rcx
movswl 0x16(%rcx), %ecx
addl %ecx, %eax
movq -0x28(%rbp), %rcx
movswl 0x18(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1bbae
movswl -0x30(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, -0x30(%rbp)
movzwl -0x32(%rbp), %ecx
movzwl -0x2c(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x2c(%rbp)
movzwl -0x32(%rbp), %ecx
movzwl -0x2e(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x2e(%rbp)
jmp 0x1bbd3
jmp 0x1bbd5
movw -0x2c(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x2c(%rbp)
movw -0x2e(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x2e(%rbp)
jmp 0x1b974
movw -0x30(%rbp), %ax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)