	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_sqs
_check_sqs:                             ## @check_sqs
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_5
## %bb.1:
	movq	%rdi, %r12
	movl	$16, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %r15
	leaq	(%r15,%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	-4(%r15,%r13), %edi
	leaq	-52(%rbp), %rsi
	callq	_ehea_get_swqe
	movq	%rax, %rbx
	movq	_SWQE_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_dec
	movl	4(%rbx), %eax
	movq	_EHEA_SWQE_PURGE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SWQE_RESTART_CHECK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	movq	_EHEA_SWQE_SIGNALLED_COMPLETION@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_EHEA_SWQE_IMM_DATA_PRESENT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
	movl	$80, (%rbx)
	movl	-4(%r15,%r13), %edi
	movq	%rbx, %rsi
	callq	_ehea_post_swqe
	movl	4(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	cmpq	$0, -16(%r15,%r13)
	sete	%bl
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	(%r12), %rax
	addq	$24, %r13
	cmpq	%rax, %r14
	jl	LBB0_2
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	-8(%r15,%r13), %edi
	callq	_ehea_schedule_port_reset
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWQE_HEADER_SIZE,4,2           ## @SWQE_HEADER_SIZE
	.comm	_EHEA_SWQE_PURGE,4,2            ## @EHEA_SWQE_PURGE
	.comm	_SWQE_RESTART_CHECK,4,2         ## @SWQE_RESTART_CHECK
	.comm	_EHEA_SWQE_SIGNALLED_COMPLETION,4,2 ## @EHEA_SWQE_SIGNALLED_COMPLETION
	.comm	_EHEA_SWQE_IMM_DATA_PRESENT,4,2 ## @EHEA_SWQE_IMM_DATA_PRESENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW/SW queues out of sync\n"

	.no_dead_strip	_check_sqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_sqs
_check_sqs:                             ; @check_sqs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	x23, #0
Lloh0:
	adrp	x26, _SWQE_RESTART_CHECK@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SWQE_RESTART_CHECK@GOTPAGEOFF]
Lloh2:
	adrp	x27, _EHEA_SWQE_SIGNALLED_COMPLETION@GOTPAGE
Lloh3:
	ldr	x27, [x27, _EHEA_SWQE_SIGNALLED_COMPLETION@GOTPAGEOFF]
	mov	w28, #80
Lloh4:
	adrp	x24, _EHEA_SWQE_IMM_DATA_PRESENT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _EHEA_SWQE_IMM_DATA_PRESENT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x25, x8, x22
	ldr	w0, [x25, #12]
	add	x1, sp, #12
	bl	_ehea_get_swqe
	mov	x20, x0
Lloh6:
	adrp	x8, _SWQE_HEADER_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SWQE_HEADER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	add	x0, x25, #16
	bl	_atomic_dec
Lloh9:
	adrp	x8, _EHEA_SWQE_PURGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EHEA_SWQE_PURGE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	ldr	w10, [x26]
	ldr	w9, [x27]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w8, w9, w8
	stp	w8, w10, [x20, #4]
	str	w28, [x20]
	ldr	w0, [x25, #12]
	mov	x1, x20
	bl	_ehea_post_swqe
	ldr	w20, [x19, #4]
	ldr	x8, [x25]
	cmp	x8, #0
	cset	w21, eq
	mov	w0, #100
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wait_event_timeout
	cbz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	add	x22, x22, #24
	cmp	x23, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	w0, [x25, #8]
	bl	_ehea_schedule_port_reset
LBB0_5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SWQE_HEADER_SIZE,4,2           ; @SWQE_HEADER_SIZE
	.comm	_EHEA_SWQE_PURGE,4,2            ; @EHEA_SWQE_PURGE
	.comm	_SWQE_RESTART_CHECK,4,2         ; @SWQE_RESTART_CHECK
	.comm	_EHEA_SWQE_SIGNALLED_COMPLETION,4,2 ; @EHEA_SWQE_SIGNALLED_COMPLETION
	.comm	_EHEA_SWQE_IMM_DATA_PRESENT,4,2 ; @EHEA_SWQE_IMM_DATA_PRESENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW/SW queues out of sync\n"

	.no_dead_strip	_check_sqs
.subsections_via_symbols
