	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r100_pci_gart_init             ## -- Begin function r100_pci_gart_init
	.p2align	4, 0x90
_r100_pci_gart_init:                    ## @r100_pci_gart_init
	.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
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_2:
	movq	%rdi, %rbx
	callq	_radeon_gart_init
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movl	12(%rbx), %eax
	shll	$2, %eax
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rax
	movq	_r100_pci_gart_tlb_flush@GOTPCREL(%rip), %rcx
	movq	%rcx, 16(%rax)
	movq	_r100_pci_gart_get_page_entry@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_r100_pci_gart_set_page@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_radeon_gart_table_ram_alloc    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"R100 PCI GART already initialized\n"

	.comm	_r100_pci_gart_tlb_flush,4,2    ## @r100_pci_gart_tlb_flush
	.comm	_r100_pci_gart_get_page_entry,4,2 ## @r100_pci_gart_get_page_entry
	.comm	_r100_pci_gart_set_page,4,2     ## @r100_pci_gart_set_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r100_pci_gart_init             ; -- Begin function r100_pci_gart_init
	.p2align	2
_r100_pci_gart_init:                    ; @r100_pci_gart_init
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x19, x0
	bl	_radeon_gart_init
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x19, #12]
	lsl	w8, w8, #2
	str	w8, [x19, #8]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _r100_pci_gart_tlb_flush@GOTPAGE
Lloh3:
	ldr	x9, [x9, _r100_pci_gart_tlb_flush@GOTPAGEOFF]
Lloh4:
	adrp	x10, _r100_pci_gart_get_page_entry@GOTPAGE
Lloh5:
	ldr	x10, [x10, _r100_pci_gart_get_page_entry@GOTPAGEOFF]
	str	x9, [x8, #16]
Lloh6:
	adrp	x9, _r100_pci_gart_set_page@GOTPAGE
Lloh7:
	ldr	x9, [x9, _r100_pci_gart_set_page@GOTPAGEOFF]
	stp	x9, x10, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_radeon_gart_table_ram_alloc
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"R100 PCI GART already initialized\n"

	.comm	_r100_pci_gart_tlb_flush,4,2    ; @r100_pci_gart_tlb_flush
	.comm	_r100_pci_gart_get_page_entry,4,2 ; @r100_pci_gart_get_page_entry
	.comm	_r100_pci_gart_set_page,4,2     ; @r100_pci_gart_set_page
.subsections_via_symbols
