	.file	"51046.c"
	.intel_syntax noprefix
	.text
	.globl	sort
	.type	sort, @function
sort:
.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, 256
	mov	QWORD PTR -248[rbp], rdi
	mov	DWORD PTR -252[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -236[rbp], 0
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -236[rbp]
	mov	DWORD PTR -228[rbp], eax
	mov	eax, DWORD PTR -236[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rdx, rax
	lea	rax, -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -236[rbp]
	add	eax, 1
	mov	DWORD PTR -232[rbp], eax
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -232[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rdx, rax
	lea	rax, -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jle	.L4
	mov	eax, DWORD PTR -232[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rdx, rax
	lea	rax, -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -232[rbp]
	mov	DWORD PTR -228[rbp], eax
.L4:
	add	DWORD PTR -232[rbp], 1
.L3:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -252[rbp]
	jl	.L5
	mov	eax, DWORD PTR -228[rbp]
	cmp	eax, DWORD PTR -236[rbp]
	je	.L6
	mov	eax, DWORD PTR -236[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rdx, rax
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -228[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -236[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -228[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	add	rdx, rax
	lea	rax, -112[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
.L6:
	add	DWORD PTR -236[rbp], 1
.L2:
	mov	eax, DWORD PTR -252[rbp]
	sub	eax, 1
	cmp	DWORD PTR -236[rbp], eax
	jl	.L7
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sort, .-sort
	.section	.rodata
	.align 8
.LC0:
	.string	"\nInput read from Input2.txt is:"
.LC1:
	.string	"r"
.LC2:
	.string	"Input2.txt"
.LC3:
	.string	"%s"
.LC4:
	.string	"%s "
.LC5:
	.string	"\n"
	.align 8
.LC6:
	.string	"Check the file Output2.txt for result. \n"
.LC7:
	.string	"This is the output: "
.LC8:
	.string	"w"
.LC9:
	.string	"Output2.txt"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 1856
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -10040[rbp], 0
	mov	DWORD PTR -10036[rbp], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -10032[rbp], rax
	jmp	.L10
.L11:
	lea	rcx, -10016[rbp]
	mov	eax, DWORD PTR -10040[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -10032[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rcx, -10016[rbp]
	mov	eax, DWORD PTR -10040[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -10040[rbp], 1
.L10:
	mov	rax, QWORD PTR -10032[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L11
	mov	rax, QWORD PTR -10032[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -10040[rbp]
	lea	rax, -10016[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sort
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rsi, .LC8[rip]
	lea	rdi, .LC9[rip]
	call	fopen@PLT
	mov	QWORD PTR -10024[rbp], rax
	mov	DWORD PTR -10036[rbp], 0
	jmp	.L12
.L13:
	lea	rcx, -10016[rbp]
	mov	eax, DWORD PTR -10036[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -10016[rbp]
	mov	eax, DWORD PTR -10036[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -10024[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -10036[rbp], 1
.L12:
	mov	eax, DWORD PTR -10036[rbp]
	cmp	eax, DWORD PTR -10040[rbp]
	jl	.L13
	mov	rax, QWORD PTR -10024[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"51046.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort, %function
sort:
	@ args = 0, pretend = 0, frame = 224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #224
	str	r0, [fp, #-224]
	str	r1, [fp, #-228]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-220]
	b	.L2
.L7:
	ldr	r3, [fp, #-220]
	str	r3, [fp, #-212]
	ldr	r2, [fp, #-220]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r2, r3, r2
	sub	r3, fp, #208
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-220]
	add	r3, r3, #1
	str	r3, [fp, #-216]
	b	.L3
.L5:
	ldr	r2, [fp, #-216]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r2, r3, r2
	sub	r3, fp, #208
	mov	r1, r2
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	ble	.L4
	ldr	r2, [fp, #-216]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r2, r3, r2
	sub	r3, fp, #208
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-216]
	str	r3, [fp, #-212]
.L4:
	ldr	r3, [fp, #-216]
	add	r3, r3, #1
	str	r3, [fp, #-216]
.L3:
	ldr	r2, [fp, #-216]
	ldr	r3, [fp, #-228]
	cmp	r2, r3
	blt	.L5
	ldr	r2, [fp, #-212]
	ldr	r3, [fp, #-220]
	cmp	r2, r3
	beq	.L6
	ldr	r2, [fp, #-220]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r2, r3, r2
	sub	r3, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-220]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r0, r3, r2
	ldr	r2, [fp, #-212]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r3, r3, r2
	mov	r1, r3
	bl	strcpy
	ldr	r2, [fp, #-212]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-224]
	add	r3, r3, r2
	sub	r2, fp, #108
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
.L6:
	ldr	r3, [fp, #-220]
	add	r3, r3, #1
	str	r3, [fp, #-220]
.L2:
	ldr	r3, [fp, #-228]
	sub	r3, r3, #1
	ldr	r2, [fp, #-220]
	cmp	r2, r3
	blt	.L7
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.size	sort, .-sort
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\012Input read from Input2.txt is:\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"Input2.txt\000"
	.align	2
.LC4:
	.ascii	"%s\000"
	.align	2
.LC5:
	.ascii	"%s \000"
	.align	2
.LC6:
	.ascii	"\012\000"
	.align	2
.LC7:
	.ascii	"Check the file Output2.txt for result. \012\000"
	.align	2
.LC8:
	.ascii	"This is the output: \000"
	.align	2
.LC9:
	.ascii	"w\000"
	.align	2
.LC10:
	.ascii	"Output2.txt\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 10024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #9984
	sub	sp, sp, #44
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1828]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1824]
	ldr	r0, .L18+4
	bl	puts
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L18+8
	ldr	r0, .L18+12
	bl	fopen
	str	r0, [r4, #-1820]
	b	.L12
.L13:
	sub	r2, fp, #9984
	sub	r2, r2, #12
	sub	r2, r2, #20
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-1828]
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, .L18+16
	ldr	r0, [r0, #-1820]
	bl	__isoc99_fscanf
	sub	r2, fp, #9984
	sub	r2, r2, #12
	sub	r2, r2, #20
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-1828]
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L18+20
	bl	printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1828]
	add	r3, r3, #1
	str	r3, [r2, #-1828]
.L12:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1820]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1820]
	bl	fclose
	ldr	r0, .L18+24
	bl	puts
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #9984
	sub	r3, r3, #12
	sub	r3, r3, #20
	ldr	r1, [r2, #-1828]
	mov	r0, r3
	bl	sort
	ldr	r0, .L18+28
	bl	puts
	ldr	r0, .L18+32
	bl	puts
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L18+36
	ldr	r0, .L18+40
	bl	fopen
	str	r0, [r4, #-1816]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1824]
	b	.L14
.L15:
	sub	r2, fp, #9984
	sub	r2, r2, #12
	sub	r2, r2, #20
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-1824]
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L18+20
	bl	printf
	sub	r2, fp, #9984
	sub	r2, r2, #12
	sub	r2, r2, #20
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-1824]
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, .L18+20
	ldr	r0, [r0, #-1816]
	bl	fprintf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-1824]
	add	r3, r3, #1
	str	r3, [r2, #-1824]
.L14:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-1824]
	ldr	r3, [r3, #-1828]
	cmp	r2, r3
	blt	.L15
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-1816]
	bl	fclose
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC11
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
