	.file	"extr_c4.c_c4_reset_ctr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	c4_reset_ctr, @function
c4_reset_ctr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	rsi, r13
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR [rdi]
	mov	r12, QWORD PTR 8[rax]
	lea	rbp, 24[r12]
	mov	rdi, rbp
	call	spin_lock_irqsave@PLT
	mov	rdi, r12
	call	c4_reset@PLT
	mov	rsi, r13
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	cmp	QWORD PTR [r12], 0
	je	.L2
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rbp, rbx
	mov	edx, 4
	xor	esi, esi
	add	rbx, 1
	sal	rbp, 4
	add	rbp, QWORD PTR 16[r12]
	mov	edi, DWORD PTR 4[rbp]
	call	memset@PLT
	mov	rdi, rbp
	call	capi_ctr_down@PLT
	cmp	QWORD PTR [r12], rbx
	ja	.L3
.L2:
	mov	QWORD PTR 8[r12], 0
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	c4_reset_ctr, .-c4_reset_ctr
	.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_c4.c_c4_reset_ctr.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	c4_reset_ctr, %function
c4_reset_ctr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, #0
	ldr	r3, [r0]
	mov	r1, r5
	ldr	r7, [r3, #8]
	add	r4, r7, #12
	mov	r0, r4
	bl	spin_lock_irqsave
	mov	r0, r7
	bl	c4_reset
	mov	r1, r5
	mov	r0, r4
	bl	spin_unlock_irqrestore
	ldr	r3, [r7]
	cmp	r3, r5
	beq	.L2
	mov	r6, r5
.L3:
	ldr	r4, [r7, #8]
	mov	r2, #4
	add	r4, r4, r5
	mov	r1, #0
	ldr	r0, [r4, #4]
	bl	memset
	mov	r0, r4
	bl	capi_ctr_down
	ldr	r3, [r7]
	add	r6, r6, #1
	cmp	r3, r6
	add	r5, r5, #12
	bhi	.L3
.L2:
	mov	r3, #0
	str	r3, [r7, #4]
	pop	{r4, r5, r6, r7, r8, pc}
	.size	c4_reset_ctr, .-c4_reset_ctr
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
