	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uninitialize
_uninitialize:                          ## @uninitialize
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	movq	_KFD_QUEUE_TYPE_HIQ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movq	32(%rbx), %rdi
	movq	_KFD_PREEMPT_TYPE_WAVEFRONT_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_KFD_UNMAP_LATENCY_MS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	28(%rax), %r8d
	movl	20(%rax), %esi
	movl	24(%rax), %r9d
	callq	*8(%rdi)
	jmp	LBB0_4
LBB0_2:
	movq	_KFD_QUEUE_TYPE_DIQ@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	movl	40(%rbx), %esi
	callq	_kfd_gtt_sa_free
LBB0_4:
	movq	(%rbx), %rax
	movq	32(%rbx), %rdi
	movl	16(%rax), %edx
	movl	20(%rax), %esi
	callq	*(%rdi)
	movl	8(%rbx), %edi
	movl	28(%rbx), %esi
	callq	_kfd_gtt_sa_free
	movl	8(%rbx), %edi
	movl	24(%rbx), %esi
	callq	_kfd_gtt_sa_free
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movl	8(%rbx), %edi
	movl	12(%rbx), %esi
	callq	_kfd_gtt_sa_free
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	8(%rax), %esi
	callq	_kfd_release_kernel_doorbell
	movq	(%rbx), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_uninit_queue                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KFD_QUEUE_TYPE_HIQ,8,3         ## @KFD_QUEUE_TYPE_HIQ
	.comm	_KFD_PREEMPT_TYPE_WAVEFRONT_RESET,4,2 ## @KFD_PREEMPT_TYPE_WAVEFRONT_RESET
	.comm	_KFD_UNMAP_LATENCY_MS,4,2       ## @KFD_UNMAP_LATENCY_MS
	.comm	_KFD_QUEUE_TYPE_DIQ,8,3         ## @KFD_QUEUE_TYPE_DIQ
	.no_dead_strip	_uninitialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uninitialize
_uninitialize:                          ; @uninitialize
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _KFD_QUEUE_TYPE_HIQ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _KFD_QUEUE_TYPE_HIQ@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x19, #32]
	ldr	x9, [x0, #8]
Lloh3:
	adrp	x10, _KFD_PREEMPT_TYPE_WAVEFRONT_RESET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _KFD_PREEMPT_TYPE_WAVEFRONT_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x10]
Lloh6:
	adrp	x10, _KFD_UNMAP_LATENCY_MS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _KFD_UNMAP_LATENCY_MS@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x10]
	ldp	w5, w4, [x8, #24]
	ldr	w1, [x8, #20]
	blr	x9
	b	LBB0_4
LBB0_2:
Lloh9:
	adrp	x8, _KFD_QUEUE_TYPE_DIQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KFD_QUEUE_TYPE_DIQ@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	ldr	w1, [x19, #40]
	bl	_kfd_gtt_sa_free
LBB0_4:
	ldr	x0, [x19, #32]
	ldr	x8, [x0]
	ldr	x9, [x19]
	ldp	w2, w1, [x9, #16]
	blr	x8
	ldr	w0, [x19, #8]
	ldr	w1, [x19, #28]
	bl	_kfd_gtt_sa_free
	ldr	w0, [x19, #8]
	ldr	w1, [x19, #24]
	bl	_kfd_gtt_sa_free
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	ldp	w0, w1, [x19, #8]
	bl	_kfd_gtt_sa_free
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w1, [x8, #8]
	bl	_kfd_release_kernel_doorbell
	ldr	x0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_uninit_queue
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_KFD_QUEUE_TYPE_HIQ,8,3         ; @KFD_QUEUE_TYPE_HIQ
	.comm	_KFD_PREEMPT_TYPE_WAVEFRONT_RESET,4,2 ; @KFD_PREEMPT_TYPE_WAVEFRONT_RESET
	.comm	_KFD_UNMAP_LATENCY_MS,4,2       ; @KFD_UNMAP_LATENCY_MS
	.comm	_KFD_QUEUE_TYPE_DIQ,8,3         ; @KFD_QUEUE_TYPE_DIQ
	.no_dead_strip	_uninitialize
.subsections_via_symbols
