	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_post_srq_recv
_hns_roce_v2_post_srq_recv:             ## @hns_roce_v2_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_to_hr_srq
	movq	%rax, %r15
	leaq	20(%rax), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	testq	%rbx, %rbx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %r12d
	decl	%r12d
	andl	(%r15), %r12d
	movq	%r15, %r14
	addq	$40, %r14
	xorl	%r13d, %r13d
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rbx), %eax
	movq	32(%r15), %rcx
	movslq	-68(%rbp), %rdx                 ## 4-byte Folded Reload
	movl	%eax, (%rcx,%rdx,4)
	incl	%r12d
	movl	4(%r15), %eax
	decl	%eax
	andl	%eax, %r12d
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	incl	%r13d
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_17
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	(%rbx), %eax
	xorl	%edi, %edi
	cmpl	8(%r15), %eax
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %eax
	xorl	%edi, %edi
	cmpl	12(%r15), %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_find_empty_entry
	testl	%eax, %eax
	js	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	%eax, %r14d
	callq	_fill_idx_queue
	movq	%r15, %rdi
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_get_srq_wqe
	movq	%rax, %r14
	cmpl	$0, (%rbx)
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	movl	(%rax,%r15), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r14,%r15,2)
	movq	8(%rbx), %rax
	movl	4(%rax,%r15), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r14,%r15,2)
	movq	8(%rbx), %rax
	movl	8(%rax,%r15), %edi
	callq	_cpu_to_le64
	movq	%rax, (%r14,%r15,2)
	incq	%r13
	movslq	(%rbx), %rax
	addq	$12, %r15
	cmpq	%rax, %r13
	jl	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	cmpl	8(%r15), %r13d
	jge	LBB0_16
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r13d, %r13d
	cmpl	8(%r15), %r13d
	jge	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	leaq	(%rax,%rax,2), %r15
	movq	$0, 16(%r14,%r15,8)
	movl	$256, %edi                      ## imm = 0x100
	callq	_cpu_to_le32
	movq	%rax, 8(%r14,%r15,8)
	movq	$0, (%r14,%r15,8)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_1:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_18
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_4:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%r15d, %r15d
	subl	(%rcx), %r15d
	movq	%rbx, (%rax)
	jmp	LBB0_18
LBB0_17:
	xorl	%r15d, %r15d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_18:
	movl	%r13d, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	addl	%r13d, (%rbx)
	xorl	%eax, %eax
	callq	_wmb
	movq	_HNS_ROCE_V2_SRQ_DB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_V2_DB_BYTE_4_CMD_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_V2_DB_BYTE_4_TAG_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	16(%rbx), %edi
	orl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, -104(%rbp)
	movl	(%rbx), %edi
	callq	_cpu_to_le32
	movq	%rax, -112(%rbp)
	movl	24(%rbx), %edx
	leaq	-112(%rbp), %rsi
	movq	%r12, %rdi
	callq	_hns_roce_write64
LBB0_20:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HNS_ROCE_V2_SRQ_DB,4,2         ## @HNS_ROCE_V2_SRQ_DB
	.comm	_V2_DB_BYTE_4_CMD_S,4,2         ## @V2_DB_BYTE_4_CMD_S
	.comm	_V2_DB_BYTE_4_TAG_M,4,2         ## @V2_DB_BYTE_4_TAG_M
	.no_dead_strip	_hns_roce_v2_post_srq_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v2_post_srq_recv
_hns_roce_v2_post_srq_recv:             ; @hns_roce_v2_post_srq_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x2
	mov	x24, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_hr_dev
	mov	x19, x0
	mov	x0, x20
	bl	_to_hr_srq
	mov	x21, x0
	add	x20, x0, #20
	mov	x0, x20
	bl	_spin_lock_irqsave
	cbz	x24, LBB0_12
