	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_check_arguments
_radeon_check_arguments:                ## @radeon_check_arguments
	.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	%rdi, %r15
	movq	_radeon_vram_limit@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_radeon_check_pot_argument
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movl	$0, (%rbx)
LBB0_2:
	movq	_radeon_gart_size@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	cmpl	$31, %edx
	jg	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_4:
	movl	%edx, %edi
	callq	_radeon_check_pot_argument
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%r14), %eax
	shll	$20, %eax
	jmp	LBB0_8
LBB0_6:
	movl	(%r15), %edi
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
LBB0_7:
	callq	_dev_warn
	movl	$512, (%r14)                    ## imm = 0x200
	movl	$536870912, %eax                ## imm = 0x20000000
LBB0_8:
	movl	%eax, 4(%r15)
	movq	_radeon_agpmode@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leal	1(%rdx), %eax
	cmpl	$9, %eax
	ja	LBB0_10
## %bb.9:
	movl	$559, %ecx                      ## imm = 0x22F
	btl	%eax, %ecx
	jae	LBB0_10
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_warn
	movl	$0, (%rbx)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_radeon_vram_limit,4,2          ## @radeon_vram_limit
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vram limit (%d) must be a power of 2\n"

	.comm	_radeon_gart_size,4,2           ## @radeon_gart_size
L_.str.1:                               ## @.str.1
	.asciz	"gart size (%d) too small forcing to 512M\n"

L_.str.2:                               ## @.str.2
	.asciz	"gart size (%d) must be a power of 2\n"

	.comm	_radeon_agpmode,4,2             ## @radeon_agpmode
L_.str.3:                               ## @.str.3
	.asciz	"invalid AGP mode %d (valid mode: -1, 0, 1, 2, 4, 8)\n"

	.no_dead_strip	_radeon_check_arguments
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_check_arguments
_radeon_check_arguments:                ; @radeon_check_arguments
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _radeon_vram_limit@GOTPAGE
Lloh1:
	ldr	x20, [x20, _radeon_vram_limit@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_radeon_check_pot_argument
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	ldr	w2, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	str	wzr, [x20]
LBB0_2:
Lloh4:
	adrp	x20, _radeon_gart_size@GOTPAGE
Lloh5:
	ldr	x20, [x20, _radeon_gart_size@GOTPAGEOFF]
	ldr	w2, [x20]
	cmp	w2, #31
	b.gt	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
	mov	x0, x2
	bl	_radeon_check_pot_argument
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w8, [x20]
	lsl	w8, w8, #20
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19]
	ldr	w2, [x20]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	bl	_dev_warn
	mov	w8, #512
	str	w8, [x20]
	mov	w8, #536870912
LBB0_8:
	str	w8, [x19, #4]
Lloh10:
	adrp	x20, _radeon_agpmode@GOTPAGE
Lloh11:
	ldr	x20, [x20, _radeon_agpmode@GOTPAGEOFF]
	ldr	w2, [x20]
	add	w8, w2, #1
	cmp	w8, #9
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #559
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
	str	wzr, [x20]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_radeon_vram_limit,4,2          ; @radeon_vram_limit
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vram limit (%d) must be a power of 2\n"

	.comm	_radeon_gart_size,4,2           ; @radeon_gart_size
l_.str.1:                               ; @.str.1
	.asciz	"gart size (%d) too small forcing to 512M\n"

l_.str.2:                               ; @.str.2
	.asciz	"gart size (%d) must be a power of 2\n"

	.comm	_radeon_agpmode,4,2             ; @radeon_agpmode
l_.str.3:                               ; @.str.3
	.asciz	"invalid AGP mode %d (valid mode: -1, 0, 1, 2, 4, 8)\n"

	.no_dead_strip	_radeon_check_arguments
.subsections_via_symbols
