	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_context_fault
_arm_smmu_context_fault:                ## @arm_smmu_context_fault
	.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
	movq	%rsi, %rdi
	callq	_to_smmu_domain
	movq	8(%rax), %rbx
	movl	(%rax), %r14d
	movq	_ARM_SMMU_CB_FSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_arm_smmu_cb_read
	movl	%eax, %r15d
	movq	_FSR_FAULT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_ARM_SMMU_CB_FSYNR0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_arm_smmu_cb_read
	movl	%eax, %r12d
	movq	_ARM_SMMU_CB_FAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_arm_smmu_cb_readq
	movq	%rax, %r13
	movl	%r14d, %edi
	callq	_ARM_SMMU_GR1_CBFRSYNRA
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_arm_smmu_gr1_read
	movl	(%rbx), %edi
	movl	%r14d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movq	%r13, %rcx
	movl	%r12d, %r8d
	movl	%eax, %r9d
	callq	_dev_err_ratelimited
	movq	_ARM_SMMU_CB_FSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %ecx
	callq	_arm_smmu_cb_write
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARM_SMMU_CB_FSR,4,2            ## @ARM_SMMU_CB_FSR
	.comm	_FSR_FAULT,4,2                  ## @FSR_FAULT
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_ARM_SMMU_CB_FSYNR0,4,2         ## @ARM_SMMU_CB_FSYNR0
	.comm	_ARM_SMMU_CB_FAR,4,2            ## @ARM_SMMU_CB_FAR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled context fault: fsr=0x%x, iova=0x%08lx, fsynr=0x%x, cbfrsynra=0x%x, cb=%d\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_arm_smmu_context_fault
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_context_fault
_arm_smmu_context_fault:                ; @arm_smmu_context_fault
	.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	x0, x1
	bl	_to_smmu_domain
	ldr	x19, [x0, #8]
	ldr	w20, [x0]
Lloh0:
	adrp	x24, _ARM_SMMU_CB_FSR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ARM_SMMU_CB_FSR@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_arm_smmu_cb_read
Lloh2:
	adrp	x8, _FSR_FAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FSR_FAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x21, x0
Lloh5:
	adrp	x8, _ARM_SMMU_CB_FSYNR0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARM_SMMU_CB_FSYNR0@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_arm_smmu_cb_read
	mov	x22, x0
Lloh8:
	adrp	x8, _ARM_SMMU_CB_FAR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARM_SMMU_CB_FAR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_arm_smmu_cb_readq
	mov	x23, x0
	mov	x0, x20
	bl	_ARM_SMMU_GR1_CBFRSYNRA
	mov	x1, x0
	mov	x0, x19
	bl	_arm_smmu_gr1_read
	mov	x5, x0
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x23
	mov	x4, x22
	mov	x6, x20
	bl	_dev_err_ratelimited
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_arm_smmu_cb_write
Lloh13:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ARM_SMMU_CB_FSR,4,2            ; @ARM_SMMU_CB_FSR
	.comm	_FSR_FAULT,4,2                  ; @FSR_FAULT
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_ARM_SMMU_CB_FSYNR0,4,2         ; @ARM_SMMU_CB_FSYNR0
	.comm	_ARM_SMMU_CB_FAR,4,2            ; @ARM_SMMU_CB_FAR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled context fault: fsr=0x%x, iova=0x%08lx, fsynr=0x%x, cbfrsynra=0x%x, cb=%d\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_arm_smmu_context_fault
.subsections_via_symbols