; %bb.1:
	stp	x22, x20, [sp, #8]              ; 16-byte Folded Spill
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	mov	w22, #0
	ldp	w9, w8, [x21]
	sub	w8, w8, #1
	and	w26, w8, w9
	add	x25, x21, #40
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24, #4]
	ldr	x9, [x21, #32]
	str	w8, [x9, w27, sxtw #2]
	add	w8, w26, #1
	ldr	w9, [x21, #4]
	sub	w9, w9, #1
	and	w26, w9, w8
	add	w22, w22, #1
	ldr	x24, [x24, #16]
	cbz	x24, LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w8, [x24]
	ldr	w9, [x21, #8]
	cmp	w8, w9
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x21, #12]
	cmp	w8, w9
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x21, #4]
	mov	x0, x25
	bl	_find_empty_entry
	tbnz	w0, #31, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, x0
	mov	x0, x25
	mov	x1, x26
	mov	x2, x27
	bl	_fill_idx_queue
	mov	x0, x21
	mov	x1, x27
	bl	_get_srq_wqe
	mov	x28, x0
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
	mov	x19, #0
	add	x20, x28, #16
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24, #8]
	ldr	w0, [x8, x23]
	bl	_cpu_to_le32
	str	x0, [x20]
	ldr	x8, [x24, #8]
	add	x8, x8, x23
	ldr	w0, [x8, #4]
	bl	_cpu_to_le32
	stur	x0, [x20, #-8]
	ldr	x8, [x24, #8]
	add	x8, x8, x23
	ldr	w0, [x8, #8]
	bl	_cpu_to_le64
	stur	x0, [x20, #-16]
	add	x19, x19, #1
	ldrsw	x8, [x24]
	add	x23, x23, #12
	add	x20, x20, #24
	cmp	x19, x8
	b.lt	LBB0_8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w19, #0
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21, #8]
	cmp	w19, w8
	b.ge	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #24
	umaddl	x19, w19, w8, x28
	str	xzr, [x19, #16]
	mov	w0, #256
	bl	_cpu_to_le32
	stp	xzr, x0, [x19]
	b	LBB0_2
LBB0_12:
	mov	w22, #0
	mov	w25, #0
	b	LBB0_17
LBB0_13:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	b	LBB0_15
LBB0_14:
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w25, w8
	str	x24, [x9]
	b	LBB0_17
LBB0_16:
	mov	w25, #0
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
LBB0_17:
	mov	x0, x22
	bl	_likely
	cbz	x0, LBB0_19
; %bb.18:
	ldr	w8, [x21]
	add	w8, w8, w22
	str	w8, [x21]
	bl	_wmb
Lloh4:
	adrp	x8, _HNS_ROCE_V2_SRQ_DB@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HNS_ROCE_V2_SRQ_DB@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _V2_DB_BYTE_4_CMD_S@GOTPAGE
Lloh8:
	ldr	x9, [x9, _V2_DB_BYTE_4_CMD_S@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x21, #16]
Lloh10:
	adrp	x10, _V2_DB_BYTE_4_TAG_M@GOTPAGE
Lloh11:
	ldr	x10, [x10, _V2_DB_BYTE_4_TAG_M@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	x0, [sp, #40]
	ldr	w0, [x21]
	bl	_cpu_to_le32
	str	x0, [sp, #32]
	ldr	w2, [x21, #24]
	add	x1, sp, #32
	mov	x0, x19
	bl	_hns_roce_write64
LBB0_19:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x25
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HNS_ROCE_V2_SRQ_DB,4,2         ; @HNS_ROCE_V2_SRQ_DB
	.comm	_V2_DB_BYTE_4_CMD_S,4,2         ; @V2_DB_BYTE_4_CMD_S
	.comm	_V2_DB_BYTE_4_TAG_M,4,2         ; @V2_DB_BYTE_4_TAG_M
	.no_dead_strip	_hns_roce_v2_post_srq_recv
.subsections_via_symbols
