	.file	"689001.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <num>...\n"
.LC1:
	.string	"eventfd"
.LC2:
	.string	"\tChild writing %s to efd\n"
.LC3:
	.string	"wrtie"
.LC4:
	.string	"Child completed write loop "
.LC5:
	.string	"read"
	.align 8
.LC6:
	.string	"Parent read %llu (0x%llx) from efd\n"
.LC7:
	.string	"fork"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	esi, 0
	mov	edi, 0
	call	eventfd@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	call	fork@PLT
	cmp	eax, -1
	je	.L4
	test	eax, eax
	jne	.L5
	mov	DWORD PTR -32[rbp], 1
	jmp	.L6
.L8:
	mov	edi, 1
	call	sleep@PLT
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoull@PLT
	mov	QWORD PTR -24[rbp], rax
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 8
	je	.L7
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	add	DWORD PTR -32[rbp], 1
.L6:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L8
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	lea	rcx, -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 8
	je	.L9
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L4:
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"689001.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <num>...\012\000"
	.align	2
.LC1:
	.ascii	"eventfd\000"
	.align	2
.LC2:
	.ascii	"\011Child writing %s to efd\012\000"
	.align	2
.LC3:
	.ascii	"wrtie\000"
	.align	2
.LC4:
	.ascii	"Child completed write loop \000"
	.align	2
.LC5:
	.ascii	"read\000"
	.align	2
.LC6:
	.ascii	"Parent read %llu (0x%llx) from efd\012\000"
	.align	2
.LC7:
	.ascii	"fork\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r1, #0
	mov	r0, #0
	bl	eventfd
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L11+12
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	bl	fork
	mov	r3, r0
	cmn	r3, #1
	beq	.L4
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L6
.L8:
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+16
	bl	printf
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoull
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r3, fp, #20
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	write
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #8
	beq	.L7
	ldr	r0, .L11+20
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L6:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L8
	ldr	r0, .L11+24
	bl	puts
	mov	r0, #0
	bl	exit
.L5:
	sub	r3, fp, #20
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	read
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #8
	beq	.L9
	ldr	r0, .L11+28
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L11+32
	bl	printf
	b	.L5
.L4:
	ldr	r0, .L11+36
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	.align	2
.L11:
	.word	.LC8
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
