	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_sock_listen
_rfcomm_sock_listen:                    ## @rfcomm_sock_listen
	.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	%esi, %r14d
	movq	(%rdi), %r13
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_BT_DBG
	movq	%r13, %rdi
	callq	_lock_sock
	movq	(%r13), %rax
	movq	_BT_BOUND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	8(%r13), %rax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	%r13, %rdi
	callq	_rfcomm_pi
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	jne	LBB0_11
## %bb.6:
	movq	%r13, %rdi
	callq	_bt_sk
	movq	%rax, %r12
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	negl	%r15d
	movq	_rfcomm_sk_list@GOTPCREL(%rip), %rdi
	callq	_write_lock_bh
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	___rfcomm_get_sock_by_addr
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	cmpl	$31, %ebx
	jne	LBB0_7
## %bb.10:
	movq	_rfcomm_sk_list@GOTPCREL(%rip), %rdi
	callq	_write_unlock_bh
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_12
	jmp	LBB0_11
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
	jmp	LBB0_12
LBB0_8:
	movq	%r13, %rdi
	callq	_rfcomm_pi
	movl	%ebx, (%rax)
	movq	_rfcomm_sk_list@GOTPCREL(%rip), %rdi
	callq	_write_unlock_bh
	xorl	%r15d, %r15d
LBB0_11:
	movl	%r14d, 16(%r13)
	movq	$0, 24(%r13)
	movq	_BT_LISTEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
LBB0_12:
	movq	%r13, %rdi
	callq	_release_sock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sk %p backlog %d"

	.comm	_BT_BOUND,8,3                   ## @BT_BOUND
	.comm	_EBADFD,4,2                     ## @EBADFD
	.comm	_SOCK_STREAM,8,3                ## @SOCK_STREAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_rfcomm_sk_list,4,2             ## @rfcomm_sk_list
	.comm	_BT_LISTEN,8,3                  ## @BT_LISTEN
	.no_dead_strip	_rfcomm_sock_listen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_sock_listen
_rfcomm_sock_listen:                    ; @rfcomm_sock_listen
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_BT_DBG
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _BT_BOUND@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_BOUND@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x19
	bl	_rfcomm_pi
	ldr	w8, [x0]
	cbnz	w8, LBB0_11
; %bb.3:
	mov	x0, x19
	bl	_bt_sk
	mov	x22, x0
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w24, [x8]
	neg	w21, w24
Lloh11:
	adrp	x0, _rfcomm_sk_list@GOTPAGE
Lloh12:
	ldr	x0, [x0, _rfcomm_sk_list@GOTPAGEOFF]
	bl	_write_lock_bh
	mov	w23, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	___rfcomm_get_sock_by_addr
	cbz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
	cmp	w23, #31
	b.ne	LBB0_4
; %bb.6:
Lloh13:
	adrp	x0, _rfcomm_sk_list@GOTPAGE
Lloh14:
	ldr	x0, [x0, _rfcomm_sk_list@GOTPAGEOFF]
	bl	_write_unlock_bh
	cmp	w24, #0
	b.gt	LBB0_13
	b	LBB0_12
LBB0_7:
Lloh15:
	adrp	x8, _EBADFD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_10:
	mov	x0, x19
	bl	_rfcomm_pi
	str	w23, [x0]
Lloh19:
	adrp	x0, _rfcomm_sk_list@GOTPAGE
Lloh20:
	ldr	x0, [x0, _rfcomm_sk_list@GOTPAGEOFF]
	bl	_write_unlock_bh
LBB0_11:
	mov	w21, #0
LBB0_12:
	str	w20, [x19, #16]
	str	xzr, [x19, #24]
Lloh21:
	adrp	x8, _BT_LISTEN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BT_LISTEN@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_13:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sk %p backlog %d"

	.comm	_BT_BOUND,8,3                   ; @BT_BOUND
	.comm	_EBADFD,4,2                     ; @EBADFD
	.comm	_SOCK_STREAM,8,3                ; @SOCK_STREAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_rfcomm_sk_list,4,2             ; @rfcomm_sk_list
	.comm	_BT_LISTEN,8,3                  ; @BT_LISTEN
	.no_dead_strip	_rfcomm_sock_listen
.subsections_via_symbols
