	.file	"764883.c"
	.intel_syntax noprefix
	.text
	.local	lvl_1_pt
	.comm	lvl_1_pt,4096,32
	.local	lvl_2_pts
	.comm	lvl_2_pts,8192,32
	.globl	parse_address
	.type	parse_address, @function
parse_address:
.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	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	lea	rcx, -24[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoull@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	cmp	QWORD PTR -40[rbp], rax
	jne	.L2
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 22
	mov	eax, -1
	jmp	.L6
.L2:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L4
	mov	eax, -1
	jmp	.L6
.L4:
	movabs	rax, -4294967296
	and	rax, QWORD PTR -16[rbp]
	test	rax, rax
	je	.L5
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 34
	mov	eax, -1
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, 0
.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	parse_address, .-parse_address
	.type	skip_space, @function
skip_space:
.LFB7:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L9:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	skip_space, .-skip_space
	.section	.rodata
	.align 8
.LC0:
	.string	"error allocating memory for line"
.LC1:
	.string	" \t\r\n"
.LC2:
	.string	"invalid mapping: '%s'"
.LC3:
	.string	"invalid address: '%s'"
.LC4:
	.string	"zeroing low-order bits in %s"
	.text
	.globl	parse_mapping
	.type	parse_mapping, @function
parse_mapping:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -52[rbp], -1
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L12
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	warn@PLT
	mov	eax, -1
	jmp	.L23
.L12:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	skip_space
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L14
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	jne	.L15
.L14:
	mov	DWORD PTR -52[rbp], 0
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -48[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strtok_r@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L17
	lea	rax, -48[rbp]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 0
	call	strtok_r@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L18
.L17:
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	warnx@PLT
	jmp	.L16
.L18:
	lea	rdx, -60[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_address
	test	eax, eax
	je	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	warn@PLT
	jmp	.L16
.L19:
	lea	rdx, -56[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_address
	test	eax, eax
	je	.L20
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	warn@PLT
	jmp	.L16
.L20:
	mov	eax, DWORD PTR -60[rbp]
	mov	eax, eax
	and	eax, 4095
	test	rax, rax
	je	.L21
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	warnx@PLT
	mov	eax, DWORD PTR -60[rbp]
	and	eax, -4096
	mov	DWORD PTR -60[rbp], eax
.L21:
	mov	eax, DWORD PTR -56[rbp]
	mov	eax, eax
	and	eax, 4095
	test	rax, rax
	je	.L22
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	warnx@PLT
	mov	eax, DWORD PTR -56[rbp]
	and	eax, -4096
	mov	DWORD PTR -56[rbp], eax
.L22:
	mov	edx, DWORD PTR -60[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	DWORD PTR [rax], edx
	mov	edx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, 1
	jmp	.L23
.L16:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -52[rbp]
.L23:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parse_mapping, .-parse_mapping
	.section	.rodata
	.align 8
.LC5:
	.string	"cannot allocate memory for mapping list"
.LC6:
	.string	"error reading input file"
	.text
	.globl	read_input
	.type	read_input, @function
read_input:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	jmp	.L26
.L30:
	cmp	QWORD PTR -32[rbp], 0
	jle	.L27
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, 1
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L27
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, 1
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L27:
	mov	rax, QWORD PTR -64[rbp]
	lea	rdx, -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_mapping
	test	eax, eax
	jg	.L28
	jmp	.L26
.L28:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L29
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L29:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rdx], rax
.L26:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jns	.L30
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L31
	lea	rsi, .LC6[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L31:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -88[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	read_input, .-read_input
	.type	level_1_index, @function
level_1_index:
.LFB10:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 22
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	level_1_index, .-level_1_index
	.type	level_2_index, @function
level_2_index:
.LFB11:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 12
	and	eax, 1023
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	level_2_index, .-level_2_index
	.type	pt_set_valid, @function
pt_set_valid:
.LFB12:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, DWORD PTR -12[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	or	edx, -2147483648
	mov	DWORD PTR [rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	pt_set_valid, .-pt_set_valid
	.type	address_to_page_number, @function
address_to_page_number:
.LFB13:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	address_to_page_number, .-address_to_page_number
	.globl	vaddr_compare
	.type	vaddr_compare, @function
vaddr_compare:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jnb	.L41
	mov	eax, -1
	jmp	.L42
.L41:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L43
	mov	eax, 0
	jmp	.L42
.L43:
	mov	eax, 1
.L42:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	vaddr_compare, .-vaddr_compare
	.section	.rodata
	.align 8
.LC7:
	.string	"usage: generate_page_table <base address> [<mappings file>]"
.LC8:
	.string	"r"
.LC9:
	.string	"error opening input file %s"
.LC10:
	.string	"invalid base address '%s'"
	.align 8
.LC11:
	.string	"zeroing low-order bits in base address %s"
	.align 8
.LC12:
	.string	"error allocating memory for second-level page table"
.LC13:
	.string	"error writing output"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -24[rbp], rax
	cmp	DWORD PTR -68[rbp], 3
	jg	.L45
	cmp	DWORD PTR -68[rbp], 1
	jg	.L46
.L45:
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L46:
	cmp	DWORD PTR -68[rbp], 3
	jne	.L47
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L47
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC9[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L47:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -60[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_address
	test	eax, eax
	je	.L48
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC10[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L48:
	mov	eax, DWORD PTR -60[rbp]
	mov	eax, eax
	and	eax, 4095
	test	rax, rax
	je	.L49
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	warnx@PLT
	mov	eax, DWORD PTR -60[rbp]
	and	eax, -4096
	mov	DWORD PTR -60[rbp], eax
.L49:
	lea	rdx, -32[rbp]
	lea	rcx, -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	read_input
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, vaddr_compare[rip]
	mov	edx, 8
	mov	rdi, rax
	call	qsort@PLT
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 4096
	mov	DWORD PTR -52[rbp], eax
	mov	QWORD PTR -16[rbp], 0
	jmp	.L50
.L53:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	level_1_index
	mov	DWORD PTR -48[rbp], eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	level_2_index
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L51
	mov	edi, 4096
	call	malloc@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L52
	lea	rsi, .LC12[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L52:
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR -56[rbp], eax
	add	DWORD PTR -52[rbp], 4096
.L51:
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, lvl_1_pt[rip]
	call	pt_set_valid
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	address_to_page_number
	mov	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, lvl_1_pt[rip]
	mov	eax, DWORD PTR [rdx+rax]
	or	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, lvl_1_pt[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -44[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	pt_set_valid
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	mov	edi, eax
	call	address_to_page_number
	mov	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -44[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	esi, DWORD PTR [rax]
	mov	eax, DWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -44[rbp]
	sal	rax, 2
	add	rax, rdx
	or	ecx, esi
	mov	edx, ecx
	mov	DWORD PTR [rax], edx
	add	QWORD PTR -16[rbp], 1
.L50:
	mov	rax, QWORD PTR -32[rbp]
	cmp	QWORD PTR -16[rbp], rax
	jb	.L53
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 4096
	mov	esi, 1
	lea	rdi, lvl_1_pt[rip]
	call	fwrite@PLT
	cmp	rax, 4096
	je	.L54
	lea	rsi, .LC13[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L54:
	mov	QWORD PTR -16[rbp], 0
	jmp	.L55
.L58:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L61
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -16[rbp]
	lea	rcx, 0[0+rax*8]
	lea	rax, lvl_2_pts[rip]
	mov	rax, QWORD PTR [rcx+rax]
	mov	rcx, rdx
	mov	edx, 4096
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 4096
	je	.L57
	lea	rsi, .LC13[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L61:
	nop
.L57:
	add	QWORD PTR -16[rbp], 1
.L55:
	cmp	QWORD PTR -16[rbp], 1023
	jbe	.L58
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	main, .-main
	.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	"764883.c"
	.text
	.local	lvl_1_pt
	.comm	lvl_1_pt,4096,4
	.local	lvl_2_pts
	.comm	lvl_2_pts,4096,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_address
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_address, %function
parse_address:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	sub	r3, fp, #32
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	strtoull
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	mov	r2, #22
	str	r2, [r3]
	mvn	r3, #0
	b	.L6
.L2:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	mvn	r3, #0
	b	.L6
.L4:
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, #0
	mvn	r1, #0
	and	r4, r2, r0
	and	r5, r3, r1
	orrs	r3, r4, r5
	beq	.L5
	bl	__errno_location
	mov	r3, r0
	mov	r2, #34
	str	r2, [r3]
	mvn	r3, #0
	b	.L6
.L5:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-44]
	str	r2, [r3]
	mov	r3, #0
.L6:
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.size	parse_address, .-parse_address
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	skip_space, %function
skip_space:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L11
.L12:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L11:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L12
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	skip_space, .-skip_space
	.section	.rodata
	.align	2
.LC1:
	.ascii	"error allocating memory for line\000"
	.align	2
.LC2:
	.ascii	" \011\015\012\000"
	.align	2
.LC3:
	.ascii	"invalid mapping: '%s'\000"
	.align	2
.LC4:
	.ascii	"invalid address: '%s'\000"
	.align	2
.LC5:
	.ascii	"zeroing low-order bits in %s\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_mapping
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_mapping, %function
parse_mapping:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #48
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-40]
	ldr	r0, [fp, #-64]
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L27+4
	bl	warn
	mvn	r3, #0
	b	.L25
.L14:
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-52]
	sub	r3, fp, #52
	mov	r0, r3
	bl	skip_space
	ldr	r3, [fp, #-52]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-52]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L17
.L16:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L18
.L17:
	ldr	r3, [fp, #-52]
	sub	r2, fp, #56
	ldr	r1, .L27+8
	mov	r0, r3
	bl	strtok_r
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L19
	sub	r3, fp, #56
	mov	r2, r3
	ldr	r1, .L27+8
	mov	r0, #0
	bl	strtok_r
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L20
.L19:
	ldr	r1, [fp, #-64]
	ldr	r0, .L27+12
	bl	warnx
	b	.L18
.L20:
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	parse_address
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	ldr	r1, [fp, #-32]
	ldr	r0, .L27+16
	bl	warn
	b	.L18
.L21:
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	parse_address
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	ldr	r1, [fp, #-28]
	ldr	r0, .L27+16
	bl	warn
	b	.L18
.L22:
	ldr	r3, [fp, #-48]
	mov	r2, r3
	mov	r3, #0
	ldr	r0, .L27+20
	mov	r1, #0
	and	r6, r2, r0
	and	r7, r3, r1
	orrs	r3, r6, r7
	beq	.L23
	ldr	r1, [fp, #-32]
	ldr	r0, .L27+24
	bl	warnx
	ldr	r3, [fp, #-48]
	bic	r3, r3, #4080
	bic	r3, r3, #15
	str	r3, [fp, #-48]
.L23:
	ldr	r3, [fp, #-44]
	mov	r2, r3
	mov	r3, #0
	ldr	r0, .L27+20
	mov	r1, #0
	and	r4, r2, r0
	and	r5, r3, r1
	orrs	r3, r4, r5
	beq	.L24
	ldr	r1, [fp, #-28]
	ldr	r0, .L27+24
	bl	warnx
	ldr	r3, [fp, #-44]
	bic	r3, r3, #4080
	bic	r3, r3, #15
	str	r3, [fp, #-44]
.L24:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-68]
	str	r2, [r3]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-68]
	str	r2, [r3, #4]
	mov	r3, #1
	b	.L25
.L18:
	ldr	r0, [fp, #-36]
	bl	free
	ldr	r3, [fp, #-40]
.L25:
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC6
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	4095
	.word	.LC5
	.size	parse_mapping, .-parse_mapping
	.section	.rodata
	.align	2
.LC7:
	.ascii	"cannot allocate memory for mapping list\000"
	.align	2
.LC8:
	.ascii	"error reading input file\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_input, %function
read_input:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L30
.L34:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L31
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L31
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L31:
	ldr	r3, [fp, #-40]
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	parse_mapping
	mov	r3, r0
	cmp	r3, #0
	bgt	.L32
	b	.L30
.L32:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	lsl	r3, r3, #3
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	realloc
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L33
	ldr	r1, .L37+4
	mov	r0, #1
	bl	err
.L33:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r2, r3
	sub	r3, fp, #16
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
.L30:
	sub	r1, fp, #36
	sub	r3, fp, #40
	ldr	r2, [fp, #-48]
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L34
	ldr	r3, [fp, #-40]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-48]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r1, .L37+8
	mov	r0, #1
	bl	err
.L35:
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	nop
	ldr	r3, .L37
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC9
	.word	.LC7
	.word	.LC8
	.size	read_input, .-read_input
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	level_1_index, %function
level_1_index:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #22
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	level_1_index, .-level_1_index
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	level_2_index, %function
level_2_index:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #12
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	level_2_index, .-level_2_index
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pt_set_valid, %function
pt_set_valid:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	orr	r2, r2, #-2147483648
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	pt_set_valid, .-pt_set_valid
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	address_to_page_number, %function
address_to_page_number:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #12
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	address_to_page_number, .-address_to_page_number
	.align	2
	.global	vaddr_compare
	.syntax unified
	.arm
	.fpu softvfp
	.type	vaddr_compare, %function
vaddr_compare:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r2, r3
	bcs	.L47
	mvn	r3, #0
	b	.L48
.L47:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L49
	mov	r3, #0
	b	.L48
.L49:
	mov	r3, #1
.L48:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	vaddr_compare, .-vaddr_compare
	.section	.rodata
	.align	2
.LC10:
	.ascii	"usage: generate_page_table <base address> [<mapping"
	.ascii	"s file>]\000"
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"error opening input file %s\000"
	.align	2
.LC13:
	.ascii	"invalid base address '%s'\000"
	.align	2
.LC14:
	.ascii	"zeroing low-order bits in base address %s\000"
	.align	2
.LC15:
	.ascii	"error allocating memory for second-level page table"
	.ascii	"\000"
	.align	2
.LC16:
	.ascii	"error writing output\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L68
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L68+4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-56]
	cmp	r3, #3
	bgt	.L51
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	bgt	.L52
.L51:
	ldr	r1, .L68+8
	mov	r0, #1
	bl	errx
.L52:
	ldr	r3, [fp, #-56]
	cmp	r3, #3
	bne	.L53
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L68+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L53
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L68+16
	mov	r0, #1
	bl	err
.L53:
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	parse_address
	mov	r3, r0
	cmp	r3, #0
	beq	.L54
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L68+20
	mov	r0, #1
	bl	errx
.L54:
	ldr	r3, [fp, #-52]
	mov	r2, r3
	mov	r3, #0
	ldr	r0, .L68+24
	mov	r1, #0
	and	r4, r2, r0
	and	r5, r3, r1
	orrs	r3, r4, r5
	beq	.L55
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L68+28
	bl	warnx
	ldr	r3, [fp, #-52]
	bic	r3, r3, #4080
	bic	r3, r3, #15
	str	r3, [fp, #-52]
.L55:
	sub	r2, fp, #44
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read_input
	ldr	r0, [fp, #-48]
	ldr	r1, [fp, #-44]
	ldr	r3, .L68+32
	mov	r2, #8
	bl	qsort
	ldr	r3, [fp, #-52]
	add	r3, r3, #4096
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L56
.L59:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	level_1_index
	str	r0, [fp, #-24]
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	level_2_index
	str	r0, [fp, #-20]
	ldr	r2, .L68+36
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L57
	mov	r0, #4096
	bl	malloc
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L68+36
	ldr	r3, [fp, #-24]
	str	r1, [r2, r3, lsl #2]
	ldr	r2, .L68+36
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L58
	ldr	r1, .L68+40
	mov	r0, #1
	bl	errx
.L58:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4096
	str	r3, [fp, #-28]
.L57:
	ldr	r1, [fp, #-24]
	ldr	r0, .L68+44
	bl	pt_set_valid
	ldr	r0, [fp, #-32]
	bl	address_to_page_number
	mov	r2, r0
	ldr	r1, .L68+44
	ldr	r3, [fp, #-24]
	ldr	r3, [r1, r3, lsl #2]
	orr	r2, r2, r3
	ldr	r1, .L68+44
	ldr	r3, [fp, #-24]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L68+36
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	pt_set_valid
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	address_to_page_number
	ldr	r2, .L68+36
	ldr	r3, [fp, #-24]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r1, .L68+36
	ldr	r3, [fp, #-24]
	ldr	r1, [r1, r3, lsl #2]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	orr	r2, r0, r2
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L56:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bcc	.L59
	ldr	r3, .L68+48
	ldr	r3, [r3]
	mov	r2, #4096
	mov	r1, #1
	ldr	r0, .L68+44
	bl	fwrite
	mov	r3, r0
	cmp	r3, #4096
	beq	.L60
	ldr	r1, .L68+52
	mov	r0, #1
	bl	err
.L60:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L61
.L64:
	ldr	r2, .L68+36
	ldr	r3, [fp, #-36]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L67
	ldr	r2, .L68+36
	ldr	r3, [fp, #-36]
	ldr	r0, [r2, r3, lsl #2]
	ldr	r3, .L68+48
	ldr	r3, [r3]
	mov	r2, #4096
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	cmp	r3, #4096
	beq	.L63
	ldr	r1, .L68+52
	mov	r0, #1
	bl	err
.L67:
	nop
.L63:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L61:
	ldr	r3, [fp, #-36]
	cmp	r3, #1024
	bcc	.L64
	mov	r3, #0
	ldr	r2, .L68
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L66
	bl	__stack_chk_fail
.L66:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC17
	.word	stdin
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	4095
	.word	.LC14
	.word	vaddr_compare
	.word	lvl_2_pts
	.word	.LC15
	.word	lvl_1_pt
	.word	stdout
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
