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>
#include <stdlib.h>

int N;
char S[114514];

int main(void) {
	int i;
	int kita = 0, higasi = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%114513s", S) != 1) return 1;
	for (i = 0; i < N; i++) {
		if ('A' <= S[i] && S[i] <=  'M') kita++;
		else if ('N' <= S[i] && S[i] <= 'Z') kita--;
		else if ('a' <= S[i] && S[i] <= 'm') higasi++;
		else if ('n' <= S[i] && S[i] <= 'z') higasi--;
	}
	printf("%d\n", abs(kita) + abs(higasi));
	if (kita > 0) {
		for (i = 0; i < kita; i++) putchar('A');
	} else if (kita < 0) {
		for (i = 0; i > kita; i--) putchar('N');
	}
	if (higasi > 0) {
		for (i = 0; i < higasi; i++) putchar('a');
	} else if (higasi < 0) {
		for (i = 0; i > higasi; i--) putchar('n');
	}
	putchar('\n');
	return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%114513s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	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
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	N(%rip), %edx
	testl	%edx, %edx
	jle	.L5
	leaq	1(%rbx), %rsi
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%ebp, %ebp
	addq	%rdx, %rsi
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$1, %ebx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L32
.L10:
	movzbl	(%rax), %edx
	leal	-65(%rdx), %ecx
	cmpb	$12, %cl
	jbe	.L33
	leal	-78(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L8
	subl	$1, %ebx
	jmp	.L7
.L8:
	leal	-97(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L9
	addl	$1, %ebp
	jmp	.L7
.L9:
	subl	$110, %edx
	cmpb	$13, %dl
	sbbl	$0, %ebp
	jmp	.L7
.L32:
	movl	%ebx, %edx
	movl	%ebp, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	negl	%edx
	cmovs	%ebx, %edx
	negl	%eax
	cmovs	%ebp, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	jle	.L11
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$65, %edi
	addl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jne	.L12
.L13:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L16:
	movq	stdout(%rip), %rsi
	movl	$97, %edi
	addl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jne	.L16
.L17:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	jmp	.L1
.L11:
	je	.L13
	xorl	%r12d, %r12d
.L14:
	movq	stdout(%rip), %rsi
	movl	$78, %edi
	subl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jl	.L14
	jmp	.L13
.L15:
	je	.L17
	xorl	%ebx, %ebx
.L18:
	movq	stdout(%rip), %rsi
	movl	$110, %edi
	subl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jl	.L18
	jmp	.L17
.L5:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	"%d"
.LC1:
	.string	"%114513s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	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
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	N(%rip), %edx
	testl	%edx, %edx
	jle	.L5
	leaq	1(%rbx), %rsi
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%ebp, %ebp
	addq	%rdx, %rsi
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$1, %ebx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L32
.L10:
	movzbl	(%rax), %edx
	leal	-65(%rdx), %ecx
	cmpb	$12, %cl
	jbe	.L33
	leal	-78(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L8
	subl	$1, %ebx
	jmp	.L7
.L8:
	leal	-97(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L9
	addl	$1, %ebp
	jmp	.L7
.L9:
	subl	$110, %edx
	cmpb	$13, %dl
	sbbl	$0, %ebp
	jmp	.L7
.L32:
	movl	%ebx, %edx
	movl	%ebp, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	negl	%edx
	cmovs	%ebx, %edx
	negl	%eax
	cmovs	%ebp, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	jle	.L11
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$65, %edi
	addl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jne	.L12
.L13:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L16:
	movq	stdout(%rip), %rsi
	movl	$97, %edi
	addl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jne	.L16
.L17:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	jmp	.L1
.L11:
	je	.L13
	xorl	%r12d, %r12d
.L14:
	movq	stdout(%rip), %rsi
	movl	$78, %edi
	subl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jl	.L14
	jmp	.L13
.L15:
	je	.L17
	xorl	%ebx, %ebx
.L18:
	movq	stdout(%rip), %rsi
	movl	$110, %edi
	subl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jl	.L18
	jmp	.L17
.L5:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	"%d"
.LC1:
	.string	"%114513s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	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
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	N(%rip), %edx
	testl	%edx, %edx
	jle	.L5
	leaq	1(%rbx), %rsi
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%ebp, %ebp
	addq	%rdx, %rsi
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$1, %ebx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L32
.L10:
	movzbl	(%rax), %edx
	leal	-65(%rdx), %ecx
	cmpb	$12, %cl
	jbe	.L33
	leal	-78(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L8
	subl	$1, %ebx
	jmp	.L7
.L8:
	leal	-97(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L9
	addl	$1, %ebp
	jmp	.L7
.L9:
	subl	$110, %edx
	cmpb	$13, %dl
	sbbl	$0, %ebp
	jmp	.L7
.L32:
	movl	%ebx, %edx
	movl	%ebp, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	negl	%edx
	cmovs	%ebx, %edx
	negl	%eax
	cmovs	%ebp, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	jle	.L11
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$65, %edi
	addl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jne	.L12
.L13:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L16:
	movq	stdout(%rip), %rsi
	movl	$97, %edi
	addl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jne	.L16
.L17:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	jmp	.L1
.L11:
	je	.L13
	xorl	%r12d, %r12d
.L14:
	movq	stdout(%rip), %rsi
	movl	$78, %edi
	subl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jl	.L14
	jmp	.L13
.L15:
	je	.L17
	xorl	%ebx, %ebx
.L18:
	movq	stdout(%rip), %rsi
	movl	$110, %edi
	subl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jl	.L18
	jmp	.L17
.L5:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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>
#include <stdlib.h>

int N;
char S[114514];

int main(void) {
	int i;
	int kita = 0, higasi = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%114513s", S) != 1) return 1;
	for (i = 0; i < N; i++) {
		if ('A' <= S[i] && S[i] <=  'M') kita++;
		else if ('N' <= S[i] && S[i] <= 'Z') kita--;
		else if ('a' <= S[i] && S[i] <= 'm') higasi++;
		else if ('n' <= S[i] && S[i] <= 'z') higasi--;
	}
	printf("%d\n", abs(kita) + abs(higasi));
	if (kita > 0) {
		for (i = 0; i < kita; i++) putchar('A');
	} else if (kita < 0) {
		for (i = 0; i > kita; i--) putchar('N');
	}
	if (higasi > 0) {
		for (i = 0; i < higasi; i++) putchar('a');
	} else if (higasi < 0) {
		for (i = 0; i > higasi; i--) putchar('n');
	}
	putchar('\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>
#include <stdlib.h>

int N;
char S[114514];

int main(void) {
	int i;
	int kita = 0, higasi = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%114513s", S) != 1) return 1;
	for (i = 0; i < N; i++) {
		if ('A' <= S[i] && S[i] <=  'M') kita++;
		else if ('N' <= S[i] && S[i] <= 'Z') kita--;
		else if ('a' <= S[i] && S[i] <= 'm') higasi++;
		else if ('n' <= S[i] && S[i] <= 'z') higasi--;
	}
	printf("%d\n", abs(kita) + abs(higasi));
	if (kita > 0) {
		for (i = 0; i < kita; i++) putchar('A');
	} else if (kita < 0) {
		for (i = 0; i > kita; i--) putchar('N');
	}
	if (higasi > 0) {
		for (i = 0; i < higasi; i++) putchar('a');
	} else if (higasi < 0) {
		for (i = 0; i > higasi; i--) putchar('n');
	}
	putchar('\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:

5
AzaNA
 5
AMazA
 5
zAaNA
 5
AzaAN
 5
zAaNB
 5
AMAza
 5
AzaBN
 5
zAaNC
 5
AMBza
 5
NBazA

1
A
 3
AAA
 1
A
 1
A
 1
A
 3
AAA
 1
A
 1
A
 3
AAA
 1
A

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>
#include <stdlib.h>

int N;
char S[114514];

int main(void) {
	int i;
	int kita = 0, higasi = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%114513s", S) != 1) return 1;
	for (i = 0; i < N; i++) {
		if ('A' <= S[i] && S[i] <=  'M') kita++;
		else if ('N' <= S[i] && S[i] <= 'Z') kita--;
		else if ('a' <= S[i] && S[i] <= 'm') higasi++;
		else if ('n' <= S[i] && S[i] <= 'z') higasi--;
	}
	printf("%d\n", abs(kita) + abs(higasi));
	if (kita > 0) {
		for (i = 0; i < kita; i++) putchar('A');
	} else if (kita < 0) {
		for (i = 0; i > kita; i--) putchar('N');
	}
	if (higasi > 0) {
		for (i = 0; i < higasi; i++) putchar('a');
	} else if (higasi < 0) {
		for (i = 0; i > higasi; i--) putchar('n');
	}
	putchar('\n');
	return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%114513s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	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
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	N(%rip), %edx
	testl	%edx, %edx
	jle	.L5
	leaq	1(%rbx), %rsi
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%ebp, %ebp
	addq	%rdx, %rsi
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$1, %ebx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L32
.L10:
	movzbl	(%rax), %edx
	leal	-65(%rdx), %ecx
	cmpb	$12, %cl
	jbe	.L33
	leal	-78(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L8
	subl	$1, %ebx
	jmp	.L7
.L8:
	leal	-97(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L9
	addl	$1, %ebp
	jmp	.L7
.L9:
	subl	$110, %edx
	cmpb	$13, %dl
	sbbl	$0, %ebp
	jmp	.L7
.L32:
	movl	%ebx, %edx
	movl	%ebp, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	negl	%edx
	cmovs	%ebx, %edx
	negl	%eax
	cmovs	%ebp, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	jle	.L11
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$65, %edi
	addl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jne	.L12
.L13:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L16:
	movq	stdout(%rip), %rsi
	movl	$97, %edi
	addl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jne	.L16
.L17:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	jmp	.L1
.L11:
	je	.L13
	xorl	%r12d, %r12d
.L14:
	movq	stdout(%rip), %rsi
	movl	$78, %edi
	subl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jl	.L14
	jmp	.L13
.L15:
	je	.L17
	xorl	%ebx, %ebx
.L18:
	movq	stdout(%rip), %rsi
	movl	$110, %edi
	subl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jl	.L18
	jmp	.L17
.L5:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	"%d"
.LC1:
	.string	"%114513s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	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
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	N(%rip), %edx
	testl	%edx, %edx
	jle	.L5
	leaq	1(%rbx), %rsi
	subl	$1, %edx
	movq	%rbx, %rax
	xorl	%ebp, %ebp
	addq	%rdx, %rsi
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$1, %ebx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rsi
	je	.L32
.L10:
	movzbl	(%rax), %edx
	leal	-65(%rdx), %ecx
	cmpb	$12, %cl
	jbe	.L33
	leal	-78(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L8
	subl	$1, %ebx
	jmp	.L7
.L8:
	leal	-97(%rdx), %ecx
	cmpb	$12, %cl
	ja	.L9
	addl	$1, %ebp
	jmp	.L7
.L9:
	subl	$110, %edx
	cmpb	$13, %dl
	sbbl	$0, %ebp
	jmp	.L7
.L32:
	movl	%ebx, %edx
	movl	%ebp, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	negl	%edx
	cmovs	%ebx, %edx
	negl	%eax
	cmovs	%ebp, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	testl	%ebx, %ebx
	jle	.L11
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$65, %edi
	addl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jne	.L12
.L13:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L16:
	movq	stdout(%rip), %rsi
	movl	$97, %edi
	addl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jne	.L16
.L17:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	xorl	%eax, %eax
	jmp	.L1
.L11:
	je	.L13
	xorl	%r12d, %r12d
.L14:
	movq	stdout(%rip), %rsi
	movl	$78, %edi
	subl	$1, %r12d
	call	putc@PLT
	cmpl	%r12d, %ebx
	jl	.L14
	jmp	.L13
.L15:
	je	.L17
	xorl	%ebx, %ebx
.L18:
	movq	stdout(%rip), %rsi
	movl	$110, %edi
	subl	$1, %ebx
	call	putc@PLT
	cmpl	%ebx, %ebp
	jl	.L18
	jmp	.L17
.L5:
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L17
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 114514
S:
	.zero	114514
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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:
```