	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v9_0_init_compute_vmid
_gfx_v9_0_init_compute_vmid:            ## @gfx_v9_0_init_compute_vmid
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DEFAULT_SH_MEM_BASES@GOTPCREL(%rip), %rax
	movq	_SH_MEM_ALIGNMENT_MODE_UNALIGNED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r15d
	movl	(%rax), %r13d
	movq	_SH_MEM_ADDRESS_MODE_64@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	callq	_mutex_lock
	movq	_FIRST_COMPUTE_VMID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_LAST_COMPUTE_VMID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_3
## %bb.1:
	movl	%r13d, %r12d
	shll	$16, %r12d
	orl	%r13d, %r12d
	movq	_GC@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	callq	_soc15_grbm_select
	movl	(%r13), %edi
	movq	_mmSH_MEM_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r15d, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r13), %edi
	movq	_mmSH_MEM_BASES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r12d, %ecx
	callq	_WREG32_SOC15_RLC
	incl	%ebx
	movq	_LAST_COMPUTE_VMID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_soc15_grbm_select
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_FIRST_COMPUTE_VMID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_LAST_COMPUTE_VMID@GOTPCREL(%rip), %r13
	cmpl	(%r13), %ebx
	jge	LBB0_6
## %bb.4:
	leal	(%rbx,%rbx), %r14d
	movq	_GC@GOTPCREL(%rip), %r15
	movq	_mmGDS_OA_VMID0@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	_mmGDS_VMID0_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_WREG32_SOC15_OFFSET
	movl	(%r15), %edi
	movq	_mmGDS_VMID0_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_WREG32_SOC15_OFFSET
	movl	(%r15), %edi
	movq	_mmGDS_GWS_VMID0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_WREG32_SOC15_OFFSET
	movl	(%r15), %edi
	movl	(%r12), %edx
	xorl	%esi, %esi
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_WREG32_SOC15_OFFSET
	incl	%ebx
	addl	$2, %r14d
	cmpl	(%r13), %ebx
	jl	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_SH_MEM_BASES,4,2       ## @DEFAULT_SH_MEM_BASES
	.comm	_SH_MEM_ADDRESS_MODE_64,4,2     ## @SH_MEM_ADDRESS_MODE_64
	.comm	_SH_MEM_ALIGNMENT_MODE_UNALIGNED,4,2 ## @SH_MEM_ALIGNMENT_MODE_UNALIGNED
	.comm	_SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT,4,2 ## @SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT
	.comm	_FIRST_COMPUTE_VMID,4,2         ## @FIRST_COMPUTE_VMID
	.comm	_LAST_COMPUTE_VMID,4,2          ## @LAST_COMPUTE_VMID
	.comm	_GC,4,2                         ## @GC
	.comm	_mmSH_MEM_CONFIG,4,2            ## @mmSH_MEM_CONFIG
	.comm	_mmSH_MEM_BASES,4,2             ## @mmSH_MEM_BASES
	.comm	_mmGDS_VMID0_BASE,4,2           ## @mmGDS_VMID0_BASE
	.comm	_mmGDS_VMID0_SIZE,4,2           ## @mmGDS_VMID0_SIZE
	.comm	_mmGDS_GWS_VMID0,4,2            ## @mmGDS_GWS_VMID0
	.comm	_mmGDS_OA_VMID0,4,2             ## @mmGDS_OA_VMID0
	.no_dead_strip	_gfx_v9_0_init_compute_vmid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v9_0_init_compute_vmid
_gfx_v9_0_init_compute_vmid:            ; @gfx_v9_0_init_compute_vmid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _DEFAULT_SH_MEM_BASES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_SH_MEM_BASES@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _SH_MEM_ADDRESS_MODE_64@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SH_MEM_ADDRESS_MODE_64@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _SH_MEM_ALIGNMENT_MODE_UNALIGNED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SH_MEM_ALIGNMENT_MODE_UNALIGNED@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
Lloh9:
	adrp	x8, _SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w27, [x8]
	bl	_mutex_lock
Lloh12:
	adrp	x25, _FIRST_COMPUTE_VMID@GOTPAGE
Lloh13:
	ldr	x25, [x25, _FIRST_COMPUTE_VMID@GOTPAGEOFF]
	ldr	w20, [x25]
Lloh14:
	adrp	x23, _LAST_COMPUTE_VMID@GOTPAGE
