	.file	"97012614.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"fork %d"
	.text
	.globl	dofork
	.type	dofork, @function
dofork:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L2
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L2:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L3
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 64
	mov	edi, eax
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	_exit@PLT
.L3:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dofork, .-dofork
	.section	.rodata
.LC1:
	.string	"waitpid 1"
	.text
	.globl	dowait
	.type	dowait, @function
dowait:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	waitpid@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	warnx@PLT
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -12[rbp]
	sar	eax, 8
	movzx	eax, al
	cmp	DWORD PTR -24[rbp], eax
	jne	.L5
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 96
	mov	edi, eax
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
	jmp	.L5
.L8:
	mov	edi, 120
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dowait, .-dowait
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	edi, 80
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	edi, 1
	call	dofork
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 80
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	edi, 2
	call	dofork
	mov	DWORD PTR -8[rbp], eax
	mov	edi, 80
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	edi, 3
	call	dofork
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dowait
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, 2
	mov	edi, eax
	call	dowait
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 3
	mov	edi, eax
	call	dowait
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"97012614.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"fork %d\000"
	.text
	.align	2
	.global	dofork
	.syntax unified
	.arm
	.fpu softvfp
	.type	dofork, %function
dofork:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L2
	ldr	r2, [fp, #-16]
	ldr	r1, .L5
	mov	r0, #1
	bl	errx
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-16]
	add	r3, r3, #64
	mov	r0, r3
	bl	putchar
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-16]
	bl	_exit
.L3:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	dofork, .-dofork
	.section	.rodata
	.align	2
.LC1:
	.ascii	"waitpid 1\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dowait
	.syntax unified
	.arm
	.fpu softvfp
	.type	dowait, %function
dowait:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #12
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L13+4
	bl	warnx
	b	.L7
.L8:
	ldr	r3, [fp, #-12]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L7
	ldr	r3, [fp, #-20]
	add	r3, r3, #96
	mov	r0, r3
	bl	putchar
	mov	r0, #10
	bl	putchar
	b	.L7
.L10:
	mov	r0, #120
	bl	putchar
	mov	r0, #10
	bl	putchar
.L7:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	.LC1
	.size	dowait, .-dowait
	.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, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r0, #80
	bl	putchar
	mov	r0, #10
	bl	putchar
	mov	r0, #1
	bl	dofork
	str	r0, [fp, #-16]
	mov	r0, #80
	bl	putchar
	mov	r0, #10
	bl	putchar
	mov	r0, #2
	bl	dofork
	str	r0, [fp, #-12]
	mov	r0, #80
	bl	putchar
	mov	r0, #10
	bl	putchar
	mov	r0, #3
	bl	dofork
	str	r0, [fp, #-8]
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	dowait
	mov	r1, #2
	ldr	r0, [fp, #-12]
	bl	dowait
	mov	r1, #3
	ldr	r0, [fp, #-8]
	bl	dowait
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
