	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_drain_rq               ## -- Begin function mlx5_ib_drain_rq
	.p2align	4, 0x90
_mlx5_ib_drain_rq:                      ## @mlx5_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %r15
	movq	(%rax), %r12
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ib_modify_qp
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	(%r12), %rcx
	movq	_MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
LBB0_3:
	leaq	-36(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	_mlx5_ib_drain_qp_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	leaq	-40(%rbp), %rdi
	callq	_init_completion
	leaq	-56(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	__mlx5_ib_post_recv
	testl	%eax, %eax
	je	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%eax, %edx
	callq	_WARN_ONCE
	jmp	LBB0_5
LBB0_4:
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_handle_drain_completion
LBB0_5:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_ERR,4,2                 ## @IB_QPS_ERR
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ## @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to drain recv queue: %d\n"

	.comm	_mlx5_ib_drain_qp_done,4,2      ## @mlx5_ib_drain_qp_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_drain_rq               ; -- Begin function mlx5_ib_drain_rq
	.p2align	2
_mlx5_ib_drain_rq:                      ; @mlx5_ib_drain_rq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _IB_QPS_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPS_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	w0, [x0]
	bl	_to_mdev
	mov	x20, x0
	ldr	x22, [x0]
Lloh3:
	adrp	x8, _IB_QP_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QP_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x1, sp, #24
	mov	x0, x21
	bl	_ib_modify_qp
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	add	x8, sp, #16
	orr	x8, x8, #0x4
	str	x8, [sp, #8]
Lloh9:
	adrp	x8, _mlx5_ib_drain_qp_done@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mlx5_ib_drain_qp_done@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #20]
	add	x0, sp, #16
	bl	_init_completion
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x21
	mov	w3, #1
	bl	__mlx5_ib_post_recv
	cbz	w0, LBB0_4
LBB0_3:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x0
	bl	_WARN_ONCE
	b	LBB0_5
LBB0_4:
	add	x1, sp, #16
	mov	x0, x19
	mov	x2, x20
	bl	_handle_drain_completion
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_ERR,4,2                 ; @IB_QPS_ERR
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ; @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to drain recv queue: %d\n"

	.comm	_mlx5_ib_drain_qp_done,4,2      ; @mlx5_ib_drain_qp_done
.subsections_via_symbols
