	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_amdkfd_gpuvm_init_mem_limits ## -- Begin function amdgpu_amdkfd_gpuvm_init_mem_limits
	.p2align	4, 0x90
_amdgpu_amdkfd_gpuvm_init_mem_limits:   ## @amdgpu_amdkfd_gpuvm_init_mem_limits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	-32(%rbp), %rdi
	callq	_si_meminfo
	movl	-32(%rbp), %ebx
	subl	-28(%rbp), %ebx
	imull	-24(%rbp), %ebx
	movq	_kfd_mem_limit@GOTPCREL(%rip), %r14
	leaq	8(%r14), %rdi
	callq	_spin_lock_init
	movl	%ebx, %edx
	sarl	%edx
	movl	%ebx, %esi
	sarl	$2, %esi
	addl	%edx, %esi
	movl	%esi, (%r14)
	sarl	$3, %ebx
	subl	%ebx, %edx
	movl	%edx, 4(%r14)
	sarl	$20, %esi
	sarl	$20, %edx
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kfd_mem_limit,12,2             ## @kfd_mem_limit
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Kernel memory limit %lluM, TTM limit %lluM\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_amdkfd_gpuvm_init_mem_limits ; -- Begin function amdgpu_amdkfd_gpuvm_init_mem_limits
	.p2align	2
_amdgpu_amdkfd_gpuvm_init_mem_limits:   ; @amdgpu_amdkfd_gpuvm_init_mem_limits
	.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	x0, sp
	bl	_si_meminfo
	ldp	w8, w9, [sp]
	sub	w8, w8, w9
	ldr	w9, [sp, #8]
	mul	w19, w8, w9
Lloh0:
	adrp	x20, _kfd_mem_limit@GOTPAGE
Lloh1:
	ldr	x20, [x20, _kfd_mem_limit@GOTPAGEOFF]
	add	x0, x20, #8
	bl	_spin_lock_init
	asr	w8, w19, #1
	add	w9, w8, w19, asr #2
	sub	w8, w8, w19, asr #3
	stp	w9, w8, [x20]
	asr	w1, w9, #20
	asr	w2, w8, #20
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_kfd_mem_limit,12,2             ; @kfd_mem_limit
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Kernel memory limit %lluM, TTM limit %lluM\n"

.subsections_via_symbols
