	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_process_device_reserve_ib_mem
_kfd_process_device_reserve_ib_mem:     ## @kfd_process_device_reserve_ib_mem
	.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
	xorl	%eax, %eax
	cmpq	$0, (%rdi)
	je	LBB0_1
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movl	8(%rdi), %esi
	testl	%esi, %esi
	je	LBB0_4
## %bb.2:
	movq	_ALLOC_MEM_FLAGS_GTT@GOTPCREL(%rip), %rax
	movq	_ALLOC_MEM_FLAGS_NO_SUBSTITUTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ALLOC_MEM_FLAGS_WRITABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_ALLOC_MEM_FLAGS_EXECUTABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-16(%rbp), %r8
	movq	%rbx, %rdi
	callq	_kfd_process_alloc_gpuvm
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	-16(%rbp), %rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ALLOC_MEM_FLAGS_GTT,4,2        ## @ALLOC_MEM_FLAGS_GTT
	.comm	_ALLOC_MEM_FLAGS_NO_SUBSTITUTE,4,2 ## @ALLOC_MEM_FLAGS_NO_SUBSTITUTE
	.comm	_ALLOC_MEM_FLAGS_WRITABLE,4,2   ## @ALLOC_MEM_FLAGS_WRITABLE
	.comm	_ALLOC_MEM_FLAGS_EXECUTABLE,4,2 ## @ALLOC_MEM_FLAGS_EXECUTABLE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_kfd_process_device_reserve_ib_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_process_device_reserve_ib_mem
_kfd_process_device_reserve_ib_mem:     ; @kfd_process_device_reserve_ib_mem
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	mov	x19, x0
	ldr	w1, [x0, #8]
	cbz	w1, LBB0_1
; %bb.4:
Lloh0:
	adrp	x8, _ALLOC_MEM_FLAGS_GTT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALLOC_MEM_FLAGS_GTT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ALLOC_MEM_FLAGS_NO_SUBSTITUTE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ALLOC_MEM_FLAGS_NO_SUBSTITUTE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _ALLOC_MEM_FLAGS_WRITABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ALLOC_MEM_FLAGS_WRITABLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _ALLOC_MEM_FLAGS_EXECUTABLE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ALLOC_MEM_FLAGS_EXECUTABLE@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh11:
	ldr	w9, [x10]
	orr	w3, w8, w9
Lloh12:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x4, sp, #8
	mov	x0, x19
	bl	_kfd_process_alloc_gpuvm
	cbnz	w0, LBB0_2
; %bb.5:
	ldr	x8, [sp, #8]
	str	x8, [x19]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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	_ALLOC_MEM_FLAGS_GTT,4,2        ; @ALLOC_MEM_FLAGS_GTT
	.comm	_ALLOC_MEM_FLAGS_NO_SUBSTITUTE,4,2 ; @ALLOC_MEM_FLAGS_NO_SUBSTITUTE
	.comm	_ALLOC_MEM_FLAGS_WRITABLE,4,2   ; @ALLOC_MEM_FLAGS_WRITABLE
	.comm	_ALLOC_MEM_FLAGS_EXECUTABLE,4,2 ; @ALLOC_MEM_FLAGS_EXECUTABLE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_kfd_process_device_reserve_ib_mem
.subsections_via_symbols
