	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_hci_raw_connect    ## -- Begin function ng_btsocket_hci_raw_connect
	.p2align	4, 0x90
_ng_btsocket_hci_raw_connect:           ## @ng_btsocket_hci_raw_connect
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_so2hci_raw_pcb
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_ng_btsocket_hci_raw_node@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.3:
	testq	%r14, %r14
	je	LBB0_1
## %bb.4:
	movq	(%r14), %rax
	movq	_AF_BLUETOOTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	cmpl	$24, 8(%r14)
	jne	LBB0_1
## %bb.7:
	movq	16(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_EAFNOSUPPORT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_EDESTADDRREQ@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ng_btsocket_hci_raw_node,8,3   ## @ng_btsocket_hci_raw_node
	.comm	_AF_BLUETOOTH,8,3               ## @AF_BLUETOOTH
	.comm	_EAFNOSUPPORT,4,2               ## @EAFNOSUPPORT
	.comm	_EDESTADDRREQ,4,2               ## @EDESTADDRREQ
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_hci_raw_connect    ; -- Begin function ng_btsocket_hci_raw_connect
	.p2align	2
_ng_btsocket_hci_raw_connect:           ; @ng_btsocket_hci_raw_connect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_so2hci_raw_pcb
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _ng_btsocket_hci_raw_node@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ng_btsocket_hci_raw_node@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.2:
	cbz	x20, LBB0_7
; %bb.3:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _AF_BLUETOOTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AF_BLUETOOTH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
	ldr	w8, [x20, #8]
	cmp	w8, #24
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.6:
	mov	x19, x0
	bl	_mtx_lock
	mov	x0, x19
	bl	_mtx_unlock
Lloh6:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh10:
	adrp	x8, _EAFNOSUPPORT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAFNOSUPPORT@GOTPAGEOFF]
	b	LBB0_8
LBB0_10:
Lloh12:
	adrp	x8, _EDESTADDRREQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EDESTADDRREQ@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ng_btsocket_hci_raw_node,8,3   ; @ng_btsocket_hci_raw_node
	.comm	_AF_BLUETOOTH,8,3               ; @AF_BLUETOOTH
	.comm	_EAFNOSUPPORT,4,2               ; @EAFNOSUPPORT
	.comm	_EDESTADDRREQ,4,2               ; @EDESTADDRREQ
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
.subsections_via_symbols
