	.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_polling
_ena_com_wait_and_process_admin_cq_polling: ## @ena_com_wait_and_process_admin_cq_polling
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	16(%rsi), %edi
	callq	_usecs_to_jiffies
	movq	%rax, %r12
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_ena_com_handle_admin_completion
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	_ENA_CMD_SUBMITTED@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_5
## %bb.1:
	addq	%r14, %r12
	movq	_ENA_POLL_MS@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_time_is_before_jiffies
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	callq	_msleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_ena_com_handle_admin_completion
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	(%r13), %rax
	je	LBB0_2
LBB0_5:
	movq	_ENA_CMD_ABORTED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	incl	8(%r15)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	incl	12(%r15)
	movl	$0, (%r15)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	_ETIME@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_7:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdx
	movq	_ENA_CMD_COMPLETED@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rdx
	setne	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_WARN
	movl	8(%rbx), %edi
	callq	_ena_com_comp_status_to_errno
	movl	%eax, %r12d
LBB0_8:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_comp_ctxt_release
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_ENA_CMD_SUBMITTED,8,3          ## @ENA_CMD_SUBMITTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for completion (polling) timeout\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_ENA_POLL_MS,4,2                ## @ENA_POLL_MS
	.comm	_ENA_CMD_ABORTED,8,3            ## @ENA_CMD_ABORTED
L_.str.1:                               ## @.str.1
	.asciz	"Command was aborted\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENA_CMD_COMPLETED,8,3          ## @ENA_CMD_COMPLETED
L_.str.2:                               ## @.str.2
	.asciz	"Invalid comp status %d\n"

	.no_dead_strip	_ena_com_wait_and_process_admin_cq_polling
.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_polling
_ena_com_wait_and_process_admin_cq_polling: ; @ena_com_wait_and_process_admin_cq_polling
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	ldr	w0, [x1, #16]
	bl	_usecs_to_jiffies
	mov	x22, x0
	add	x21, x20, #4
	mov	x0, x21
	mov	x1, #0
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_ena_com_handle_admin_completion
	mov	x0, x21
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19]
Lloh3:
	adrp	x23, _ENA_CMD_SUBMITTED@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ENA_CMD_SUBMITTED@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	add	x22, x22, x24
Lloh5:
	adrp	x24, _ENA_POLL_MS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _ENA_POLL_MS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_time_is_before_jiffies
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x24]
	bl	_msleep
	mov	x0, x21
	mov	x1, #0
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_ena_com_handle_admin_completion
	mov	x0, x21
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_4:
Lloh7:
	adrp	x9, _ENA_CMD_ABORTED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ENA_CMD_ABORTED@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.5:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	x0, x21
	mov	x1, #0
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	mov	x0, x21
	mov	x1, #0
	bl	_spin_unlock_irqrestore
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	mov	x0, x21
	mov	x1, #0
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
	str	wzr, [x20]
	mov	x0, x21
	mov	x1, #0
	bl	_spin_unlock_irqrestore
Lloh16:
	adrp	x8, _ETIME@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_8:
	ldr	x2, [x19]
Lloh18:
	adrp	x8, _ENA_CMD_COMPLETED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENA_CMD_COMPLETED@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x2, x8
	cset	w0, ne
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_WARN
	ldr	w0, [x19, #8]
	bl	_ena_com_comp_status_to_errno
	mov	x21, x0
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_comp_ctxt_release
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_ENA_CMD_SUBMITTED,8,3          ; @ENA_CMD_SUBMITTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for completion (polling) timeout\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_ENA_POLL_MS,4,2                ; @ENA_POLL_MS
	.comm	_ENA_CMD_ABORTED,8,3            ; @ENA_CMD_ABORTED
l_.str.1:                               ; @.str.1
	.asciz	"Command was aborted\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENA_CMD_COMPLETED,8,3          ; @ENA_CMD_COMPLETED
l_.str.2:                               ; @.str.2
	.asciz	"Invalid comp status %d\n"

	.no_dead_strip	_ena_com_wait_and_process_admin_cq_polling
.subsections_via_symbols
