	.file	"32452.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"namedpipe"
.LC1:
	.string	"error"
	.align 8
.LC2:
	.string	"The named pipe poll test was started!"
.LC3:
	.string	"result of poll %i\n"
.LC4:
	.string	"The timer was ticked"
	.align 8
.LC5:
	.string	"Data may be written to the pipe!"
.LC6:
	.string	"Fradi!"
	.align 8
.LC7:
	.string	"Now we can read from the pipe "
.LC8:
	.string	"The data is %s\n"
.LC9:
	.string	"Error number: %i\n"
.LC10:
	.string	"Second part!"
.LC11:
	.string	"Parent waites for a while..."
	.align 8
.LC12:
	.string	"Parent writes a number to the pipes!"
	.align 8
.LC13:
	.string	"The poll revents field is: %i\n"
.LC14:
	.string	"The data is: %c\n"
.LC15:
	.string	"Returned poll: %i"
	.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, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 384
	lea	rdi, .LC0[rip]
	call	mkfifo@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR -64[rbp], eax
	mov	WORD PTR -60[rbp], 4
	lea	rax, -64[rbp]
	mov	edx, 1000
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -76[rbp], 0
	jne	.L3
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L4
.L3:
	cmp	DWORD PTR -76[rbp], 0
	jle	.L5
	movzx	eax, WORD PTR -58[rbp]
	cwde
	and	eax, 4
	test	eax, eax
	je	.L4
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 6
	lea	rsi, .LC6[rip]
	mov	edi, eax
	call	write@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -18[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L5:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	WORD PTR -60[rbp], 4
	call	fork@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jle	.L6
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 100
	sub	eax, ecx
	mov	edx, eax
	mov	DWORD PTR -88[rbp], edx
	lea	rcx, -88[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rax, -84[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	wait@PLT
	jmp	.L7
.L6:
	lea	rax, -64[rbp]
	mov	edx, 8000
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jle	.L8
	movzx	eax, WORD PTR -58[rbp]
	cwde
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, WORD PTR -58[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L7
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rcx, -84[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	movzx	eax, BYTE PTR -84[rbp]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	lea	rdi, .LC0[rip]
	call	unlink@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"32452.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"namedpipe\000"
	.align	2
.LC1:
	.ascii	"error\000"
	.align	2
.LC2:
	.ascii	"The named pipe poll test was started!\000"
	.align	2
.LC3:
	.ascii	"result of poll %i\012\000"
	.align	2
.LC4:
	.ascii	"The timer was ticked\000"
	.align	2
.LC5:
	.ascii	"Data may be written to the pipe!\000"
	.align	2
.LC6:
	.ascii	"Fradi!\000"
	.align	2
.LC7:
	.ascii	"Now we can read from the pipe \000"
	.align	2
.LC8:
	.ascii	"The data is %s\012\000"
	.align	2
.LC9:
	.ascii	"Error number: %i\012\000"
	.align	2
.LC10:
	.ascii	"Second part!\000"
	.align	2
.LC11:
	.ascii	"Parent waites for a while...\000"
	.align	2
.LC12:
	.ascii	"Parent writes a number to the pipes!\000"
	.align	2
.LC13:
	.ascii	"The poll revents field is: %i\012\000"
	.align	2
.LC14:
	.ascii	"The data is: %c\012\000"
	.align	2
.LC15:
	.ascii	"Returned poll: %i\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #384
	ldr	r0, .L11+4
	bl	mkfifo
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L11+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, .L11+12
	bl	puts
	mov	r1, #2
	ldr	r0, .L11+4
	bl	open
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	str	r3, [fp, #-60]
	mov	r3, #4
	strh	r3, [fp, #-56]	@ movhi
	sub	r3, fp, #60
	mov	r2, #1000
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-72]
	ldr	r1, [fp, #-72]
	ldr	r0, .L11+16
	bl	printf
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L11+20
	bl	puts
	b	.L4
.L3:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L5
	ldrsh	r3, [fp, #-54]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #4
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L11+24
	bl	puts
	mov	r2, #6
	ldr	r1, .L11+28
	ldr	r0, [fp, #-76]
	bl	write
	ldr	r0, .L11+32
	bl	puts
	sub	r3, fp, #20
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	read
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L11+36
	bl	printf
	b	.L4
.L5:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+40
	bl	printf
.L4:
	ldr	r0, .L11+44
	bl	puts
	mov	r3, #4
	strh	r3, [fp, #-56]	@ movhi
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	ble	.L6
	ldr	r0, .L11+48
	bl	puts
	ldr	r0, .L11+52
	bl	puts
	bl	rand
	mov	r1, r0
	ldr	r3, .L11+56
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	str	r2, [fp, #-84]
	sub	r3, fp, #84
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	write
	sub	r3, fp, #80
	mov	r0, r3
	bl	wait
	b	.L7
.L6:
	sub	r3, fp, #60
	mov	r2, #8000
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	ble	.L8
	ldrsh	r3, [fp, #-54]
	mov	r1, r3
	ldr	r0, .L11+60
	bl	printf
	ldrsh	r3, [fp, #-54]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L11+32
	bl	puts
	sub	r3, fp, #80
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	read
	ldrb	r3, [fp, #-80]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+64
	bl	printf
	b	.L7
.L8:
	ldr	r1, [fp, #-64]
	ldr	r0, .L11+68
	bl	printf
.L7:
	ldr	r0, .L11+4
	bl	unlink
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC16
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	1374389535
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
