	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdp_start_disconnect
_sdp_start_disconnect:                  ## @sdp_start_disconnect
	.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
	movq	16(%rdi), %rbx
	callq	_SDP_WLOCK_ASSERT
	movq	%rbx, %rdi
	callq	_sdp_stop_keepalive_timer
	movq	(%r14), %rax
	movq	_TCPS_ESTABLISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_sdp_closed
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_KASSERT                        ## TAILCALL
LBB0_3:
	movq	_SO_LINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.4:
	cmpq	$0, 8(%rbx)
	je	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	callq	_soisdisconnecting
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_sbused
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_sbflush
	movq	%r14, %rdi
	callq	_sdp_usrclosed
	movq	_SDP_DROPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_7
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.10:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdp_output_reset               ## TAILCALL
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_sdp_drop
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdp_output_disconnect          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TCPS_ESTABLISHED,8,3           ## @TCPS_ESTABLISHED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sdp_start_disconnect: sdp_close() returned NULL"

	.comm	_SO_LINGER,4,2                  ## @SO_LINGER
L_.str.1:                               ## @.str.1
	.asciz	"sdp_start_disconnect: sdp_drop() returned NULL"

	.comm	_SDP_DROPPED,4,2                ## @SDP_DROPPED
	.no_dead_strip	_sdp_start_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdp_start_disconnect
_sdp_start_disconnect:                  ; @sdp_start_disconnect
	.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
	ldr	x20, [x0, #16]
	bl	_SDP_WLOCK_ASSERT
	mov	x0, x20
	bl	_sdp_stop_keepalive_timer
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TCPS_ESTABLISHED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TCPS_ESTABLISHED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_sdp_closed
	cmp	x0, #0
	cset	w0, ne
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	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	_KASSERT
LBB0_3:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _SO_LINGER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SO_LINGER@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
LBB0_5:
	mov	x0, x20
	bl	_soisdisconnecting
	add	x21, x20, #16
	mov	x0, x21
	bl	_sbused
	mov	x20, x0
	mov	x0, x21
	bl	_sbflush
	mov	x0, x19
	bl	_sdp_usrclosed
	ldr	w8, [x19, #8]
Lloh8:
	adrp	x9, _SDP_DROPPED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SDP_DROPPED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.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
LBB0_7:
	mov	x0, x19
	cbz	w20, LBB0_10
; %bb.8:
	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	_sdp_output_reset
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_sdp_drop
	cmp	x0, #0
	cset	w0, ne
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_10:
	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	_sdp_output_disconnect
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_TCPS_ESTABLISHED,8,3           ; @TCPS_ESTABLISHED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sdp_start_disconnect: sdp_close() returned NULL"

	.comm	_SO_LINGER,4,2                  ; @SO_LINGER
l_.str.1:                               ; @.str.1
	.asciz	"sdp_start_disconnect: sdp_drop() returned NULL"

	.comm	_SDP_DROPPED,4,2                ; @SDP_DROPPED
	.no_dead_strip	_sdp_start_disconnect
.subsections_via_symbols
