	.file	"extr_mmu.c_kvm_mmu_free_roots.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kvm_mmu_free_roots
	.type	kvm_mmu_free_roots, @function
kvm_mmu_free_roots:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR invalid_list[rip]
	call	LIST_HEAD@PLT
	mov	ebx, DWORD PTR KVM_MMU_ROOT_CURRENT[rip]
	xor	edi, edi
	mov	eax, DWORD PTR BITS_PER_LONG[rip]
	and	ebx, r12d
	cmp	DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip], eax
	setge	dil
	mov	DWORD PTR 12[rsp], ebx
	call	BUILD_BUG_ON@PLT
	test	ebx, ebx
	jne	.L2
.L5:
	mov	eax, DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip]
	xor	r15d, r15d
	xor	ebx, ebx
	test	eax, eax
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip]
	add	r15, 1
	lea	ebx, 1[rbp]
	cmp	eax, r15d
	jle	.L4
.L3:
	mov	edi, r15d
	mov	ebp, r15d
	mov	ebx, r15d
	call	KVM_MMU_ROOT_PREVIOUS@PLT
	test	eax, r12d
	je	.L7
	mov	rax, QWORD PTR 48[r13]
	mov	rdi, QWORD PTR [rax+r15*8]
	call	VALID_PAGE@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip]
.L4:
	cmp	eax, ebx
	je	.L1
	mov	rdi, QWORD PTR [r14]
	call	spin_lock@PLT
	mov	ecx, DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip]
	test	ecx, ecx
	jle	.L14
.L9:
	xor	ebx, ebx
	lea	rbp, invalid_list[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	add	rbx, 1
	cmp	DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip], ebx
	jle	.L14
.L13:
	mov	edi, ebx
	call	KVM_MMU_ROOT_PREVIOUS@PLT
	test	eax, r12d
	je	.L12
	mov	rax, QWORD PTR 48[r13]
	mov	rdi, QWORD PTR [r14]
	mov	rdx, rbp
	lea	rsi, [rax+rbx*8]
	add	rbx, 1
	call	mmu_free_root_page@PLT
	cmp	DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip], ebx
	jg	.L13
.L14:
	mov	edx, DWORD PTR 12[rsp]
	test	edx, edx
	jne	.L10
.L11:
	mov	rdi, QWORD PTR [r14]
	lea	rsi, invalid_list[rip]
	call	kvm_mmu_commit_zap_page@PLT
	mov	rdi, QWORD PTR [r14]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	spin_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[r13]
	call	VALID_PAGE@PLT
	test	rax, rax
	je	.L5
	mov	rdi, QWORD PTR [r14]
	call	spin_lock@PLT
	mov	eax, DWORD PTR KVM_MMU_NUM_PREV_ROOTS[rip]
	test	eax, eax
	jg	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR PT64_ROOT_4LEVEL[rip]
	cmp	QWORD PTR 8[r13], rax
	jl	.L22
	cmp	rax, QWORD PTR 16[r13]
	jle	.L16
	cmp	QWORD PTR 40[r13], 0
	je	.L22
.L16:
	mov	rdi, QWORD PTR [r14]
	lea	rdx, invalid_list[rip]
	mov	rsi, r13
	call	mmu_free_root_page@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L22:
	xor	ebx, ebx
	lea	rbp, invalid_list[rip]
.L19:
	mov	rsi, QWORD PTR 24[r13]
	add	rsi, rbx
	cmp	QWORD PTR [rsi], 0
	jne	.L42
.L18:
	add	rbx, 8
	cmp	rbx, 32
	jne	.L19
	mov	rax, QWORD PTR INVALID_PAGE[rip]
	mov	QWORD PTR 0[r13], rax
