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>

void ch_line(char ch, int num);

int main()
{
	int n;
	char str[105];
	int op, ed;
	op = ed = 0;

	scanf("%d", &n);
	scanf("%s", str);

	for (int i = 0; i < n; i++){
		if(str[i] == '(') {
			op++;
		}

		if (str[i] == ')') {
			if (op > 0) {
				op--;
			} else {
				ed++;
			}
		}
	}

	ch_line('(', ed);
	printf("%s", str);
	ch_line(')', op);

	putchar('\n');

	return 0;
}

void ch_line(char ch, int num)
{
	while(num--) {
		putchar(ch);
	}

	return;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	subl	$1, %edx
	movq	%r12, %rax
	xorl	%esi, %esi
	xorl	%ebp, %ebp
	leaq	17(%rsp,%rdx), %rcx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$41, %dl
	jne	.L4
	testl	%ebp, %ebp
	je	.L5
	subl	$1, %ebp
.L4:
	addq	$1, %rax
	cmpq	%rax, %rcx
	je	.L26
.L6:
	movzbl	(%rax), %edx
	cmpb	$40, %dl
	jne	.L3
	addq	$1, %rax
	addl	$1, %ebp
	cmpq	%rax, %rcx
	jne	.L6
.L26:
	leal	-1(%rsi), %ebx
	testl	%esi, %esi
	je	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	movl	$40, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L10
.L9:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	-1(%rbp), %ebx
	testl	%ebp, %ebp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$41, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L12
.L8:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	addl	$1, %esi
	jmp	.L4
.L2:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	ch_line
	.type	ch_line, @function
ch_line:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	je	.L35
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movsbl	%dil, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%esi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdout(%rip), %rsi
	movl	%ebp, %edi
	call	putc@PLT
	subl	$1, %ebx
	jne	.L30
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE24:
	.size	ch_line, .-ch_line
	.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	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	subl	$1, %edx
	movq	%r12, %rax
	xorl	%esi, %esi
	xorl	%ebp, %ebp
	leaq	17(%rsp,%rdx), %rcx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$41, %dl
	jne	.L4
	testl	%ebp, %ebp
	je	.L5
	subl	$1, %ebp
.L4:
	addq	$1, %rax
	cmpq	%rax, %rcx
	je	.L26
.L6:
	movzbl	(%rax), %edx
	cmpb	$40, %dl
	jne	.L3
	addq	$1, %rax
	addl	$1, %ebp
	cmpq	%rax, %rcx
	jne	.L6
.L26:
	leal	-1(%rsi), %ebx
	testl	%esi, %esi
	je	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	movl	$40, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L10
.L9:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	-1(%rbp), %ebx
	testl	%ebp, %ebp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$41, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L12
.L8:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	addl	$1, %esi
	jmp	.L4
.L2:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	ch_line
	.type	ch_line, @function
ch_line:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	je	.L35
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movsbl	%dil, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%esi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdout(%rip), %rsi
	movl	%ebp, %edi
	call	putc@PLT
	subl	$1, %ebx
	jne	.L30
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE24:
	.size	ch_line, .-ch_line
	.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	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	subl	$1, %edx
	movq	%r12, %rax
	xorl	%esi, %esi
	xorl	%ebp, %ebp
	leaq	17(%rsp,%rdx), %rcx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$41, %dl
	jne	.L4
	testl	%ebp, %ebp
	je	.L5
	subl	$1, %ebp
.L4:
	addq	$1, %rax
	cmpq	%rax, %rcx
	je	.L26
.L6:
	movzbl	(%rax), %edx
	cmpb	$40, %dl
	jne	.L3
	addq	$1, %rax
	addl	$1, %ebp
	cmpq	%rax, %rcx
	jne	.L6
.L26:
	leal	-1(%rsi), %ebx
	testl	%esi, %esi
	je	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	movl	$40, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L10
.L9:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	-1(%rbp), %ebx
	testl	%ebp, %ebp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$41, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L12
.L8:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	addl	$1, %esi
	jmp	.L4
.L2:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	ch_line
	.type	ch_line, @function
ch_line:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	je	.L35
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movsbl	%dil, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%esi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdout(%rip), %rsi
	movl	%ebp, %edi
	call	putc@PLT
	subl	$1, %ebx
	jne	.L30
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE24:
	.size	ch_line, .-ch_line
	.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>

void ch_line(char ch, int num);

int main()
{
	int n;
	char str[105];
	int op, ed;
	op = ed = 0;

	scanf("%d", &n);
	scanf("%s", str);

	for (int i = 0; i < n; i++){
		if(str[i] == '(') {
			op++;
		}

		if (str[i] == ')') {
			if (op > 0) {
				op--;
			} else {
				ed++;
			}
		}
	}

	ch_line('(', ed);
	printf("%s", str);
	ch_line(')', op);

	putchar('\n');

	return 0;
}

void ch_line(char ch, int num)
{
	while(num--) {
		putchar(ch);
	}

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

```c
#include <stdio.h>

void ch_line(char ch, int num);

int main()
{
	int n;
	char str[105];
	int op, ed;
	op = ed = 0;

	scanf("%d", &n);
	scanf("%s", str);

	for (int i = 0; i < n; i++){
		if(str[i] == '(') {
			op++;
		}

		if (str[i] == ')') {
			if (op > 0) {
				op--;
			} else {
				ed++;
			}
		}
	}

	ch_line('(', ed);
	printf("%s", str);
	ch_line(')', op);

	putchar('\n');

	return 0;
}

void ch_line(char ch, int num)
{
	while(num--) {
		putchar(ch);
	}

	return;
}
```

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:

8
(((())))
 3
)()
 6
)())))
 3
)))
 6
