	.file	"703350.c"
	.intel_syntax noprefix
	.text
	.local	mypid
	.comm	mypid,4,4
	.section	.rodata
.LC0:
	.string	"fork"
	.text
	.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, 16
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	warn@PLT
.L2:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dofork, .-dofork
	.section	.rodata
	.align 8
.LC1:
	.string	"pid mismatch (%d, should be %d) - your vm is broken!"
	.text
	.type	check, @function
check:
.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, 16
	call	getpid@PLT
	mov	DWORD PTR mypid[rip], eax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L7:
	mov	eax, DWORD PTR mypid[rip]
	mov	DWORD PTR -8[rbp], eax
	call	getpid@PLT
	mov	edx, DWORD PTR -8[rbp]
	cmp	eax, edx
	je	.L6
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L6:
	add	DWORD PTR -4[rbp], 1
.L5:
	cmp	DWORD PTR -4[rbp], 799
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	check, .-check
	.section	.rodata
.LC2:
	.string	"waitpid"
.LC3:
	.string	"pid %d: exit %d"
	.text
	.type	dowait, @function
dowait:
.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	DWORD PTR -24[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -24[rbp], 0
	js	.L15
	cmp	DWORD PTR -24[rbp], 0
	jne	.L11
	mov	edi, 0
	call	exit@PLT
.L11:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L8
	lea	rcx, -12[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	waitpid@PLT
	test	eax, eax
	jns	.L13
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	warn@PLT
	jmp	.L8
.L13:
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	je	.L8
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	warnx@PLT
	jmp	.L8
.L15:
	nop
.L8:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dowait, .-dowait
	.type	test, @function
test:
.LFB9:
	.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	dofork
	mov	DWORD PTR -16[rbp], eax
	mov	edi, 48
	call	putchar@PLT
	call	check
	call	dofork
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 49
	call	putchar@PLT
	call	check
	call	dofork
	mov	DWORD PTR -8[rbp], eax
	mov	edi, 50
	call	putchar@PLT
	call	check
	call	dofork
	mov	DWORD PTR -4[rbp], eax
	mov	edi, 51
	call	putchar@PLT
	call	check
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dowait
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dowait
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dowait
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dowait
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	test, .-test
	.section	.rodata
.LC4:
	.string	"-w"
.LC5:
	.string	"usage: forktest [-w]"
.LC6:
	.string	"Starting."
.LC7:
	.string	"Complete."
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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	DWORD PTR -4[rbp], 0
	cmp	DWORD PTR -20[rbp], 2
	jne	.L18
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L18
	mov	DWORD PTR -4[rbp], 1
	jmp	.L19
.L18:
	cmp	DWORD PTR -20[rbp], 1
	je	.L19
	cmp	DWORD PTR -20[rbp], 0
	je	.L19
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	warnx@PLT
	mov	eax, 1
	jmp	.L20
.L19:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	warnx@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	test
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	warnx@PLT
	mov	eax, 0
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"703350.c"
	.text
	.local	mypid
	.comm	mypid,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"fork\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dofork, %function
dofork:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L4
	bl	warn
.L2:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	dofork, .-dofork
	.section	.rodata
	.align	2
.LC1:
	.ascii	"pid mismatch (%d, should be %d) - your vm is broken"
	.ascii	"!\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check, %function
check:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	bl	getpid
	mov	r3, r0
	ldr	r2, .L10
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L7
.L9:
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L8
	ldr	r4, [fp, #-20]
	bl	getpid
	mov	r3, r0
	mov	r2, r4
	ldr	r1, .L10+4
	mov	r0, #1
	bl	errx
.L8:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #800
	blt	.L9
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	mypid
	.word	.LC1
	.size	check, .-check
	.section	.rodata
	.align	2
.LC2:
	.ascii	"waitpid\000"
	.align	2
.LC3:
	.ascii	"pid %d: exit %d\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.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, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	blt	.L19
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L15
	mov	r0, #0
	bl	exit
.L15:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L12
	sub	r3, fp, #12
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L20+4
	bl	warn
	b	.L12
.L17:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-12]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, .L20+8
	bl	warnx
	b	.L12
.L19:
	nop
.L12:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.size	dowait, .-dowait
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test, %function
test:
	@ 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]
	bl	dofork
	str	r0, [fp, #-20]
	mov	r0, #48
	bl	putchar
	bl	check
	bl	dofork
	str	r0, [fp, #-16]
	mov	r0, #49
	bl	putchar
	bl	check
	bl	dofork
	str	r0, [fp, #-12]
	mov	r0, #50
	bl	putchar
	bl	check
	bl	dofork
	str	r0, [fp, #-8]
	mov	r0, #51
	bl	putchar
	bl	check
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-24]
	bl	dowait
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	dowait
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	dowait
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	dowait
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	test, .-test
	.section	.rodata
	.align	2
.LC5:
	.ascii	"-w\000"
	.align	2
.LC6:
	.ascii	"usage: forktest [-w]\000"
	.align	2
.LC7:
	.ascii	"Starting.\000"
	.align	2
.LC8:
	.ascii	"Complete.\000"
	.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
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L24
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L27
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L24
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L25
.L24:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	beq	.L25
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L25
	ldr	r0, .L27+4
	bl	warnx
	mov	r3, #1
	b	.L26
.L25:
	ldr	r0, .L27+8
	bl	warnx
	ldr	r0, [fp, #-8]
	bl	test
	ldr	r0, .L27+12
	bl	warnx
	mov	r3, #0
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
