	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipoib_drain_cq                 ## -- Begin function ipoib_drain_cq
	.p2align	4, 0x90
_ipoib_drain_cq:                        ## @ipoib_drain_cq
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	addq	$4, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	_IPOIB_NUM_WC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPOIB_OP_RECV@GOTPCREL(%rip), %r12
	movq	_IPOIB_OP_CM@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_IPOIB_NUM_WC@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	(%rax), %esi
	jne	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	16(%rbx), %edi
	movq	8(%rbx), %rdx
	callq	_ib_poll_cq
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	shlq	$4, %r13
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	%rbx, %rdi
	callq	_ipoib_ib_handle_rx_wc
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=2
	addq	$16, %r14
	cmpq	%r14, %r13
	je	LBB0_11
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rsi
	movq	(%rsi,%r14), %rax
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_IB_WC_WR_FLUSH_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rsi,%r14)
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	8(%rsi,%r14), %eax
	testl	%eax, (%r12)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_panic
	movq	8(%rbx), %rsi
	movl	8(%rsi,%r14), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=2
	addq	%r14, %rsi
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%rbx, %rdi
	callq	_ipoib_cm_handle_rx_wc
	jmp	LBB0_10
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_spin_lock
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ipoib_poll_tx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IPOIB_NUM_WC,4,2               ## @IPOIB_NUM_WC
	.comm	_IB_WC_SUCCESS,8,3              ## @IB_WC_SUCCESS
	.comm	_IB_WC_WR_FLUSH_ERR,8,3         ## @IB_WC_WR_FLUSH_ERR
	.comm	_IPOIB_OP_RECV,4,2              ## @IPOIB_OP_RECV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ipoib_drain_cq:  Bad wrid 0x%jX\n"

	.comm	_IPOIB_OP_CM,4,2                ## @IPOIB_OP_CM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipoib_drain_cq                 ; -- Begin function ipoib_drain_cq
	.p2align	2
_ipoib_drain_cq:                        ; @ipoib_drain_cq
	.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	x19, x0
	add	x0, x0, #4
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock
Lloh0:
	adrp	x23, _IPOIB_NUM_WC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IPOIB_NUM_WC@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh2:
	adrp	x24, _IB_WC_SUCCESS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _IB_WC_SUCCESS@GOTPAGEOFF]
Lloh4:
	adrp	x25, _IB_WC_WR_FLUSH_ERR@GOTPAGE
Lloh5:
	ldr	x25, [x25, _IB_WC_WR_FLUSH_ERR@GOTPAGEOFF]
Lloh6:
	adrp	x26, _IPOIB_OP_RECV@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IPOIB_OP_RECV@GOTPAGEOFF]
Lloh8:
	adrp	x22, l_.str@PAGE
Lloh9:
	add	x22, x22, l_.str@PAGEOFF
Lloh10:
	adrp	x27, _IPOIB_OP_CM@GOTPAGE
Lloh11:
	ldr	x27, [x27, _IPOIB_OP_CM@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_12
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w0, [x19, #16]
	ldr	x2, [x19, #8]
	mov	x1, x21
	bl	_ib_poll_cq
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, #0
	mov	w8, w21
	lsl	x20, x8, #4
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x1, x8
	bl	_ipoib_ib_handle_rx_wc
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x28, x28, #16
	cmp	x20, x28
	b.eq	LBB0_1
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	x9, [x8, x28]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x9, [x25]
	str	x9, [x8, x28]
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x9, x8, x28
	ldr	w1, [x9, #8]
	ldr	w9, [x26]
	tst	w9, w1
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	bl	_panic
	ldr	x8, [x19, #8]
	add	x9, x8, x28
	ldr	w1, [x9, #8]
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x8, x28
	ldr	w9, [x27]
	mov	x0, x19
	tst	w9, w1
	b.eq	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x1, x8
	bl	_ipoib_cm_handle_rx_wc
	b	LBB0_5
LBB0_12:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_spin_unlock
	mov	x0, x19
	bl	_spin_lock
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_ipoib_poll_tx
	cbnz	x0, LBB0_13
; %bb.14:
	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
	b	_spin_unlock
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IPOIB_NUM_WC,4,2               ; @IPOIB_NUM_WC
	.comm	_IB_WC_SUCCESS,8,3              ; @IB_WC_SUCCESS
	.comm	_IB_WC_WR_FLUSH_ERR,8,3         ; @IB_WC_WR_FLUSH_ERR
	.comm	_IPOIB_OP_RECV,4,2              ; @IPOIB_OP_RECV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ipoib_drain_cq:  Bad wrid 0x%jX\n"

	.comm	_IPOIB_OP_CM,4,2                ; @IPOIB_OP_CM
.subsections_via_symbols
