	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_recv_ua
_rfcomm_recv_ua:                        ## @rfcomm_recv_ua
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	callq	_BT_DBG
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rfcomm_dlc_get
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.5:
	movq	%r15, %rdi
	callq	_rfcomm_dlc_clear_timer
	movq	%r15, %rdi
	callq	_rfcomm_dlc_lock
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*8(%r15)
	movq	%r15, %rdi
	callq	_rfcomm_dlc_unlock
	movl	4(%r15), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	callq	_rfcomm_send_msc
	jmp	LBB0_12
LBB0_8:
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.10:
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_rfcomm_process_connect
	jmp	LBB0_12
LBB0_2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rfcomm_send_dm
	jmp	LBB0_12
LBB0_6:
	movq	_BT_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	___rfcomm_dlc_close
	leaq	4(%r14), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movl	$128, (%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rfcomm_send_disc
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_rfcomm_session_put
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"session %p state %ld dlci %d"

	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
	.comm	_BT_CLOSED,4,2                  ## @BT_CLOSED
	.no_dead_strip	_rfcomm_recv_ua
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_recv_ua
_rfcomm_recv_ua:                        ; @rfcomm_recv_ua
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w2, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_BT_DBG
	cbz	x20, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_rfcomm_dlc_get
	cbz	x0, LBB0_8
; %bb.2:
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.4:
	mov	x0, x21
	bl	_rfcomm_dlc_clear_timer
	mov	x0, x21
	bl	_rfcomm_dlc_lock
Lloh2:
	adrp	x8, _BT_CONNECTED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BT_CONNECTED@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	w8, [x21]
	ldr	x8, [x21, #8]
	mov	x0, x21
	mov	w1, #0
	blr	x8
	mov	x0, x21
	bl	_rfcomm_dlc_unlock
	ldr	w3, [x21, #4]
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_rfcomm_send_msc
	b	LBB0_12
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.6:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.7:
Lloh5:
	adrp	x8, _BT_CONNECTED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_CONNECTED@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	w8, [x19]
	mov	x0, x19
	bl	_rfcomm_process_connect
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_rfcomm_send_dm
	b	LBB0_12
LBB0_9:
Lloh8:
	adrp	x8, _BT_CLOSED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BT_CLOSED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x21]
	mov	x0, x21
	mov	w1, #0
	bl	___rfcomm_dlc_close
	add	x0, x19, #4
	bl	_list_empty
	cbz	w0, LBB0_12
; %bb.10:
	mov	w8, #128
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_rfcomm_send_disc
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_rfcomm_session_put
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"session %p state %ld dlci %d"

	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
	.comm	_BT_CLOSED,4,2                  ; @BT_CLOSED
	.no_dead_strip	_rfcomm_recv_ua
.subsections_via_symbols
