	.file	"extr_mmu.c_disallowed_hugepage_adjust.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	disallowed_hugepage_adjust, @function
disallowed_hugepage_adjust:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	ebp, DWORD PTR [r8]
	cmp	ebp, esi
	je	.L13
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	cmp	DWORD PTR PT_PAGE_TABLE_LEVEL[rip], ebp
	jge	.L1
	xor	eax, eax
	mov	QWORD PTR 24[rsp], r8
	mov	r12d, DWORD PTR [rdi]
	mov	QWORD PTR 16[rsp], rcx
	mov	DWORD PTR 12[rsp], edx
	call	is_nx_huge_page_enabled@PLT
	test	rax, rax
	je	.L1
	mov	edi, r12d
	call	is_shadow_present_pte@PLT
	test	rax, rax
	je	.L1
	mov	edi, r12d
	call	is_large_pte@PLT
	test	eax, eax
	jne	.L1
	mov	edi, ebp
	call	KVM_PAGES_PER_HPAGE@PLT
	lea	edi, -1[rbp]
	mov	r12d, eax
	call	KVM_PAGES_PER_HPAGE@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	rcx, QWORD PTR 16[rsp]
	mov	r8, QWORD PTR 24[rsp]
	sub	r12d, eax
	and	edx, r12d
	or	DWORD PTR [rcx], edx
	sub	DWORD PTR [r8], 1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	disallowed_hugepage_adjust, .-disallowed_hugepage_adjust
	.comm	PT_PAGE_TABLE_LEVEL,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_disallowed_hugepage_adjust.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	disallowed_hugepage_adjust, %function
disallowed_hugepage_adjust:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	sub	sp, sp, #8
	add	ip, sp, #8
	stmdb	ip, {r0, r1}
	ldr	r7, [sp, #32]
	ldr	r6, [sp, #4]
	ldr	r1, [r7]
	cmp	r6, r1
	beq	.L13
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r4, r3
	ldr	r3, .L14
	ldr	r3, [r3]
	cmp	r3, r6
	bge	.L1
	ldr	r3, [sp]
	mov	r5, r2
	ldr	r8, [r3]
	bl	is_nx_huge_page_enabled
	cmp	r0, #0
	beq	.L1
	mov	r0, r8
	bl	is_shadow_present_pte
	cmp	r0, #0
	beq	.L1
	mov	r0, r8
	bl	is_large_pte
	cmp	r0, #0
	bne	.L1
	mov	r0, r6
	bl	KVM_PAGES_PER_HPAGE
	mov	r3, r0
	sub	r0, r6, #1
	mov	r6, r3
	bl	KVM_PAGES_PER_HPAGE
	ldr	r3, [r4]
	sub	r2, r6, r0
	and	r2, r2, r5
	orr	r2, r3, r2
	str	r2, [r4]
	ldr	r3, [r7]
	sub	r3, r3, #1
	str	r3, [r7]
	b	.L1
.L15:
	.align	2
.L14:
	.word	PT_PAGE_TABLE_LEVEL
	.size	disallowed_hugepage_adjust, .-disallowed_hugepage_adjust
	.comm	PT_PAGE_TABLE_LEVEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
