	.file	"extr_book3s_64_mmu.c_kvmppc_mmu_book3s_64_get_pteg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"MMU: page=0x%x sdr1=0x%llx pteg=0x%llx vsid=0x%llx\n"
	.text
	.p2align 4
	.type	kvmppc_mmu_book3s_64_get_pteg, @function
kvmppc_mmu_book3s_64_get_pteg:
.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	r14d, ecx
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, 1
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], edx
	call	to_book3s@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	rdi, r13
	mov	ecx, DWORD PTR [rax]
	mov	r15, rax
	and	ecx, 31
	add	ecx, 11
	sal	ebx, cl
	call	kvmppc_slb_calc_vpn@PLT
	sub	ebx, 1
	cmp	QWORD PTR 8[r13], 0
	mov	edx, DWORD PTR MMU_SEGSIZE_256M[rip]
	movsx	r12, ebx
	mov	rbx, rax
	je	.L3
	mov	edx, DWORD PTR MMU_SEGSIZE_1T[rip]
.L3:
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], edx
	call	kvmppc_mmu_book3s_64_get_pagesize@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	rdi, rbx
	mov	esi, eax
	call	hpt_hash@PLT
	test	r14d, r14d
	movabs	rcx, 70368744177536
	mov	esi, DWORD PTR page[rip]
	mov	r8, rax
	not	rax
	lea	rdi, .LC0[rip]
	mov	rbx, r8
	mov	r8d, DWORD PTR 0[r13]
	cmovne	rbx, rax
	movsx	rax, DWORD PTR [r15]
	and	rbx, r12
	mov	rdx, rax
	and	rax, -262144
	sal	rbx, 7
	and	rbx, rcx
	or	rbx, rax
	mov	rcx, rbx
	mov	r12, rbx
	call	dprintk@PLT
	cmp	QWORD PTR 8[rbp], 0
	je	.L12
.L5:
	mov	rdi, r12
	call	kvm_is_error_hva@PLT
	test	rax, rax
	jne	.L1
	mov	rax, QWORD PTR PAGE_MASK[rip]
	not	rax
	and	rbx, rax
	or	r12, rbx
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, rbx
	shr	rsi, cl
	call	gfn_to_hva@PLT
	mov	r12, rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	kvmppc_mmu_book3s_64_get_pteg, .-kvmppc_mmu_book3s_64_get_pteg
	.comm	page,4,4
	.comm	PAGE_SHIFT,8,8
	.comm	PAGE_MASK,8,8
	.comm	MMU_SEGSIZE_256M,4,4
	.comm	MMU_SEGSIZE_1T,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.c_kvmppc_mmu_book3s_64_get_pteg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MMU: page=0x%x sdr1=0x%llx pteg=0x%llx vsid=0x%llx\012"
	.ascii	"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvmppc_mmu_book3s_64_get_pteg, %function
kvmppc_mmu_book3s_64_get_pteg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	mov	r5, r1
	mov	r8, r2
	mov	r10, r3
	mov	r6, r0
	bl	to_book3s
	mvn	r7, #0
	ldr	r3, [r0]
	mov	r4, r0
	and	r3, r3, #31
	add	r3, r3, #11
	mov	r0, r5
	mov	r1, r8
	mvn	r7, r7, lsl r3
	bl	kvmppc_slb_calc_vpn
	ldr	r3, [r5, #4]
	mov	fp, r1
	cmp	r3, #0
	ldrne	r3, .L14
	ldreq	r3, .L14+4
	asr	r9, r7, #31
	ldr	r3, [r3]
	str	r0, [sp, #20]
	mov	r0, r5
	str	r3, [sp, #16]
	bl	kvmppc_mmu_book3s_64_get_pagesize
	ldr	r1, [sp, #20]
	mov	r2, r0
	ldr	r3, [sp, #16]
	mov	r0, r1
	mov	r1, fp
	bl	hpt_hash
	cmp	r10, #0
	mvnne	r1, r1
	mvnne	r0, r0
	ldr	r2, [r4]
	and	r4, r1, r9
	and	r7, r7, r0
	lsl	r4, r4, #7
	orr	r4, r4, r7, lsr #25
	lsr	r3, r2, #18
	lsl	r4, r4, #18
	ldr	r0, [r5]
	lsl	r3, r3, #18
	asr	r9, r2, #31
	lsr	r4, r4, #18
	orr	r7, r3, r7, lsl #7
	orr	r4, r4, r9
	ldr	r1, .L14+8
	str	r0, [sp, #8]
	str	r4, [sp, #4]
	str	r7, [sp]
	ldr	r1, [r1]
	ldr	r0, .L14+12
	bl	dprintk
	ldr	r3, [r6, #4]
	cmp	r3, #0
	movne	r6, r7
	movne	r5, r4
	beq	.L13
.L5:
	mov	r0, r6
	mov	r1, r5
	bl	kvm_is_error_hva
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L14+16
	ldm	r3, {r2, r3}
	bic	r7, r7, r2
	bic	r4, r4, r3
	orr	r6, r7, r6
	orr	r5, r4, r5
.L1:
	mov	r0, r6
	mov	r1, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r3, .L14+20
	ldr	r0, [r6]
	ldr	r3, [r3]
	rsb	r1, r3, #32
	lsr	r2, r7, r3
	orr	r2, r2, r4, lsl r1
	sub	r1, r3, #32
	orr	r2, r2, r4, lsr r1
	lsr	r3, r4, r3
	bl	gfn_to_hva
	mov	r6, r0
	mov	r5, r1
	b	.L5
.L15:
	.align	2
.L14:
	.word	MMU_SEGSIZE_1T
	.word	MMU_SEGSIZE_256M
	.word	page
	.word	.LC0
	.word	PAGE_MASK
	.word	PAGE_SHIFT
	.size	kvmppc_mmu_book3s_64_get_pteg, .-kvmppc_mmu_book3s_64_get_pteg
	.comm	page,4,4
	.comm	PAGE_SHIFT,8,8
	.comm	PAGE_MASK,8,8
	.comm	MMU_SEGSIZE_256M,4,4
	.comm	MMU_SEGSIZE_1T,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
