	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _mlx4_ib_post_recv
__mlx4_ib_post_recv:                    ## @_mlx4_ib_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_to_mqp
	movq	%rax, %r13
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_to_mdev
	movq	%rax, %rbx
	movl	8(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	20(%r13), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	testl	%r14d, %r14d
	jne	LBB0_5
## %bb.1:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	je	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_4:
	xorl	%r14d, %r14d
	subl	(%rcx), %r14d
	movq	%r12, (%rax)
	jmp	LBB0_23
LBB0_5:
	testq	%r12, %r12
	je	LBB0_6
## %bb.7:
	movq	%r13, %r15
	addq	$8, %r15
	movl	16(%r13), %r14d
	decl	%r14d
	andl	12(%r13), %r14d
	xorl	%ebx, %ebx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r12), %eax
	movq	24(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incl	%ebx
	movl	16(%r13), %r14d
	decl	%r14d
	andl	%ebx, %r14d
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	incl	%ebx
	movq	16(%r12), %r12
	testq	%r12, %r12
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_22
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movl	48(%r13), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_mlx4_wq_overflow
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %eax
	xorl	%edi, %edi
	cmpl	(%r15), %eax
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_get_recv_wqe
	movq	_MLX4_IB_QPT_PROXY_SMI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MLX4_IB_QPT_PROXY_SMI_OWNER@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_MLX4_IB_QPT_PROXY_GSI@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	%rax, %r15
	movslq	%r14d, %rbx
	testl	%ecx, (%r13)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	40(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %edx
	callq	_ib_dma_sync_single_for_device
	movl	$4, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r15)
	movq	8(%r12), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r15)
	movq	40(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_be64
	movq	%rax, (%r15)
	addq	$24, %r15
	decl	-44(%rbp)                       ## 4-byte Folded Spill
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, (%r12)
	jle	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rsi
	addq	%r13, %rsi
	movq	%rbx, %rdi
	callq	___set_data_seg
	incq	%r14
	movslq	(%r12), %rax
	addq	$4, %r13
	addq	$24, %rbx
	cmpq	%rax, %r14
	jl	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	jge	LBB0_21
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r14d, %r14d
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	jge	LBB0_21
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r14d, %eax
	movq	%rbx, %r14
	leaq	(%rax,%rax,2), %rbx
	movq	$0, 16(%r15,%rbx,8)
	movq	_MLX4_INVALID_LKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r15,%rbx,8)
	movq	$0, (%r15,%rbx,8)
	movq	%r14, %rbx
	jmp	LBB0_21
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_22:
	xorl	%r14d, %r14d
LBB0_23:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%ebx, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	addl	%ebx, 12(%r13)
	xorl	%eax, %eax
	callq	_wmb
	movzwl	12(%r13), %edi
	callq	_cpu_to_be32
	movq	32(%r13), %rcx
	movq	%rax, (%rcx)
LBB0_25:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEVICE_STATE_INTERNAL_ERROR,4,2 ## @MLX4_DEVICE_STATE_INTERNAL_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MLX4_IB_QPT_PROXY_SMI_OWNER,4,2 ## @MLX4_IB_QPT_PROXY_SMI_OWNER
	.comm	_MLX4_IB_QPT_PROXY_SMI,4,2      ## @MLX4_IB_QPT_PROXY_SMI
	.comm	_MLX4_IB_QPT_PROXY_GSI,4,2      ## @MLX4_IB_QPT_PROXY_GSI
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_MLX4_INVALID_LKEY,4,2          ## @MLX4_INVALID_LKEY
	.no_dead_strip	__mlx4_ib_post_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _mlx4_ib_post_recv
