	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_sock_accept
_rfcomm_sock_accept:                    ## @rfcomm_sock_accept
	.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	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	movq	8(%rbx), %r12
	movq	%r12, %rdi
	callq	_lock_sock
	movq	(%r12), %rax
	movq	_BT_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	8(%r12), %rax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_sock_rcvtimeo
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r12, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_BT_DBG
	movl	16(%r12), %edi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_add_wait_queue_exclusive
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_bt_accept_dequeue
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_release_sock
	movq	%rbx, %rdi
	callq	_schedule_timeout
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_lock_sock
	movq	(%r12), %rax
	movq	_BT_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_6
## %bb.13:
	movq	%rbx, %rdi
	callq	_sock_intr_errno
	movl	%eax, %r15d
	jmp	LBB0_14
LBB0_1:
	movq	_EBADFD@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_16:
	movq	%r12, %rdi
	callq	_release_sock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_11:
	movq	_EBADFD@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movl	16(%r12), %edi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_remove_wait_queue
	testl	%r15d, %r15d
	jne	LBB0_16
## %bb.15:
	movq	_SS_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_BT_DBG
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_BT_LISTEN,8,3                  ## @BT_LISTEN
	.comm	_EBADFD,4,2                     ## @EBADFD
	.comm	_SOCK_STREAM,8,3                ## @SOCK_STREAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sk %p timeo %ld"

	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_SS_CONNECTED,4,2               ## @SS_CONNECTED
L_.str.1:                               ## @.str.1
	.asciz	"new socket %p"

	.no_dead_strip	_rfcomm_sock_accept
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_sock_accept
_rfcomm_sock_accept:                    ; @rfcomm_sock_accept
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x23, _current@GOTPAGE
Lloh4:
	ldr	x23, [x23, _current@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_DECLARE_WAITQUEUE
	ldr	x19, [x19, #8]
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x19]
Lloh5:
	adrp	x24, _BT_LISTEN@GOTPAGE
Lloh6:
	ldr	x24, [x24, _BT_LISTEN@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.2:
Lloh10:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w1, w8, w21
	mov	x0, x19
	bl	_sock_rcvtimeo
	mov	x22, x0
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_BT_DBG
	ldr	w0, [x19, #16]
Lloh15:
	adrp	x1, _wait@GOTPAGE
Lloh16:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_add_wait_queue_exclusive
Lloh17:
	adrp	x25, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh18:
	ldr	x25, [x25, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_bt_accept_dequeue
	mov	x21, x0
	cbnz	x0, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25]
	bl	_set_current_state
	cbz	x22, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_release_sock
	mov	x0, x22
	bl	_schedule_timeout
	mov	x22, x0
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x23]
	bl	_signal_pending
	cbz	x0, LBB0_3
; %bb.7:
	mov	x0, x22
	bl	_sock_intr_errno
	mov	x22, x0
	b	LBB0_16
LBB0_8:
Lloh19:
	adrp	x8, _EBADFD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	mov	w22, #0
	b	LBB0_16
LBB0_13:
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh25:
	adrp	x8, _EBADFD@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
Lloh27:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_set_current_state
	ldr	w0, [x19, #16]
Lloh30:
	adrp	x1, _wait@GOTPAGE
Lloh31:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_remove_wait_queue
	cbnz	w22, LBB0_11
; %bb.17:
Lloh32:
	adrp	x8, _SS_CONNECTED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SS_CONNECTED@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh35:
	adrp	x0, l_.str.1@PAGE
Lloh36:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_BT_DBG
	b	LBB0_11
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_BT_LISTEN,8,3                  ; @BT_LISTEN
	.comm	_EBADFD,4,2                     ; @EBADFD
	.comm	_SOCK_STREAM,8,3                ; @SOCK_STREAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sk %p timeo %ld"

	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_SS_CONNECTED,4,2               ; @SS_CONNECTED
l_.str.1:                               ; @.str.1
	.asciz	"new socket %p"

	.no_dead_strip	_rfcomm_sock_accept
.subsections_via_symbols
