	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qat_hal_wait_cycles
_qat_hal_wait_cycles:                   ## @qat_hal_wait_cycles
	.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
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_ACS_ABO_BITPOS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_MAX_RETRY_TIMES@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_PROFILE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_qat_hal_rd_ae_csr
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.1:
	movl	%r13d, %ecx
	movl	$1, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movl	%r15d, %ecx
	movzwl	%ax, %r15d
	movzbl	%cl, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	subl	$1, %r14d
	jb	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ACTIVE_CTX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movl	%eax, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_PROFILE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_qat_hal_rd_ae_csr
	movzwl	%ax, %ecx
	subl	%r15d, %ecx
	leal	65536(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	cmpl	$8, %eax
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ACS_ABO_BITPOS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %r13d
	jb	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jns	LBB0_11
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACS_ABO_BITPOS,4,2             ## @ACS_ABO_BITPOS
	.comm	_MAX_RETRY_TIMES,4,2            ## @MAX_RETRY_TIMES
	.comm	_PROFILE_COUNT,4,2              ## @PROFILE_COUNT
	.comm	_ACTIVE_CTX_STATUS,4,2          ## @ACTIVE_CTX_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: wait_num_cycles time out\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_qat_hal_wait_cycles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qat_hal_wait_cycles
_qat_hal_wait_cycles:                   ; @qat_hal_wait_cycles
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x25, _ACS_ABO_BITPOS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ACS_ABO_BITPOS@GOTPAGEOFF]
	ldr	w23, [x25]
Lloh2:
	adrp	x8, _MAX_RETRY_TIMES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_RETRY_TIMES@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
Lloh5:
	adrp	x26, _PROFILE_COUNT@GOTPAGE
Lloh6:
	ldr	x26, [x26, _PROFILE_COUNT@GOTPAGEOFF]
	ldr	w2, [x26]
	bl	_qat_hal_rd_ae_csr
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.1:
	and	w27, w0, #0xffff
	mov	w8, #1
	lsl	w23, w8, w23
Lloh7:
	adrp	x28, _ACTIVE_CTX_STATUS@GOTPAGE
Lloh8:
	ldr	x28, [x28, _ACTIVE_CTX_STATUS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w24, w24, #1
	cmp	w8, w20
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w24, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w19, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x28]
	mov	x0, x22
	mov	x1, x21
	bl	_qat_hal_rd_ae_csr
	mov	x23, x0
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x26]
	mov	x0, x22
	mov	x1, x21
	bl	_qat_hal_rd_ae_csr
	and	w8, w0, #0xffff
	sub	w8, w8, w27
	add	w9, w8, #16, lsl #12            ; =65536
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w8, #8
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x25]
	lsr	w9, w23, w9
	tbnz	w9, #0, LBB0_2
	b	LBB0_9
LBB0_8:
	tbnz	w24, #31, LBB0_10
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ACS_ABO_BITPOS,4,2             ; @ACS_ABO_BITPOS
	.comm	_MAX_RETRY_TIMES,4,2            ; @MAX_RETRY_TIMES
	.comm	_PROFILE_COUNT,4,2              ; @PROFILE_COUNT
	.comm	_ACTIVE_CTX_STATUS,4,2          ; @ACTIVE_CTX_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: wait_num_cycles time out\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_qat_hal_wait_cycles
.subsections_via_symbols
