	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function client_socket
_client_socket:                         ## @client_socket
	.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
	movl	%esi, %r15d
	movl	%edi, %r12d
	movq	_PF_BLUETOOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_SEQPACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BLUETOOTH_PROTO_L2CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_fcntl
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	_F_SETFL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	%rbx, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fcntl
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movl	$40, -80(%rbp)
	movq	_AF_BLUETOOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	-64(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, -72(%rbp)
	movq	_BDADDR_BREDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	$0, -56(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$40, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_2
## %bb.5:
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	$4, %edx
	callq	_memcpy
	movl	%r15d, %edi
	callq	_htole16
	movq	%rax, -72(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$40, %edx
	callq	_connect
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_7:
	movl	%ebx, %r14d
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	callq	_close
LBB0_8:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_BLUETOOTH,4,2               ## @PF_BLUETOOTH
	.comm	_SOCK_SEQPACKET,4,2             ## @SOCK_SEQPACKET
	.comm	_BLUETOOTH_PROTO_L2CAP,4,2      ## @BLUETOOTH_PROTO_L2CAP
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,8,3                 ## @O_NONBLOCK
	.comm	_AF_BLUETOOTH,4,2               ## @AF_BLUETOOTH
	.comm	_BDADDR_BREDR,4,2               ## @BDADDR_BREDR
	.comm	_errno,8,3                      ## @errno
	.comm	_EINPROGRESS,8,3                ## @EINPROGRESS
	.no_dead_strip	_client_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function client_socket
_client_socket:                         ; @client_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PF_BLUETOOTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_BLUETOOTH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_SEQPACKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_SEQPACKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _BLUETOOTH_PROTO_L2CAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BLUETOOTH_PROTO_L2CAP@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_socket
	tbnz	x0, #63, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh9:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_fcntl
	tbnz	x0, #63, LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	orr	x8, x8, x0
	str	x8, [sp]
	mov	x0, x19
	bl	_fcntl
	tbnz	x0, #63, LBB0_6
; %bb.3:
Lloh18:
	adrp	x8, _AF_BLUETOOTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AF_BLUETOOTH@GOTPAGEOFF]
	mov	w9, #40
Lloh20:
	ldr	w8, [x8]
	str	w9, [sp, #8]
	str	w8, [sp, #44]
	add	x8, sp, #8
	add	x22, x8, #16
	mov	x0, x22
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh21:
	adrp	x8, _BDADDR_BREDR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BDADDR_BREDR@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	str	xzr, [sp, #16]
	str	xzr, [sp, #32]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #40
	bl	_bind
	tbnz	x0, #63, LBB0_6
; %bb.4:
	mov	x0, x22
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	mov	x0, x20
	bl	_htole16
	str	x0, [sp, #16]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #40
	bl	_connect
	tbz	x0, #63, LBB0_8
; %bb.5:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh28:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_close
LBB0_7:
	mov	w19, #-1
LBB0_8:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_BLUETOOTH,4,2               ; @PF_BLUETOOTH
	.comm	_SOCK_SEQPACKET,4,2             ; @SOCK_SEQPACKET
	.comm	_BLUETOOTH_PROTO_L2CAP,4,2      ; @BLUETOOTH_PROTO_L2CAP
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,8,3                 ; @O_NONBLOCK
	.comm	_AF_BLUETOOTH,4,2               ; @AF_BLUETOOTH
	.comm	_BDADDR_BREDR,4,2               ; @BDADDR_BREDR
	.comm	_errno,8,3                      ; @errno
	.comm	_EINPROGRESS,8,3                ; @EINPROGRESS
	.no_dead_strip	_client_socket
.subsections_via_symbols
