	.file	"617158.c"
	.intel_syntax noprefix
	.text
	.globl	subjects
	.bss
	.align 32
	.type	subjects, @object
	.size	subjects, 8008
subjects:
	.zero	8008
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.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, 1072
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1060[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L4
.L16:
	mov	DWORD PTR -1052[rbp], 0
	mov	QWORD PTR -1024[rbp], 0
	mov	QWORD PTR -1016[rbp], 0
	lea	rdx, -1008[rbp]
	mov	eax, 0
	mov	ecx, 123
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -1048[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -1048[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, subjects[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -1048[rbp], 1
.L5:
	mov	eax, DWORD PTR -1056[rbp]
	cmp	DWORD PTR -1048[rbp], eax
	jl	.L6
	mov	DWORD PTR -1044[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, subjects[rip]
	add	rax, rdx
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -1044[rbp], 1
.L7:
	mov	eax, DWORD PTR -1056[rbp]
	cmp	DWORD PTR -1044[rbp], eax
	jl	.L8
	mov	eax, DWORD PTR -1056[rbp]
	cdqe
	lea	rcx, cmp[rip]
	mov	edx, 8
	mov	rsi, rax
	lea	rdi, subjects[rip]
	call	qsort@PLT
	mov	DWORD PTR -1040[rbp], 0
	jmp	.L9
.L15:
	mov	eax, DWORD PTR -1040[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, subjects[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -1032[rbp], eax
	mov	eax, DWORD PTR -1040[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, subjects[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -1028[rbp], eax
	mov	BYTE PTR -1061[rbp], 0
	mov	eax, DWORD PTR -1032[rbp]
	mov	DWORD PTR -1036[rbp], eax
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -1036[rbp]
	sub	eax, 1
	cdqe
	movzx	eax, BYTE PTR -1024[rbp+rax]
	test	al, al
	jne	.L11
	mov	eax, DWORD PTR -1036[rbp]
	sub	eax, 1
	cdqe
	mov	BYTE PTR -1024[rbp+rax], 1
	mov	BYTE PTR -1061[rbp], 1
	jmp	.L12
.L11:
	sub	DWORD PTR -1036[rbp], 1
.L10:
	cmp	DWORD PTR -1036[rbp], 0
	jg	.L13
.L12:
	cmp	BYTE PTR -1061[rbp], 0
	jne	.L14
	mov	eax, DWORD PTR -1028[rbp]
	add	DWORD PTR -1052[rbp], eax
.L14:
	add	DWORD PTR -1040[rbp], 1
.L9:
	mov	eax, DWORD PTR -1056[rbp]
	cmp	DWORD PTR -1040[rbp], eax
	jl	.L15
	mov	eax, DWORD PTR -1052[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	eax, DWORD PTR -1060[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -1060[rbp], edx
	test	eax, eax
	jne	.L16
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	"617158.c"
	.text
	.comm	subjects,8008,4
	.align	2
	.global	cmp
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmp, %function
cmp:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	cmp, .-cmp
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L19+4
	bl	__isoc99_scanf
	b	.L4
.L16:
	mov	r3, #0
	str	r3, [fp, #-1040]
	mov	r3, #0
	str	r3, [fp, #-1012]
	sub	r3, fp, #1008
	ldr	r2, .L19+8
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1040
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L19+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-1036]
	b	.L5
.L6:
	ldr	r3, [fp, #-1036]
	lsl	r3, r3, #3
	ldr	r2, .L19+12
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L19+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-1036]
	add	r3, r3, #1
	str	r3, [fp, #-1036]
.L5:
	ldr	r3, [fp, #-1044]
	ldr	r2, [fp, #-1036]
	cmp	r2, r3
	blt	.L6
	mov	r3, #0
	str	r3, [fp, #-1032]
	b	.L7
.L8:
	ldr	r3, [fp, #-1032]
	lsl	r3, r3, #3
	ldr	r2, .L19+12
	add	r3, r3, r2
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L19+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-1032]
	add	r3, r3, #1
	str	r3, [fp, #-1032]
.L7:
	ldr	r3, [fp, #-1044]
	ldr	r2, [fp, #-1032]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-1044]
	mov	r1, r3
	ldr	r3, .L19+16
	mov	r2, #8
	ldr	r0, .L19+12
	bl	qsort
	mov	r3, #0
	str	r3, [fp, #-1028]
	b	.L9
.L15:
	ldr	r2, .L19+12
	ldr	r3, [fp, #-1028]
	ldr	r3, [r2, r3, lsl #3]
	str	r3, [fp, #-1020]
	ldr	r2, .L19+12
	ldr	r3, [fp, #-1028]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-1016]
	mov	r3, #0
	strb	r3, [fp, #-1049]
	ldr	r3, [fp, #-1020]
	str	r3, [fp, #-1024]
	b	.L10
.L13:
	ldr	r3, [fp, #-1024]
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-1008]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-1024]
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3, #-1008]
	mov	r3, #1
	strb	r3, [fp, #-1049]
	b	.L12
.L11:
	ldr	r3, [fp, #-1024]
	sub	r3, r3, #1
	str	r3, [fp, #-1024]
.L10:
	ldr	r3, [fp, #-1024]
	cmp	r3, #0
	bgt	.L13
.L12:
	ldrb	r3, [fp, #-1049]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L14
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1016]
	add	r3, r2, r3
	str	r3, [fp, #-1040]
.L14:
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	str	r3, [fp, #-1028]
.L9:
	ldr	r3, [fp, #-1044]
	ldr	r2, [fp, #-1028]
	cmp	r2, r3
	blt	.L15
	ldr	r1, [fp, #-1040]
	ldr	r0, .L19+20
	bl	printf
.L4:
	ldr	r3, [fp, #-1048]
	sub	r2, r3, #1
	str	r2, [fp, #-1048]
	cmp	r3, #0
	bne	.L16
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC2
	.word	.LC0
	.word	997
	.word	subjects
	.word	cmp
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
