	.file	"229359.c"
	.intel_syntax noprefix
	.text
	.globl	mapping
	.bss
	.align 8
	.type	mapping, @object
	.size	mapping, 8
mapping:
	.zero	8
	.section	.rodata
.LC0:
	.string	"child thread has started.\n"
	.text
	.globl	thread_func
	.type	thread_func, @function
thread_func:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
.L2:
	mov	rax, QWORD PTR mapping[rip]
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L2
	.cfi_endproc
.LFE6:
	.size	thread_func, .-thread_func
	.section	.rodata
.LC1:
	.string	"the_stack_data/229359.c"
.LC2:
	.string	"mapping != MAP_FAILED"
.LC3:
	.string	"rc == 0"
.LC4:
	.string	"waiting for child thread...\n"
.LC5:
	.string	"mmap call #%i\n"
.LC6:
	.string	"result == mapping"
	.align 8
.LC7:
	.string	"checking for write to page...\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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 34
	mov	edx, 3
	mov	esi, 65536
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR mapping[rip], rax
	mov	rax, QWORD PTR mapping[rip]
	cmp	rax, -1
	jne	.L4
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 41
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L4:
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, thread_func[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], 0
	je	.L5
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 45
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L5:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	nop
.L6:
	mov	rax, QWORD PTR mapping[rip]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L6
	mov	DWORD PTR -36[rbp], 0
	jmp	.L7
.L10:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -36[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR mapping[rip]
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 50
	mov	edx, 3
	mov	esi, 65536
	mov	rdi, rax
	call	mmap@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR mapping[rip]
	cmp	QWORD PTR -16[rbp], rax
	je	.L8
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 60
	lea	rsi, .LC1[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L8:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR mapping[rip]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -28[rbp], eax
	nop
.L9:
	mov	rax, QWORD PTR mapping[rip]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	je	.L9
	add	DWORD PTR -36[rbp], 1
.L7:
	cmp	DWORD PTR -36[rbp], 999
	jle	.L10
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"229359.c"
	.text
	.comm	mapping,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"child thread has started.\012\000"
	.text
	.align	2
	.global	thread_func
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_func, %function
thread_func:
	@ 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]
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L3+4
	bl	fwrite
.L2:
	ldr	r3, .L3+8
	ldr	r3, [r3]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	b	.L2
.L4:
	.align	2
.L3:
	.word	stderr
	.word	.LC0
	.word	mapping
	.size	thread_func, .-thread_func
	.section	.rodata
	.align	2
.LC1:
	.ascii	"the_stack_data/229359.c\000"
	.align	2
.LC2:
	.ascii	"mapping != MAP_FAILED\000"
	.align	2
.LC3:
	.ascii	"rc == 0\000"
	.align	2
.LC4:
	.ascii	"waiting for child thread...\012\000"
	.align	2
.LC5:
	.ascii	"mmap call #%i\012\000"
	.align	2
.LC6:
	.ascii	"result == mapping\000"
	.align	2
.LC7:
	.ascii	"checking for write to page...\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #34
	mov	r2, #3
	mov	r1, #65536
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L15+4
	str	r3, [r2]
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L15+8
	mov	r2, #41
	ldr	r1, .L15+12
	ldr	r0, .L15+16
	bl	__assert_fail
.L6:
	sub	r0, fp, #28
	mov	r3, #0
	ldr	r2, .L15+20
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L15+8
	mov	r2, #45
	ldr	r1, .L15+12
	ldr	r0, .L15+24
	bl	__assert_fail
.L7:
	ldr	r3, .L15+28
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L15+32
	bl	fwrite
	nop
.L8:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L9
.L12:
	ldr	r3, .L15+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L15+36
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L15+4
	ldr	r0, [r3]
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #50
	mov	r2, #3
	mov	r1, #65536
	bl	mmap
	str	r0, [fp, #-16]
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	beq	.L10
	ldr	r3, .L15+8
	mov	r2, #60
	ldr	r1, .L15+12
	ldr	r0, .L15+40
	bl	__assert_fail
.L10:
	ldr	r3, .L15+28
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L15+44
	bl	fwrite
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	nop
.L11:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L11
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r3, [fp, #-24]
	cmp	r3, #1000
	blt	.L12
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC8
	.word	mapping
	.word	__PRETTY_FUNCTION__.5685
	.word	.LC1
	.word	.LC2
	.word	thread_func
	.word	.LC3
	.word	stderr
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5685, %object
	.size	__PRETTY_FUNCTION__.5685, 5
__PRETTY_FUNCTION__.5685:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
