	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_init_apertures_vi
_kfd_init_apertures_vi:                 ## @kfd_init_apertures_vi
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_MAKE_LDS_APP_BASE_VI
	movl	%eax, 32(%rbx)
	movl	%eax, %edi
	callq	_MAKE_LDS_APP_LIMIT
	movl	%eax, 36(%rbx)
	movq	8(%rbx), %rax
	movq	8(%rax), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	incq	%r14
	movq	%r14, %rdi
	callq	_MAKE_GPUVM_APP_BASE_VI
	movl	%eax, 16(%rbx)
	movq	8(%rbx), %rcx
	movq	(%rcx), %rsi
	movl	%eax, %edi
	callq	_MAKE_GPUVM_APP_LIMIT
	jmp	LBB0_3
LBB0_1:
	movq	_SVM_USER_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movq	(%rax), %rax
	decq	%rax
LBB0_3:
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
	callq	_MAKE_SCRATCH_APP_BASE_VI
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_MAKE_SCRATCH_APP_LIMIT
	movl	%eax, 4(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVM_USER_BASE,4,2              ## @SVM_USER_BASE
	.no_dead_strip	_kfd_init_apertures_vi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_init_apertures_vi
_kfd_init_apertures_vi:                 ; @kfd_init_apertures_vi
	.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	x20, x1
	mov	x19, x0
	bl	_MAKE_LDS_APP_BASE_VI
	str	w0, [x19, #32]
	bl	_MAKE_LDS_APP_LIMIT
	str	w0, [x19, #36]
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	cbz	w9, LBB0_2
; %bb.1:
	add	x0, x20, #1
	bl	_MAKE_GPUVM_APP_BASE_VI
	str	w0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	bl	_MAKE_GPUVM_APP_LIMIT
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x9, _SVM_USER_BASE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SVM_USER_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x19, #16]
	ldr	x8, [x8]
	sub	x0, x8, #1
LBB0_3:
	str	x0, [x19, #24]
	bl	_MAKE_SCRATCH_APP_BASE_VI
	str	w0, [x19]
	bl	_MAKE_SCRATCH_APP_LIMIT
	str	w0, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SVM_USER_BASE,4,2              ; @SVM_USER_BASE
	.no_dead_strip	_kfd_init_apertures_vi
.subsections_via_symbols
