	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_drain_completion
_handle_drain_completion:               ## @handle_drain_completion
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_IB_POLL_DIRECT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.1:
	movq	_HZ@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r15), %rax
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$34, %rsi
	addl	%eax, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	jg	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_ib_process_cq_direct
	jmp	LBB0_3
LBB0_5:
	movq	%rdx, %r12
	movq	8(%rdx), %rax
	movq	(%rax), %rax
	movq	_MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.6:
	movq	%rbx, %rdi
	callq	_to_mcq
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, (%r15)
	je	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.10:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_irq_poll_disable
	movq	%rbx, %rdi
	callq	_irq_poll_enable
	jmp	LBB0_13
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$1, (%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_13
LBB0_11:
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_cancel_work_sync
	jmp	LBB0_13
LBB0_12:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
LBB0_13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*8(%r15)
LBB0_14:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wait_for_completion            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_POLL_DIRECT,4,2             ## @IB_POLL_DIRECT
	.comm	_HZ,4,2                         ## @HZ
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ## @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.no_dead_strip	_handle_drain_completion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_drain_completion
_handle_drain_completion:               ; @handle_drain_completion
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IB_POLL_DIRECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_POLL_DIRECT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
Lloh3:
	adrp	x21, _HZ@GOTPAGE
Lloh4:
	ldr	x21, [x21, _HZ@GOTPAGEOFF]
	ldrsw	x8, [x21]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
	mov	x0, x19
	bl	_wait_for_completion_timeout
	cmp	x0, #0
	b.gt	LBB0_4
; %bb.2:
	mov	w22, #26215
	movk	w22, #26214, lsl #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #-1
	bl	_ib_process_cq_direct
	ldrsw	x8, [x21]
	mul	x8, x8, x22
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
	mov	x0, x19
	bl	_wait_for_completion_timeout
	cmp	x0, #1
	b.lt	LBB0_3
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x22, x2
	ldr	x8, [x2, #8]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX5_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.6:
	mov	x0, x20
	bl	_to_mcq
	mov	x21, x0
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w8, [x21]
	cbz	w8, LBB0_10
; %bb.7:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.8:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.9:
	add	x20, x20, #8
	mov	x0, x20
	bl	_irq_poll_disable
	mov	x0, x20
	bl	_irq_poll_enable
	b	LBB0_13
LBB0_10:
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	b	LBB0_13
LBB0_11:
	add	x0, x20, #4
	bl	_cancel_work_sync
	b	LBB0_13
LBB0_12:
	mov	w0, #1
	bl	_WARN_ON_ONCE
LBB0_13:
	ldr	x8, [x21, #8]
	mov	x0, x21
	mov	x1, #0
	blr	x8
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wait_for_completion
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_POLL_DIRECT,4,2             ; @IB_POLL_DIRECT
	.comm	_HZ,4,2                         ; @HZ
	.comm	_MLX5_DEVICE_STATE_INTERNAL_ERROR,8,3 ; @MLX5_DEVICE_STATE_INTERNAL_ERROR
	.no_dead_strip	_handle_drain_completion
.subsections_via_symbols
