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>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
#define S(type,x) fscanf(stdin,"%"#type,&x)
//#define MAX(a,b) a>b?a:b
//#define MIN(a,b) a<b?a:b

int main() {
	int n;
	while (S(d, n), n) {
		getchar();
		char s[200] = "",
			 t;
		S(s, s);
		int a[100], b[100],i;
		for (i = 0; i < n;fscanf(stdin, "%d%d", a + i, b + i),a[i]--, b[i]--,i++);
		for (i = n - 1; i>=0;i--) {
			int c = b[i] - a[i];
			s[a[i]] = ((s[a[i]] - 'a')+c)%26+'a';
			s[b[i]] = ((s[b[i]] - 'a')+c)%26+'a';
			t = s[a[i]], s[a[i]] = s[b[i]], s[b[i]] = t;
		}
		P(s, s);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1024, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L7:
	call	getchar@PLT
	movq	$0, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	$0, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	$0, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	$0, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movq	stdin(%rip), %rax
	leaq	-208(%rbp), %rdx
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$0, -1016(%rbp)
	jmp	.L3
.L4:
	movl	-1016(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-608(%rbp), %rax
	leaq	(%rax,%rdx), %rcx
	movl	-1016(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-1008(%rbp), %rax
	addq	%rax, %rdx
	movq	stdin(%rip), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	%edx, -1008(%rbp,%rax,4)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	%edx, -608(%rbp,%rax,4)
	addl	$1, -1016(%rbp)
.L3:
	movl	-1020(%rbp), %eax
	cmpl	%eax, -1016(%rbp)
	jl	.L4
	movl	-1020(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1016(%rbp)
	jmp	.L5
.L6:
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1012(%rbp)
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %edx
	movl	-1012(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	leal	97(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %edx
	movl	-1012(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	leal	97(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movb	%al, -1021(%rbp)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	movzbl	-208(%rbp,%rax), %edx
	movslq	%ecx, %rax
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movzbl	-1021(%rbp), %edx
	movb	%dl, -208(%rbp,%rax)
	subl	$1, -1016(%rbp)
.L5:
	cmpl	$0, -1016(%rbp)
	jns	.L6
	movq	stdout(%rip), %rax
	leaq	-208(%rbp), %rdx
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	fprintf@PLT
.L2:
	movq	stdin(%rip), %rax
	leaq	-1020(%rbp), %rdx
	leaq	.LC3(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-1020(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1032, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1016(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	816(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r13, %rdx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L13
	movq	stdin(%rip), %rdi
	call	getc@PLT
	pxor	%xmm0, %xmm0
	movq	%rbx, %rdx
	xorl	%eax, %eax
	movq	stdin(%rip), %rdi
	leaq	.LC0(%rip), %rsi
	movq	$0, 1008(%rsp)
	movaps	%xmm0, 816(%rsp)
	movaps	%xmm0, 832(%rsp)
	movaps	%xmm0, 848(%rsp)
	movaps	%xmm0, 864(%rsp)
	movaps	%xmm0, 880(%rsp)
	movaps	%xmm0, 896(%rsp)
	movaps	%xmm0, 912(%rsp)
	movaps	%xmm0, 928(%rsp)
	movaps	%xmm0, 944(%rsp)
	movaps	%xmm0, 960(%rsp)
	movaps	%xmm0, 976(%rsp)
	movaps	%xmm0, 992(%rsp)
	call	__isoc99_fscanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L3
	leaq	16(%rsp), %r12
	leaq	416(%rsp), %r15
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdin(%rip), %rdi
	movq	%r15, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_fscanf@PLT
	movl	12(%rsp), %esi
	subl	$1, (%r12)
	addq	$4, %r12
	subl	$1, (%r15)
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L4
.L3:
	subl	$1, %esi
	js	.L5
	movslq	%esi, %rsi
	leaq	16(%rsp), %r9
	leaq	416(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	(%r9,%rsi,4), %rcx
	movslq	(%r8,%rsi,4), %rdi
	subq	$1, %rsi
	movsbl	816(%rsp,%rcx), %eax
	movl	%edi, %r10d
	subl	%ecx, %r10d
	leal	-97(%r10,%rax), %edx
	movslq	%edx, %rax
	movl	%edx, %r11d
	imulq	$1321528399, %rax, %rax
	sarl	$31, %r11d
	sarq	$35, %rax
	subl	%r11d, %eax
	imull	$26, %eax, %eax
	subl	%eax, %edx
	addl	$97, %edx
	movb	%dl, 816(%rsp,%rcx)
	movsbl	816(%rsp,%rdi), %eax
	leal	-97(%r10,%rax), %edx
	movslq	%edx, %rax
	movl	%edx, %r10d
	imulq	$1321528399, %rax, %rax
	sarl	$31, %r10d
	sarq	$35, %rax
	subl	%r10d, %eax
	imull	$26, %eax, %eax
	subl	%eax, %edx
	addl	$97, %edx
	movb	%dl, 816(%rsp,%rdi)
	movzbl	(%rbx,%rcx), %eax
	movb	%dl, 816(%rsp,%rcx)
	movb	%al, (%rbx,%rdi)
	testl	%esi, %esi
	jns	.L6
.L5:
	movq	stdout(%rip), %rdi
	movq	%rbx, %rcx
	movl	$1, %esi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdx
	call	__fprintf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	movq	1016(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$1032, %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
.L14:
	.cfi_restore_state
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1032, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1016(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	leaq	816(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdi
	movq	%r13, %rdx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	call	__isoc99_fscanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L13
	movq	stdin(%rip), %rdi
	call	getc@PLT
	pxor	%xmm0, %xmm0
	movq	%rbx, %rdx
	xorl	%eax, %eax
	movq	stdin(%rip), %rdi
	leaq	.LC0(%rip), %rsi
	movq	$0, 1008(%rsp)
	movaps	%xmm0, 816(%rsp)
	movaps	%xmm0, 832(%rsp)
	movaps	%xmm0, 848(%rsp)
	movaps	%xmm0, 864(%rsp)
	movaps	%xmm0, 880(%rsp)
	movaps	%xmm0, 896(%rsp)
	movaps	%xmm0, 912(%rsp)
	movaps	%xmm0, 928(%rsp)
	movaps	%xmm0, 944(%rsp)
	movaps	%xmm0, 960(%rsp)
	movaps	%xmm0, 976(%rsp)
	movaps	%xmm0, 992(%rsp)
	call	__isoc99_fscanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L3
	leaq	16(%rsp), %r12
	leaq	416(%rsp), %r15
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdin(%rip), %rdi
	movq	%r15, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_fscanf@PLT
	movl	12(%rsp), %esi
	subl	$1, (%r12)
	addq	$4, %r12
	subl	$1, (%r15)
	addq	$4, %r15
	cmpl	%r14d, %esi
	jg	.L4
.L3:
	subl	$1, %esi
	js	.L5
	movslq	%esi, %rsi
	leaq	16(%rsp), %r9
	leaq	416(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	(%r9,%rsi,4), %rcx
	movslq	(%r8,%rsi,4), %rdi
	subq	$1, %rsi
	movsbl	816(%rsp,%rcx), %eax
	movl	%edi, %r10d
	subl	%ecx, %r10d
	leal	-97(%r10,%rax), %edx
	movslq	%edx, %rax
	movl	%edx, %r11d
	imulq	$1321528399, %rax, %rax
	sarl	$31, %r11d
	sarq	$35, %rax
	subl	%r11d, %eax
	imull	$26, %eax, %eax
	subl	%eax, %edx
	addl	$97, %edx
	movb	%dl, 816(%rsp,%rcx)
	movsbl	816(%rsp,%rdi), %eax
	leal	-97(%r10,%rax), %edx
	movslq	%edx, %rax
	movl	%edx, %r10d
	imulq	$1321528399, %rax, %rax
	sarl	$31, %r10d
	sarq	$35, %rax
	subl	%r10d, %eax
	imull	$26, %eax, %eax
	subl	%eax, %edx
	addl	$97, %edx
	movb	%dl, 816(%rsp,%rdi)
	movzbl	(%rbx,%rcx), %eax
	movb	%dl, 816(%rsp,%rcx)
	movb	%al, (%rbx,%rdi)
	testl	%esi, %esi
	jns	.L6
.L5:
	movq	stdout(%rip), %rdi
	movq	%rbx, %rcx
	movl	$1, %esi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdx
	call	__fprintf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	movq	1016(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$1032, %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
.L14:
	.cfi_restore_state
	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:

#include<stdio.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
#define S(type,x) fscanf(stdin,"%"#type,&x)
//#define MAX(a,b) a>b?a:b
//#define MIN(a,b) a<b?a:b

int main() {
	int n;
	while (S(d, n), n) {
		getchar();
		char s[200] = "",
			 t;
		S(s, s);
		int a[100], b[100],i;
		for (i = 0; i < n;fscanf(stdin, "%d%d", a + i, b + i),a[i]--, b[i]--,i++);
		for (i = n - 1; i>=0;i--) {
			int c = b[i] - a[i];
			s[a[i]] = ((s[a[i]] - 'a')+c)%26+'a';
			s[b[i]] = ((s[b[i]] - 'a')+c)%26+'a';
			t = s[a[i]], s[a[i]] = s[b[i]], s[b[i]] = t;
		}
		P(s, s);
	}
	return 0;
}
1
tojxo
1 4
5
uhcqmlmkv
4 5
6 9
3 6
1 7
3 6
5
shzxadexonr
8 9
3 9
5 9
4 9
10 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 7
3 6
5
shzxadexonr
8 9
3 9
5 8
4 9
10 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 4
3 6
5
shzxadexonr
8 9
3 9
5 8
4 9
10 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 4
3 6
5
shzxadexonr
8 9
3 9
5 10
4 9
10 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 7
3 6
5
shzxaeexonr
8 9
3 9
5 8
4 9
10 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 4
3 6
5
shzxadexonr
8 9
3 9
5 10
4 9
2 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 4
2 6
5
shzxadexonr
8 9
3 9
5 10
4 9
2 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 5
6 9
3 6
1 4
2 6
5
shzxadexonr
8 9
3 9
5 10
5 9
2 11
0
 1
tojxo
1 4
5
uhcqmlmkv
4 5
6 9
3 6
1 7
3 6
5
shnxadexozr
8 9
3 9
5 8
4 9
10 11
0
 1
tojxo
1 4
5
uhcqmlnkv
4 6
6 9
3 6
1 4
3 6
5
shzxadexonr
8 9
3 9
5 10
4 9
10 11
0

aojwo
shinryaku
shktgdegyso
 aojwo
thinryaku
shitadegeso
 aojwo
thinyynku
shitadegeso
 aojwo
thinyynku
shitxdegyfo
 aojwo
thinryaku
shitaeegeso
 aojwo
thinyynku
saitsdegyfq
 aojwo
tponyynki
saitsdegyfq
 aojwo
tponyynki
sakxsdegyxq
 aojwo
shinryaku
shitadeuesa
 aojwo
thiamznku
shitxdegyfo

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>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
#define S(type,x) fscanf(stdin,"%"#type,&x)
//#define MAX(a,b) a>b?a:b
//#define MIN(a,b) a<b?a:b

int main() {
	int n;
	while (S(d, n), n) {
		getchar();
		char s[200] = "",
			 t;
		S(s, s);
		int a[100], b[100],i;
		for (i = 0; i < n;fscanf(stdin, "%d%d", a + i, b + i),a[i]--, b[i]--,i++);
		for (i = n - 1; i>=0;i--) {
			int c = b[i] - a[i];
			s[a[i]] = ((s[a[i]] - 'a')+c)%26+'a';
			s[b[i]] = ((s[b[i]] - 'a')+c)%26+'a';
			t = s[a[i]], s[a[i]] = s[b[i]], s[b[i]] = t;
		}
		P(s, s);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1024, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L7:
	call	getchar@PLT
	movq	$0, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	$0, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	$0, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	$0, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movq	stdin(%rip), %rax
	leaq	-208(%rbp), %rdx
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$0, -1016(%rbp)
	jmp	.L3
.L4:
	movl	-1016(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-608(%rbp), %rax
	leaq	(%rax,%rdx), %rcx
	movl	-1016(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-1008(%rbp), %rax
	addq	%rax, %rdx
	movq	stdin(%rip), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	%edx, -1008(%rbp,%rax,4)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	%edx, -608(%rbp,%rax,4)
	addl	$1, -1016(%rbp)
.L3:
	movl	-1020(%rbp), %eax
	cmpl	%eax, -1016(%rbp)
	jl	.L4
	movl	-1020(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1016(%rbp)
	jmp	.L5
.L6:
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1012(%rbp)
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %edx
	movl	-1012(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	leal	97(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %edx
	movl	-1012(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	leal	97(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movb	%al, -1021(%rbp)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	movzbl	-208(%rbp,%rax), %edx
	movslq	%ecx, %rax
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movzbl	-1021(%rbp), %edx
	movb	%dl, -208(%rbp,%rax)
	subl	$1, -1016(%rbp)
.L5:
	cmpl	$0, -1016(%rbp)
	jns	.L6
	movq	stdout(%rip), %rax
	leaq	-208(%rbp), %rdx
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	fprintf@PLT
.L2:
	movq	stdin(%rip), %rax
	leaq	-1020(%rbp), %rdx
	leaq	.LC3(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-1020(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1024, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L7:
	call	getchar@PLT
	movq	$0, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	$0, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	$0, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	$0, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	$0, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movq	stdin(%rip), %rax
	leaq	-208(%rbp), %rdx
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	$0, -1016(%rbp)
	jmp	.L3
.L4:
	movl	-1016(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-608(%rbp), %rax
	leaq	(%rax,%rdx), %rcx
	movl	-1016(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-1008(%rbp), %rax
	addq	%rax, %rdx
	movq	stdin(%rip), %rax
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	%edx, -1008(%rbp,%rax,4)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	%edx, -608(%rbp,%rax,4)
	addl	$1, -1016(%rbp)
.L3:
	movl	-1020(%rbp), %eax
	cmpl	%eax, -1016(%rbp)
	jl	.L4
	movl	-1020(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1016(%rbp)
	jmp	.L5
.L6:
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1012(%rbp)
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %edx
	movl	-1012(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	leal	97(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	leal	-97(%rax), %edx
	movl	-1012(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	leal	97(%rax), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movb	%al, -1021(%rbp)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	-1016(%rbp), %eax
	cltq
	movl	-1008(%rbp,%rax,4), %ecx
	movslq	%edx, %rax
	movzbl	-208(%rbp,%rax), %edx
	movslq	%ecx, %rax
	movb	%dl, -208(%rbp,%rax)
	movl	-1016(%rbp), %eax
	cltq
	movl	-608(%rbp,%rax,4), %eax
	cltq
	movzbl	-1021(%rbp), %edx
	movb	%dl, -208(%rbp,%rax)
	subl	$1, -1016(%rbp)
.L5:
	cmpl	$0, -1016(%rbp)
	jns	.L6
	movq	stdout(%rip), %rax
	leaq	-208(%rbp), %rdx
	leaq	.LC2(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	fprintf@PLT
.L2:
	movq	stdin(%rip), %rax
	leaq	-1020(%rbp), %rdx
	leaq	.LC3(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	movl	-1020(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
