	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_iommu_irq
_rk_iommu_irq:                          ## @rk_iommu_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, %rbx
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	4(%rsi), %edi
	callq	_pm_runtime_get_if_in_use
	xorl	%edi, %edi
	testl	%eax, %eax
	setle	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_clk_bulk_enable
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_19
## %bb.2:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	cmpl	$0, (%rbx)
	jle	LBB0_18
## %bb.3:
	movq	_RK_MMU_INT_STATUS@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movq	_RK_MMU_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_rk_iommu_write
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jge	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movl	(%r14), %esi
	callq	_rk_iommu_read
	movq	%rax, %r15
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movq	_RK_MMU_PAGE_FAULT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rk_iommu_read
	movq	%rax, -56(%rbp)
	movq	_RK_MMU_IRQ_PAGE_FAULT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movq	_RK_MMU_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rk_iommu_read
	movq	_IOMMU_FAULT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %r13d
	movq	_RK_MMU_STATUS_PAGE_FAULT_IS_WRITE@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_IOMMU_FAULT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rbx), %edi
	cmpl	%ecx, %r13d
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rax
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_log_iova
	movq	24(%rbx), %rdi
	movl	4(%rbx), %esi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rdx
	movl	%r13d, %ecx
	callq	_report_iommu_fault
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%esi, %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movq	_RK_MMU_CMD_ZAP_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rk_iommu_base_command
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movq	_RK_MMU_CMD_PAGE_FAULT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rk_iommu_base_command
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_RK_MMU_IRQ_BUS_ERROR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	leaq	-56(%rbp), %rdx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_RK_MMU_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%r15d, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_18:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_clk_bulk_disable
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_19:
	movl	4(%rbx), %edi
	callq	_pm_runtime_put
LBB0_20:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_RK_MMU_INT_STATUS,4,2          ## @RK_MMU_INT_STATUS
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_RK_MMU_PAGE_FAULT_ADDR,4,2     ## @RK_MMU_PAGE_FAULT_ADDR
	.comm	_RK_MMU_IRQ_PAGE_FAULT,4,2      ## @RK_MMU_IRQ_PAGE_FAULT
	.comm	_RK_MMU_STATUS,4,2              ## @RK_MMU_STATUS
	.comm	_RK_MMU_STATUS_PAGE_FAULT_IS_WRITE,4,2 ## @RK_MMU_STATUS_PAGE_FAULT_IS_WRITE
	.comm	_IOMMU_FAULT_WRITE,4,2          ## @IOMMU_FAULT_WRITE
	.comm	_IOMMU_FAULT_READ,4,2           ## @IOMMU_FAULT_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Page fault at %pad of type %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"write"

L_.str.2:                               ## @.str.2
	.asciz	"read"

L_.str.3:                               ## @.str.3
	.asciz	"Page fault while iommu not attached to domain?\n"

	.comm	_RK_MMU_CMD_ZAP_CACHE,4,2       ## @RK_MMU_CMD_ZAP_CACHE
	.comm	_RK_MMU_CMD_PAGE_FAULT_DONE,4,2 ## @RK_MMU_CMD_PAGE_FAULT_DONE
	.comm	_RK_MMU_IRQ_BUS_ERROR,4,2       ## @RK_MMU_IRQ_BUS_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"BUS_ERROR occurred at %pad\n"

	.comm	_RK_MMU_IRQ_MASK,4,2            ## @RK_MMU_IRQ_MASK
L_.str.5:                               ## @.str.5
	.asciz	"unexpected int_status: %#08x\n"

	.comm	_RK_MMU_INT_CLEAR,4,2           ## @RK_MMU_INT_CLEAR
	.no_dead_strip	_rk_iommu_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_iommu_irq
