	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_session_create
_rfcomm_session_create:                 ## @rfcomm_session_create
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_batostr
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_batostr
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_BT_DBG
	leaq	-48(%rbp), %rdi
	callq	_rfcomm_l2sock_create
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	leaq	-56(%rbp), %rdi
	movq	%r13, %rsi
	callq	_bacpy
	movq	_AF_BLUETOOTH@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	-48(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	movl	$32, %edx
	callq	_kernel_bind
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movq	-48(%rbp), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_lock_sock
	movq	_l2cap_mtu@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_l2cap_pi
	movl	%r12d, (%rax)
	movq	%rbx, %rdi
	callq	_release_sock
	movq	-48(%rbp), %rdi
	movq	_BT_BOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rfcomm_session_add
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	movl	$1, (%rax)
	leaq	-56(%rbp), %rdi
	movq	%r14, %rsi
	callq	_bacpy
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)
	movq	_RFCOMM_PSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movq	$0, -80(%rbp)
	movq	-48(%rbp), %rdi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-80(%rbp), %rsi
	movl	$32, %edx
	callq	_kernel_connect
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	callq	_rfcomm_session_del
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, (%r15)
LBB0_4:
	movq	-48(%rbp), %rdi
	callq	_sock_release
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	addq	$40, %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	"%s %s"

	.comm	_AF_BLUETOOTH,8,3               ## @AF_BLUETOOTH
	.comm	_l2cap_mtu,4,2                  ## @l2cap_mtu
	.comm	_BT_BOUND,4,2                   ## @BT_BOUND
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RFCOMM_PSM,4,2                 ## @RFCOMM_PSM
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.no_dead_strip	_rfcomm_session_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_session_create
_rfcomm_session_create:                 ; @rfcomm_session_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_batostr
	mov	x21, x0
	mov	x0, x20
	bl	_batostr
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_BT_DBG
	add	x0, sp, #8
	bl	_rfcomm_l2sock_create
	str	w0, [x19]
	tbnz	w0, #31, LBB0_8
; %bb.1:
	add	x8, sp, #16
	add	x21, x8, #24
	mov	x0, x21
	mov	x1, x22
	bl	_bacpy
Lloh2:
	adrp	x23, _AF_BLUETOOTH@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AF_BLUETOOTH@GOTPAGEOFF]
	ldr	x8, [x23]
	stp	xzr, x8, [sp, #24]
	str	xzr, [sp, #16]
	ldr	x0, [sp, #8]
	add	x1, sp, #16
	mov	w2, #32
	bl	_kernel_bind
	str	w0, [x19]
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x8, [sp, #8]
	ldr	x22, [x8]
	mov	x0, x22
	bl	_lock_sock
Lloh4:
	adrp	x8, _l2cap_mtu@GOTPAGE
Lloh5:
	ldr	x8, [x8, _l2cap_mtu@GOTPAGEOFF]
Lloh6:
	ldr	w24, [x8]
	mov	x0, x22
	bl	_l2cap_pi
	str	w24, [x0]
	mov	x0, x22
	bl	_release_sock
	ldr	x0, [sp, #8]
Lloh7:
	adrp	x8, _BT_BOUND@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BT_BOUND@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_rfcomm_session_add
	cbz	x0, LBB0_6
; %bb.3:
	mov	x22, x0
	mov	w8, #1
	str	w8, [x0]
	mov	x0, x21
	mov	x1, x20
	bl	_bacpy
	ldr	x8, [x23]
	str	x8, [sp, #32]
Lloh10:
	adrp	x8, _RFCOMM_PSM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RFCOMM_PSM@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	stp	xzr, x0, [sp, #16]
	ldr	x0, [sp, #8]
Lloh13:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	add	x1, sp, #16
	mov	w2, #32
	bl	_kernel_connect
	str	w0, [x19]
	cbz	w0, LBB0_9
; %bb.4:
Lloh16:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_9
; %bb.5:
	mov	x0, x22
	bl	_rfcomm_session_del
	b	LBB0_8
LBB0_6:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19]
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_sock_release
LBB0_8:
	mov	x22, #0
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %s"

	.comm	_AF_BLUETOOTH,8,3               ; @AF_BLUETOOTH
	.comm	_l2cap_mtu,4,2                  ; @l2cap_mtu
	.comm	_BT_BOUND,4,2                   ; @BT_BOUND
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RFCOMM_PSM,4,2                 ; @RFCOMM_PSM
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.no_dead_strip	_rfcomm_session_create
.subsections_via_symbols
