	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_user_sdma_free_queues     ## -- Begin function hfi1_user_sdma_free_queues
	.p2align	4, 0x90
_hfi1_user_sdma_free_queues:            ## @hfi1_user_sdma_free_queues
	.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	%rdi, %r14
	movl	(%rsi), %eax
	movl	4(%rsi), %edi
	movl	16(%r14), %edx
	movl	%eax, %esi
	callq	_trace_hfi1_sdma_user_free_queues
	movq	8(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_hfi1_mmu_rb_unregister
LBB0_3:
	leaq	32(%rbx), %rdi
	callq	_iowait_sdma_drain
	movl	28(%rbx), %r15d
	leaq	24(%rbx), %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%r15d, %edi
	callq	_wait_event_interruptible
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	8(%rbx), %rdi
	callq	_kfree
	movl	4(%rbx), %edi
	callq	_kmem_cache_destroy
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_4:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%rax), %edi
	callq	_vfree
	movq	(%r14), %rdi
	callq	_kfree
	movq	$0, (%r14)
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_user_sdma_free_queues     ; -- Begin function hfi1_user_sdma_free_queues
	.p2align	2
_hfi1_user_sdma_free_queues:            ; @hfi1_user_sdma_free_queues
	.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	x19, x0
	ldp	w1, w0, [x1]
	ldr	w2, [x19, #16]
	bl	_trace_hfi1_sdma_user_free_queues
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_4
; %bb.1:
	ldr	x0, [x20, #40]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_hfi1_mmu_rb_unregister
LBB0_3:
	add	x0, x20, #32
	bl	_iowait_sdma_drain
	ldr	w21, [x20, #28]
	add	x0, x20, #24
	bl	_atomic_read
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x21
	bl	_wait_event_interruptible
	ldr	x0, [x20, #16]
	bl	_kfree
	ldr	x0, [x20, #8]
	bl	_kfree
	ldr	w0, [x20, #4]
	bl	_kmem_cache_destroy
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_4:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x8]
	bl	_vfree
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
LBB0_6:
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
