	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gart_iommu_shutdown            ## -- Begin function gart_iommu_shutdown
	.p2align	4, 0x90
_gart_iommu_shutdown:                   ## @gart_iommu_shutdown
	.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	_no_agp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_dma_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	_gart_dma_ops@GOTPCREL(%rip), %rax
	jne	LBB0_6
LBB0_2:
	movq	_AMD_NB_GART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_amd_nb_has_feature
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	xorl	%eax, %eax
	callq	_amd_nb_num
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movq	_AMD64_GARTAPERTURECTL@GOTPCREL(%rip), %r12
	leaq	-44(%rbp), %r14
	movq	_GARTEN@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_node_to_amd_nb
	movq	(%rax), %r15
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_pci_read_config_dword
	movl	(%r13), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_pci_write_config_dword
	incl	%ebx
	xorl	%eax, %eax
	callq	_amd_nb_num
	cmpl	%eax, %ebx
	jl	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_no_agp,8,3                     ## @no_agp
	.comm	_dma_ops,8,3                    ## @dma_ops
	.comm	_gart_dma_ops,4,2               ## @gart_dma_ops
	.comm	_AMD_NB_GART,4,2                ## @AMD_NB_GART
	.comm	_AMD64_GARTAPERTURECTL,4,2      ## @AMD64_GARTAPERTURECTL
	.comm	_GARTEN,4,2                     ## @GARTEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gart_iommu_shutdown            ; -- Begin function gart_iommu_shutdown
	.p2align	2
_gart_iommu_shutdown:                   ; @gart_iommu_shutdown
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _no_agp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _no_agp@GOTPAGEOFF]
Lloh2:
	adrp	x9, _dma_ops@GOTPAGE
Lloh3:
	ldr	x9, [x9, _dma_ops@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, #0
Lloh6:
	adrp	x8, _gart_dma_ops@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gart_dma_ops@GOTPAGEOFF]
	ccmp	x9, x8, #4, ne
	b.ne	LBB0_5
; %bb.1:
Lloh8:
	adrp	x8, _AMD_NB_GART@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AMD_NB_GART@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_amd_nb_has_feature
	cbz	w0, LBB0_5
; %bb.2:
	bl	_amd_nb_num
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w19, #0
Lloh11:
	adrp	x21, _AMD64_GARTAPERTURECTL@GOTPAGE
Lloh12:
	ldr	x21, [x21, _AMD64_GARTAPERTURECTL@GOTPAGEOFF]
Lloh13:
	adrp	x22, _GARTEN@GOTPAGE
Lloh14:
	ldr	x22, [x22, _GARTEN@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_node_to_amd_nb
	ldr	x20, [x0]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_pci_write_config_dword
	add	w19, w19, #1
	bl	_amd_nb_num
	cmp	w19, w0
	b.lt	LBB0_4
LBB0_5:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_no_agp,8,3                     ; @no_agp
	.comm	_dma_ops,8,3                    ; @dma_ops
	.comm	_gart_dma_ops,4,2               ; @gart_dma_ops
	.comm	_AMD_NB_GART,4,2                ; @AMD_NB_GART
	.comm	_AMD64_GARTAPERTURECTL,4,2      ; @AMD64_GARTAPERTURECTL
	.comm	_GARTEN,4,2                     ; @GARTEN
.subsections_via_symbols
