	.file	"847032.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"fifo_read called with fd: %d, event: %d, arg: %p\n"
.LC1:
	.string	"read"
.LC2:
	.string	"Connection closed\n"
.LC3:
	.string	"Read: %s\n"
	.text
	.type	fifo_read, @function
fifo_read:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	eax, esi
	mov	QWORD PTR -304[rbp], rdx
	mov	WORD PTR -296[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -304[rbp]
	mov	QWORD PTR -280[rbp], rax
	mov	rax, QWORD PTR -280[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	event_add@PLT
	movsx	ecx, WORD PTR -296[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, QWORD PTR -304[rbp]
	mov	edx, DWORD PTR -292[rbp]
	mov	r8, rsi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -292[rbp]
	mov	edx, 254
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -284[rbp], eax
	cmp	DWORD PTR -284[rbp], -1
	jne	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	jmp	.L1
.L2:
	cmp	DWORD PTR -284[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	jmp	.L1
.L4:
	mov	eax, DWORD PTR -284[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], 0
	mov	rax, QWORD PTR stdout[rip]
	lea	rdx, -272[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L1:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fifo_read, .-fifo_read
	.section	.rodata
.LC4:
	.string	"event.fifo"
.LC5:
	.string	"lstat"
.LC6:
	.string	"mkfifo"
.LC7:
	.string	"open"
.LC8:
	.string	"Write data to %s\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, 320
	mov	DWORD PTR -308[rbp], edi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -296[rbp], rax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L8
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 17
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	unlink@PLT
	mov	rax, QWORD PTR -296[rbp]
	mov	esi, 384
	mov	rdi, rax
	call	mkfifo@PLT
	cmp	eax, -1
	jne	.L9
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -296[rbp]
	mov	edx, 0
	mov	esi, 2050
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], -1
	jne	.L10
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -296[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	event_init@PLT
	lea	rdx, -288[rbp]
	mov	esi, DWORD PTR -300[rbp]
	lea	rax, -288[rbp]
	mov	r8, rdx
	lea	rcx, fifo_read[rip]
	mov	edx, 2
	mov	rdi, rax
	call	event_set@PLT
	lea	rax, -288[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	event_add@PLT
	call	event_dispatch@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.globl	custom_timeout_handling
	.type	custom_timeout_handling, @function
custom_timeout_handling:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	custom_timeout_handling, .-custom_timeout_handling
	.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	"847032.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"fifo_read called with fd: %d, event: %d, arg: %p\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"read\000"
	.align	2
.LC2:
	.ascii	"Connection closed\012\000"
	.align	2
.LC3:
	.ascii	"Read: %s\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fifo_read, %function
fifo_read:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #296
	str	r0, [fp, #-280]
	str	r2, [fp, #-288]
	sub	r3, fp, #4
	sub	r3, r3, #276
	sub	r3, r3, #2
	mov	r2, r1	@ movhi
	strh	r2, [r3]	@ movhi
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-288]
	str	r3, [fp, #-272]
	mov	r1, #0
	ldr	r0, [fp, #-272]
	bl	event_add
	ldr	r3, .L7+4
	ldr	r0, [r3]
	sub	r3, fp, #4
	sub	r3, r3, #276
	sub	r3, r3, #2
	ldrsh	r2, [r3]
	ldr	r3, [fp, #-288]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-280]
	ldr	r1, .L7+8
	bl	fprintf
	sub	r3, fp, #264
	mov	r2, #254
	mov	r1, r3
	ldr	r0, [fp, #-280]
	bl	read
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L7+12
	bl	perror
	b	.L1
.L2:
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L7+16
	bl	fwrite
	b	.L1
.L4:
	sub	r2, fp, #264
	ldr	r3, [fp, #-268]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L7+20
	ldr	r3, [r3]
	sub	r2, fp, #264
	ldr	r1, .L7+24
	mov	r0, r3
	bl	fprintf
.L1:
	ldr	r3, .L7
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC4
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stdout
	.word	.LC3
	.size	fifo_read, .-fifo_read
	.section	.rodata
	.align	2
.LC5:
	.ascii	"event.fifo\000"
	.align	2
.LC6:
	.ascii	"lstat\000"
	.align	2
.LC7:
	.ascii	"mkfifo\000"
	.align	2
.LC8:
	.ascii	"open\000"
	.align	2
.LC9:
	.ascii	"Write data to %s\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 176
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #184
	str	r0, [fp, #-176]
	str	r1, [fp, #-180]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	str	r3, [fp, #-172]
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-172]
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L10
	bl	__errno_location
	mov	r3, r0
	mov	r2, #17
	str	r2, [r3]
	ldr	r0, .L15+8
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	ldr	r0, [fp, #-172]
	bl	unlink
	mov	r1, #384
	ldr	r0, [fp, #-172]
	bl	mkfifo
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L15+12
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	mov	r2, #0
	ldr	r1, .L15+16
	ldr	r0, [fp, #-172]
	bl	open
	str	r0, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L15+20
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, .L15+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-172]
	ldr	r1, .L15+28
	mov	r0, r3
	bl	fprintf
	bl	event_init
	sub	r0, fp, #164
	sub	r3, fp, #164
	str	r3, [sp]
	ldr	r3, .L15+32
	mov	r2, #2
	ldr	r1, [fp, #-168]
	bl	event_set
	sub	r3, fp, #164
	mov	r1, #0
	mov	r0, r3
	bl	event_add
	bl	event_dispatch
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC10
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	2050
	.word	.LC8
	.word	stderr
	.word	.LC9
	.word	fifo_read
	.size	main, .-main
	.align	2
	.global	custom_timeout_handling
	.syntax unified
	.arm
	.fpu softvfp
	.type	custom_timeout_handling, %function
custom_timeout_handling:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	custom_timeout_handling, .-custom_timeout_handling
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
