	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ena_com_wait_and_process_admin_cq_interrupts
_ena_com_wait_and_process_admin_cq_interrupts: ## @ena_com_wait_and_process_admin_cq_interrupts
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	16(%rdi), %rbx
	movl	24(%rsi), %edi
	callq	_usecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	movq	(%r14), %rax
	movq	_ENA_CMD_SUBMITTED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_ena_com_handle_admin_completion
	incl	20(%r15)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	(%r14), %rdx
	movq	_ENA_CMD_COMPLETED@GOTPCREL(%rip), %rax
	movl	12(%r14), %esi
	cmpq	(%rax), %rdx
	je	LBB0_2
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_5
LBB0_2:
	cmpq	$0, 8(%r15)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.3:
	movl	$1, (%r15)
LBB0_5:
	cmpl	$0, (%r15)
	je	LBB0_6
LBB0_7:
	movl	8(%r14), %edi
	callq	_ena_com_comp_status_to_errno
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_6:
	movl	$0, 4(%r15)
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_comp_ctxt_release
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENA_CMD_SUBMITTED,8,3          ## @ENA_CMD_SUBMITTED
	.comm	_ENA_CMD_COMPLETED,8,3          ## @ENA_CMD_COMPLETED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d), autopolling mode is %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"ON"

L_.str.2:                               ## @.str.2
	.asciz	"OFF"

L_.str.3:                               ## @.str.3
	.asciz	"The ena device doesn't send a completion for the admin cmd %d status %d\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_ena_com_wait_and_process_admin_cq_interrupts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ena_com_wait_and_process_admin_cq_interrupts
_ena_com_wait_and_process_admin_cq_interrupts: ; @ena_com_wait_and_process_admin_cq_interrupts
	.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
	add	x21, x0, #16
	ldr	w0, [x1, #24]
	bl	_usecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_wait_for_completion_timeout
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _ENA_CMD_SUBMITTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENA_CMD_SUBMITTED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.1:
	add	x21, x20, #16
	mov	x0, x21
	mov	x1, #0
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_ena_com_handle_admin_completion
	ldr	w8, [x20, #20]
	add	w8, w8, #1
	str	w8, [x20, #20]
	mov	x0, x21
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	ldr	x2, [x19]
Lloh3:
	adrp	x8, _ENA_CMD_COMPLETED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENA_CMD_COMPLETED@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w1, [x19, #12]
	cmp	x2, x8
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, l_.str.1@PAGE
Lloh9:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh10:
	adrp	x10, l_.str.2@PAGE
Lloh11:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x2, x10, x9, eq
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x20]
LBB0_5:
	ldr	w8, [x20]
	cbz	w8, LBB0_7
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_ena_com_comp_status_to_errno
	mov	x21, x0
	b	LBB0_8
LBB0_7:
	str	wzr, [x20, #4]
Lloh14:
	adrp	x8, _ETIME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_comp_ctxt_release
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENA_CMD_SUBMITTED,8,3          ; @ENA_CMD_SUBMITTED
	.comm	_ENA_CMD_COMPLETED,8,3          ; @ENA_CMD_COMPLETED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d), autopolling mode is %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"ON"

l_.str.2:                               ; @.str.2
	.asciz	"OFF"

l_.str.3:                               ; @.str.3
	.asciz	"The ena device doesn't send a completion for the admin cmd %d status %d\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_ena_com_wait_and_process_admin_cq_interrupts
.subsections_via_symbols
