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 gcd(int a,int b){
  int i;
  if(a==0)
    return b;
  else if(b==0)
    return a;
  while(a!=0 && b!=0){
    i=b;
    b=a%b;
    a=i;
  }
  return a;
}

//小さい順にソート
int c[200002];
void merge(int i,int j,int *s){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d]=s[b];
        b++;
      }
      else if(j<b){
        c[d]=s[a];
        a++;
      }
      else if(s[a]<s[b]){
        c[d]=s[a];
        a++;
      }
      else{
        c[d]=s[b];
        b++;
      }
    }
    for(d=i;d<=j;d++)
      s[d]=c[d];
  }
}


int main(){
  int n,i;
  scanf("%d",&n);
  int x[n+1];
  for(i=0;i<=n;i++)
    scanf("%d",&x[i]);
  merge(0,n,x);
  for(i=0;i<n;i++)
    x[i]=x[i+1]-x[i];
  int a=0;
  for(i=0;i<n;i++)
    a=gcd(a,x[i]);
  printf("%d\n",a);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.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)
	cmpl	$0, -20(%rbp)
	jne	.L2
	movl	-24(%rbp), %eax
	jmp	.L3
.L2:
	cmpl	$0, -24(%rbp)
	jne	.L5
	movl	-20(%rbp), %eax
	jmp	.L3
.L7:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, -24(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -20(%rbp)
.L5:
	cmpl	$0, -20(%rbp)
	je	.L6
	cmpl	$0, -24(%rbp)
	jne	.L7
.L6:
	movl	-20(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 800008
c:
	.zero	800008
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB1:
	.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, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L18
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movq	-32(%rbp), %rdx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	merge
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	merge
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L10
.L15:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -12(%rbp)
	jle	.L11
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L13
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L12
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L14
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L12
.L14:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L12:
	addl	$1, -4(%rbp)
.L10:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L15
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L17
.L18:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-84(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-84(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L20:
	cmpq	%rdx, %rsp
	je	.L21
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L20
.L21:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L22
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L22:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L23
.L24:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L23:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jle	.L24
	movl	-84(%rbp), %eax
	movq	-64(%rbp), %rdx
	movl	%eax, %esi
	movl	$0, %edi
	call	merge
	movl	$0, -80(%rbp)
	jmp	.L25
.L26:
	movl	-80(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -80(%rbp)
.L25:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L26
	movl	$0, -76(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L27
.L28:
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-76(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	gcd
	movl	%eax, -76(%rbp)
	addl	$1, -80(%rbp)
.L27:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L28
	movl	-76(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	merge.part.0, @function
merge.part.0:
.LFB27:
	.cfi_startproc
	leal	(%rdi,%rsi), %eax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%edi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%eax, %r13d
	shrl	$31, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdx, %r12
	addl	%eax, %r13d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	sarl	%r13d
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmpl	%r13d, %edi
	je	.L2
	movl	%r13d, %esi
	call	merge.part.0
.L2:
	leal	1(%r13), %ebx
	cmpl	%ebx, %ebp
	je	.L3
	movq	%r12, %rdx
	movl	%ebp, %esi
	movl	%ebx, %edi
	call	merge.part.0
.L3:
	cmpl	%ebp, %r14d
	jg	.L1
	leal	1(%r14), %eax
	movl	%r14d, %edx
	leaq	-4+c(%rip), %rsi
	cltq
.L21:
	cmpl	%edx, %r13d
	jge	.L5
	movslq	%ebx, %rdx
	movl	%eax, %r11d
	addl	$1, %ebx
	movl	(%r12,%rdx,4), %edx
	movl	%edx, (%rsi,%rax,4)
	cmpl	%eax, %ebp
	jl	.L42
	movl	%ebp, %r10d
	leaq	c(%rip), %rcx
	movslq	%ebx, %rdx
	subl	%eax, %r10d
	cltq
	leaq	4(,%rdx,4), %rdx
	leaq	0(,%rax,4), %rsi
	leaq	(%r12,%rdx), %r9
	leaq	(%rcx,%rsi), %rdi
	movq	%rdi, %r8
	subq	%r9, %r8
	cmpq	$8, %r8
	jbe	.L25
	cmpl	$2, %r10d
	jbe	.L25
	cmpl	%r11d, %ebp
	leal	1(%r10), %eax
	movl	$1, %esi
	cmovl	%esi, %eax
	leaq	-4(%r12,%rdx), %r8
	xorl	%edx, %edx
	movl	%eax, %r9d
	shrl	$2, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%edx, %rcx
	movl	(%r12,%rcx,4), %ecx
	cmpl	%ebx, %ebp
	jl	.L39
	movslq	%ebx, %rdi
	movl	(%r12,%rdi,4), %edi
	cmpl	%ecx, %edi
	jg	.L39
	movl	%edi, %ecx
	addl	$1, %ebx
	movl	%ecx, (%rsi,%rax,4)
	cmpl	%eax, %ebp
	jl	.L43
.L22:
	addq	$1, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L39:
	movl	%ecx, (%rsi,%rax,4)
	addl	$1, %edx
	cmpl	%eax, %ebp
	jge	.L22
.L43:
	leaq	c(%rip), %rcx
.L7:
	movslq	%r14d, %rax
	movl	%ebp, %edi
	leaq	0(,%rax,4), %rdx
	subl	%r14d, %edi
	leaq	(%r12,%rdx), %r8
	leaq	4(%rcx,%rdx), %r9
	movq	%r8, %rsi
	subq	%r9, %rsi
	cmpq	$8, %rsi
	jbe	.L30
	cmpl	$2, %edi
	jbe	.L30
	addl	$1, %edi
	addq	%rcx, %rdx
	xorl	%eax, %eax
	movl	%edi, %esi
	shrl	$2, %esi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	(%rdx,%rax), %xmm0
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L16
	movl	%edi, %eax
	andl	$-4, %eax
	addl	%eax, %r14d
	cmpl	%eax, %edi
	je	.L1
	movslq	%r14d, %rax
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r12,%rax,4)
	leal	1(%r14), %eax
	cmpl	%eax, %ebp
	jl	.L1
	cltq
	addl	$2, %r14d
	movl	(%rcx,%rax,4), %edx
	leaq	0(,%rax,4), %rsi
	movl	%edx, (%r12,%rax,4)
	cmpl	%r14d, %ebp
	jl	.L1
	movslq	%r14d, %r14
	movl	(%rcx,%r14,4), %eax
	movl	%eax, 4(%r12,%rsi)
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r12,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jl	.L1
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r12,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jge	.L30
	jmp	.L1
.L42:
	leaq	c(%rip), %rcx
	jmp	.L7
.L25:
	movq	%r12, %rdi
	subq	%rsi, %rdi
	leaq	-4(%rdi,%rdx), %rdx
	jmp	.L13
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	merge.part.0.cold, @function
merge.part.0.cold:
.LFSB27:
.L11:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	movq	%rdx, %rsi
	addq	$1, %rdx
	salq	$4, %rsi
	movdqu	(%r8,%rsi), %xmm1
	movups	%xmm1, (%rdi,%rsi)
	cmpl	%edx, %r9d
	ja	.L11
	movl	%eax, %edx
	andl	$-4, %edx
	addl	%edx, %ebx
	addl	%edx, %r11d
	cmpl	%edx, %eax
	je	.L7
	movslq	%ebx, %rax
	addl	$1, %ebx
	movl	(%r12,%rax,4), %edx
	movslq	%r11d, %rax
	movl	%edx, (%rcx,%rax,4)
	leal	1(%r11), %edx
	cmpl	%edx, %ebp
	jl	.L7
	movslq	%ebx, %rax
	movslq	%edx, %rdx
	addl	$2, %r11d
	leaq	0(,%rax,4), %rsi
	movl	(%r12,%rax,4), %eax
	movl	%eax, (%rcx,%rdx,4)
	cmpl	%r11d, %ebp
	jl	.L7
	movl	4(%r12,%rsi), %eax
	movslq	%r11d, %r11
	movl	%eax, (%rcx,%r11,4)
	jmp	.L7
.L13:
	movl	(%rdx,%rax,4), %esi
	movl	%esi, (%rcx,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jge	.L13
	jmp	.L7
	.cfi_endproc
.LFE27:
	.text
	.size	merge.part.0, .-merge.part.0
	.section	.text.unlikely
	.size	merge.part.0.cold, .-merge.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	movl	%esi, %edx
	movl	%esi, %r8d
	testl	%edi, %edi
	je	.L44
	movl	%edi, %r8d
	testl	%esi, %esi
	je	.L44
	.p2align 4,,10
	.p2align 3
.L46:
	movl	%edx, %r8d
	cltd
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L46
.L44:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.p2align 4
	.globl	merge
	.type	merge, @function
merge:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jne	.L54
	ret
	.p2align 4,,10
	.p2align 3
.L54:
	jmp	merge.part.0
	.cfi_endproc
.LFE24:
	.size	merge, .-merge
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %esi
	movq	%rsp, %rcx
	leal	1(%rsi), %eax
	cltq
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L57
.L92:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L92
.L57:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L93
.L58:
	movq	%rsp, %rbx
	testl	%esi, %esi
	js	.L59
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %esi
	addq	$4, %r13
	cmpl	%r12d, %esi
	jge	.L60
	testl	%esi, %esi
	jne	.L59
.L61:
	movl	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L94
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	movq	%rbx, %rdx
	xorl	%edi, %edi
	call	merge.part.0
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	jle	.L71
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L72
	movl	%esi, %edx
	movq	%rbx, %rax
	shrl	$2, %edx
	salq	$4, %rdx
	addq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L63:
	movdqu	4(%rax), %xmm0
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	psubd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L63
	movl	%esi, %edx
	andl	$-4, %edx
	movl	%edx, %eax
	cmpl	%edx, %esi
	je	.L64
.L62:
	movl	%esi, %ecx
	subl	%edx, %ecx
	cmpl	$1, %ecx
	je	.L65
	leal	1(%rdx), %edi
	leaq	-4(%rbx,%rdi,4), %rdx
	movq	(%rbx,%rdi,4), %xmm0
	movq	(%rdx), %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
	movl	%ecx, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %ecx
	je	.L64
.L65:
	cltq
	leaq	(%rbx,%rax,4), %rax
	movl	4(%rax), %edx
	subl	(%rax), %edx
	movl	%edx, (%rax)
.L64:
	movq	%rbx, %rcx
	leaq	(%rbx,%rsi,4), %rdi
	xorl	%esi, %esi
	movl	(%rcx), %edx
	testl	%esi, %esi
	je	.L73
	.p2align 4,,10
	.p2align 3
.L95:
	testl	%edx, %edx
	je	.L67
	movl	%esi, %eax
	.p2align 4,,10
	.p2align 3
.L68:
	movl	%edx, %esi
	cltd
	idivl	%esi
	movl	%esi, %eax
	testl	%edx, %edx
	jne	.L68
.L67:
	addq	$4, %rcx
	cmpq	%rdi, %rcx
	je	.L61
.L91:
	movl	(%rcx), %edx
	testl	%esi, %esi
	jne	.L95
.L73:
	addq	$4, %rcx
	movl	%edx, %esi
	cmpq	%rdi, %rcx
	jne	.L91
	jmp	.L61
.L93:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L58
.L72:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L62
.L71:
	xorl	%esi, %esi
	jmp	.L61
.L94:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 800008
c:
	.zero	800008
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	merge.part.0, @function
merge.part.0:
.LFB27:
	.cfi_startproc
	leal	(%rdi,%rsi), %eax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	%edi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%eax, %r13d
	shrl	$31, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdx, %r12
	addl	%eax, %r13d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	sarl	%r13d
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmpl	%r13d, %edi
	je	.L2
	movl	%r13d, %esi
	call	merge.part.0
.L2:
	leal	1(%r13), %ebx
	cmpl	%ebx, %ebp
	je	.L3
	movq	%r12, %rdx
	movl	%ebp, %esi
	movl	%ebx, %edi
	call	merge.part.0
.L3:
	cmpl	%ebp, %r14d
	jg	.L1
	leal	1(%r14), %eax
	movl	%r14d, %edx
	leaq	-4+c(%rip), %rsi
	cltq
.L21:
	cmpl	%edx, %r13d
	jge	.L5
	movslq	%ebx, %rdx
	movl	%eax, %r11d
	addl	$1, %ebx
	movl	(%r12,%rdx,4), %edx
	movl	%edx, (%rsi,%rax,4)
	cmpl	%eax, %ebp
	jl	.L42
	movl	%ebp, %r10d
	leaq	c(%rip), %rcx
	movslq	%ebx, %rdx
	subl	%eax, %r10d
	cltq
	leaq	4(,%rdx,4), %rdx
	leaq	0(,%rax,4), %rsi
	leaq	(%r12,%rdx), %r9
	leaq	(%rcx,%rsi), %rdi
	movq	%rdi, %r8
	subq	%r9, %r8
	cmpq	$8, %r8
	jbe	.L25
	cmpl	$2, %r10d
	jbe	.L25
	cmpl	%r11d, %ebp
	leal	1(%r10), %eax
	movl	$1, %esi
	cmovl	%esi, %eax
	leaq	-4(%r12,%rdx), %r8
	xorl	%edx, %edx
	movl	%eax, %r9d
	shrl	$2, %r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%edx, %rcx
	movl	(%r12,%rcx,4), %ecx
	cmpl	%ebx, %ebp
	jl	.L39
	movslq	%ebx, %rdi
	movl	(%r12,%rdi,4), %edi
	cmpl	%ecx, %edi
	jg	.L39
	movl	%edi, %ecx
	addl	$1, %ebx
	movl	%ecx, (%rsi,%rax,4)
	cmpl	%eax, %ebp
	jl	.L43
.L22:
	addq	$1, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L39:
	movl	%ecx, (%rsi,%rax,4)
	addl	$1, %edx
	cmpl	%eax, %ebp
	jge	.L22
.L43:
	leaq	c(%rip), %rcx
.L7:
	movslq	%r14d, %rax
	movl	%ebp, %edi
	leaq	0(,%rax,4), %rdx
	subl	%r14d, %edi
	leaq	(%r12,%rdx), %r8
	leaq	4(%rcx,%rdx), %r9
	movq	%r8, %rsi
	subq	%r9, %rsi
	cmpq	$8, %rsi
	jbe	.L30
	cmpl	$2, %edi
	jbe	.L30
	addl	$1, %edi
	addq	%rcx, %rdx
	xorl	%eax, %eax
	movl	%edi, %esi
	shrl	$2, %esi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	(%rdx,%rax), %xmm0
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L16
	movl	%edi, %eax
	andl	$-4, %eax
	addl	%eax, %r14d
	cmpl	%eax, %edi
	je	.L1
	movslq	%r14d, %rax
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r12,%rax,4)
	leal	1(%r14), %eax
	cmpl	%eax, %ebp
	jl	.L1
	cltq
	addl	$2, %r14d
	movl	(%rcx,%rax,4), %edx
	leaq	0(,%rax,4), %rsi
	movl	%edx, (%r12,%rax,4)
	cmpl	%r14d, %ebp
	jl	.L1
	movslq	%r14d, %r14
	movl	(%rcx,%r14,4), %eax
	movl	%eax, 4(%r12,%rsi)
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r12,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jl	.L1
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r12,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jge	.L30
	jmp	.L1
.L42:
	leaq	c(%rip), %rcx
	jmp	.L7
.L25:
	movq	%r12, %rdi
	subq	%rsi, %rdi
	leaq	-4(%rdi,%rdx), %rdx
	jmp	.L13
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	merge.part.0.cold, @function
merge.part.0.cold:
.LFSB27:
.L11:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	movq	%rdx, %rsi
	addq	$1, %rdx
	salq	$4, %rsi
	movdqu	(%r8,%rsi), %xmm1
	movups	%xmm1, (%rdi,%rsi)
	cmpl	%edx, %r9d
	ja	.L11
	movl	%eax, %edx
	andl	$-4, %edx
	addl	%edx, %ebx
	addl	%edx, %r11d
	cmpl	%edx, %eax
	je	.L7
	movslq	%ebx, %rax
	addl	$1, %ebx
	movl	(%r12,%rax,4), %edx
	movslq	%r11d, %rax
	movl	%edx, (%rcx,%rax,4)
	leal	1(%r11), %edx
	cmpl	%edx, %ebp
	jl	.L7
	movslq	%ebx, %rax
	movslq	%edx, %rdx
	addl	$2, %r11d
	leaq	0(,%rax,4), %rsi
	movl	(%r12,%rax,4), %eax
	movl	%eax, (%rcx,%rdx,4)
	cmpl	%r11d, %ebp
	jl	.L7
	movl	4(%r12,%rsi), %eax
	movslq	%r11d, %r11
	movl	%eax, (%rcx,%r11,4)
	jmp	.L7
.L13:
	movl	(%rdx,%rax,4), %esi
	movl	%esi, (%rcx,%rax,4)
	addq	$1, %rax
	cmpl	%eax, %ebp
	jge	.L13
	jmp	.L7
	.cfi_endproc
.LFE27:
	.text
	.size	merge.part.0, .-merge.part.0
	.section	.text.unlikely
	.size	merge.part.0.cold, .-merge.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	movl	%esi, %edx
	movl	%esi, %r8d
	testl	%edi, %edi
	je	.L44
	movl	%edi, %r8d
	testl	%esi, %esi
	je	.L44
	.p2align 4,,10
	.p2align 3
.L46:
	movl	%edx, %r8d
	cltd
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L46
.L44:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.p2align 4
	.globl	merge
	.type	merge, @function
merge:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jne	.L54
	ret
	.p2align 4,,10
	.p2align 3
.L54:
	jmp	merge.part.0
	.cfi_endproc
.LFE24:
	.size	merge, .-merge
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %esi
	movq	%rsp, %rcx
	leal	1(%rsi), %eax
	cltq
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L57
.L92:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L92
.L57:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L93
.L58:
	movq	%rsp, %rbx
	testl	%esi, %esi
	js	.L59
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %esi
	addq	$4, %r13
	cmpl	%r12d, %esi
	jge	.L60
	testl	%esi, %esi
	jne	.L59
.L61:
	movl	%esi, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L94
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	movq	%rbx, %rdx
	xorl	%edi, %edi
	call	merge.part.0
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	jle	.L71
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L72
	movl	%esi, %edx
	movq	%rbx, %rax
	shrl	$2, %edx
	salq	$4, %rdx
	addq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L63:
	movdqu	4(%rax), %xmm0
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	psubd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L63
	movl	%esi, %edx
	andl	$-4, %edx
	movl	%edx, %eax
	cmpl	%edx, %esi
	je	.L64
.L62:
	movl	%esi, %ecx
	subl	%edx, %ecx
	cmpl	$1, %ecx
	je	.L65
	leal	1(%rdx), %edi
	leaq	-4(%rbx,%rdi,4), %rdx
	movq	(%rbx,%rdi,4), %xmm0
	movq	(%rdx), %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
	movl	%ecx, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %ecx
	je	.L64
.L65:
	cltq
	leaq	(%rbx,%rax,4), %rax
	movl	4(%rax), %edx
	subl	(%rax), %edx
	movl	%edx, (%rax)
.L64:
	movq	%rbx, %rcx
	leaq	(%rbx,%rsi,4), %rdi
	xorl	%esi, %esi
	movl	(%rcx), %edx
	testl	%esi, %esi
	je	.L73
	.p2align 4,,10
	.p2align 3
.L95:
	testl	%edx, %edx
	je	.L67
	movl	%esi, %eax
	.p2align 4,,10
	.p2align 3
.L68:
	movl	%edx, %esi
	cltd
	idivl	%esi
	movl	%esi, %eax
	testl	%edx, %edx
	jne	.L68
.L67:
	addq	$4, %rcx
	cmpq	%rdi, %rcx
	je	.L61
.L91:
	movl	(%rcx), %edx
	testl	%esi, %esi
	jne	.L95
.L73:
	addq	$4, %rcx
	movl	%edx, %esi
	cmpq	%rdi, %rcx
	jne	.L91
	jmp	.L61
.L93:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L58
.L72:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L62
.L71:
	xorl	%esi, %esi
	jmp	.L61
.L94:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 800008
c:
	.zero	800008
	.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 gcd(int a,int b){
  int i;
  if(a==0)
    return b;
  else if(b==0)
    return a;
  while(a!=0 && b!=0){
    i=b;
    b=a%b;
    a=i;
  }
  return a;
}

//小さい順にソート
int c[200002];
void merge(int i,int j,int *s){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d]=s[b];
        b++;
      }
      else if(j<b){
        c[d]=s[a];
        a++;
      }
      else if(s[a]<s[b]){
        c[d]=s[a];
        a++;
      }
      else{
        c[d]=s[b];
        b++;
      }
    }
    for(d=i;d<=j;d++)
      s[d]=c[d];
  }
}


int main(){
  int n,i;
  scanf("%d",&n);
  int x[n+1];
  for(i=0;i<=n;i++)
    scanf("%d",&x[i]);
  merge(0,n,x);
  for(i=0;i<n;i++)
    x[i]=x[i+1]-x[i];
  int a=0;
  for(i=0;i<n;i++)
    a=gcd(a,x[i]);
  printf("%d\n",a);
  return 0;
}

3 81
33 79 57
 1 1
1010000000
 3 81
33 70 57
 1 1
1010000100
 3 81
33 42 57
 1 0
1010000100
 1 0
1010010100
 1 1
1010010100
 1 1
1000000100
 1 0
1010000000

2
 1009999999
 1
 1010000099
 3
 1010000100
 1010010100
 1010010099
 1000000099
 1010000000

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 gcd(int a,int b){
  int i;
  if(a==0)
    return b;
  else if(b==0)
    return a;
  while(a!=0 && b!=0){
    i=b;
    b=a%b;
    a=i;
  }
  return a;
}

//小さい順にソート
int c[200002];
void merge(int i,int j,int *s){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d]=s[b];
        b++;
      }
      else if(j<b){
        c[d]=s[a];
        a++;
      }
      else if(s[a]<s[b]){
        c[d]=s[a];
        a++;
      }
      else{
        c[d]=s[b];
        b++;
      }
    }
    for(d=i;d<=j;d++)
      s[d]=c[d];
  }
}


int main(){
  int n,i;
  scanf("%d",&n);
  int x[n+1];
  for(i=0;i<=n;i++)
    scanf("%d",&x[i]);
  merge(0,n,x);
  for(i=0;i<n;i++)
    x[i]=x[i+1]-x[i];
  int a=0;
  for(i=0;i<n;i++)
    a=gcd(a,x[i]);
  printf("%d\n",a);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.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)
	cmpl	$0, -20(%rbp)
	jne	.L2
	movl	-24(%rbp), %eax
	jmp	.L3
.L2:
	cmpl	$0, -24(%rbp)
	jne	.L5
	movl	-20(%rbp), %eax
	jmp	.L3
.L7:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, -24(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -20(%rbp)
.L5:
	cmpl	$0, -20(%rbp)
	je	.L6
	cmpl	$0, -24(%rbp)
	jne	.L7
.L6:
	movl	-20(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 800008
c:
	.zero	800008
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB1:
	.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, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L18
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movq	-32(%rbp), %rdx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	merge
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	merge
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L10
.L15:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -12(%rbp)
	jle	.L11
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L13
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L12
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L14
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L12
.L14:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L12:
	addl	$1, -4(%rbp)
.L10:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L15
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L17
.L18:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-84(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-84(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L20:
	cmpq	%rdx, %rsp
	je	.L21
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L20
.L21:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L22
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L22:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L23
.L24:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L23:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jle	.L24
	movl	-84(%rbp), %eax
	movq	-64(%rbp), %rdx
	movl	%eax, %esi
	movl	$0, %edi
	call	merge
	movl	$0, -80(%rbp)
	jmp	.L25
.L26:
	movl	-80(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -80(%rbp)
.L25:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L26
	movl	$0, -76(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L27
.L28:
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-76(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	gcd
	movl	%eax, -76(%rbp)
	addl	$1, -80(%rbp)
.L27:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L28
	movl	-76(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	gcd
	.type	gcd, @function
gcd:
.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)
	cmpl	$0, -20(%rbp)
	jne	.L2
	movl	-24(%rbp), %eax
	jmp	.L3
.L2:
	cmpl	$0, -24(%rbp)
	jne	.L5
	movl	-20(%rbp), %eax
	jmp	.L3
.L7:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, -24(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -20(%rbp)
.L5:
	cmpl	$0, -20(%rbp)
	je	.L6
	cmpl	$0, -24(%rbp)
	jne	.L7
.L6:
	movl	-20(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 800008
c:
	.zero	800008
	.text
	.globl	merge
	.type	merge, @function
merge:
.LFB1:
	.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, -20(%rbp)
	movl	%esi, -24(%rbp)
	movq	%rdx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L18
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %ecx
	movq	-32(%rbp), %rdx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	merge
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	merge
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L10
.L15:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -12(%rbp)
	jle	.L11
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L13
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L12
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L14
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	jmp	.L12
.L14:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L12:
	addl	$1, -4(%rbp)
.L10:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L15
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L17
.L18:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	merge, .-merge
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-84(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-84(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L20:
	cmpq	%rdx, %rsp
	je	.L21
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L20
.L21:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L22
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L22:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L23
.L24:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L23:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jle	.L24
	movl	-84(%rbp), %eax
	movq	-64(%rbp), %rdx
	movl	%eax, %esi
	movl	$0, %edi
	call	merge
	movl	$0, -80(%rbp)
	jmp	.L25
.L26:
	movl	-80(%rbp), %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -80(%rbp)
.L25:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L26
	movl	$0, -76(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L27
.L28:
	movq	-64(%rbp), %rax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-76(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	gcd
	movl	%eax, -76(%rbp)
	addl	$1, -80(%rbp)
.L27:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L28
	movl	-76(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
