	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_teardown_mchbar
_intel_teardown_mchbar:                 ## @intel_teardown_mchbar
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	jl	LBB0_1
## %bb.2:
	movq	_MCHBAR_I965@GOTPCREL(%rip), %rax
	cmpq	$0, 16(%r15)
	jne	LBB0_4
	jmp	LBB0_9
LBB0_1:
	movq	_MCHBAR_I915@GOTPCREL(%rip), %rax
	cmpq	$0, 16(%r15)
	je	LBB0_9
LBB0_4:
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_IS_I915G
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_IS_I915GM
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movl	8(%r15), %edi
	movq	_DEVEN_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_DEVEN_MCHBAR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	8(%r15), %edi
	movl	(%rbx), %esi
LBB0_8:
	callq	_pci_write_config_dword
LBB0_9:
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_release_resource
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	8(%r15), %edi
	leaq	-28(%rbp), %rdx
	movl	%r14d, %esi
	callq	_pci_read_config_dword
	movl	-28(%rbp), %edx
	andl	$-2, %edx
	movl	%edx, -28(%rbp)
	movl	8(%r15), %edi
	movl	%r14d, %esi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MCHBAR_I965,4,2                ## @MCHBAR_I965
	.comm	_MCHBAR_I915,4,2                ## @MCHBAR_I915
	.comm	_DEVEN_REG,4,2                  ## @DEVEN_REG
	.comm	_DEVEN_MCHBAR_EN,4,2            ## @DEVEN_MCHBAR_EN
	.no_dead_strip	_intel_teardown_mchbar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_teardown_mchbar
_intel_teardown_mchbar:                 ; @intel_teardown_mchbar
	.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
	mov	x21, x0
	ldr	x19, [x0]
	bl	_INTEL_INFO
Lloh0:
	adrp	x8, _MCHBAR_I965@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCHBAR_I965@GOTPAGEOFF]
	ldr	w9, [x0]
Lloh2:
	adrp	x10, _MCHBAR_I915@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MCHBAR_I915@GOTPAGEOFF]
	cmp	w9, #3
	csel	x8, x8, x10, gt
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_5
; %bb.1:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_IS_I915G
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_IS_I915GM
	cbz	x0, LBB0_8
LBB0_3:
	ldr	w0, [x19, #8]
Lloh4:
	adrp	x20, _DEVEN_REG@GOTPAGE
Lloh5:
	ldr	x20, [x20, _DEVEN_REG@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_pci_read_config_dword
Lloh6:
	adrp	x8, _DEVEN_MCHBAR_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEVEN_MCHBAR_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
LBB0_4:
	bl	_pci_write_config_dword
LBB0_5:
	ldr	x8, [x19]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_release_resource
LBB0_7:
	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
LBB0_8:
	ldr	w0, [x19, #8]
	add	x2, sp, #12
	mov	x1, x20
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	w2, w8, #0xfffffffe
	str	w2, [sp, #12]
	ldr	w0, [x19, #8]
	mov	x1, x20
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MCHBAR_I965,4,2                ; @MCHBAR_I965
	.comm	_MCHBAR_I915,4,2                ; @MCHBAR_I915
	.comm	_DEVEN_REG,4,2                  ; @DEVEN_REG
	.comm	_DEVEN_MCHBAR_EN,4,2            ; @DEVEN_MCHBAR_EN
	.no_dead_strip	_intel_teardown_mchbar
.subsections_via_symbols
