	.file	"75117.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Is a directory\n"
.LC1:
	.string	"Permission denied\n"
	.align 8
.LC2:
	.string	"Not possible to read STREAMS file\n"
.LC3:
	.string	"Loop between files link\n"
	.align 8
.LC4:
	.string	"All file process's file descriptor are used\n"
.LC5:
	.string	"Maximum number of file open\n"
.LC6:
	.string	"File too large\n"
	.section	.data.rel.local,"aw"
	.align 32
	.type	ERROR_MSGS, @object
	.size	ERROR_MSGS, 64
ERROR_MSGS:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	0
	.section	.rodata
	.align 32
	.type	ERROR_SIGNL, @object
	.size	ERROR_SIGNL, 32
ERROR_SIGNL:
	.long	21
	.long	13
	.long	5
	.long	40
	.long	24
	.long	23
	.long	75
	.long	0
	.text
	.type	write_file_error, @function
write_file_error:
.LFB0:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -11[rbp], 8250
	mov	BYTE PTR -9[rbp], 0
	mov	BYTE PTR -12[rbp], 10
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	my_strlen@PLT
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	write@PLT
	lea	rax, -11[rbp]
	mov	rdi, rax
	call	my_strlen@PLT
	movsx	rdx, eax
	lea	rax, -11[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	write@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	my_strlen@PLT
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	write@PLT
	lea	rax, -12[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 2
	call	write@PLT
	mov	eax, 84
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	write_file_error, .-write_file_error
	.type	itter_on_error, @function
itter_on_error:
.LFB1:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L7:
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ERROR_MSGS[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L6
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, ERROR_SIGNL[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L7
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, ERROR_SIGNL[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L8
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ERROR_MSGS[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_file_error
.L8:
	mov	eax, -84
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	itter_on_error, .-itter_on_error
	.section	.rodata
.LC7:
	.string	": Is a directory\n"
.LC8:
	.string	": No such file or directory\n"
	.text
	.globl	open_readonly
	.type	open_readonly, @function
open_readonly:
.LFB2:
	.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 65536
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L11
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	write_file_error
	mov	eax, -84
	jmp	.L12
.L11:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jne	.L13
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	write_file_error
	mov	eax, -84
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	js	.L14
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L12
.L14:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	itter_on_error
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	open_readonly, .-open_readonly
	.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	"75117.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Is a directory\012\000"
	.align	2
.LC1:
	.ascii	"Permission denied\012\000"
	.align	2
.LC2:
	.ascii	"Not possible to read STREAMS file\012\000"
	.align	2
.LC3:
	.ascii	"Loop between files link\012\000"
	.align	2
.LC4:
	.ascii	"All file process's file descriptor are used\012\000"
	.align	2
.LC5:
	.ascii	"Maximum number of file open\012\000"
	.align	2
.LC6:
	.ascii	"File too large\012\000"
	.data
	.align	2
	.type	ERROR_MSGS, %object
	.size	ERROR_MSGS, 32
ERROR_MSGS:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	0
	.section	.rodata
	.align	2
	.type	ERROR_SIGNL, %object
	.size	ERROR_SIGNL, 32
ERROR_SIGNL:
	.word	21
	.word	13
	.word	5
	.word	40
	.word	24
	.word	23
	.word	75
	.word	0
	.align	2
.LC7:
	.ascii	": \000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_file_error, %function
write_file_error:
	@ 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, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L4+4
	sub	r3, fp, #12
	ldr	r2, [r2]
	strh	r2, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r2, #16
	strb	r2, [r3]
	mov	r3, #10
	strb	r3, [fp, #-13]
	ldr	r0, [fp, #-24]
	bl	my_strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-24]
	mov	r0, #2
	bl	write
	sub	r3, fp, #12
	mov	r0, r3
	bl	my_strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	mov	r1, r3
	mov	r0, #2
	bl	write
	ldr	r0, [fp, #-28]
	bl	my_strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-28]
	mov	r0, #2
	bl	write
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	mov	r0, #2
	bl	write
	mov	r3, #84
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC8
	.word	.LC7
	.size	write_file_error, .-write_file_error
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	itter_on_error, %function
itter_on_error:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L9:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r2, .L12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L8
	ldr	r2, .L12+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L9
.L8:
	ldr	r2, .L12+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L10
	ldr	r2, .L12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	write_file_error
.L10:
	mvn	r3, #83
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	ERROR_MSGS
	.word	ERROR_SIGNL
	.size	itter_on_error, .-itter_on_error
	.section	.rodata
	.align	2
.LC9:
	.ascii	": Is a directory\012\000"
	.align	2
.LC10:
	.ascii	": No such file or directory\012\000"
	.text
	.align	2
	.global	open_readonly
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_readonly, %function
open_readonly:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r1, #16384
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L15
	ldr	r0, [fp, #-8]
	bl	close
	ldr	r1, .L19
	ldr	r0, [fp, #-16]
	bl	write_file_error
	mvn	r3, #83
	b	.L16
.L15:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L17
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L17
	ldr	r1, .L19+4
	ldr	r0, [fp, #-16]
	bl	write_file_error
	mvn	r3, #83
	b	.L16
.L17:
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L18
	ldr	r3, [fp, #-8]
	b	.L16
.L18:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	itter_on_error
	mov	r3, r0
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC9
	.word	.LC10
	.size	open_readonly, .-open_readonly
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