())())
 6
))())(
 6
))(()(
 8
))))(()(
 6
)))()(
 8
)((())))

(((())))
 ()()
 (((()())))
 ((()))
 ((())())
 ((())())()
 (())(()())
 (((())))(()())
 ((()))()()
 (()((())))

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>

void ch_line(char ch, int num);

int main()
{
	int n;
	char str[105];
	int op, ed;
	op = ed = 0;

	scanf("%d", &n);
	scanf("%s", str);

	for (int i = 0; i < n; i++){
		if(str[i] == '(') {
			op++;
		}

		if (str[i] == ')') {
			if (op > 0) {
				op--;
			} else {
				ed++;
			}
		}
	}

	ch_line('(', ed);
	printf("%s", str);
	ch_line(')', op);

	putchar('\n');

	return 0;
}

void ch_line(char ch, int num)
{
	while(num--) {
		putchar(ch);
	}

	return;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	subl	$1, %edx
	movq	%r12, %rax
	xorl	%esi, %esi
	xorl	%ebp, %ebp
	leaq	17(%rsp,%rdx), %rcx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$41, %dl
	jne	.L4
	testl	%ebp, %ebp
	je	.L5
	subl	$1, %ebp
.L4:
	addq	$1, %rax
	cmpq	%rax, %rcx
	je	.L26
.L6:
	movzbl	(%rax), %edx
	cmpb	$40, %dl
	jne	.L3
	addq	$1, %rax
	addl	$1, %ebp
	cmpq	%rax, %rcx
	jne	.L6
.L26:
	leal	-1(%rsi), %ebx
	testl	%esi, %esi
	je	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	movl	$40, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L10
.L9:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	-1(%rbp), %ebx
	testl	%ebp, %ebp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$41, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L12
.L8:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	addl	$1, %esi
	jmp	.L4
.L2:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	ch_line
	.type	ch_line, @function
ch_line:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	je	.L35
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movsbl	%dil, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%esi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdout(%rip), %rsi
	movl	%ebp, %edi
	call	putc@PLT
	subl	$1, %ebx
	jne	.L30
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE24:
	.size	ch_line, .-ch_line
	.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	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	subl	$1, %edx
	movq	%r12, %rax
	xorl	%esi, %esi
	xorl	%ebp, %ebp
	leaq	17(%rsp,%rdx), %rcx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmpb	$41, %dl
	jne	.L4
	testl	%ebp, %ebp
	je	.L5
	subl	$1, %ebp
.L4:
	addq	$1, %rax
	cmpq	%rax, %rcx
	je	.L26
.L6:
	movzbl	(%rax), %edx
	cmpb	$40, %dl
	jne	.L3
	addq	$1, %rax
	addl	$1, %ebp
	cmpq	%rax, %rcx
	jne	.L6
.L26:
	leal	-1(%rsi), %ebx
	testl	%esi, %esi
	je	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdout(%rip), %rsi
	movl	$40, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L10
.L9:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	-1(%rbp), %ebx
	testl	%ebp, %ebp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	stdout(%rip), %rsi
	movl	$41, %edi
	call	putc@PLT
	subl	$1, %ebx
	jnb	.L12
.L8:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	addl	$1, %esi
	jmp	.L4
.L2:
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	ch_line
	.type	ch_line, @function
ch_line:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	je	.L35
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movsbl	%dil, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%esi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdout(%rip), %rsi
	movl	%ebp, %edi
	call	putc@PLT
	subl	$1, %ebx
	jne	.L30
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE24:
	.size	ch_line, .-ch_line
	.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:
```