	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ctx_tbl_walk
_ctx_tbl_walk:                          ## @ctx_tbl_walk
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movslq	%edx, %rax
	xorl	%r13d, %r13d
	shlq	$2, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %r12d
	movq	%r15, %r14
	movq	_VTD_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	(%rbx), %r15d
	movq	%rbx, %rdi
	callq	_get_pasid_dir_size
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r14, %r15
	movl	%r12d, %r14d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_pasid_dir_walk
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%r13d
	cmpl	$256, %r13d                     ## imm = 0x100
	je	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_iommu_context_addr
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_context_present
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, -96(%rbp)
	movl	%r13d, -92(%rbp)
	movq	8(%r12), %rax
	addq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rax, -80(%rbp)
	movq	%rbx, -88(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, (%r15)
	movq	_DMAR_RTADDR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_dmar_readq
	movq	_DMA_RTADDR_SMT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_print_tbl_walk
	jmp	LBB0_6
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_RTADDR_REG,8,3            ## @DMAR_RTADDR_REG
	.comm	_DMA_RTADDR_SMT,4,2             ## @DMA_RTADDR_SMT
	.comm	_VTD_PAGE_MASK,4,2              ## @VTD_PAGE_MASK
	.no_dead_strip	_ctx_tbl_walk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ctx_tbl_walk
_ctx_tbl_walk:                          ; @ctx_tbl_walk
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w22, #0
	sxtw	x25, w19
	mov	x26, sp
Lloh0:
	adrp	x27, _DMAR_RTADDR_REG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _DMAR_RTADDR_REG@GOTPAGEOFF]
Lloh2:
	adrp	x28, _DMA_RTADDR_SMT@GOTPAGE
Lloh3:
	ldr	x28, [x28, _DMA_RTADDR_SMT@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
Lloh4:
	adrp	x9, _VTD_PAGE_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VTD_PAGE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w24, w9, w8
	mov	x0, x23
	bl	_get_pasid_dir_size
	mov	x2, x0
	mov	x0, x21
	mov	x1, x24
	bl	_pasid_dir_walk
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	cmp	w22, #256
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	w3, #0
	bl	_iommu_context_addr
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x0
	bl	_context_present
	cbz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	stp	w19, w22, [sp]
	ldr	x8, [x20, #8]
	add	x8, x8, x25, lsl #2
	stp	x23, x8, [sp, #8]
	str	x26, [x21]
	ldr	x8, [x20]
	ldr	x9, [x27]
	add	x0, x9, x8
	bl	_dmar_readq
	ldr	w8, [x28]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_print_tbl_walk
	b	LBB0_2
LBB0_7:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_RTADDR_REG,8,3            ; @DMAR_RTADDR_REG
	.comm	_DMA_RTADDR_SMT,4,2             ; @DMA_RTADDR_SMT
	.comm	_VTD_PAGE_MASK,4,2              ; @VTD_PAGE_MASK
	.no_dead_strip	_ctx_tbl_walk
.subsections_via_symbols
