	.file	"27922.c"
	.intel_syntax noprefix
	.text
	.local	count
	.comm	count,4,4
	.local	writes
	.comm	writes,4,4
	.local	fired
	.comm	fired,4,4
	.local	failures
	.comm	failures,4,4
	.local	pipes
	.comm	pipes,8,8
	.local	num_pipes
	.comm	num_pipes,4,4
	.local	num_active
	.comm	num_active,4,4
	.local	num_writes
	.comm	num_writes,4,4
	.local	events
	.comm	events,8,8
	.section	.rodata
.LC0:
	.string	"e"
	.text
	.type	read_cb, @function
read_cb:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	eax, esi
	mov	QWORD PTR -64[rbp], rdx
	mov	WORD PTR -56[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	QWORD PTR -32[rbp], rax
	lea	rsi, -33[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	js	.L2
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR count[rip]
	add	eax, edx
	mov	DWORD PTR count[rip], eax
	jmp	.L3
.L2:
	mov	eax, DWORD PTR failures[rip]
	add	eax, 1
	mov	DWORD PTR failures[rip], eax
.L3:
	mov	eax, DWORD PTR writes[rip]
	test	eax, eax
	je	.L8
	mov	eax, DWORD PTR num_pipes[rip]
	cdqe
	cmp	QWORD PTR -32[rbp], rax
	jl	.L5
	mov	eax, DWORD PTR num_pipes[rip]
	cdqe
	sub	QWORD PTR -32[rbp], rax
.L5:
	mov	rdx, QWORD PTR pipes[rip]
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 3
	add	rax, 4
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	send@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 1
	je	.L6
	mov	eax, DWORD PTR failures[rip]
	add	eax, 1
	mov	DWORD PTR failures[rip], eax
.L6:
	mov	eax, DWORD PTR writes[rip]
	sub	eax, 1
	mov	DWORD PTR writes[rip], eax
	mov	eax, DWORD PTR fired[rip]
	add	eax, 1
	mov	DWORD PTR fired[rip], eax
.L8:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_cb, .-read_cb
	.section	.rodata
.LC1:
	.string	"Xcount: %d, Rcount: %d\n"
	.text
	.type	run_once, @function
run_once:
.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	rax, QWORD PTR pipes[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], 0
	jmp	.L10
.L12:
	mov	rdx, QWORD PTR events[rip]
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 7
	add	rax, rdx
	mov	rdi, rax
	call	event_initialized@PLT
	test	eax, eax
	je	.L11
	mov	rdx, QWORD PTR events[rip]
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 7
	add	rax, rdx
	mov	rdi, rax
	call	event_del@PLT
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR events[rip]
	mov	rdx, QWORD PTR -8[rbp]
	sal	rdx, 7
	lea	rdi, [rsi+rdx]
	mov	r8, rcx
	lea	rcx, read_cb[rip]
	mov	edx, 18
	mov	esi, eax
	call	event_set@PLT
	mov	rdx, QWORD PTR events[rip]
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 7
	add	rax, rdx
	mov	esi, 0
	mov	rdi, rax
	call	event_add@PLT
	add	QWORD PTR -8[rbp], 1
	add	QWORD PTR -16[rbp], 8
.L10:
	mov	eax, DWORD PTR num_pipes[rip]
	cdqe
	cmp	QWORD PTR -8[rbp], rax
	jl	.L12
	mov	edi, 3
	call	event_loop@PLT
	mov	DWORD PTR fired[rip], 0
	mov	eax, DWORD PTR num_pipes[rip]
	mov	ecx, DWORD PTR num_active[rip]
	cdq
	idiv	ecx
	mov	DWORD PTR -20[rbp], eax
	sal	DWORD PTR -20[rbp]
	mov	QWORD PTR -8[rbp], 0
	jmp	.L13
.L14:
	mov	rdx, QWORD PTR pipes[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, QWORD PTR -8[rbp]
	add	rax, 1
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	send@PLT
	add	QWORD PTR -8[rbp], 1
	mov	eax, DWORD PTR fired[rip]
	add	eax, 1
	mov	DWORD PTR fired[rip], eax
.L13:
	mov	eax, DWORD PTR num_active[rip]
	cdqe
	cmp	QWORD PTR -8[rbp], rax
	jl	.L14
	mov	DWORD PTR count[rip], 0
	mov	eax, DWORD PTR num_writes[rip]
	mov	DWORD PTR writes[rip], eax
	mov	DWORD PTR -24[rbp], 0
	mov	esi, 0
	lea	rdi, ts.1[rip]
	call	gettimeofday@PLT
.L15:
	mov	edi, 3
	call	event_loop@PLT
	add	DWORD PTR -24[rbp], 1
	mov	edx, DWORD PTR count[rip]
	mov	eax, DWORD PTR fired[rip]
	cmp	edx, eax
	jne	.L15
	mov	esi, 0
	lea	rdi, te.0[rip]
	call	gettimeofday@PLT
	mov	eax, DWORD PTR count[rip]
	cmp	DWORD PTR -24[rbp], eax
	je	.L16
	mov	ecx, DWORD PTR count[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L16:
	mov	rax, QWORD PTR te.0[rip]
	mov	rdx, QWORD PTR ts.1[rip]
	sub	rax, rdx
	mov	QWORD PTR te.0[rip], rax
	mov	rax, QWORD PTR te.0[rip+8]
	mov	rdx, QWORD PTR ts.1[rip+8]
	sub	rax, rdx
	mov	QWORD PTR te.0[rip+8], rax
	mov	rax, QWORD PTR te.0[rip+8]
	test	rax, rax
	jns	.L17
	mov	rax, QWORD PTR te.0[rip]
	sub	rax, 1
	mov	QWORD PTR te.0[rip], rax
	mov	rax, QWORD PTR te.0[rip+8]
	add	rax, 1000000
	mov	QWORD PTR te.0[rip+8], rax
.L17:
	lea	rax, te.0[rip]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	run_once, .-run_once
	.section	.rodata
.LC2:
	.string	"Illegal argument \"%c\"\n"
.LC3:
	.string	"n:a:w:"
.LC4:
	.string	"malloc"
.LC5:
	.string	"pipe"
.LC6:
	.string	"%ld\n"
	.text
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR num_pipes[rip], 100
	mov	DWORD PTR num_active[rip], 1
	mov	eax, DWORD PTR num_pipes[rip]
	mov	DWORD PTR num_writes[rip], eax
	jmp	.L20
.L24:
	cmp	DWORD PTR -20[rbp], 119
	je	.L21
	cmp	DWORD PTR -20[rbp], 119
	jg	.L22
	cmp	DWORD PTR -20[rbp], 97
	je	.L23
	cmp	DWORD PTR -20[rbp], 110
	jne	.L22
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR num_pipes[rip], eax
	jmp	.L20
.L23:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR num_active[rip], eax
	jmp	.L20
.L21:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR num_writes[rip], eax
	jmp	.L20
.L22:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -20[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	lea	rdx, .LC3[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L24
	mov	eax, DWORD PTR num_pipes[rip]
	cdqe
	mov	esi, 128
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR events[rip], rax
	mov	eax, DWORD PTR num_pipes[rip]
	add	eax, eax
	cdqe
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR pipes[rip], rax
	mov	rax, QWORD PTR events[rip]
	test	rax, rax
	je	.L25
	mov	rax, QWORD PTR pipes[rip]
	test	rax, rax
	jne	.L26
.L25:
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L26:
	call	event_init@PLT
	mov	rax, QWORD PTR pipes[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L27
.L29:
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 1
	call	evutil_socketpair@PLT
	cmp	eax, -1
	jne	.L28
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L28:
	add	DWORD PTR -24[rbp], 1
	add	QWORD PTR -16[rbp], 8
.L27:
	mov	eax, DWORD PTR num_pipes[rip]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L29
	mov	DWORD PTR -24[rbp], 0
	jmp	.L30
.L32:
	call	run_once
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L31
	mov	edi, 1
	call	exit@PLT
.L31:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	add	rdx, rax
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -24[rbp], 1
.L30:
	cmp	DWORD PTR -24[rbp], 24
	jle	.L32
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.local	ts.1
	.comm	ts.1,16,16
	.local	te.0
	.comm	te.0,16,16
	.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	"27922.c"
	.text
	.local	count
	.comm	count,4,4
	.local	writes
	.comm	writes,4,4
	.local	fired
	.comm	fired,4,4
	.local	failures
	.comm	failures,4,4
	.local	pipes
	.comm	pipes,4,4
	.local	num_pipes
	.comm	num_pipes,4,4
	.local	num_active
	.comm	num_active,4,4
	.local	num_writes
	.comm	num_writes,4,4
	.local	events
	.comm	events,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"e\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_cb, %function
read_cb:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	mov	r3, r1
	str	r2, [fp, #-40]
	strh	r3, [fp, #-34]	@ movhi
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	sub	r1, fp, #21
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [fp, #-32]
	bl	recv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L2
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, .L9+4
	str	r3, [r2]
	b	.L3
.L2:
	ldr	r3, .L9+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+8
	str	r3, [r2]
.L3:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L5
	ldr	r3, .L9+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
.L5:
	ldr	r3, .L9+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	add	r3, r3, #4
	add	r3, r2, r3
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L9+24
	bl	send
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L6
	ldr	r3, .L9+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+8
	str	r3, [r2]
.L6:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L9+12
	str	r3, [r2]
	ldr	r3, .L9+28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L9+28
	str	r3, [r2]
.L8:
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	count
	.word	failures
	.word	writes
	.word	num_pipes
	.word	pipes
	.word	.LC0
	.word	fired
	.size	read_cb, .-read_cb
	.global	__aeabi_idiv
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Xcount: %d, Rcount: %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_once, %function
run_once:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L12
.L14:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #6
	add	r3, r2, r3
	mov	r0, r3
	bl	event_initialized
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #6
	add	r3, r2, r3
	mov	r0, r3
	bl	event_del
.L13:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #6
	add	r0, r2, r3
	ldr	r3, [fp, #-20]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, .L21+8
	mov	r2, #18
	bl	event_set
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #6
	add	r3, r2, r3
	mov	r1, #0
	mov	r0, r3
	bl	event_add
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	str	r3, [fp, #-20]
.L12:
	ldr	r3, .L21+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L14
	mov	r0, #3
	bl	event_loop
	ldr	r3, .L21+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L21+12
	ldr	r3, [r3]
	ldr	r2, .L21+20
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L15
.L16:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-8]
	mul	r3, r1, r3
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L21+24
	bl	send
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, .L21+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L21+16
	str	r3, [r2]
.L15:
	ldr	r3, .L21+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L16
	ldr	r3, .L21+28
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L21+32
	ldr	r3, [r3]
	ldr	r2, .L21+36
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r1, #0
	ldr	r0, .L21+40
	bl	gettimeofday
.L17:
	mov	r0, #3
	bl	event_loop
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, .L21+28
	ldr	r2, [r3]
	ldr	r3, .L21+16
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L17
	mov	r1, #0
	ldr	r0, .L21+44
	bl	gettimeofday
	ldr	r3, .L21+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L18
	ldr	r3, .L21+48
	ldr	r0, [r3]
	ldr	r3, .L21+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L21+52
	bl	fprintf
.L18:
	ldr	r3, .L21+44
	ldr	r2, [r3]
	ldr	r3, .L21+40
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L21+44
	str	r3, [r2]
	ldr	r3, .L21+44
	ldr	r2, [r3, #4]
	ldr	r3, .L21+40
	ldr	r3, [r3, #4]
	sub	r3, r2, r3
	ldr	r2, .L21+44
	str	r3, [r2, #4]
	ldr	r3, .L21+44
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L19
	ldr	r3, .L21+44
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L21+44
	str	r3, [r2]
	ldr	r3, .L21+44
	ldr	r3, [r3, #4]
	add	r3, r3, #999424
	add	r3, r3, #576
	ldr	r2, .L21+44
	str	r3, [r2, #4]
.L19:
	ldr	r3, .L21+44
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	pipes
	.word	events
	.word	read_cb
	.word	num_pipes
	.word	fired
	.word	num_active
	.word	.LC0
	.word	count
	.word	num_writes
	.word	writes
	.word	ts.9217
	.word	te.9218
	.word	stderr
	.word	.LC2
	.size	run_once, .-run_once
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Illegal argument \"%c\"\012\000"
	.align	2
.LC4:
	.ascii	"n:a:w:\000"
	.align	2
.LC5:
	.ascii	"malloc\000"
	.align	2
.LC6:
	.ascii	"pipe\000"
	.align	2
.LC7:
	.ascii	"%ld\012\000"
	.text
	.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]
	ldr	r3, .L37
	mov	r2, #100
	str	r2, [r3]
	ldr	r3, .L37+4
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L37
	ldr	r3, [r3]
	ldr	r2, .L37+8
	str	r3, [r2]
	b	.L24
.L28:
	ldr	r3, [fp, #-12]
	cmp	r3, #119
	beq	.L25
	ldr	r3, [fp, #-12]
	cmp	r3, #119
	bgt	.L26
	ldr	r3, [fp, #-12]
	cmp	r3, #97
	beq	.L27
	ldr	r3, [fp, #-12]
	cmp	r3, #110
	bne	.L26
	ldr	r3, .L37+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L37
	str	r3, [r2]
	b	.L24
.L27:
	ldr	r3, .L37+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L37+4
	str	r3, [r2]
	b	.L24
.L25:
	ldr	r3, .L37+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L37+8
	str	r3, [r2]
	b	.L24
.L26:
	ldr	r3, .L37+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L37+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L24:
	ldr	r2, .L37+24
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	getopt
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L28
	ldr	r3, .L37
	ldr	r3, [r3]
	mov	r1, #64
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L37+28
	str	r2, [r3]
	ldr	r3, .L37
	ldr	r3, [r3]
	lsl	r3, r3, #1
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L37+32
	str	r2, [r3]
	ldr	r3, .L37+28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L29
	ldr	r3, .L37+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L30
.L29:
	ldr	r0, .L37+36
	bl	perror
	mov	r0, #1
	bl	exit
.L30:
	bl	event_init
	ldr	r3, .L37+32
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L31
.L33:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #1
	bl	evutil_socketpair
	mov	r3, r0
	cmn	r3, #1
	bne	.L32
	ldr	r0, .L37+40
	bl	perror
	mov	r0, #1
	bl	exit
.L32:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	str	r3, [fp, #-16]
.L31:
	ldr	r3, .L37
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L33
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L34
.L36:
	bl	run_once
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L35
	mov	r0, #1
	bl	exit
.L35:
	ldr	r3, .L37+44
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [r3]
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	mov	r2, r3
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L37+48
	bl	fprintf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L34:
	ldr	r3, [fp, #-20]
	cmp	r3, #24
	ble	.L36
	mov	r0, #0
	bl	exit
.L38:
	.align	2
.L37:
	.word	num_pipes
	.word	num_active
	.word	num_writes
	.word	optarg
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	events
	.word	pipes
	.word	.LC5
	.word	.LC6
	.word	stdout
	.word	.LC7
	.size	main, .-main
	.local	ts.9217
	.comm	ts.9217,8,4
	.local	te.9218
	.comm	te.9218,8,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
