Given the following C code and 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);
}```

Assembly Code:

```assembly
	.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:
```

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"
	.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
```assembly
	.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:
```
```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);
}```
Given the following C 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);
}```

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
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 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);
}```

Assembly Code:

```assembly
	.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:
```

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"
	.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:
```