	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_ioctl_get_process_apertures
_kfd_ioctl_get_process_apertures:       ## @kfd_ioctl_get_process_apertures
	.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	%rdx, %r13
	movq	%rsi, %r14
	movq	_kfd_device@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	(%rsi), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	$0, (%r13)
	leaq	8(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_kfd_has_process_device_data
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_kfd_get_first_process_device_data
	movq	%rax, %rbx
	movq	(%r13), %rdx
	leaq	L_.str.8(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	48(%rbx), %rcx
	movq	(%rcx), %rcx
	imulq	$56, %rdx, %rsi
	movq	%rcx, (%rax,%rsi)
	movups	(%rbx), %xmm0
	movups	%xmm0, 8(%rax,%rsi)
	movups	16(%rbx), %xmm0
	movups	%xmm0, 24(%rax,%rsi)
	movups	32(%rbx), %xmm0
	movups	%xmm0, 40(%rax,%rsi)
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	48(%rbx), %rax
	movq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	16(%rbx), %rdx
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	24(%rbx), %rdx
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	32(%rbx), %rdx
	leaq	L_.str.7(%rip), %rsi
	callq	_dev_dbg
	movl	(%r12), %edi
	movq	40(%rbx), %rdx
	movq	%r15, %rsi
	callq	_dev_dbg
	incq	(%r13)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_kfd_get_next_process_device_data
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	(%r13), %rdx
	movq	_NUM_OF_SUPPORTED_GPUS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jb	LBB0_2
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kfd_device,4,2                 ## @kfd_device
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get apertures for PASID %d"

L_.str.1:                               ## @.str.1
	.asciz	"node id %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"gpu id %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"lds_base %llX\n"

L_.str.4:                               ## @.str.4
	.asciz	"lds_limit %llX\n"

L_.str.5:                               ## @.str.5
	.asciz	"gpuvm_base %llX\n"

L_.str.6:                               ## @.str.6
	.asciz	"gpuvm_limit %llX\n"

L_.str.7:                               ## @.str.7
	.asciz	"scratch_base %llX\n"

L_.str.8:                               ## @.str.8
	.asciz	"scratch_limit %llX\n"

	.comm	_NUM_OF_SUPPORTED_GPUS,8,3      ## @NUM_OF_SUPPORTED_GPUS
	.no_dead_strip	_kfd_ioctl_get_process_apertures
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_ioctl_get_process_apertures
_kfd_ioctl_get_process_apertures:       ; @kfd_ioctl_get_process_apertures
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x20, x1
Lloh0:
	adrp	x24, _kfd_device@GOTPAGE
Lloh1:
	ldr	x24, [x24, _kfd_device@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x21, x1
	ldr	x2, [x21], #8
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	str	xzr, [x19]
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	bl	_kfd_has_process_device_data
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_kfd_get_first_process_device_data
	mov	x22, x0
	ldr	x2, [x19]
Lloh4:
	adrp	x25, l_.str.3@PAGE
Lloh5:
	add	x25, x25, l_.str.3@PAGEOFF
Lloh6:
	adrp	x26, l_.str.4@PAGE
Lloh7:
	add	x26, x26, l_.str.4@PAGEOFF
Lloh8:
	adrp	x27, l_.str.5@PAGE
Lloh9:
	add	x27, x27, l_.str.5@PAGEOFF
Lloh10:
	adrp	x28, l_.str.6@PAGE
Lloh11:
	add	x28, x28, l_.str.6@PAGEOFF
Lloh12:
	adrp	x21, l_.str.7@PAGE
Lloh13:
	add	x21, x21, l_.str.7@PAGEOFF
Lloh14:
	adrp	x23, l_.str.8@PAGE
Lloh15:
	add	x23, x23, l_.str.8@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x22, #48]
	ldr	x9, [x9]
	mov	w10, #56
	madd	x8, x2, x10, x8
	str	x9, [x8]
	ldr	q0, [x22]
	stur	q0, [x8, #8]
	ldr	q0, [x22, #16]
	stur	q0, [x8, #24]
	ldr	q0, [x22, #32]
	stur	q0, [x8, #40]
	ldr	w0, [x24]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x8, [x22, #48]
	ldr	x2, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x2, [x22]
	mov	x1, x25
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x2, [x22, #8]
	mov	x1, x26
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x2, [x22, #16]
	mov	x1, x27
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x2, [x22, #24]
	mov	x1, x28
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x2, [x22, #32]
	mov	x1, x21
	bl	_dev_dbg
	ldr	w0, [x24]
	ldr	x2, [x22, #40]
	mov	x1, x23
	bl	_dev_dbg
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	mov	x0, x20
	mov	x1, x22
	bl	_kfd_get_next_process_device_data
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	ldr	x2, [x19]
Lloh20:
	adrp	x8, _NUM_OF_SUPPORTED_GPUS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NUM_OF_SUPPORTED_GPUS@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x2, x8
	b.lo	LBB0_2
LBB0_4:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_kfd_device,4,2                 ; @kfd_device
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get apertures for PASID %d"

l_.str.1:                               ; @.str.1
	.asciz	"node id %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"gpu id %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"lds_base %llX\n"

l_.str.4:                               ; @.str.4
	.asciz	"lds_limit %llX\n"

l_.str.5:                               ; @.str.5
	.asciz	"gpuvm_base %llX\n"

l_.str.6:                               ; @.str.6
	.asciz	"gpuvm_limit %llX\n"

l_.str.7:                               ; @.str.7
	.asciz	"scratch_base %llX\n"

l_.str.8:                               ; @.str.8
	.asciz	"scratch_limit %llX\n"

	.comm	_NUM_OF_SUPPORTED_GPUS,8,3      ; @NUM_OF_SUPPORTED_GPUS
	.no_dead_strip	_kfd_ioctl_get_process_apertures
.subsections_via_symbols
