	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_recv_dm
_rfcomm_recv_dm:                        ## @rfcomm_recv_dm
	.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
	.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
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rfcomm_dlc_get
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	(%rax), %rcx
	movq	_BT_CONNECT@GOTPCREL(%rip), %rdx
	movq	_BT_CONFIG@GOTPCREL(%rip), %rbx
	movq	_ECONNREFUSED@GOTPCREL(%rip), %rsi
	movq	%rsi, %rdi
	cmpq	(%rbx), %rcx
	je	LBB0_4
## %bb.3:
	movq	_ECONNRESET@GOTPCREL(%rip), %rdi
LBB0_4:
	cmpq	(%rdx), %rcx
	cmoveq	%rsi, %rdi
	movl	(%rdi), %esi
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	%rax, %rdi
	callq	___rfcomm_dlc_close
	jmp	LBB0_9
LBB0_5:
	movq	(%r14), %rax
	movq	_BT_CONNECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	_ECONNREFUSED@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_ECONNRESET@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	_BT_CLOSED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_rfcomm_session_close
LBB0_9:
	xorl	%eax, %eax
	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_CONNECT,8,3                 ## @BT_CONNECT
	.comm	_BT_CONFIG,8,3                  ## @BT_CONFIG
	.comm	_ECONNREFUSED,4,2               ## @ECONNREFUSED
	.comm	_ECONNRESET,4,2                 ## @ECONNRESET
	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.no_dead_strip	_rfcomm_recv_dm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_recv_dm
_rfcomm_recv_dm:                        ; @rfcomm_recv_dm
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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
	cbz	x20, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_rfcomm_dlc_get
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _BT_CONNECT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_CONNECT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _BT_CONFIG@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BT_CONFIG@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh8:
	adrp	x8, _ECONNREFUSED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ECONNREFUSED@GOTPAGEOFF]
Lloh10:
	adrp	x9, _ECONNRESET@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ECONNRESET@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _BT_CLOSED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BT_CLOSED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x0]
	bl	___rfcomm_dlc_close
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _BT_CONNECT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BT_CONNECT@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _ECONNREFUSED@GOTPAGE
Lloh19:
	ldr	x10, [x10, _ECONNREFUSED@GOTPAGEOFF]
Lloh20:
	adrp	x11, _ECONNRESET@GOTPAGE
Lloh21:
	ldr	x11, [x11, _ECONNRESET@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _BT_CLOSED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BT_CLOSED@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x19
	bl	_rfcomm_session_close
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"session %p state %ld dlci %d"

	.comm	_BT_CONNECT,8,3                 ; @BT_CONNECT
	.comm	_BT_CONFIG,8,3                  ; @BT_CONFIG
	.comm	_ECONNREFUSED,4,2               ; @ECONNREFUSED
	.comm	_ECONNRESET,4,2                 ; @ECONNRESET
	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.no_dead_strip	_rfcomm_recv_dm
.subsections_via_symbols
