	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdp_trydestroy                 ## -- Begin function sdp_trydestroy
	.p2align	4, 0x90
_sdp_trydestroy:                        ## @sdp_trydestroy
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_SMB_LOCKASSERT
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setg	%dil
	callq	_MPASS
	decq	(%rbx)
	je	LBB0_3
## %bb.8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_M_NSMBDEV@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %r14
	movq	_curthread@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_smb_makescred
	movq	16(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_smb_share_lock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_smb_share_rele
LBB0_5:
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_smb_vc_lock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_smb_vc_rele
LBB0_7:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_free
	movl	(%r12), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No smb_dev upon device close"

	.comm	_M_NSMBDEV,4,2                  ## @M_NSMBDEV
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_curthread,4,2                  ## @curthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdp_trydestroy                 ; -- Begin function sdp_trydestroy
	.p2align	2
_sdp_trydestroy:                        ; @sdp_trydestroy
	.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
	bl	_SMB_LOCKASSERT
	cbnz	x19, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_MPASS
	ldr	x8, [x19]
	subs	x8, x8, #1
	str	x8, [x19]
	b.eq	LBB0_4
; %bb.3:
	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
LBB0_4:
Lloh2:
	adrp	x22, _M_NSMBDEV@GOTPAGE
Lloh3:
	ldr	x22, [x22, _M_NSMBDEV@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	w0, #24
	bl	_malloc
	mov	x20, x0
Lloh7:
	adrp	x8, _curthread@GOTPAGE
Lloh8:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_smb_makescred
	ldr	x21, [x19, #16]
	cbz	x21, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_smb_share_lock
	mov	x0, x21
	mov	x1, x20
	bl	_smb_share_rele
LBB0_6:
	ldr	x21, [x19, #8]
	cbz	x21, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_smb_vc_lock
	mov	x0, x21
	mov	x1, x20
	bl	_smb_vc_rele
LBB0_8:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_free
	ldr	w1, [x22]
	mov	x0, x19
	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
	b	_free
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No smb_dev upon device close"

	.comm	_M_NSMBDEV,4,2                  ; @M_NSMBDEV
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_curthread,4,2                  ; @curthread
.subsections_via_symbols
