	.file	"971214.c"
	.intel_syntax noprefix
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 80000000
a:
	.zero	80000000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 8000000
b:
	.zero	8000000
	.globl	sum
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	aa
	.align 4
	.type	aa, @object
	.size	aa, 4
aa:
	.zero	4
	.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 [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR [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 %d"
	.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
	lea	rsi, n[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR sum[rip], 1
	mov	DWORD PTR i[rip], 1
	jmp	.L4
.L7:
	lea	rsi, x[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR x[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L5
	mov	edx, DWORD PTR sum[rip]
	mov	eax, DWORD PTR x[rip]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, a[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR x[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR x[rip]
	lea	ecx, 1[rdx]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR sum[rip]
	add	eax, 1
	mov	DWORD PTR sum[rip], eax
.L5:
	mov	eax, DWORD PTR x[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR x[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR x[rip]
	lea	ecx, 1[rdx]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	DWORD PTR [rdx+rax], ecx
.L6:
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L4:
	mov	edx, DWORD PTR i[rip]
	mov	eax, DWORD PTR n[rip]
	cmp	edx, eax
	jle	.L7
	mov	eax, DWORD PTR sum[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR sum[rip]
	sub	eax, 1
	mov	DWORD PTR sum[rip], eax
.L8:
	mov	DWORD PTR i[rip], 1
	jmp	.L9
.L10:
	mov	eax, DWORD PTR i[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR i[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rcx+rax]
	lea	ecx, -1[rdx]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L9:
	mov	edx, DWORD PTR i[rip]
	mov	eax, DWORD PTR sum[rip]
	cmp	edx, eax
	jle	.L10
	lea	rsi, k[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR sum[rip]
	cdqe
	lea	rdi, a[rip+4]
	lea	rcx, cmp[rip]
	mov	edx, 4
	mov	rsi, rax
	call	qsort@PLT
	mov	eax, DWORD PTR k[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR aa[rip], eax
	mov	eax, DWORD PTR aa[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, b[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR aa[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.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	"971214.c"
	.text
	.global	a
	.bss
	.align	2
	.type	a, %object
	.size	a, 80000000
a:
	.space	80000000
	.comm	n,4,4
	.comm	i,4,4
	.comm	k,4,4
	.global	b
	.align	2
	.type	b, %object
	.size	b, 8000000
b:
	.space	8000000
	.comm	sum,4,4
	.comm	x,4,4
	.comm	aa,4,4
	.text
	.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]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	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 %d\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L12
	ldr	r0, .L12+4
	bl	__isoc99_scanf
	ldr	r3, .L12+8
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L12+12
	mov	r2, #1
	str	r2, [r3]
	b	.L4
.L7:
	ldr	r1, .L12+16
	ldr	r0, .L12+4
	bl	__isoc99_scanf
	ldr	r3, .L12+16
	ldr	r3, [r3]
	ldr	r2, .L12+20
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L12+8
	ldr	r3, [r3]
	ldr	r2, .L12+16
	ldr	r2, [r2]
	ldr	r1, .L12+24
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L12+16
	ldr	r3, [r3]
	ldr	r2, .L12+20
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, .L12+16
	ldr	r3, [r3]
	add	r2, r2, #1
	ldr	r1, .L12+20
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L12+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L12+8
	str	r3, [r2]
.L5:
	ldr	r3, .L12+16
	ldr	r3, [r3]
	ldr	r2, .L12+20
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L12+16
	ldr	r3, [r3]
	ldr	r2, .L12+20
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, .L12+16
	ldr	r3, [r3]
	add	r2, r2, #1
	ldr	r1, .L12+20
	str	r2, [r1, r3, lsl #2]
.L6:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L12+12
	str	r3, [r2]
.L4:
	ldr	r3, .L12+12
	ldr	r2, [r3]
	ldr	r3, .L12
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L7
	ldr	r3, .L12+8
	ldr	r3, [r3]
	ldr	r2, .L12+24
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L12+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L12+8
	str	r3, [r2]
.L8:
	ldr	r3, .L12+12
	mov	r2, #1
	str	r2, [r3]
	b	.L9
.L10:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	ldr	r2, .L12+24
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L12+20
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	ldr	r1, .L12+24
	ldr	r3, [r1, r3, lsl #2]
	sub	r2, r2, #1
	ldr	r1, .L12+20
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L12+12
	str	r3, [r2]
.L9:
	ldr	r3, .L12+12
	ldr	r2, [r3]
	ldr	r3, .L12+8
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L10
	ldr	r1, .L12+28
	ldr	r0, .L12+4
	bl	__isoc99_scanf
	ldr	r0, .L12+32
	ldr	r3, .L12+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, .L12+36
	mov	r2, #4
	bl	qsort
	ldr	r3, .L12+28
	ldr	r3, [r3]
	ldr	r2, .L12+24
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L12+40
	str	r3, [r2]
	ldr	r3, .L12+40
	ldr	r1, [r3]
	ldr	r3, .L12+40
	ldr	r3, [r3]
	ldr	r2, .L12+20
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r0, .L12+44
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	n
	.word	.LC0
	.word	sum
	.word	i
	.word	x
	.word	b
	.word	a
	.word	k
	.word	a+4
	.word	cmp
	.word	aa
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
