	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_btsocket_sco_rtclean
_ng_btsocket_sco_rtclean:               ## @ng_btsocket_sco_rtclean
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ng_btsocket_sco_sockets_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_ng_btsocket_sco_sockets@GOTPCREL(%rip), %rdi
	callq	_LIST_FIRST
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	_next@GOTPCREL(%rip), %r12
	movq	_NG_BTSOCKET_SCO_CLOSED@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, 40(%rbx)
	movq	_ENETDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%rbx), %rdi
	movl	%eax, (%rdi)
	movl	(%r13), %eax
	movl	%eax, 32(%rbx)
	callq	_soisdisconnected
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_mtx_unlock
	movq	%r15, %rbx
	testq	%r15, %r15
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_LIST_NEXT
	movq	%rax, %r15
	movq	40(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_NG_HOOK_NOT_VALID
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_NG_BTSOCKET_SCO_TIMO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_ng_btsocket_sco_untimeout
	jmp	LBB0_7
LBB0_9:
	movq	_ng_btsocket_sco_sockets_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_ng_btsocket_sco_rt_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_ng_btsocket_sco_rt@GOTPCREL(%rip), %rdi
	callq	_LIST_FIRST
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movq	%rax, %rbx
	movq	_next@GOTPCREL(%rip), %r15
	movq	_M_NETGRAPH_BTSOCKET_SCO@GOTPCREL(%rip), %r12
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r14, %rbx
	testq	%r14, %r14
	je	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_LIST_NEXT
	movq	%rax, %r14
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_NG_HOOK_NOT_VALID
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_LIST_REMOVE
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	callq	_NG_HOOK_SET_PRIVATE
	movq	8(%rbx), %rdi
	callq	_NG_HOOK_UNREF
	movq	%rbx, %rdi
	movl	$48, %esi
	callq	_bzero
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_14
LBB0_15:
	movq	_ng_btsocket_sco_rt_mtx@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ng_btsocket_sco_sockets_mtx,4,2 ## @ng_btsocket_sco_sockets_mtx
	.comm	_ng_btsocket_sco_sockets,4,2    ## @ng_btsocket_sco_sockets
	.comm	_next,4,2                       ## @next
	.comm	_NG_BTSOCKET_SCO_TIMO,4,2       ## @NG_BTSOCKET_SCO_TIMO
	.comm	_ENETDOWN,4,2                   ## @ENETDOWN
	.comm	_NG_BTSOCKET_SCO_CLOSED,4,2     ## @NG_BTSOCKET_SCO_CLOSED
	.comm	_ng_btsocket_sco_rt_mtx,4,2     ## @ng_btsocket_sco_rt_mtx
	.comm	_ng_btsocket_sco_rt,4,2         ## @ng_btsocket_sco_rt
	.comm	_M_NETGRAPH_BTSOCKET_SCO,4,2    ## @M_NETGRAPH_BTSOCKET_SCO
	.no_dead_strip	_ng_btsocket_sco_rtclean
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_btsocket_sco_rtclean
_ng_btsocket_sco_rtclean:               ; @ng_btsocket_sco_rtclean
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x0, _ng_btsocket_sco_sockets_mtx@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ng_btsocket_sco_sockets_mtx@GOTPAGEOFF]
	bl	_mtx_lock
Lloh2:
	adrp	x0, _ng_btsocket_sco_sockets@GOTPAGE
Lloh3:
	ldr	x0, [x0, _ng_btsocket_sco_sockets@GOTPAGEOFF]
	bl	_LIST_FIRST
Lloh4:
	adrp	x22, _next@GOTPAGE
