	.file	"621806.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Not enough parameters"
.LC1:
	.string	"-c"
.LC2:
	.string	"Wrong second parameter"
.LC3:
	.string	"Error writing to stdout"
.LC4:
	.string	"-d"
	.align 8
.LC5:
	.string	"In this mode four parameters are expected"
.LC6:
	.string	"-f"
.LC7:
	.string	"Wrong third parameter"
.LC8:
	.string	"Wrong fourth parameter"
	.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -52[rbp], 2
	jg	.L2
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	jne	.L4
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -32[rbp], eax
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 3
	jne	.L6
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jle	.L5
	lea	rsi, .LC2[rip]
	mov	edi, 2
	mov	eax, 0
	call	errx@PLT
.L6:
	lea	rsi, .LC2[rip]
	mov	edi, 2
	mov	eax, 0
	call	errx@PLT
.L5:
	mov	QWORD PTR -16[rbp], 0
	jmp	.L7
.L10:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 1
	mov	QWORD PTR -16[rbp], rax
	movzx	eax, BYTE PTR -38[rbp]
	cmp	al, 10
	jne	.L8
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	cmp	rax, 1
	je	.L7
	lea	rsi, .LC3[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L8:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	cmp	QWORD PTR -16[rbp], rax
	jl	.L7
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	cmp	QWORD PTR -16[rbp], rax
	jg	.L7
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	cmp	rax, 1
	je	.L7
	lea	rsi, .LC3[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L7:
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	test	rax, rax
	jg	.L10
	jmp	.L11
.L3:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	cmp	DWORD PTR -52[rbp], 5
	je	.L12
	lea	rsi, .LC5[rip]
	mov	edi, 3
	mov	eax, 0
	call	errx@PLT
.L12:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L13
	lea	rsi, .LC7[rip]
	mov	edi, 4
	mov	eax, 0
	call	errx@PLT
.L13:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -37[rbp], al
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	jne	.L14
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -24[rbp], eax
	jmp	.L15
.L14:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 3
	jne	.L16
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jle	.L15
	lea	rsi, .LC8[rip]
	mov	edi, 5
	mov	eax, 0
	call	errx@PLT
.L16:
	lea	rsi, .LC8[rip]
	mov	edi, 5
	mov	eax, 0
	call	errx@PLT
.L15:
	mov	DWORD PTR -20[rbp], 1
	jmp	.L17
.L22:
	movzx	eax, BYTE PTR -38[rbp]
	cmp	BYTE PTR -37[rbp], al
	jne	.L18
	add	DWORD PTR -20[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L17
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jg	.L17
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	cmp	rax, 1
	je	.L17
	lea	rsi, .LC3[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L18:
	movzx	eax, BYTE PTR -38[rbp]
	cmp	al, 10
	jne	.L20
	mov	DWORD PTR -20[rbp], 1
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	cmp	rax, 1
	je	.L17
	lea	rsi, .LC3[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L20:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L17
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jg	.L17
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	cmp	rax, 1
	je	.L17
	lea	rsi, .LC3[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L17:
	lea	rax, -38[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	test	rax, rax
	jg	.L22
.L11:
	mov	edi, 0
	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	"621806.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Not enough parameters\000"
	.align	2
.LC1:
	.ascii	"-c\000"
	.align	2
.LC2:
	.ascii	"Wrong second parameter\000"
	.align	2
.LC3:
	.ascii	"Error writing to stdout\000"
	.align	2
.LC4:
	.ascii	"-d\000"
	.align	2
.LC5:
	.ascii	"In this mode four parameters are expected\000"
	.align	2
.LC6:
	.ascii	"-f\000"
	.align	2
.LC7:
	.ascii	"Wrong third parameter\000"
	.align	2
.LC8:
	.ascii	"Wrong fourth parameter\000"
	.align	2
.LC9:
	.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
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	bgt	.L2
	ldr	r1, .L24+4
	mov	r0, #1
	bl	errx
.L2:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L24+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	bne	.L4
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-28]
	b	.L5
.L4:
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #3
	bne	.L6
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	ble	.L5
	ldr	r1, .L24+12
	mov	r0, #2
	bl	errx
.L6:
	ldr	r1, .L24+12
	mov	r0, #2
	bl	errx
.L5:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L7
.L10:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L8
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #1
	beq	.L7
	ldr	r1, .L24+16
	mov	r0, #7
	bl	err
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L7
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bgt	.L7
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #1
	beq	.L7
	ldr	r1, .L24+16
	mov	r0, #7
	bl	err
.L7:
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L10
	b	.L11
.L3:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L24+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-40]
	cmp	r3, #5
	beq	.L12
	ldr	r1, .L24+24
	mov	r0, #3
	bl	errx
.L12:
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L24+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r1, .L24+32
	mov	r0, #4
	bl	errx
.L13:
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]
	strb	r3, [fp, #-33]
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	bne	.L14
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L15
.L14:
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #3
	bne	.L16
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldr	r3, [r3]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L15
	ldr	r1, .L24+36
	mov	r0, #5
	bl	errx
.L16:
	ldr	r1, .L24+36
	mov	r0, #5
	bl	errx
.L15:
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L17
.L22:
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	ldrb	r2, [fp, #-33]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L18
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L17
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bgt	.L17
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #1
	beq	.L17
	ldr	r1, .L24+16
	mov	r0, #7
	bl	err
.L18:
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L20
	mov	r3, #1
	str	r3, [fp, #-12]
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #1
	beq	.L17
	ldr	r1, .L24+16
	mov	r0, #7
	bl	err
.L20:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L17
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bgt	.L17
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #1
	beq	.L17
	ldr	r1, .L24+16
	mov	r0, #7
	bl	err
.L17:
	sub	r3, fp, #34
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L22
.L11:
	mov	r0, #0
	bl	exit
.L25:
	.align	2
.L24:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
