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

```c
char s[65536],t[65536];
int n,i,r,w,c,a;
int main()
{
	while(scanf("%d",&n),n){
		scanf("%s",s);
		for(i=0;i<n;++i){
			r=w=0;
			while(r<strlen(s)){
				a=s[r];
				for(c=0;s[r+c]==a;++c);
				sprintf(t+w,"%d\0",c);
				while(t[++w]);
				t[w++]=a;
				r+=c;
			}
			t[w]=0;
			strcpy(s,t);
		}
		puts(s);
	}
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 65536
t:
	.zero	65536
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.string	""
.LC2:
	.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
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	jmp	.L2
.L10:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L3
.L9:
	movl	$0, w(%rip)
	movl	w(%rip), %eax
	movl	%eax, r(%rip)
	jmp	.L4
.L8:
	movl	r(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, a(%rip)
	movl	$0, c(%rip)
	jmp	.L5
.L6:
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
.L5:
	movl	r(%rip), %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	a(%rip), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	c(%rip), %eax
	movl	w(%rip), %edx
	movslq	%edx, %rdx
	leaq	t(%rip), %rcx
	addq	%rdx, %rcx
	movl	%eax, %edx
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	nop
.L7:
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L7
	movl	a(%rip), %ecx
	movl	w(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, w(%rip)
	cltq
	leaq	t(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	r(%rip), %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	movl	%eax, r(%rip)
.L4:
	movl	r(%rip), %eax
	movslq	%eax, %rbx
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L8
	movl	w(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	movb	$0, (%rax,%rdx)
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L9
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %edi
	call	exit@PLT
	.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"
	.section	.rodata
.LC1:
	.string	"%d"
	.string	""
	.section	.rodata.str1.1
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %r15
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	s(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
.L2:
	movq	%r15, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L17
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %edx
	movl	$0, i(%rip)
	leaq	t(%rip), %rbp
	testl	%edx, %edx
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$0, w(%rip)
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdi
	movslq	%edx, %r14
	movl	%edx, r(%rip)
	call	strlen@PLT
	cmpq	%rax, %r14
	jnb	.L18
	movsbl	(%rbx,%r14), %edi
	movl	$1, %eax
	leaq	(%rbx,%r14), %rdx
	movl	%edi, a(%rip)
	.p2align 4,,10
	.p2align 3
.L5:
	movsbl	(%rdx,%rax), %esi
	movl	%eax, %r8d
	addq	$1, %rax
	cmpl	%esi, %edi
	je	.L5
	movslq	%r13d, %rcx
	movl	%r8d, %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	leaq	0(%rbp,%rcx), %rdi
	movl	%r8d, c(%rip)
	call	sprintf@PLT
	movslq	w(%rip), %rdx
	movq	%rdx, %rax
	addq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %rdx
	movl	%eax, %ecx
	addl	$1, %eax
	cmpb	$0, (%rdx)
	jne	.L6
	movl	a(%rip), %edx
	leal	2(%rcx), %r13d
	cltq
	movl	%r13d, w(%rip)
	movb	%dl, 0(%rbp,%rax)
	movl	c(%rip), %edx
	addl	r(%rip), %edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	movslq	%r13d, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	movb	$0, 0(%rbp,%rcx)
	call	strcpy@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L3
.L8:
	movq	%rbx, %rdi
	call	puts@PLT
	jmp	.L2
.L17:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 65536
t:
	.zero	65536
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.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"
	.section	.rodata
.LC1:
	.string	"%d"
	.string	""
	.section	.rodata.str1.1
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %r15
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	s(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
.L2:
	movq	%r15, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L17
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %edx
	movl	$0, i(%rip)
	leaq	t(%rip), %rbp
	testl	%edx, %edx
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L3:
	movl	$0, w(%rip)
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdi
	movslq	%edx, %r14
	movl	%edx, r(%rip)
	call	strlen@PLT
	cmpq	%rax, %r14
	jnb	.L18
	movsbl	(%rbx,%r14), %edi
	movl	$1, %eax
	leaq	(%rbx,%r14), %rdx
	movl	%edi, a(%rip)
	.p2align 4,,10
	.p2align 3
.L5:
	movsbl	(%rdx,%rax), %esi
	movl	%eax, %r8d
	addq	$1, %rax
	cmpl	%esi, %edi
	je	.L5
	movslq	%r13d, %rcx
	movl	%r8d, %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	leaq	0(%rbp,%rcx), %rdi
	movl	%r8d, c(%rip)
	call	sprintf@PLT
	movslq	w(%rip), %rdx
	movq	%rdx, %rax
	addq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %rdx
	movl	%eax, %ecx
	addl	$1, %eax
	cmpb	$0, (%rdx)
	jne	.L6
	movl	a(%rip), %edx
	leal	2(%rcx), %r13d
	cltq
	movl	%r13d, w(%rip)
	movb	%dl, 0(%rbp,%rax)
	movl	c(%rip), %edx
	addl	r(%rip), %edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	movslq	%r13d, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	movb	$0, 0(%rbp,%rcx)
	call	strcpy@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L3
.L8:
	movq	%rbx, %rdi
	call	puts@PLT
	jmp	.L2
.L17:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 65536
t:
	.zero	65536
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.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:

char s[65536],t[65536];
int n,i,r,w,c,a;
int main()
{
	while(scanf("%d",&n),n){
		scanf("%s",s);
		for(i=0;i<n;++i){
			r=w=0;
			while(r<strlen(s)){
				a=s[r];
				for(c=0;s[r+c]==a;++c);
				sprintf(t+w,"%d\0",c);
				while(t[++w]);
				t[w++]=a;
				r+=c;
			}
			t[w]=0;
			strcpy(s,t);
		}
		puts(s);
	}
	exit(0);
}
5
11
5
21
0
 5
18
5
21
0
 5
18
5
1
0
 5
18
6
1
0
 5
28
6
1
0
 5
28
11
1
0
 5
28
3
1
0
 5
43
3
1
0
 5
43
3
0
0
 5
11
5
15
0

13112221
1113213211
 311311222118
1113213211
 311311222118
312211
 311311222118
13112221
 11131221121113122118
13112221
 11131221121113122118
3113112221232112111312211312113211
 11131221121113122118
1211
 11131221141113122113
1211
 11131221141113122113
3110
 13112221
311311222115

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

```c
char s[65536],t[65536];
int n,i,r,w,c,a;
int main()
{
	while(scanf("%d",&n),n){
		scanf("%s",s);
		for(i=0;i<n;++i){
			r=w=0;
			while(r<strlen(s)){
				a=s[r];
				for(c=0;s[r+c]==a;++c);
				sprintf(t+w,"%d\0",c);
				while(t[++w]);
				t[w++]=a;
				r+=c;
			}
			t[w]=0;
			strcpy(s,t);
		}
		puts(s);
	}
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 65536
t:
	.zero	65536
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.string	""
.LC2:
	.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
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	jmp	.L2
.L10:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L3
.L9:
	movl	$0, w(%rip)
	movl	w(%rip), %eax
	movl	%eax, r(%rip)
	jmp	.L4
.L8:
	movl	r(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, a(%rip)
	movl	$0, c(%rip)
	jmp	.L5
.L6:
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
.L5:
	movl	r(%rip), %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	a(%rip), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	c(%rip), %eax
	movl	w(%rip), %edx
	movslq	%edx, %rdx
	leaq	t(%rip), %rcx
	addq	%rdx, %rcx
	movl	%eax, %edx
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	nop
.L7:
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L7
	movl	a(%rip), %ecx
	movl	w(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, w(%rip)
	cltq
	leaq	t(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	r(%rip), %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	movl	%eax, r(%rip)
.L4:
	movl	r(%rip), %eax
	movslq	%eax, %rbx
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L8
	movl	w(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	movb	$0, (%rax,%rdx)
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L9
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %edi
	call	exit@PLT
	.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
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 65536
t:
	.zero	65536
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.string	""
.LC2:
	.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
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	jmp	.L2
.L10:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, i(%rip)
	jmp	.L3
.L9:
	movl	$0, w(%rip)
	movl	w(%rip), %eax
	movl	%eax, r(%rip)
	jmp	.L4
.L8:
	movl	r(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, a(%rip)
	movl	$0, c(%rip)
	jmp	.L5
.L6:
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
.L5:
	movl	r(%rip), %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	a(%rip), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	c(%rip), %eax
	movl	w(%rip), %edx
	movslq	%edx, %rdx
	leaq	t(%rip), %rcx
	addq	%rdx, %rcx
	movl	%eax, %edx
	leaq	.LC1(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	nop
.L7:
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L7
	movl	a(%rip), %ecx
	movl	w(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, w(%rip)
	cltq
	leaq	t(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	r(%rip), %edx
	movl	c(%rip), %eax
	addl	%edx, %eax
	movl	%eax, r(%rip)
.L4:
	movl	r(%rip), %eax
	movslq	%eax, %rbx
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L8
	movl	w(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	movb	$0, (%rax,%rdx)
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L9
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %edi
	call	exit@PLT
	.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:
