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>
long long N[2][800010],L[2][800010],T;
long long  hyouka(long long a,long long b){return a+b;}
long long MIN(long long a,long long b){return  a<b?a:b;}
void lsset(int n,int x){
  int i;
  for(T=1;T<n;T*=2);
  for(i=0;i<T;i++)N[x][T+i]=i<n?n-1:0;
  for(i=T-1;i;i--)N[x][i]=hyouka(N[x][i*2],N[x][i*2+1]);
}
void lasy(int i,int l,int r,int x){
  if(L[x][i]==0)return;
  N[x][i]=MIN(L[x][i],N[x][i]);
  if(r-l>1){
    L[x][i*2  ]=L[x][i];
    L[x][i*2+1]=L[x][i];
  }
  L[x][i]=0;
}
void lsadd(int a,int b,int c,int i,int l,int r,int x){
  lasy(i,l,r,x);
  if(r<=a||b<=l)return;
  if(a<=l&&r<=b){
    if(L[x][i]==0)L[x][i]=c;
    else L[x][i]=MIN(c,L[x][i]);
    lasy(i,l,r,x);
  }
  else{
    lsadd(a,b,c,i*2  ,l,(l+r)/2,x);
    lsadd(a,b,c,i*2+1,(l+r)/2,r,x);
    N[x][i]=hyouka(N[x][i*2],N[x][i*2+1]);
  }
}
long long lsget(int a,int b,int i,int l,int r,int x){
  lasy(i,l,r,x);
  if(b<=l||r<=a)return 0;
  if(a<=l&&r<=b)return N[x][i];
  return hyouka(lsget(a,b,i*2,l,(l+r)/2,x),lsget(a,b,i*2+1,(l+r)/2,r,x));
}
int main(){
  long long n,m,ans=0,a,b,i,near;
  long long min[2]={1e18,1e18};
  scanf("%lld %lld",&n,&m);
  lsset(n,0);
  lsset(n,1);
  ans=(n-2)*(n-2);//printf("%d\n",ans);
  //for(i=0;i<n;i++)printf("%lld ",N[1][T+i]);printf("\n");
  for(i=0;i<m;i++){
    //int j;
    //for(j=0;j<n;j++)printf("%lld ",lsget(j,j+1,1,0,T,0));printf("\n");
    //for(j=0;j<n;j++)printf("%lld ",lsget(j,j+1,1,0,T,1));printf("\n");
    scanf("%lld %lld",&a,&b);
    b--;
    if(b==0)continue;
    near=lsget(b,b+1,1,0,T,a-1);//printf("%lld\n",near);
    ans-=near-1;
    if(min[a-1]>b){
      lsadd(0,near,b,1,0,T,2-a);
      min[a-1]=b;
    }
  }
  printf("%lld\n",ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 32
	.type	N, @object
	.size	N, 12800160
N:
	.zero	12800160
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 12800160
L:
	.zero	12800160
	.globl	T
	.align 8
	.type	T, @object
	.size	T, 8
T:
	.zero	8
	.text
	.globl	hyouka
	.type	hyouka, @function
hyouka:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	hyouka, .-hyouka
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MIN, .-MIN
	.globl	lsset
	.type	lsset, @function
lsset:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, T(%rip)
	jmp	.L6
.L7:
	movq	T(%rip), %rax
	addq	%rax, %rax
	movq	%rax, T(%rip)
.L6:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	T(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L11:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	.L9
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	jmp	.L10
.L9:
	movl	$0, %eax
.L10:
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	T(%rip), %rdx
	addq	%rdx, %rcx
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	T(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movq	T(%rip), %rax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	N(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	hyouka
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	subl	$1, -4(%rbp)
.L12:
	cmpl	$0, -4(%rbp)
	jne	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	lsset, .-lsset
	.globl	lasy
	.type	lasy, @function
lasy:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	L(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	MIN
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	subl	-8(%rbp), %eax
	cmpl	$1, %eax
	jle	.L17
	movl	-4(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	movslq	%ecx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	movslq	%ecx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	$0, (%rdx,%rax)
	jmp	.L14
.L18:
	nop
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	lasy, .-lasy
	.globl	lsadd
	.type	lsadd, @function
lsadd:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	%eax, %edi
	call	lasy
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L26
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L26
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L23
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jg	.L23
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L24
	movl	-12(%rbp), %eax
	cltq
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L25
.L24:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	MIN
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L25:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	%eax, %edi
	call	lasy
	jmp	.L19
.L23:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r9d
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-20(%rbp), %r8d
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %esi
	movl	-4(%rbp), %eax
	subq	$8, %rsp
	movl	16(%rbp), %edi
	pushq	%rdi
	movl	%eax, %edi
	call	lsadd
	addq	$16, %rsp
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r10d
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %ecx
	movl	-24(%rbp), %r8d
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %esi
	movl	-4(%rbp), %eax
	subq	$8, %rsp
	movl	16(%rbp), %edi
	pushq	%rdi
	movl	%r8d, %r9d
	movl	%r10d, %r8d
	movl	%eax, %edi
	call	lsadd
	addq	$16, %rsp
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rcx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	N(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	hyouka
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L19
.L26:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	lsadd, .-lsadd
	.globl	lsget
	.type	lsget, @function
lsget:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	lasy
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L28
	movl	-36(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L29
.L28:
	movl	$0, %eax
	jmp	.L30
.L29:
	movl	-20(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L31
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jg	.L31
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L30
.L31:
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r10d
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %edx
	movl	-40(%rbp), %edi
	movl	-36(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	%edi, %r9d
	movl	%ecx, %r8d
	movl	%r10d, %ecx
	movl	%eax, %edi
	call	lsget
	movq	%rax, %rbx
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r8d
	movl	-28(%rbp), %eax
	leal	(%rax,%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	%ecx, %r9d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	lsget
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	hyouka
.L30:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	lsget, .-lsget
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	movq	%rax, -24(%rbp)
	leaq	-80(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	$0, %esi
	movl	%eax, %edi
	call	lsset
	movq	-88(%rbp), %rax
	movl	$1, %esi
	movl	%eax, %edi
	call	lsset
	movq	-88(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-88(%rbp), %rax
	subq	$2, %rax
	imulq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	jmp	.L33
.L36:
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	je	.L39
	movq	-72(%rbp), %rax
	subl	$1, %eax
	movl	%eax, %ecx
	movq	T(%rip), %rax
	movl	%eax, %edx
	movq	-64(%rbp), %rax
	addl	$1, %eax
	movl	%eax, %esi
	movq	-64(%rbp), %rax
	movl	%ecx, %r9d
	movl	%edx, %r8d
	movl	$0, %ecx
	movl	$1, %edx
	movl	%eax, %edi
	call	lsget
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	subq	$1, %rax
	subq	%rax, -56(%rbp)
	movq	-72(%rbp), %rax
	subq	$1, %rax
	movq	-32(%rbp,%rax,8), %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L35
	movq	-72(%rbp), %rax
	movl	%eax, %edx
	movl	$2, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movq	T(%rip), %rax
	movl	%eax, %esi
	movq	-64(%rbp), %rax
	movl	%eax, %edx
	movq	-40(%rbp), %rax
	subq	$8, %rsp
	pushq	%rcx
	movl	%esi, %r9d
	movl	$0, %r8d
	movl	$1, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	lsadd
	addq	$16, %rsp
	movq	-72(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp,%rdx,8)
	jmp	.L35
.L39:
	nop
.L35:
	addq	$1, -48(%rbp)
.L33:
	movq	-80(%rbp), %rax
	cmpq	%rax, -48(%rbp)
	jl	.L36
	movq	-56(%rbp), %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	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	hyouka
	.type	hyouka, @function
hyouka:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	(%rdi,%rsi), %rax
	ret
	.cfi_endproc
.LFE23:
	.size	hyouka, .-hyouka
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB24:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	MIN, .-MIN
	.p2align 4
	.globl	lsset
	.type	lsset, @function
lsset:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	$1, T(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	cmpl	$1, %eax
	jle	.L5
	movq	%rax, %r10
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	addq	%rcx, %rcx
	cmpq	%rax, %rcx
	jl	.L6
	cmpl	%ecx, %r10d
	movl	%ecx, %r11d
	movq	%rcx, T(%rip)
	leal	-1(%rcx), %edi
	cmovle	%r10d, %r11d
	movl	$1, %ebx
	testl	%r11d, %r11d
	cmovg	%r11d, %ebx
	cmpl	$3, %r11d
	jle	.L20
	movslq	%esi, %rsi
	subl	$1, %r10d
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC1(%rip), %xmm8
	imulq	$800010, %rsi, %rax
	movd	%r10d, %xmm4
	leaq	N(%rip), %r8
	movdqa	.LC2(%rip), %xmm7
	pshufd	$0, %xmm4, %xmm3
	pxor	%xmm4, %xmm4
	movdqa	%xmm4, %xmm0
	movdqa	%xmm3, %xmm6
	addq	%rcx, %rax
	pcmpgtd	%xmm3, %xmm0
	leaq	(%r8,%rax,8), %rdx
	movl	%ebx, %eax
	shrl	$2, %eax
	leal	-1(%rax), %r9d
	leaq	32(%rdx), %rax
	punpckldq	%xmm0, %xmm6
	salq	$5, %r9
	punpckhdq	%xmm0, %xmm3
	addq	%rax, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$32, %rax
.L8:
	movdqa	%xmm1, %xmm0
	movdqa	%xmm4, %xmm2
	movups	%xmm6, (%rdx)
	paddd	%xmm8, %xmm1
	paddd	%xmm7, %xmm0
	movups	%xmm3, 16(%rdx)
	movq	%rax, %rdx
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm5
	punpckhdq	%xmm2, %xmm5
	cmpq	%r9, %rax
	jne	.L27
	movl	%ebx, %r9d
	movhlps	%xmm5, %xmm7
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r9d
	movq	%xmm7, %rax
	movd	%xmm0, %edx
	movl	%r9d, %ebp
	cmpl	%r9d, %ebx
	je	.L28
.L7:
	imulq	$800010, %rsi, %rbx
	addq	%rcx, %rbp
	leal	1(%r9), %edx
	movslq	%r10d, %r10
	movslq	%edx, %rax
	addq	%rbx, %rbp
	movq	%r10, (%r8,%rbp,8)
	cmpl	%r11d, %edx
	jge	.L11
	addq	%rcx, %rax
	leal	2(%r9), %edx
	addq	%rbx, %rax
	movq	%r10, (%r8,%rax,8)
	movslq	%edx, %rax
	cmpl	%edx, %r11d
	jle	.L11
	addq	%rcx, %rax
	leal	3(%r9), %edx
	addq	%rax, %rbx
	movslq	%edx, %rax
	movq	%r10, (%r8,%rbx,8)
.L11:
	cmpq	%rcx, %rax
	jge	.L13
.L19:
	imulq	$800010, %rsi, %r9
	movslq	%edx, %rdx
	addq	$1, %rdx
	.p2align 4,,10
	.p2align 3
.L12:
	addq	%rcx, %rax
	addq	%r9, %rax
	movq	$0, (%r8,%rax,8)
	movq	%rdx, %rax
	addq	$1, %rdx
	cmpq	%rcx, %rax
	jl	.L12
.L13:
	testl	%edi, %edi
	je	.L4
.L15:
	imulq	$400005, %rsi, %rax
	movslq	%edi, %rdx
	imulq	$6400080, %rsi, %rsi
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%r8, %rsi
	addq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%rax), %rcx
	addq	8(%rax), %rcx
	subq	$16, %rax
	movq	%rcx, (%rsi,%rdx,8)
	subq	$1, %rdx
	testl	%edx, %edx
	jne	.L16
.L4:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	cmpq	%rax, %rcx
	jg	.L19
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	je	.L18
	xorl	%edi, %edi
	movl	$1, %ecx
	xorl	%edx, %edx
	xorl	%eax, %eax
	movslq	%esi, %rsi
	leaq	N(%rip), %r8
	jmp	.L19
.L18:
	movslq	%esi, %rsi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%edi, %edi
	imulq	$6400080, %rsi, %rax
	leaq	N(%rip), %r8
	movq	$0, 8(%r8,%rax)
	movl	$1, %eax
	jmp	.L11
.L20:
	xorl	%r9d, %r9d
	xorl	%ebp, %ebp
	movslq	%esi, %rsi
	subl	$1, %r10d
	leaq	N(%rip), %r8
	jmp	.L7
	.cfi_endproc
.LFE25:
	.size	lsset, .-lsset
	.p2align 4
	.globl	lasy
	.type	lasy, @function
lasy:
.LFB26:
	.cfi_startproc
	endbr64
	movslq	%ecx, %rax
	movslq	%edi, %r11
	leaq	L(%rip), %rcx
	movl	%esi, %r9d
	imulq	$800010, %rax, %r10
	leaq	(%r10,%r11), %rsi
	movq	(%rcx,%rsi,8), %r8
	testq	%r8, %r8
	je	.L36
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	N(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	0(%rbp,%rsi,8), %rbx
	cmpq	%r8, %rbx
	cmovg	%r8, %rbx
	subl	%r9d, %edx
	movq	%rbx, 0(%rbp,%rsi,8)
	cmpl	$1, %edx
	jle	.L31
	addl	%edi, %edi
	movslq	%edi, %rdx
	addl	$1, %edi
	addq	%r10, %rdx
	movslq	%edi, %rdi
	movq	%r8, (%rcx,%rdx,8)
	movq	(%rcx,%rsi,8), %rdx
	addq	%rdi, %r10
	movq	%rdx, (%rcx,%r10,8)
.L31:
	imulq	$800010, %rax, %rax
	addq	%r11, %rax
	movq	$0, (%rcx,%rax,8)
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE26:
	.size	lasy, .-lasy
	.p2align 4
	.globl	lsadd
	.type	lsadd, @function
lsadd:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %r10
	movl	%edi, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r10, %rax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movslq	%edx, %r13
	leaq	L(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r9d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movslq	80(%rsp), %r12
	imulq	$800010, %r12, %r9
	leaq	(%r9,%r10), %rcx
	movq	(%rdx,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	.L40
	leaq	N(%rip), %rbx
	movq	(%rbx,%rcx,8), %r11
	cmpq	%rdi, %r11
	cmovg	%rdi, %r11
	movq	%r11, (%rbx,%rcx,8)
	movl	%ebp, %r11d
	subl	%r8d, %r11d
	cmpl	$1, %r11d
	jle	.L41
	leal	(%r10,%r10), %r11d
	movslq	%r11d, %rbx
	addl	$1, %r11d
	addq	%r9, %rbx
	movslq	%r11d, %r11
	movq	%rdi, (%rdx,%rbx,8)
	movq	(%rdx,%rcx,8), %rcx
	addq	%r11, %r9
	movq	%rcx, (%rdx,%r9,8)
.L41:
	imulq	$800010, %r12, %rcx
	addq	%r10, %rcx
	movq	$0, (%rdx,%rcx,8)
.L40:
	cmpl	%r15d, %ebp
	jle	.L39
	cmpl	%esi, %r8d
	jge	.L39
	cmpl	%r15d, %r8d
	jl	.L45
	cmpl	%esi, %ebp
	jg	.L45
	imulq	$800010, %r12, %rsi
	leaq	(%rsi,%r10), %rcx
	movq	%r13, (%rdx,%rcx,8)
	testq	%r13, %r13
	je	.L39
	leaq	N(%rip), %r9
	movq	(%r9,%rcx,8), %rdi
	cmpq	%r13, %rdi
	cmovg	%r13, %rdi
	subl	%r8d, %ebp
	movq	%rdi, (%r9,%rcx,8)
	cmpl	$1, %ebp
	jle	.L47
	addl	%eax, %eax
	movslq	%eax, %rdi
	addl	$1, %eax
	addq	%rsi, %rdi
	cltq
	movq	%r13, (%rdx,%rdi,8)
	movq	(%rdx,%rcx,8), %rcx
	addq	%rax, %rsi
	movq	%rcx, (%rdx,%rsi,8)
.L47:
	imulq	$800010, %r12, %r12
	addq	%r10, %r12
	movq	$0, (%rdx,%r12,8)
.L39:
	addq	$24, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L45:
	.cfi_restore_state
	movq	%r10, 8(%rsp)
	leal	(%r8,%rbp), %edx
	subq	$8, %rsp
	.cfi_def_cfa_offset 88
	leal	(%rax,%rax), %ebx
	movl	%edx, %r11d
	movl	88(%rsp), %eax
	movl	%ebx, %ecx
	movl	%r15d, %edi
	shrl	$31, %r11d
	imulq	$800010, %r12, %r12
	leal	1(%rbx), %r14d
	pushq	%rax
	.cfi_def_cfa_offset 96
	addl	%edx, %r11d
	movl	%r13d, %edx
	sarl	%r11d
	movl	%r11d, %r9d
	movl	%r11d, 20(%rsp)
	movl	%esi, 16(%rsp)
	call	lsadd
	movl	96(%rsp), %eax
	movl	16(%rsp), %esi
	movl	%r14d, %ecx
	movl	20(%rsp), %r8d
	movl	%r13d, %edx
	movl	%ebp, %r9d
	movl	%r15d, %edi
	movl	%eax, (%rsp)
	call	lsadd
	movq	24(%rsp), %r10
	movslq	%r14d, %rax
	leaq	N(%rip), %rcx
	leaq	(%r12,%rax), %rdx
	movslq	%ebx, %rax
	addq	%r12, %r10
	addq	%rax, %r12
	movq	(%rcx,%r12,8), %rax
	addq	(%rcx,%rdx,8), %rax
	movq	%rax, (%rcx,%r10,8)
	popq	%rax
	.cfi_def_cfa_offset 88
	popq	%rdx
	.cfi_def_cfa_offset 80
	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
.LFE27:
	.size	lsadd, .-lsadd
	.p2align 4
	.globl	lsget
	.type	lsget, @function
lsget:
.LFB28:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%r9d, %rax
	leaq	N(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	movslq	%r13d, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	L(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%esi, %ecx
	setge	%r10b
	imulq	$800010, %rax, %r12
	movl	%eax, (%rsp)
	xorl	%r11d, %r11d
	movq	%rax, 24(%rsp)
	leaq	(%r12,%rdi), %rax
	movq	(%rbx,%rax,8), %rdx
	testq	%rdx, %rdx
	je	.L62
.L81:
	movq	(%r15,%rax,8), %rcx
	cmpq	%rdx, %rcx
	cmovg	%rdx, %rcx
	movq	%rcx, (%r15,%rax,8)
	movl	%r8d, %ecx
	subl	%r14d, %ecx
	cmpl	$1, %ecx
	jle	.L63
	leal	(%r13,%r13), %ecx
	movslq	%ecx, %r9
	addl	$1, %ecx
	addq	%r12, %r9
	movslq	%ecx, %rcx
	movq	%rdx, (%rbx,%r9,8)
	movq	(%rbx,%rax,8), %rax
	addq	%r12, %rcx
	movq	%rax, (%rbx,%rcx,8)
.L63:
	leaq	(%r12,%rdi), %rax
	movq	$0, (%rbx,%rax,8)
.L62:
	cmpl	%ebp, %r8d
	jle	.L61
.L82:
	testb	%r10b, %r10b
	jne	.L61
	cmpl	%ebp, %r14d
	jl	.L65
	cmpl	%esi, %r8d
	jle	.L80
.L65:
	leal	(%r14,%r8), %eax
	addl	%r13d, %r13d
	movl	(%rsp), %r9d
	movl	%ebp, %edi
	movl	%eax, %ecx
	leal	1(%r13), %edx
	movq	%r11, 16(%rsp)
	shrl	$31, %ecx
	movb	%r10b, 15(%rsp)
	addl	%eax, %ecx
	movl	%esi, 4(%rsp)
	sarl	%ecx
	movl	%ecx, 8(%rsp)
	call	lsget
	movq	16(%rsp), %r11
	movslq	%r13d, %rdi
	movl	4(%rsp), %esi
	movl	8(%rsp), %r8d
	movzbl	15(%rsp), %r10d
	addq	%rax, %r11
	leaq	(%r12,%rdi), %rax
	movq	(%rbx,%rax,8), %rdx
	testq	%rdx, %rdx
	jne	.L81
	cmpl	%ebp, %r8d
	jg	.L82
.L61:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r11, %rax
	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
	.p2align 4,,10
	.p2align 3
.L80:
	.cfi_restore_state
	imulq	$800010, 24(%rsp), %rax
	leaq	N(%rip), %rdx
	addq	%rdi, %rax
	addq	(%rdx,%rax,8), %r11
	jmp	.L61
	.cfi_endproc
.LFE28:
	.size	lsget, .-lsget
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%lld %lld"
.LC5:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB29:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC4(%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	$136, %rsp
	.cfi_def_cfa_offset 192
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	72(%rsp), %rdx
	leaq	64(%rsp), %rsi
	movaps	%xmm0, 96(%rsp)
	call	__isoc99_scanf@PLT
	movl	64(%rsp), %edi
	xorl	%esi, %esi
	call	lsset
	movl	64(%rsp), %edi
	movl	$1, %esi
	call	lsset
	movq	64(%rsp), %rax
	subq	$2, %rax
	imulq	%rax, %rax
	cmpq	$0, 72(%rsp)
	movq	%rax, 48(%rsp)
	jle	.L84
	leaq	88(%rsp), %rax
	leaq	L(%rip), %r13
	movq	$0, 16(%rsp)
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	leaq	N(%rip), %r15
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L91:
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	88(%rsp), %rax
	leaq	-1(%rax), %rbp
	movq	%rbp, 88(%rsp)
	testq	%rbp, %rbp
	je	.L85
	movl	80(%rsp), %eax
	leal	1(%rbp), %esi
	movl	T(%rip), %r8d
	movl	$1, %r12d
	testl	%esi, %esi
	leal	-1(%rax), %r9d
	setle	31(%rsp)
	xorl	%r14d, %r14d
	movslq	%r9d, %rax
	movq	%r14, %r11
	movl	%esi, %r14d
	movq	%rax, 56(%rsp)
	imulq	$800010, %rax, %r10
.L90:
	movslq	%r12d, %rdi
	leaq	(%r10,%rdi), %rax
	movq	0(%r13,%rax,8), %rdx
	testq	%rdx, %rdx
	je	.L86
	movq	(%r15,%rax,8), %rcx
	cmpq	%rdx, %rcx
	cmovg	%rdx, %rcx
	movq	%rcx, (%r15,%rax,8)
	cmpl	$1, %r8d
	jle	.L87
	leal	(%r12,%r12), %ecx
	movslq	%ecx, %rbx
	addl	$1, %ecx
	addq	%r10, %rbx
	movslq	%ecx, %rcx
	movq	%rdx, 0(%r13,%rbx,8)
	movq	0(%r13,%rax,8), %rax
	addq	%r10, %rcx
	movq	%rax, 0(%r13,%rcx,8)
.L87:
	leaq	(%r10,%rdi), %rax
	movq	$0, 0(%r13,%rax,8)
.L86:
	cmpl	%r8d, %ebp
	jge	.L107
	cmpb	$0, 31(%rsp)
	jne	.L107
	testl	%ebp, %ebp
	jg	.L89
	cmpl	%r8d, %r14d
	jge	.L109
.L89:
	movl	%r8d, %ebx
	addl	%r12d, %r12d
	movl	%r14d, %esi
	movl	%ebp, %edi
	shrl	$31, %ebx
	leal	1(%r12), %edx
	movq	%r10, 8(%rsp)
	addl	%r8d, %ebx
	movq	%r11, (%rsp)
	sarl	%ebx
	movl	%r9d, 24(%rsp)
	movl	%ebx, %ecx
	call	lsget
	movq	(%rsp), %r11
	movl	24(%rsp), %r9d
	movl	%ebx, %r8d
	movq	8(%rsp), %r10
	addq	%rax, %r11
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L107:
	movq	%r11, %r14
.L88:
	leaq	-1(%r14), %rax
	subq	%rax, 48(%rsp)
	movq	80(%rsp), %rax
	movq	88(%rsp), %rdx
	cmpq	%rdx, 88(%rsp,%rax,8)
	jg	.L110
.L85:
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rax
	cmpq	%rax, 72(%rsp)
	jg	.L91
.L84:
	movq	48(%rsp), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L111
	addq	$136, %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
	.p2align 4,,10
	.p2align 3
.L110:
	.cfi_restore_state
	movl	$2, %ecx
	subq	$8, %rsp
	.cfi_def_cfa_offset 200
	xorl	%r8d, %r8d
	movl	%r14d, %esi
	subl	%eax, %ecx
	movl	T(%rip), %r9d
	xorl	%edi, %edi
	pushq	%rcx
	.cfi_def_cfa_offset 208
	movl	$1, %ecx
	call	lsadd
	movq	96(%rsp), %rax
	movq	104(%rsp), %rdx
	movq	%rdx, 104(%rsp,%rax,8)
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L109:
	imulq	$800010, 56(%rsp), %rax
	movq	%r11, %r14
	addq	%rdi, %rax
	addq	(%r15,%rax,8), %r14
	jmp	.L88
.L111:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE29:
	.size	main, .-main
	.globl	T
	.bss
	.align 8
	.type	T, @object
	.size	T, 8
T:
	.zero	8
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 12800160
L:
	.zero	12800160
	.globl	N
	.align 32
	.type	N, @object
	.size	N, 12800160
N:
	.zero	12800160
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC1:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC3:
	.quad	1000000000000000000
	.quad	1000000000000000000
	.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	hyouka
	.type	hyouka, @function
hyouka:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	(%rdi,%rsi), %rax
	ret
	.cfi_endproc
.LFE23:
	.size	hyouka, .-hyouka
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB24:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	MIN, .-MIN
	.p2align 4
	.globl	lsset
	.type	lsset, @function
lsset:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	$1, T(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	cmpl	$1, %eax
	jle	.L5
	movq	%rax, %r10
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	addq	%rcx, %rcx
	cmpq	%rax, %rcx
	jl	.L6
	cmpl	%ecx, %r10d
	movl	%ecx, %r11d
	movq	%rcx, T(%rip)
	leal	-1(%rcx), %edi
	cmovle	%r10d, %r11d
	movl	$1, %ebx
	testl	%r11d, %r11d
	cmovg	%r11d, %ebx
	cmpl	$3, %r11d
	jle	.L20
	movslq	%esi, %rsi
	subl	$1, %r10d
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC1(%rip), %xmm8
	imulq	$800010, %rsi, %rax
	movd	%r10d, %xmm4
	leaq	N(%rip), %r8
	movdqa	.LC2(%rip), %xmm7
	pshufd	$0, %xmm4, %xmm3
	pxor	%xmm4, %xmm4
	movdqa	%xmm4, %xmm0
	movdqa	%xmm3, %xmm6
	addq	%rcx, %rax
	pcmpgtd	%xmm3, %xmm0
	leaq	(%r8,%rax,8), %rdx
	movl	%ebx, %eax
	shrl	$2, %eax
	leal	-1(%rax), %r9d
	leaq	32(%rdx), %rax
	punpckldq	%xmm0, %xmm6
	salq	$5, %r9
	punpckhdq	%xmm0, %xmm3
	addq	%rax, %r9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$32, %rax
.L8:
	movdqa	%xmm1, %xmm0
	movdqa	%xmm4, %xmm2
	movups	%xmm6, (%rdx)
	paddd	%xmm8, %xmm1
	paddd	%xmm7, %xmm0
	movups	%xmm3, 16(%rdx)
	movq	%rax, %rdx
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm5
	punpckhdq	%xmm2, %xmm5
	cmpq	%r9, %rax
	jne	.L27
	movl	%ebx, %r9d
	movhlps	%xmm5, %xmm7
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %r9d
	movq	%xmm7, %rax
	movd	%xmm0, %edx
	movl	%r9d, %ebp
	cmpl	%r9d, %ebx
	je	.L28
.L7:
	imulq	$800010, %rsi, %rbx
	addq	%rcx, %rbp
	leal	1(%r9), %edx
	movslq	%r10d, %r10
	movslq	%edx, %rax
	addq	%rbx, %rbp
	movq	%r10, (%r8,%rbp,8)
	cmpl	%r11d, %edx
	jge	.L11
	addq	%rcx, %rax
	leal	2(%r9), %edx
	addq	%rbx, %rax
	movq	%r10, (%r8,%rax,8)
	movslq	%edx, %rax
	cmpl	%edx, %r11d
	jle	.L11
	addq	%rcx, %rax
	leal	3(%r9), %edx
	addq	%rax, %rbx
	movslq	%edx, %rax
	movq	%r10, (%r8,%rbx,8)
.L11:
	cmpq	%rcx, %rax
	jge	.L13
.L19:
	imulq	$800010, %rsi, %r9
	movslq	%edx, %rdx
	addq	$1, %rdx
	.p2align 4,,10
	.p2align 3
.L12:
	addq	%rcx, %rax
	addq	%r9, %rax
	movq	$0, (%r8,%rax,8)
	movq	%rdx, %rax
	addq	$1, %rdx
	cmpq	%rcx, %rax
	jl	.L12
.L13:
	testl	%edi, %edi
	je	.L4
.L15:
	imulq	$400005, %rsi, %rax
	movslq	%edi, %rdx
	imulq	$6400080, %rsi, %rsi
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%r8, %rsi
	addq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%rax), %rcx
	addq	8(%rax), %rcx
	subq	$16, %rax
	movq	%rcx, (%rsi,%rdx,8)
	subq	$1, %rdx
	testl	%edx, %edx
	jne	.L16
.L4:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	cmpq	%rax, %rcx
	jg	.L19
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	je	.L18
	xorl	%edi, %edi
	movl	$1, %ecx
	xorl	%edx, %edx
	xorl	%eax, %eax
	movslq	%esi, %rsi
	leaq	N(%rip), %r8
	jmp	.L19
.L18:
	movslq	%esi, %rsi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%edi, %edi
	imulq	$6400080, %rsi, %rax
	leaq	N(%rip), %r8
	movq	$0, 8(%r8,%rax)
	movl	$1, %eax
	jmp	.L11
.L20:
	xorl	%r9d, %r9d
	xorl	%ebp, %ebp
	movslq	%esi, %rsi
	subl	$1, %r10d
	leaq	N(%rip), %r8
	jmp	.L7
	.cfi_endproc
.LFE25:
	.size	lsset, .-lsset
	.p2align 4
	.globl	lasy
	.type	lasy, @function
lasy:
.LFB26:
	.cfi_startproc
	endbr64
	movslq	%ecx, %rax
	movslq	%edi, %r11
	leaq	L(%rip), %rcx
	movl	%esi, %r9d
	imulq	$800010, %rax, %r10
	leaq	(%r10,%r11), %rsi
	movq	(%rcx,%rsi,8), %r8
	testq	%r8, %r8
	je	.L36
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	N(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	0(%rbp,%rsi,8), %rbx
	cmpq	%r8, %rbx
	cmovg	%r8, %rbx
	subl	%r9d, %edx
	movq	%rbx, 0(%rbp,%rsi,8)
	cmpl	$1, %edx
	jle	.L31
	addl	%edi, %edi
	movslq	%edi, %rdx
	addl	$1, %edi
	addq	%r10, %rdx
	movslq	%edi, %rdi
	movq	%r8, (%rcx,%rdx,8)
	movq	(%rcx,%rsi,8), %rdx
	addq	%rdi, %r10
	movq	%rdx, (%rcx,%r10,8)
.L31:
	imulq	$800010, %rax, %rax
	addq	%r11, %rax
	movq	$0, (%rcx,%rax,8)
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE26:
	.size	lasy, .-lasy
	.p2align 4
	.globl	lsadd
	.type	lsadd, @function
lsadd:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %r10
	movl	%edi, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r10, %rax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movslq	%edx, %r13
	leaq	L(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r9d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movslq	80(%rsp), %r12
	imulq	$800010, %r12, %r9
	leaq	(%r9,%r10), %rcx
	movq	(%rdx,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	.L40
	leaq	N(%rip), %rbx
	movq	(%rbx,%rcx,8), %r11
	cmpq	%rdi, %r11
	cmovg	%rdi, %r11
	movq	%r11, (%rbx,%rcx,8)
	movl	%ebp, %r11d
	subl	%r8d, %r11d
	cmpl	$1, %r11d
	jle	.L41
	leal	(%r10,%r10), %r11d
	movslq	%r11d, %rbx
	addl	$1, %r11d
	addq	%r9, %rbx
	movslq	%r11d, %r11
	movq	%rdi, (%rdx,%rbx,8)
	movq	(%rdx,%rcx,8), %rcx
	addq	%r11, %r9
	movq	%rcx, (%rdx,%r9,8)
.L41:
	imulq	$800010, %r12, %rcx
	addq	%r10, %rcx
	movq	$0, (%rdx,%rcx,8)
.L40:
	cmpl	%r15d, %ebp
	jle	.L39
	cmpl	%esi, %r8d
	jge	.L39
	cmpl	%r15d, %r8d
	jl	.L45
	cmpl	%esi, %ebp
	jg	.L45
	imulq	$800010, %r12, %rsi
	leaq	(%rsi,%r10), %rcx
	movq	%r13, (%rdx,%rcx,8)
	testq	%r13, %r13
	je	.L39
	leaq	N(%rip), %r9
	movq	(%r9,%rcx,8), %rdi
	cmpq	%r13, %rdi
	cmovg	%r13, %rdi
	subl	%r8d, %ebp
	movq	%rdi, (%r9,%rcx,8)
	cmpl	$1, %ebp
	jle	.L47
	addl	%eax, %eax
	movslq	%eax, %rdi
	addl	$1, %eax
	addq	%rsi, %rdi
	cltq
	movq	%r13, (%rdx,%rdi,8)
	movq	(%rdx,%rcx,8), %rcx
	addq	%rax, %rsi
	movq	%rcx, (%rdx,%rsi,8)
.L47:
	imulq	$800010, %r12, %r12
	addq	%r10, %r12
	movq	$0, (%rdx,%r12,8)
.L39:
	addq	$24, %rsp
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L45:
	.cfi_restore_state
	movq	%r10, 8(%rsp)
	leal	(%r8,%rbp), %edx
	subq	$8, %rsp
	.cfi_def_cfa_offset 88
	leal	(%rax,%rax), %ebx
	movl	%edx, %r11d
	movl	88(%rsp), %eax
	movl	%ebx, %ecx
	movl	%r15d, %edi
	shrl	$31, %r11d
	imulq	$800010, %r12, %r12
	leal	1(%rbx), %r14d
	pushq	%rax
	.cfi_def_cfa_offset 96
	addl	%edx, %r11d
	movl	%r13d, %edx
	sarl	%r11d
	movl	%r11d, %r9d
	movl	%r11d, 20(%rsp)
	movl	%esi, 16(%rsp)
	call	lsadd
	movl	96(%rsp), %eax
	movl	16(%rsp), %esi
	movl	%r14d, %ecx
	movl	20(%rsp), %r8d
	movl	%r13d, %edx
	movl	%ebp, %r9d
	movl	%r15d, %edi
	movl	%eax, (%rsp)
	call	lsadd
	movq	24(%rsp), %r10
	movslq	%r14d, %rax
	leaq	N(%rip), %rcx
	leaq	(%r12,%rax), %rdx
	movslq	%ebx, %rax
	addq	%r12, %r10
	addq	%rax, %r12
	movq	(%rcx,%r12,8), %rax
	addq	(%rcx,%rdx,8), %rax
	movq	%rax, (%rcx,%r10,8)
	popq	%rax
	.cfi_def_cfa_offset 88
	popq	%rdx
	.cfi_def_cfa_offset 80
	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
.LFE27:
	.size	lsadd, .-lsadd
	.p2align 4
	.globl	lsget
	.type	lsget, @function
lsget:
.LFB28:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%r9d, %rax
	leaq	N(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	movslq	%r13d, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	L(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%esi, %ecx
	setge	%r10b
	imulq	$800010, %rax, %r12
	movl	%eax, (%rsp)
	xorl	%r11d, %r11d
	movq	%rax, 24(%rsp)
	leaq	(%r12,%rdi), %rax
	movq	(%rbx,%rax,8), %rdx
	testq	%rdx, %rdx
	je	.L62
.L81:
	movq	(%r15,%rax,8), %rcx
	cmpq	%rdx, %rcx
	cmovg	%rdx, %rcx
	movq	%rcx, (%r15,%rax,8)
	movl	%r8d, %ecx
	subl	%r14d, %ecx
	cmpl	$1, %ecx
	jle	.L63
	leal	(%r13,%r13), %ecx
	movslq	%ecx, %r9
	addl	$1, %ecx
	addq	%r12, %r9
	movslq	%ecx, %rcx
	movq	%rdx, (%rbx,%r9,8)
	movq	(%rbx,%rax,8), %rax
	addq	%r12, %rcx
	movq	%rax, (%rbx,%rcx,8)
.L63:
	leaq	(%r12,%rdi), %rax
	movq	$0, (%rbx,%rax,8)
.L62:
	cmpl	%ebp, %r8d
	jle	.L61
.L82:
	testb	%r10b, %r10b
	jne	.L61
	cmpl	%ebp, %r14d
	jl	.L65
	cmpl	%esi, %r8d
	jle	.L80
.L65:
	leal	(%r14,%r8), %eax
	addl	%r13d, %r13d
	movl	(%rsp), %r9d
	movl	%ebp, %edi
	movl	%eax, %ecx
	leal	1(%r13), %edx
	movq	%r11, 16(%rsp)
	shrl	$31, %ecx
	movb	%r10b, 15(%rsp)
	addl	%eax, %ecx
	movl	%esi, 4(%rsp)
	sarl	%ecx
	movl	%ecx, 8(%rsp)
	call	lsget
	movq	16(%rsp), %r11
	movslq	%r13d, %rdi
	movl	4(%rsp), %esi
	movl	8(%rsp), %r8d
	movzbl	15(%rsp), %r10d
	addq	%rax, %r11
	leaq	(%r12,%rdi), %rax
	movq	(%rbx,%rax,8), %rdx
	testq	%rdx, %rdx
	jne	.L81
	cmpl	%ebp, %r8d
	jg	.L82
.L61:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r11, %rax
	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
	.p2align 4,,10
	.p2align 3
.L80:
	.cfi_restore_state
	imulq	$800010, 24(%rsp), %rax
	leaq	N(%rip), %rdx
	addq	%rdi, %rax
	addq	(%rdx,%rax,8), %r11
	jmp	.L61
	.cfi_endproc
.LFE28:
	.size	lsget, .-lsget
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%lld %lld"
.LC5:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB29:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC4(%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	$136, %rsp
	.cfi_def_cfa_offset 192
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	72(%rsp), %rdx
	leaq	64(%rsp), %rsi
	movaps	%xmm0, 96(%rsp)
	call	__isoc99_scanf@PLT
	movl	64(%rsp), %edi
	xorl	%esi, %esi
	call	lsset
	movl	64(%rsp), %edi
	movl	$1, %esi
	call	lsset
	movq	64(%rsp), %rax
	subq	$2, %rax
	imulq	%rax, %rax
	cmpq	$0, 72(%rsp)
	movq	%rax, 48(%rsp)
	jle	.L84
	leaq	88(%rsp), %rax
	leaq	L(%rip), %r13
	movq	$0, 16(%rsp)
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	leaq	N(%rip), %r15
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L91:
	movq	40(%rsp), %rdx
	movq	32(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	88(%rsp), %rax
	leaq	-1(%rax), %rbp
	movq	%rbp, 88(%rsp)
	testq	%rbp, %rbp
	je	.L85
	movl	80(%rsp), %eax
	leal	1(%rbp), %esi
	movl	T(%rip), %r8d
	movl	$1, %r12d
	testl	%esi, %esi
	leal	-1(%rax), %r9d
	setle	31(%rsp)
	xorl	%r14d, %r14d
	movslq	%r9d, %rax
	movq	%r14, %r11
	movl	%esi, %r14d
	movq	%rax, 56(%rsp)
	imulq	$800010, %rax, %r10
.L90:
	movslq	%r12d, %rdi
	leaq	(%r10,%rdi), %rax
	movq	0(%r13,%rax,8), %rdx
	testq	%rdx, %rdx
	je	.L86
	movq	(%r15,%rax,8), %rcx
	cmpq	%rdx, %rcx
	cmovg	%rdx, %rcx
	movq	%rcx, (%r15,%rax,8)
	cmpl	$1, %r8d
	jle	.L87
	leal	(%r12,%r12), %ecx
	movslq	%ecx, %rbx
	addl	$1, %ecx
	addq	%r10, %rbx
	movslq	%ecx, %rcx
	movq	%rdx, 0(%r13,%rbx,8)
	movq	0(%r13,%rax,8), %rax
	addq	%r10, %rcx
	movq	%rax, 0(%r13,%rcx,8)
.L87:
	leaq	(%r10,%rdi), %rax
	movq	$0, 0(%r13,%rax,8)
.L86:
	cmpl	%r8d, %ebp
	jge	.L107
	cmpb	$0, 31(%rsp)
	jne	.L107
	testl	%ebp, %ebp
	jg	.L89
	cmpl	%r8d, %r14d
	jge	.L109
.L89:
	movl	%r8d, %ebx
	addl	%r12d, %r12d
	movl	%r14d, %esi
	movl	%ebp, %edi
	shrl	$31, %ebx
	leal	1(%r12), %edx
	movq	%r10, 8(%rsp)
	addl	%r8d, %ebx
	movq	%r11, (%rsp)
	sarl	%ebx
	movl	%r9d, 24(%rsp)
	movl	%ebx, %ecx
	call	lsget
	movq	(%rsp), %r11
	movl	24(%rsp), %r9d
	movl	%ebx, %r8d
	movq	8(%rsp), %r10
	addq	%rax, %r11
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L107:
	movq	%r11, %r14
.L88:
	leaq	-1(%r14), %rax
	subq	%rax, 48(%rsp)
	movq	80(%rsp), %rax
	movq	88(%rsp), %rdx
	cmpq	%rdx, 88(%rsp,%rax,8)
	jg	.L110
.L85:
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rax
	cmpq	%rax, 72(%rsp)
	jg	.L91
.L84:
	movq	48(%rsp), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L111
	addq	$136, %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
	.p2align 4,,10
	.p2align 3
.L110:
	.cfi_restore_state
	movl	$2, %ecx
	subq	$8, %rsp
	.cfi_def_cfa_offset 200
	xorl	%r8d, %r8d
	movl	%r14d, %esi
	subl	%eax, %ecx
	movl	T(%rip), %r9d
	xorl	%edi, %edi
	pushq	%rcx
	.cfi_def_cfa_offset 208
	movl	$1, %ecx
	call	lsadd
	movq	96(%rsp), %rax
	movq	104(%rsp), %rdx
	movq	%rdx, 104(%rsp,%rax,8)
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L109:
	imulq	$800010, 56(%rsp), %rax
	movq	%r11, %r14
	addq	%rdi, %rax
	addq	(%r15,%rax,8), %r14
	jmp	.L88
.L111:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE29:
	.size	main, .-main
	.globl	T
	.bss
	.align 8
	.type	T, @object
	.size	T, 8
T:
	.zero	8
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 12800160
L:
	.zero	12800160
	.globl	N
	.align 32
	.type	N, @object
	.size	N, 12800160
N:
	.zero	12800160
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC1:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC3:
	.quad	1000000000000000000
	.quad	1000000000000000000
	.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>
long long N[2][800010],L[2][800010],T;
long long  hyouka(long long a,long long b){return a+b;}
long long MIN(long long a,long long b){return  a<b?a:b;}
void lsset(int n,int x){
  int i;
  for(T=1;T<n;T*=2);
  for(i=0;i<T;i++)N[x][T+i]=i<n?n-1:0;
  for(i=T-1;i;i--)N[x][i]=hyouka(N[x][i*2],N[x][i*2+1]);
}
void lasy(int i,int l,int r,int x){
  if(L[x][i]==0)return;
  N[x][i]=MIN(L[x][i],N[x][i]);
  if(r-l>1){
    L[x][i*2  ]=L[x][i];
    L[x][i*2+1]=L[x][i];
  }
  L[x][i]=0;
}
void lsadd(int a,int b,int c,int i,int l,int r,int x){
  lasy(i,l,r,x);
  if(r<=a||b<=l)return;
  if(a<=l&&r<=b){
    if(L[x][i]==0)L[x][i]=c;
    else L[x][i]=MIN(c,L[x][i]);
    lasy(i,l,r,x);
  }
  else{
    lsadd(a,b,c,i*2  ,l,(l+r)/2,x);
    lsadd(a,b,c,i*2+1,(l+r)/2,r,x);
    N[x][i]=hyouka(N[x][i*2],N[x][i*2+1]);
  }
}
long long lsget(int a,int b,int i,int l,int r,int x){
  lasy(i,l,r,x);
  if(b<=l||r<=a)return 0;
  if(a<=l&&r<=b)return N[x][i];
  return hyouka(lsget(a,b,i*2,l,(l+r)/2,x),lsget(a,b,i*2+1,(l+r)/2,r,x));
}
int main(){
  long long n,m,ans=0,a,b,i,near;
  long long min[2]={1e18,1e18};
  scanf("%lld %lld",&n,&m);
  lsset(n,0);
  lsset(n,1);
  ans=(n-2)*(n-2);//printf("%d\n",ans);
  //for(i=0;i<n;i++)printf("%lld ",N[1][T+i]);printf("\n");
  for(i=0;i<m;i++){
    //int j;
    //for(j=0;j<n;j++)printf("%lld ",lsget(j,j+1,1,0,T,0));printf("\n");
    //for(j=0;j<n;j++)printf("%lld ",lsget(j,j+1,1,0,T,1));printf("\n");
    scanf("%lld %lld",&a,&b);
    b--;
    if(b==0)continue;
    near=lsget(b,b+1,1,0,T,a-1);//printf("%lld\n",near);
    ans-=near-1;
    if(min[a-1]>b){
      lsadd(0,near,b,1,0,T,2-a);
      min[a-1]=b;
    }
  }
  printf("%lld\n",ans);
  return 0;
}

2463 0
 176527 15
1 81279
2 22308
2 168987
1 80744
2 44603
1 170938
2 139754
2 15220
1 172794
1 159290
2 156968
1 56426
2 77429
1 97459
2 71282
 1874 0
 176527 15
1 81279
2 22308
2 168987
1 80744
2 44603
1 170938
2 139754
2 15220
1 172794
1 78642
2 156968
1 56426
2 77429
1 97459
2 71282
 297869 0
 176527 15
2 81279
2 22308
2 168987
1 80744
2 44603
1 170938
2 139754
2 15220
1 172794
1 159290
2 156968
1 56426
2 77429
1 97459
2 71282
 176527 15
2 81279
2 22308
2 168987
1 93587
2 44603
1 170938
2 139754
2 15220
1 172794
1 159290
2 156968
1 56426
2 77429
1 97459
2 71282
 5 5
1 3
2 3
1 4
2 0
1 2
 176527 15
1 53690
2 22308
2 133061
1 80744
2 44603
1 170938
2 139754
2 15220
1 172794
1 159290
2 156968
1 56426
2 77429
1 97459
2 71282
 3570 0

6056521
 31159505795
 3504384
 31159667102
 88724749689
 31159455935
 31159443092
 2
 31159410446
 12730624

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>
long long N[2][800010],L[2][800010],T;
long long  hyouka(long long a,long long b){return a+b;}
long long MIN(long long a,long long b){return  a<b?a:b;}
void lsset(int n,int x){
  int i;
  for(T=1;T<n;T*=2);
  for(i=0;i<T;i++)N[x][T+i]=i<n?n-1:0;
  for(i=T-1;i;i--)N[x][i]=hyouka(N[x][i*2],N[x][i*2+1]);
}
void lasy(int i,int l,int r,int x){
  if(L[x][i]==0)return;
  N[x][i]=MIN(L[x][i],N[x][i]);
  if(r-l>1){
    L[x][i*2  ]=L[x][i];
    L[x][i*2+1]=L[x][i];
  }
  L[x][i]=0;
}
void lsadd(int a,int b,int c,int i,int l,int r,int x){
  lasy(i,l,r,x);
  if(r<=a||b<=l)return;
  if(a<=l&&r<=b){
    if(L[x][i]==0)L[x][i]=c;
    else L[x][i]=MIN(c,L[x][i]);
    lasy(i,l,r,x);
  }
  else{
    lsadd(a,b,c,i*2  ,l,(l+r)/2,x);
    lsadd(a,b,c,i*2+1,(l+r)/2,r,x);
    N[x][i]=hyouka(N[x][i*2],N[x][i*2+1]);
  }
}
long long lsget(int a,int b,int i,int l,int r,int x){
  lasy(i,l,r,x);
  if(b<=l||r<=a)return 0;
  if(a<=l&&r<=b)return N[x][i];
  return hyouka(lsget(a,b,i*2,l,(l+r)/2,x),lsget(a,b,i*2+1,(l+r)/2,r,x));
}
int main(){
  long long n,m,ans=0,a,b,i,near;
  long long min[2]={1e18,1e18};
  scanf("%lld %lld",&n,&m);
  lsset(n,0);
  lsset(n,1);
  ans=(n-2)*(n-2);//printf("%d\n",ans);
  //for(i=0;i<n;i++)printf("%lld ",N[1][T+i]);printf("\n");
  for(i=0;i<m;i++){
    //int j;
    //for(j=0;j<n;j++)printf("%lld ",lsget(j,j+1,1,0,T,0));printf("\n");
    //for(j=0;j<n;j++)printf("%lld ",lsget(j,j+1,1,0,T,1));printf("\n");
    scanf("%lld %lld",&a,&b);
    b--;
    if(b==0)continue;
    near=lsget(b,b+1,1,0,T,a-1);//printf("%lld\n",near);
    ans-=near-1;
    if(min[a-1]>b){
      lsadd(0,near,b,1,0,T,2-a);
      min[a-1]=b;
    }
  }
  printf("%lld\n",ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 32
	.type	N, @object
	.size	N, 12800160
N:
	.zero	12800160
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 12800160
L:
	.zero	12800160
	.globl	T
	.align 8
	.type	T, @object
	.size	T, 8
T:
	.zero	8
	.text
	.globl	hyouka
	.type	hyouka, @function
hyouka:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	hyouka, .-hyouka
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MIN, .-MIN
	.globl	lsset
	.type	lsset, @function
lsset:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, T(%rip)
	jmp	.L6
.L7:
	movq	T(%rip), %rax
	addq	%rax, %rax
	movq	%rax, T(%rip)
.L6:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	T(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L11:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	.L9
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	jmp	.L10
.L9:
	movl	$0, %eax
.L10:
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	T(%rip), %rdx
	addq	%rdx, %rcx
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	T(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movq	T(%rip), %rax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	N(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	hyouka
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	subl	$1, -4(%rbp)
.L12:
	cmpl	$0, -4(%rbp)
	jne	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	lsset, .-lsset
	.globl	lasy
	.type	lasy, @function
lasy:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	L(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	MIN
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	subl	-8(%rbp), %eax
	cmpl	$1, %eax
	jle	.L17
	movl	-4(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	movslq	%ecx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	movslq	%ecx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	$0, (%rdx,%rax)
	jmp	.L14
.L18:
	nop
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	lasy, .-lasy
	.globl	lsadd
	.type	lsadd, @function
lsadd:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	%eax, %edi
	call	lasy
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L26
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L26
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L23
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jg	.L23
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L24
	movl	-12(%rbp), %eax
	cltq
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L25
.L24:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	MIN
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L25:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	%eax, %edi
	call	lasy
	jmp	.L19
.L23:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r9d
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-20(%rbp), %r8d
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %esi
	movl	-4(%rbp), %eax
	subq	$8, %rsp
	movl	16(%rbp), %edi
	pushq	%rdi
	movl	%eax, %edi
	call	lsadd
	addq	$16, %rsp
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r10d
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %ecx
	movl	-24(%rbp), %r8d
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %esi
	movl	-4(%rbp), %eax
	subq	$8, %rsp
	movl	16(%rbp), %edi
	pushq	%rdi
	movl	%r8d, %r9d
	movl	%r10d, %r8d
	movl	%eax, %edi
	call	lsadd
	addq	$16, %rsp
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rcx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	N(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	hyouka
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L19
.L26:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	lsadd, .-lsadd
	.globl	lsget
	.type	lsget, @function
lsget:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	lasy
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L28
	movl	-36(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L29
.L28:
	movl	$0, %eax
	jmp	.L30
.L29:
	movl	-20(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L31
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jg	.L31
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L30
.L31:
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r10d
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %edx
	movl	-40(%rbp), %edi
	movl	-36(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	%edi, %r9d
	movl	%ecx, %r8d
	movl	%r10d, %ecx
	movl	%eax, %edi
	call	lsget
	movq	%rax, %rbx
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r8d
	movl	-28(%rbp), %eax
	leal	(%rax,%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	%ecx, %r9d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	lsget
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	hyouka
.L30:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	lsget, .-lsget
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	movq	%rax, -24(%rbp)
	leaq	-80(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	$0, %esi
	movl	%eax, %edi
	call	lsset
	movq	-88(%rbp), %rax
	movl	$1, %esi
	movl	%eax, %edi
	call	lsset
	movq	-88(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-88(%rbp), %rax
	subq	$2, %rax
	imulq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	jmp	.L33
.L36:
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	je	.L39
	movq	-72(%rbp), %rax
	subl	$1, %eax
	movl	%eax, %ecx
	movq	T(%rip), %rax
	movl	%eax, %edx
	movq	-64(%rbp), %rax
	addl	$1, %eax
	movl	%eax, %esi
	movq	-64(%rbp), %rax
	movl	%ecx, %r9d
	movl	%edx, %r8d
	movl	$0, %ecx
	movl	$1, %edx
	movl	%eax, %edi
	call	lsget
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	subq	$1, %rax
	subq	%rax, -56(%rbp)
	movq	-72(%rbp), %rax
	subq	$1, %rax
	movq	-32(%rbp,%rax,8), %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L35
	movq	-72(%rbp), %rax
	movl	%eax, %edx
	movl	$2, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movq	T(%rip), %rax
	movl	%eax, %esi
	movq	-64(%rbp), %rax
	movl	%eax, %edx
	movq	-40(%rbp), %rax
	subq	$8, %rsp
	pushq	%rcx
	movl	%esi, %r9d
	movl	$0, %r8d
	movl	$1, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	lsadd
	addq	$16, %rsp
	movq	-72(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp,%rdx,8)
	jmp	.L35
.L39:
	nop
.L35:
	addq	$1, -48(%rbp)
.L33:
	movq	-80(%rbp), %rax
	cmpq	%rax, -48(%rbp)
	jl	.L36
	movq	-56(%rbp), %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	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	N
	.bss
	.align 32
	.type	N, @object
	.size	N, 12800160
N:
	.zero	12800160
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 12800160
L:
	.zero	12800160
	.globl	T
	.align 8
	.type	T, @object
	.size	T, 8
T:
	.zero	8
	.text
	.globl	hyouka
	.type	hyouka, @function
hyouka:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	hyouka, .-hyouka
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MIN, .-MIN
	.globl	lsset
	.type	lsset, @function
lsset:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	$1, T(%rip)
	jmp	.L6
.L7:
	movq	T(%rip), %rax
	addq	%rax, %rax
	movq	%rax, T(%rip)
.L6:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	T(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L11:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jge	.L9
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	jmp	.L10
.L9:
	movl	$0, %eax
.L10:
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	T(%rip), %rdx
	addq	%rdx, %rcx
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	T(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movq	T(%rip), %rax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	N(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	hyouka
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	subl	$1, -4(%rbp)
.L12:
	cmpl	$0, -4(%rbp)
	jne	.L13
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	lsset, .-lsset
	.globl	lasy
	.type	lasy, @function
lasy:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	L(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	MIN
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	subl	-8(%rbp), %eax
	cmpl	$1, %eax
	jle	.L17
	movl	-4(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	movslq	%ecx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	movslq	%ecx, %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	$0, (%rdx,%rax)
	jmp	.L14
.L18:
	nop
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	lasy, .-lasy
	.globl	lsadd
	.type	lsadd, @function
lsadd:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	%eax, %edi
	call	lasy
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L26
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L26
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L23
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jg	.L23
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	jne	.L24
	movl	-12(%rbp), %eax
	cltq
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L25
.L24:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	L(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	MIN
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	L(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L25:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	16(%rbp), %ecx
	movl	%eax, %edi
	call	lasy
	jmp	.L19
.L23:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r9d
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-20(%rbp), %r8d
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %esi
	movl	-4(%rbp), %eax
	subq	$8, %rsp
	movl	16(%rbp), %edi
	pushq	%rdi
	movl	%eax, %edi
	call	lsadd
	addq	$16, %rsp
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r10d
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %ecx
	movl	-24(%rbp), %r8d
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %esi
	movl	-4(%rbp), %eax
	subq	$8, %rsp
	movl	16(%rbp), %edi
	pushq	%rdi
	movl	%r8d, %r9d
	movl	%r10d, %r8d
	movl	%eax, %edi
	call	lsadd
	addq	$16, %rsp
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rcx
	movl	16(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	N(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	hyouka
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	movl	16(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$800010, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	N(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L19
.L26:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	lsadd, .-lsadd
	.globl	lsget
	.type	lsget, @function
lsget:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	lasy
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L28
	movl	-36(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L29
.L28:
	movl	$0, %eax
	jmp	.L30
.L29:
	movl	-20(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L31
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jg	.L31
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	imulq	$800010, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	N(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L30
.L31:
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r10d
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %edx
	movl	-40(%rbp), %edi
	movl	-36(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	%edi, %r9d
	movl	%ecx, %r8d
	movl	%r10d, %ecx
	movl	%eax, %edi
	call	lsget
	movq	%rax, %rbx
	movl	-32(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %r8d
	movl	-28(%rbp), %eax
	leal	(%rax,%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	%ecx, %r9d
	movl	%edx, %ecx
	movl	%edi, %edx
	movl	%eax, %edi
	call	lsget
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	hyouka
.L30:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	lsget, .-lsget
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	movq	%rax, -24(%rbp)
	leaq	-80(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	$0, %esi
	movl	%eax, %edi
	call	lsset
	movq	-88(%rbp), %rax
	movl	$1, %esi
	movl	%eax, %edi
	call	lsset
	movq	-88(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-88(%rbp), %rax
	subq	$2, %rax
	imulq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	jmp	.L33
.L36:
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	je	.L39
	movq	-72(%rbp), %rax
	subl	$1, %eax
	movl	%eax, %ecx
	movq	T(%rip), %rax
	movl	%eax, %edx
	movq	-64(%rbp), %rax
	addl	$1, %eax
	movl	%eax, %esi
	movq	-64(%rbp), %rax
	movl	%ecx, %r9d
	movl	%edx, %r8d
	movl	$0, %ecx
	movl	$1, %edx
	movl	%eax, %edi
	call	lsget
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	subq	$1, %rax
	subq	%rax, -56(%rbp)
	movq	-72(%rbp), %rax
	subq	$1, %rax
	movq	-32(%rbp,%rax,8), %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L35
	movq	-72(%rbp), %rax
	movl	%eax, %edx
	movl	$2, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movq	T(%rip), %rax
	movl	%eax, %esi
	movq	-64(%rbp), %rax
	movl	%eax, %edx
	movq	-40(%rbp), %rax
	subq	$8, %rsp
	pushq	%rcx
	movl	%esi, %r9d
	movl	$0, %r8d
	movl	$1, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	lsadd
	addq	$16, %rsp
	movq	-72(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp,%rdx,8)
	jmp	.L35
.L39:
	nop
.L35:
	addq	$1, -48(%rbp)
.L33:
	movq	-80(%rbp), %rax
	cmpq	%rax, -48(%rbp)
	jl	.L36
	movq	-56(%rbp), %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	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