Lloh5:
	ldr	x22, [x22, _next@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x23, _NG_BTSOCKET_SCO_TIMO@GOTPAGE
Lloh7:
	ldr	x23, [x23, _NG_BTSOCKET_SCO_TIMO@GOTPAGEOFF]
Lloh8:
	adrp	x24, _ENETDOWN@GOTPAGE
Lloh9:
	ldr	x24, [x24, _ENETDOWN@GOTPAGEOFF]
Lloh10:
	adrp	x25, _NG_BTSOCKET_SCO_CLOSED@GOTPAGE
Lloh11:
	ldr	x25, [x25, _NG_BTSOCKET_SCO_CLOSED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x19, #40]
	ldr	w8, [x24]
	ldr	x0, [x19, #24]
	str	w8, [x0]
	ldr	w8, [x25]
	str	w8, [x19, #32]
	bl	_soisdisconnected
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_mtx_unlock
	mov	x19, x21
	cbz	x21, LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x19, #16
	mov	x0, x20
	bl	_mtx_lock
	ldr	w1, [x22]
	mov	x0, x19
	bl	_LIST_NEXT
	mov	x21, x0
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x8]
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_NG_HOOK_NOT_VALID
	cbz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_ng_btsocket_sco_untimeout
	b	LBB0_2
LBB0_9:
Lloh12:
	adrp	x0, _ng_btsocket_sco_sockets_mtx@GOTPAGE
Lloh13:
	ldr	x0, [x0, _ng_btsocket_sco_sockets_mtx@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh14:
	adrp	x0, _ng_btsocket_sco_rt_mtx@GOTPAGE
Lloh15:
	ldr	x0, [x0, _ng_btsocket_sco_rt_mtx@GOTPAGEOFF]
	bl	_mtx_lock
Lloh16:
	adrp	x0, _ng_btsocket_sco_rt@GOTPAGE
Lloh17:
	ldr	x0, [x0, _ng_btsocket_sco_rt@GOTPAGEOFF]
	bl	_LIST_FIRST
	cbz	x0, LBB0_15
; %bb.10:
	mov	x19, x0
Lloh18:
	adrp	x21, _M_NETGRAPH_BTSOCKET_SCO@GOTPAGE
Lloh19:
	ldr	x21, [x21, _M_NETGRAPH_BTSOCKET_SCO@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x19, x20
	cbz	x20, LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_LIST_NEXT
	mov	x20, x0
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_NG_HOOK_NOT_VALID
	cbz	x0, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_LIST_REMOVE
	ldr	x0, [x19, #8]
	mov	x1, #0
	bl	_NG_HOOK_SET_PRIVATE
	ldr	x0, [x19, #8]
	bl	_NG_HOOK_UNREF
	mov	x0, x19
	mov	w1, #48
	bl	_bzero
	ldr	w1, [x21]
	mov	x0, x19
	bl	_free
	b	LBB0_11
LBB0_15:
Lloh20:
	adrp	x0, _ng_btsocket_sco_rt_mtx@GOTPAGE
Lloh21:
	ldr	x0, [x0, _ng_btsocket_sco_rt_mtx@GOTPAGEOFF]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mtx_unlock
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ng_btsocket_sco_sockets_mtx,4,2 ; @ng_btsocket_sco_sockets_mtx
	.comm	_ng_btsocket_sco_sockets,4,2    ; @ng_btsocket_sco_sockets
	.comm	_next,4,2                       ; @next
	.comm	_NG_BTSOCKET_SCO_TIMO,4,2       ; @NG_BTSOCKET_SCO_TIMO
	.comm	_ENETDOWN,4,2                   ; @ENETDOWN
	.comm	_NG_BTSOCKET_SCO_CLOSED,4,2     ; @NG_BTSOCKET_SCO_CLOSED
	.comm	_ng_btsocket_sco_rt_mtx,4,2     ; @ng_btsocket_sco_rt_mtx
	.comm	_ng_btsocket_sco_rt,4,2         ; @ng_btsocket_sco_rt
	.comm	_M_NETGRAPH_BTSOCKET_SCO,4,2    ; @M_NETGRAPH_BTSOCKET_SCO
	.no_dead_strip	_ng_btsocket_sco_rtclean
.subsections_via_symbols
