	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_jpeg_dec_irq
_mtk_jpeg_dec_irq:                      ## @mtk_jpeg_dec_irq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rsi), %edi
	callq	_mtk_jpeg_dec_get_int_status
	movq	%rax, %rdi
	callq	_mtk_jpeg_dec_enum_result
	movq	%rax, %rbx
	movl	(%r13), %edi
	callq	_v4l2_m2m_get_curr_priv
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	(%rax), %edi
	callq	_v4l2_m2m_src_buf_remove
	movq	%rbx, %r12
	movq	%rax, %rbx
	movl	(%r15), %edi
	callq	_v4l2_m2m_dst_buf_remove
	movq	%rax, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rbx
	callq	_mtk_jpeg_vb2_to_srcbuf
	movq	%rax, %r12
	movq	_MTK_JPEG_DEC_RESULT_UNDERFLOW@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jl	LBB0_4
## %bb.3:
	movl	8(%r13), %edi
	callq	_mtk_jpeg_dec_reset
LBB0_4:
	movq	_MTK_JPEG_DEC_RESULT_EOF_DONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_11
## %bb.5:
	cmpl	$0, (%r14)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vb2_set_plane_payload
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_9
LBB0_1:
	addq	$12, %r13
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_v4l2_err
	jmp	LBB0_10
LBB0_11:
	movl	4(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_v4l2_m2m_buf_done
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_v4l2_m2m_buf_done
	movl	(%r13), %edi
	movl	(%r15), %esi
	callq	_v4l2_m2m_job_finish
LBB0_10:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Context is NULL\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_MTK_JPEG_DEC_RESULT_UNDERFLOW,8,3 ## @MTK_JPEG_DEC_RESULT_UNDERFLOW
	.comm	_MTK_JPEG_DEC_RESULT_EOF_DONE,8,3 ## @MTK_JPEG_DEC_RESULT_EOF_DONE
L_.str.1:                               ## @.str.1
	.asciz	"decode failed\n"

	.comm	_VB2_BUF_STATE_DONE,4,2         ## @VB2_BUF_STATE_DONE
	.no_dead_strip	_mtk_jpeg_dec_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_jpeg_dec_irq
_mtk_jpeg_dec_irq:                      ; @mtk_jpeg_dec_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
Lloh0:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w0, [x1, #8]
	bl	_mtk_jpeg_dec_get_int_status
	bl	_mtk_jpeg_dec_enum_result
	mov	x25, x0
	ldr	w0, [x19]
	bl	_v4l2_m2m_get_curr_priv
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	w0, [x0]
	bl	_v4l2_m2m_src_buf_remove
	mov	x22, x0
	ldr	w0, [x20]
	bl	_v4l2_m2m_dst_buf_remove
	mov	x23, x0
	mov	x0, x22
	bl	_mtk_jpeg_vb2_to_srcbuf
	mov	x24, x0
Lloh3:
	adrp	x8, _MTK_JPEG_DEC_RESULT_UNDERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTK_JPEG_DEC_RESULT_UNDERFLOW@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x25, x8
	b.lt	LBB0_3
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_mtk_jpeg_dec_reset
LBB0_3:
Lloh6:
	adrp	x8, _MTK_JPEG_DEC_RESULT_EOF_DONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MTK_JPEG_DEC_RESULT_EOF_DONE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x25, x8
	b.ne	LBB0_9
; %bb.4:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w2, [x8, x21, lsl #2]
	mov	x0, x23
	mov	x1, x21
	bl	_vb2_set_plane_payload
	add	x21, x21, #1
	ldrsw	x8, [x23]
	cmp	x21, x8
	b.lt	LBB0_6
LBB0_7:
Lloh9:
	adrp	x8, _VB2_BUF_STATE_DONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VB2_BUF_STATE_DONE@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	b	LBB0_10
LBB0_8:
	add	x0, x19, #12
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l2_err
	b	LBB0_11
LBB0_9:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_10:
	mov	x0, x22
	mov	x1, x21
	bl	_v4l2_m2m_buf_done
	mov	x0, x23
	mov	x1, x21
	bl	_v4l2_m2m_buf_done
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_v4l2_m2m_job_finish
LBB0_11:
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Context is NULL\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_MTK_JPEG_DEC_RESULT_UNDERFLOW,8,3 ; @MTK_JPEG_DEC_RESULT_UNDERFLOW
	.comm	_MTK_JPEG_DEC_RESULT_EOF_DONE,8,3 ; @MTK_JPEG_DEC_RESULT_EOF_DONE
l_.str.1:                               ; @.str.1
	.asciz	"decode failed\n"

	.comm	_VB2_BUF_STATE_DONE,4,2         ; @VB2_BUF_STATE_DONE
	.no_dead_strip	_mtk_jpeg_dec_irq
.subsections_via_symbols
