	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdp_shutdown_task
_sdp_shutdown_task:                     ## @sdp_shutdown_task
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_SDP_WLOCK
	movl	(%rbx), %eax
	movq	_SDP_DESTROY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_panic
	movl	(%rbx), %eax
LBB0_2:
	movq	_SDP_DISCON@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_sdp_output_reset
	movl	(%rbx), %eax
LBB0_4:
	movq	_SDP_TIMEWAIT@GOTPCREL(%rip), %rcx
	movq	_SDP_DREQWAIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	%edx, (%rbx)
	movq	_SDP_DROPPED@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_sdp_closed
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:
	cmpq	$0, 8(%rbx)
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_SDP_WUNLOCK                    ## TAILCALL
LBB0_9:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_sdp_pcbfree                    ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDP_DESTROY,4,2                ## @SDP_DESTROY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sdp_shutdown_task: Racing with pcbfree for ssk %p"

	.comm	_SDP_DISCON,4,2                 ## @SDP_DISCON
	.comm	_SDP_TIMEWAIT,4,2               ## @SDP_TIMEWAIT
	.comm	_SDP_DREQWAIT,4,2               ## @SDP_DREQWAIT
	.comm	_SDP_DROPPED,4,2                ## @SDP_DROPPED
	.no_dead_strip	_sdp_shutdown_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdp_shutdown_task
_sdp_shutdown_task:                     ; @sdp_shutdown_task
	.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	_SDP_WLOCK
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _SDP_DESTROY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDP_DESTROY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_panic
	ldr	w8, [x19]
LBB0_2:
Lloh5:
	adrp	x9, _SDP_DISCON@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SDP_DISCON@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_sdp_output_reset
	ldr	w8, [x19]
LBB0_4:
Lloh8:
	adrp	x9, _SDP_TIMEWAIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SDP_TIMEWAIT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _SDP_DREQWAIT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SDP_DREQWAIT@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [x19]
Lloh14:
	adrp	x9, _SDP_DROPPED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SDP_DROPPED@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_sdp_closed
	cbz	x0, LBB0_9
LBB0_6:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SDP_WUNLOCK
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdp_pcbfree
LBB0_9:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SDP_DESTROY,4,2                ; @SDP_DESTROY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sdp_shutdown_task: Racing with pcbfree for ssk %p"

	.comm	_SDP_DISCON,4,2                 ; @SDP_DISCON
	.comm	_SDP_TIMEWAIT,4,2               ; @SDP_TIMEWAIT
	.comm	_SDP_DREQWAIT,4,2               ; @SDP_DREQWAIT
	.comm	_SDP_DROPPED,4,2                ; @SDP_DROPPED
	.no_dead_strip	_sdp_shutdown_task
.subsections_via_symbols
