	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uninorth_configure
_uninorth_configure:                    ## @uninorth_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_agp_bridge@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	24(%rax), %edi
	callq	_A_SIZE_32
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	16(%rax), %rdi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	(%r14), %rax
	movq	16(%rax), %rdi
	movq	_UNI_N_CFG_GART_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	$-4096, %edx                    ## imm = 0xF000
	andl	(%rax), %edx
	orl	(%rbx), %edx
	callq	_pci_write_config_dword
	movq	(%r14), %rax
	movl	$0, 4(%rax)
	movq	16(%rax), %rdi
	movq	_UNI_N_CFG_AGP_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_write_config_dword
	movq	_is_u3@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	movq	16(%rax), %r14
	movq	_UNI_N_CFG_GART_DUMMY_PAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	8(%rax), %edi
	callq	_page_to_phys
	sarl	$12, %eax
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pci_write_config_dword
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"configuring for size idx: %d\n"

	.comm	_UNI_N_CFG_GART_BASE,4,2        ## @UNI_N_CFG_GART_BASE
	.comm	_UNI_N_CFG_AGP_BASE,4,2         ## @UNI_N_CFG_AGP_BASE
	.comm	_is_u3,8,3                      ## @is_u3
	.comm	_UNI_N_CFG_GART_DUMMY_PAGE,4,2  ## @UNI_N_CFG_GART_DUMMY_PAGE
	.no_dead_strip	_uninorth_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uninorth_configure
_uninorth_configure:                    ; @uninorth_configure
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x20, [x20, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w0, [x8, #24]
	bl	_A_SIZE_32
	mov	x19, x0
	ldr	x8, [x20]
	ldr	x0, [x8, #16]
	ldr	w2, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _UNI_N_CFG_GART_BASE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _UNI_N_CFG_GART_BASE@GOTPAGEOFF]
	ldr	x0, [x8, #16]
Lloh6:
	ldr	w1, [x9]
	ldr	w8, [x8]
	and	w8, w8, #0xfffff000
	ldr	w9, [x19]
	orr	w2, w8, w9
	bl	_pci_write_config_dword
	ldr	x8, [x20]
	str	wzr, [x8, #4]
	ldr	x0, [x8, #16]
Lloh7:
	adrp	x8, _UNI_N_CFG_AGP_BASE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UNI_N_CFG_AGP_BASE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_pci_write_config_dword
Lloh10:
	adrp	x8, _is_u3@GOTPAGE
Lloh11:
	ldr	x8, [x8, _is_u3@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	x19, [x8, #16]
Lloh13:
	adrp	x9, _UNI_N_CFG_GART_DUMMY_PAGE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _UNI_N_CFG_GART_DUMMY_PAGE@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x9]
	ldr	w0, [x8, #8]
	bl	_page_to_phys
	asr	w2, w0, #12
	mov	x0, x19
	mov	x1, x20
	bl	_pci_write_config_dword
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"configuring for size idx: %d\n"

	.comm	_UNI_N_CFG_GART_BASE,4,2        ; @UNI_N_CFG_GART_BASE
	.comm	_UNI_N_CFG_AGP_BASE,4,2         ; @UNI_N_CFG_AGP_BASE
	.comm	_is_u3,8,3                      ; @is_u3
	.comm	_UNI_N_CFG_GART_DUMMY_PAGE,4,2  ; @UNI_N_CFG_GART_DUMMY_PAGE
	.no_dead_strip	_uninorth_configure
.subsections_via_symbols
