	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_post_recv                 ## -- Begin function mlx4_post_recv
	.p2align	4, 0x90
_mlx4_post_recv:                        ## @mlx4_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, %r14
	movq	%rsi, %rbx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_to_mqp
	movq	%rax, %r13
	leaq	12(%rax), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_pthread_spin_lock
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %r14d
	decl	%r14d
	andl	(%r13), %r14d
	xorl	%r15d, %r15d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rbx), %eax
	movq	16(%r13), %rcx
	movslq	%r14d, %rdx
	movl	%eax, (%rcx,%rdx,4)
	incl	%r14d
	movl	4(%r13), %eax
	decl	%eax
	andl	%eax, %r14d
	incl	%r15d
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_to_mcq
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_wq_overflow
	testq	%rax, %rax
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %eax
	cmpl	8(%r13), %eax
	jg	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_get_recv_wqe
	cmpl	$0, (%rbx)
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jle	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rsi
	addq	%r12, %rsi
	movq	%r13, %rdi
	callq	___set_data_seg
	incq	%r12
	movslq	(%rbx), %rax
	addq	$24, %r13
	cmpq	%rax, %r12
	jl	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	cmpl	8(%r13), %r12d
	jge	LBB0_12
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
	cmpl	8(%r13), %r12d
	jge	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %eax
	leaq	(%rax,%rax,2), %r12
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	$0, 16(%r15,%r12,8)
	movq	_MLX4_INVALID_LKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htobe32
	movq	%rax, 8(%r15,%r12,8)
	movq	$0, (%r15,%r12,8)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	testl	%r15d, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_15
	jmp	LBB0_16
LBB0_1:
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_13:
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	addl	%r15d, (%r13)
	xorl	%eax, %eax
	callq	_udma_to_device_barrier
	movzwl	(%r13), %edi
	callq	_htobe32
	movq	24(%r13), %rcx
	movq	%rax, (%rcx)
LBB0_16:
	movq	%rbx, %rdi
	callq	_pthread_spin_unlock
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_INVALID_LKEY,4,2          ## @MLX4_INVALID_LKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_post_recv                 ; -- Begin function mlx4_post_recv
	.p2align	2
_mlx4_post_recv:                        ; @mlx4_post_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
	bl	_to_mqp
	mov	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_pthread_spin_lock
	cbz	x23, LBB0_12
; %bb.1:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	w21, #0
	ldp	w9, w8, [x20]
	sub	w8, w8, #1
	and	w25, w8, w9
Lloh0:
	adrp	x22, _MLX4_INVALID_LKEY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MLX4_INVALID_LKEY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23, #4]
	ldr	x9, [x20, #16]
	str	w8, [x9, w25, sxtw #2]
	add	w8, w25, #1
	ldr	w9, [x20, #4]
	sub	w9, w9, #1
	and	w25, w9, w8
	add	w21, w21, #1
	ldr	x23, [x23, #16]
	cbz	x23, LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w0, [x24]
	bl	_to_mcq
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wq_overflow
	cbnz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x20, #8]
	cmp	w8, w9
	b.gt	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x25
	bl	_get_recv_wqe
	mov	x26, x0
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x28, #0
	mov	x27, x26
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23, #8]
	add	x1, x28, x8
	mov	x0, x27
	bl	___set_data_seg
	add	x28, x28, #1
	ldrsw	x8, [x23]
	add	x27, x27, #24
	cmp	x28, x8
	b.lt	LBB0_7
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #8]
	cmp	w28, w8
	b.ge	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #24
	umaddl	x26, w28, w8, x26
	str	xzr, [x26, #16]
	ldr	w0, [x22]
	bl	_htobe32
	stp	xzr, x0, [x26]
	b	LBB0_2
LBB0_11:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x23, [x8]
	cbnz	w21, LBB0_14
	b	LBB0_15
LBB0_12:
	mov	w24, #0
	b	LBB0_15
LBB0_13:
	mov	w24, #0
LBB0_14:
	ldr	w8, [x20]
	add	w8, w8, w21
	str	w8, [x20]
	bl	_udma_to_device_barrier
	ldrh	w0, [x20]
	bl	_htobe32
	ldr	x8, [x20, #24]
	str	x0, [x8]
LBB0_15:
	mov	x0, x19
	bl	_pthread_spin_unlock
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_INVALID_LKEY,4,2          ; @MLX4_INVALID_LKEY
.subsections_via_symbols
