	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_sco_ctloutput      ## -- Begin function ng_btsocket_sco_ctloutput
	.p2align	4, 0x90
_ng_btsocket_sco_ctloutput:             ## @ng_btsocket_sco_ctloutput
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_so2sco_pcb
	movq	%rax, %r12
	movq	_ng_btsocket_sco_node@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	testq	%r12, %r12
	je	LBB0_1
## %bb.3:
	movq	(%r15), %rax
	movq	_SOL_SCO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.4:
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movl	8(%r15), %eax
	cmpl	$130, %eax
	je	LBB0_13
## %bb.5:
	cmpl	$131, %eax
	jne	LBB0_14
## %bb.6:
	movl	16(%r12), %eax
	movq	_NG_BTSOCKET_SCO_OPEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.8:
	movl	12(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$128, %eax
	jne	LBB0_14
## %bb.10:
	movq	8(%r12), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_ENOPROTOOPT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
LBB0_16:
	movq	%r14, %rdi
	callq	_mtx_unlock
LBB0_17:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r12), %eax
LBB0_12:
	movl	%eax, -36(%rbp)
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_sooptcopyout
	movl	%eax, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ng_btsocket_sco_node,8,3       ## @ng_btsocket_sco_node
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SOL_SCO,8,3                    ## @SOL_SCO
	.comm	_NG_BTSOCKET_SCO_OPEN,4,2       ## @NG_BTSOCKET_SCO_OPEN
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_ENOPROTOOPT,4,2                ## @ENOPROTOOPT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_sco_ctloutput      ; -- Begin function ng_btsocket_sco_ctloutput
	.p2align	2
_ng_btsocket_sco_ctloutput:             ; @ng_btsocket_sco_ctloutput
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	bl	_so2sco_pcb
Lloh0:
	adrp	x8, _ng_btsocket_sco_node@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ng_btsocket_sco_node@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _SOL_SCO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SOL_SCO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.3:
	add	x19, x21, #4
	mov	x0, x19
	bl	_mtx_lock
	ldr	w8, [x20, #8]
	cmp	w8, #130
	b.eq	LBB0_12
; %bb.4:
	cmp	w8, #131
	b.ne	LBB0_11
; %bb.5:
	ldr	w8, [x21, #16]
Lloh6:
	adrp	x9, _NG_BTSOCKET_SCO_OPEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NG_BTSOCKET_SCO_OPEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.6:
	ldr	w8, [x20, #12]
	cmp	w8, #129
	b.eq	LBB0_17
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.8:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	b	LBB0_18
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	b	LBB0_16
LBB0_10:
	mov	w20, #0
	b	LBB0_16
LBB0_11:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x8, _ENOPROTOOPT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOPROTOOPT@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh16:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
LBB0_14:
	ldr	w20, [x8]
LBB0_15:
	mov	x0, x19
	bl	_mtx_unlock
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
	ldr	w8, [x21]
LBB0_18:
	str	w8, [sp, #12]
	add	x1, sp, #12
	mov	x0, x20
	mov	w2, #4
	bl	_sooptcopyout
	mov	x20, x0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ng_btsocket_sco_node,8,3       ; @ng_btsocket_sco_node
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SOL_SCO,8,3                    ; @SOL_SCO
	.comm	_NG_BTSOCKET_SCO_OPEN,4,2       ; @NG_BTSOCKET_SCO_OPEN
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_ENOPROTOOPT,4,2                ; @ENOPROTOOPT
.subsections_via_symbols
