	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_fill_gpu_direct_io_link_to_cpu
_kfd_fill_gpu_direct_io_link_to_cpu:    ## @kfd_fill_gpu_direct_io_link_to_cpu
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	addl	$-32, (%rdi)
	js	LBB0_1
## %bb.2:
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r12
	xorl	%r14d, %r14d
	movq	%rdx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_CRAT_SUBTYPE_IOLINK_AFFINITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	$32, (%rbx)
	movq	_CRAT_SUBTYPE_FLAGS_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
	movq	%r12, %rdi
	callq	_kfd_dev_is_large_bar
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_CRAT_IOLINK_FLAGS_BI_DIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
LBB0_4:
	movq	_CRAT_IOLINK_TYPE_PCIEXPRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	%r15d, 16(%rbx)
	movq	$0, 8(%rbx)
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CRAT_SUBTYPE_IOLINK_AFFINITY,4,2 ## @CRAT_SUBTYPE_IOLINK_AFFINITY
	.comm	_CRAT_SUBTYPE_FLAGS_ENABLED,4,2 ## @CRAT_SUBTYPE_FLAGS_ENABLED
	.comm	_CRAT_IOLINK_FLAGS_BI_DIRECTIONAL,4,2 ## @CRAT_IOLINK_FLAGS_BI_DIRECTIONAL
	.comm	_CRAT_IOLINK_TYPE_PCIEXPRESS,4,2 ## @CRAT_IOLINK_TYPE_PCIEXPRESS
	.comm	_NUMA_NO_NODE,8,3               ## @NUMA_NO_NODE
	.no_dead_strip	_kfd_fill_gpu_direct_io_link_to_cpu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_fill_gpu_direct_io_link_to_cpu
_kfd_fill_gpu_direct_io_link_to_cpu:    ; @kfd_fill_gpu_direct_io_link_to_cpu
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w8, [x0]
	subs	w8, w8, #32
	str	w8, [x0]
	b.mi	LBB0_4
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	w22, #32
	mov	x0, x2
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x8, _CRAT_SUBTYPE_IOLINK_AFFINITY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CRAT_SUBTYPE_IOLINK_AFFINITY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CRAT_SUBTYPE_FLAGS_ENABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CRAT_SUBTYPE_FLAGS_ENABLED@GOTPAGEOFF]
	str	w22, [x19]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x19, #24]
	orr	w9, w10, w9
	stp	w9, w8, [x19, #24]
	mov	x0, x21
	bl	_kfd_dev_is_large_bar
	cbz	x0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _CRAT_IOLINK_FLAGS_BI_DIRECTIONAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CRAT_IOLINK_FLAGS_BI_DIRECTIONAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_3:
	mov	w0, #0
Lloh9:
	adrp	x8, _CRAT_IOLINK_TYPE_PCIEXPRESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CRAT_IOLINK_TYPE_PCIEXPRESS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w20, w8, [x19, #16]
	str	xzr, [x19, #8]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CRAT_SUBTYPE_IOLINK_AFFINITY,4,2 ; @CRAT_SUBTYPE_IOLINK_AFFINITY
	.comm	_CRAT_SUBTYPE_FLAGS_ENABLED,4,2 ; @CRAT_SUBTYPE_FLAGS_ENABLED
	.comm	_CRAT_IOLINK_FLAGS_BI_DIRECTIONAL,4,2 ; @CRAT_IOLINK_FLAGS_BI_DIRECTIONAL
	.comm	_CRAT_IOLINK_TYPE_PCIEXPRESS,4,2 ; @CRAT_IOLINK_TYPE_PCIEXPRESS
	.comm	_NUMA_NO_NODE,8,3               ; @NUMA_NO_NODE
	.no_dead_strip	_kfd_fill_gpu_direct_io_link_to_cpu
.subsections_via_symbols
