	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quirk_calpella_no_shadow_gtt
_quirk_calpella_no_shadow_gtt:          ## @quirk_calpella_no_shadow_gtt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_GGC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-10(%rbp), %rdx
	callq	_pci_read_config_word
	testq	%rax, %rax
	je	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_GGC_MEMORY_VT_ENABLED@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	testw	%ax, -10(%rbp)
	je	LBB0_2
## %bb.3:
	movq	_dmar_map_gfx@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	movq	_intel_iommu_strict@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	movq	_dmar_map_gfx@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_GGC,4,2                        ## @GGC
	.comm	_GGC_MEMORY_VT_ENABLED,2,1      ## @GGC_MEMORY_VT_ENABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BIOS has allocated no shadow GTT; disabling IOMMU for graphics\n"

	.comm	_dmar_map_gfx,8,3               ## @dmar_map_gfx
L_.str.1:                               ## @.str.1
	.asciz	"Disabling batched IOTLB flush on Ironlake\n"

	.comm	_intel_iommu_strict,4,2         ## @intel_iommu_strict
	.no_dead_strip	_quirk_calpella_no_shadow_gtt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quirk_calpella_no_shadow_gtt
_quirk_calpella_no_shadow_gtt:          ; @quirk_calpella_no_shadow_gtt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _GGC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GGC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #14
	bl	_pci_read_config_word
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	ldrh	w8, [sp, #14]
Lloh3:
	adrp	x9, _GGC_MEMORY_VT_ENABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GGC_MEMORY_VT_ENABLED@GOTPAGEOFF]
	ldrh	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
Lloh5:
	adrp	x8, _dmar_map_gfx@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dmar_map_gfx@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_1
; %bb.4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_info
Lloh10:
	adrp	x8, _intel_iommu_strict@GOTPAGE
Lloh11:
	ldr	x8, [x8, _intel_iommu_strict@GOTPAGEOFF]
	mov	w9, #1
Lloh12:
	str	w9, [x8]
	b	LBB0_1
LBB0_5:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_info
Lloh15:
	adrp	x8, _dmar_map_gfx@GOTPAGE
Lloh16:
	ldr	x8, [x8, _dmar_map_gfx@GOTPAGEOFF]
Lloh17:
	str	xzr, [x8]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GGC,4,2                        ; @GGC
	.comm	_GGC_MEMORY_VT_ENABLED,2,1      ; @GGC_MEMORY_VT_ENABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BIOS has allocated no shadow GTT; disabling IOMMU for graphics\n"

	.comm	_dmar_map_gfx,8,3               ; @dmar_map_gfx
l_.str.1:                               ; @.str.1
	.asciz	"Disabling batched IOTLB flush on Ironlake\n"

	.comm	_intel_iommu_strict,4,2         ; @intel_iommu_strict
	.no_dead_strip	_quirk_calpella_no_shadow_gtt
.subsections_via_symbols
