	.file	"515462.c"
	.intel_syntax noprefix
	.text
	.globl	pid
	.bss
	.align 4
	.type	pid, @object
	.size	pid, 4
pid:
	.zero	4
	.globl	counter
	.align 4
	.type	counter, @object
	.size	counter, 4
counter:
	.zero	4
	.section	.rodata
.LC0:
	.string	"counter = %d\n"
	.text
	.globl	handler1
	.type	handler1, @function
handler1:
.LFB0:
	.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
	mov	eax, DWORD PTR counter[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR pid[rip]
	mov	esi, 10
	mov	edi, eax
	call	kill@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	handler1, .-handler1
	.globl	handler2
	.type	handler2, @function
handler2:
.LFB1:
	.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR counter[rip]
	add	eax, 3
	mov	DWORD PTR counter[rip], eax
	mov	eax, DWORD PTR counter[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE1:
	.size	handler2, .-handler2
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, handler1[rip]
	mov	edi, 10
	call	signal@PLT
	call	fork@PLT
	mov	DWORD PTR pid[rip], eax
	mov	eax, DWORD PTR pid[rip]
	test	eax, eax
	jne	.L4
	lea	rsi, handler2[rip]
	mov	edi, 10
	call	signal@PLT
	mov	eax, 0
	call	getppid@PLT
	mov	esi, 10
	mov	edi, eax
	call	kill@PLT
.L5:
	jmp	.L5
.L4:
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jle	.L6
	mov	eax, DWORD PTR counter[rip]
	add	eax, 4
	mov	DWORD PTR counter[rip], eax
	mov	eax, DWORD PTR counter[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"515462.c"
	.text
	.comm	pid,4,4
	.global	counter
	.bss
	.align	2
	.type	counter, %object
	.size	counter, 4
counter:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"counter = %d\012\000"
	.text
	.align	2
	.global	handler1
	.syntax unified
	.arm
	.fpu softvfp
	.type	handler1, %function
handler1:
	@ 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, .L2
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L2
	str	r3, [r2]
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L2+4
	bl	printf
	ldr	r3, .L2+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L2+12
	ldr	r3, [r3]
	mov	r1, #10
	mov	r0, r3
	bl	kill
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	counter
	.word	.LC0
	.word	stdout
	.word	pid
	.size	handler1, .-handler1
	.align	2
	.global	handler2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handler2, %function
handler2:
	@ 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, .L5
	ldr	r3, [r3]
	add	r3, r3, #3
	ldr	r2, .L5
	str	r3, [r2]
	ldr	r3, .L5
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L5+4
	bl	printf
	mov	r0, #0
	bl	exit
.L6:
	.align	2
.L5:
	.word	counter
	.word	.LC0
	.size	handler2, .-handler2
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L13+4
	mov	r0, #10
	bl	signal
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L13+8
	str	r2, [r3]
	ldr	r3, .L13+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	ldr	r1, .L13+12
	mov	r0, #10
	bl	signal
	bl	getppid
	mov	r3, r0
	mov	r1, #10
	mov	r0, r3
	bl	kill
.L9:
	b	.L9
.L8:
	sub	r3, fp, #16
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L10
	ldr	r3, .L13+16
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, .L13+16
	str	r3, [r2]
	ldr	r3, .L13+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+20
	bl	printf
.L10:
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC1
	.word	handler1
	.word	pid
	.word	handler2
	.word	counter
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