_rk_iommu_irq:                          ; @rk_iommu_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	w0, [x1, #4]
	bl	_pm_runtime_get_if_in_use
	cmp	w0, #1
	cset	w0, lt
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_18
; %bb.1:
	ldp	w1, w0, [x20, #8]
	bl	_clk_bulk_enable
	bl	_WARN_ON
	cbnz	x0, LBB0_17
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.3:
	mov	x21, #0
Lloh3:
	adrp	x28, _RK_MMU_INT_STATUS@GOTPAGE
Lloh4:
	ldr	x28, [x28, _RK_MMU_INT_STATUS@GOTPAGEOFF]
	add	x24, sp, #24
Lloh5:
	adrp	x25, _RK_MMU_IRQ_BUS_ERROR@GOTPAGE
Lloh6:
	ldr	x25, [x25, _RK_MMU_IRQ_BUS_ERROR@GOTPAGEOFF]
Lloh7:
	adrp	x22, _RK_MMU_IRQ_MASK@GOTPAGE
Lloh8:
	ldr	x22, [x22, _RK_MMU_IRQ_MASK@GOTPAGEOFF]
Lloh9:
	adrp	x23, _RK_MMU_INT_CLEAR@GOTPAGE
Lloh10:
	ldr	x23, [x23, _RK_MMU_INT_CLEAR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x21, lsl #2]
	ldr	w1, [x23]
	mov	x2, x26
	bl	_rk_iommu_write
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_16
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x21, lsl #2]
	ldr	w1, [x28]
	bl	_rk_iommu_read
	mov	x26, x0
	cbz	w26, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh11:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x21, lsl #2]
Lloh14:
	adrp	x8, _RK_MMU_PAGE_FAULT_ADDR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RK_MMU_PAGE_FAULT_ADDR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_rk_iommu_read
	str	x0, [sp, #24]
Lloh17:
	adrp	x8, _RK_MMU_IRQ_PAGE_FAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RK_MMU_IRQ_PAGE_FAULT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w26
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x21, lsl #2]
Lloh20:
	adrp	x8, _RK_MMU_STATUS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RK_MMU_STATUS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_rk_iommu_read
Lloh23:
	adrp	x8, _RK_MMU_STATUS_PAGE_FAULT_IS_WRITE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RK_MMU_STATUS_PAGE_FAULT_IS_WRITE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _IOMMU_FAULT_WRITE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IOMMU_FAULT_WRITE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _IOMMU_FAULT_READ@GOTPAGE
Lloh30:
	ldr	x10, [x10, _IOMMU_FAULT_READ@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w8, w0
	csel	w27, w10, w9, eq
	ldr	w0, [x20, #4]
	cmp	w27, w9
Lloh32:
	adrp	x8, l_.str.2@PAGE
Lloh33:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh34:
	adrp	x9, l_.str.1@PAGE
Lloh35:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x8, x9, x8, eq
	stp	x24, x8, [sp]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	x2, [sp, #24]
	mov	x0, x20
	mov	x1, x21
	bl	_log_iova
	ldr	x0, [x20, #24]
	ldr	w1, [x20, #4]
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x2, [sp, #24]
	mov	x3, x27
	bl	_report_iommu_fault
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x1
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #16]
	lsl	x27, x21, #2
	ldr	w0, [x8, x27]
Lloh40:
	adrp	x8, _RK_MMU_CMD_ZAP_CACHE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RK_MMU_CMD_ZAP_CACHE@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	bl	_rk_iommu_base_command
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x27]
Lloh43:
	adrp	x8, _RK_MMU_CMD_PAGE_FAULT_DONE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _RK_MMU_CMD_PAGE_FAULT_DONE@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	bl	_rk_iommu_base_command
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x25]
	tst	w8, w26
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #4]
	str	x24, [sp]
Lloh46:
	adrp	x1, l_.str.4@PAGE
Lloh47:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	bics	wzr, w26, w8
	b.eq	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #4]
	mov	x8, x26
	str	x8, [sp]
Lloh48:
	adrp	x1, l_.str.5@PAGE
Lloh49:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_4
LBB0_16:
	ldp	w1, w0, [x20, #8]
	bl	_clk_bulk_disable
LBB0_17:
	ldr	w0, [x20, #4]
	bl	_pm_runtime_put
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_RK_MMU_INT_STATUS,4,2          ; @RK_MMU_INT_STATUS
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_RK_MMU_PAGE_FAULT_ADDR,4,2     ; @RK_MMU_PAGE_FAULT_ADDR
	.comm	_RK_MMU_IRQ_PAGE_FAULT,4,2      ; @RK_MMU_IRQ_PAGE_FAULT
	.comm	_RK_MMU_STATUS,4,2              ; @RK_MMU_STATUS
	.comm	_RK_MMU_STATUS_PAGE_FAULT_IS_WRITE,4,2 ; @RK_MMU_STATUS_PAGE_FAULT_IS_WRITE
	.comm	_IOMMU_FAULT_WRITE,4,2          ; @IOMMU_FAULT_WRITE
	.comm	_IOMMU_FAULT_READ,4,2           ; @IOMMU_FAULT_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Page fault at %pad of type %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"write"

l_.str.2:                               ; @.str.2
	.asciz	"read"

l_.str.3:                               ; @.str.3
	.asciz	"Page fault while iommu not attached to domain?\n"

	.comm	_RK_MMU_CMD_ZAP_CACHE,4,2       ; @RK_MMU_CMD_ZAP_CACHE
	.comm	_RK_MMU_CMD_PAGE_FAULT_DONE,4,2 ; @RK_MMU_CMD_PAGE_FAULT_DONE
	.comm	_RK_MMU_IRQ_BUS_ERROR,4,2       ; @RK_MMU_IRQ_BUS_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"BUS_ERROR occurred at %pad\n"

	.comm	_RK_MMU_IRQ_MASK,4,2            ; @RK_MMU_IRQ_MASK
l_.str.5:                               ; @.str.5
	.asciz	"unexpected int_status: %#08x\n"

	.comm	_RK_MMU_INT_CLEAR,4,2           ; @RK_MMU_INT_CLEAR
	.no_dead_strip	_rk_iommu_irq
.subsections_via_symbols
