	.file	"107889.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/proc/self/pagemap"
.LC1:
	.string	"open pagemap"
.LC2:
	.string	"pread"
.LC3:
	.string	"page %lx not present: %lx"
	.text
	.globl	virtual_to_physical
	.type	virtual_to_physical, @function
virtual_to_physical:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	shr	rax, 12
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR pagemap_fd.0[rip]
	test	eax, eax
	jne	.L2
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR pagemap_fd.0[rip], eax
	mov	eax, DWORD PTR pagemap_fd.0[rip]
	test	eax, eax
	jg	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L6
.L2:
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 3
	mov	rdx, rax
	mov	eax, DWORD PTR pagemap_fd.0[rip]
	lea	rsi, -24[rbp]
	mov	rcx, rdx
	mov	edx, 8
	mov	edi, eax
	call	pread@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 8
	je	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L6
.L4:
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	js	.L5
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -24[rbp]
	movabs	rdx, 36028797018963967
	and	rax, rdx
	sal	rax, 12
.L6:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	virtual_to_physical, .-virtual_to_physical
	.globl	allocate_huge_page
	.type	allocate_huge_page, @function
allocate_huge_page:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -36[rbp], -1
	mov	QWORD PTR -24[rbp], -1
	mov	QWORD PTR -32[rbp], -1
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	edx, 2944
	mov	rsi, rax
	mov	edi, 0
	call	shmget@PLT
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], -1
	je	.L19
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	mlock@PLT
	test	eax, eax
	jne	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	virtual_to_physical
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L21
	movabs	rax, 87960930222080
	or	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rcx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], -1
	je	.L22
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	mlock@PLT
	test	eax, eax
	jne	.L23
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	mov	rax, QWORD PTR -32[rbp]
	jmp	.L15
.L19:
	nop
	jmp	.L10
.L20:
	nop
	jmp	.L10
.L21:
	nop
	jmp	.L10
.L22:
	nop
	jmp	.L10
.L23:
	nop
.L10:
	cmp	QWORD PTR -24[rbp], -1
	je	.L16
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	shmdt@PLT
.L16:
	cmp	QWORD PTR -32[rbp], -1
	je	.L17
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	shmdt@PLT
.L17:
	cmp	DWORD PTR -36[rbp], -1
	je	.L18
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
.L18:
	mov	eax, 0
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	allocate_huge_page, .-allocate_huge_page
	.local	pagemap_fd.0
	.comm	pagemap_fd.0,4,4
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"107889.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/proc/self/pagemap\000"
	.align	2
.LC1:
	.ascii	"open pagemap\000"
	.align	2
.LC2:
	.ascii	"pread\000"
	.align	2
.LC3:
	.ascii	"page %lx not present: %lx\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	virtual_to_physical
	.syntax unified
	.arm
	.fpu softvfp
	.type	virtual_to_physical, %function
virtual_to_physical:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	mov	r0, r3
	asr	r1, r0, #31
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r0, #12
	orr	r2, r2, r1, lsl #20
	lsr	r3, r1, #12
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, .L8+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	mov	r1, #0
	ldr	r0, .L8+8
	bl	open
	mov	r3, r0
	ldr	r2, .L8+4
	str	r3, [r2]
	ldr	r3, .L8+4
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L2
	ldr	r0, .L8+12
	bl	perror
	mov	r2, #0
	mov	r3, #0
	b	.L6
.L2:
	ldr	r3, .L8+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #3
	sub	r1, fp, #36
	mov	r2, #8
	bl	pread
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #8
	beq	.L4
	ldr	r0, .L8+16
	bl	perror
	mov	r2, #0
	mov	r3, #0
	b	.L6
.L4:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	cmp	r2, #0
	sbcs	r3, r3, #0
	blt	.L5
	ldr	r3, .L8+20
	ldr	r0, [r3]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	ldr	r1, .L8+24
	bl	fprintf
	mov	r2, #0
	mov	r3, #0
	b	.L6
.L5:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mvn	r0, #0
	ldr	r1, .L8+28
	and	r4, r2, r0
	and	r5, r3, r1
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r5, #12
	orr	r3, r3, r4, lsr #20
	lsl	r2, r4, #12
.L6:
	ldr	r1, .L8
	ldr	r0, [r1]
	ldr	r1, [fp, #-16]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	pagemap_fd.6786
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	8388607
	.size	virtual_to_physical, .-virtual_to_physical
	.align	2
	.global	allocate_huge_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	allocate_huge_page, %function
allocate_huge_page:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	str	r0, [fp, #-48]
	mvn	r3, #0
	str	r3, [fp, #-36]
	mvn	r3, #0
	str	r3, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-48]
	mov	r2, #2944
	mov	r1, r3
	mov	r0, #0
	bl	shmget
	str	r0, [fp, #-36]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	shmat
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	beq	.L21
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	mlock
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	ldr	r0, [fp, #-32]
	bl	virtual_to_physical
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L23
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, #0
	mov	r1, #20480
	orr	r4, r2, r0
	orr	r5, r3, r1
	str	r4, [fp, #-20]
	str	r5, [fp, #-16]
	ldr	r3, [fp, #-20]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	shmat
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	beq	.L24
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	mlock
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-48]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	memset
	ldr	r0, [fp, #-32]
	bl	shmdt
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	shmctl
	ldr	r3, [fp, #-40]
	b	.L17
.L21:
	nop
	b	.L12
.L22:
	nop
	b	.L12
.L23:
	nop
	b	.L12
.L24:
	nop
	b	.L12
.L25:
	nop
.L12:
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	beq	.L18
	ldr	r0, [fp, #-32]
	bl	shmdt
.L18:
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	beq	.L19
	ldr	r0, [fp, #-40]
	bl	shmdt
.L19:
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	beq	.L20
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	shmctl
.L20:
	mov	r3, #0
.L17:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	allocate_huge_page, .-allocate_huge_page
	.local	pagemap_fd.6786
	.comm	pagemap_fd.6786,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
