	.file	"655975.c"
	.intel_syntax noprefix
	.text
	.local	counter
	.comm	counter,8,8
	.section	.rodata
.LC0:
	.string	"the_stack_data/655975.c"
	.align 8
.LC1:
	.string	"(unsigned long)counter != -1UL"
.LC2:
	.string	"--block-sigchld"
.LC3:
	.string	"fork: "
	.align 8
.LC4:
	.string	"counter: expected: %lu got: %lu\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 352
	mov	DWORD PTR -340[rbp], edi
	mov	QWORD PTR -352[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 33
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR counter[rip], rax
	mov	rax, QWORD PTR counter[rip]
	cmp	rax, -1
	jne	.L2
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 23
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L2:
	cmp	DWORD PTR -340[rbp], 2
	jne	.L3
	mov	rax, QWORD PTR -352[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L3
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	sigprocmask@PLT
	lea	rax, -144[rbp]
	mov	esi, 17
	mov	rdi, rax
	call	sigaddset@PLT
	lea	rdx, -272[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	sigprocmask@PLT
.L3:
	mov	DWORD PTR -316[rbp], 0
	jmp	.L4
.L8:
	call	getpid@PLT
	mov	esi, 17
	mov	edi, eax
	call	kill@PLT
	call	fork@PLT
	mov	DWORD PTR -320[rbp], eax
	cmp	DWORD PTR -320[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR counter[rip]
	mov	edx, 1
	lock xadd	QWORD PTR [rax], rdx
	mov	QWORD PTR -280[rbp], rdx
	mov	edi, 0
	call	exit@PLT
.L5:
	cmp	DWORD PTR -320[rbp], 0
	jle	.L6
	mov	rax, QWORD PTR counter[rip]
	mov	edx, 1
	lock xadd	QWORD PTR [rax], rdx
	mov	QWORD PTR -280[rbp], rdx
	jmp	.L11
.L6:
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	add	DWORD PTR -316[rbp], 1
.L4:
	cmp	DWORD PTR -316[rbp], 999
	jle	.L8
	lea	rcx, -324[rbp]
	mov	eax, DWORD PTR -320[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	QWORD PTR -304[rbp], 2000
	mov	rax, QWORD PTR counter[rip]
	mov	QWORD PTR -296[rbp], rax
	mov	rax, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -312[rbp], rax
	mov	rax, QWORD PTR -312[rbp]
	mov	QWORD PTR -288[rbp], rax
	mov	rdx, QWORD PTR -288[rbp]
	mov	rax, QWORD PTR -304[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"655975.c"
	.text
	.local	counter
	.comm	counter,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/655975.c\000"
	.align	2
.LC1:
	.ascii	"(unsigned long)counter != -1UL\000"
	.align	2
.LC2:
	.ascii	"--block-sigchld\000"
	.global	__sync_fetch_and_add_4
	.align	2
.LC3:
	.ascii	"fork: \000"
	.global	__sync_synchronize
	.align	2
.LC4:
	.ascii	"counter: expected: %lu got: %lu\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #316
	str	r0, [fp, #-312]
	str	r1, [fp, #-316]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #33
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L12+4
	str	r3, [r2]
	ldr	r3, .L12+4
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L2
	ldr	r3, .L12+8
	mov	r2, #23
	ldr	r1, .L12+12
	ldr	r0, .L12+16
	bl	__assert_fail
.L2:
	ldr	r3, [fp, #-312]
	cmp	r3, #2
	bne	.L3
	ldr	r3, [fp, #-316]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L12+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	sub	r3, fp, #144
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	sigprocmask
	sub	r3, fp, #144
	mov	r1, #17
	mov	r0, r3
	bl	sigaddset
	sub	r2, fp, #272
	sub	r3, fp, #144
	mov	r1, r3
	mov	r0, #0
	bl	sigprocmask
.L3:
	mov	r3, #0
	str	r3, [fp, #-292]
	b	.L4
.L8:
	bl	getpid
	mov	r3, r0
	mov	r1, #17
	mov	r0, r3
	bl	kill
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	__sync_fetch_and_add_4
	str	r0, [fp, #-276]
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	ble	.L6
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	__sync_fetch_and_add_4
	str	r0, [fp, #-276]
	b	.L11
.L6:
	ldr	r0, .L12+24
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-292]
	add	r3, r3, #1
	str	r3, [fp, #-292]
.L4:
	ldr	r3, [fp, #-292]
	cmp	r3, #1000
	blt	.L8
	sub	r3, fp, #304
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-296]
	bl	waitpid
	mov	r3, #2000
	str	r3, [fp, #-288]
	ldr	r3, .L12+4
	ldr	r3, [r3]
	str	r3, [fp, #-284]
	ldr	r4, [fp, #-284]
	bl	__sync_synchronize
	ldr	r4, [r4]
	bl	__sync_synchronize
	str	r4, [fp, #-300]
	ldr	r3, [fp, #-300]
	str	r3, [fp, #-280]
	ldr	r2, [fp, #-280]
	ldr	r1, [fp, #-288]
	ldr	r0, .L12+28
	bl	printf
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	counter
	.word	__PRETTY_FUNCTION__.6397
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6397, %object
	.size	__PRETTY_FUNCTION__.6397, 5
__PRETTY_FUNCTION__.6397:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
