	.file	"479953.c"
	.intel_syntax noprefix
	.text
	.globl	dirt
	.bss
	.align 4
	.type	dirt, @object
	.size	dirt, 4
dirt:
	.zero	4
	.globl	page
	.align 8
	.type	page, @object
	.size	page, 8
page:
	.zero	8
	.globl	pagesz
	.align 8
	.type	pagesz, @object
	.size	pagesz, 8
pagesz:
	.zero	8
	.section	.rodata
.LC0:
	.string	"handled segv"
	.text
	.type	handler, @function
handler:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR page[rip]
	cmp	rdx, rax
	jb	.L4
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR page[rip]
	mov	rdx, QWORD PTR pagesz[rip]
	add	rdx, rcx
	cmp	rax, rdx
	jnb	.L4
	mov	DWORD PTR dirt[rip], 1
	mov	rcx, QWORD PTR pagesz[rip]
	mov	rax, QWORD PTR page[rip]
	mov	edx, 3
	mov	rsi, rcx
	mov	rdi, rax
	call	mprotect@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L3
	call	abort@PLT
.L3:
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handler, .-handler
	.section	.rodata
.LC1:
	.string	"page size: %zu \n"
.LC2:
	.string	"%02x "
.LC3:
	.string	"dirt: %i\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 192
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 30
	call	sysconf@PLT
	mov	QWORD PTR pagesz[rip], rax
	mov	rax, QWORD PTR pagesz[rip]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -24[rbp], 4
	lea	rax, -160[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	lea	rax, handler[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 11
	call	sigaction@PLT
	cmp	eax, -1
	jne	.L6
	call	abort@PLT
.L6:
	mov	rax, QWORD PTR pagesz[rip]
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 32
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR page[rip], rax
	mov	rax, QWORD PTR page[rip]
	test	rax, rax
	jne	.L7
	call	abort@PLT
.L7:
	mov	QWORD PTR -184[rbp], 0
	jmp	.L8
.L9:
	mov	rdx, QWORD PTR page[rip]
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	add	QWORD PTR -184[rbp], 1
.L8:
	mov	rax, QWORD PTR pagesz[rip]
	cmp	QWORD PTR -184[rbp], rax
	jb	.L9
	mov	rcx, QWORD PTR pagesz[rip]
	mov	rax, QWORD PTR page[rip]
	mov	edx, 1
	mov	rsi, rcx
	mov	rdi, rax
	call	mprotect@PLT
	mov	DWORD PTR -192[rbp], eax
	cmp	DWORD PTR -192[rbp], -1
	jne	.L10
	call	abort@PLT
.L10:
	mov	QWORD PTR -176[rbp], 0
	jmp	.L11
.L12:
	mov	rdx, QWORD PTR page[rip]
	mov	rax, QWORD PTR -176[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 1
	add	QWORD PTR -176[rbp], 1
.L11:
	mov	rax, QWORD PTR pagesz[rip]
	cmp	QWORD PTR -176[rbp], rax
	jb	.L12
	mov	QWORD PTR -168[rbp], 0
	jmp	.L13
.L15:
	mov	rdx, QWORD PTR page[rip]
	mov	rax, QWORD PTR -168[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -188[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -168[rbp]
	movabs	rdx, -8608480567731124087
	mov	rax, rcx
	mul	rdx
	shr	rdx, 4
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	cmp	rdx, 29
	jne	.L14
	mov	edi, 10
	call	putchar@PLT
.L14:
	add	QWORD PTR -168[rbp], 1
.L13:
	mov	rax, QWORD PTR pagesz[rip]
	cmp	QWORD PTR -168[rbp], rax
	jb	.L15
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR dirt[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"479953.c"
	.text
	.global	dirt
	.bss
	.align	2
	.type	dirt, %object
	.size	dirt, 4
dirt:
	.space	4
	.global	page
	.align	2
	.type	page, %object
	.size	page, 4
page:
	.space	4
	.global	pagesz
	.align	2
	.type	pagesz, %object
	.size	pagesz, 4
pagesz:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"handled segv\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handler, %function
handler:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #12]
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L4
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #12]
	ldr	r3, .L5
	ldr	r1, [r3]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	add	r3, r1, r3
	cmp	r2, r3
	bcs	.L4
	ldr	r3, .L5+8
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r2, .L5+4
	ldr	r1, [r2]
	mov	r2, #3
	mov	r0, r3
	bl	mprotect
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L3
	bl	abort
.L3:
	ldr	r0, .L5+12
	bl	puts
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	page
	.word	pagesz
	.word	dirt
	.word	.LC0
	.size	handler, .-handler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"page size: %zu \012\000"
	.align	2
.LC2:
	.ascii	"%02x \000"
	.align	2
.LC3:
	.ascii	"dirt: %i\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #176
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L20+4
	str	r2, [r3]
	ldr	r3, .L20+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L20+8
	bl	printf
	mov	r3, #4
	str	r3, [fp, #-16]
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	ldr	r3, .L20+12
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	mov	r0, #11
	bl	sigaction
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	bl	abort
.L8:
	ldr	r3, .L20+4
	ldr	r1, [r3]
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #32
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L20+16
	str	r3, [r2]
	ldr	r3, .L20+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L9
	bl	abort
.L9:
	mov	r3, #0
	str	r3, [fp, #-168]
	b	.L10
.L11:
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-168]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
.L10:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-168]
	cmp	r2, r3
	bcc	.L11
	ldr	r3, .L20+16
	ldr	r3, [r3]
	ldr	r2, .L20+4
	ldr	r1, [r2]
	mov	r2, #1
	mov	r0, r3
	bl	mprotect
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmn	r3, #1
	bne	.L12
	bl	abort
.L12:
	mov	r3, #0
	str	r3, [fp, #-164]
	b	.L13
.L14:
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-164]
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, [fp, #-164]
	add	r3, r3, #1
	str	r3, [fp, #-164]
.L13:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-164]
	cmp	r2, r3
	bcc	.L14
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L15
.L17:
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-160]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-152]
	ldr	r1, [fp, #-152]
	ldr	r0, .L20+20
	bl	printf
	ldr	r1, [fp, #-160]
	ldr	r3, .L20+24
	umull	r2, r3, r1, r3
	lsr	r2, r3, #4
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #29
	bne	.L16
	mov	r0, #10
	bl	putchar
.L16:
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L15:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-160]
	cmp	r2, r3
	bcc	.L17
	mov	r0, #10
	bl	putchar
	ldr	r3, .L20+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L20+32
	bl	printf
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC4
	.word	pagesz
	.word	.LC1
	.word	handler
	.word	page
	.word	.LC2
	.word	-2004318071
	.word	dirt
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
