	.file	"192923.c"
	.intel_syntax noprefix
	.text
	.globl	efd
	.data
	.align 4
	.type	efd, @object
	.size	efd, 4
efd:
	.long	-1
	.globl	starttv
	.bss
	.align 16
	.type	starttv, @object
	.size	starttv, 16
starttv:
	.zero	16
	.section	.rodata
.LC0:
	.string	"epoll_create fail: "
.LC1:
	.string	"epoll ctl failed:"
.LC2:
	.string	"ret=%d\n"
.LC3:
	.string	"epoll eventfd has epoll hup."
	.align 8
.LC4:
	.string	"epoll eventfd has epoll error."
.LC5:
	.string	"read fail:"
	.align 8
.LC6:
	.string	"success read from efd, read %d bytes(%lu) at %lds\n"
.LC7:
	.string	"epoll wait timed out."
.LC8:
	.string	"epoll wait error:"
	.text
	.globl	read_thread
	.type	read_thread, @function
read_thread:
.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, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -72[rbp], -1
	mov	edi, 1024
	call	epoll_create@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L3
.L2:
	mov	DWORD PTR -56[rbp], 25
	mov	eax, DWORD PTR efd[rip]
	mov	DWORD PTR -52[rbp], eax
	mov	edx, DWORD PTR efd[rip]
	lea	rcx, -56[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, 1
	mov	edi, eax
	call	epoll_ctl@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L3
.L4:
	lea	rsi, -44[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	ecx, 5000
	mov	edx, 1
	mov	edi, eax
	call	epoll_wait@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -76[rbp], 1
	jne	.L5
	mov	eax, DWORD PTR -44[rbp]
	and	eax, 16
	test	eax, eax
	je	.L6
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L3
.L6:
	mov	eax, DWORD PTR -44[rbp]
	and	eax, 8
	test	eax, eax
	je	.L7
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L3
.L7:
	mov	eax, DWORD PTR -44[rbp]
	and	eax, 1
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -68[rbp], eax
	mov	QWORD PTR -64[rbp], 0
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L8
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L3
.L8:
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR starttv[rip]
	sub	rax, rdx
	mov	rcx, rax
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L5:
	cmp	DWORD PTR -76[rbp], 0
	jne	.L9
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L3
.L9:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	nop
.L3:
	cmp	DWORD PTR -72[rbp], 0
	js	.L10
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -72[rbp], -1
.L10:
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_thread, .-read_thread
	.section	.rodata
.LC9:
	.string	"EFD_NONBLOCK:%d\n"
.LC10:
	.string	"eventfd failed."
.LC11:
	.string	"pthread create:"
.LC12:
	.string	"write event fd fail:"
	.align 8
.LC13:
	.string	"success write to efd, write %d bytes(%lu) at %lds\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, starttv[rip]
	call	gettimeofday@PLT
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	esi, 2048
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 2048
	mov	edi, 0
	call	eventfd@PLT
	mov	DWORD PTR efd[rip], eax
	mov	eax, DWORD PTR efd[rip]
	test	eax, eax
	jns	.L14
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L15
.L14:
	lea	rax, -40[rbp]
	mov	ecx, 0
	lea	rdx, read_thread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -48[rbp], eax
	cmp	DWORD PTR -48[rbp], 0
	jns	.L16
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L15
.L16:
	mov	DWORD PTR -52[rbp], 0
	mov	eax, DWORD PTR efd[rip]
	lea	rcx, -52[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -48[rbp], eax
	cmp	DWORD PTR -48[rbp], 0
	jns	.L17
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L15
.L17:
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR starttv[rip]
	sub	rax, rdx
	mov	rcx, rax
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	rax, QWORD PTR -40[rbp]
	test	rax, rax
	je	.L18
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	QWORD PTR -40[rbp], 0
.L18:
	mov	eax, DWORD PTR efd[rip]
	test	eax, eax
	js	.L19
	mov	eax, DWORD PTR efd[rip]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR efd[rip], -1
.L19:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"192923.c"
	.text
	.global	efd
	.data
	.align	2
	.type	efd, %object
	.size	efd, 4
efd:
	.word	-1
	.comm	starttv,8,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"epoll_create fail: \000"
	.align	2
.LC1:
	.ascii	"epoll ctl failed:\000"
	.align	2
.LC2:
	.ascii	"ret=%d\012\000"
	.align	2
.LC3:
	.ascii	"epoll eventfd has epoll hup.\000"
	.align	2
.LC4:
	.ascii	"epoll eventfd has epoll error.\000"
	.align	2
.LC5:
	.ascii	"read fail:\000"
	.align	2
.LC6:
	.ascii	"success read from efd, read %d bytes(%lu) at %lds\012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"epoll wait timed out.\000"
	.align	2
.LC8:
	.ascii	"epoll wait error:\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_thread
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_thread, %function
read_thread:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-80]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	mvn	r3, #0
	str	r3, [fp, #-68]
	mov	r0, #1024
	bl	epoll_create
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L13+4
	bl	puts
	b	.L3
.L2:
	mov	r3, #25
	str	r3, [fp, #-44]
	ldr	r3, .L13+8
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, .L13+8
	ldr	r2, [r3]
	sub	r3, fp, #44
	mov	r1, #1
	ldr	r0, [fp, #-68]
	bl	epoll_ctl
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L13+12
	bl	puts
	b	.L3
.L4:
	sub	r1, fp, #28
	ldr	r3, .L13+16
	mov	r2, #1
	ldr	r0, [fp, #-68]
	bl	epoll_wait
	str	r0, [fp, #-72]
	ldr	r1, [fp, #-72]
	ldr	r0, .L13+20
	bl	printf
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bne	.L5
	ldr	r3, [fp, #-28]
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L13+24
	bl	puts
	b	.L3
.L6:
	ldr	r3, [fp, #-28]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L13+28
	bl	puts
	b	.L3
.L7:
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-64]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	sub	r3, fp, #60
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	read
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L13+32
	bl	puts
	b	.L3
.L8:
	sub	r3, fp, #52
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	ldr	r0, [fp, #-52]
	ldr	r1, .L13+36
	ldr	r1, [r1]
	sub	r1, r0, r1
	str	r1, [sp]
	ldr	r1, [fp, #-72]
	ldr	r0, .L13+40
	bl	printf
	b	.L3
.L5:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L13+44
	bl	puts
	b	.L3
.L9:
	ldr	r0, .L13+48
	bl	puts
	nop
.L3:
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	blt	.L10
	ldr	r0, [fp, #-68]
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-68]
.L10:
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC9
	.word	.LC0
	.word	efd
	.word	.LC1
	.word	5000
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	starttv
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	read_thread, .-read_thread
	.section	.rodata
	.align	2
.LC10:
	.ascii	"EFD_NONBLOCK:%d\012\000"
	.align	2
.LC11:
	.ascii	"eventfd failed.\000"
	.align	2
.LC12:
	.ascii	"pthread create:\000"
	.align	2
.LC13:
	.ascii	"write event fd fail:\000"
	.align	2
.LC14:
	.ascii	"success write to efd, write %d bytes(%lu) at %lds\012"
	.ascii	"\000"
	.align	2
.LC15:
	.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, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L24+4
	bl	gettimeofday
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r1, #2048
	ldr	r0, .L24+8
	bl	printf
	mov	r1, #2048
	mov	r0, #0
	bl	eventfd
	mov	r3, r0
	ldr	r2, .L24+12
	str	r3, [r2]
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L16
	ldr	r0, .L24+16
	bl	puts
	b	.L17
.L16:
	sub	r0, fp, #32
	mov	r3, #0
	ldr	r2, .L24+20
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L24+24
	bl	puts
	b	.L17
.L18:
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, .L24+12
	ldr	r3, [r3]
	sub	r1, fp, #28
	mov	r2, #4
	mov	r0, r3
	bl	write
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L19
	ldr	r0, .L24+28
	bl	puts
	b	.L17
.L19:
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-16]
	ldr	r3, .L24+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r2, r1
	ldr	r1, [fp, #-24]
	ldr	r0, .L24+32
	bl	printf
.L17:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-32]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	str	r3, [fp, #-32]
.L20:
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L21
	ldr	r3, .L24+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L24+12
	mvn	r2, #0
	str	r2, [r3]
.L21:
	mov	r3, #0
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC15
	.word	starttv
	.word	.LC10
	.word	efd
	.word	.LC11
	.word	read_thread
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
