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

```c
#include <stdio.h>
 
int main()
{
    int n=0;
    long long int num[100]={0};
    long long int ke1=0;
    long long int ke2=0;
    long long int ke3=0;
    int count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%lld",&num[i]);
    }
    if(n<3){
        printf("0");
        return 0;
    }
 
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(num[i]!=num[j]){
                for(int k=j+1;k<n;k++){
                    if(num[i]!=num[k] && num[j]!=num[k]){
                        ke1=num[i]+num[j]-num[k];
                        ke2=num[j]+num[k]-num[i];
                        ke3=num[k]+num[i]-num[j];
                        if(ke1>0 && ke2>0 && ke3>0){
                            count++;
                            
                        }
                    }
                }
            }
        }
    }
 
    printf("%d",count);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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
	movl	$100, %ecx
	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	32(%rsp), %rbp
	leaq	28(%rsp), %rsi
	movl	$0, 28(%rsp)
	movq	%rbp, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$8, %r13
	cmpl	%ebx, %r12d
	jg	.L3
	cmpl	$2, %r12d
	jle	.L2
	movl	$1, %eax
	xorl	%r11d, %r11d
	leal	-2(%r12), %r15d
	xorl	%r13d, %r13d
	movl	$1, 12(%rsp)
	leaq	40(%rsp), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%r9d, %r12d
	jle	.L7
.L10:
	movl	%r9d, %eax
.L4:
	movslq	%eax, %rdi
	movq	32(%rsp,%r13,8), %rcx
	leal	1(%rax), %r9d
	movq	32(%rsp,%rdi,8), %rsi
	cmpq	%rsi, %rcx
	je	.L6
	cmpl	%r9d, %r12d
	jle	.L7
	movl	%r15d, %r8d
	leaq	0(%rbp,%rdi,8), %rdx
	leaq	(%rcx,%rsi), %r10
	subl	%eax, %r8d
	leaq	(%r8,%rdi), %rax
	leaq	(%r14,%rax,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rdx), %rax
	cmpq	%rax, %rcx
	je	.L8
	cmpq	%rax, %rsi
	je	.L8
	leaq	(%rsi,%rax), %r8
	cmpq	%rcx, %r8
	setg	%bl
	cmpq	%rax, %r10
	setg	%r8b
	testb	%r8b, %bl
	je	.L8
	addq	%rcx, %rax
	cmpq	%rsi, %rax
	setg	%al
	cmpb	$1, %al
	sbbl	$-1, %r11d
.L8:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	movl	12(%rsp), %eax
	addl	$1, %eax
	cmpl	%eax, %r12d
	jle	.L31
	movslq	12(%rsp), %r13
	movl	%eax, 12(%rsp)
	jmp	.L4
.L31:
	movl	%r11d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	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
.L2:
	.cfi_restore_state
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L32:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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
	movl	$100, %ecx
	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	32(%rsp), %rbp
	leaq	28(%rsp), %rsi
	movl	$0, 28(%rsp)
	movq	%rbp, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$8, %r13
	cmpl	%ebx, %r12d
	jg	.L3
	cmpl	$2, %r12d
	jle	.L2
	movl	$1, %eax
	xorl	%r11d, %r11d
	leal	-2(%r12), %r15d
	xorl	%r13d, %r13d
	movl	$1, 12(%rsp)
	leaq	40(%rsp), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%r9d, %r12d
	jle	.L7
.L10:
	movl	%r9d, %eax
.L4:
	movslq	%eax, %rdi
	movq	32(%rsp,%r13,8), %rcx
	leal	1(%rax), %r9d
	movq	32(%rsp,%rdi,8), %rsi
	cmpq	%rsi, %rcx
	je	.L6
	cmpl	%r9d, %r12d
	jle	.L7
	movl	%r15d, %r8d
	leaq	0(%rbp,%rdi,8), %rdx
	leaq	(%rcx,%rsi), %r10
	subl	%eax, %r8d
	leaq	(%r8,%rdi), %rax
	leaq	(%r14,%rax,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rdx), %rax
	cmpq	%rax, %rcx
	je	.L8
	cmpq	%rax, %rsi
	je	.L8
	leaq	(%rsi,%rax), %r8
	cmpq	%rcx, %r8
	setg	%bl
	cmpq	%rax, %r10
	setg	%r8b
	testb	%r8b, %bl
	je	.L8
	addq	%rcx, %rax
	cmpq	%rsi, %rax
	setg	%al
	cmpb	$1, %al
	sbbl	$-1, %r11d
.L8:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	movl	12(%rsp), %eax
	addl	$1, %eax
	cmpl	%eax, %r12d
	jle	.L31
	movslq	12(%rsp), %r13
	movl	%eax, 12(%rsp)
	jmp	.L4
.L31:
	movl	%r11d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	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
.L2:
	.cfi_restore_state
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L32:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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
	movl	$100, %ecx
	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	32(%rsp), %rbp
	leaq	28(%rsp), %rsi
	movl	$0, 28(%rsp)
	movq	%rbp, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$8, %r13
	cmpl	%ebx, %r12d
	jg	.L3
	cmpl	$2, %r12d
	jle	.L2
	movl	$1, %eax
	xorl	%r11d, %r11d
	leal	-2(%r12), %r15d
	xorl	%r13d, %r13d
	movl	$1, 12(%rsp)
	leaq	40(%rsp), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%r9d, %r12d
	jle	.L7
.L10:
	movl	%r9d, %eax
.L4:
	movslq	%eax, %rdi
	movq	32(%rsp,%r13,8), %rcx
	leal	1(%rax), %r9d
	movq	32(%rsp,%rdi,8), %rsi
	cmpq	%rsi, %rcx
	je	.L6
	cmpl	%r9d, %r12d
	jle	.L7
	movl	%r15d, %r8d
	leaq	0(%rbp,%rdi,8), %rdx
	leaq	(%rcx,%rsi), %r10
	subl	%eax, %r8d
	leaq	(%r8,%rdi), %rax
	leaq	(%r14,%rax,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rdx), %rax
	cmpq	%rax, %rcx
	je	.L8
	cmpq	%rax, %rsi
	je	.L8
	leaq	(%rsi,%rax), %r8
	cmpq	%rcx, %r8
	setg	%bl
	cmpq	%rax, %r10
	setg	%r8b
	testb	%r8b, %bl
	je	.L8
	addq	%rcx, %rax
	cmpq	%rsi, %rax
	setg	%al
	cmpb	$1, %al
	sbbl	$-1, %r11d
.L8:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	movl	12(%rsp), %eax
	addl	$1, %eax
	cmpl	%eax, %r12d
	jle	.L31
	movslq	12(%rsp), %r13
	movl	%eax, 12(%rsp)
	jmp	.L4
.L31:
	movl	%r11d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	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
.L2:
	.cfi_restore_state
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L32:
	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:
```
```c
#include <stdio.h>
 
int main()
{
    int n=0;
    long long int num[100]={0};
    long long int ke1=0;
    long long int ke2=0;
    long long int ke3=0;
    int count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%lld",&num[i]);
    }
    if(n<3){
        printf("0");
        return 0;
    }
 
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(num[i]!=num[j]){
                for(int k=j+1;k<n;k++){
                    if(num[i]!=num[k] && num[j]!=num[k]){
                        ke1=num[i]+num[j]-num[k];
                        ke2=num[j]+num[k]-num[i];
                        ke3=num[k]+num[i]-num[j];
                        if(ke1>0 && ke2>0 && ke3>0){
                            count++;
                            
                        }
                    }
                }
            }
        }
    }
 
    printf("%d",count);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
 
int main()
{
    int n=0;
    long long int num[100]={0};
    long long int ke1=0;
    long long int ke2=0;
    long long int ke3=0;
    int count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%lld",&num[i]);
    }
    if(n<3){
        printf("0");
        return 0;
    }
 
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(num[i]!=num[j]){
                for(int k=j+1;k<n;k++){
                    if(num[i]!=num[k] && num[j]!=num[k]){
                        ke1=num[i]+num[j]-num[k];
                        ke2=num[j]+num[k]-num[i];
                        ke3=num[k]+num[i]-num[j];
                        if(ke1>0 && ke2>0 && ke3>0){
                            count++;
                            
                        }
                    }
                }
            }
        }
    }
 
    printf("%d",count);
    return 0;
}```

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.
Optimized Assembly Code:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
 
