	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdp_tx_ring_destroy            ## -- Begin function sdp_tx_ring_destroy
	.p2align	4, 0x90
_sdp_tx_ring_destroy:                   ## @sdp_tx_ring_destroy
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_sdp_dbg
	movq	%rbx, %rdi
	callq	_SDP_WLOCK
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_callout_stop
	leaq	28(%rbx), %r15
	movq	%r15, %rdi
	callq	_callout_stop
	movq	%rbx, %rdi
	callq	_SDP_WUNLOCK
	movq	%r14, %rdi
	callq	_callout_drain
	movq	%r15, %rdi
	callq	_callout_drain
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_sdp_tx_ring_purge
	movq	8(%rbx), %rdi
	movq	_M_SDP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	$0, 8(%rbx)
LBB0_2:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	callq	_ib_destroy_cq
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	24(%rbx), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_sdp_warn
	jmp	LBB0_6
LBB0_5:
	movq	$0, (%rbx)
LBB0_6:
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsp)
	callq	_ring_head
	movq	%rax, %r14
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsp)
	callq	_ring_tail
	xorl	%edi, %edi
	cmpq	%rax, %r14
	setne	%dil
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN_ON                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx ring destroy\n"

	.comm	_M_SDP,4,2                      ## @M_SDP
L_.str.1:                               ## @.str.1
	.asciz	"destroy cq(%p) failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdp_tx_ring_destroy            ; -- Begin function sdp_tx_ring_destroy
	.p2align	2
_sdp_tx_ring_destroy:                   ; @sdp_tx_ring_destroy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w0, [x0, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sdp_dbg
	mov	x0, x19
	bl	_SDP_WLOCK
	add	x20, x19, #16
	mov	x0, x20
	bl	_callout_stop
	add	x21, x19, #28
	mov	x0, x21
	bl	_callout_stop
	mov	x0, x19
	bl	_SDP_WUNLOCK
	mov	x0, x20
	bl	_callout_drain
	mov	x0, x21
	bl	_callout_drain
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_sdp_tx_ring_purge
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x8, _M_SDP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M_SDP@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_free
	str	xzr, [x19, #8]
LBB0_2:
	ldr	x0, [x19]
	cbz	x0, LBB0_6
; %bb.3:
	bl	_ib_destroy_cq
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #24]
	ldr	x2, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_sdp_warn
	b	LBB0_6
LBB0_5:
	str	xzr, [x19]
LBB0_6:
	ldr	q0, [x19]
	str	q0, [sp]
	ldr	x8, [x19, #16]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_ring_head
	mov	x20, x0
	ldr	q0, [x19]
	str	q0, [sp]
	ldr	x8, [x19, #16]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_ring_tail
	cmp	x20, x0
	cset	w0, ne
	bl	_WARN_ON
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx ring destroy\n"

	.comm	_M_SDP,4,2                      ; @M_SDP
l_.str.1:                               ; @.str.1
	.asciz	"destroy cq(%p) failed\n"

.subsections_via_symbols
