	.file	"extr_htab.c_iSeries_hpte_insert.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	iSeries_hpte_insert, @function
iSeries_hpte_insert:
.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, rdx
	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	r12, rdi
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 8[rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	cmp	DWORD PTR MMU_PAGE_4K[rip], r9d
	setne	dil
	call	BUG_ON@PLT
	test	QWORD PTR HPTE_V_SECONDARY[rip], rbp
	jne	.L8
	mov	rdi, r12
	lea	r15, 32[rsp]
	call	iSeries_hlock@PLT
	mov	rcx, QWORD PTR HW_PAGE_SHIFT[rip]
	mov	rsi, r13
	mov	rdi, r15
	shr	rsi, cl
	call	HvCallHpt_findValid@PLT
	mov	rdi, QWORD PTR 32[rsp]
	and	rdi, QWORD PTR HPTE_V_VALID[rip]
	mov	rbx, rax
	call	unlikely@PLT
	test	rax, rax
	je	.L3
	test	QWORD PTR HPTE_V_BOLTED[rip], rbp
	je	.L4
	xor	edx, edx
	mov	esi, 16
	mov	rdi, rbx
	call	HvCallHpt_setSwBits@PLT
	mov	esi, DWORD PTR PP_RWXX[rip]
	mov	rdi, rbx
	call	HvCallHpt_setPp@PLT
	mov	rdi, r12
	call	iSeries_hunlock@PLT
	mov	rax, rbx
	and	eax, 7
	mov	rdx, rax
	or	rdx, 8
	test	rbx, rbx
	cmovs	rax, rdx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
	call	BUG@PLT
.L3:
	cmp	rbx, -1
	je	.L15
	xor	r9d, r9d
	xor	r8d, r8d
	test	rbx, rbx
	js	.L16
.L6:
	mov	edx, DWORD PTR MMU_SEGSIZE_256M[rip]
	mov	esi, DWORD PTR MMU_PAGE_4K[rip]
	mov	rdi, r13
	mov	QWORD PTR 24[rsp], r9
	mov	DWORD PTR 20[rsp], r8d
	call	hpte_encode_v@PLT
	mov	rdi, r14
	or	rbp, rax
	or	rbp, QWORD PTR HPTE_V_VALID[rip]
	mov	QWORD PTR 32[rsp], rbp
	mov	ebp, DWORD PTR MMU_PAGE_4K[rip]
	call	phys_to_abs@PLT
	mov	edi, eax
	mov	esi, ebp
	call	hpte_encode_r@PLT
	mov	r8d, DWORD PTR 20[rsp]
	mov	rdi, rbx
	mov	rdx, r15
	mov	rcx, QWORD PTR 8[rsp]
	and	ebx, 7
	mov	esi, r8d
	or	rcx, rax
	mov	QWORD PTR 40[rsp], rcx
	call	HvCallHpt_addValidate@PLT
	mov	rdi, r12
	call	iSeries_hunlock@PLT
	mov	r9, QWORD PTR 24[rsp]
	mov	rax, rbx
	or	rax, r9
.L1:
	mov	rdx, QWORD PTR 56[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 72
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	or	rbp, QWORD PTR HPTE_V_SECONDARY[rip]
	btr	rbx, 63
	mov	r9d, 8
	mov	r8d, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, -1
	jmp	.L1
.L15:
	mov	rdi, r12
	call	iSeries_hunlock@PLT
	mov	rax, -1
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	iSeries_hpte_insert, .-iSeries_hpte_insert
	.comm	PP_RWXX,4,4
	.comm	MMU_SEGSIZE_256M,4,4
	.comm	MMU_PAGE_4K,4,4
	.comm	HW_PAGE_SHIFT,8,8
	.comm	HPTE_V_VALID,8,8
	.comm	HPTE_V_SECONDARY,8,8
	.comm	HPTE_V_BOLTED,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_htab.c_iSeries_hpte_insert.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	iSeries_hpte_insert, %function
iSeries_hpte_insert:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L18
	sub	sp, sp, #28
	ldr	ip, [r9]
	mov	r5, r0
	ldr	r0, [sp, #68]
	str	r3, [sp]
	subs	r0, ip, r0
	ldr	r3, .L18+4
	ldr	fp, .L18+8
	movne	r0, #1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r6, [sp, #64]
	mov	r7, r1
	mov	r8, r2
	bl	BUG_ON
	ldr	r3, [fp]
	ands	r3, r6, r3
	str	r3, [sp, #4]
	bne	.L8
	mov	r0, r5
	bl	iSeries_hlock
	ldr	r3, .L18+12
	add	r0, sp, #12
	ldr	r1, [r3]
	ldr	r10, .L18+16
	lsr	r1, r7, r1
	bl	HvCallHpt_findValid
	ldr	r2, [sp, #12]
	ldr	r3, [r10]
	mov	r4, r0
	and	r0, r2, r3
	bl	unlikely
	cmp	r0, #0
	bne	.L15
.L3:
	cmn	r4, #1
	beq	.L16
	cmp	r4, #0
	movge	fp, #0
	ldrlt	r3, [fp]
	movge	r3, fp
	orrlt	r6, r6, r3
	movlt	r3, #1
	ldr	r2, .L18+20
	ldr	r1, [r9]
	ldr	r2, [r2]
	mov	r0, r7
	movlt	fp, #8
	str	r3, [sp, #4]
	bl	hpte_encode_v
	ldr	r2, [r10]
	orr	r6, r0, r6
	orr	r6, r6, r2
	mov	r0, r8
	str	r6, [sp, #12]
	bl	phys_to_abs
	ldr	r1, [r9]
	bl	hpte_encode_r
	ldr	r3, [sp]
	add	r2, sp, #12
	orr	ip, r0, r3
	ldr	r3, [sp, #4]
	mov	r0, r4
	mov	r1, r3
	str	ip, [sp, #16]
	and	r4, r4, #7
	bl	HvCallHpt_addValidate
	mov	r0, r5
	bl	iSeries_hunlock
	orr	r0, r4, fp
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r3, .L18+24
	ldr	r3, [r3]
	tst	r6, r3
	beq	.L4
	ldr	r2, [sp, #4]
	mov	r1, #16
	mov	r0, r4
	bl	HvCallHpt_setSwBits
	ldr	r3, .L18+28
	mov	r0, r4
	ldr	r1, [r3]
	bl	HvCallHpt_setPp
	mov	r0, r5
	bl	iSeries_hunlock
	cmp	r4, #0
	and	r0, r4, #7
	orrlt	r0, r0, #8
	b	.L1
.L4:
	bl	BUG
	b	.L3
.L8:
	mvn	r0, #0
	b	.L1
.L16:
	mov	r0, r5
	bl	iSeries_hunlock
	mov	r0, r4
	b	.L1
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	MMU_PAGE_4K
	.word	.LC0
	.word	HPTE_V_SECONDARY
	.word	HW_PAGE_SHIFT
	.word	HPTE_V_VALID
	.word	MMU_SEGSIZE_256M
	.word	HPTE_V_BOLTED
	.word	PP_RWXX
	.size	iSeries_hpte_insert, .-iSeries_hpte_insert
	.comm	PP_RWXX,4,4
	.comm	MMU_SEGSIZE_256M,4,4
	.comm	MMU_PAGE_4K,4,4
	.comm	HW_PAGE_SHIFT,4,4
	.comm	HPTE_V_VALID,4,4
	.comm	HPTE_V_SECONDARY,4,4
	.comm	HPTE_V_BOLTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
