	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_btsocket_l2cap_raw_peeraddr ## -- Begin function ng_btsocket_l2cap_raw_peeraddr
	.p2align	4, 0x90
_ng_btsocket_l2cap_raw_peeraddr:        ## @ng_btsocket_l2cap_raw_peeraddr
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_so2l2cap_raw_pcb
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_ng_btsocket_l2cap_raw_node@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_mtx_lock
	movl	4(%rbx), %eax
	movl	%eax, -24(%rbp)
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	$0, -32(%rbp)
	movl	$40, -56(%rbp)
	movq	_AF_BLUETOOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	$0, -48(%rbp)
	movq	_BDADDR_BREDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %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	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ng_btsocket_l2cap_raw_node,8,3 ## @ng_btsocket_l2cap_raw_node
	.comm	_AF_BLUETOOTH,4,2               ## @AF_BLUETOOTH
	.comm	_BDADDR_BREDR,4,2               ## @BDADDR_BREDR
	.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_l2cap_raw_peeraddr ; -- Begin function ng_btsocket_l2cap_raw_peeraddr
	.p2align	2
_ng_btsocket_l2cap_raw_peeraddr:        ; @ng_btsocket_l2cap_raw_peeraddr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_so2l2cap_raw_pcb
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ng_btsocket_l2cap_raw_node@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ng_btsocket_l2cap_raw_node@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x20, x0
	bl	_mtx_lock
	ldr	w8, [x20, #4]
	str	w8, [sp, #40]
	mov	x0, x20
	bl	_mtx_unlock
	str	xzr, [sp, #32]
Lloh3:
	adrp	x8, _AF_BLUETOOTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AF_BLUETOOTH@GOTPAGEOFF]
	mov	w9, #40
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	xzr, [sp, #16]
Lloh6:
	adrp	x8, _BDADDR_BREDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BDADDR_BREDR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w9, w8, [sp, #8]
Lloh9:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_sodupsockaddr
	str	x0, [x19]
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w8, wzr, eq
	b	LBB0_4
LBB0_3:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ng_btsocket_l2cap_raw_node,8,3 ; @ng_btsocket_l2cap_raw_node
	.comm	_AF_BLUETOOTH,4,2               ; @AF_BLUETOOTH
	.comm	_BDADDR_BREDR,4,2               ; @BDADDR_BREDR
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
