	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_error_qp                   ## -- Begin function qib_error_qp
	.p2align	4, 0x90
_qib_error_qp:                          ## @qib_error_qp
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	44(%rdi), %edi
	callq	_to_idev
	movq	%rax, %r15
	movq	(%r13), %rcx
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%eax, %eax
	cmpq	%rsi, %rcx
	je	LBB0_26
## %bb.1:
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_26
## %bb.2:
	movq	%rsi, (%r13)
	movl	8(%r13), %eax
	movq	_QIB_S_TIMER@GOTPCREL(%rip), %rdx
	movq	_QIB_S_WAIT_RNR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.3:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%r13)
	leaq	108(%r13), %rdi
	callq	_del_timer
	movl	8(%r13), %eax
LBB0_4:
	movq	_QIB_S_ANY_WAIT_SEND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%r13)
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_lock
	leaq	104(%r13), %rbx
	movq	%rbx, %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	8(%r13), %eax
	movq	_QIB_S_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.8:
	movq	_QIB_S_ANY_WAIT_IO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%r13)
	movq	%rbx, %rdi
	callq	_list_del_init
LBB0_9:
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_QIB_S_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	jne	LBB0_14
## %bb.10:
	movq	$0, 96(%r13)
	movq	88(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_qib_put_mr
	movq	$0, 88(%r13)
LBB0_12:
	movq	80(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_qib_put_txreq
	movq	$0, 80(%r13)
LBB0_14:
	leaq	32(%r13), %rbx
	movq	16(%r13), %rax
	cmpq	24(%r13), %rax
	je	LBB0_16
## %bb.15:
	movq	%r13, %rdi
	callq	_qib_schedule_send
LBB0_16:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_clear_mr_refs
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%rbx, -48(%rbp)
	movq	_IB_WC_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_QIB_R_WRID_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	76(%r13), %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	72(%r13), %eax
	movl	%eax, -60(%rbp)
	movl	%r14d, -64(%rbp)
	movl	40(%r13), %edi
	callq	_to_icq
	leaq	-64(%rbp), %rsi
	movl	%eax, %edi
	movl	$1, %edx
	callq	_qib_cq_enter
LBB0_18:
	movq	_IB_WC_WR_FLUSH_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	cmpq	$0, 64(%r13)
	je	LBB0_25
## %bb.19:
	leaq	56(%r13), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	48(%r13), %rax
	movq	64(%r13), %rcx
	movq	(%rcx), %r12
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %rbx
	xorl	%ecx, %ecx
	cmpq	%rax, %r12
	cmovgeq	%rcx, %r12
	cmpq	%rax, %rbx
	cmovgeq	%rcx, %rbx
	cmpq	%r12, %rbx
	jne	LBB0_20
LBB0_24:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, 8(%rax)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_25:
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	setne	%al
LBB0_26:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	leaq	48(%r13), %r15
	leaq	-64(%rbp), %r14
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	40(%r13), %edi
	callq	_to_icq
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_qib_cq_enter
	cmpq	%r12, %rbx
	je	LBB0_24
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_get_rwqe_ptr
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	incq	%rbx
	cmpq	48(%r13), %rbx
	jl	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_ERR,8,3                 ## @IB_QPS_ERR
	.comm	_IB_QPS_RESET,8,3               ## @IB_QPS_RESET
	.comm	_QIB_S_TIMER,4,2                ## @QIB_S_TIMER
	.comm	_QIB_S_WAIT_RNR,4,2             ## @QIB_S_WAIT_RNR
	.comm	_QIB_S_ANY_WAIT_SEND,4,2        ## @QIB_S_ANY_WAIT_SEND
	.comm	_QIB_S_BUSY,4,2                 ## @QIB_S_BUSY
	.comm	_QIB_S_ANY_WAIT_IO,4,2          ## @QIB_S_ANY_WAIT_IO
	.comm	_IB_WC_RECV,4,2                 ## @IB_WC_RECV
	.comm	_QIB_R_WRID_VALID,4,2           ## @QIB_R_WRID_VALID
	.comm	_IB_WC_WR_FLUSH_ERR,4,2         ## @IB_WC_WR_FLUSH_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_error_qp                   ; -- Begin function qib_error_qp
	.p2align	2
_qib_error_qp:                          ; @qib_error_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #44]
	bl	_to_idev
	ldr	x9, [x19]
Lloh0:
	adrp	x8, _IB_QPS_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPS_ERR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _IB_QPS_RESET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IB_QPS_RESET@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_24
LBB0_2:
	mov	x21, x0
	str	x8, [x19]
	ldr	w8, [x19, #8]
Lloh6:
	adrp	x9, _QIB_S_TIMER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QIB_S_TIMER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _QIB_S_WAIT_RNR@GOTPAGE
Lloh10:
	ldr	x10, [x10, _QIB_S_WAIT_RNR@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bic	w8, w8, w9
	str	w8, [x19, #8]
	add	x0, x19, #108
	bl	_del_timer
	ldr	w8, [x19, #8]
LBB0_4:
Lloh12:
	adrp	x9, _QIB_S_ANY_WAIT_SEND@GOTPAGE
Lloh13:
	ldr	x9, [x9, _QIB_S_ANY_WAIT_SEND@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	bic	w8, w8, w9
	str	w8, [x19, #8]
LBB0_6:
	mov	x0, x21
	bl	_spin_lock
	add	x22, x19, #104
	mov	x0, x22
	bl	_list_empty
Lloh15:
	adrp	x23, _QIB_S_BUSY@GOTPAGE
Lloh16:
	ldr	x23, [x23, _QIB_S_BUSY@GOTPAGEOFF]
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	w8, [x19, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
Lloh17:
	adrp	x9, _QIB_S_ANY_WAIT_IO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _QIB_S_ANY_WAIT_IO@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19, #8]
	mov	x0, x22
	bl	_list_del_init
LBB0_9:
	add	x22, x19, #32
	mov	x0, x21
	bl	_spin_unlock
	ldr	w8, [x19, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.10:
	str	xzr, [x19, #96]
	ldr	x0, [x19, #88]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_qib_put_mr
	str	xzr, [x19, #88]
LBB0_12:
	ldr	x0, [x19, #80]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_qib_put_txreq
	str	xzr, [x19, #80]
LBB0_14:
	ldp	x8, x9, [x19, #16]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_qib_schedule_send
LBB0_16:
	mov	x0, x19
	mov	w1, #0
	bl	_clear_mr_refs
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	x22, [sp, #24]
Lloh20:
	adrp	x8, _IB_WC_RECV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IB_WC_RECV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh23:
	adrp	x8, _QIB_R_WRID_VALID@GOTPAGE
Lloh24:
	ldr	x8, [x8, _QIB_R_WRID_VALID@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	x1, x19, #76
	bl	_test_and_clear_bit
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w8, [x19, #72]
	stp	w20, w8, [sp, #8]
	ldr	w0, [x19, #40]
	bl	_to_icq
	add	x1, sp, #8
	mov	w2, #1
	bl	_qib_cq_enter
LBB0_18:
Lloh26:
	adrp	x8, _IB_WC_WR_FLUSH_ERR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IB_WC_WR_FLUSH_ERR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_23
; %bb.19:
	add	x20, x19, #56
	mov	x0, x20
	bl	_spin_lock
	ldr	x23, [x19, #64]
	ldr	x8, [x19, #48]
	ldp	x9, x10, [x23]
	cmp	x9, x8
	csel	x24, x9, xzr, lt
	cmp	x10, x8
	csel	x21, x10, xzr, lt
	cmp	x21, x24
	b.eq	LBB0_22
; %bb.20:
	add	x22, x19, #48
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_get_rwqe_ptr
	ldr	w8, [x0]
	str	w8, [sp, #12]
	add	x8, x21, #1
	ldr	x9, [x19, #48]
	cmp	x8, x9
	csinc	x21, xzr, x21, ge
	ldr	w0, [x19, #40]
	bl	_to_icq
	add	x1, sp, #8
	mov	w2, #1
	bl	_qib_cq_enter
	cmp	x21, x24
	b.ne	LBB0_21
LBB0_22:
	str	x24, [x23, #8]
	mov	x0, x20
	bl	_spin_unlock
	mov	w0, #0
	b	LBB0_24
LBB0_23:
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w0, ne
LBB0_24:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_ERR,8,3                 ; @IB_QPS_ERR
	.comm	_IB_QPS_RESET,8,3               ; @IB_QPS_RESET
	.comm	_QIB_S_TIMER,4,2                ; @QIB_S_TIMER
	.comm	_QIB_S_WAIT_RNR,4,2             ; @QIB_S_WAIT_RNR
	.comm	_QIB_S_ANY_WAIT_SEND,4,2        ; @QIB_S_ANY_WAIT_SEND
	.comm	_QIB_S_BUSY,4,2                 ; @QIB_S_BUSY
	.comm	_QIB_S_ANY_WAIT_IO,4,2          ; @QIB_S_ANY_WAIT_IO
	.comm	_IB_WC_RECV,4,2                 ; @IB_WC_RECV
	.comm	_QIB_R_WRID_VALID,4,2           ; @QIB_R_WRID_VALID
	.comm	_IB_WC_WR_FLUSH_ERR,4,2         ; @IB_WC_WR_FLUSH_ERR
.subsections_via_symbols
