	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs400_gart_adjust_size         ## -- Begin function rs400_gart_adjust_size
	.p2align	4, 0x90
_rs400_gart_adjust_size:                ## @rs400_gart_adjust_size
	.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
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	leal	1048575(%rsi), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	sarl	$20, %eax
	cmpl	$255, %eax
	jg	LBB0_4
## %bb.1:
	cmpl	$32, %eax
	je	LBB0_8
## %bb.2:
	cmpl	$64, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$128, %eax
	je	LBB0_8
	jmp	LBB0_7
LBB0_4:
	cmpl	$256, %eax                      ## imm = 0x100
	je	LBB0_8
## %bb.5:
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_8
## %bb.6:
	cmpl	$1024, %eax                     ## imm = 0x400
	je	LBB0_8
LBB0_7:
	sarl	$20, %esi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	$33554432, (%rbx)               ## imm = 0x2000000
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to use IGP GART size %uM\n"

L_.str.1:                               ## @.str.1
	.asciz	"Valid GART size for IGP are 32M,64M,128M,256M,512M,1G,2G\n"

L_.str.2:                               ## @.str.2
	.asciz	"Forcing to 32M GART size\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs400_gart_adjust_size         ; -- Begin function rs400_gart_adjust_size
	.p2align	2
_rs400_gart_adjust_size:                ; @rs400_gart_adjust_size
	.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
	mov	x19, x0
	ldr	w8, [x0]
	mov	w9, #1048575
	add	w9, w8, w9
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w9, w9, #20
	cmp	w9, #255
	b.gt	LBB0_4
; %bb.1:
	cmp	w9, #32
	b.eq	LBB0_8
; %bb.2:
	cmp	w9, #64
	b.eq	LBB0_8
; %bb.3:
	cmp	w9, #128
	b.eq	LBB0_8
	b	LBB0_7
LBB0_4:
	cmp	w9, #256
	b.eq	LBB0_8
; %bb.5:
	cmp	w9, #512
	b.eq	LBB0_8
; %bb.6:
	cmp	w9, #1024
	b.eq	LBB0_8
LBB0_7:
	asr	w8, w8, #20
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	mov	w8, #33554432
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to use IGP GART size %uM\n"

l_.str.1:                               ; @.str.1
	.asciz	"Valid GART size for IGP are 32M,64M,128M,256M,512M,1G,2G\n"

l_.str.2:                               ; @.str.2
	.asciz	"Forcing to 32M GART size\n"

.subsections_via_symbols
