// File: /workspace/github_c_makefile_star2_O0/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_built_in_read_line
lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x,
                                                  lv_coord_t y, lv_coord_t len, uint8_t * buf)
{
    (void)decoder; /*Unused*/

    lv_res_t res = LV_RES_INV;

    if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
       dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
        /* For TRUE_COLOR images read line required only for files.
         * For variables the image data was returned in `open`*/
        if(dsc->src_type == LV_IMG_SRC_FILE) {
            res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf);
        }
    } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || dsc->header.cf == LV_IMG_CF_ALPHA_2BIT ||
              dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) {

        res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf);
    } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || dsc->header.cf == LV_IMG_CF_INDEXED_2BIT ||
              dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) {
        res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf);
    } else {
        LV_LOG_WARN("Built-in image decoder read not supports the color format");
        return LV_RES_INV;
    }

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %r8w, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movw %dx, -0x1a(%rbp)
movw %cx, -0x1c(%rbp)
movw %ax, -0x1e(%rbp)
movq %r9, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0x4, %eax
je 0x65825
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0x5, %eax
je 0x65825
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0x6, %eax
jne 0x6585c
movq -0x18(%rbp), %rax
movzbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x65857
movq -0x18(%rbp), %rdi
movw -0x1a(%rbp), %dx
movw -0x1c(%rbp), %cx
movw -0x1e(%rbp), %ax
movq -0x28(%rbp), %r8
movswl %dx, %esi
movswl %cx, %edx
movswl %ax, %ecx
callq 0x65d80
movb %al, -0x29(%rbp)
jmp 0x6592c
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0xb, %eax
je 0x65898
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0xc, %eax
je 0x65898
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0xd, %eax
je 0x65898
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0xe, %eax
jne 0x658bf
movq -0x18(%rbp), %rdi
movw -0x1a(%rbp), %dx
movw -0x1c(%rbp), %cx
movw -0x1e(%rbp), %ax
movq -0x28(%rbp), %r8
movswl %dx, %esi
movswl %cx, %edx
movswl %ax, %ecx
callq 0x65e70
movb %al, -0x29(%rbp)
jmp 0x6592a
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0x7, %eax
je 0x658fb
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0x8, %eax
je 0x658fb
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0x9, %eax
je 0x658fb
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1f, %eax
cmpl $0xa, %eax
jne 0x65922
movq -0x18(%rbp), %rdi
movw -0x1a(%rbp), %dx
movw -0x1c(%rbp), %cx
movw -0x1e(%rbp), %ax
movq -0x28(%rbp), %r8
movswl %dx, %esi
movswl %cx, %edx
movswl %ax, %ecx
callq 0x662a0
movb %al, -0x29(%rbp)
jmp 0x65928
movb $0x0, -0x1(%rbp)
jmp 0x65932
jmp 0x6592a
jmp 0x6592c
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)