	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_rfcomm_ctloutput   ## -- Begin function ng_btsocket_rfcomm_ctloutput
	.p2align	4, 0x90
_ng_btsocket_rfcomm_ctloutput:          ## @ng_btsocket_rfcomm_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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_so2rfcomm_pcb
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	(%r15), %rax
	movq	_SOL_RFCOMM@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.3:
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movl	8(%r15), %eax
	cmpl	$130, %eax
	je	LBB0_10
## %bb.4:
	cmpl	$131, %eax
	jne	LBB0_11
## %bb.5:
	movl	12(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.7:
	addq	$24, %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_10:
	movq	_ENOPROTOOPT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_9:
	movups	8(%r12), %xmm0
	movups	%xmm0, -48(%rbp)
	movq	_NG_BTSOCKET_RFCOMM_DLC_CFC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r12), %eax
	setne	%cl
	movl	%ecx, -56(%rbp)
	movl	$0, -52(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
LBB0_8:
	movl	$24, %edx
	callq	_sooptcopyout
	movl	%eax, %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mtx_unlock
LBB0_14:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SOL_RFCOMM,8,3                 ## @SOL_RFCOMM
	.comm	_NG_BTSOCKET_RFCOMM_DLC_CFC,4,2 ## @NG_BTSOCKET_RFCOMM_DLC_CFC
	.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_rfcomm_ctloutput   ; -- Begin function ng_btsocket_rfcomm_ctloutput
	.p2align	2
_ng_btsocket_rfcomm_ctloutput:          ; @ng_btsocket_rfcomm_ctloutput
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	bl	_so2rfcomm_pcb
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _SOL_RFCOMM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOL_RFCOMM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	mov	x21, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mtx_lock
	ldr	w8, [x20, #8]
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.3:
	cmp	w8, #131
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [x20, #12]
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.6:
	add	x1, x21, #24
	b	LBB0_13
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_8:
	mov	w20, #0
	b	LBB0_15
LBB0_9:
Lloh6:
	adrp	x8, _ENOPROTOOPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOPROTOOPT@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w20, [x8]
	b	LBB0_14
LBB0_12:
	ldur	q0, [x21, #8]
	stur	q0, [sp, #16]
Lloh10:
	adrp	x8, _NG_BTSOCKET_RFCOMM_DLC_CFC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NG_BTSOCKET_RFCOMM_DLC_CFC@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w8, ne
	stp	w8, wzr, [sp, #8]
	add	x1, sp, #8
LBB0_13:
	mov	x0, x20
	mov	w2, #24
	bl	_sooptcopyout
	mov	x20, x0
LBB0_14:
	mov	x0, x19
	bl	_mtx_unlock
LBB0_15:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SOL_RFCOMM,8,3                 ; @SOL_RFCOMM
	.comm	_NG_BTSOCKET_RFCOMM_DLC_CFC,4,2 ; @NG_BTSOCKET_RFCOMM_DLC_CFC
	.comm	_ENOPROTOOPT,4,2                ; @ENOPROTOOPT
.subsections_via_symbols
