	.file	"extr_cache.c_cache_save_state.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cache_save_state
	.type	cache_save_state, @function
cache_save_state:
.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
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	add	rbp, 1
.L2:
	mov	rdi, QWORD PTR g_bmpcache[rip]
	call	NUM_ELEMENTS@PLT
	cmp	rax, rbp
	jbe	.L13
	mov	rdi, rbp
	call	IS_PERSISTENT@PLT
	test	rax, rax
	je	.L3
	mov	rdi, rbp
	call	DEBUG_RDP5@PLT
	mov	rax, QWORD PTR g_bmpcache_lru[rip]
	movsx	rbx, DWORD PTR [rax+rbp*4]
	test	ebx, ebx
	js	.L4
	lea	r13, 0[0+rbp*8]
	.p2align 4,,10
	.p2align 3
.L5:
	add	r12, 1
	mov	esi, ebx
	mov	rdi, rbp
	mov	rdx, r12
	call	pstcache_touch_bitmap@PLT
	mov	rax, QWORD PTR g_bmpcache[rip]
	mov	rax, QWORD PTR [rax+r13]
	movsx	rbx, DWORD PTR [rax+rbx*4]
	test	ebx, ebx
	jns	.L5
.L4:
	mov	rdi, r12
	call	DEBUG_RDP5@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	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	cache_save_state, .-cache_save_state
	.comm	g_bmpcache_lru,8,8
	.comm	g_bmpcache,8,8
	.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_cache.c_cache_save_state.c"
	.text
	.align	2
	.global	cache_save_state
	.syntax unified
	.arm
	.fpu softvfp
	.type	cache_save_state, %function
cache_save_state:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, #0
	ldr	r7, .L14
	mov	r4, r6
	ldr	r8, .L14+4
	b	.L2
.L3:
	add	r4, r4, #1
.L2:
	ldr	r0, [r7]
	bl	NUM_ELEMENTS
	cmp	r0, r4
	popls	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, r4
	bl	IS_PERSISTENT
	cmp	r0, #0
	beq	.L3
	mov	r0, r4
	bl	DEBUG_RDP5
	ldr	r3, [r8]
	lsl	r9, r4, #2
	ldr	r5, [r3, r4, lsl #2]
	cmp	r5, #0
	blt	.L4
.L5:
	add	r6, r6, #1
	mov	r1, r5
	mov	r2, r6
	mov	r0, r4
	bl	pstcache_touch_bitmap
	ldr	r3, [r7]
	ldr	r3, [r3, r9]
	ldr	r5, [r3, r5, lsl #2]
	cmp	r5, #0
	bge	.L5
.L4:
	mov	r0, r6
	bl	DEBUG_RDP5
	b	.L3
.L15:
	.align	2
.L14:
	.word	g_bmpcache
	.word	g_bmpcache_lru
	.size	cache_save_state, .-cache_save_state
	.comm	g_bmpcache_lru,4,4
	.comm	g_bmpcache,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
