	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_tavor_post_srq_recv      ## -- Begin function mthca_tavor_post_srq_recv
	.p2align	4, 0x90
_mthca_tavor_post_srq_recv:             ## @mthca_tavor_post_srq_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, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_msrq
	movq	%rax, %r13
	leaq	16(%rax), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movl	(%r13), %r12d
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_get_wqe
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_wqe_to_link
	movl	(%rax), %ebx
	movl	%ebx, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_4:
	movl	4(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mthca_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
LBB0_19:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_1:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
LBB0_20:
	movl	%r14d, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	xorl	%eax, %eax
	callq	_wmb
	movb	12(%r13), %cl
	shll	%cl, %r12d
	movl	4(%r13), %ebx
	shll	$8, %ebx
	orl	%r14d, %ebx
	movq	_MTHCA_RECEIVE_DOORBELL@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	8(%rdi), %r14
	callq	_MTHCA_GET_DOORBELL_LOCK
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_mthca_write64
LBB0_22:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	32(%r13), %r12
	movq	%r15, 32(%r13)
	movq	$0, (%r15)
	movl	(%r14), %eax
	xorl	%edi, %edi
	cmpl	8(%r13), %eax
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	$8, %r15
	cmpl	$0, (%r14)
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rsi
	addq	%rbx, %rsi
	movq	%r15, %rdi
	callq	_mthca_set_data_seg
	addq	$4, %r15
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	8(%r13), %ebx
	jge	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	_mthca_set_data_seg_inval
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_MTHCA_NEXT_DBD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, (%r12)
	movl	4(%r14), %eax
	movq	24(%r13), %rcx
	movslq	-56(%rbp), %rdx                 ## 4-byte Folded Reload
	movl	%eax, (%rcx,%rdx,4)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	incl	%ebx
	xorl	%edi, %edi
	movq	_MTHCA_TAVOR_MAX_WQES_PER_RECV_DB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_wmb
	movb	12(%r13), %cl
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	shll	%cl, %r12d
	movl	4(%r13), %r15d
	shll	$8, %r15d
	movq	_MTHCA_RECEIVE_DOORBELL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	8(%rdi), %rbx
	callq	_MTHCA_GET_DOORBELL_LOCK
	movl	%r12d, %edi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_mthca_write64
	movl	(%r13), %r12d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ebx, %ebx
	cmpl	8(%r13), %ebx
	jl	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %r12d                ## 4-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r14), %r14
	testq	%r14, %r14
	je	LBB0_18
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %esi
	movq	%r13, %rdi
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	callq	_get_wqe
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_wqe_to_link
	movl	(%rax), %ebx
	movl	%ebx, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
	jmp	LBB0_4
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	%r12, 32(%r13)
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_19
LBB0_18:
	xorl	%r15d, %r15d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SRQ %06x full\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTHCA_NEXT_DBD,4,2             ## @MTHCA_NEXT_DBD
	.comm	_MTHCA_TAVOR_MAX_WQES_PER_RECV_DB,4,2 ## @MTHCA_TAVOR_MAX_WQES_PER_RECV_DB
	.comm	_MTHCA_RECEIVE_DOORBELL,8,3     ## @MTHCA_RECEIVE_DOORBELL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_tavor_post_srq_recv      ; -- Begin function mthca_tavor_post_srq_recv
	.p2align	2
_mthca_tavor_post_srq_recv:             ; @mthca_tavor_post_srq_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	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_mdev
	mov	x20, x0
	mov	x0, x19
	bl	_to_msrq
	mov	x21, x0
	add	x0, x0, #16
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock_irqsave
	ldr	w22, [x21]
	cbz	x24, LBB0_3
; %bb.1:
	str	x23, [sp]                       ; 8-byte Folded Spill
	mov	x0, x21
	mov	x1, x22
	bl	_get_wqe
	mov	x27, x0
	bl	_wqe_to_link
	ldr	w28, [x0]
	lsr	w0, w28, #31
	bl	_unlikely
	mov	w25, #0
	cbz	x0, LBB0_8
LBB0_2:
	ldr	w2, [x21, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mthca_err
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w26, w8
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x24, [x8]
	b	LBB0_5
LBB0_3:
	mov	w25, #0
LBB0_4:
	mov	w26, #0
LBB0_5:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x25
	bl	_likely
	cbz	x0, LBB0_7
; %bb.6:
	bl	_wmb
	ldr	w8, [x21, #12]
	lsl	w22, w22, w8
	ldr	w8, [x21, #4]
	orr	w21, w25, w8, lsl #8
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _MTHCA_RECEIVE_DOORBELL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MTHCA_RECEIVE_DOORBELL@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x23, x9, x8
	mov	x0, x20
	bl	_MTHCA_GET_DOORBELL_LOCK
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_mthca_write64
LBB0_7:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x26
	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
LBB0_8:
	mov	x26, x22
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x23, [x21, #32]
	str	x27, [x21, #32]
	str	xzr, [x27]
	ldr	w8, [x24]
	ldr	w9, [x21, #8]
	cmp	w8, w9
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_20
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x27, #8
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x19, #0
LBB0_12:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24, #8]
	add	x1, x19, x8
	mov	x0, x27
	bl	_mthca_set_data_seg
	add	x27, x27, #4
	add	x19, x19, #1
	ldrsw	x8, [x24]
	cmp	x19, x8
	b.lt	LBB0_12
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w19, #0
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x21, #8]
	cmp	w19, w8
	b.ge	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x27
	bl	_mthca_set_data_seg_inval
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
Lloh8:
	adrp	x8, _MTHCA_NEXT_DBD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTHCA_NEXT_DBD@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_cpu_to_be32
	ldr	w8, [x24, #4]
	ldr	x9, [x21, #24]
	str	w8, [x9, w26, sxtw #2]
	str	x0, [x23]
	str	w28, [x21]
	add	w25, w25, #1
Lloh11:
	adrp	x8, _MTHCA_TAVOR_MAX_WQES_PER_RECV_DB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTHCA_TAVOR_MAX_WQES_PER_RECV_DB@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w25, w8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=1
	bl	_wmb
	ldr	w8, [x21, #12]
	lsl	w22, w22, w8
	ldr	w8, [x21, #4]
	lsl	w25, w8, #8
	ldr	x8, [x20, #8]
Lloh14:
	adrp	x9, _MTHCA_RECEIVE_DOORBELL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MTHCA_RECEIVE_DOORBELL@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x26, x9, x8
	mov	x0, x20
	bl	_MTHCA_GET_DOORBELL_LOCK
	mov	x3, x0
	mov	x0, x22
	mov	x1, x25
	mov	x2, x26
	bl	_mthca_write64
	mov	w25, #0
	ldr	w22, [x21]
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	x24, [x24, #16]
	cbz	x24, LBB0_4
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w26, [x21]
	mov	x0, x21
	mov	x1, x26
	bl	_get_wqe
	mov	x27, x0
	bl	_wqe_to_link
	ldr	w28, [x0]
	lsr	w0, w28, #31
	bl	_unlikely
	cbz	x0, LBB0_9
	b	LBB0_2
LBB0_20:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w26, w8
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x24, [x8]
	str	x23, [x21, #32]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SRQ %06x full\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTHCA_NEXT_DBD,4,2             ; @MTHCA_NEXT_DBD
	.comm	_MTHCA_TAVOR_MAX_WQES_PER_RECV_DB,4,2 ; @MTHCA_TAVOR_MAX_WQES_PER_RECV_DB
	.comm	_MTHCA_RECEIVE_DOORBELL,8,3     ; @MTHCA_RECEIVE_DOORBELL
.subsections_via_symbols
