	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_cm_destroy
_cnic_cm_destroy:                       ## @cnic_cm_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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_cnic_in_use
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_csk_hold
	movq	_SK_F_INUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_smp_mb__after_atomic
	leaq	8(%r15), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_atomic_read
	cmpl	$1, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_msleep
	jmp	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	callq	_cnic_cm_cleanup
	movq	$0, (%r15)
	movq	%r15, %rdi
	callq	_csk_put
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SK_F_INUSE,4,2                 ## @SK_F_INUSE
	.no_dead_strip	_cnic_cm_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_cm_destroy
_cnic_cm_destroy:                       ; @cnic_cm_destroy
	.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
	bl	_cnic_in_use
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_csk_hold
Lloh0:
	adrp	x8, _SK_F_INUSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SK_F_INUSE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_clear_bit
	bl	_smp_mb__after_atomic
	add	x20, x19, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_atomic_read
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_msleep
	b	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_cnic_cm_cleanup
	str	xzr, [x19]
	mov	x0, x19
	bl	_csk_put
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SK_F_INUSE,4,2                 ; @SK_F_INUSE
	.no_dead_strip	_cnic_cm_destroy
.subsections_via_symbols
