	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_accept_connection
_rfcomm_accept_connection:              ## @rfcomm_accept_connection
	.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	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	(%r14), %rdi
	callq	_bt_sk
	movq	%rax, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_1
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_BT_DBG
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_kernel_accept
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movq	_rfcomm_l2data_ready@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-24(%rbp), %rdi
	movq	(%rdi), %rcx
	movl	%eax, 4(%rcx)
	movq	_rfcomm_l2state_change@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	_BT_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rfcomm_session_add
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rfcomm_session_hold
	movq	-24(%rbp), %rax
	movq	(%rax), %rdi
	callq	_l2cap_pi
	movl	4(%rax), %r14d
	movq	-24(%rbp), %rax
	movq	(%rax), %rdi
	callq	_l2cap_pi
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_min
	addq	$-5, %rax
	movq	%rax, (%rbx)
	movq	_RFCOMM_SCHED_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rfcomm_schedule
	jmp	LBB0_5
LBB0_4:
	movq	-24(%rbp), %rdi
	callq	_sock_release
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"session %p"

	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_rfcomm_l2data_ready,4,2        ## @rfcomm_l2data_ready
	.comm	_rfcomm_l2state_change,4,2      ## @rfcomm_l2state_change
	.comm	_BT_OPEN,4,2                    ## @BT_OPEN
	.comm	_RFCOMM_SCHED_RX,4,2            ## @RFCOMM_SCHED_RX
	.no_dead_strip	_rfcomm_accept_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_accept_connection
_rfcomm_accept_connection:              ; @rfcomm_accept_connection
	.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, x0
	ldr	x19, [x0, #8]
	ldr	x0, [x19]
	bl	_bt_sk
	bl	_list_empty
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_BT_DBG
Lloh2:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_kernel_accept
	tbnz	w0, #31, LBB0_1
; %bb.3:
Lloh5:
	adrp	x8, _rfcomm_l2data_ready@GOTPAGE
Lloh6:
	ldr	x8, [x8, _rfcomm_l2data_ready@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	x0, [sp, #8]
	ldr	x9, [x0]
Lloh8:
	adrp	x10, _rfcomm_l2state_change@GOTPAGE
Lloh9:
	ldr	x10, [x10, _rfcomm_l2state_change@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
Lloh11:
	adrp	x8, _BT_OPEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BT_OPEN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_rfcomm_session_add
	cbz	x0, LBB0_5
; %bb.4:
	mov	x19, x0
	bl	_rfcomm_session_hold
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_l2cap_pi
	ldr	w20, [x0, #4]
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_l2cap_pi
	ldr	w1, [x0]
	mov	x0, x20
	bl	_min
	sub	x8, x0, #5
	str	x8, [x19]
Lloh14:
	adrp	x8, _RFCOMM_SCHED_RX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RFCOMM_SCHED_RX@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_rfcomm_schedule
	b	LBB0_1
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_sock_release
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"session %p"

	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_rfcomm_l2data_ready,4,2        ; @rfcomm_l2data_ready
	.comm	_rfcomm_l2state_change,4,2      ; @rfcomm_l2state_change
	.comm	_BT_OPEN,4,2                    ; @BT_OPEN
	.comm	_RFCOMM_SCHED_RX,4,2            ; @RFCOMM_SCHED_RX
	.no_dead_strip	_rfcomm_accept_connection
.subsections_via_symbols
