	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_configure_agp3
_via_configure_agp3:                    ## @via_configure_agp3
	.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	_agp_bridge@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	12(%rax), %edi
	callq	_A_SIZE_16
	movq	(%r15), %rax
	movl	8(%rax), %edi
	movq	_AGP_APBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %r14
	movq	%r14, %rdx
	callq	_pci_read_config_dword
	movq	_PCI_BASE_ADDRESS_MEM_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-28(%rbp), %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movl	8(%rcx), %edi
	movq	_VIA_AGP3_ATTBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-4096, %edx                    ## imm = 0xF000
	andl	4(%rcx), %edx
	callq	_pci_write_config_dword
	movq	(%r15), %rax
	movl	8(%rax), %edi
	movq	_VIA_AGP3_GARTCTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdx
	callq	_pci_read_config_dword
	movq	(%r15), %rax
	movl	8(%rax), %edi
	movl	(%rbx), %esi
	movl	$384, %edx                      ## imm = 0x180
	orl	-28(%rbp), %edx
	callq	_pci_write_config_dword
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.comm	_AGP_APBASE,4,2                 ## @AGP_APBASE
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ## @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_VIA_AGP3_ATTBASE,4,2           ## @VIA_AGP3_ATTBASE
	.comm	_VIA_AGP3_GARTCTRL,4,2          ## @VIA_AGP3_GARTCTRL
	.no_dead_strip	_via_configure_agp3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_configure_agp3
_via_configure_agp3:                    ; @via_configure_agp3
	.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
Lloh0:
	adrp	x19, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x19, [x19, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8, #12]
	bl	_A_SIZE_16
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
Lloh2:
	adrp	x8, _AGP_APBASE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AGP_APBASE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	x9, [x19]
	str	w8, [x9]
Lloh8:
	adrp	x8, _VIA_AGP3_ATTBASE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VIA_AGP3_ATTBASE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldp	w8, w0, [x9, #4]
	and	w2, w8, #0xfffff000
	bl	_pci_write_config_dword
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
Lloh11:
	adrp	x20, _VIA_AGP3_GARTCTRL@GOTPAGE
Lloh12:
	ldr	x20, [x20, _VIA_AGP3_GARTCTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
	ldr	w1, [x20]
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x180
	bl	_pci_write_config_dword
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.comm	_AGP_APBASE,4,2                 ; @AGP_APBASE
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ; @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_VIA_AGP3_ATTBASE,4,2           ; @VIA_AGP3_ATTBASE
	.comm	_VIA_AGP3_GARTCTRL,4,2          ; @VIA_AGP3_GARTCTRL
	.no_dead_strip	_via_configure_agp3
.subsections_via_symbols
