	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_handle_error
_s5p_mfc_handle_error:                  ## @s5p_mfc_handle_error
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	movl	%ecx, %esi
	callq	_mfc_err
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movl	(%rbx), %r13d
	addl	$-128, %r13d
	movq	%rbx, %rdi
	callq	_clear_work_bit
	movq	_MFCINST_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	cmpl	$5, %r13d
	ja	LBB0_3
## %bb.2:
	leaq	16(%rbx), %rdi
	leaq	12(%rbx), %rsi
	callq	_s5p_mfc_cleanup_queue
	leaq	8(%rbx), %rdi
	leaq	4(%rbx), %rsi
	callq	_s5p_mfc_cleanup_queue
LBB0_3:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_wake_up_ctx
LBB0_4:
	leaq	4(%r12), %rsi
	xorl	%edi, %edi
	callq	_test_and_clear_bit
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	movl	(%r12), %edi
	movq	_clear_int_flags@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_s5p_mfc_hw_call
	xorl	%eax, %eax
	callq	_s5p_mfc_clock_off
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up_dev                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Interrupt Error: %08x\n"

	.comm	_MFCINST_ERROR,8,3              ## @MFCINST_ERROR
	.comm	_clear_int_flags,4,2            ## @clear_int_flags
	.no_dead_strip	_s5p_mfc_handle_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_handle_error
_s5p_mfc_handle_error:                  ; @s5p_mfc_handle_error
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x3
	bl	_mfc_err
	cbz	x22, LBB0_4
; %bb.1:
	ldr	w8, [x22]
	sub	w23, w8, #128
	mov	x0, x22
	bl	_clear_work_bit
Lloh2:
	adrp	x8, _MFCINST_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MFCINST_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	w8, [x22]
	cmp	w23, #5
	b.hi	LBB0_3
; %bb.2:
	add	x0, x22, #16
	add	x1, x22, #12
	bl	_s5p_mfc_cleanup_queue
	add	x0, x22, #8
	add	x1, x22, #4
	bl	_s5p_mfc_cleanup_queue
LBB0_3:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_wake_up_ctx
LBB0_4:
	add	x1, x21, #4
	mov	w0, #0
	bl	_test_and_clear_bit
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _clear_int_flags@GOTPAGE
Lloh6:
	ldr	x8, [x8, _clear_int_flags@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_s5p_mfc_hw_call
	bl	_s5p_mfc_clock_off
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_wake_up_dev
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Interrupt Error: %08x\n"

	.comm	_MFCINST_ERROR,8,3              ; @MFCINST_ERROR
	.comm	_clear_int_flags,4,2            ; @clear_int_flags
	.no_dead_strip	_s5p_mfc_handle_error
.subsections_via_symbols
