	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_recv_sabm
_rfcomm_recv_sabm:                      ## @rfcomm_recv_sabm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	callq	_BT_DBG
	movq	%r14, %rdi
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rsi
	callq	_rfcomm_dlc_get
	movq	%rax, -24(%rbp)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	(%rax), %rcx
	movq	_BT_OPEN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.5:
	movq	%rax, %rdi
	callq	_rfcomm_check_accept
	jmp	LBB0_9
LBB0_1:
	xorl	%esi, %esi
	callq	_rfcomm_send_ua
	movq	(%r14), %rax
	movq	_BT_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.2:
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_rfcomm_process_connect
	jmp	LBB0_9
LBB0_6:
	movq	%rbx, %rdi
	callq	___srv_channel
	leaq	-24(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_rfcomm_connect_ind
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	-24(%rbp), %rax
	movq	%rbx, 16(%rax)
	movl	8(%r14), %edi
	movq	%rbx, %rsi
	callq	___addr
	movq	-24(%rbp), %rsi
	movl	%eax, 8(%rsi)
	movq	%r14, %rdi
	callq	_rfcomm_dlc_link
	movq	-24(%rbp), %rdi
	callq	_rfcomm_check_accept
	jmp	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rfcomm_send_dm
LBB0_9:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"session %p state %ld dlci %d"

	.comm	_BT_OPEN,8,3                    ## @BT_OPEN
	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
	.no_dead_strip	_rfcomm_recv_sabm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_recv_sabm
_rfcomm_recv_sabm:                      ; @rfcomm_recv_sabm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x2, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_BT_DBG
	mov	x0, x19
	cbz	x20, LBB0_4
; %bb.1:
	mov	x1, x20
	bl	_rfcomm_dlc_get
	str	x0, [sp, #8]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _BT_OPEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_OPEN@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	bl	_rfcomm_check_accept
	b	LBB0_9
LBB0_4:
	mov	w1, #0
	bl	_rfcomm_send_ua
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _BT_OPEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BT_OPEN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
Lloh8:
	adrp	x8, _BT_CONNECTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BT_CONNECTED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x19
	bl	_rfcomm_process_connect
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	___srv_channel
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_rfcomm_connect_ind
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [sp, #8]
	str	x20, [x8, #16]
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	___addr
	ldr	x1, [sp, #8]
	str	w0, [x1, #8]
	mov	x0, x19
	bl	_rfcomm_dlc_link
	ldr	x0, [sp, #8]
	bl	_rfcomm_check_accept
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_rfcomm_send_dm
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	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_OPEN,8,3                    ; @BT_OPEN
	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
	.no_dead_strip	_rfcomm_recv_sabm
.subsections_via_symbols
