	.file	"extr_hisi_sas_v3_hw.c_clear_itct_v3_hw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clear_itct_v3_hw, @function
clear_itct_v3_hw:
.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	r12, rsi
	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
	mov	edi, DWORD PTR completion[rip]
	call	DECLARE_COMPLETION_ONSTACK@PLT
	mov	rbx, QWORD PTR [r12]
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	esi, DWORD PTR ENT_INT_SRC3[rip]
	lea	r13, [rax+rbx*4]
	call	hisi_sas_read32@PLT
	mov	edx, DWORD PTR ENT_INT_SRC3_ITC_INT_MSK[rip]
	lea	rcx, completion[rip]
	mov	QWORD PTR 8[r12], rcx
	test	edx, eax
	jne	.L8
.L2:
	mov	edx, DWORD PTR ITCT_DEV_MSK[rip]
	mov	esi, DWORD PTR ITCT_CLR[rip]
	mov	rdi, rbp
	and	edx, ebx
	or	edx, DWORD PTR ITCT_CLR_EN_MSK[rip]
	call	hisi_sas_write32@PLT
	mov	rdi, QWORD PTR 8[r12]
	call	wait_for_completion@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r13
	xor	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	edx, 4
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	memset@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	esi, DWORD PTR ENT_INT_SRC3[rip]
	mov	rdi, rbp
	call	hisi_sas_write32@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	clear_itct_v3_hw, .-clear_itct_v3_hw
	.comm	completion,4,4
	.comm	ITCT_DEV_MSK,8,8
	.comm	ITCT_CLR_EN_MSK,8,8
	.comm	ITCT_CLR,4,4
	.comm	ENT_INT_SRC3_ITC_INT_MSK,4,4
	.comm	ENT_INT_SRC3,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_hisi_sas_v3_hw.c_clear_itct_v3_hw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_itct_v3_hw, %function
clear_itct_v3_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	mov	r5, r1
	ldr	r6, .L9
	ldr	r9, .L9+4
	ldr	r0, [r6]
	bl	DECLARE_COMPLETION_ONSTACK
	mov	r0, r4
	ldr	r1, [r9]
	ldr	r7, [r5]
	ldr	r8, [r4]
	bl	hisi_sas_read32
	ldr	r3, .L9+8
	str	r6, [r5, #4]
	ldr	r2, [r3]
	add	r6, r8, r7, lsl #2
	tst	r2, r0
	bne	.L8
.L2:
	ldr	r3, .L9+12
	ldr	r2, .L9+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L9+20
	and	r3, r3, r7
	orr	r2, r3, r2
	ldr	r1, [r1]
	mov	r0, r4
	bl	hisi_sas_write32
	ldr	r0, [r5, #4]
	bl	wait_for_completion
	mov	r3, #0
	strb	r3, [r8, r7, lsl #2]
	strb	r3, [r6, #1]
	strb	r3, [r6, #2]
	strb	r3, [r6, #3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	mov	r0, r4
	ldr	r1, [r9]
	bl	hisi_sas_write32
	b	.L2
.L10:
	.align	2
.L9:
	.word	completion
	.word	ENT_INT_SRC3
	.word	ENT_INT_SRC3_ITC_INT_MSK
	.word	ITCT_DEV_MSK
	.word	ITCT_CLR_EN_MSK
	.word	ITCT_CLR
	.size	clear_itct_v3_hw, .-clear_itct_v3_hw
	.comm	completion,4,4
	.comm	ITCT_DEV_MSK,4,4
	.comm	ITCT_CLR_EN_MSK,4,4
	.comm	ITCT_CLR,4,4
	.comm	ENT_INT_SRC3_ITC_INT_MSK,4,4
	.comm	ENT_INT_SRC3,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
