	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kgd_program_sh_mem_settings
_kgd_program_sh_mem_settings:           ## @kgd_program_sh_mem_settings
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r15d
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_get_amdgpu_device
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%r14d, %r8d
	callq	_lock_srbm
	movq	_mmSH_MEM_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_WREG32
	movq	_mmSH_MEM_APE1_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_WREG32
	movq	_mmSH_MEM_APE1_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_WREG32
	movq	_mmSH_MEM_BASES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_WREG32
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_unlock_srbm                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mmSH_MEM_CONFIG,4,2            ## @mmSH_MEM_CONFIG
	.comm	_mmSH_MEM_APE1_BASE,4,2         ## @mmSH_MEM_APE1_BASE
	.comm	_mmSH_MEM_APE1_LIMIT,4,2        ## @mmSH_MEM_APE1_LIMIT
	.comm	_mmSH_MEM_BASES,4,2             ## @mmSH_MEM_BASES
	.no_dead_strip	_kgd_program_sh_mem_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kgd_program_sh_mem_settings
_kgd_program_sh_mem_settings:           ; @kgd_program_sh_mem_settings
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_get_amdgpu_device
	mov	x0, x24
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, x23
	bl	_lock_srbm
Lloh0:
	adrp	x8, _mmSH_MEM_CONFIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmSH_MEM_CONFIG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_WREG32
Lloh3:
	adrp	x8, _mmSH_MEM_APE1_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mmSH_MEM_APE1_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_WREG32
Lloh6:
	adrp	x8, _mmSH_MEM_APE1_LIMIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mmSH_MEM_APE1_LIMIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_WREG32
Lloh9:
	adrp	x8, _mmSH_MEM_BASES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mmSH_MEM_BASES@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_WREG32
	mov	x0, x24
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_unlock_srbm
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mmSH_MEM_CONFIG,4,2            ; @mmSH_MEM_CONFIG
	.comm	_mmSH_MEM_APE1_BASE,4,2         ; @mmSH_MEM_APE1_BASE
	.comm	_mmSH_MEM_APE1_LIMIT,4,2        ; @mmSH_MEM_APE1_LIMIT
	.comm	_mmSH_MEM_BASES,4,2             ; @mmSH_MEM_BASES
	.no_dead_strip	_kgd_program_sh_mem_settings
.subsections_via_symbols
