	.file	"318863.c"
	.intel_syntax noprefix
	.text
	.globl	file
	.bss
	.align 4
	.type	file, @object
	.size	file, 4
file:
	.zero	4
	.globl	pa
	.align 8
	.type	pa, @object
	.size	pa, 8
pa:
	.zero	8
	.globl	length
	.align 4
	.type	length, @object
	.size	length, 4
length:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Time is over!"
	.text
	.globl	myAlarm
	.type	myAlarm, @function
myAlarm:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR length[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR pa[rip]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	eax, DWORD PTR file[rip]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	myAlarm, .-myAlarm
	.section	.rodata
.LC1:
	.string	"no file name"
.LC2:
	.string	"Write N of string: "
.LC3:
	.string	"%s"
.LC4:
	.string	"N should be > 0!"
.LC5:
	.string	"Out of range!"
	.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, 720
	mov	DWORD PTR -708[rbp], edi
	mov	QWORD PTR -720[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -688[rbp]
	mov	eax, 0
	mov	ecx, 50
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	mov	DWORD PTR -696[rbp], 0
	mov	DWORD PTR -692[rbp], 1
	cmp	DWORD PTR -708[rbp], 2
	je	.L3
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR file[rip], eax
	mov	eax, DWORD PTR file[rip]
	mov	edx, 2
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR length[rip], eax
	mov	edx, DWORD PTR file[rip]
	mov	eax, DWORD PTR length[rip]
	cdqe
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR pa[rip], rax
	mov	DWORD PTR -700[rbp], 0
	jmp	.L4
.L7:
	mov	rdx, QWORD PTR pa[rip]
	mov	eax, DWORD PTR -700[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L5
	add	DWORD PTR -696[rbp], 1
	mov	eax, DWORD PTR -692[rbp]
	cdqe
	mov	edx, DWORD PTR -696[rbp]
	mov	DWORD PTR -688[rbp+rax*4], edx
	add	DWORD PTR -692[rbp], 1
	jmp	.L6
.L5:
	add	DWORD PTR -696[rbp], 1
.L6:
	add	DWORD PTR -700[rbp], 1
.L4:
	mov	eax, DWORD PTR length[rip]
	cmp	DWORD PTR -700[rbp], eax
	jl	.L7
	mov	eax, DWORD PTR -692[rbp]
	mov	DWORD PTR -696[rbp], eax
	lea	rsi, myAlarm[rip]
	mov	edi, 14
	call	signal@PLT
	mov	edi, 5
	call	alarm@PLT
.L13:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 0
	call	alarm@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -692[rbp], eax
	cmp	DWORD PTR -692[rbp], 0
	jne	.L8
	mov	eax, DWORD PTR file[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L14
	jmp	.L15
.L8:
	cmp	DWORD PTR -692[rbp], 0
	jns	.L10
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L13
.L10:
	mov	eax, DWORD PTR -692[rbp]
	cmp	eax, DWORD PTR -696[rbp]
	jl	.L12
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L13
.L12:
	cmp	DWORD PTR -692[rbp], 0
	jle	.L13
	mov	eax, DWORD PTR -692[rbp]
	cdqe
	mov	edx, DWORD PTR -688[rbp+rax*4]
	mov	eax, DWORD PTR -692[rbp]
	sub	eax, 1
	cdqe
	mov	ecx, DWORD PTR -688[rbp+rax*4]
	mov	eax, edx
	sub	eax, ecx
	cdqe
	mov	rcx, QWORD PTR pa[rip]
	mov	edx, DWORD PTR -692[rbp]
	sub	edx, 1
	movsx	rdx, edx
	mov	edx, DWORD PTR -688[rbp+rdx*4]
	movsx	rdx, edx
	add	rcx, rdx
	mov	rdx, rax
	mov	rsi, rcx
	mov	edi, 1
	call	write@PLT
	jmp	.L13
.L15:
	call	__stack_chk_fail@PLT
.L14:
	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	"318863.c"
	.text
	.comm	file,4,4
	.comm	pa,4,4
	.comm	length,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Time is over!\000"
	.text
	.align	2
	.global	myAlarm
	.syntax unified
	.arm
	.fpu softvfp
	.type	myAlarm, %function
myAlarm:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, .L2
	bl	puts
	ldr	r3, .L2+4
	ldr	r3, [r3]
	ldr	r2, .L2+8
	ldr	r2, [r2]
	mov	r1, r3
	mov	r0, #1
	bl	write
	ldr	r3, .L2+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r0, #0
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	pa
	.word	length
	.word	file
	.size	myAlarm, .-myAlarm
	.section	.rodata
	.align	2
.LC1:
	.ascii	"no file name\000"
	.align	2
.LC2:
	.ascii	"Write N of string: \000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.align	2
.LC4:
	.ascii	"N should be > 0!\000"
	.align	2
.LC5:
	.ascii	"Out of range!\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 688
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #696
	str	r0, [fp, #-688]
	str	r1, [fp, #-692]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #668
	mov	r2, #404
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-676]
	mov	r3, #1
	str	r3, [fp, #-672]
	ldr	r3, [fp, #-688]
	cmp	r3, #2
	beq	.L5
	ldr	r0, .L18+4
	bl	puts
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-692]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L18+8
	str	r3, [r2]
	ldr	r3, .L18+8
	ldr	r3, [r3]
	mov	r2, #2
	mov	r1, #0
	mov	r0, r3
	bl	lseek
	mov	r3, r0
	ldr	r2, .L18+12
	str	r3, [r2]
	ldr	r3, .L18+12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, .L18+8
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L18+16
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-680]
	b	.L6
.L9:
	ldr	r3, .L18+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-680]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L7
	ldr	r3, [fp, #-676]
	add	r3, r3, #1
	str	r3, [fp, #-676]
	ldr	r3, [fp, #-672]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-676]
	str	r2, [r3, #-664]
	ldr	r3, [fp, #-672]
	add	r3, r3, #1
	str	r3, [fp, #-672]
	b	.L8
.L7:
	ldr	r3, [fp, #-676]
	add	r3, r3, #1
	str	r3, [fp, #-676]
.L8:
	ldr	r3, [fp, #-680]
	add	r3, r3, #1
	str	r3, [fp, #-680]
.L6:
	ldr	r3, .L18+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-680]
	cmp	r2, r3
	blt	.L9
	ldr	r3, [fp, #-672]
	str	r3, [fp, #-676]
	ldr	r1, .L18+20
	mov	r0, #14
	bl	signal
	mov	r0, #5
	bl	alarm
.L15:
	ldr	r0, .L18+24
	bl	printf
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L18+28
	bl	__isoc99_scanf
	mov	r0, #0
	bl	alarm
	sub	r3, fp, #264
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-672]
	ldr	r3, [fp, #-672]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L18+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	b	.L17
.L10:
	ldr	r3, [fp, #-672]
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L18+32
	bl	puts
	b	.L15
.L12:
	ldr	r2, [fp, #-672]
	ldr	r3, [fp, #-676]
	cmp	r2, r3
	blt	.L14
	ldr	r0, .L18+36
	bl	puts
	b	.L15
.L14:
	ldr	r3, [fp, #-672]
	cmp	r3, #0
	ble	.L15
	ldr	r3, .L18+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-672]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-664]
	add	r1, r2, r3
	ldr	r3, [fp, #-672]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-664]
	ldr	r3, [fp, #-672]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-664]
	sub	r3, r2, r3
	mov	r2, r3
	mov	r0, #1
	bl	write
	b	.L15
.L17:
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC6
	.word	.LC1
	.word	file
	.word	length
	.word	pa
	.word	myAlarm
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
