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 ta[100010],nt[200010],to[200010],co[200010];
void mkls(int v,int e,int *a,int *b,int *c){
  int i;
  for(i=0;i<v;i++)ta[i+1]=-1;
  for(i=0;i<e;i++){
    nt[i  ]=ta[to[i+e]=a[i]];
    nt[i+e]=ta[to[i  ]=b[i]];
    co[ta[b[i]]=i+e]=co[ta[a[i]]=i]=c[i];
  }
}
int main(){
  int n,m,d[100010],i,r,t,a[100010],b[100010],c[100010],q[100010];
  long long ev=0,od=0,ans;
  scanf("%d %d",&n,&m);
  for(i=0;i<n;i++)d[i+1]=-1;
  for(i=0;i<m;i++){
    scanf("%d %d",&a[i],&b[i]);
    c[i]=1;
  }
  mkls(n,m,a,b,c);
  q[t=0]=1;
  d[1]=0;
  for(r=1;r-t;t++){
    for(i=ta[q[t]];i+1;i=nt[i]){
      if(d[to[i]]==-1){
	d[to[i]]=d[q[t]]+1;
	q[r++]=to[i];
      }
      else if(d[q[t]]%2==d[to[i]]%2)goto END;
    }
  }
 END:;
  if(r==t){
    for(i=0;i<n;i++){
      if(d[i+1]%2)od++;
      else      ev++;
    }
    ans=od*ev;//printf("no\n");
  }
  else ans=n*(n-1LL)/2;
  printf("%lld\n",ans-m);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ta
	.bss
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 800040
co:
	.zero	800040
	.text
	.globl	mkls
	.type	mkls, @function
mkls:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	%rcx, -40(%rbp)
	movq	%r8, -48(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L3
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %ecx
	movl	-24(%rbp), %eax
	addl	%ecx, %eax
	movl	(%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %ecx
	movl	-24(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	ta(%rip), %rsi
	movl	-4(%rbp), %edx
	movl	%edx, (%rdi,%rsi)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	(%rcx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	co(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	movl	-4(%rbp), %esi
	movl	-24(%rbp), %ecx
	leal	(%rsi,%rcx), %edi
	movslq	%edx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	ta(%rip), %rcx
	movl	%edi, (%rsi,%rcx)
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ta(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	co(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkls, .-mkls
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1998848(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1440, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -2000264(%rbp)
	movq	$0, -2000256(%rbp)
	leaq	-2000280(%rbp), %rdx
	leaq	-2000284(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2000276(%rbp)
	jmp	.L7
.L8:
	movl	-2000276(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$-1, -2000240(%rbp,%rax,4)
	addl	$1, -2000276(%rbp)
.L7:
	movl	-2000284(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L8
	movl	$0, -2000276(%rbp)
	jmp	.L9
.L10:
	leaq	-1200144(%rbp), %rdx
	movl	-2000276(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1600192(%rbp), %rcx
	movl	-2000276(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2000276(%rbp), %eax
	cltq
	movl	$1, -800096(%rbp,%rax,4)
	addl	$1, -2000276(%rbp)
.L9:
	movl	-2000280(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L10
	movl	-2000280(%rbp), %esi
	movl	-2000284(%rbp), %eax
	leaq	-800096(%rbp), %rdi
	leaq	-1200144(%rbp), %rcx
	leaq	-1600192(%rbp), %rdx
	movq	%rdi, %r8
	movl	%eax, %edi
	call	mkls
	movl	$0, -2000268(%rbp)
	movl	-2000268(%rbp), %eax
	cltq
	movl	$1, -400048(%rbp,%rax,4)
	movl	$0, -2000236(%rbp)
	movl	$1, -2000272(%rbp)
	jmp	.L11
.L17:
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2000276(%rbp)
	jmp	.L12
.L16:
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L13
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %edx
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	to(%rip), %rax
	movl	(%rcx,%rax), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -2000240(%rbp,%rax,4)
	movl	-2000272(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -2000272(%rbp)
	movl	-2000276(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	jmp	.L14
.L13:
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	%eax, %ecx
	je	.L26
.L14:
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2000276(%rbp)
.L12:
	cmpl	$-1, -2000276(%rbp)
	jne	.L16
	addl	$1, -2000268(%rbp)
.L11:
	movl	-2000272(%rbp), %eax
	cmpl	-2000268(%rbp), %eax
	jne	.L17
	jmp	.L15
.L26:
	nop
.L15:
	movl	-2000272(%rbp), %eax
	cmpl	-2000268(%rbp), %eax
	jne	.L18
	movl	$0, -2000276(%rbp)
	jmp	.L19
.L22:
	movl	-2000276(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L20
	addq	$1, -2000256(%rbp)
	jmp	.L21
.L20:
	addq	$1, -2000264(%rbp)
.L21:
	addl	$1, -2000276(%rbp)
.L19:
	movl	-2000284(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L22
	movq	-2000256(%rbp), %rax
	imulq	-2000264(%rbp), %rax
	movq	%rax, -2000248(%rbp)
	jmp	.L23
.L18:
	movl	-2000284(%rbp), %eax
	cltq
	movl	-2000284(%rbp), %edx
	movslq	%edx, %rdx
	subq	$1, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -2000248(%rbp)
.L23:
	movl	-2000280(%rbp), %eax
	movslq	%eax, %rdx
	movq	-2000248(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	mkls
	.type	mkls, @function
mkls:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rcx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	testl	%edi, %edi
	jle	.L2
	movslq	%edi, %rdi
	movl	$255, %esi
	leaq	0(,%rdi,4), %rdx
	leaq	4+ta(%rip), %rdi
	call	memset@PLT
.L2:
	testl	%r12d, %r12d
	jle	.L1
	movslq	%r12d, %rax
	leaq	to(%rip), %r11
	leaq	nt(%rip), %r10
	leaq	0(,%rax,4), %r9
	leaq	co(%rip), %r8
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	(%r11,%r9), %r15
	leaq	(%r10,%r9), %r14
	addq	%r8, %r9
	leaq	ta(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	(%rbx,%rax,4), %rcx
	leal	(%r12,%rax), %edi
	movl	%ecx, (%r15,%rax,4)
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, (%r10,%rax,4)
	movslq	0(%rbp,%rax,4), %rcx
	movl	%ecx, (%r11,%rax,4)
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, (%r14,%rax,4)
	movslq	(%rbx,%rax,4), %rcx
	movl	%eax, (%rdx,%rcx,4)
	movl	0(%r13,%rax,4), %ecx
	movl	%ecx, (%r8,%rax,4)
	movslq	0(%rbp,%rax,4), %rsi
	movl	%ecx, (%r9,%rax,4)
	addq	$1, %rax
	movl	%edi, (%rdx,%rsi,4)
	cmpq	8(%rsp), %rax
	jne	.L4
.L1:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE23:
	.size	mkls, .-mkls
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-1998848(%rsp), %r11
	.cfi_def_cfa 11, 1998904
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1416, %rsp
	.cfi_def_cfa_offset 2000320
	leaq	.LC0(%rip), %r14
	movq	%r14, %rdi
	movq	%fs:40, %rax
	movq	%rax, 2000248(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rax
	testl	%eax, %eax
	jle	.L12
	leaq	20(%rsp), %rdi
	leaq	0(,%rax,4), %rdx
	movl	$255, %esi
	call	memset@PLT
.L12:
	movl	12(%rsp), %esi
	leaq	400064(%rsp), %r15
	leaq	800112(%rsp), %r12
	leaq	1200160(%rsp), %r13
	testl	%esi, %esi
	jle	.L11
	movq	%r15, %rbp
	xorl	%ebx, %ebx
	leaq	800112(%rsp), %r12
	leaq	1200160(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	leaq	(%r12,%rbx,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	movl	$1, 0(%r13,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L13
.L11:
	movl	8(%rsp), %edi
	movq	%r13, %r8
	movq	%r12, %rcx
	movq	%r15, %rdx
	call	mkls
	movl	$0, 20(%rsp)
	movl	$1, %eax
	xorl	%r10d, %r10d
	movl	$1, 1600208(%rsp)
	leaq	1600208(%rsp), %rdi
	movl	$1, %esi
	leaq	ta(%rip), %r11
	leaq	to(%rip), %r8
	leaq	nt(%rip), %r9
.L20:
	movslq	(%r11,%rax,4), %rcx
	cmpl	$-1, %ecx
	jne	.L18
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%ebx, %eax
	andl	$1, %eax
	subl	%ebx, %eax
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%ebx, %edx
	andl	$1, %edx
	subl	%ebx, %edx
	cmpl	%edx, %eax
	je	.L17
	movslq	(%r9,%rcx,4), %rcx
	cmpl	$-1, %ecx
	je	.L14
.L52:
	movslq	(%rdi), %rax
.L18:
	movslq	(%r8,%rcx,4), %rbp
	movl	16(%rsp,%rax,4), %eax
	movl	16(%rsp,%rbp,4), %edx
	cmpl	$-1, %edx
	jne	.L15
	addl	$1, %eax
	movslq	(%r9,%rcx,4), %rcx
	movl	%eax, 16(%rsp,%rbp,4)
	movslq	%esi, %rax
	addl	$1, %esi
	movl	%ebp, 1600208(%rsp,%rax,4)
	cmpl	$-1, %ecx
	jne	.L52
.L14:
	addl	$1, %r10d
	addq	$4, %rdi
	cmpl	%esi, %r10d
	je	.L53
	movslq	(%rdi), %rax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	8(%rsp), %rcx
	cmpl	%r10d, %esi
	je	.L19
	leaq	-1(%rcx), %rax
	imulq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
.L37:
	movslq	12(%rsp), %rcx
	subq	%rcx, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	2000248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$2000264, %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
.L53:
	.cfi_restore_state
	movl	8(%rsp), %ecx
.L19:
	xorl	%edx, %edx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L22
	leal	-1(%rcx), %eax
	cmpl	$3, %eax
	jbe	.L39
	pxor	%xmm3, %xmm3
	leaq	20(%rsp), %rax
	pxor	%xmm4, %xmm4
	movl	%ecx, %edx
	shrl	$2, %edx
	movdqa	.LC1(%rip), %xmm6
	movdqa	%xmm3, %xmm1
	subl	$1, %edx
	salq	$4, %rdx
	leaq	36(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm7
	addq	$16, %rax
	pand	%xmm6, %xmm0
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm0, %xmm2
	pand	%xmm6, %xmm0
	pandn	%xmm6, %xmm2
	pcmpgtd	%xmm2, %xmm7
	movdqa	%xmm2, %xmm5
	punpckldq	%xmm7, %xmm5
	punpckhdq	%xmm7, %xmm2
	paddq	%xmm5, %xmm1
	movdqa	%xmm0, %xmm5
	paddq	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtd	%xmm0, %xmm2
	punpckldq	%xmm2, %xmm5
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm5, %xmm3
	paddq	%xmm0, %xmm3
	cmpq	%rdx, %rax
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%ecx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddq	%xmm0, %xmm3
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movq	%xmm3, %rdx
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	testb	$3, %cl
	je	.L22
.L24:
	leal	1(%rsi), %edi
	movslq	%edi, %r8
	testb	$1, 16(%rsp,%r8,4)
	jne	.L55
	addq	$1, %rax
.L29:
	cmpl	%edi, %ecx
	jle	.L22
	leal	2(%rsi), %edi
	movslq	%edi, %r8
	testb	$1, 16(%rsp,%r8,4)
	je	.L30
	addq	$1, %rdx
.L31:
	cmpl	%edi, %ecx
	jle	.L22
	leal	3(%rsi), %edi
	movslq	%edi, %r8
	testb	$1, 16(%rsp,%r8,4)
	je	.L32
	addq	$1, %rdx
.L33:
	cmpl	%ecx, %edi
	jge	.L22
	leal	4(%rsi), %ecx
	movslq	%ecx, %rcx
	testb	$1, 16(%rsp,%rcx,4)
	jne	.L34
	addq	$1, %rax
.L22:
	imulq	%rdx, %rax
	jmp	.L37
.L55:
	addq	$1, %rdx
	jmp	.L29
.L30:
	addq	$1, %rax
	jmp	.L31
.L32:
	addq	$1, %rax
	jmp	.L33
.L34:
	addq	$1, %rdx
	jmp	.L22
.L39:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L24
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	co
	.bss
	.align 32
	.type	co, @object
	.size	co, 800040
co:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
	.p2align 4
	.globl	mkls
	.type	mkls, @function
mkls:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r8, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rcx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	testl	%edi, %edi
	jle	.L2
	movslq	%edi, %rdi
	movl	$255, %esi
	leaq	0(,%rdi,4), %rdx
	leaq	4+ta(%rip), %rdi
	call	memset@PLT
.L2:
	testl	%r12d, %r12d
	jle	.L1
	movslq	%r12d, %rax
	leaq	to(%rip), %r11
	leaq	nt(%rip), %r10
	leaq	0(,%rax,4), %r9
	leaq	co(%rip), %r8
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	(%r11,%r9), %r15
	leaq	(%r10,%r9), %r14
	addq	%r8, %r9
	leaq	ta(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	(%rbx,%rax,4), %rcx
	leal	(%r12,%rax), %edi
	movl	%ecx, (%r15,%rax,4)
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, (%r10,%rax,4)
	movslq	0(%rbp,%rax,4), %rcx
	movl	%ecx, (%r11,%rax,4)
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, (%r14,%rax,4)
	movslq	(%rbx,%rax,4), %rcx
	movl	%eax, (%rdx,%rcx,4)
	movl	0(%r13,%rax,4), %ecx
	movl	%ecx, (%r8,%rax,4)
	movslq	0(%rbp,%rax,4), %rsi
	movl	%ecx, (%r9,%rax,4)
	addq	$1, %rax
	movl	%edi, (%rdx,%rsi,4)
	cmpq	8(%rsp), %rax
	jne	.L4
.L1:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE23:
	.size	mkls, .-mkls
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-1998848(%rsp), %r11
	.cfi_def_cfa 11, 1998904
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1416, %rsp
	.cfi_def_cfa_offset 2000320
	leaq	.LC0(%rip), %r14
	movq	%r14, %rdi
	movq	%fs:40, %rax
	movq	%rax, 2000248(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rax
	testl	%eax, %eax
	jle	.L12
	leaq	20(%rsp), %rdi
	leaq	0(,%rax,4), %rdx
	movl	$255, %esi
	call	memset@PLT
.L12:
	movl	12(%rsp), %esi
	leaq	400064(%rsp), %r15
	leaq	800112(%rsp), %r12
	leaq	1200160(%rsp), %r13
	testl	%esi, %esi
	jle	.L11
	movq	%r15, %rbp
	xorl	%ebx, %ebx
	leaq	800112(%rsp), %r12
	leaq	1200160(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	leaq	(%r12,%rbx,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	movl	$1, 0(%r13,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L13
.L11:
	movl	8(%rsp), %edi
	movq	%r13, %r8
	movq	%r12, %rcx
	movq	%r15, %rdx
	call	mkls
	movl	$0, 20(%rsp)
	movl	$1, %eax
	xorl	%r10d, %r10d
	movl	$1, 1600208(%rsp)
	leaq	1600208(%rsp), %rdi
	movl	$1, %esi
	leaq	ta(%rip), %r11
	leaq	to(%rip), %r8
	leaq	nt(%rip), %r9
.L20:
	movslq	(%r11,%rax,4), %rcx
	cmpl	$-1, %ecx
	jne	.L18
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%ebx, %eax
	andl	$1, %eax
	subl	%ebx, %eax
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%ebx, %edx
	andl	$1, %edx
	subl	%ebx, %edx
	cmpl	%edx, %eax
	je	.L17
	movslq	(%r9,%rcx,4), %rcx
	cmpl	$-1, %ecx
	je	.L14
.L52:
	movslq	(%rdi), %rax
.L18:
	movslq	(%r8,%rcx,4), %rbp
	movl	16(%rsp,%rax,4), %eax
	movl	16(%rsp,%rbp,4), %edx
	cmpl	$-1, %edx
	jne	.L15
	addl	$1, %eax
	movslq	(%r9,%rcx,4), %rcx
	movl	%eax, 16(%rsp,%rbp,4)
	movslq	%esi, %rax
	addl	$1, %esi
	movl	%ebp, 1600208(%rsp,%rax,4)
	cmpl	$-1, %ecx
	jne	.L52
.L14:
	addl	$1, %r10d
	addq	$4, %rdi
	cmpl	%esi, %r10d
	je	.L53
	movslq	(%rdi), %rax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	8(%rsp), %rcx
	cmpl	%r10d, %esi
	je	.L19
	leaq	-1(%rcx), %rax
	imulq	%rcx, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
.L37:
	movslq	12(%rsp), %rcx
	subq	%rcx, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	2000248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$2000264, %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
.L53:
	.cfi_restore_state
	movl	8(%rsp), %ecx
.L19:
	xorl	%edx, %edx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L22
	leal	-1(%rcx), %eax
	cmpl	$3, %eax
	jbe	.L39
	pxor	%xmm3, %xmm3
	leaq	20(%rsp), %rax
	pxor	%xmm4, %xmm4
	movl	%ecx, %edx
	shrl	$2, %edx
	movdqa	.LC1(%rip), %xmm6
	movdqa	%xmm3, %xmm1
	subl	$1, %edx
	salq	$4, %rdx
	leaq	36(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm7
	addq	$16, %rax
	pand	%xmm6, %xmm0
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm0
	movdqa	%xmm0, %xmm2
	pand	%xmm6, %xmm0
	pandn	%xmm6, %xmm2
	pcmpgtd	%xmm2, %xmm7
	movdqa	%xmm2, %xmm5
	punpckldq	%xmm7, %xmm5
	punpckhdq	%xmm7, %xmm2
	paddq	%xmm5, %xmm1
	movdqa	%xmm0, %xmm5
	paddq	%xmm2, %xmm1
	movdqa	%xmm4, %xmm2
	pcmpgtd	%xmm0, %xmm2
	punpckldq	%xmm2, %xmm5
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm5, %xmm3
	paddq	%xmm0, %xmm3
	cmpq	%rdx, %rax
	jne	.L25
	movdqa	%xmm3, %xmm0
	movl	%ecx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddq	%xmm0, %xmm3
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movq	%xmm3, %rdx
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	testb	$3, %cl
	je	.L22
.L24:
	leal	1(%rsi), %edi
	movslq	%edi, %r8
	testb	$1, 16(%rsp,%r8,4)
	jne	.L55
	addq	$1, %rax
.L29:
	cmpl	%edi, %ecx
	jle	.L22
	leal	2(%rsi), %edi
	movslq	%edi, %r8
	testb	$1, 16(%rsp,%r8,4)
	je	.L30
	addq	$1, %rdx
.L31:
	cmpl	%edi, %ecx
	jle	.L22
	leal	3(%rsi), %edi
	movslq	%edi, %r8
	testb	$1, 16(%rsp,%r8,4)
	je	.L32
	addq	$1, %rdx
.L33:
	cmpl	%ecx, %edi
	jge	.L22
	leal	4(%rsi), %ecx
	movslq	%ecx, %rcx
	testb	$1, 16(%rsp,%rcx,4)
	jne	.L34
	addq	$1, %rax
.L22:
	imulq	%rdx, %rax
	jmp	.L37
.L55:
	addq	$1, %rdx
	jmp	.L29
.L30:
	addq	$1, %rax
	jmp	.L31
.L32:
	addq	$1, %rax
	jmp	.L33
.L34:
	addq	$1, %rdx
	jmp	.L22
.L39:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	.L24
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	co
	.bss
	.align 32
	.type	co, @object
	.size	co, 800040
co:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 ta[100010],nt[200010],to[200010],co[200010];
void mkls(int v,int e,int *a,int *b,int *c){
  int i;
  for(i=0;i<v;i++)ta[i+1]=-1;
  for(i=0;i<e;i++){
    nt[i  ]=ta[to[i+e]=a[i]];
    nt[i+e]=ta[to[i  ]=b[i]];
    co[ta[b[i]]=i+e]=co[ta[a[i]]=i]=c[i];
  }
}
int main(){
  int n,m,d[100010],i,r,t,a[100010],b[100010],c[100010],q[100010];
  long long ev=0,od=0,ans;
  scanf("%d %d",&n,&m);
  for(i=0;i<n;i++)d[i+1]=-1;
  for(i=0;i<m;i++){
    scanf("%d %d",&a[i],&b[i]);
    c[i]=1;
  }
  mkls(n,m,a,b,c);
  q[t=0]=1;
  d[1]=0;
  for(r=1;r-t;t++){
    for(i=ta[q[t]];i+1;i=nt[i]){
      if(d[to[i]]==-1){
	d[to[i]]=d[q[t]]+1;
	q[r++]=to[i];
      }
      else if(d[q[t]]%2==d[to[i]]%2)goto END;
    }
  }
 END:;
  if(r==t){
    for(i=0;i<n;i++){
      if(d[i+1]%2)od++;
      else      ev++;
    }
    ans=od*ev;//printf("no\n");
  }
  else ans=n*(n-1LL)/2;
  printf("%lld\n",ans-m);
  return 0;
}

6 5
1 2
2 3
3 4
4 5
4 6
 5 5
1 2
2 3
3 1
5 3
5 1
 6 5
1 2
2 2
3 4
4 5
5 6
 5 5
1 2
2 3
3 2
5 4
5 1
 6 5
1 2
2 3
3 4
4 5
3 6
 12 5
1 2
2 3
3 3
0 5
4 6
 9 5
1 2
2 3
3 3
0 5
4 6
 15 5
1 2
2 3
3 3
0 5
4 2
 8 5
1 1
2 3
3 1
5 3
5 1
 14 5
1 2
2 3
3 3
0 4
0 6

3
 5
 10
 1
 4
 61
 31
 100
 23
 86

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 ta[100010],nt[200010],to[200010],co[200010];
void mkls(int v,int e,int *a,int *b,int *c){
  int i;
  for(i=0;i<v;i++)ta[i+1]=-1;
  for(i=0;i<e;i++){
    nt[i  ]=ta[to[i+e]=a[i]];
    nt[i+e]=ta[to[i  ]=b[i]];
    co[ta[b[i]]=i+e]=co[ta[a[i]]=i]=c[i];
  }
}
int main(){
  int n,m,d[100010],i,r,t,a[100010],b[100010],c[100010],q[100010];
  long long ev=0,od=0,ans;
  scanf("%d %d",&n,&m);
  for(i=0;i<n;i++)d[i+1]=-1;
  for(i=0;i<m;i++){
    scanf("%d %d",&a[i],&b[i]);
    c[i]=1;
  }
  mkls(n,m,a,b,c);
  q[t=0]=1;
  d[1]=0;
  for(r=1;r-t;t++){
    for(i=ta[q[t]];i+1;i=nt[i]){
      if(d[to[i]]==-1){
	d[to[i]]=d[q[t]]+1;
	q[r++]=to[i];
      }
      else if(d[q[t]]%2==d[to[i]]%2)goto END;
    }
  }
 END:;
  if(r==t){
    for(i=0;i<n;i++){
      if(d[i+1]%2)od++;
      else      ev++;
    }
    ans=od*ev;//printf("no\n");
  }
  else ans=n*(n-1LL)/2;
  printf("%lld\n",ans-m);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ta
	.bss
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 800040
co:
	.zero	800040
	.text
	.globl	mkls
	.type	mkls, @function
mkls:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	%rcx, -40(%rbp)
	movq	%r8, -48(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L3
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %ecx
	movl	-24(%rbp), %eax
	addl	%ecx, %eax
	movl	(%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %ecx
	movl	-24(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	ta(%rip), %rsi
	movl	-4(%rbp), %edx
	movl	%edx, (%rdi,%rsi)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	(%rcx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	co(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	movl	-4(%rbp), %esi
	movl	-24(%rbp), %ecx
	leal	(%rsi,%rcx), %edi
	movslq	%edx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	ta(%rip), %rcx
	movl	%edi, (%rsi,%rcx)
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ta(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	co(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkls, .-mkls
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1998848(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1440, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -2000264(%rbp)
	movq	$0, -2000256(%rbp)
	leaq	-2000280(%rbp), %rdx
	leaq	-2000284(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2000276(%rbp)
	jmp	.L7
.L8:
	movl	-2000276(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$-1, -2000240(%rbp,%rax,4)
	addl	$1, -2000276(%rbp)
.L7:
	movl	-2000284(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L8
	movl	$0, -2000276(%rbp)
	jmp	.L9
.L10:
	leaq	-1200144(%rbp), %rdx
	movl	-2000276(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1600192(%rbp), %rcx
	movl	-2000276(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2000276(%rbp), %eax
	cltq
	movl	$1, -800096(%rbp,%rax,4)
	addl	$1, -2000276(%rbp)
.L9:
	movl	-2000280(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L10
	movl	-2000280(%rbp), %esi
	movl	-2000284(%rbp), %eax
	leaq	-800096(%rbp), %rdi
	leaq	-1200144(%rbp), %rcx
	leaq	-1600192(%rbp), %rdx
	movq	%rdi, %r8
	movl	%eax, %edi
	call	mkls
	movl	$0, -2000268(%rbp)
	movl	-2000268(%rbp), %eax
	cltq
	movl	$1, -400048(%rbp,%rax,4)
	movl	$0, -2000236(%rbp)
	movl	$1, -2000272(%rbp)
	jmp	.L11
.L17:
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2000276(%rbp)
	jmp	.L12
.L16:
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L13
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %edx
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	to(%rip), %rax
	movl	(%rcx,%rax), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -2000240(%rbp,%rax,4)
	movl	-2000272(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -2000272(%rbp)
	movl	-2000276(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	jmp	.L14
.L13:
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	%eax, %ecx
	je	.L26
.L14:
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2000276(%rbp)
.L12:
	cmpl	$-1, -2000276(%rbp)
	jne	.L16
	addl	$1, -2000268(%rbp)
.L11:
	movl	-2000272(%rbp), %eax
	cmpl	-2000268(%rbp), %eax
	jne	.L17
	jmp	.L15
.L26:
	nop
.L15:
	movl	-2000272(%rbp), %eax
	cmpl	-2000268(%rbp), %eax
	jne	.L18
	movl	$0, -2000276(%rbp)
	jmp	.L19
.L22:
	movl	-2000276(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L20
	addq	$1, -2000256(%rbp)
	jmp	.L21
.L20:
	addq	$1, -2000264(%rbp)
.L21:
	addl	$1, -2000276(%rbp)
.L19:
	movl	-2000284(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L22
	movq	-2000256(%rbp), %rax
	imulq	-2000264(%rbp), %rax
	movq	%rax, -2000248(%rbp)
	jmp	.L23
.L18:
	movl	-2000284(%rbp), %eax
	cltq
	movl	-2000284(%rbp), %edx
	movslq	%edx, %rdx
	subq	$1, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -2000248(%rbp)
.L23:
	movl	-2000280(%rbp), %eax
	movslq	%eax, %rdx
	movq	-2000248(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	ta
	.bss
	.align 32
	.type	ta, @object
	.size	ta, 400040
ta:
	.zero	400040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 800040
nt:
	.zero	800040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 800040
to:
	.zero	800040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 800040
co:
	.zero	800040
	.text
	.globl	mkls
	.type	mkls, @function
mkls:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movq	%rcx, -40(%rbp)
	movq	%r8, -48(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L3
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %ecx
	movl	-24(%rbp), %eax
	addl	%ecx, %eax
	movl	(%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %ecx
	movl	-24(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	ta(%rip), %rsi
	movl	-4(%rbp), %edx
	movl	%edx, (%rdi,%rsi)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	(%rcx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	co(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	movl	-4(%rbp), %esi
	movl	-24(%rbp), %ecx
	leal	(%rsi,%rcx), %edi
	movslq	%edx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	ta(%rip), %rcx
	movl	%edi, (%rsi,%rcx)
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ta(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	co(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkls, .-mkls
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1998848(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1440, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -2000264(%rbp)
	movq	$0, -2000256(%rbp)
	leaq	-2000280(%rbp), %rdx
	leaq	-2000284(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2000276(%rbp)
	jmp	.L7
.L8:
	movl	-2000276(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$-1, -2000240(%rbp,%rax,4)
	addl	$1, -2000276(%rbp)
.L7:
	movl	-2000284(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L8
	movl	$0, -2000276(%rbp)
	jmp	.L9
.L10:
	leaq	-1200144(%rbp), %rdx
	movl	-2000276(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1600192(%rbp), %rcx
	movl	-2000276(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2000276(%rbp), %eax
	cltq
	movl	$1, -800096(%rbp,%rax,4)
	addl	$1, -2000276(%rbp)
.L9:
	movl	-2000280(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L10
	movl	-2000280(%rbp), %esi
	movl	-2000284(%rbp), %eax
	leaq	-800096(%rbp), %rdi
	leaq	-1200144(%rbp), %rcx
	leaq	-1600192(%rbp), %rdx
	movq	%rdi, %r8
	movl	%eax, %edi
	call	mkls
	movl	$0, -2000268(%rbp)
	movl	-2000268(%rbp), %eax
	cltq
	movl	$1, -400048(%rbp,%rax,4)
	movl	$0, -2000236(%rbp)
	movl	$1, -2000272(%rbp)
	jmp	.L11
.L17:
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2000276(%rbp)
	jmp	.L12
.L16:
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L13
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %edx
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	to(%rip), %rax
	movl	(%rcx,%rax), %eax
	addl	$1, %edx
	cltq
	movl	%edx, -2000240(%rbp,%rax,4)
	movl	-2000272(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -2000272(%rbp)
	movl	-2000276(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	jmp	.L14
.L13:
	movl	-2000268(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	%eax, %ecx
	je	.L26
.L14:
	movl	-2000276(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2000276(%rbp)
.L12:
	cmpl	$-1, -2000276(%rbp)
	jne	.L16
	addl	$1, -2000268(%rbp)
.L11:
	movl	-2000272(%rbp), %eax
	cmpl	-2000268(%rbp), %eax
	jne	.L17
	jmp	.L15
.L26:
	nop
.L15:
	movl	-2000272(%rbp), %eax
	cmpl	-2000268(%rbp), %eax
	jne	.L18
	movl	$0, -2000276(%rbp)
	jmp	.L19
.L22:
	movl	-2000276(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-2000240(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L20
	addq	$1, -2000256(%rbp)
	jmp	.L21
.L20:
	addq	$1, -2000264(%rbp)
.L21:
	addl	$1, -2000276(%rbp)
.L19:
	movl	-2000284(%rbp), %eax
	cmpl	%eax, -2000276(%rbp)
	jl	.L22
	movq	-2000256(%rbp), %rax
	imulq	-2000264(%rbp), %rax
	movq	%rax, -2000248(%rbp)
	jmp	.L23
.L18:
	movl	-2000284(%rbp), %eax
	cltq
	movl	-2000284(%rbp), %edx
	movslq	%edx, %rdx
	subq	$1, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -2000248(%rbp)
.L23:
	movl	-2000280(%rbp), %eax
	movslq	%eax, %rdx
	movq	-2000248(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
