	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs400_gart_init                ## -- Begin function rs400_gart_init
	.p2align	4, 0x90
_rs400_gart_init:                       ## @rs400_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, 8(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_2:
	movq	%rdi, %rbx
	movl	16(%rdi), %ecx
	leal	1048575(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$20, %eax
	cmpl	$255, %eax
	jg	LBB0_10
## %bb.3:
	cmpl	$32, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$64, %eax
	je	LBB0_6
## %bb.5:
	cmpl	$128, %eax
	je	LBB0_6
	jmp	LBB0_13
LBB0_10:
	cmpl	$256, %eax                      ## imm = 0x100
	je	LBB0_6
## %bb.11:
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_6
## %bb.12:
	cmpl	$1024, %eax                     ## imm = 0x400
	jne	LBB0_13
LBB0_6:
	movq	%rbx, %rdi
	callq	_radeon_gart_init
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	%rbx, %rdi
	callq	_rs400_debugfs_pcie_gart_info_init
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_9:
	movl	4(%rbx), %eax
	shll	$2, %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_radeon_gart_table_ram_alloc    ## TAILCALL
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RS400 GART already initialized\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to register debugfs file for RS400 GART !\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs400_gart_init                ; -- Begin function rs400_gart_init
	.p2align	2
_rs400_gart_init:                       ; @rs400_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, #8]
	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_14
LBB0_2:
	mov	x19, x0
	ldr	w8, [x0, #16]
	mov	w9, #1048575
	add	w9, w8, w9
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #20
	cmp	w8, #255
	b.gt	LBB0_6
; %bb.3:
	cmp	w8, #32
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #64
	b.eq	LBB0_9
; %bb.5:
	cmp	w8, #128
	b.eq	LBB0_9
	b	LBB0_13
LBB0_6:
	cmp	w8, #256
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #512
	b.eq	LBB0_9
; %bb.8:
	cmp	w8, #1024
	b.ne	LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_radeon_gart_init
	cbnz	w0, LBB0_14
; %bb.10:
	mov	x0, x19
	bl	_rs400_debugfs_pcie_gart_info_init
	cbz	x0, LBB0_12
; %bb.11:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_12:
	ldr	w8, [x19, #4]
	lsl	w8, w8, #2
	str	w8, [x19]
	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
LBB0_13:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RS400 GART already initialized\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to register debugfs file for RS400 GART !\n"

.subsections_via_symbols
