	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_815_configure
_intel_815_configure:                   ## @intel_815_configure
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_agp_bridge@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_INTEL_815_ATTBASE_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	8(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_emerg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	16(%rax), %edi
	callq	_A_SIZE_8
	movq	(%r14), %rcx
	movq	8(%rcx), %rdi
	movq	_INTEL_APSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	callq	_pci_write_config_byte
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	_AGP_APBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_PCI_BASE_ADDRESS_MEM_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-36(%rbp), %eax
	movq	(%r14), %rcx
	movl	%eax, 4(%rcx)
	movq	8(%rcx), %rdi
	movq	_INTEL_ATTBASE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_pci_read_config_dword
	movl	-28(%rbp), %edx
	andl	(%rbx), %edx
	movl	%edx, -28(%rbp)
	movq	(%r14), %rax
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	movq	8(%rax), %rdi
	movl	(%r15), %esi
	callq	_pci_write_config_dword
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	_INTEL_AGPCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_pci_write_config_dword
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	_INTEL_815_APCONT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	callq	_pci_read_config_byte
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movl	(%r15), %esi
	movl	-32(%rbp), %edx
	orl	$2, %edx
	callq	_pci_write_config_byte
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.comm	_INTEL_815_ATTBASE_MASK,4,2     ## @INTEL_815_ATTBASE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gatt bus addr too high"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INTEL_APSIZE,4,2               ## @INTEL_APSIZE
	.comm	_AGP_APBASE,4,2                 ## @AGP_APBASE
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ## @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_INTEL_ATTBASE,4,2              ## @INTEL_ATTBASE
	.comm	_INTEL_AGPCTRL,4,2              ## @INTEL_AGPCTRL
	.comm	_INTEL_815_APCONT,4,2           ## @INTEL_815_APCONT
	.no_dead_strip	_intel_815_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_815_configure
_intel_815_configure:                   ; @intel_815_configure
	.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	x19, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x19, [x19, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w9, [x8]
Lloh2:
	adrp	x20, _INTEL_815_ATTBASE_MASK@GOTPAGE
Lloh3:
	ldr	x20, [x20, _INTEL_815_ATTBASE_MASK@GOTPAGEOFF]
	ldr	w10, [x20]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x8, #8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_emerg
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldr	w0, [x8, #16]
	bl	_A_SIZE_8
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
Lloh9:
	adrp	x9, _INTEL_APSIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INTEL_APSIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	ldr	w2, [x0]
	mov	x0, x8
	bl	_pci_write_config_byte
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
Lloh12:
	adrp	x8, _AGP_APBASE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AGP_APBASE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
Lloh15:
	adrp	x9, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	x9, [x19]
	str	w8, [x9, #4]
	ldr	x0, [x9, #8]
Lloh18:
	adrp	x21, _INTEL_ATTBASE@GOTPAGE
Lloh19:
	ldr	x21, [x21, _INTEL_ATTBASE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	bl	_pci_read_config_dword
	ldr	w8, [x20]
	ldr	w9, [sp, #8]
	and	w8, w9, w8
	str	w8, [sp, #8]
	ldr	x9, [x19]
	ldr	w10, [x9]
	orr	w2, w10, w8
	str	w2, [sp, #8]
	ldr	x0, [x9, #8]
	ldr	w1, [x21]
	bl	_pci_write_config_dword
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
Lloh20:
	adrp	x8, _INTEL_AGPCTRL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _INTEL_AGPCTRL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_pci_write_config_dword
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
Lloh23:
	adrp	x20, _INTEL_815_APCONT@GOTPAGE
Lloh24:
	ldr	x20, [x20, _INTEL_815_APCONT@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #4
	bl	_pci_read_config_byte
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	ldr	w1, [x20]
	ldr	w8, [sp, #4]
	orr	w2, w8, #0x2
	bl	_pci_write_config_byte
	mov	w0, #0
LBB0_3:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.comm	_INTEL_815_ATTBASE_MASK,4,2     ; @INTEL_815_ATTBASE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gatt bus addr too high"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INTEL_APSIZE,4,2               ; @INTEL_APSIZE
	.comm	_AGP_APBASE,4,2                 ; @AGP_APBASE
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ; @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_INTEL_ATTBASE,4,2              ; @INTEL_ATTBASE
	.comm	_INTEL_AGPCTRL,4,2              ; @INTEL_AGPCTRL
	.comm	_INTEL_815_APCONT,4,2           ; @INTEL_815_APCONT
	.no_dead_strip	_intel_815_configure
.subsections_via_symbols
