	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_enable_completion_interrupt ## -- Begin function ql_enable_completion_interrupt
	.p2align	4, 0x90
_ql_enable_completion_interrupt:        ## @ql_enable_completion_interrupt
	.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	%rdi, %rbx
	movq	8(%rdi), %r15
	movslq	%esi, %r12
	movq	_QL_MSIX_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rsi
	callq	_test_bit
	testq	%rax, %rax
	setne	%al
	testl	%r12d, %r12d
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	_INTR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15,%r12,8), %edx
	movq	%rbx, %rdi
	callq	_ql_write32
	movq	_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ql_read32                      ## TAILCALL
LBB0_1:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	leaq	(%r15,%r12,8), %rdi
	addq	$4, %rdi
	callq	_atomic_dec_and_test
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_INTR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15,%r12,8), %edx
	movq	%rbx, %rdi
	callq	_ql_write32
	movq	_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ql_read32
	movl	%eax, %r14d
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QL_MSIX_ENABLED,4,2            ## @QL_MSIX_ENABLED
	.comm	_INTR_EN,4,2                    ## @INTR_EN
	.comm	_STS,4,2                        ## @STS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_enable_completion_interrupt ; -- Begin function ql_enable_completion_interrupt
	.p2align	2
_ql_enable_completion_interrupt:        ; @ql_enable_completion_interrupt
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	add	x21, x22, w1, sxtw #3
Lloh0:
	adrp	x8, _QL_MSIX_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QL_MSIX_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_bit
	cmp	w20, #0
	ccmp	x0, #0, #4, ne
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _INTR_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTR_EN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ql_write32
Lloh6:
	adrp	x8, _STS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	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	_ql_read32
LBB0_2:
	sxtw	x20, w20
	mov	x0, x19
	mov	x1, #0
	bl	_spin_lock_irqsave
	add	x8, x22, x20, lsl #3
	add	x0, x8, #4
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _INTR_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INTR_EN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ql_write32
Lloh12:
	adrp	x8, _STS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ql_read32
	mov	x20, x0
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_QL_MSIX_ENABLED,4,2            ; @QL_MSIX_ENABLED
	.comm	_INTR_EN,4,2                    ; @INTR_EN
	.comm	_STS,4,2                        ; @STS
.subsections_via_symbols
