	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_generate_gpu_id
_kfd_generate_gpu_id:                   ## @kfd_generate_gpu_id
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	leaq	-80(%rbp), %rsi
	callq	_amdgpu_amdkfd_get_local_mem_info
	movq	-80(%rbp), %r13
	addq	-72(%rbp), %r13
	movq	(%rbx), %rax
	movl	(%rax), %r14d
	movl	8(%rax), %r12d
	shll	$16, %r12d
	orl	4(%rax), %r12d
	movq	16(%rax), %rdi
	callq	_pci_domain_nr
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rax
	movl	12(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	16(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_lower_32_bits
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_upper_32_bits
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_KFD_GPU_ID_HASH_WIDTH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_hash_32
	movl	%eax, %r13d
	movl	(%r15), %esi
	movl	%r12d, %edi
	callq	_hash_32
	movl	%eax, %r12d
	movl	(%r15), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_hash_32
	movl	%eax, %ebx
	xorl	%r13d, %ebx
	movl	(%r15), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_hash_32
	movl	%eax, %r14d
	xorl	%ebx, %r14d
	movl	(%r15), %esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_hash_32
	movl	%eax, %ebx
	xorl	%r14d, %ebx
	xorl	%r12d, %ebx
	movl	(%r15), %esi
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_hash_32
	movl	%eax, %r14d
	movl	(%r15), %esi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_hash_32
	xorl	%r14d, %eax
	xorl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KFD_GPU_ID_HASH_WIDTH,4,2      ## @KFD_GPU_ID_HASH_WIDTH
	.no_dead_strip	_kfd_generate_gpu_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_generate_gpu_id
_kfd_generate_gpu_id:                   ; @kfd_generate_gpu_id
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_2
; %bb.1:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	ldr	w0, [x0, #8]
	mov	x1, sp
	bl	_amdgpu_amdkfd_get_local_mem_info
	ldp	x9, x8, [sp]
	add	x20, x9, x8
	ldr	x8, [x19]
	ldp	w21, w9, [x8]
	ldr	w10, [x8, #8]
	orr	w22, w9, w10, lsl #16
	ldr	x0, [x8, #16]
	bl	_pci_domain_nr
	mov	x23, x0
	ldr	x8, [x19]
	ldr	w19, [x8, #12]
	ldr	x8, [x8, #16]
	ldr	w24, [x8]
	mov	x0, x20
	bl	_lower_32_bits
	mov	x25, x0
	mov	x0, x20
	bl	_upper_32_bits
	mov	x20, x0
Lloh0:
	adrp	x26, _KFD_GPU_ID_HASH_WIDTH@GOTPAGE
Lloh1:
	ldr	x26, [x26, _KFD_GPU_ID_HASH_WIDTH@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x21
	bl	_hash_32
	mov	x21, x0
	ldr	w1, [x26]
	mov	x0, x22
	bl	_hash_32
	eor	w21, w0, w21
	ldr	w1, [x26]
	mov	x0, x23
	bl	_hash_32
	eor	w21, w0, w21
	ldr	w1, [x26]
	mov	x0, x19
	bl	_hash_32
	eor	w19, w0, w21
	ldr	w1, [x26]
	mov	x0, x24
	bl	_hash_32
	eor	w19, w0, w19
	ldr	w1, [x26]
	mov	x0, x25
	bl	_hash_32
	eor	w19, w0, w19
	ldr	w1, [x26]
	mov	x0, x20
	bl	_hash_32
	eor	w0, w0, w19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KFD_GPU_ID_HASH_WIDTH,4,2      ; @KFD_GPU_ID_HASH_WIDTH
	.no_dead_strip	_kfd_generate_gpu_id
.subsections_via_symbols
