	.file	"20450182.c"
	.intel_syntax noprefix
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.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
	nop
.L2:
	call	getchar@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 32
	je	.L2
	cmp	DWORD PTR -12[rbp], 10
	je	.L2
	cmp	DWORD PTR -12[rbp], 45
	jne	.L3
	call	getchar@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L4
.L3:
	mov	eax, 0
.L4:
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L5
.L7:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	call	getchar@PLT
	mov	DWORD PTR -12[rbp], eax
.L5:
	cmp	DWORD PTR -12[rbp], 47
	jle	.L6
	cmp	DWORD PTR -12[rbp], 57
	jle	.L7
.L6:
	cmp	DWORD PTR -4[rbp], 0
	je	.L8
	mov	eax, DWORD PTR -8[rbp]
	neg	eax
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -8[rbp]
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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 -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"Teste %d\n%d %d\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 3928
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	r13d, 1
.L17:
	mov	eax, 0
	call	get_int
	mov	ebx, eax
	test	ebx, ebx
	je	.L21
	mov	r12d, 0
	jmp	.L15
.L16:
	mov	eax, 0
	call	get_int
	movsx	rdx, r12d
	mov	DWORD PTR -8048[rbp+rdx*4], eax
	mov	eax, 0
	call	get_int
	movsx	rdx, r12d
	mov	DWORD PTR -4048[rbp+rdx*4], eax
	add	r12d, 1
.L15:
	cmp	r12d, ebx
	jl	.L16
	movsx	rsi, ebx
	lea	rax, -8048[rbp]
	lea	rcx, cmp[rip]
	mov	edx, 4
	mov	rdi, rax
	call	qsort@PLT
	movsx	rsi, ebx
	lea	rax, -4048[rbp]
	lea	rcx, cmp[rip]
	mov	edx, 4
	mov	rdi, rax
	call	qsort@PLT
	mov	eax, ebx
	sar	eax
	cdqe
	mov	ecx, DWORD PTR -4048[rbp+rax*4]
	mov	eax, ebx
	sar	eax
	cdqe
	mov	edx, DWORD PTR -8048[rbp+rax*4]
	mov	eax, r13d
	lea	r13d, 1[rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L21:
	nop
	mov	eax, 0
	mov	rdi, QWORD PTR -40[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	add	rsp, 8024
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"20450182.c"
	.text
	.align	2
	.global	get_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_int, %function
get_int:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	nop
.L2:
	bl	getchar
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #32
	beq	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #10
	beq	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #45
	bne	.L3
	bl	getchar
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	b	.L4
.L3:
	mov	r3, #0
.L4:
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L5
.L7:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-12]
	bl	getchar
	str	r0, [fp, #-16]
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #47
	ble	.L6
	ldr	r3, [fp, #-16]
	cmp	r3, #57
	ble	.L7
.L6:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #0
	b	.L9
.L8:
	ldr	r3, [fp, #-12]
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_int, .-get_int
	.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, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	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	"Teste %d\012%d %d\012\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8008
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #8000
	sub	sp, sp, #12
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r6, #1
.L17:
	bl	get_int
	mov	r5, r0
	cmp	r5, #0
	beq	.L21
	mov	r4, #0
	b	.L15
.L16:
	bl	get_int
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r1, r3
	lsl	r3, r4, #2
	add	r3, r1, r3
	str	r2, [r3, #-3908]
	bl	get_int
	mov	r2, r0
	lsl	r3, r4, #2
	sub	r1, fp, #20
	add	r3, r1, r3
	str	r2, [r3, #-4004]
	add	r4, r4, #1
.L15:
	cmp	r4, r5
	blt	.L16
	mov	r1, r5
	sub	r0, fp, #8000
	sub	r0, r0, #20
	sub	r0, r0, #4
	ldr	r3, .L22+4
	mov	r2, #4
	bl	qsort
	mov	r1, r5
	sub	r0, fp, #4016
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, .L22+4
	mov	r2, #4
	bl	qsort
	mov	r1, r6
	add	r6, r1, #1
	asr	r3, r5, #1
	sub	r2, fp, #4096
	sub	r2, r2, #20
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #-3908]
	asr	r3, r5, #1
	lsl	r3, r3, #2
	sub	r0, fp, #20
	add	r3, r0, r3
	ldr	r3, [r3, #-4004]
	ldr	r0, .L22+8
	bl	printf
	b	.L17
.L21:
	nop
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC1
	.word	cmp
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
