	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generate_flush_cqes
_generate_flush_cqes:                   ## @generate_flush_cqes
	.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	%r8, -88(%rbp)                  ## 8-byte Spill
	leaq	32(%rdi), %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi), %rax
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	testl	%r9d, %r9d
	cmoveq	%rax, %rbx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r12
	shlq	$3, %r12
	addq	8(%rbx), %r12
	xorl	%eax, %eax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_IB_WC_WR_FLUSH_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	movl	$1, (%r12)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movl	16(%rbx), %esi
	callq	_next_index
	movslq	%eax, %r12
	movq	%r12, (%rbx)
	shlq	$3, %r12
	addq	8(%rbx), %r12
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addq	$32, %r14
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %r13d
	imull	(%rbx), %r13d
	movl	%r13d, %esi
	callq	_ipz_qeit_calc
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movl	12(%rax), %edi
	movl	4(%r12), %esi
	callq	_replace_wr_id
	movl	%eax, 24(%r14)
	movq	_IB_WC_RECV@GOTPCREL(%rip), %rax
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	jae	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cltq
	leaq	l_switch.table.generate_flush_cqes(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movq	_WQE_WRFLAG_IMM_DATA_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r15), %eax
	movl	%eax, 16(%r14)
	movq	_IB_WC_WITH_IMM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r14)
	jmp	LBB0_2
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_ehca_err
	jmp	LBB0_14
LBB0_12:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_13:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_ehca_err
LBB0_14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid wqe offset=%#llx on qp_num=%#x"

	.comm	_IB_WC_SEND,4,2                 ## @IB_WC_SEND
	.comm	_IB_WC_RDMA_WRITE,4,2           ## @IB_WC_RDMA_WRITE
	.comm	_IB_WC_RDMA_READ,4,2            ## @IB_WC_RDMA_READ
L_.str.1:                               ## @.str.1
	.asciz	"Invalid optype=%x"

	.comm	_IB_WC_RECV,4,2                 ## @IB_WC_RECV
	.comm	_WQE_WRFLAG_IMM_DATA_PRESENT,4,2 ## @WQE_WRFLAG_IMM_DATA_PRESENT
	.comm	_IB_WC_WITH_IMM,4,2             ## @IB_WC_WITH_IMM
	.comm	_IB_WC_WR_FLUSH_ERR,4,2         ## @IB_WC_WR_FLUSH_ERR
	.no_dead_strip	_generate_flush_cqes
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.generate_flush_cqes
l_switch.table.generate_flush_cqes:
	.quad	_IB_WC_SEND
	.quad	_IB_WC_RDMA_WRITE
	.quad	_IB_WC_RDMA_READ

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generate_flush_cqes
_generate_flush_cqes:                   ; @generate_flush_cqes
	.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
	add	x8, x0, #32
	add	x9, x0, #8
	cmp	w5, #0
	csel	x28, x9, x8, eq
	cmp	w3, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x21, x5
	mov	x23, x4
	mov	x22, x3
	mov	x25, x2
	mov	x24, x0
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	w19, #0
	ldp	x9, x8, [x28]
	add	x20, x8, x9, lsl #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh0:
	adrp	x8, _IB_WC_WR_FLUSH_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_WC_WR_FLUSH_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x25, #8]
	str	x24, [x25], #32
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x28]
	ldr	w1, [x28, #16]
	bl	_next_index
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [x28]
	ldr	x8, [x28, #8]
	add	x20, x8, w0, sxtw #3
	add	w19, w19, #1
	cmp	w22, w19
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	cbnz	w8, LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w8, [x28]
	ldr	w9, [x23]
	mul	w27, w9, w8
	mov	x0, x23
	mov	x1, x27
	bl	_ipz_qeit_calc
	cbz	x0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
	ldr	w0, [x0, #12]
	ldr	w1, [x20, #4]
	bl	_replace_wr_id
	str	w0, [x25, #24]
	cbz	w21, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x26]
	sub	w8, w2, #128
	cmp	w8, #3
	b.hs	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh3:
	adrp	x9, l_switch.table.generate_flush_cqes@PAGE
Lloh4:
	add	x9, x9, l_switch.table.generate_flush_cqes@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh5:
	adrp	x8, _IB_WC_RECV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_WC_RECV@GOTPAGEOFF]
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x8]
	str	w8, [x25, #20]
	ldr	w8, [x26, #4]
Lloh7:
	adrp	x9, _WQE_WRFLAG_IMM_DATA_PRESENT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WQE_WRFLAG_IMM_DATA_PRESENT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26, #8]
	str	w8, [x25, #16]
Lloh10:
	adrp	x8, _IB_WC_WITH_IMM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IB_WC_WITH_IMM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x25, #12]
	orr	w8, w9, w8
	str	w8, [x25, #12]
	b	LBB0_2
LBB0_11:
	mov	w19, #0
	b	LBB0_16
LBB0_12:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w0, [x8]
	ldr	w8, [x24, #4]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x27
	b	LBB0_15
LBB0_13:
	mov	x19, x22
	b	LBB0_16
LBB0_14:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_15:
	bl	_ehca_err
LBB0_16:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid wqe offset=%#llx on qp_num=%#x"

	.comm	_IB_WC_SEND,4,2                 ; @IB_WC_SEND
	.comm	_IB_WC_RDMA_WRITE,4,2           ; @IB_WC_RDMA_WRITE
	.comm	_IB_WC_RDMA_READ,4,2            ; @IB_WC_RDMA_READ
l_.str.1:                               ; @.str.1
	.asciz	"Invalid optype=%x"

	.comm	_IB_WC_RECV,4,2                 ; @IB_WC_RECV
	.comm	_WQE_WRFLAG_IMM_DATA_PRESENT,4,2 ; @WQE_WRFLAG_IMM_DATA_PRESENT
	.comm	_IB_WC_WITH_IMM,4,2             ; @IB_WC_WITH_IMM
	.comm	_IB_WC_WR_FLUSH_ERR,4,2         ; @IB_WC_WR_FLUSH_ERR
	.no_dead_strip	_generate_flush_cqes
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.generate_flush_cqes
l_switch.table.generate_flush_cqes:
	.quad	_IB_WC_SEND
	.quad	_IB_WC_RDMA_WRITE
	.quad	_IB_WC_RDMA_READ

.subsections_via_symbols
