	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_fill_gpu_memory_affinity
_kfd_fill_gpu_memory_affinity:          ## @kfd_fill_gpu_memory_affinity
	.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
	addl	$-32, (%rdi)
	js	LBB0_1
## %bb.2:
	movl	%r9d, %r13d
	movq	%r8, %rbx
	movl	%ecx, %r12d
	movl	%edx, %r15d
	xorl	%r14d, %r14d
	movq	%r8, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_CRAT_SUBTYPE_MEMORY_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)
	movl	%r13d, 20(%rbx)
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_pr_debug
	movl	%r12d, %edi
	callq	_lower_32_bits
	movl	%eax, 16(%rbx)
	movl	%r12d, %edi
	callq	_upper_32_bits
	movl	%eax, 12(%rbx)
	movq	16(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	%r15d, 4(%rbx)
	jmp	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CRAT_SUBTYPE_MEMORY_AFFINITY,4,2 ## @CRAT_SUBTYPE_MEMORY_AFFINITY
	.comm	_CRAT_SUBTYPE_FLAGS_ENABLED,4,2 ## @CRAT_SUBTYPE_FLAGS_ENABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fill gpu memory affinity - type 0x%x size 0x%llx\n"

	.no_dead_strip	_kfd_fill_gpu_memory_affinity
.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_memory_affinity
_kfd_fill_gpu_memory_affinity:          ; @kfd_fill_gpu_memory_affinity
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
	subs	w8, w8, #32
	str	w8, [x0]
	b.mi	LBB0_2
; %bb.1:
	mov	x20, x6
	mov	x23, x5
	mov	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	w24, #32
	mov	x0, x4
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x8, _CRAT_SUBTYPE_MEMORY_AFFINITY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CRAT_SUBTYPE_MEMORY_AFFINITY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #28]
Lloh3:
	adrp	x8, _CRAT_SUBTYPE_FLAGS_ENABLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CRAT_SUBTYPE_FLAGS_ENABLED@GOTPAGEOFF]
	str	w24, [x19]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	stp	w23, w8, [x19, #20]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_pr_debug
	mov	x0, x22
	bl	_lower_32_bits
	str	w0, [x19, #16]
	mov	x0, x22
	bl	_upper_32_bits
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #12]
	ldr	w8, [x20]
	stp	w21, w8, [x19, #4]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CRAT_SUBTYPE_MEMORY_AFFINITY,4,2 ; @CRAT_SUBTYPE_MEMORY_AFFINITY
	.comm	_CRAT_SUBTYPE_FLAGS_ENABLED,4,2 ; @CRAT_SUBTYPE_FLAGS_ENABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fill gpu memory affinity - type 0x%x size 0x%llx\n"

	.no_dead_strip	_kfd_fill_gpu_memory_affinity
.subsections_via_symbols
