	.file	"625538.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"hog"
	.section	.data.rel.local,"aw"
	.align 16
	.type	hargv, @object
	.size	hargv, 16
hargv:
	.quad	.LC0
	.quad	0
	.section	.rodata
.LC1:
	.string	"cat"
.LC2:
	.string	"catfile"
	.section	.data.rel.local
	.align 16
	.type	cargv, @object
	.size	cargv, 24
cargv:
	.quad	.LC1
	.quad	.LC2
	.quad	0
	.local	pids
	.comm	pids,24,16
	.local	npids
	.comm	npids,4,4
	.section	.rodata
.LC3:
	.string	"fork"
.LC4:
	.string	"%s"
	.text
	.type	spawnv, @function
spawnv:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L2
	cmp	DWORD PTR -4[rbp], 0
	je	.L3
	jmp	.L5
.L2:
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L3:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execv@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L5:
	mov	eax, DWORD PTR npids[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR npids[rip], edx
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, pids[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	spawnv, .-spawnv
	.section	.rodata
.LC5:
	.string	"waitpid for %d"
.LC6:
	.string	"pid %d: exit %d"
	.text
	.type	waitall, @function
waitall:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pids[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	waitpid@PLT
	test	eax, eax
	jns	.L8
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, pids[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	warn@PLT
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -16[rbp]
	test	eax, eax
	je	.L9
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, pids[rip]
	mov	eax, DWORD PTR [rcx+rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	warnx@PLT
.L9:
	add	DWORD PTR -12[rbp], 1
.L7:
	mov	eax, DWORD PTR npids[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L10
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	waitall, .-waitall
	.section	.rodata
.LC7:
	.string	"/testbin/hog"
	.text
	.type	hog, @function
hog:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, hargv[rip]
	lea	rdi, .LC7[rip]
	call	spawnv
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	hog, .-hog
	.section	.rodata
.LC8:
	.string	"/bin/cat"
	.text
	.type	cat, @function
cat:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, cargv[rip]
	lea	rdi, .LC8[rip]
	call	spawnv
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	cat, .-cat
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	hog
	call	hog
	call	hog
	call	cat
	call	waitall
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"625538.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"hog\000"
	.data
	.align	2
	.type	hargv, %object
	.size	hargv, 8
hargv:
	.word	.LC0
	.word	0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"cat\000"
	.align	2
.LC2:
	.ascii	"catfile\000"
	.data
	.align	2
	.type	cargv, %object
	.size	cargv, 12
cargv:
	.word	.LC1
	.word	.LC2
	.word	0
	.local	pids
	.comm	pids,24,4
	.local	npids
	.comm	npids,4,4
	.section	.rodata
	.align	2
.LC3:
	.ascii	"fork\000"
	.align	2
.LC4:
	.ascii	"%s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	spawnv, %function
spawnv:
	@ 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]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L2
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L3
	b	.L5
.L2:
	ldr	r1, .L6
	mov	r0, #1
	bl	err
.L3:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	execv
	ldr	r2, [fp, #-16]
	ldr	r1, .L6+4
	mov	r0, #1
	bl	err
.L5:
	ldr	r3, .L6+8
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L6+8
	str	r2, [r1]
	ldr	r1, .L6+12
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	.LC4
	.word	npids
	.word	pids
	.size	spawnv, .-spawnv
	.section	.rodata
	.align	2
.LC5:
	.ascii	"waitpid for %d\000"
	.align	2
.LC6:
	.ascii	"pid %d: exit %d\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	waitall, %function
waitall:
	@ 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, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L12:
	ldr	r2, .L14+4
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	waitpid
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r2, .L14+4
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L14+8
	bl	warn
	b	.L11
.L10:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L11
	ldr	r2, .L14+4
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L14+12
	bl	warnx
.L11:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r3, .L14+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L12
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC7
	.word	pids
	.word	.LC5
	.word	.LC6
	.word	npids
	.size	waitall, .-waitall
	.section	.rodata
	.align	2
.LC8:
	.ascii	"/testbin/hog\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hog, %function
hog:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L17
	ldr	r0, .L17+4
	bl	spawnv
	nop
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	hargv
	.word	.LC8
	.size	hog, .-hog
	.section	.rodata
	.align	2
.LC9:
	.ascii	"/bin/cat\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cat, %function
cat:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L20
	ldr	r0, .L20+4
	bl	spawnv
	nop
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	cargv
	.word	.LC9
	.size	cat, .-cat
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	hog
	bl	hog
	bl	hog
	bl	cat
	bl	waitall
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