Lloh15:
	ldr	x23, [x23, _LAST_COMPUTE_VMID@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh16:
	adrp	x24, _GC@GOTPAGE
Lloh17:
	ldr	x24, [x24, _GC@GOTPAGEOFF]
	cmp	w20, w8
	b.ge	LBB0_3
; %bb.1:
	orr	w21, w21, w21, lsl #16
	lsl	w8, w26, w27
	orr	w22, w8, w22
Lloh18:
	adrp	x26, _mmSH_MEM_CONFIG@GOTPAGE
Lloh19:
	ldr	x26, [x26, _mmSH_MEM_CONFIG@GOTPAGEOFF]
Lloh20:
	adrp	x27, _mmSH_MEM_BASES@GOTPAGE
Lloh21:
	ldr	x27, [x27, _mmSH_MEM_BASES@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, x20
	bl	_soc15_grbm_select
	ldr	w0, [x24]
	ldr	w2, [x26]
	mov	w1, #0
	mov	x3, x22
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x24]
	ldr	w2, [x27]
	mov	w1, #0
	mov	x3, x21
	bl	_WREG32_SOC15_RLC
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_soc15_grbm_select
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w19, [x25]
	ldr	w8, [x23]
	cmp	w19, w8
	b.ge	LBB0_6
; %bb.4:
	lsl	w20, w19, #1
Lloh22:
	adrp	x21, _mmGDS_VMID0_BASE@GOTPAGE
Lloh23:
	ldr	x21, [x21, _mmGDS_VMID0_BASE@GOTPAGEOFF]
Lloh24:
	adrp	x22, _mmGDS_VMID0_SIZE@GOTPAGE
Lloh25:
	ldr	x22, [x22, _mmGDS_VMID0_SIZE@GOTPAGEOFF]
Lloh26:
	adrp	x25, _mmGDS_GWS_VMID0@GOTPAGE
Lloh27:
	ldr	x25, [x25, _mmGDS_GWS_VMID0@GOTPAGEOFF]
Lloh28:
	adrp	x26, _mmGDS_OA_VMID0@GOTPAGE
Lloh29:
	ldr	x26, [x26, _mmGDS_OA_VMID0@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	ldr	w2, [x21]
	mov	w1, #0
	mov	x3, x20
	mov	w4, #0
	bl	_WREG32_SOC15_OFFSET
	ldr	w0, [x24]
	ldr	w2, [x22]
	mov	w1, #0
	mov	x3, x20
	mov	w4, #0
	bl	_WREG32_SOC15_OFFSET
	ldr	w0, [x24]
	ldr	w2, [x25]
	mov	w1, #0
	mov	x3, x19
	mov	w4, #0
	bl	_WREG32_SOC15_OFFSET
	ldr	w0, [x24]
	ldr	w2, [x26]
	mov	w1, #0
	mov	x3, x19
	mov	w4, #0
	bl	_WREG32_SOC15_OFFSET
	add	w19, w19, #1
	ldr	w8, [x23]
	add	w20, w20, #2
	cmp	w19, w8
	b.lt	LBB0_5
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_SH_MEM_BASES,4,2       ; @DEFAULT_SH_MEM_BASES
	.comm	_SH_MEM_ADDRESS_MODE_64,4,2     ; @SH_MEM_ADDRESS_MODE_64
	.comm	_SH_MEM_ALIGNMENT_MODE_UNALIGNED,4,2 ; @SH_MEM_ALIGNMENT_MODE_UNALIGNED
	.comm	_SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT,4,2 ; @SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT
	.comm	_FIRST_COMPUTE_VMID,4,2         ; @FIRST_COMPUTE_VMID
	.comm	_LAST_COMPUTE_VMID,4,2          ; @LAST_COMPUTE_VMID
	.comm	_GC,4,2                         ; @GC
	.comm	_mmSH_MEM_CONFIG,4,2            ; @mmSH_MEM_CONFIG
	.comm	_mmSH_MEM_BASES,4,2             ; @mmSH_MEM_BASES
	.comm	_mmGDS_VMID0_BASE,4,2           ; @mmGDS_VMID0_BASE
	.comm	_mmGDS_VMID0_SIZE,4,2           ; @mmGDS_VMID0_SIZE
	.comm	_mmGDS_GWS_VMID0,4,2            ; @mmGDS_GWS_VMID0
	.comm	_mmGDS_OA_VMID0,4,2             ; @mmGDS_OA_VMID0
	.no_dead_strip	_gfx_v9_0_init_compute_vmid
.subsections_via_symbols
