	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_device_rcvdata
_ng_device_rcvdata:                     ## @ng_device_rcvdata
	.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
	movl	%esi, %ebx
	callq	_NG_HOOK_NODE
	movl	%eax, %edi
	callq	_NG_NODE_PRIVATE
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_NGI_GET_M
	movl	%ebx, %edi
	callq	_NG_FREE_ITEM
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_IF_LOCK
	movq	%rbx, %rdi
	callq	__IF_QFULL
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_IF_UNLOCK
	callq	_NG_FREE_M
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	__IF_ENQUEUE
	movq	%rbx, %rdi
	callq	_IF_UNLOCK
	movq	%r15, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movl	(%r15), %eax
	movq	_NGDF_RWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.3:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_wakeup
LBB0_4:
	movq	%r14, %rdi
	callq	_mtx_unlock
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG,4,2                        ## @DBG
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_NGDF_RWAIT,4,2                 ## @NGDF_RWAIT
	.no_dead_strip	_ng_device_rcvdata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_device_rcvdata
_ng_device_rcvdata:                     ; @ng_device_rcvdata
	.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	_NG_HOOK_NODE
	bl	_NG_NODE_PRIVATE
	mov	x19, x0
	mov	x0, x20
	bl	_NGI_GET_M
	mov	x0, x20
	bl	_NG_FREE_ITEM
	add	x20, x19, #8
	mov	x0, x20
	bl	_IF_LOCK
	mov	x0, x20
	bl	__IF_QFULL
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_IF_UNLOCK
	bl	_NG_FREE_M
Lloh0:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	mov	x0, x20
	bl	__IF_ENQUEUE
	mov	x0, x20
	bl	_IF_UNLOCK
	add	x20, x19, #4
	mov	x0, x20
	bl	_mtx_lock
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _NGDF_RWAIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NGDF_RWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bic	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_wakeup
LBB0_4:
	mov	x0, x20
	bl	_mtx_unlock
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG,4,2                        ; @DBG
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_NGDF_RWAIT,4,2                 ; @NGDF_RWAIT
	.no_dead_strip	_ng_device_rcvdata
.subsections_via_symbols
