	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_recv_msc
_rfcomm_recv_msc:                       ## @rfcomm_recv_msc
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdx), %r13
	movl	4(%r13), %edi
	callq	___get_dlci
	movl	%eax, %r15d
	movl	(%r13), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_BT_DBG
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_rfcomm_dlc_get
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r12
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.3:
	movq	_RFCOMM_V24_FC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_6
## %bb.4:
	cmpl	$0, 20(%r12)
	je	LBB0_5
LBB0_6:
	movq	_RFCOMM_TX_THROTTLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	addq	$16, %rsi
	callq	_clear_bit
	jmp	LBB0_7
LBB0_2:
	movq	_RFCOMM_MSCEX_TX@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	movq	_RFCOMM_TX_THROTTLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	addq	$16, %rsi
	callq	_set_bit
LBB0_7:
	movq	%r12, %rdi
	callq	_rfcomm_dlc_lock
	movl	(%r13), %esi
	movl	%esi, (%r12)
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	*%rax
LBB0_9:
	movq	%r12, %rdi
	callq	_rfcomm_dlc_unlock
	movl	(%r13), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_rfcomm_send_msc
	movq	_RFCOMM_MSCEX_RX@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	orl	%eax, 4(%r12)
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dlci %d cr %d v24 0x%x"

	.comm	_RFCOMM_V24_FC,4,2              ## @RFCOMM_V24_FC
	.comm	_RFCOMM_TX_THROTTLED,4,2        ## @RFCOMM_TX_THROTTLED
	.comm	_RFCOMM_MSCEX_RX,4,2            ## @RFCOMM_MSCEX_RX
	.comm	_RFCOMM_MSCEX_TX,4,2            ## @RFCOMM_MSCEX_TX
	.no_dead_strip	_rfcomm_recv_msc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_recv_msc
_rfcomm_recv_msc:                       ; @rfcomm_recv_msc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x19, x0
	ldr	x23, [x2]
	ldr	w0, [x23, #4]
	bl	___get_dlci
	mov	x21, x0
	ldr	w3, [x23]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_BT_DBG
	mov	x0, x19
	mov	x1, x21
	bl	_rfcomm_dlc_get
	cbz	x0, LBB0_11
; %bb.1:
	mov	x20, x0
	cbz	w22, LBB0_5
; %bb.2:
	ldr	w8, [x23]
Lloh2:
	adrp	x9, _RFCOMM_V24_FC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RFCOMM_V24_FC@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x20, #20]
	cbz	w8, LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _RFCOMM_TX_THROTTLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RFCOMM_TX_THROTTLED@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x20, #16
	bl	_clear_bit
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _RFCOMM_MSCEX_TX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RFCOMM_MSCEX_TX@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
Lloh10:
	adrp	x8, _RFCOMM_TX_THROTTLED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RFCOMM_TX_THROTTLED@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x1, x20, #16
	bl	_set_bit
LBB0_7:
	mov	x0, x20
	bl	_rfcomm_dlc_lock
	ldr	w1, [x23]
	str	w1, [x20]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x20
	blr	x8
LBB0_9:
	mov	x0, x20
	bl	_rfcomm_dlc_unlock
	ldr	w3, [x23]
	mov	x0, x19
	mov	w1, #0
	mov	x2, x21
	bl	_rfcomm_send_msc
Lloh13:
	adrp	x8, _RFCOMM_MSCEX_RX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RFCOMM_MSCEX_RX@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
LBB0_11:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dlci %d cr %d v24 0x%x"

	.comm	_RFCOMM_V24_FC,4,2              ; @RFCOMM_V24_FC
	.comm	_RFCOMM_TX_THROTTLED,4,2        ; @RFCOMM_TX_THROTTLED
	.comm	_RFCOMM_MSCEX_RX,4,2            ; @RFCOMM_MSCEX_RX
	.comm	_RFCOMM_MSCEX_TX,4,2            ; @RFCOMM_MSCEX_TX
	.no_dead_strip	_rfcomm_recv_msc
.subsections_via_symbols
