	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __iommu_flush_iotlb
___iommu_flush_iotlb:                   ## @__iommu_flush_iotlb
	.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	%r8d, %ebx
	movl	%ecx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	20(%rdi), %edi
	callq	_ecap_iotlb_offset
	movl	%eax, %r15d
	cmpl	$128, %ebx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_5
## %bb.1:
	cmpl	$130, %ebx
	je	LBB0_4
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_6
## %bb.3:
	movq	_DMA_TLB_IVT@GOTPCREL(%rip), %rax
	movl	$129, %r14d
	orl	(%rax), %r14d
	jmp	LBB0_7
LBB0_5:
	movq	_DMA_TLB_IVT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_DMA_TLB_DID
	movl	%eax, %r14d
	orl	%ebx, %r14d
	orl	$128, %r14d
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	jmp	LBB0_8
LBB0_4:
	movq	_DMA_TLB_IVT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r14d, %edi
	callq	_DMA_TLB_DID
	movl	%eax, %r14d
	orl	%r13d, %r14d
	orl	$130, %r14d
	jmp	LBB0_7
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_BUG
LBB0_7:
	xorl	%r13d, %r13d
LBB0_8:
	movl	%r15d, %ebx
	movl	16(%r12), %edi
	callq	_cap_write_drain
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_DMA_TLB_WRITE_DRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	orl	%r14d, %r15d
	movq	%r12, %rdi
	callq	_raw_spin_lock_irqsave
	movslq	%ebx, %r14
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.11:
	movq	8(%r12), %rdi
	addq	%r14, %rdi
	movl	%r13d, %esi
	callq	_dmar_writeq
LBB0_12:
	movq	8(%r12), %rax
	leaq	(%r14,%rax), %rdi
	addq	$8, %rdi
	movl	%r15d, %esi
	callq	_dmar_writeq
	addl	$8, %ebx
	movq	_dmar_readq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_TLB_IVT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r15d, %eax
	sete	%cl
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %r8d
	callq	_IOMMU_WAIT_OP
	movq	%r12, %rdi
	callq	_raw_spin_unlock_irqrestore
	movl	%r15d, %edi
	callq	_DMA_TLB_IAIG
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_14:
	movl	%r15d, %edi
	callq	_DMA_TLB_IAIG
	movq	%rax, %r14
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_DMA_TLB_IIRG
	cmpq	%rax, %r14
	jne	LBB0_16
## %bb.15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	%ebx, %edi
	callq	_DMA_TLB_IIRG
	movq	%rax, %r14
	movl	%r15d, %edi
	callq	_DMA_TLB_IAIG
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_debug                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TLB_IVT,4,2                ## @DMA_TLB_IVT
	.comm	_DMA_TLB_WRITE_DRAIN,4,2        ## @DMA_TLB_WRITE_DRAIN
	.comm	_dmar_readq,4,2                 ## @dmar_readq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Flush IOTLB failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"TLB flush request %Lx, actual %Lx\n"

	.comm	_DMA_TLB_READ_DRAIN,4,2         ## @DMA_TLB_READ_DRAIN
	.no_dead_strip	___iommu_flush_iotlb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __iommu_flush_iotlb
___iommu_flush_iotlb:                   ; @__iommu_flush_iotlb
	.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, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	ldr	w0, [x0, #20]
	bl	_ecap_iotlb_offset
	mov	x21, x0
Lloh0:
	adrp	x25, _DMA_TLB_IVT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DMA_TLB_IVT@GOTPAGEOFF]
	cmp	w19, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w19, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w19, #129
	b.ne	LBB0_6
; %bb.3:
	mov	w23, #0
	ldr	w8, [x25]
	mov	w9, #129
	orr	w24, w8, w9
	b	LBB0_7
LBB0_4:
	ldr	w26, [x25]
	mov	x0, x24
	bl	_DMA_TLB_DID
	orr	w8, w26, w0
	orr	w24, w8, #0x80
	orr	w23, w22, w23
	b	LBB0_7
LBB0_5:
	ldr	w22, [x25]
	mov	x0, x24
	bl	_DMA_TLB_DID
	mov	w23, #0
	orr	w8, w22, w0
	mov	w9, #130
	orr	w24, w8, w9
	b	LBB0_7
LBB0_6:
	bl	_BUG
	mov	w24, #0
	mov	w23, #0
LBB0_7:
	ldr	w0, [x20, #16]
	bl	_cap_write_drain
Lloh2:
	adrp	x8, _DMA_TLB_WRITE_DRAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_TLB_WRITE_DRAIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w22, w8, w24
	mov	x0, x20
	bl	_raw_spin_lock_irqsave
	cbz	w23, LBB0_9
; %bb.8:
	ldr	x8, [x20, #8]
	mov	x9, x21
	sxtw	x24, w9
	add	x0, x8, x24
	mov	x1, x23
	bl	_dmar_writeq
	b	LBB0_10
LBB0_9:
	sxtw	x24, w21
LBB0_10:
	ldr	x8, [x20, #8]
	add	x8, x24, x8
	add	x0, x8, #8
	mov	x1, x22
	bl	_dmar_writeq
	add	w1, w21, #8
Lloh5:
	adrp	x8, _dmar_readq@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dmar_readq@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldr	w8, [x25]
	tst	w8, w22
	cset	w3, eq
	mov	x0, x20
	mov	x4, x22
	bl	_IOMMU_WAIT_OP
	mov	x0, x20
	bl	_raw_spin_unlock_irqrestore
	mov	x0, x22
	bl	_DMA_TLB_IAIG
	cbnz	x0, LBB0_12
; %bb.11:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_12:
	mov	x0, x22
	bl	_DMA_TLB_IAIG
	mov	x20, x0
	mov	x0, x19
	bl	_DMA_TLB_IIRG
	cmp	x20, x0
	b.ne	LBB0_14
; %bb.13:
	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
LBB0_14:
	mov	x0, x19
	bl	_DMA_TLB_IIRG
	mov	x19, x0
	mov	x0, x22
	bl	_DMA_TLB_IAIG
	mov	x2, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	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
	b	_pr_debug
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TLB_IVT,4,2                ; @DMA_TLB_IVT
	.comm	_DMA_TLB_WRITE_DRAIN,4,2        ; @DMA_TLB_WRITE_DRAIN
	.comm	_dmar_readq,4,2                 ; @dmar_readq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Flush IOTLB failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"TLB flush request %Lx, actual %Lx\n"

	.comm	_DMA_TLB_READ_DRAIN,4,2         ; @DMA_TLB_READ_DRAIN
	.no_dead_strip	___iommu_flush_iotlb
.subsections_via_symbols
