	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r520_vram_get_type
_r520_vram_get_type:                    ## @r520_vram_get_type
	.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
	movabsq	$4294967424, %rax               ## imm = 0x100000080
	movq	%rax, (%rdi)
	movq	_R520_MC_CNTL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_MC
	movq	_R520_MEM_NUM_CHANNELS_MASK@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	andl	(%rcx), %edx
	movq	_R520_MEM_NUM_CHANNELS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	cmpl	$3, %edx
	ja	LBB0_1
## %bb.2:
	movslq	%edx, %rcx
	leaq	L_switch.table.r520_vram_get_type(%rip), %rdx
	movl	(%rdx,%rcx,4), %edx
	leaq	L_switch.table.r520_vram_get_type.1(%rip), %rsi
	movl	(%rsi,%rcx,4), %ecx
	jmp	LBB0_3
LBB0_1:
	movl	$256, %ecx                      ## imm = 0x100
	movl	$128, %edx
LBB0_3:
	movl	%edx, (%rbx)
	movq	_R520_MC_CHANNEL_SIZE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_5
## %bb.4:
	movl	%ecx, (%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R520_MC_CNTL0,4,2              ## @R520_MC_CNTL0
	.comm	_R520_MEM_NUM_CHANNELS_MASK,4,2 ## @R520_MEM_NUM_CHANNELS_MASK
	.comm	_R520_MEM_NUM_CHANNELS_SHIFT,4,2 ## @R520_MEM_NUM_CHANNELS_SHIFT
	.comm	_R520_MC_CHANNEL_SIZE,4,2       ## @R520_MC_CHANNEL_SIZE
	.no_dead_strip	_r520_vram_get_type
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.r520_vram_get_type
L_switch.table.r520_vram_get_type:
	.long	32                              ## 0x20
	.long	64                              ## 0x40
	.long	128                             ## 0x80
	.long	256                             ## 0x100

	.p2align	2                               ## @switch.table.r520_vram_get_type.1
L_switch.table.r520_vram_get_type.1:
	.long	64                              ## 0x40
	.long	128                             ## 0x80
	.long	256                             ## 0x100
	.long	512                             ## 0x200

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function r520_vram_get_type
lCPI0_0:
	.long	128                             ; 0x80
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_r520_vram_get_type:                    ; @r520_vram_get_type
	.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	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x0]
Lloh2:
	adrp	x8, _R520_MC_CNTL0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R520_MC_CNTL0@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_RREG32_MC
Lloh5:
	adrp	x8, _R520_MEM_NUM_CHANNELS_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R520_MEM_NUM_CHANNELS_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh8:
	adrp	x9, _R520_MEM_NUM_CHANNELS_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _R520_MEM_NUM_CHANNELS_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cmp	w8, #3
	b.hi	LBB0_2
; %bb.1:
	sbfiz	x8, x8, #2, #32
Lloh11:
	adrp	x9, l_switch.table.r520_vram_get_type@PAGE
Lloh12:
	add	x9, x9, l_switch.table.r520_vram_get_type@PAGEOFF
	ldr	w9, [x9, x8]
Lloh13:
	adrp	x10, l_switch.table.r520_vram_get_type.1@PAGE
Lloh14:
	add	x10, x10, l_switch.table.r520_vram_get_type.1@PAGEOFF
	ldr	w8, [x10, x8]
	b	LBB0_3
LBB0_2:
	mov	w8, #256
	mov	w9, #128
LBB0_3:
	str	w9, [x19]
Lloh15:
	adrp	x9, _R520_MC_CHANNEL_SIZE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _R520_MC_CHANNEL_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_5
; %bb.4:
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_R520_MC_CNTL0,4,2              ; @R520_MC_CNTL0
	.comm	_R520_MEM_NUM_CHANNELS_MASK,4,2 ; @R520_MEM_NUM_CHANNELS_MASK
	.comm	_R520_MEM_NUM_CHANNELS_SHIFT,4,2 ; @R520_MEM_NUM_CHANNELS_SHIFT
	.comm	_R520_MC_CHANNEL_SIZE,4,2       ; @R520_MC_CHANNEL_SIZE
	.no_dead_strip	_r520_vram_get_type
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.r520_vram_get_type
l_switch.table.r520_vram_get_type:
	.long	32                              ; 0x20
	.long	64                              ; 0x40
	.long	128                             ; 0x80
	.long	256                             ; 0x100

	.p2align	2                               ; @switch.table.r520_vram_get_type.1
l_switch.table.r520_vram_get_type.1:
	.long	64                              ; 0x40
	.long	128                             ; 0x80
	.long	256                             ; 0x100
	.long	512                             ; 0x200

.subsections_via_symbols
