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

```c
#include<stdio.h>
int main(){
  char s[1010],t[1010];
  int i,j,n,m;
  scanf("%s %s",s,t);
  for(n=0;s[n];n++);
  for(m=0;t[m];m++);
  for(i=n-m+1;i--;){
    for(j=0;j<m;j++){
      if(s[i+j]=='?')continue;
      if(s[i+j]-t[j])goto NEXT;
    }
    for(j=0;j<m;j++)s[i+j]=t[j];
    for(j=0;j<n;j++){
      if(s[j]=='?')s[j]='a';
    }
    printf("%s\n",s);
    return 0;
  NEXT:;
  }
  printf("UNRESTORABLE\n");
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"UNRESTORABLE"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$2048, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rsp, %rbp
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L22
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %r9d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
.L2:
	cmpb	$0, 1024(%rsp)
	je	.L23
	movl	$1, %eax
	leaq	1023(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L5
	movl	%r9d, %eax
	subl	%edi, %eax
	cmpl	$-1, %eax
	je	.L6
.L4:
	movslq	%eax, %rcx
	movl	%eax, %esi
	movq	%rbp, %r8
	leaq	-1(%rsp,%rcx), %rdx
	addq	%rbp, %rcx
	subq	%rsi, %rdx
	subl	%ecx, %eax
	movslq	%edi, %rsi
	movq	%rdx, %r12
	movl	%eax, %r10d
.L18:
	leal	(%r10,%rcx), %r11d
	testl	%edi, %edi
	je	.L20
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movzbl	(%rcx,%rax), %edx
	cmpb	$63, %dl
	je	.L7
	cmpb	(%rbx,%rax), %dl
	jne	.L8
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movslq	%r11d, %rdx
	movl	%eax, %ecx
	addq	%rbp, %rdx
	cmpl	$8, %eax
	jnb	.L10
	testb	$4, %al
	jne	.L43
	testl	%ecx, %ecx
	jne	.L44
.L20:
	testl	%r9d, %r9d
	je	.L14
	leal	-1(%r9), %eax
	leaq	1(%rbp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$63, (%r8)
	jne	.L15
	movb	$97, (%r8)
.L15:
	addq	$1, %r8
	cmpq	%r8, %rax
	jne	.L16
.L14:
	movq	%rbp, %rdi
	call	puts@PLT
.L17:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$2048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	subq	$1, %rcx
	cmpq	%r12, %rcx
	jne	.L18
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L10:
	movq	1024(%rsp), %rcx
	leaq	8(%rdx), %rdi
	andq	$-8, %rdi
	movq	%rcx, (%rdx)
	movl	%eax, %ecx
	movq	-8(%rbx,%rcx), %rsi
	movq	%rsi, -8(%rdx,%rcx)
	subq	%rdi, %rdx
	subq	%rdx, %rbx
	leal	(%rax,%rdx), %ecx
	movq	%rbx, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L20
.L44:
	movzbl	1024(%rsp), %eax
	movb	%al, (%rdx)
	testb	$2, %cl
	je	.L20
	movzwl	-2(%rbx,%rcx), %eax
	movw	%ax, -2(%rdx,%rcx)
	jmp	.L20
.L23:
	movl	%r9d, %eax
	xorl	%edi, %edi
	jmp	.L4
.L22:
	xorl	%r9d, %r9d
	jmp	.L2
.L43:
	movl	1024(%rsp), %eax
	movl	%eax, (%rdx)
	movl	-4(%rbx,%rcx), %eax
	movl	%eax, -4(%rdx,%rcx)
	jmp	.L20
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"UNRESTORABLE"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$2048, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rsp, %rbp
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L22
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %r9d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
.L2:
	cmpb	$0, 1024(%rsp)
	je	.L23
	movl	$1, %eax
	leaq	1023(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L5
	movl	%r9d, %eax
	subl	%edi, %eax
	cmpl	$-1, %eax
	je	.L6
.L4:
	movslq	%eax, %rcx
	movl	%eax, %esi
	movq	%rbp, %r8
	leaq	-1(%rsp,%rcx), %rdx
	addq	%rbp, %rcx
	subq	%rsi, %rdx
	subl	%ecx, %eax
	movslq	%edi, %rsi
	movq	%rdx, %r12
	movl	%eax, %r10d
.L18:
	leal	(%r10,%rcx), %r11d
	testl	%edi, %edi
	je	.L20
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movzbl	(%rcx,%rax), %edx
	cmpb	$63, %dl
	je	.L7
	cmpb	(%rbx,%rax), %dl
	jne	.L8
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movslq	%r11d, %rdx
	movl	%eax, %ecx
	addq	%rbp, %rdx
	cmpl	$8, %eax
	jnb	.L10
	testb	$4, %al
	jne	.L43
	testl	%ecx, %ecx
	jne	.L44
.L20:
	testl	%r9d, %r9d
	je	.L14
	leal	-1(%r9), %eax
	leaq	1(%rbp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$63, (%r8)
	jne	.L15
	movb	$97, (%r8)
.L15:
	addq	$1, %r8
	cmpq	%r8, %rax
	jne	.L16
.L14:
	movq	%rbp, %rdi
	call	puts@PLT
.L17:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$2048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	subq	$1, %rcx
	cmpq	%r12, %rcx
	jne	.L18
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L10:
	movq	1024(%rsp), %rcx
	leaq	8(%rdx), %rdi
	andq	$-8, %rdi
	movq	%rcx, (%rdx)
	movl	%eax, %ecx
	movq	-8(%rbx,%rcx), %rsi
	movq	%rsi, -8(%rdx,%rcx)
	subq	%rdi, %rdx
	subq	%rdx, %rbx
	leal	(%rax,%rdx), %ecx
	movq	%rbx, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L20
.L44:
	movzbl	1024(%rsp), %eax
	movb	%al, (%rdx)
	testb	$2, %cl
	je	.L20
	movzwl	-2(%rbx,%rcx), %eax
	movw	%ax, -2(%rdx,%rcx)
	jmp	.L20
.L23:
	movl	%r9d, %eax
	xorl	%edi, %edi
	jmp	.L4
.L22:
	xorl	%r9d, %r9d
	jmp	.L2
.L43:
	movl	1024(%rsp), %eax
	movl	%eax, (%rdx)
	movl	-4(%rbx,%rcx), %eax
	movl	%eax, -4(%rdx,%rcx)
	jmp	.L20
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"UNRESTORABLE"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$2048, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rsp, %rbp
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L22
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %r9d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
.L2:
	cmpb	$0, 1024(%rsp)
	je	.L23
	movl	$1, %eax
	leaq	1023(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L5
	movl	%r9d, %eax
	subl	%edi, %eax
	cmpl	$-1, %eax
	je	.L6
.L4:
	movslq	%eax, %rcx
	movl	%eax, %esi
	movq	%rbp, %r8
	leaq	-1(%rsp,%rcx), %rdx
	addq	%rbp, %rcx
	subq	%rsi, %rdx
	subl	%ecx, %eax
	movslq	%edi, %rsi
	movq	%rdx, %r12
	movl	%eax, %r10d
.L18:
	leal	(%r10,%rcx), %r11d
	testl	%edi, %edi
	je	.L20
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movzbl	(%rcx,%rax), %edx
	cmpb	$63, %dl
	je	.L7
	cmpb	(%rbx,%rax), %dl
	jne	.L8
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movslq	%r11d, %rdx
	movl	%eax, %ecx
	addq	%rbp, %rdx
	cmpl	$8, %eax
	jnb	.L10
	testb	$4, %al
	jne	.L43
	testl	%ecx, %ecx
	jne	.L44
.L20:
	testl	%r9d, %r9d
	je	.L14
	leal	-1(%r9), %eax
	leaq	1(%rbp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$63, (%r8)
	jne	.L15
	movb	$97, (%r8)
.L15:
	addq	$1, %r8
	cmpq	%r8, %rax
	jne	.L16
.L14:
	movq	%rbp, %rdi
	call	puts@PLT
.L17:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$2048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	subq	$1, %rcx
	cmpq	%r12, %rcx
	jne	.L18
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L10:
	movq	1024(%rsp), %rcx
	leaq	8(%rdx), %rdi
	andq	$-8, %rdi
	movq	%rcx, (%rdx)
	movl	%eax, %ecx
	movq	-8(%rbx,%rcx), %rsi
	movq	%rsi, -8(%rdx,%rcx)
	subq	%rdi, %rdx
	subq	%rdx, %rbx
	leal	(%rax,%rdx), %ecx
	movq	%rbx, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L20
.L44:
	movzbl	1024(%rsp), %eax
	movb	%al, (%rdx)
	testb	$2, %cl
	je	.L20
	movzwl	-2(%rbx,%rcx), %eax
	movw	%ax, -2(%rdx,%rcx)
	jmp	.L20
.L23:
	movl	%r9d, %eax
	xorl	%edi, %edi
	jmp	.L4
.L22:
	xorl	%r9d, %r9d
	jmp	.L2
.L43:
	movl	1024(%rsp), %eax
	movl	%eax, (%rdx)
	movl	-4(%rbx,%rcx), %eax
	movl	%eax, -4(%rdx,%rcx)
	jmp	.L20
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include<stdio.h>
int main(){
  char s[1010],t[1010];
  int i,j,n,m;
  scanf("%s %s",s,t);
  for(n=0;s[n];n++);
  for(m=0;t[m];m++);
  for(i=n-m+1;i--;){
    for(j=0;j<m;j++){
      if(s[i+j]=='?')continue;
      if(s[i+j]-t[j])goto NEXT;
    }
    for(j=0;j<m;j++)s[i+j]=t[j];
    for(j=0;j<n;j++){
      if(s[j]=='?')s[j]='a';
    }
    printf("%s\n",s);
    return 0;
  NEXT:;
  }
  printf("UNRESTORABLE\n");
  return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  char s[1010],t[1010];
  int i,j,n,m;
  scanf("%s %s",s,t);
  for(n=0;s[n];n++);
  for(m=0;t[m];m++);
  for(i=n-m+1;i--;){
    for(j=0;j<m;j++){
      if(s[i+j]=='?')continue;
      if(s[i+j]-t[j])goto NEXT;
    }
    for(j=0;j<m;j++)s[i+j]=t[j];
    for(j=0;j<n;j++){
      if(s[j]=='?')s[j]='a';
    }
    printf("%s\n",s);
    return 0;
  NEXT:;
  }
  printf("UNRESTORABLE\n");
  return 0;
}
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

?tc??@?
coder
 >q???d?>
_ba
 d>>>???q
a`a
 d>>>???q
