// File: /workspace/github_c_makefile_star2_O2/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:
movl 0x1c(%rsi), %edi
andl $0x1f, %edi
xorl %eax, %eax
cmpl $0xe, %edi
ja 0x3a4a5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r14d
movl $0x780, %ecx            # imm = 0x780
btl %edi, %ecx
jb 0x3a0fc
movl $0x7800, %ecx           # imm = 0x7800
btl %edi, %ecx
jae 0x3a17e
movq 0x10(%rsi), %rax
movzwl 0x38(%rax), %eax
movl %eax, %ecx
shrl $0x8, %ecx
xorl %edx, %edx
testw %bp, %bp
movl $0x0, %edi
cmovgl %ebp, %edi
movzwl %di, %edi
leaq (%rdi,%rdi,2), %r13
cmpq %rdx, %r13
je 0x3a07d
movb %al, (%rbx,%rdx)
movb %cl, 0x1(%rbx,%rdx)
addq $0x3, %rdx
jmp 0x3a06b
movl 0x1c(%rsi), %edi
andl $0x1f, %edi
movq %rsi, 0x10(%rsp)
callq 0x38514
movq 0x10(%rsp), %r8
movl %eax, %ebp
pushq $-0x1
popq %r15
movl %eax, %ecx
shll %cl, %r15d
movl 0x1c(%r8), %eax
movl %eax, %ecx
andl $0x1f, %ecx
addl $-0xb, %ecx
cmpl $0x3, %ecx
ja 0x3a328
leaq 0x52f7(%rip), %rdx      # 0x3f3b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %eax, %ecx
shrl $0xd, %ecx
movzbl %cl, %edx
andl $0x1c00, %eax           # imm = 0x1C00
cmpl $0x1, %eax
sbbw $-0x1, %dx
movzwl %dx, %eax
movswl %r12w, %ecx
imull %eax, %ecx
movswl %r14w, %esi
sarl $0x3, %esi
addl %ecx, %esi
notb %r14b
andb $0x7, %r14b
leaq 0x52c9(%rip), %r9       # 0x3f3c0
jmp 0x3a332
movl %r12d, 0x8(%rsp)
movq %rsi, %r15
callq 0x38514
movq %r15, %rdi
movl %eax, %r12d
pushq $-0x1
popq %r13
movl %eax, %ecx
shll %cl, %r13d
movl 0x1c(%r15), %eax
movl %eax, %ecx
andl $0x1f, %ecx
addl $-0x7, %ecx
cmpl $0x3, %ecx
movl %ebp, 0x10(%rsp)
ja 0x3a3dc
leaq 0x5268(%rip), %rdx      # 0x3f3a0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %eax, %ecx
shrl $0xd, %ecx
movzbl %cl, %r15d
andl $0x1c00, %eax           # imm = 0x1C00
cmpl $0x1, %eax
sbbw $-0x1, %r15w
movzwl %r15w, %eax
movswl 0x8(%rsp), %ecx
imull %eax, %ecx
movswl %r14w, %eax
sarl $0x3, %eax
addl $0x8, %eax
movswl %ax, %esi
addl %ecx, %esi
notb %r14b
andb $0x7, %r14b
jmp 0x3a3e4
pushq $0x70
popq %rcx
btl %edi, %ecx
jae 0x3a494
cmpb $0x1, 0x18(%rsi)
jne 0x3a1d8
movl %r12d, %r13d
movq 0x38(%rsi), %r12
movq %rsi, %r15
callq 0x38514
movswl %r13w, %ecx
movl 0x1c(%r15), %edx
shrl $0xa, %edx
andl $0x7ff, %edx            # imm = 0x7FF
imull %ecx, %edx
movswl %r14w, %esi
addl %edx, %esi
movzbl %al, %r14d
imull %r14d, %esi
sarl $0x3, %esi
addl $0x4, %esi
movq (%r12), %rdi
callq 0x27046
testb %al, %al
je 0x3a4a6
xorl %eax, %eax
jmp 0x3a494
movl %eax, %edx
shrl $0xb, %edx
andl $0x3ff, %edx            # imm = 0x3FF
btl $0xa, %eax
adcw $0x0, %dx
movzwl %dx, %eax
movswl %r12w, %ecx
imull %eax, %ecx
movswl %r14w, %esi
sarl %esi
addl %ecx, %esi
notb %r14b
shlb $0x2, %r14b
andb $0x4, %r14b
leaq 0x504a(%rip), %r9       # 0x3f260
jmp 0x3a332
shrl $0xa, %eax
andl $0x7ff, %eax            # imm = 0x7FF
movswl %r12w, %ecx
imull %eax, %ecx
movswl %r14w, %esi
addl %ecx, %esi
xorl %r14d, %r14d
movl %eax, %edx
jmp 0x3a32f
movl %eax, %edx
shrl $0xc, %edx
andl $0x1ff, %edx            # imm = 0x1FF
andl $0xc00, %eax            # imm = 0xC00
cmpl $0x1, %eax
sbbw $-0x1, %dx
movzwl %dx, %eax
movswl %r12w, %ecx
imull %eax, %ecx
movswl %r14w, %esi
sarl $0x2, %esi
addl %ecx, %esi
notb %r14b
addb %r14b, %r14b
andb $0x6, %r14b
leaq 0x4fe1(%rip), %r9       # 0x3f256
jmp 0x3a332
movl %eax, %r15d
shrl $0xb, %r15d
andl $0x3ff, %r15d           # imm = 0x3FF
btl $0xa, %eax
adcw $0x0, %r15w
movzwl %r15w, %eax
movswl 0x8(%rsp), %ecx
imull %eax, %ecx
movswl %r14w, %eax
sarl %eax
addl $0x40, %eax
movswl %ax, %esi
addl %ecx, %esi
notb %r14b
shlb $0x2, %r14b
andb $0x4, %r14b
jmp 0x3a3e4
shrl $0xa, %eax
andl $0x7ff, %eax            # imm = 0x7FF
movswl 0x8(%rsp), %ecx
imull %eax, %ecx
movswl %r14w, %edx
leal (%rdx,%rcx), %esi
addl $0x400, %esi            # imm = 0x400
xorl %r14d, %r14d
movl %eax, %r15d
jmp 0x3a3e4
movl %eax, %r15d
shrl $0xc, %r15d
andl $0x1ff, %r15d           # imm = 0x1FF
andl $0xc00, %eax            # imm = 0xC00
cmpl $0x1, %eax
sbbw $-0x1, %r15w
movzwl %r15w, %eax
movswl 0x8(%rsp), %ecx
imull %eax, %ecx
movswl %r14w, %eax
sarl $0x2, %eax
addl $0x10, %eax
movswl %ax, %esi
addl %ecx, %esi
notb %r14b
addb %r14b, %r14b
andb $0x6, %r14b
jmp 0x3a3e4
xorl %r14d, %r14d
xorl %esi, %esi
xorl %edx, %edx
xorl %r9d, %r9d
cmpb $0x0, 0x18(%r8)
je 0x3a377
movq 0x38(%r8), %r12
movq (%r12), %rdi
addl $0x4, %esi
movq %r9, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
callq 0x27046
movq (%r12), %rdi
movzwl 0x18(%rsp), %edx
leaq 0x20(%rsp), %r12
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x26fa2
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
jmp 0x3a382
movq 0x8(%r8), %rax
movl %esi, %r12d
addq 0x8(%rax), %r12
notl %r15d
movb $0x8, %cl
subb %bpl, %cl
xorl %eax, %eax
movzbl %cl, %edx
cmpq %rax, %r13
je 0x3a492
movzbl (%r12), %edi
movl %r15d, %esi
movl %r14d, %ecx
shll %cl, %esi
andl %edi, %esi
shrq %cl, %rsi
movl 0x1c(%r8), %ecx
andl $0x1f, %ecx
cmpl $0xe, %ecx
je 0x3a3ba
movb (%r9,%rsi), %sil
movb %sil, 0x2(%rbx,%rax)
subb %bpl, %r14b
movzbl %r14b, %ecx
movl %ecx, %r14d
cmovsl %edx, %r14d
shrb $0x7, %cl
movzbl %cl, %ecx
addq %rcx, %r12
addq $0x3, %rax
jmp 0x3a38f
xorl %esi, %esi
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x38(%rdi), %rbp
cmpb $0x0, 0x18(%rdi)
je 0x3a413
movq (%rbp), %rdi
addl $0x4, %esi
callq 0x27046
movq (%rbp), %rdi
movzwl %r15w, %edx
leaq 0x20(%rsp), %r15
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x26fa2
jmp 0x3a41e
movq 0x8(%rdi), %rax
movl %esi, %r15d
addq 0x8(%rax), %r15
movb $0x8, %cl
subb %r12b, %cl
xorl %eax, %eax
movl 0x10(%rsp), %esi
testw %si, %si
movl $0x0, %edx
cmovgl %esi, %edx
notl %r13d
movzwl %dx, %edx
leaq (%rdx,%rdx,2), %rdx
movzbl %cl, %esi
cmpq %rax, %rdx
je 0x3a492
movzbl (%r15), %edi
movl %r13d, %r8d
movl %r14d, %ecx
shll %cl, %r8d
andl %edi, %r8d
shrq %cl, %r8
movq 0x8(%rbp), %rcx
movzwl (%rcx,%r8,2), %ecx
movw %cx, (%rbx,%rax)
movq 0x10(%rbp), %rcx
movb (%rcx,%r8), %cl
movb %cl, 0x2(%rbx,%rax)
subb %r12b, %r14b
movl %r14d, %ecx
shrb $0x7, %cl
movzbl %cl, %ecx
addq %rcx, %r15
testb %r14b, %r14b
movzbl %r14b, %r14d
cmovsl %esi, %r14d
addq $0x3, %rax
jmp 0x3a441
movb $0x1, %al
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movswl %bp, %eax
shrl $0x3, %r14d
imull %eax, %r14d
leaq 0x20(%rsp), %r15
andl $0x0, (%r15)
movq (%r12), %rdi
movq %rbx, %rsi
movl %r14d, %edx
movq %r15, %rcx
callq 0x26fa2
cmpl (%r15), %r14d
sete %al
jmp 0x3a494