	.file	"extr_qat_hal.c_qat_hal_start.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"QAT: start error (AE 0x%x FCU_STS = 0x%x)\n"
	.text
	.p2align 4
	.globl	qat_hal_start
	.type	qat_hal_start, @function
qat_hal_start:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR [rdi], 0
	je	.L2
	mov	edx, DWORD PTR FCU_CTRL_CMD_START[rip]
	mov	esi, DWORD PTR FCU_CONTROL[rip]
	xor	ebx, ebx
	call	SET_CAP_CSR@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	DWORD PTR FW_AUTH_MAX_RETRY[rip], ebx
	lea	edx, 1[rbx]
	jle	.L8
	mov	ebx, edx
.L4:
	mov	edi, DWORD PTR FW_AUTH_WAIT_PERIOD[rip]
	call	msleep@PLT
	mov	esi, DWORD PTR FCU_STATUS[rip]
	mov	rdi, rbp
	call	GET_CAP_CSR@PLT
	mov	edx, DWORD PTR FCU_STS_DONE_POS[rip]
	bt	eax, edx
	jnc	.L9
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movzx	r12d, sil
	mov	r13d, edx
	mov	ecx, 65536
	not	edx
	mov	esi, r12d
	and	edx, DWORD PTR ICP_QAT_UCLO_AE_ALL_CTX[rip]
	call	qat_hal_put_wakeup_event@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edx, r13d
	mov	esi, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	qat_hal_enable_ctx@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	movzx	esi, r12b
	mov	edx, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	lea	rdi, .LC0[rip]
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	pr_err@PLT
	.cfi_endproc
.LFE0:
	.size	qat_hal_start, .-qat_hal_start
	.comm	ICP_QAT_UCLO_AE_ALL_CTX,4,4
	.comm	FW_AUTH_WAIT_PERIOD,4,4
	.comm	FW_AUTH_MAX_RETRY,4,4
	.comm	FCU_STS_DONE_POS,4,4
	.comm	FCU_STATUS,4,4
	.comm	FCU_CTRL_CMD_START,4,4
	.comm	FCU_CONTROL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_qat_hal.c_qat_hal_start.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"QAT: start error (AE 0x%x FCU_STS = 0x%x)\012\000"
	.text
	.align	2
	.global	qat_hal_start
	.syntax unified
	.arm
	.fpu softvfp
	.type	qat_hal_start, %function
qat_hal_start:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	cmp	r3, #0
	mov	r4, r0
	mov	r8, r1
	beq	.L2
	ldr	r3, .L8
	ldr	r2, .L8+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	bl	SET_CAP_CSR
	mov	r9, #0
	ldr	r6, .L8+8
	ldr	r5, .L8+12
	ldr	r10, .L8+16
	ldr	r7, .L8+20
	b	.L4
.L5:
	mov	r9, r2
.L4:
	ldr	r0, [r6]
	bl	msleep
	mov	r0, r4
	ldr	r1, [r5]
	bl	GET_CAP_CSR
	ldr	r3, [r10]
	add	r2, r9, #1
	lsr	r3, r0, r3
	tst	r3, #1
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, [r7]
	cmp	r3, r9
	bgt	.L5
	mov	r2, r0
	mov	r1, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, .L8+24
	b	pr_err
.L2:
	mov	r5, r2
	ldr	r2, .L8+28
	mov	r3, #65536
	ldr	r2, [r2]
	bic	r2, r2, r5
	bl	qat_hal_put_wakeup_event
	mov	r2, r5
	mov	r1, r8
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	qat_hal_enable_ctx
.L9:
	.align	2
.L8:
	.word	FCU_CONTROL
	.word	FCU_CTRL_CMD_START
	.word	FW_AUTH_WAIT_PERIOD
	.word	FCU_STATUS
	.word	FCU_STS_DONE_POS
	.word	FW_AUTH_MAX_RETRY
	.word	.LC0
	.word	ICP_QAT_UCLO_AE_ALL_CTX
	.size	qat_hal_start, .-qat_hal_start
	.comm	ICP_QAT_UCLO_AE_ALL_CTX,4,4
	.comm	FW_AUTH_WAIT_PERIOD,4,4
	.comm	FW_AUTH_MAX_RETRY,4,4
	.comm	FCU_STS_DONE_POS,4,4
	.comm	FCU_STATUS,4,4
	.comm	FCU_CTRL_CMD_START,4,4
	.comm	FCU_CONTROL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