.L17:
	mov	QWORD PTR 32[r13], 0
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rdi, QWORD PTR [r14]
	mov	rdx, rbp
	call	mmu_free_root_page@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	kvm_mmu_free_roots, .-kvm_mmu_free_roots
	.comm	invalid_list,4,4
	.comm	PT64_ROOT_4LEVEL,8,8
	.comm	KVM_MMU_ROOT_CURRENT,4,4
	.comm	KVM_MMU_NUM_PREV_ROOTS,4,4
	.comm	INVALID_PAGE,8,8
	.comm	BITS_PER_LONG,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_mmu.c_kvm_mmu_free_roots.c"
	.text
	.align	2
	.global	kvm_mmu_free_roots
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvm_mmu_free_roots, %function
kvm_mmu_free_roots:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r2
	ldr	r3, .L45
	mov	r8, r0
	ldr	r0, [r3]
	mov	r7, r1
	ldr	r6, .L45+4
	bl	LIST_HEAD
	ldr	r3, .L45+8
	ldr	r2, .L45+12
	ldr	r0, [r6]
	ldr	r3, [r3]
	ldr	r9, [r2]
	cmp	r0, r3
	movlt	r0, #0
	movge	r0, #1
	and	r9, r9, r5
	bl	BUILD_BUG_ON
	cmp	r9, #0
	bne	.L2
.L5:
	ldr	r3, [r6]
	mov	r4, #0
	cmp	r3, #0
	bgt	.L3
	b	.L4
.L7:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L4
.L3:
	mov	r0, r4
	bl	KVM_MMU_ROOT_PREVIOUS
	tst	r0, r5
	beq	.L7
	ldr	r3, [r7, #24]
	ldr	r0, [r3, r4, lsl #2]
	bl	VALID_PAGE
	cmp	r0, #0
	beq	.L7
	ldr	r3, [r6]
.L4:
	cmp	r3, r4
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r0, [r8]
	bl	spin_lock
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L14
.L9:
	mov	r4, #0
	ldr	r10, .L45
	b	.L13
.L12:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L14
.L13:
	mov	r0, r4
	bl	KVM_MMU_ROOT_PREVIOUS
	tst	r0, r5
	beq	.L12
	ldr	r1, [r7, #24]
	mov	r2, r10
	add	r1, r1, r4, lsl #2
	ldr	r0, [r8]
	bl	mmu_free_root_page
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L13
.L14:
	cmp	r9, #0
	bne	.L10
.L11:
	ldr	r0, [r8]
	ldr	r1, .L45
	bl	kvm_mmu_commit_zap_page
	ldr	r0, [r8]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	spin_unlock
.L2:
	ldr	r0, [r7]
	bl	VALID_PAGE
	cmp	r0, #0
	beq	.L5
	ldr	r0, [r8]
	bl	spin_lock
	ldr	r3, [r6]
	cmp	r3, #0
	bgt	.L9
.L10:
	ldr	r3, .L45+16
	ldr	r2, [r7, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L21
	ldr	r2, [r7, #8]
	cmp	r3, r2
	ble	.L16
	ldr	r4, [r7, #20]
	cmp	r4, #0
	beq	.L15
.L16:
	mov	r1, r7
	ldr	r2, .L45
	ldr	r0, [r8]
	bl	mmu_free_root_page
	b	.L17
.L21:
	mov	r4, #0
.L15:
	ldr	r5, .L45
.L19:
	ldr	r1, [r7, #12]
	ldr	r3, [r1, r4]
	add	r1, r1, r4
	cmp	r3, #0
	add	r4, r4, #4
	bne	.L44
.L18:
	cmp	r4, #16
	bne	.L19
	ldr	r3, .L45+20
	ldr	r3, [r3]
	str	r3, [r7]
.L17:
	mov	r3, #0
	str	r3, [r7, #16]
	b	.L11
.L44:
	mov	r2, r5
	ldr	r0, [r8]
	bl	mmu_free_root_page
	b	.L18
.L46:
	.align	2
.L45:
	.word	invalid_list
	.word	KVM_MMU_NUM_PREV_ROOTS
	.word	BITS_PER_LONG
	.word	KVM_MMU_ROOT_CURRENT
	.word	PT64_ROOT_4LEVEL
	.word	INVALID_PAGE
	.size	kvm_mmu_free_roots, .-kvm_mmu_free_roots
	.comm	invalid_list,4,4
	.comm	PT64_ROOT_4LEVEL,4,4
	.comm	KVM_MMU_ROOT_CURRENT,4,4
	.comm	KVM_MMU_NUM_PREV_ROOTS,4,4
	.comm	INVALID_PAGE,4,4
	.comm	BITS_PER_LONG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
