	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_btsocket_hci_raw_savctl
_ng_btsocket_hci_raw_savctl:            ## @ng_btsocket_hci_raw_savctl
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	addq	$16, %rdi
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtx_assert
	movq	_NG_BTSOCKET_HCI_RAW_DIRECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_M_PROTO1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r15), %eax
	setne	%cl
	movl	%ecx, -28(%rbp)
	leaq	-28(%rbp), %rdi
	movq	_SCM_HCI_RAW_DIRECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SOL_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$4, %esi
	callq	_sbcreatecontrol
	movq	%rax, (%r14)
	leaq	8(%rax), %rcx
	testq	%rax, %rax
	cmovneq	%rcx, %r14
LBB0_2:
	movq	8(%rbx), %rax
	movq	_SO_TIMESTAMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_microtime
	movq	_SCM_TIMESTAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_sbcreatecontrol
	movq	%rax, (%r14)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_NG_BTSOCKET_HCI_RAW_DIRECTION,4,2 ## @NG_BTSOCKET_HCI_RAW_DIRECTION
	.comm	_M_PROTO1,4,2                   ## @M_PROTO1
	.comm	_SCM_HCI_RAW_DIRECTION,4,2      ## @SCM_HCI_RAW_DIRECTION
	.comm	_SOL_HCI_RAW,4,2                ## @SOL_HCI_RAW
	.comm	_SO_TIMESTAMP,4,2               ## @SO_TIMESTAMP
	.comm	_SCM_TIMESTAMP,4,2              ## @SCM_TIMESTAMP
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.no_dead_strip	_ng_btsocket_hci_raw_savctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_btsocket_hci_raw_savctl
_ng_btsocket_hci_raw_savctl:            ; @ng_btsocket_hci_raw_savctl
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x0, x0, #16
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mtx_assert
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _NG_BTSOCKET_HCI_RAW_DIRECTION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NG_BTSOCKET_HCI_RAW_DIRECTION@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _M_PROTO1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_PROTO1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [sp, #12]
Lloh9:
	adrp	x8, _SCM_HCI_RAW_DIRECTION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCM_HCI_RAW_DIRECTION@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _SOL_HCI_RAW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SOL_HCI_RAW@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	add	x0, sp, #12
	mov	w1, #4
	bl	_sbcreatecontrol
	str	x0, [x19]
	add	x8, x0, #8
	cmp	x0, #0
	csel	x19, x19, x8, eq
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _SO_TIMESTAMP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SO_TIMESTAMP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	add	x0, sp, #8
	bl	_microtime
Lloh18:
	adrp	x8, _SCM_TIMESTAMP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SCM_TIMESTAMP@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	add	x0, sp, #8
	mov	w1, #4
	bl	_sbcreatecontrol
	str	x0, [x19]
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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_NG_BTSOCKET_HCI_RAW_DIRECTION,4,2 ; @NG_BTSOCKET_HCI_RAW_DIRECTION
	.comm	_M_PROTO1,4,2                   ; @M_PROTO1
	.comm	_SCM_HCI_RAW_DIRECTION,4,2      ; @SCM_HCI_RAW_DIRECTION
	.comm	_SOL_HCI_RAW,4,2                ; @SOL_HCI_RAW
	.comm	_SO_TIMESTAMP,4,2               ; @SO_TIMESTAMP
	.comm	_SCM_TIMESTAMP,4,2              ; @SCM_TIMESTAMP
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.no_dead_strip	_ng_btsocket_hci_raw_savctl
.subsections_via_symbols
