Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main(){
    int N,L[200],j,k,ans=0;
    scanf("%d",&N);
    for(int i=0;i<N;i++)scanf("%d",&L[i]);
    for(int i=0;i<N-2;i++){
        for(j=i+1;j<N-1;j++){
            for(k=j+1;k<N;k++){
                if(L[i]+L[j]>L[k]&&L[j]+L[k]>L[i]&&L[k]+L[i]>L[j]){
                    if(L[i]!=L[j]&&L[j]!=L[k]&&L[k]!=L[i]){
                        ans++;
                    }
                }
            }
        }
    }
    printf("%d",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -828(%rbp)
	leaq	-840(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L2:
	movl	-840(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L3
	movl	$0, -820(%rbp)
	jmp	.L4
.L10:
	movl	-820(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -836(%rbp)
	jmp	.L5
.L9:
	movl	-836(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -832(%rbp)
	jmp	.L6
.L8:
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	addl	$1, -828(%rbp)
.L7:
	addl	$1, -832(%rbp)
.L6:
	movl	-840(%rbp), %eax
	cmpl	%eax, -832(%rbp)
	jl	.L8
	addl	$1, -836(%rbp)
.L5:
	movl	-840(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -836(%rbp)
	jl	.L9
	addl	$1, -820(%rbp)
.L4:
	movl	-840(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -820(%rbp)
	jl	.L10
	movl	-828(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$856, %rsp
	.cfi_def_cfa_offset 912
	movq	%fs:40, %rax
	movq	%rax, 840(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	32(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	addq	$4, %rbp
	cmpl	%ebx, %r10d
	jg	.L3
.L2:
	leal	-2(%r10), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L18
	leal	-1(%r10), %r13d
	leaq	40(%rsp), %rbp
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	pxor	%xmm6, %xmm6
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %r15d
	cmpl	%r15d, %r13d
	jle	.L5
	movl	%r15d, 8(%rsp)
	movl	%r13d, %ebx
	movq	%rbp, %rdi
	movl	%r15d, %esi
	subl	%r15d, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %esi
	leal	-1(%rbx), %r9d
	cmpl	%r10d, %esi
	jge	.L6
	movl	-8(%rbp), %ecx
	movl	-4(%rdi), %edx
	leal	-1(%rbx), %r9d
	cmpl	%edx, %ecx
	leal	(%rcx,%rdx), %r8d
	setne	%r11b
	cmpl	$2, %r9d
	jbe	.L19
	movl	%r11d, %eax
	movd	%edx, %xmm7
	pxor	%xmm3, %xmm3
	sall	$31, %eax
	pshufd	$0, %xmm7, %xmm5
	movd	%ecx, %xmm7
	sarl	$31, %eax
	pshufd	$0, %xmm7, %xmm4
	movd	%eax, %xmm7
	movl	%ebx, %eax
	shrl	$2, %eax
	pshufd	$0, %xmm7, %xmm8
	movd	%r8d, %xmm7
	subl	$1, %eax
	pshufd	$0, %xmm7, %xmm7
	salq	$4, %rax
	leaq	16(%rdi,%rax), %r14
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	%xmm5, %xmm0
	pcmpeqd	%xmm4, %xmm2
	pcmpeqd	%xmm6, %xmm0
	pcmpeqd	%xmm6, %xmm2
	pand	%xmm2, %xmm0
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm8, %xmm2
	pand	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	paddd	%xmm5, %xmm1
	paddd	%xmm4, %xmm2
	pcmpgtd	%xmm4, %xmm1
	pcmpgtd	%xmm5, %xmm2
	pand	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm3
	cmpq	%rax, %r14
	jne	.L8
	movdqa	%xmm3, %xmm0
	movl	%ebx, %r14d
	psrldq	$8, %xmm0
	andl	$-4, %r14d
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %eax
	addl	%eax, %r12d
	leal	(%r14,%rsi), %eax
	cmpl	%r14d, %ebx
	je	.L6
.L7:
	movslq	%eax, %rbx
	movl	32(%rsp,%rbx,4), %ebx
	cmpl	%ebx, %r8d
	jle	.L11
	leal	(%rdx,%rbx), %r14d
	cmpl	%r14d, %ecx
	jge	.L11
	leal	(%rcx,%rbx), %r14d
	cmpl	%r14d, %edx
	setl	%r14b
	andl	%r11d, %r14d
	cmpl	%ebx, %edx
	setne	%r15b
	testb	%r15b, %r14b
	je	.L11
	cmpl	%ebx, %ecx
	setne	%bl
	cmpb	$1, %bl
	sbbl	$-1, %r12d
	.p2align 4,,10
	.p2align 3
.L11:
	leal	1(%rax), %ebx
	cmpl	%r10d, %ebx
	jge	.L6
	movslq	%ebx, %rbx
	movl	32(%rsp,%rbx,4), %ebx
	cmpl	%ebx, %r8d
	jle	.L12
	leal	(%rdx,%rbx), %r14d
	cmpl	%r14d, %ecx
	jge	.L12
	leal	(%rcx,%rbx), %r14d
	cmpl	%r14d, %edx
	setl	%r14b
	andl	%r11d, %r14d
	cmpl	%ebx, %edx
	setne	%r15b
	testb	%r15b, %r14b
	je	.L12
	cmpl	%ebx, %ecx
	setne	%bl
	cmpb	$1, %bl
	sbbl	$-1, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$2, %eax
	cmpl	%eax, %r10d
	jle	.L6
	cltq
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, %r8d
	jle	.L6
	leal	(%rdx,%rax), %r8d
	cmpl	%r8d, %ecx
	jge	.L6
	leal	(%rcx,%rax), %r8d
	cmpl	%r8d, %edx
	setl	%r8b
	andl	%r11d, %r8d
	cmpl	%eax, %edx
	setne	%dl
	testb	%dl, %r8b
	je	.L6
	cmpl	%eax, %ecx
	setne	%al
	cmpb	$1, %al
	sbbl	$-1, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r9d, %ebx
	addq	$4, %rdi
	cmpl	%esi, %r13d
	jne	.L15
	movl	8(%rsp), %r15d
.L5:
	addq	$4, %rbp
	cmpl	12(%rsp), %r15d
	jne	.L16
.L4:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$856, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	movl	%esi, %eax
	jmp	.L7
.L18:
	xorl	%r12d, %r12d
	jmp	.L4
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$856, %rsp
	.cfi_def_cfa_offset 912
	movq	%fs:40, %rax
	movq	%rax, 840(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	32(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	addq	$4, %rbp
	cmpl	%ebx, %r10d
	jg	.L3
.L2:
	leal	-2(%r10), %eax
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L18
	leal	-1(%r10), %r13d
	leaq	40(%rsp), %rbp
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	pxor	%xmm6, %xmm6
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %r15d
	cmpl	%r15d, %r13d
	jle	.L5
	movl	%r15d, 8(%rsp)
	movl	%r13d, %ebx
	movq	%rbp, %rdi
	movl	%r15d, %esi
	subl	%r15d, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %esi
	leal	-1(%rbx), %r9d
	cmpl	%r10d, %esi
	jge	.L6
	movl	-8(%rbp), %ecx
	movl	-4(%rdi), %edx
	leal	-1(%rbx), %r9d
	cmpl	%edx, %ecx
	leal	(%rcx,%rdx), %r8d
	setne	%r11b
	cmpl	$2, %r9d
	jbe	.L19
	movl	%r11d, %eax
	movd	%edx, %xmm7
	pxor	%xmm3, %xmm3
	sall	$31, %eax
	pshufd	$0, %xmm7, %xmm5
	movd	%ecx, %xmm7
	sarl	$31, %eax
	pshufd	$0, %xmm7, %xmm4
	movd	%eax, %xmm7
	movl	%ebx, %eax
	shrl	$2, %eax
	pshufd	$0, %xmm7, %xmm8
	movd	%r8d, %xmm7
	subl	$1, %eax
	pshufd	$0, %xmm7, %xmm7
	salq	$4, %rax
	leaq	16(%rdi,%rax), %r14
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rax), %xmm1
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	%xmm5, %xmm0
	pcmpeqd	%xmm4, %xmm2
	pcmpeqd	%xmm6, %xmm0
	pcmpeqd	%xmm6, %xmm2
	pand	%xmm2, %xmm0
	movdqa	%xmm7, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm8, %xmm2
	pand	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	paddd	%xmm5, %xmm1
	paddd	%xmm4, %xmm2
	pcmpgtd	%xmm4, %xmm1
	pcmpgtd	%xmm5, %xmm2
	pand	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm3
	cmpq	%rax, %r14
	jne	.L8
	movdqa	%xmm3, %xmm0
	movl	%ebx, %r14d
	psrldq	$8, %xmm0
	andl	$-4, %r14d
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %eax
	addl	%eax, %r12d
	leal	(%r14,%rsi), %eax
	cmpl	%r14d, %ebx
	je	.L6
.L7:
	movslq	%eax, %rbx
	movl	32(%rsp,%rbx,4), %ebx
	cmpl	%ebx, %r8d
	jle	.L11
	leal	(%rdx,%rbx), %r14d
	cmpl	%r14d, %ecx
	jge	.L11
	leal	(%rcx,%rbx), %r14d
	cmpl	%r14d, %edx
	setl	%r14b
	andl	%r11d, %r14d
	cmpl	%ebx, %edx
	setne	%r15b
	testb	%r15b, %r14b
	je	.L11
	cmpl	%ebx, %ecx
	setne	%bl
	cmpb	$1, %bl
	sbbl	$-1, %r12d
	.p2align 4,,10
	.p2align 3
.L11:
	leal	1(%rax), %ebx
	cmpl	%r10d, %ebx
	jge	.L6
	movslq	%ebx, %rbx
	movl	32(%rsp,%rbx,4), %ebx
	cmpl	%ebx, %r8d
	jle	.L12
	leal	(%rdx,%rbx), %r14d
	cmpl	%r14d, %ecx
	jge	.L12
	leal	(%rcx,%rbx), %r14d
	cmpl	%r14d, %edx
	setl	%r14b
	andl	%r11d, %r14d
	cmpl	%ebx, %edx
	setne	%r15b
	testb	%r15b, %r14b
	je	.L12
	cmpl	%ebx, %ecx
	setne	%bl
	cmpb	$1, %bl
	sbbl	$-1, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$2, %eax
	cmpl	%eax, %r10d
	jle	.L6
	cltq
	movl	32(%rsp,%rax,4), %eax
	cmpl	%eax, %r8d
	jle	.L6
	leal	(%rdx,%rax), %r8d
	cmpl	%r8d, %ecx
	jge	.L6
	leal	(%rcx,%rax), %r8d
	cmpl	%r8d, %edx
	setl	%r8b
	andl	%r11d, %r8d
	cmpl	%eax, %edx
	setne	%dl
	testb	%dl, %r8b
	je	.L6
	cmpl	%eax, %ecx
	setne	%al
	cmpb	$1, %al
	sbbl	$-1, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r9d, %ebx
	addq	$4, %rdi
	cmpl	%esi, %r13d
	jne	.L15
	movl	8(%rsp), %r15d
.L5:
	addq	$4, %rbp
	cmpl	12(%rsp), %r15d
	jne	.L16
.L4:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$856, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	movl	%esi, %eax
	jmp	.L7
.L18:
	xorl	%r12d, %r12d
	jmp	.L4
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

#include<stdio.h>

int main(){
    int N,L[200],j,k,ans=0;
    scanf("%d",&N);
    for(int i=0;i<N;i++)scanf("%d",&L[i]);
    for(int i=0;i<N-2;i++){
        for(j=i+1;j<N-1;j++){
            for(k=j+1;k<N;k++){
                if(L[i]+L[j]>L[k]&&L[j]+L[k]>L[i]&&L[k]+L[i]>L[j]){
                    if(L[i]!=L[j]&&L[j]!=L[k]&&L[k]!=L[i]){
                        ans++;
                    }
                }
            }
        }
    }
    printf("%d",ans);
    return 0;
}
2
1 0
 10
9 4 8 1 9 6 10 6 6 8
 6
4 5 8 3 3 5
 5
4 4 3 7 5
 10
9 4 16 1 9 6 10 6 6 8
 6
4 5 6 3 3 5
 5
4 0 3 7 5
 10
9 7 16 1 9 6 10 6 6 8
 5
4 -1 0 7 5
 10
9 7 13 2 9 6 10 6 6 8

0 48 6 5 36 12 3 40 1 63
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main(){
    int N,L[200],j,k,ans=0;
    scanf("%d",&N);
    for(int i=0;i<N;i++)scanf("%d",&L[i]);
    for(int i=0;i<N-2;i++){
        for(j=i+1;j<N-1;j++){
            for(k=j+1;k<N;k++){
                if(L[i]+L[j]>L[k]&&L[j]+L[k]>L[i]&&L[k]+L[i]>L[j]){
                    if(L[i]!=L[j]&&L[j]!=L[k]&&L[k]!=L[i]){
                        ans++;
                    }
                }
            }
        }
    }
    printf("%d",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -828(%rbp)
	leaq	-840(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L2:
	movl	-840(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L3
	movl	$0, -820(%rbp)
	jmp	.L4
.L10:
	movl	-820(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -836(%rbp)
	jmp	.L5
.L9:
	movl	-836(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -832(%rbp)
	jmp	.L6
.L8:
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	addl	$1, -828(%rbp)
.L7:
	addl	$1, -832(%rbp)
.L6:
	movl	-840(%rbp), %eax
	cmpl	%eax, -832(%rbp)
	jl	.L8
	addl	$1, -836(%rbp)
.L5:
	movl	-840(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -836(%rbp)
	jl	.L9
	addl	$1, -820(%rbp)
.L4:
	movl	-840(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -820(%rbp)
	jl	.L10
	movl	-828(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -828(%rbp)
	leaq	-840(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L2:
	movl	-840(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L3
	movl	$0, -820(%rbp)
	jmp	.L4
.L10:
	movl	-820(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -836(%rbp)
	jmp	.L5
.L9:
	movl	-836(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -832(%rbp)
	jmp	.L6
.L8:
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movl	-836(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movl	-832(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-820(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L7
	addl	$1, -828(%rbp)
.L7:
	addl	$1, -832(%rbp)
.L6:
	movl	-840(%rbp), %eax
	cmpl	%eax, -832(%rbp)
	jl	.L8
	addl	$1, -836(%rbp)
.L5:
	movl	-840(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -836(%rbp)
	jl	.L9
	addl	$1, -820(%rbp)
.L4:
	movl	-840(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -820(%rbp)
	jl	.L10
	movl	-828(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
