	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_process_rxc
_ntb_process_rxc:                       ## @ntb_process_rxc
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movslq	(%rdi), %rbx
	movslq	4(%rdi), %r13
	imulq	%rbx, %r13
	addq	72(%rdi), %r13
	movq	32(%rdi), %rax
	movq	(%rax), %rdi
	movl	8(%r14), %edx
	movq	-16(%rbx,%r13), %rcx
	movl	-8(%rbx,%r13), %r8d
	movl	-4(%rbx,%r13), %r9d
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	-4(%rbx,%r13), %eax
	movq	_DESC_DONE_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	leaq	(%rbx,%r13), %r12
	addq	$-16, %r12
	movq	_LINK_DOWN_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.2:
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_ntb_qp_link_down
	movl	$0, 12(%r12)
	jmp	LBB0_4
LBB0_3:
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	incl	64(%r14)
LBB0_4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r12), %rcx
	movq	24(%r14), %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_11
## %bb.8:
	leaq	56(%r14), %rdi
	leaq	52(%r14), %rsi
	leaq	48(%r14), %rdx
	callq	_ntb_list_mv
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	%rax, %r15
	movq	%r12, 16(%rax)
	movl	4(%r14), %edx
	movl	%edx, (%rax)
	movl	8(%r12), %r8d
	movl	4(%rax), %r9d
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	cmpl	%r9d, %r8d
	jle	LBB0_13
## %bb.10:
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r8d, %edx
	movl	%r9d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	incl	40(%r14)
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, 4(%r15)
	movq	_DESC_DONE_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r15)
	movq	%r14, %rdi
	callq	_ntb_complete_rxc
	jmp	LBB0_14
LBB0_11:
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_dbg
	incl	60(%r14)
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_12:
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_dbg
	incl	44(%r14)
	jmp	LBB0_4
LBB0_13:
	movq	(%r12), %rcx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r12), %eax
	addl	%eax, 12(%r14)
	incq	24(%r14)
	movl	%eax, 4(%r15)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ntb_async_rx
LBB0_14:
	movl	4(%r14), %eax
	incl	%eax
	cltd
	idivl	16(%r14)
	movl	%edx, 4(%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qp %d: RX ver %u len %d flags %x\n"

	.comm	_DESC_DONE_FLAG,4,2             ## @DESC_DONE_FLAG
L_.str.1:                               ## @.str.1
	.asciz	"done flag not set\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_LINK_DOWN_FLAG,4,2             ## @LINK_DOWN_FLAG
L_.str.2:                               ## @.str.2
	.asciz	"link down flag set\n"

L_.str.3:                               ## @.str.3
	.asciz	"version mismatch, expected %llu - got %u\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.4:                               ## @.str.4
	.asciz	"no receive buffer\n"

L_.str.5:                               ## @.str.5
	.asciz	"receive buffer overflow! Wanted %d got %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"RX OK index %u ver %u size %d into buf size %d\n"

	.no_dead_strip	_ntb_process_rxc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntb_process_rxc
_ntb_process_rxc:                       ; @ntb_process_rxc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #72]
	ldpsw	x9, x10, [x0]
	madd	x20, x10, x9, x8
	add	x22, x20, x9
	ldr	x8, [x22, #-16]!
	ldr	x9, [x0, #32]
	ldr	x0, [x9]
	ldp	w9, w10, [x22, #8]
	ldr	w11, [x19, #8]
	stp	x9, x10, [sp, #16]
	stp	x11, x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x22, #12]
Lloh2:
	adrp	x23, _DESC_DONE_FLAG@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DESC_DONE_FLAG@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh4:
	adrp	x9, _LINK_DOWN_FLAG@GOTPAGE
Lloh5:
	ldr	x9, [x9, _LINK_DOWN_FLAG@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.2:
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_ntb_qp_link_down
	str	wzr, [x22, #12]
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #64]
	add	w8, w8, #1
	str	w8, [x19, #64]
LBB0_4:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldr	x8, [x22]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.8:
	add	x0, x19, #56
	add	x1, x19, #52
	add	x2, x19, #48
	bl	_ntb_list_mv
	cbz	x0, LBB0_12
; %bb.9:
	mov	x21, x0
	str	x22, [x0, #16]
	ldr	w8, [x19, #4]
	str	w8, [x0]
	ldr	w9, [x22, #8]
	ldr	w10, [x0, #4]
	ldr	x11, [x19, #32]
	ldr	x0, [x11]
	cmp	w9, w10
	b.le	LBB0_13
; %bb.10:
	stp	x9, x10, [sp]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w8, w8
	ldr	w9, [x23]
	ldr	w10, [x21, #8]
	orr	w9, w10, w9
	stp	w8, w9, [x21, #4]
	mov	x0, x19
	bl	_ntb_complete_rxc
	b	LBB0_14
LBB0_11:
	ldr	x10, [x19, #32]
	ldr	x0, [x10]
	stp	x9, x8, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #60]
	add	w8, w8, #1
	str	w8, [x19, #60]
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_12:
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #44]
	add	w8, w8, #1
	str	w8, [x19, #44]
	b	LBB0_4
LBB0_13:
	ldr	x11, [x22]
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	stp	x9, x10, [sp, #16]
	stp	x8, x11, [sp]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x22, #8]
	ldr	w9, [x19, #12]
	add	w9, w9, w8
	str	w9, [x19, #12]
	ldr	x9, [x19, #24]
	add	x9, x9, #1
	str	x9, [x19, #24]
	str	w8, [x21, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_ntb_async_rx
LBB0_14:
	mov	w0, #0
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	ldr	w9, [x19, #16]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19, #4]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qp %d: RX ver %u len %d flags %x\n"

	.comm	_DESC_DONE_FLAG,4,2             ; @DESC_DONE_FLAG
l_.str.1:                               ; @.str.1
	.asciz	"done flag not set\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_LINK_DOWN_FLAG,4,2             ; @LINK_DOWN_FLAG
l_.str.2:                               ; @.str.2
	.asciz	"link down flag set\n"

l_.str.3:                               ; @.str.3
	.asciz	"version mismatch, expected %llu - got %u\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.4:                               ; @.str.4
	.asciz	"no receive buffer\n"

l_.str.5:                               ; @.str.5
	.asciz	"receive buffer overflow! Wanted %d got %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"RX OK index %u ver %u size %d into buf size %d\n"

	.no_dead_strip	_ntb_process_rxc
.subsections_via_symbols