__mlx4_ib_post_recv:                    ; @_mlx4_ib_post_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x26, x3
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x22, x1
	mov	x20, x0
	bl	_to_mqp
	mov	x19, x0
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	ldr	w0, [x20]
	bl	_to_mdev
	mov	x23, x0
	add	x0, x19, #20
	mov	x25, x19
	ldr	w21, [x25, #8]!
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	bl	_spin_lock_irqsave
	cbnz	w26, LBB0_5
; %bb.1:
	ldr	x8, [x23]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbz	w8, LBB0_5
; %bb.2:
	mov	w23, #0
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_3:
	ldp	x9, x20, [sp, #8]               ; 16-byte Folded Reload
LBB0_4:
	ldr	w8, [x8]
	neg	w24, w8
	str	x22, [x9]
	b	LBB0_21
LBB0_5:
	cbz	x22, LBB0_18
; %bb.6:
	mov	w23, #0
	ldp	w9, w8, [x19, #12]
	sub	w8, w8, #1
	and	w26, w8, w9
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22, #4]
	ldr	x9, [x19, #24]
	str	w8, [x9, w26, sxtw #2]
	add	w8, w26, #1
	ldr	w9, [x19, #16]
	sub	w9, w9, #1
	and	w26, w9, w8
	add	w23, w23, #1
	ldr	x22, [x22, #16]
	cbz	x22, LBB0_19
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	w2, [x19, #48]
	mov	x0, x25
	mov	x1, x23
	bl	_mlx4_wq_overflow
	cbnz	x0, LBB0_24
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22]
	ldr	w9, [x25]
	cmp	w8, w9
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_25
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x26
	bl	_get_recv_wqe
	mov	x27, x0
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _MLX4_IB_QPT_PROXY_SMI_OWNER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX4_IB_QPT_PROXY_SMI_OWNER@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _MLX4_IB_QPT_PROXY_SMI@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MLX4_IB_QPT_PROXY_SMI@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh11:
	adrp	x10, _MLX4_IB_QPT_PROXY_GSI@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MLX4_IB_QPT_PROXY_GSI@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w9, w10
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w0, [x8]
	ldr	x8, [x19, #40]
	sbfiz	x20, x26, #2, #32
	ldr	w1, [x8, x20]
Lloh14:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	w2, #4
	bl	_ib_dma_sync_single_for_device
	mov	w0, #4
	bl	_cpu_to_be32
	str	x0, [x27, #16]
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	bl	_cpu_to_be32
	str	x0, [x27, #8]
	ldr	x8, [x19, #40]
	ldr	w0, [x8, x20]
	bl	_cpu_to_be64
	str	x0, [x27], #24
	sub	w21, w21, #1
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, #0
	mov	x20, #0
	mov	x28, x27
LBB0_14:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	add	x1, x8, x24
	mov	x0, x28
	bl	___set_data_seg
	add	x20, x20, #1
	ldrsw	x8, [x22]
	add	x24, x24, #4
	add	x28, x28, #24
	cmp	x20, x8
	b.lt	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w20, w21
	b.ge	LBB0_7
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w20, #0
	cmp	w20, w21
	b.ge	LBB0_7
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w8, #24
	umaddl	x20, w20, w8, x27
	str	xzr, [x20, #16]
Lloh17:
	adrp	x8, _MLX4_INVALID_LKEY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX4_INVALID_LKEY@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_cpu_to_be32
	stp	xzr, x0, [x20]
	b	LBB0_7
LBB0_18:
	mov	w24, #0
	mov	w23, #0
	b	LBB0_20
LBB0_19:
	mov	w24, #0
LBB0_20:
	ldr	x20, [sp, #16]                  ; 8-byte Folded Reload
LBB0_21:
	mov	x0, x23
	bl	_likely
	cbz	x0, LBB0_23
; %bb.22:
	ldr	w8, [x19, #12]
	add	w8, w8, w23
	str	w8, [x19, #12]
	bl	_wmb
	ldrh	w0, [x19, #12]
	bl	_cpu_to_be32
	ldr	x8, [x19, #32]
	str	x0, [x8]
LBB0_23:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	ldp	x9, x20, [sp, #8]               ; 16-byte Folded Reload
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_25:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEVICE_STATE_INTERNAL_ERROR,4,2 ; @MLX4_DEVICE_STATE_INTERNAL_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MLX4_IB_QPT_PROXY_SMI_OWNER,4,2 ; @MLX4_IB_QPT_PROXY_SMI_OWNER
	.comm	_MLX4_IB_QPT_PROXY_SMI,4,2      ; @MLX4_IB_QPT_PROXY_SMI
	.comm	_MLX4_IB_QPT_PROXY_GSI,4,2      ; @MLX4_IB_QPT_PROXY_GSI
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_MLX4_INVALID_LKEY,4,2          ; @MLX4_INVALID_LKEY
	.no_dead_strip	__mlx4_ib_post_recv
.subsections_via_symbols
