	.file	"724475.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"fseek() failed"
.LC1:
	.string	"%s"
	.text
	.type	read_last_n_lines, @function
read_last_n_lines:
.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, 240
	mov	QWORD PTR -232[rbp], rdi
	mov	DWORD PTR -236[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -220[rbp], 0
	mov	rax, QWORD PTR -232[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	je	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -216[rbp], rax
	jmp	.L4
.L7:
	sub	QWORD PTR -216[rbp], 1
	mov	rcx, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -232[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	cmp	eax, 10
	jne	.L4
	mov	eax, DWORD PTR -220[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -220[rbp], edx
	cmp	DWORD PTR -236[rbp], eax
	jne	.L4
	jmp	.L6
.L5:
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L11
.L4:
	cmp	QWORD PTR -216[rbp], 0
	jne	.L7
.L6:
	sub	DWORD PTR -220[rbp], 1
	mov	eax, DWORD PTR -220[rbp]
	cmp	eax, DWORD PTR -236[rbp]
	je	.L9
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -216[rbp], rax
	sub	QWORD PTR -216[rbp], 1
	mov	rcx, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -232[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	je	.L9
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L11
.L10:
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	rdx, QWORD PTR -232[rbp]
	lea	rax, -208[rbp]
	mov	esi, 200
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L10
	mov	eax, 0
.L11:
	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
.LFE6:
	.size	read_last_n_lines, .-read_last_n_lines
	.section	.rodata
.LC2:
	.string	"Usage: more [FILE]"
.LC3:
	.string	"Usage: tail -n [digit] [file]"
.LC4:
	.string	"Error: No such option."
.LC5:
	.string	"n"
.LC6:
	.string	"r"
.LC7:
	.string	"Can't open this file!"
	.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
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 10
	mov	DWORD PTR -40[rbp], 0
	mov	DWORD PTR -36[rbp], 1
	cmp	DWORD PTR -68[rbp], 1
	jg	.L14
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L15
.L14:
	cmp	DWORD PTR -68[rbp], 4
	jle	.L17
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L15
.L23:
	add	DWORD PTR -52[rbp], 1
	cmp	DWORD PTR -32[rbp], 110
	jne	.L18
	mov	DWORD PTR -40[rbp], 1
	mov	eax, DWORD PTR -52[rbp]
	add	eax, 1
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -44[rbp], 0
	jmp	.L19
.L21:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rcx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L20
	mov	DWORD PTR -36[rbp], 0
.L20:
	add	DWORD PTR -44[rbp], 1
.L19:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rbx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L21
	cmp	DWORD PTR -36[rbp], 0
	jne	.L22
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L15
.L22:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -48[rbp], eax
	jmp	.L17
.L18:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L15
.L17:
	mov	rcx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -68[rbp]
	lea	rdx, .LC5[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], -1
	jne	.L23
	cmp	DWORD PTR -40[rbp], 0
	jne	.L24
	cmp	DWORD PTR -68[rbp], 2
	jle	.L24
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L15
.L24:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L25
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L15
.L25:
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	read_last_n_lines
	test	eax, eax
	jns	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, -2
	jmp	.L15
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L15:
	mov	rbx, QWORD PTR -8[rbp]
	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	"724475.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"fseek() failed\000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_last_n_lines, %function
read_last_n_lines:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #232
	str	r0, [fp, #-248]
	str	r1, [fp, #-252]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-240]
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-248]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L13+4
	bl	printf
	mvn	r3, #0
	b	.L11
.L2:
	ldr	r0, [fp, #-248]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-236]
	str	r3, [fp, #-232]
	b	.L4
.L7:
	sub	r3, fp, #236
	ldmia	r3, {r2-r3}
	subs	r6, r2, #1
	sbc	r7, r3, #0
	str	r6, [fp, #-236]
	str	r7, [fp, #-232]
	ldr	r3, [fp, #-236]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-248]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, [fp, #-248]
	bl	fgetc
	mov	r3, r0
	cmp	r3, #10
	bne	.L4
	ldr	r3, [fp, #-240]
	add	r2, r3, #1
	str	r2, [fp, #-240]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	bne	.L4
	b	.L6
.L5:
	ldr	r0, .L13+4
	bl	perror
	mvn	r3, #0
	b	.L11
.L4:
	sub	r3, fp, #236
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L7
.L6:
	ldr	r3, [fp, #-240]
	sub	r3, r3, #1
	str	r3, [fp, #-240]
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-252]
	cmp	r2, r3
	beq	.L9
	ldr	r0, [fp, #-248]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-236]
	str	r3, [fp, #-232]
	sub	r3, fp, #236
	ldmia	r3, {r2-r3}
	subs	r4, r2, #1
	sbc	r5, r3, #0
	str	r4, [fp, #-236]
	str	r5, [fp, #-232]
	ldr	r3, [fp, #-236]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-248]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r0, .L13+4
	bl	printf
	mvn	r3, #0
	b	.L11
.L10:
	sub	r3, fp, #224
	mov	r1, r3
	ldr	r0, .L13+8
	bl	printf
.L9:
	sub	r3, fp, #224
	ldr	r2, [fp, #-248]
	mov	r1, #200
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	read_last_n_lines, .-read_last_n_lines
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Usage: more [FILE]\000"
	.align	2
.LC4:
	.ascii	"Usage: tail -n [digit] [file]\000"
	.align	2
.LC5:
	.ascii	"Error: No such option.\000"
	.align	2
.LC6:
	.ascii	"n\000"
	.align	2
.LC7:
	.ascii	"r\000"
	.align	2
.LC8:
	.ascii	"Can't open this file!\000"
	.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]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #10
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	bgt	.L16
	ldr	r0, .L29
	bl	puts
	mov	r3, #0
	b	.L17
.L16:
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ble	.L19
	ldr	r0, .L29+4
	bl	puts
	mov	r3, #0
	b	.L17
.L25:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-16]
	cmp	r3, #110
	bne	.L20
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L21
.L23:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-44]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L22
	mov	r3, #0
	str	r3, [fp, #-20]
.L22:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L21:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bhi	.L23
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L24
	ldr	r0, .L29+4
	bl	puts
	mov	r3, #0
	b	.L17
.L24:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-32]
	b	.L19
.L20:
	ldr	r0, .L29+8
	bl	puts
	mov	r3, #0
	b	.L17
.L19:
	ldr	r2, .L29+12
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	getopt
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L25
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L26
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	ble	.L26
	ldr	r0, .L29+4
	bl	puts
	mov	r3, #0
	b	.L17
.L26:
	ldr	r3, [fp, #-40]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L29+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L27
	ldr	r0, .L29+20
	bl	puts
	mov	r3, #0
	b	.L17
.L27:
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-12]
	bl	read_last_n_lines
	mov	r3, r0
	cmp	r3, #0
	bge	.L28
	ldr	r0, [fp, #-12]
	bl	fclose
	mvn	r3, #1
	b	.L17
.L28:
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, #0
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.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
