	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function deallocate_sdma_queue
_deallocate_sdma_queue:                 ## @deallocate_sdma_queue
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	_KFD_QUEUE_TYPE_SDMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	(%rbx), %r15
	movq	%r14, %rdi
	callq	_get_num_sdma_queues
	cmpq	%rax, %r15
	jb	LBB0_5
	jmp	LBB0_6
LBB0_2:
	movq	_KFD_QUEUE_TYPE_SDMA_XGMI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	(%rbx), %r15
	movq	%r14, %rdi
	callq	_get_num_xgmi_sdma_queues
	cmpq	%rax, %r15
	jae	LBB0_6
## %bb.4:
	addq	$8, %r14
LBB0_5:
	movb	(%rbx), %cl
	movl	$1, %eax
	shlq	%cl, %rax
	orq	%rax, (%r14)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KFD_QUEUE_TYPE_SDMA,8,3        ## @KFD_QUEUE_TYPE_SDMA
	.comm	_KFD_QUEUE_TYPE_SDMA_XGMI,8,3   ## @KFD_QUEUE_TYPE_SDMA_XGMI
	.no_dead_strip	_deallocate_sdma_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function deallocate_sdma_queue
_deallocate_sdma_queue:                 ; @deallocate_sdma_queue
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _KFD_QUEUE_TYPE_SDMA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KFD_QUEUE_TYPE_SDMA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x21, [x20]
	mov	x0, x19
	bl	_get_num_sdma_queues
	cmp	x21, x0
	b.lo	LBB0_5
	b	LBB0_6
LBB0_2:
Lloh3:
	adrp	x9, _KFD_QUEUE_TYPE_SDMA_XGMI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KFD_QUEUE_TYPE_SDMA_XGMI@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	x21, [x20]
	mov	x0, x19
	bl	_get_num_xgmi_sdma_queues
	cmp	x21, x0
	b.hs	LBB0_6
; %bb.4:
	add	x19, x19, #8
LBB0_5:
	ldr	x8, [x20]
	mov	w9, #1
	lsl	x8, x9, x8
	ldr	x9, [x19]
	orr	x8, x9, x8
	str	x8, [x19]
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_KFD_QUEUE_TYPE_SDMA,8,3        ; @KFD_QUEUE_TYPE_SDMA
	.comm	_KFD_QUEUE_TYPE_SDMA_XGMI,8,3   ; @KFD_QUEUE_TYPE_SDMA_XGMI
	.no_dead_strip	_deallocate_sdma_queue
.subsections_via_symbols