aaa
 ??p??d??
abb
 ?tc??@?
cnder
 ??p??d??
`bb
 ?tc??@?
endcr
 ??p??d??
`ab
 @tc??@?
endcr

UNRESTORABLE
 >q_bada>
 d>>>a`aq
 d>>>aaaq
 UNRESTORABLE
 UNRESTORABLE
 UNRESTORABLE
 UNRESTORABLE
 UNRESTORABLE
 UNRESTORABLE

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

```c
#include<stdio.h>
int main(){
  char s[1010],t[1010];
  int i,j,n,m;
  scanf("%s %s",s,t);
  for(n=0;s[n];n++);
  for(m=0;t[m];m++);
  for(i=n-m+1;i--;){
    for(j=0;j<m;j++){
      if(s[i+j]=='?')continue;
      if(s[i+j]-t[j])goto NEXT;
    }
    for(j=0;j<m;j++)s[i+j]=t[j];
    for(j=0;j<n;j++){
      if(s[j]=='?')s[j]='a';
    }
    printf("%s\n",s);
    return 0;
  NEXT:;
  }
  printf("UNRESTORABLE\n");
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"UNRESTORABLE"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$2048, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rsp, %rbp
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L22
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %r9d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
.L2:
	cmpb	$0, 1024(%rsp)
	je	.L23
	movl	$1, %eax
	leaq	1023(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L5
	movl	%r9d, %eax
	subl	%edi, %eax
	cmpl	$-1, %eax
	je	.L6
.L4:
	movslq	%eax, %rcx
	movl	%eax, %esi
	movq	%rbp, %r8
	leaq	-1(%rsp,%rcx), %rdx
	addq	%rbp, %rcx
	subq	%rsi, %rdx
	subl	%ecx, %eax
	movslq	%edi, %rsi
	movq	%rdx, %r12
	movl	%eax, %r10d
.L18:
	leal	(%r10,%rcx), %r11d
	testl	%edi, %edi
	je	.L20
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movzbl	(%rcx,%rax), %edx
	cmpb	$63, %dl
	je	.L7
	cmpb	(%rbx,%rax), %dl
	jne	.L8
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movslq	%r11d, %rdx
	movl	%eax, %ecx
	addq	%rbp, %rdx
	cmpl	$8, %eax
	jnb	.L10
	testb	$4, %al
	jne	.L43
	testl	%ecx, %ecx
	jne	.L44
.L20:
	testl	%r9d, %r9d
	je	.L14
	leal	-1(%r9), %eax
	leaq	1(%rbp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$63, (%r8)
	jne	.L15
	movb	$97, (%r8)
.L15:
	addq	$1, %r8
	cmpq	%r8, %rax
	jne	.L16
.L14:
	movq	%rbp, %rdi
	call	puts@PLT
.L17:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$2048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	subq	$1, %rcx
	cmpq	%r12, %rcx
	jne	.L18
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L10:
	movq	1024(%rsp), %rcx
	leaq	8(%rdx), %rdi
	andq	$-8, %rdi
	movq	%rcx, (%rdx)
	movl	%eax, %ecx
	movq	-8(%rbx,%rcx), %rsi
	movq	%rsi, -8(%rdx,%rcx)
	subq	%rdi, %rdx
	subq	%rdx, %rbx
	leal	(%rax,%rdx), %ecx
	movq	%rbx, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L20
.L44:
	movzbl	1024(%rsp), %eax
	movb	%al, (%rdx)
	testb	$2, %cl
	je	.L20
	movzwl	-2(%rbx,%rcx), %eax
	movw	%ax, -2(%rdx,%rcx)
	jmp	.L20
.L23:
	movl	%r9d, %eax
	xorl	%edi, %edi
	jmp	.L4
.L22:
	xorl	%r9d, %r9d
	jmp	.L2
.L43:
	movl	1024(%rsp), %eax
	movl	%eax, (%rdx)
	movl	-4(%rbx,%rcx), %eax
	movl	%eax, -4(%rdx,%rcx)
	jmp	.L20
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"UNRESTORABLE"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$2048, %rsp
	.cfi_def_cfa_offset 2080
	movq	%fs:40, %rax
	movq	%rax, 2040(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rsp, %rbp
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L22
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %r9d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
.L2:
	cmpb	$0, 1024(%rsp)
	je	.L23
	movl	$1, %eax
	leaq	1023(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L5
	movl	%r9d, %eax
	subl	%edi, %eax
	cmpl	$-1, %eax
	je	.L6
.L4:
	movslq	%eax, %rcx
	movl	%eax, %esi
	movq	%rbp, %r8
	leaq	-1(%rsp,%rcx), %rdx
	addq	%rbp, %rcx
	subq	%rsi, %rdx
	subl	%ecx, %eax
	movslq	%edi, %rsi
	movq	%rdx, %r12
	movl	%eax, %r10d
.L18:
	leal	(%r10,%rcx), %r11d
	testl	%edi, %edi
	je	.L20
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movzbl	(%rcx,%rax), %edx
	cmpb	$63, %dl
	je	.L7
	cmpb	(%rbx,%rax), %dl
	jne	.L8
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	movslq	%r11d, %rdx
	movl	%eax, %ecx
	addq	%rbp, %rdx
	cmpl	$8, %eax
	jnb	.L10
	testb	$4, %al
	jne	.L43
	testl	%ecx, %ecx
	jne	.L44
.L20:
	testl	%r9d, %r9d
	je	.L14
	leal	-1(%r9), %eax
	leaq	1(%rbp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L16:
	cmpb	$63, (%r8)
	jne	.L15
	movb	$97, (%r8)
.L15:
	addq	$1, %r8
	cmpq	%r8, %rax
	jne	.L16
.L14:
	movq	%rbp, %rdi
	call	puts@PLT
.L17:
	movq	2040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$2048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	subq	$1, %rcx
	cmpq	%r12, %rcx
	jne	.L18
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L10:
	movq	1024(%rsp), %rcx
	leaq	8(%rdx), %rdi
	andq	$-8, %rdi
	movq	%rcx, (%rdx)
	movl	%eax, %ecx
	movq	-8(%rbx,%rcx), %rsi
	movq	%rsi, -8(%rdx,%rcx)
	subq	%rdi, %rdx
	subq	%rdx, %rbx
	leal	(%rax,%rdx), %ecx
	movq	%rbx, %rsi
	shrl	$3, %ecx
	rep movsq
	jmp	.L20
.L44:
	movzbl	1024(%rsp), %eax
	movb	%al, (%rdx)
	testb	$2, %cl
	je	.L20
	movzwl	-2(%rbx,%rcx), %eax
	movw	%ax, -2(%rdx,%rcx)
	jmp	.L20
.L23:
	movl	%r9d, %eax
	xorl	%edi, %edi
	jmp	.L4
.L22:
	xorl	%r9d, %r9d
	jmp	.L2
.L43:
	movl	1024(%rsp), %eax
	movl	%eax, (%rdx)
	movl	-4(%rbx,%rcx), %eax
	movl	%eax, -4(%rdx,%rcx)
	jmp	.L20
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```