	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_post_recv
_i40iw_post_recv:                       ## @i40iw_post_recv
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsp, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_I40IW_MAX_WQ_FRAGMENT_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	leaq	-88(%rbp), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 8(%r14)
	je	LBB0_1
## %bb.13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_1:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	addq	$16, %r14
	leaq	-88(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %edx
	movl	%edx, -76(%rbp)
	movl	16(%rbx), %eax
	movl	%eax, -80(%rbp)
	movl	12(%rbx), %esi
	movq	%r13, %rdi
	callq	_i40iw_copy_sg_list
	movq	%r13, -88(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*(%r14)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_3
## %bb.9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_10:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_i40iw_pr_err
	movq	_I40IW_ERR_QP_TOOMANY_WRS_POSTED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_5
## %bb.6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	%rbx, (%rcx)
LBB0_11:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_MAX_WQ_FRAGMENT_COUNT,4,2 ## @I40IW_MAX_WQ_FRAGMENT_COUNT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" post_recv err %d\n"

	.comm	_I40IW_ERR_QP_TOOMANY_WRS_POSTED,4,2 ## @I40IW_ERR_QP_TOOMANY_WRS_POSTED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_i40iw_post_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_post_recv
_i40iw_post_recv:                       ; @i40iw_post_recv
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #32
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x25, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _I40IW_MAX_WQ_FRAGMENT_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_MAX_WQ_FRAGMENT_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	sub	x0, x29, #88
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_8
LBB0_2:
	cbz	x21, LBB0_6
; %bb.3:
	add	x23, x19, #16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21, #8]
	stur	w2, [x29, #-76]
	ldp	w1, w8, [x21, #12]
	stur	w8, [x29, #-80]
	mov	x0, x22
	bl	_i40iw_copy_sg_list
	stur	x22, [x29, #-88]
	ldr	x8, [x23]
	sub	x1, x29, #88
	mov	x0, x23
	blr	x8
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x21]
	cbnz	x21, LBB0_4
LBB0_6:
	mov	w22, #0
	b	LBB0_8
LBB0_7:
	mov	x24, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	bl	_i40iw_pr_err
Lloh13:
	adrp	x8, _I40IW_ERR_QP_TOOMANY_WRS_POSTED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I40IW_ERR_QP_TOOMANY_WRS_POSTED@GOTPAGEOFF]
Lloh15:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh17:
	adrp	x10, _EINVAL@GOTPAGE
Lloh18:
	ldr	x10, [x10, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w24, w8
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	neg	w22, w8
	str	x21, [x20]
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	sp, x25
	ldur	x8, [x29, #-72]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x22
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh19
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_MAX_WQ_FRAGMENT_COUNT,4,2 ; @I40IW_MAX_WQ_FRAGMENT_COUNT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" post_recv err %d\n"

	.comm	_I40IW_ERR_QP_TOOMANY_WRS_POSTED,4,2 ; @I40IW_ERR_QP_TOOMANY_WRS_POSTED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_i40iw_post_recv
.subsections_via_symbols
