	.file	"74273.c"
	.intel_syntax noprefix
	.text
	.type	say, @function
say:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	QWORD PTR -8[rbp], 1
.L2:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	say, .-say
	.section	.rodata
.LC0:
	.string	"waitpid"
	.align 8
.LC1:
	.string	"pid %d (subprocess %u): Signal %d"
	.align 8
.LC2:
	.string	"pid %d (subprocess %u): Exit %d"
	.text
	.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, -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L5
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	warn@PLT
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -16[rbp]
	and	eax, 127
	add	eax, 1
	sar	al
	test	al, al
	jle	.L7
	mov	eax, DWORD PTR -16[rbp]
	and	eax, 127
	mov	ecx, eax
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	warnx@PLT
	jmp	.L4
.L7:
	mov	eax, DWORD PTR -16[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR -16[rbp]
	sar	eax, 8
	movzx	eax, al
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR -16[rbp]
	sar	eax, 8
	movzx	ecx, al
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	warnx@PLT
.L4:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dowait, .-dowait
	.section	.rodata
.LC3:
	.string	"sem:usemtest.%s%u"
.LC4:
	.string	"%s: create"
	.text
	.type	usem_init, @function
usem_init:
.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	r8d, ecx
	mov	rcx, rdx
	lea	rdx, .LC3[rip]
	mov	esi, 32
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 436
	mov	esi, 578
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 32[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	test	eax, eax
	jns	.L11
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 32[rax], -1
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	usem_init, .-usem_init
	.section	.rodata
.LC5:
	.string	"%s: open"
	.text
	.type	usem_open, @function
usem_open:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 32[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	test	eax, eax
	jns	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	usem_open, .-usem_open
	.section	.rodata
.LC6:
	.string	"%s: close"
	.text
	.type	usem_close, @function
usem_close:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L17
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	warn@PLT
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	usem_close, .-usem_close
	.type	usem_cleanup, @function
usem_cleanup:
.LFB11:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	remove@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	usem_cleanup, .-usem_cleanup
	.section	.rodata
.LC7:
	.string	"%s: read"
.LC8:
	.string	"%s: read: unexpected EOF"
	.text
	.type	P, @function
P:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	lea	rcx, -17[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jns	.L20
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L20:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	lea	rsi, .LC8[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L23:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	P, .-P
	.section	.rodata
.LC9:
	.string	"%s: write"
.LC10:
	.string	"%s: write: short count"
	.text
	.type	V, @function
V:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	lea	rcx, -17[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jns	.L25
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	lea	rsi, .LC9[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L25:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L28
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	lea	rsi, .LC10[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L28:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	V, .-V
	.type	child_plain, @function
child_plain:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	eax, DWORD PTR -36[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, strings.0[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L30
.L31:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	P
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	say
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	V
	add	DWORD PTR -12[rbp], 1
.L30:
	cmp	DWORD PTR -12[rbp], 9
	jbe	.L31
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	child_plain, .-child_plain
	.type	child_with_own_fd, @function
child_with_own_fd:
.LFB15:
	.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	usem_open
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	usem_open
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	child_plain
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	usem_close
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	usem_close
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	child_with_own_fd, .-child_with_own_fd
	.section	.rodata
.LC11:
	.string	"Once...\n"
.LC12:
	.string	"Twice...\n"
.LC13:
	.string	"Three times...\n"
	.text
	.type	baseparent, @function
baseparent:
.LFB16:
	.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
	mov	DWORD PTR -8[rbp], 0
	jmp	.L34
.L35:
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	usem_open
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	usem_open
	add	DWORD PTR -8[rbp], 1
.L34:
	cmp	DWORD PTR -8[rbp], 3
	jbe	.L35
	lea	rdi, .LC11[rip]
	call	say
	mov	DWORD PTR -4[rbp], 0
	jmp	.L36
.L39:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L37
.L38:
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 32
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L37:
	cmp	DWORD PTR -8[rbp], 3
	jbe	.L38
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L36:
	cmp	DWORD PTR -4[rbp], 2
	jbe	.L39
	lea	rdi, .LC12[rip]
	call	say
	mov	DWORD PTR -4[rbp], 0
	jmp	.L40
.L43:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L41
.L42:
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 32
	call	putchar@PLT
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 32
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L41:
	cmp	DWORD PTR -8[rbp], 3
	jbe	.L42
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L40:
	cmp	DWORD PTR -4[rbp], 1
	jbe	.L43
	lea	rdi, .LC13[rip]
	call	say
	mov	DWORD PTR -4[rbp], 0
	jmp	.L44
.L47:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L45
.L46:
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 32
	call	putchar@PLT
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 32
	call	putchar@PLT
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L45:
	cmp	DWORD PTR -8[rbp], 3
	jbe	.L46
	add	DWORD PTR -4[rbp], 1
.L44:
	cmp	DWORD PTR -4[rbp], 0
	je	.L47
	mov	DWORD PTR -8[rbp], 0
	jmp	.L48
.L49:
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	usem_close
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	usem_close
	add	DWORD PTR -8[rbp], 1
.L48:
	cmp	DWORD PTR -8[rbp], 3
	jbe	.L49
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	baseparent, .-baseparent
	.section	.rodata
.LC14:
	.string	"g"
.LC15:
	.string	"w"
.LC16:
	.string	"fork"
	.text
	.type	basetest, @function
basetest:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 336
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -324[rbp], 0
	jmp	.L51
.L52:
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rcx, rax
	mov	eax, DWORD PTR -324[rbp]
	mov	edx, eax
	lea	rsi, .LC14[rip]
	mov	rdi, rcx
	call	usem_init
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rcx, rax
	mov	eax, DWORD PTR -324[rbp]
	mov	edx, eax
	lea	rsi, .LC15[rip]
	mov	rdi, rcx
	call	usem_init
	add	DWORD PTR -324[rbp], 1
.L51:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L52
	mov	DWORD PTR -324[rbp], 0
	jmp	.L53
.L56:
	call	fork@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -324[rbp]
	mov	DWORD PTR -320[rbp+rax*4], edx
	mov	eax, DWORD PTR -324[rbp]
	mov	eax, DWORD PTR -320[rbp+rax*4]
	test	eax, eax
	jns	.L54
	lea	rsi, .LC16[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L54:
	mov	eax, DWORD PTR -324[rbp]
	mov	eax, DWORD PTR -320[rbp+rax*4]
	test	eax, eax
	jne	.L55
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	lea	rsi, [rcx+rax]
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rcx, rax
	mov	eax, DWORD PTR -324[rbp]
	mov	edx, eax
	mov	rdi, rcx
	call	child_with_own_fd
	mov	edi, 0
	call	_exit@PLT
.L55:
	add	DWORD PTR -324[rbp], 1
.L53:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L56
	lea	rdx, -160[rbp]
	lea	rax, -304[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	baseparent
	mov	DWORD PTR -324[rbp], 0
	jmp	.L57
.L58:
	mov	eax, DWORD PTR -324[rbp]
	mov	eax, DWORD PTR -320[rbp+rax*4]
	mov	edx, DWORD PTR -324[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dowait
	add	DWORD PTR -324[rbp], 1
.L57:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L58
	mov	DWORD PTR -324[rbp], 0
	jmp	.L59
.L60:
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_cleanup
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_cleanup
	add	DWORD PTR -324[rbp], 1
.L59:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L60
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L61
	call	__stack_chk_fail@PLT
.L61:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	basetest, .-basetest
	.type	concparent, @function
concparent:
.LFB18:
	.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
	mov	DWORD PTR -4[rbp], 0
	jmp	.L63
.L66:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L64
.L65:
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	V
	mov	edx, DWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	P
	mov	edi, 32
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L64:
	cmp	DWORD PTR -8[rbp], 3
	jbe	.L65
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L63:
	cmp	DWORD PTR -4[rbp], 9
	jbe	.L66
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	concparent, .-concparent
	.section	.rodata
.LC17:
	.string	"Shoot...\n"
	.text
	.type	conctest, @function
conctest:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 336
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC17[rip]
	call	say
	mov	DWORD PTR -324[rbp], 0
	jmp	.L68
.L69:
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rcx, rax
	mov	eax, DWORD PTR -324[rbp]
	mov	edx, eax
	lea	rsi, .LC14[rip]
	mov	rdi, rcx
	call	usem_init
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rcx, rax
	mov	eax, DWORD PTR -324[rbp]
	mov	edx, eax
	lea	rsi, .LC15[rip]
	mov	rdi, rcx
	call	usem_init
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_open
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_open
	add	DWORD PTR -324[rbp], 1
.L68:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L69
	mov	DWORD PTR -324[rbp], 0
	jmp	.L70
.L73:
	call	fork@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -324[rbp]
	mov	DWORD PTR -320[rbp+rax*4], edx
	mov	eax, DWORD PTR -324[rbp]
	mov	eax, DWORD PTR -320[rbp+rax*4]
	test	eax, eax
	jns	.L71
	lea	rsi, .LC16[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L71:
	mov	eax, DWORD PTR -324[rbp]
	mov	eax, DWORD PTR -320[rbp+rax*4]
	test	eax, eax
	jne	.L72
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	lea	rsi, [rcx+rax]
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rcx, rax
	mov	eax, DWORD PTR -324[rbp]
	mov	edx, eax
	mov	rdi, rcx
	call	child_plain
	mov	edi, 0
	call	_exit@PLT
.L72:
	add	DWORD PTR -324[rbp], 1
.L70:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L73
	lea	rdx, -160[rbp]
	lea	rax, -304[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	concparent
	mov	DWORD PTR -324[rbp], 0
	jmp	.L74
.L75:
	mov	eax, DWORD PTR -324[rbp]
	mov	eax, DWORD PTR -320[rbp+rax*4]
	mov	edx, DWORD PTR -324[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dowait
	add	DWORD PTR -324[rbp], 1
.L74:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L75
	mov	DWORD PTR -324[rbp], 0
	jmp	.L76
.L77:
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_close
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_close
	lea	rcx, -304[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_cleanup
	lea	rcx, -160[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rdi, rax
	call	usem_cleanup
	add	DWORD PTR -324[rbp], 1
.L76:
	cmp	DWORD PTR -324[rbp], 3
	jbe	.L77
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L78
	call	__stack_chk_fail@PLT
.L78:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	conctest, .-conctest
	.section	.rodata
.LC18:
	.string	"Passed.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	basetest
	call	conctest
	lea	rdi, .LC18[rip]
	call	say
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	main, .-main
	.section	.rodata
.LC19:
	.string	"Nitwit!"
.LC20:
	.string	"Blubber!"
.LC21:
	.string	"Oddment!"
.LC22:
	.string	"Tweak!"
	.section	.data.rel.ro.local,"aw"
	.align 32
	.type	strings.0, @object
	.size	strings.0, 32
strings.0:
	.quad	.LC19
	.quad	.LC20
	.quad	.LC21
	.quad	.LC22
	.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	"74273.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	say, %function
say:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	say, .-say
	.section	.rodata
	.align	2
.LC0:
	.ascii	"waitpid\000"
	.align	2
.LC1:
	.ascii	"pid %d (subprocess %u): Signal %d\000"
	.align	2
.LC2:
	.ascii	"pid %d (subprocess %u): Exit %d\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dowait, %function
dowait:
	@ 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]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	waitpid
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L10+4
	bl	warn
	b	.L4
.L5:
	ldr	r3, [fp, #-16]
	and	r3, r3, #255
	and	r3, r3, #127
	and	r3, r3, #255
	add	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	asr	r3, r3, #1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	cmp	r3, #0
	ble	.L7
	ldr	r3, [fp, #-16]
	and	r3, r3, #127
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	ldr	r0, .L10+8
	bl	warnx
	b	.L4
.L7:
	ldr	r3, [fp, #-16]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-16]
	asr	r3, r3, #8
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-16]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	ldr	r0, .L10+12
	bl	warnx
.L4:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	dowait, .-dowait
	.section	.rodata
	.align	2
.LC4:
	.ascii	"sem:usemtest.%s%u\000"
	.align	2
.LC5:
	.ascii	"%s: create\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usem_init, %function
usem_init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, [fp, #-12]
	ldr	r2, .L14
	mov	r1, #32
	bl	snprintf
	ldr	r3, [fp, #-8]
	mov	r2, #436
	ldr	r1, .L14+4
	mov	r0, r3
	bl	open
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	cmp	r3, #0
	bge	.L13
	ldr	r3, [fp, #-8]
	mov	r2, r3
	ldr	r1, .L14+8
	mov	r0, #1
	bl	err
.L13:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-8]
	mvn	r2, #0
	str	r2, [r3, #32]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	578
	.word	.LC5
	.size	usem_init, .-usem_init
	.section	.rodata
	.align	2
.LC6:
	.ascii	"%s: open\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usem_open, %function
usem_open:
	@ 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, [fp, #-8]
	mov	r1, #2
	mov	r0, r3
	bl	open
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	cmp	r3, #0
	bge	.L18
	ldr	r3, [fp, #-8]
	mov	r2, r3
	ldr	r1, .L19
	mov	r0, #1
	bl	err
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC6
	.size	usem_open, .-usem_open
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%s: close\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usem_close, %function
usem_close:
	@ 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, [fp, #-8]
	ldr	r3, [r3, #32]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L23
	ldr	r3, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L24
	bl	warn
.L23:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC7
	.size	usem_close, .-usem_close
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usem_cleanup, %function
usem_cleanup:
	@ 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, [fp, #-8]
	mov	r0, r3
	bl	remove
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	usem_cleanup, .-usem_cleanup
	.section	.rodata
	.align	2
.LC8:
	.ascii	"%s: read\000"
	.align	2
.LC9:
	.ascii	"%s: read: unexpected EOF\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	P, %function
P:
	@ 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]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #32]
	sub	r1, fp, #13
	mov	r2, #1
	mov	r0, r3
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L28
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, .L32+4
	mov	r0, #1
	bl	err
.L28:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L31
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, .L32+8
	mov	r0, #1
	bl	errx
.L31:
	nop
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC10
	.word	.LC8
	.word	.LC9
	.size	P, .-P
	.section	.rodata
	.align	2
.LC11:
	.ascii	"%s: write\000"
	.align	2
.LC12:
	.ascii	"%s: write: short count\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	V, %function
V:
	@ 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]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #32]
	sub	r1, fp, #13
	mov	r2, #1
	mov	r0, r3
	bl	write
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L35
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, .L39+4
	mov	r0, #1
	bl	err
.L35:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L38
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, .L39+8
	mov	r0, #1
	bl	errx
.L38:
	nop
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC13
	.word	.LC11
	.word	.LC12
	.size	V, .-V
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	child_plain, %function
child_plain:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, .L44
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L42
.L43:
	ldr	r0, [fp, #-16]
	bl	P
	ldr	r0, [fp, #-8]
	bl	say
	ldr	r0, [fp, #-20]
	bl	V
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L42:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	bls	.L43
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	strings.5866
	.size	child_plain, .-child_plain
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	child_with_own_fd, %function
child_with_own_fd:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	usem_open
	ldr	r0, [fp, #-12]
	bl	usem_open
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	child_plain
	ldr	r0, [fp, #-8]
	bl	usem_close
	ldr	r0, [fp, #-12]
	bl	usem_close
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	child_with_own_fd, .-child_with_own_fd
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Once...\012\000"
	.align	2
.LC15:
	.ascii	"Twice...\012\000"
	.align	2
.LC16:
	.ascii	"Three times...\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	baseparent, %function
baseparent:
	@ 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, #-12]
	b	.L48
.L49:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	usem_open
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	usem_open
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L48:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L49
	ldr	r0, .L64
	bl	say
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L50
.L53:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L51
.L52:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #32
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L51:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L52
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L50:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bls	.L53
	ldr	r0, .L64+4
	bl	say
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L54
.L57:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L55
.L56:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #32
	bl	putchar
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #32
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L55:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L56
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bls	.L57
	ldr	r0, .L64+8
	bl	say
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L58
.L61:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L59
.L60:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #32
	bl	putchar
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #32
	bl	putchar
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L59:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L60
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L58:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L61
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L62
.L63:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	usem_close
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	usem_close
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L62:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L63
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	baseparent, .-baseparent
	.section	.rodata
	.align	2
.LC17:
	.ascii	"g\000"
	.align	2
.LC18:
	.ascii	"w\000"
	.align	2
.LC19:
	.ascii	"fork\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	basetest, %function
basetest:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	ldr	r3, .L78
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L67
.L68:
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-316]
	ldr	r1, .L78+4
	mov	r0, r3
	bl	usem_init
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-316]
	ldr	r1, .L78+8
	mov	r0, r3
	bl	usem_init
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L67:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L68
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L69
.L72:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-308]
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-308]
	cmp	r3, #0
	bge	.L70
	ldr	r1, .L78+12
	mov	r0, #1
	bl	err
.L70:
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-308]
	cmp	r3, #0
	bne	.L71
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r0, r1, r3
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-316]
	mov	r1, r3
	bl	child_with_own_fd
	mov	r0, #0
	bl	_exit
.L71:
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L69:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L72
	sub	r2, fp, #152
	sub	r3, fp, #296
	mov	r1, r2
	mov	r0, r3
	bl	baseparent
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L73
.L74:
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-308]
	ldr	r1, [fp, #-316]
	mov	r0, r3
	bl	dowait
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L73:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L74
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L75
.L76:
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_cleanup
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_cleanup
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L75:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L76
	nop
	ldr	r3, .L78
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L77
	bl	__stack_chk_fail
.L77:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L79:
	.align	2
.L78:
	.word	.LC20
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	basetest, .-basetest
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	concparent, %function
concparent:
	@ 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]
	b	.L81
.L84:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L82
.L83:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r0, r3
	bl	V
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	mov	r0, r3
	bl	P
	mov	r0, #32
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L82:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L83
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L81:
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	bls	.L84
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	concparent, .-concparent
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Shoot...\012\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	conctest, %function
conctest:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	ldr	r3, .L97
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L97+4
	bl	say
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L86
.L87:
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-316]
	ldr	r1, .L97+8
	mov	r0, r3
	bl	usem_init
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-316]
	ldr	r1, .L97+12
	mov	r0, r3
	bl	usem_init
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_open
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_open
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L86:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L87
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L88
.L91:
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-308]
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-308]
	cmp	r3, #0
	bge	.L89
	ldr	r1, .L97+16
	mov	r0, #1
	bl	err
.L89:
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-308]
	cmp	r3, #0
	bne	.L90
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r0, r1, r3
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-316]
	mov	r1, r3
	bl	child_plain
	mov	r0, #0
	bl	_exit
.L90:
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L88:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L91
	sub	r2, fp, #152
	sub	r3, fp, #296
	mov	r1, r2
	mov	r0, r3
	bl	concparent
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L92
.L93:
	ldr	r3, [fp, #-316]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-308]
	ldr	r1, [fp, #-316]
	mov	r0, r3
	bl	dowait
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L92:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L93
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L94
.L95:
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_close
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_close
	sub	r1, fp, #296
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_cleanup
	sub	r1, fp, #152
	ldr	r2, [fp, #-316]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	bl	usem_cleanup
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L94:
	ldr	r3, [fp, #-316]
	cmp	r3, #3
	bls	.L95
	nop
	ldr	r3, .L97
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L96
	bl	__stack_chk_fail
.L96:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L98:
	.align	2
.L97:
	.word	.LC22
	.word	.LC21
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	conctest, .-conctest
	.section	.rodata
	.align	2
.LC23:
	.ascii	"Passed.\012\000"
	.text
	.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	basetest
	bl	conctest
	ldr	r0, .L101
	bl	say
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L102:
	.align	2
.L101:
	.word	.LC23
	.size	main, .-main
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Nitwit!\000"
	.align	2
.LC25:
	.ascii	"Blubber!\000"
	.align	2
.LC26:
	.ascii	"Oddment!\000"
	.align	2
.LC27:
	.ascii	"Tweak!\000"
	.align	2
	.type	strings.5866, %object
	.size	strings.5866, 16
strings.5866:
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
