	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_hci_raw_sockaddr   ## -- Begin function ng_btsocket_hci_raw_sockaddr
	.p2align	4, 0x90
_ng_btsocket_hci_raw_sockaddr:          ## @ng_btsocket_hci_raw_sockaddr
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -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:
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	movl	$12, %esi
	callq	_bzero
	movl	$12, -40(%rbp)
	movq	_AF_BLUETOOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	%rbx, %rdi
	callq	_mtx_lock
	movl	-36(%rbp), %edi
	movl	4(%rbx), %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sodupsockaddr
	movq	%rax, %rcx
	movq	%rax, (%r14)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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,4,2               ## @AF_BLUETOOTH
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_hci_raw_sockaddr   ; -- Begin function ng_btsocket_hci_raw_sockaddr
	.p2align	2
_ng_btsocket_hci_raw_sockaddr:          ; @ng_btsocket_hci_raw_sockaddr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_so2hci_raw_pcb
	cbz	x0, LBB0_3
; %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_3
; %bb.2:
	mov	x20, x0
	mov	w21, #12
	mov	x0, sp
	mov	w1, #12
	bl	_bzero
Lloh3:
	adrp	x8, _AF_BLUETOOTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AF_BLUETOOTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w21, [sp]
	str	w8, [sp, #8]
	mov	x0, x20
	bl	_mtx_lock
	ldr	w0, [sp, #4]
	ldr	w1, [x20, #4]
	mov	w2, #4
	bl	_strlcpy
	mov	x0, x20
	bl	_mtx_unlock
Lloh6:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, sp
	bl	_sodupsockaddr
	str	x0, [x19]
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w8, wzr, eq
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
LBB0_4:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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,4,2               ; @AF_BLUETOOTH
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