int main()
{
    int n=0;
    long long int num[100]={0};
    long long int ke1=0;
    long long int ke2=0;
    long long int ke3=0;
    int count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%lld",&num[i]);
    }
    if(n<3){
        printf("0");
        return 0;
    }
 
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(num[i]!=num[j]){
                for(int k=j+1;k<n;k++){
                    if(num[i]!=num[k] && num[j]!=num[k]){
                        ke1=num[i]+num[j]-num[k];
                        ke2=num[j]+num[k]-num[i];
                        ke3=num[k]+num[i]-num[j];
                        if(ke1>0 && ke2>0 && ke3>0){
                            count++;
                            
                        }
                    }
                }
            }
        }
    }
 
    printf("%d",count);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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
	movl	$100, %ecx
	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	32(%rsp), %rbp
	leaq	28(%rsp), %rsi
	movl	$0, 28(%rsp)
	movq	%rbp, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$8, %r13
	cmpl	%ebx, %r12d
	jg	.L3
	cmpl	$2, %r12d
	jle	.L2
	movl	$1, %eax
	xorl	%r11d, %r11d
	leal	-2(%r12), %r15d
	xorl	%r13d, %r13d
	movl	$1, 12(%rsp)
	leaq	40(%rsp), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%r9d, %r12d
	jle	.L7
