	.file	"extr_book3s_64_mmu_hv.c_kvmppc_allocate_hpt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kvmppc_allocate_hpt
	.type	kvmppc_allocate_hpt, @function
kvmppc_allocate_hpt:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR PPC_MIN_HPT_ORDER[rip], rsi
	ja	.L17
	cmp	QWORD PTR PPC_MAX_HPT_ORDER[rip], rsi
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	jnb	.L3
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	r14d, 1
	mov	ecx, esi
	mov	r12, rdi
	sub	ecx, DWORD PTR PAGE_SHIFT[rip]
	mov	rdi, r14
	sal	rdi, cl
	call	kvm_alloc_hpt_cma@PLT
	mov	r13, rax
	test	rax, rax
	je	.L12
	mov	rdi, rax
	call	page_to_pfn@PLT
	mov	edi, eax
	call	pfn_to_kaddr@PLT
	mov	rdx, r14
	mov	ecx, ebx
	xor	esi, esi
	mov	rbp, rax
	sal	rdx, cl
	mov	rdi, rax
	call	memset@PLT
	test	rbp, rbp
	je	.L5
	lea	ecx, -4[rbx]
	mov	rdi, r14
	mov	esi, 4
	mov	r14d, 1
	sal	rdi, cl
	call	array_size@PLT
	mov	edi, eax
	call	vmalloc@PLT
	test	rax, rax
	je	.L21
.L8:
	mov	QWORD PTR 24[r12], rax
	xor	eax, eax
	mov	QWORD PTR [r12], rbx
	mov	QWORD PTR 8[r12], rbp
	mov	DWORD PTR 16[r12], r14d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xor	r14d, r14d
.L5:
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	mov	rsi, rbx
	or	edi, DWORD PTR __GFP_ZERO[rip]
	sub	rsi, QWORD PTR PAGE_SHIFT[rip]
	or	edi, DWORD PTR __GFP_RETRY_MAYFAIL[rip]
	or	edi, DWORD PTR __GFP_NOWARN[rip]
	call	__get_free_pages@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L7
.L10:
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	lea	ecx, -4[rbx]
	mov	edi, 1
	mov	esi, 4
	sal	rdi, cl
	call	array_size@PLT
	mov	edi, eax
	call	vmalloc@PLT
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR PAGE_SHIFT[rip]
	test	r14d, r14d
	jne	.L11
	sub	rbx, rax
	mov	rdi, rbp
	mov	rsi, rbx
	call	free_pages@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rax, QWORD PTR PAGE_SHIFT[rip]
.L11:
	mov	ecx, ebx
	mov	rdi, r13
	sub	ecx, eax
	mov	eax, 1
	sal	eax, cl
	mov	esi, eax
	call	kvm_free_hpt_cma@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	kvmppc_allocate_hpt, .-kvmppc_allocate_hpt
	.comm	__GFP_ZERO,4,4
	.comm	__GFP_RETRY_MAYFAIL,4,4
	.comm	__GFP_NOWARN,4,4
	.comm	PPC_MIN_HPT_ORDER,8,8
	.comm	PPC_MAX_HPT_ORDER,8,8
	.comm	PAGE_SHIFT,8,8
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_book3s_64_mmu_hv.c_kvmppc_allocate_hpt.c"
	.text
	.align	2
	.global	kvmppc_allocate_hpt
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvmppc_allocate_hpt, %function
kvmppc_allocate_hpt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L21
	ldr	r3, [r3]
	cmp	r3, r1
	bhi	.L17
	ldr	r3, .L21+4
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r3]
	mov	r4, r1
	cmp	r3, r1
	bcs	.L3
	ldr	r3, .L21+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	mov	r7, #1
	ldr	r9, .L21+12
	mov	r5, r0
	ldr	r0, [r9]
	sub	r0, r1, r0
	lsl	r0, r7, r0
	bl	kvm_alloc_hpt_cma
	subs	r8, r0, #0
	beq	.L12
	bl	page_to_pfn
	bl	pfn_to_kaddr
	mov	r6, r0
	mov	r1, #0
	lsl	r2, r7, r4
	bl	memset
	cmp	r6, #0
	beq	.L5
	sub	r0, r4, #4
	mov	r1, #4
	lsl	r0, r7, r0
	bl	array_size
	bl	vmalloc
	cmp	r0, #0
	beq	.L11
.L8:
	str	r0, [r5, #12]
	stm	r5, {r4, r6, r7}
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	mov	r7, r8
.L5:
	ldr	r3, .L21+16
	ldr	r2, .L21+20
	ldr	r1, .L21+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r1]
	orr	r3, r3, r2
	ldr	r2, .L21+28
	orr	r3, r3, r0
	ldr	r1, [r9]
	ldr	r0, [r2]
	sub	r1, r4, r1
	orr	r0, r3, r0
	bl	__get_free_pages
	subs	r6, r0, #0
	bne	.L7
.L10:
	ldr	r3, .L21+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	ldr	r3, .L21+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L7:
	mov	r0, #1
	sub	r3, r4, #4
	mov	r1, #4
	lsl	r0, r0, r3
	bl	array_size
	bl	vmalloc
	cmp	r0, #0
	bne	.L8
	ldr	r1, [r9]
	cmp	r7, #0
	sub	r1, r4, r1
	bne	.L11
	mov	r0, r6
	bl	free_pages
	b	.L10
.L11:
	mov	r1, #1
	ldr	r3, [r9]
	mov	r0, r8
	sub	r4, r4, r3
	lsl	r1, r1, r4
	bl	kvm_free_hpt_cma
	b	.L10
.L22:
	.align	2
.L21:
	.word	PPC_MIN_HPT_ORDER
	.word	PPC_MAX_HPT_ORDER
	.word	EINVAL
	.word	PAGE_SHIFT
	.word	GFP_KERNEL
	.word	__GFP_ZERO
	.word	__GFP_RETRY_MAYFAIL
	.word	__GFP_NOWARN
	.word	ENOMEM
	.size	kvmppc_allocate_hpt, .-kvmppc_allocate_hpt
	.comm	__GFP_ZERO,4,4
	.comm	__GFP_RETRY_MAYFAIL,4,4
	.comm	__GFP_NOWARN,4,4
	.comm	PPC_MIN_HPT_ORDER,4,4
	.comm	PPC_MAX_HPT_ORDER,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
