	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ib_drain_rq
___ib_drain_rq:                         ## @__ib_drain_rq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_IB_POLL_DIRECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WARN_ONCE                      ## TAILCALL
LBB0_1:
	movq	%rdi, %rbx
	leaq	-12(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	_ib_drain_qp_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-16(%rbp), %rdi
	callq	_init_completion
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ib_modify_qp
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:
	leaq	-32(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ib_post_recv
	testl	%eax, %eax
	je	LBB0_4
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_WARN_ONCE
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	leaq	-16(%rbp), %rdi
	callq	_wait_for_completion
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_ERR,4,2                 ## @IB_QPS_ERR
	.comm	_IB_POLL_DIRECT,8,3             ## @IB_POLL_DIRECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IB_POLL_DIRECT poll_ctx not supported for drain\n"

	.comm	_ib_drain_qp_done,4,2           ## @ib_drain_qp_done
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
L_.str.1:                               ## @.str.1
	.asciz	"failed to drain recv queue: %d\n"

	.no_dead_strip	___ib_drain_rq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ib_drain_rq
___ib_drain_rq:                         ; @__ib_drain_rq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _IB_QPS_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPS_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stur	w8, [x29, #-24]
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _IB_POLL_DIRECT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_POLL_DIRECT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_WARN_ONCE
LBB0_2:
	mov	x19, x0
	add	x8, sp, #32
	orr	x8, x8, #0x4
	str	x8, [sp, #24]
Lloh8:
	adrp	x8, _ib_drain_qp_done@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ib_drain_qp_done@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #36]
	add	x0, sp, #32
	bl	_init_completion
Lloh11:
	adrp	x8, _IB_QP_STATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_QP_STATE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	sub	x1, x29, #24
	mov	x0, x19
	bl	_ib_modify_qp
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_4
; %bb.3:
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x19
	bl	_ib_post_recv
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_6
LBB0_4:
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_WARN_ONCE
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	add	x0, sp, #32
	bl	_wait_for_completion
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_ERR,4,2                 ; @IB_QPS_ERR
	.comm	_IB_POLL_DIRECT,8,3             ; @IB_POLL_DIRECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IB_POLL_DIRECT poll_ctx not supported for drain\n"

	.comm	_ib_drain_qp_done,4,2           ; @ib_drain_qp_done
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
l_.str.1:                               ; @.str.1
	.asciz	"failed to drain recv queue: %d\n"

	.no_dead_strip	___ib_drain_rq
.subsections_via_symbols