.L10:
	movl	%r9d, %eax
.L4:
	movslq	%eax, %rdi
	movq	32(%rsp,%r13,8), %rcx
	leal	1(%rax), %r9d
	movq	32(%rsp,%rdi,8), %rsi
	cmpq	%rsi, %rcx
	je	.L6
	cmpl	%r9d, %r12d
	jle	.L7
	movl	%r15d, %r8d
	leaq	0(%rbp,%rdi,8), %rdx
	leaq	(%rcx,%rsi), %r10
	subl	%eax, %r8d
	leaq	(%r8,%rdi), %rax
	leaq	(%r14,%rax,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rdx), %rax
	cmpq	%rax, %rcx
	je	.L8
	cmpq	%rax, %rsi
	je	.L8
	leaq	(%rsi,%rax), %r8
	cmpq	%rcx, %r8
	setg	%bl
	cmpq	%rax, %r10
	setg	%r8b
	testb	%r8b, %bl
	je	.L8
	addq	%rcx, %rax
	cmpq	%rsi, %rax
	setg	%al
	cmpb	$1, %al
	sbbl	$-1, %r11d
.L8:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	movl	12(%rsp), %eax
	addl	$1, %eax
	cmpl	%eax, %r12d
	jle	.L31
	movslq	12(%rsp), %r13
	movl	%eax, 12(%rsp)
	jmp	.L4
.L31:
	movl	%r11d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	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
.L2:
	.cfi_restore_state
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L32:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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
	movl	$100, %ecx
	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	32(%rsp), %rbp
	leaq	28(%rsp), %rsi
	movl	$0, 28(%rsp)
	movq	%rbp, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movq	%rbp, %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$8, %r13
	cmpl	%ebx, %r12d
	jg	.L3
	cmpl	$2, %r12d
	jle	.L2
	movl	$1, %eax
	xorl	%r11d, %r11d
	leal	-2(%r12), %r15d
	xorl	%r13d, %r13d
	movl	$1, 12(%rsp)
	leaq	40(%rsp), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%r9d, %r12d
	jle	.L7
.L10:
	movl	%r9d, %eax
.L4:
	movslq	%eax, %rdi
	movq	32(%rsp,%r13,8), %rcx
	leal	1(%rax), %r9d
	movq	32(%rsp,%rdi,8), %rsi
	cmpq	%rsi, %rcx
	je	.L6
	cmpl	%r9d, %r12d
	jle	.L7
	movl	%r15d, %r8d
	leaq	0(%rbp,%rdi,8), %rdx
	leaq	(%rcx,%rsi), %r10
	subl	%eax, %r8d
	leaq	(%r8,%rdi), %rax
	leaq	(%r14,%rax,8), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rdx), %rax
	cmpq	%rax, %rcx
	je	.L8
	cmpq	%rax, %rsi
	je	.L8
	leaq	(%rsi,%rax), %r8
	cmpq	%rcx, %r8
	setg	%bl
	cmpq	%rax, %r10
	setg	%r8b
	testb	%r8b, %bl
	je	.L8
	addq	%rcx, %rax
	cmpq	%rsi, %rax
	setg	%al
	cmpb	$1, %al
	sbbl	$-1, %r11d
.L8:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	movl	12(%rsp), %eax
	addl	$1, %eax
	cmpl	%eax, %r12d
	jle	.L31
	movslq	12(%rsp), %r13
	movl	%eax, 12(%rsp)
	jmp	.L4
.L31:
	movl	%r11d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	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
.L2:
	.cfi_restore_state
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L32:
	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:
```