	.file	"extr_tlb.c_replace_tlb_one_pid.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	replace_tlb_one_pid, @function
replace_tlb_one_pid:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	rsi, 16[rsp]
	lea	rdi, 8[rsp]
	call	get_misc_and_pid@PLT
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rsi, rbp
	mov	edi, DWORD PTR CTL_PTEADDR[rip]
	shr	rsi, cl
	sal	rsi, 2
	call	WRCTL@PLT
	mov	eax, DWORD PTR cpuinfo[rip]
	test	eax, eax
	je	.L5
	xor	r13d, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	add	r13d, 1
	cmp	DWORD PTR cpuinfo[rip], r13d
	jbe	.L5
.L6:
	mov	ecx, DWORD PTR TLBMISC_WAY_SHIFT[rip]
	mov	edi, DWORD PTR CTL_TLBMISC[rip]
	mov	esi, r13d
	sal	esi, cl
	or	esi, DWORD PTR TLBMISC_RD[rip]
	call	WRCTL@PLT
	mov	edi, DWORD PTR CTL_PTEADDR[rip]
	call	RDCTL@PLT
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rdx, rbp
	shr	rax, 2
	and	eax, 1048575
	shr	rdx, cl
	cmp	rax, rdx
	jne	.L3
	mov	edi, DWORD PTR CTL_TLBMISC[rip]
	call	RDCTL@PLT
	mov	rcx, QWORD PTR TLBMISC_PID_SHIFT[rip]
	shr	rax, cl
	and	rax, QWORD PTR TLBMISC_PID_MASK[rip]
	cmp	rax, rbx
	jne	.L3
	sal	rbx, cl
	mov	ecx, DWORD PTR TLBMISC_WAY_SHIFT[rip]
	or	rbx, QWORD PTR TLBMISC_WE[rip]
	mov	edi, DWORD PTR CTL_TLBMISC[rip]
	sal	r13d, cl
	or	rbx, r13
	mov	rsi, rbx
	call	WRCTL@PLT
	test	r12, r12
	je	.L11
.L4:
	mov	edi, DWORD PTR CTL_TLBACC[rip]
	mov	rsi, r12
	call	WRCTL@PLT
.L5:
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR CTL_TLBMISC[rip]
	call	WRCTL@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	pteaddr_invalid@PLT
	mov	edi, DWORD PTR CTL_PTEADDR[rip]
	mov	rsi, rax
	call	WRCTL@PLT
	jmp	.L4
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	replace_tlb_one_pid, .-replace_tlb_one_pid
	.comm	cpuinfo,4,4
	.comm	TLBMISC_WE,8,8
	.comm	TLBMISC_WAY_SHIFT,4,4
	.comm	TLBMISC_RD,4,4
	.comm	TLBMISC_PID_SHIFT,8,8
	.comm	TLBMISC_PID_MASK,8,8
	.comm	PAGE_SHIFT,8,8
	.comm	CTL_TLBMISC,4,4
	.comm	CTL_TLBACC,4,4
	.comm	CTL_PTEADDR,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_tlb.c_replace_tlb_one_pid.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	replace_tlb_one_pid, %function
replace_tlb_one_pid:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #28
	str	r3, [sp]
	ldr	r7, .L16
	ldr	r3, .L16+4
	str	r2, [sp, #4]
	add	r1, sp, #16
	add	r0, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	get_misc_and_pid
	ldr	r1, [r7]
	ldr	r6, .L16+8
	ldr	r9, .L16+12
	lsr	r1, r5, r1
	ldr	r0, [r6]
	lsl	r1, r1, #2
	bl	WRCTL
	ldr	r3, [r9]
	cmp	r3, #0
	ldreq	r4, .L16+16
	beq	.L5
	mov	r10, #0
	ldr	r8, .L16+20
	ldr	fp, .L16+24
	ldr	r4, .L16+16
	b	.L6
.L3:
	ldr	r2, [r9]
	add	r10, r10, #1
	cmp	r2, r10
	bls	.L5
.L6:
	ldr	r2, [fp]
	ldr	r1, [r8]
	ldr	r0, [r4]
	orr	r1, r2, r10, lsl r1
	bl	WRCTL
	ldr	r0, [r6]
	bl	RDCTL
	ldr	r3, .L16+28
	ldr	r2, [r7]
	and	r0, r3, r0, lsr #2
	cmp	r0, r5, lsr r2
	bne	.L3
	ldr	r0, [r4]
	bl	RDCTL
	ldr	r3, .L16+32
	ldr	r1, [r3]
	ldr	r3, .L16+36
	ldr	r2, [r3]
	ldr	r3, [sp]
	and	r2, r2, r0, lsr r1
	cmp	r2, r3
	bne	.L3
	ldr	ip, .L16+40
	ldr	r0, [r8]
	lsl	r2, r3, r1
	ldr	r1, [ip]
	orr	r3, r2, r10, lsl r0
	orr	r1, r3, r1
	ldr	r0, [r4]
	bl	WRCTL
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L14
.L4:
	ldr	r3, .L16+44
	ldr	r1, [sp, #4]
	ldr	r0, [r3]
	bl	WRCTL
.L5:
	ldr	r0, [r4]
	ldr	r1, [sp, #12]
	bl	WRCTL
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	mov	r0, r5
	ldr	r6, [r6]
	bl	pteaddr_invalid
	mov	r1, r0
	mov	r0, r6
	bl	WRCTL
	b	.L4
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	PAGE_SHIFT
	.word	.LC0
	.word	CTL_PTEADDR
	.word	cpuinfo
	.word	CTL_TLBMISC
	.word	TLBMISC_WAY_SHIFT
	.word	TLBMISC_RD
	.word	1048575
	.word	TLBMISC_PID_SHIFT
	.word	TLBMISC_PID_MASK
	.word	TLBMISC_WE
	.word	CTL_TLBACC
	.size	replace_tlb_one_pid, .-replace_tlb_one_pid
	.comm	cpuinfo,4,4
	.comm	TLBMISC_WE,4,4
	.comm	TLBMISC_WAY_SHIFT,4,4
	.comm	TLBMISC_RD,4,4
	.comm	TLBMISC_PID_SHIFT,4,4
	.comm	TLBMISC_PID_MASK,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	CTL_TLBMISC,4,4
	.comm	CTL_TLBACC,4,4
	.comm	CTL_PTEADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
