	.file	"extr_pipeselect.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"1..20\n"
.LC1:
	.string	"mkfifo"
.LC2:
	.string	"socketpair"
.LC3:
	.string	"pipe"
.LC4:
	.string	"fork"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rdi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, 1
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rbp, rsp
	call	printf@PLT
	mov	edi, DWORD PTR stdout[rip]
	call	fflush@PLT
	mov	esi, DWORD PTR catch[rip]
	mov	edi, DWORD PTR SIGUSR1[rip]
	call	signal@PLT
	xor	eax, eax
	call	getpid@PLT
	mov	DWORD PTR filetype[rip], 0
	mov	DWORD PTR ppid[rip], eax
	mov	eax, DWORD PTR FT_END[rip]
	test	eax, eax
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L2:
	mov	QWORD PTR state[rip], 0
	call	fork@PLT
	mov	DWORD PTR cpid[rip], eax
	cmp	eax, -1
	je	.L10
	test	eax, eax
	je	.L11
	mov	edi, DWORD PTR [rsp]
	call	close@PLT
	mov	edi, DWORD PTR 4[rsp]
	call	parent@PLT
	mov	eax, DWORD PTR filetype[rip]
	cmp	eax, 130
	je	.L14
.L35:
	add	eax, 1
	add	ebx, 4
	cmp	eax, DWORD PTR FT_END[rip]
	mov	DWORD PTR filetype[rip], eax
	jge	.L16
	cmp	eax, 129
	je	.L3
	cmp	eax, 130
	jne	.L33
	mov	edi, DWORD PTR FIFONAME[rip]
	mov	esi, 438
	call	mkfifo@PLT
	test	eax, eax
	jne	.L34
.L7:
	mov	QWORD PTR [rsp], -1
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rsi, .LC4[rip]
	mov	edi, 1
	call	err@PLT
.L11:
	mov	edi, DWORD PTR 4[rsp]
	call	close@PLT
	mov	edi, DWORD PTR [rsp]
	mov	esi, ebx
	call	child@PLT
	mov	eax, DWORD PTR filetype[rip]
	cmp	eax, 130
	jne	.L35
.L14:
	mov	DWORD PTR filetype[rip], 131
	add	ebx, 12
	cmp	DWORD PTR FT_END[rip], 131
	jg	.L2
.L16:
	mov	edi, DWORD PTR FIFONAME[rip]
	call	unlink@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L36
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	cmp	eax, 128
	jne	.L2
	mov	edx, DWORD PTR AF_UNSPEC[rip]
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	rcx, rbp
	mov	edi, DWORD PTR AF_UNIX[rip]
	call	socketpair@PLT
	test	eax, eax
	je	.L2
	lea	rsi, .LC2[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, rbp
	call	pipe@PLT
	test	eax, eax
	je	.L2
	lea	rsi, .LC3[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L34:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L7
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	stdout,4,4
	.comm	state,8,8
	.comm	ppid,4,4
	.comm	filetype,4,4
	.comm	cpid,4,4
	.comm	catch,4,4
	.comm	SOCK_STREAM,4,4
	.comm	SIGUSR1,4,4
	.comm	FT_END,4,4
	.comm	FIFONAME,4,4
	.comm	AF_UNSPEC,4,4
	.comm	AF_UNIX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pipeselect.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"1..20\012\000"
	.align	2
.LC1:
	.ascii	"mkfifo\000"
	.align	2
.LC2:
	.ascii	"socketpair\000"
	.align	2
.LC3:
	.ascii	"pipe\000"
	.align	2
.LC4:
	.ascii	"fork\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L37
	sub	sp, sp, #20
	ldr	r0, .L37+4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	printf
	ldr	r3, .L37+8
	ldr	r6, .L37+12
	ldr	r0, [r3]
	bl	fflush
	ldr	r2, .L37+16
	ldr	r3, .L37+20
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	signal
	bl	getpid
	mov	r3, #0
	ldr	r1, [r6]
	ldr	r2, .L37+24
	ldr	r5, .L37+28
	cmp	r1, r3
	str	r0, [r2]
	str	r3, [r5]
	ble	.L32
	mov	r4, #1
	ldr	r9, .L37+32
	ldr	r8, .L37+36
	ldr	r7, .L37+40
	ldr	r10, .L37+44
	ldr	fp, .L37+48
.L2:
	mov	r3, #0
	str	r3, [r8]
	bl	fork
	cmn	r0, #1
	str	r0, [r7]
	beq	.L10
	cmp	r0, #0
	beq	.L11
	ldr	r0, [sp, #4]
	bl	close
	ldr	r0, [sp, #8]
	bl	parent
	ldr	r3, [r5]
	cmp	r3, #130
	beq	.L14
.L35:
	ldr	r2, [r6]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r5]
	add	r4, r4, #4
	bge	.L16
	cmp	r3, #129
	beq	.L3
	cmp	r3, #130
	bne	.L33
	ldr	r1, .L37+52
	ldr	r0, [r9]
	bl	mkfifo
	cmp	r0, #0
	bne	.L34
.L7:
	mvn	r3, #0
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	b	.L2
.L10:
	mov	r1, r10
	mov	r0, #1
	bl	err
.L11:
	ldr	r0, [sp, #8]
	bl	close
	mov	r1, r4
	ldr	r0, [sp, #4]
	bl	child
	ldr	r3, [r5]
	cmp	r3, #130
	bne	.L35
.L14:
	mov	r3, #131
	ldr	r2, [r6]
	add	r4, r4, #12
	cmp	r2, r3
	str	r3, [r5]
	bgt	.L2
.L16:
	ldr	r0, [r9]
	bl	unlink
	ldr	r3, .L37
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	cmp	r3, #128
	bne	.L2
	ldr	r1, .L37+56
	ldr	r0, .L37+60
	ldr	r2, [fp]
	ldr	r1, [r1]
	ldr	r0, [r0]
	add	r3, sp, #4
	bl	socketpair
	cmp	r0, #0
	beq	.L2
	ldr	r1, .L37+64
	mov	r0, #1
	bl	err
	b	.L2
.L3:
	add	r0, sp, #4
	bl	pipe
	cmp	r0, #0
	beq	.L2
	ldr	r1, .L37+68
	mov	r0, #1
	bl	err
	b	.L2
.L34:
	ldr	r1, .L37+72
	mov	r0, #1
	bl	err
	b	.L7
.L32:
	ldr	r9, .L37+32
	b	.L16
.L36:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	.LC5
	.word	.LC0
	.word	stdout
	.word	FT_END
	.word	catch
	.word	SIGUSR1
	.word	ppid
	.word	filetype
	.word	FIFONAME
	.word	state
	.word	cpid
	.word	.LC4
	.word	AF_UNSPEC
	.word	438
	.word	SOCK_STREAM
	.word	AF_UNIX
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.size	main, .-main
	.comm	stdout,4,4
	.comm	state,4,4
	.comm	ppid,4,4
	.comm	filetype,4,4
	.comm	cpid,4,4
	.comm	catch,4,4
	.comm	SOCK_STREAM,4,4
	.comm	SIGUSR1,4,4
	.comm	FT_END,4,4
	.comm	FIFONAME,4,4
	.comm	AF_UNSPEC,4,4
	.comm	AF_UNIX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
