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>

int main(){
    int h, w, k;
    scanf("%d%d%d", &h, &w, &k);
    int t[h][w];
    int x = 1;
    for(int i=0; i<h; i++){
        char s[w+1];
        scanf("%s", s);
        for(int j=0; j<w; j++){
            if(s[j] == '.'){
                t[i][j] = -1;
            }else{
                t[i][j] = x;
                x++;
            }
        }
    }
    for(int i=0; i<h; i++){
        int buf = 0, id = -1;
        for(int j=0; j<w; j++){
            if(t[i][j] != -1){
                id = t[i][j];
                for(int l=buf; l<=j; l++){
                    t[i][l] = id;
                }
                buf = j+1;
            }
        }
        if(buf < w && id != -1){
            for(int l = w-1; l>=0; l--){
                if(t[i][l] != -1){
                    break;
                }
                t[i][l] = id;
            }
        }
    }
    if(t[0][0] == -1){
        int buf = 0;
        for(int i=0; i<h; i++){
            if(t[i][0] != -1){
                buf = i;
                break;
            }
        }
        for(int i=buf-1; i>=0; i--){
            for(int j=0; j<w; j++){
                t[i][j] = t[i+1][j];
            }
        }
    }
    for(int i=1; i<h; i++){
        if(t[i][0] == -1){
            for(int j=0; j<w; j++){
                t[i][j] = t[i-1][j];
            }
        }
    }
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            printf("%d", t[i][j]);
            if(j < w-1){
                printf(" ");
            }else{
                printf("\n");
            }
        }
    }

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%s"
.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -264(%rbp)
	leaq	-168(%rbp), %rcx
	leaq	-172(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-172(%rbp), %esi
	movl	-176(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%esi, %rax
	leaq	0(,%rax,4), %r12
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r8
	movq	-184(%rbp), %r9
	movq	%r9, %rdx
	movq	-208(%rbp), %r10
	movq	-200(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	-224(%rbp), %r9
	movq	-216(%rbp), %r10
	movq	%r10, %rdx
	imulq	%r14, %rdx
	movq	%r9, %rax
	imulq	%r15, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r9, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$1, -164(%rbp)
	movl	$0, -160(%rbp)
	jmp	.L5
.L13:
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	-172(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -256(%rbp)
	movq	$0, -248(%rbp)
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -156(%rbp)
	jmp	.L9
.L12:
	movq	-64(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$46, %al
	jne	.L10
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-156(%rbp), %edx
	movslq	%edx, %rsi
	movl	-160(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$-1, (%rax,%rdx,4)
	jmp	.L11
.L10:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-156(%rbp), %edx
	movslq	%edx, %rsi
	movl	-160(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-164(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -164(%rbp)
.L11:
	addl	$1, -156(%rbp)
.L9:
	movl	-172(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L12
	movq	%rbx, %rsp
	addl	$1, -160(%rbp)
.L5:
	movl	-176(%rbp), %eax
	cmpl	%eax, -160(%rbp)
	jl	.L13
	movl	$0, -152(%rbp)
	jmp	.L14
.L24:
	movl	$0, -148(%rbp)
	movl	$-1, -144(%rbp)
	movl	$0, -140(%rbp)
	jmp	.L15
.L19:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	je	.L16
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -144(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -136(%rbp)
	jmp	.L17
.L18:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-136(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-144(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -136(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cmpl	-140(%rbp), %eax
	jle	.L18
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -148(%rbp)
.L16:
	addl	$1, -140(%rbp)
.L15:
	movl	-172(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L19
	movl	-172(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jge	.L20
	cmpl	$-1, -144(%rbp)
	je	.L20
	movl	-172(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -132(%rbp)
	jmp	.L21
.L23:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L47
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-144(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	subl	$1, -132(%rbp)
.L21:
	cmpl	$0, -132(%rbp)
	jns	.L23
	jmp	.L20
.L47:
	nop
.L20:
	addl	$1, -152(%rbp)
.L14:
	movl	-176(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jl	.L24
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	jne	.L25
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	jmp	.L26
.L29:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	je	.L27
	movl	-124(%rbp), %eax
	movl	%eax, -128(%rbp)
	jmp	.L28
.L27:
	addl	$1, -124(%rbp)
.L26:
	movl	-176(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L29
.L28:
	movl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -120(%rbp)
	jmp	.L30
.L33:
	movl	$0, -116(%rbp)
	jmp	.L31
.L32:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movl	-120(%rbp), %eax
	leal	1(%rax), %edi
	movq	%r12, %rsi
	shrq	$2, %rsi
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %r8
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r8, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %ecx
	movslq	%ecx, %rdi
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdi, %rcx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -116(%rbp)
.L31:
	movl	-172(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L32
	subl	$1, -120(%rbp)
.L30:
	cmpl	$0, -120(%rbp)
	jns	.L33
.L25:
	movl	$1, -112(%rbp)
	jmp	.L34
.L38:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L35
	movl	$0, -108(%rbp)
	jmp	.L36
.L37:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movl	-112(%rbp), %eax
	leal	-1(%rax), %edi
	movq	%r12, %rsi
	shrq	$2, %rsi
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %r8
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r8, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %ecx
	movslq	%ecx, %rdi
	movl	-112(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdi, %rcx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -108(%rbp)
.L36:
	movl	-172(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L37
.L35:
	addl	$1, -112(%rbp)
.L34:
	movl	-176(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L38
	movl	$0, -104(%rbp)
	jmp	.L39
.L44:
	movl	$0, -100(%rbp)
	jmp	.L40
.L43:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rsi
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-172(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -100(%rbp)
	jge	.L41
	movl	$32, %edi
	call	putchar@PLT
	jmp	.L42
.L41:
	movl	$10, %edi
	call	putchar@PLT
.L42:
	addl	$1, -100(%rbp)
.L40:
	movl	-172(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L43
	addl	$1, -104(%rbp)
.L39:
	movl	-176(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L44
	movl	$0, %eax
	movq	-264(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	pushq	%r13
	leaq	-68(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rcx
	movslq	-68(%rbp), %rdx
	movq	%rsp, %rsi
	movl	%edx, -120(%rbp)
	imulq	%rcx, %rdx
	leaq	0(,%rcx,4), %rdi
	movq	%rcx, %rax
	movq	%rdi, -112(%rbp)
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L133:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L133
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L134
.L4:
	leaq	3(%rsp), %rbx
	movq	%rbx, %rdi
	andq	$-4, %rbx
	shrq	$2, %rdi
	cmpl	$0, -120(%rbp)
	movq	%rdi, -144(%rbp)
	jle	.L5
	movq	-112(%rbp), %rcx
	xorl	%edx, %edx
	movq	%rbx, -96(%rbp)
	movq	%rbx, %r14
	movq	%rbx, -128(%rbp)
	movl	$1, %r13d
	movl	%edx, %r15d
	movq	%rcx, %rdi
	movq	%rcx, %rbx
	shrq	$2, %rdi
	movq	%rdi, -104(%rbp)
	leaq	.LC1(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %eax
	movq	%rsp, %rsi
	movq	%rsp, %r12
	cltq
	addq	$15, %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L7
.L135:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L135
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	je	.L8
	orq	$0, -8(%rsp,%rcx)
.L8:
	movq	%rsp, %r9
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%r9, -88(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rsi
	leaq	.LC1(%rip), %rdi
	testl	%esi, %esi
	jle	.L9
	movq	-88(%rbp), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	cmpb	$46, (%r9,%rax)
	movl	$-1, %ecx
	je	.L10
	movl	%r13d, %ecx
	addl	$1, %r13d
.L10:
	movl	%ecx, (%r14,%rax,4)
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movl	-68(%rbp), %eax
	addl	$1, %r15d
	movq	%r12, %rsp
	addq	%rbx, %r14
	cmpl	%r15d, %eax
	jle	.L12
	movl	-64(%rbp), %eax
	jmp	.L13
.L12:
	movq	-96(%rbp), %r12
	movq	-128(%rbp), %rbx
	movl	%eax, -120(%rbp)
	testl	%eax, %eax
	jle	.L14
	movl	-64(%rbp), %eax
	movl	$0, -88(%rbp)
	xorl	%r15d, %r15d
	leal	-1(%rax), %r13d
	movl	%eax, -96(%rbp)
	movslq	%r13d, %rax
	movl	%r13d, %r13d
	leaq	0(,%rax,4), %rdi
	subq	%r13, %rax
	leaq	-4(,%rax,4), %rax
	movq	%rdi, -128(%rbp)
	movq	%rax, -136(%rbp)
	.p2align 4,,10
	.p2align 3
.L15:
	movl	-96(%rbp), %esi
	xorl	%edx, %edx
	movl	$-1, %eax
	xorl	%ecx, %ecx
	testl	%esi, %esi
	jle	.L27
	movslq	-88(%rbp), %r11
	imulq	-104(%rbp), %r11
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rsi
	cmpq	%rdx, %r13
	je	.L136
.L72:
	movq	%rsi, %rdx
.L23:
	movl	(%r12,%rdx,4), %r8d
	leal	1(%rdx), %r9d
	cmpl	$-1, %r8d
	je	.L16
	movl	%edx, %r14d
	cmpl	%edx, %ecx
	jg	.L21
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	1(%rax), %r10d
	cmpl	$2, %eax
	jbe	.L18
	movslq	%ecx, %rax
	movd	%r8d, %xmm1
	addq	%r15, %rax
	pshufd	$0, %xmm1, %xmm0
	leaq	(%rbx,%rax,4), %rsi
	movl	%r10d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %edi
	leaq	16(%rsi), %rax
	salq	$4, %rdi
	addq	%rax, %rdi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L137:
	addq	$16, %rax
.L19:
	movups	%xmm0, (%rsi)
	movq	%rax, %rsi
	cmpq	%rdi, %rax
	jne	.L137
	movl	%r10d, %eax
	andl	$-4, %eax
	addl	%eax, %ecx
	cmpl	%eax, %r10d
	je	.L21
.L18:
	movslq	%ecx, %rax
	addq	%r11, %rax
	movl	%r8d, (%rbx,%rax,4)
	leal	1(%rcx), %eax
	cmpl	%r14d, %eax
	jg	.L21
	cltq
	addl	$2, %ecx
	addq	%r11, %rax
	movl	%r8d, (%rbx,%rax,4)
	cmpl	%r14d, %ecx
	jg	.L21
	movslq	%ecx, %rcx
	addq	%r11, %rcx
	movl	%r8d, (%rbx,%rcx,4)
.L21:
	movl	%r8d, %eax
	movl	%r9d, %ecx
	leaq	1(%rdx), %rsi
	cmpq	%rdx, %r13
	jne	.L72
.L136:
	cmpl	-96(%rbp), %ecx
	jge	.L27
	cmpl	$-1, %eax
	je	.L27
	movq	-128(%rbp), %rdi
	leaq	(%r12,%rdi), %rdx
	movq	-136(%rbp), %rdi
	leaq	(%rdi,%r12), %rcx
	.p2align 4,,10
	.p2align 3
.L28:
	cmpl	$-1, (%rdx)
	jne	.L27
	movl	%eax, (%rdx)
	subq	$4, %rdx
	cmpq	%rcx, %rdx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-88(%rbp), %eax
	addq	-112(%rbp), %r12
	addq	-104(%rbp), %r15
	leal	1(%rax), %r14d
	cmpl	%r14d, -120(%rbp)
	je	.L138
	movl	%r14d, -88(%rbp)
	jmp	.L15
.L138:
	movq	-144(%rbp), %rax
	cmpl	$-1, 0(,%rax,4)
	je	.L139
.L30:
	cmpl	$1, %r14d
	jle	.L69
	movl	-96(%rbp), %edi
	movslq	%r14d, %r9
	movq	-104(%rbp), %r12
	movq	%rbx, %rcx
	leal	-1(%rdi), %edx
	movl	%edi, %eax
	movl	%edi, %r10d
	movq	-112(%rbp), %rdi
	andl	$-4, %r10d
	shrl	$2, %eax
	movq	%rdx, %r11
	leaq	-4(%rdi), %rsi
	leal	1(%r10), %r13d
	movslq	%r10d, %r15
	movq	%rsi, -88(%rbp)
	leal	-1(%rax), %r8d
	leal	2(%r10), %r14d
	movl	$1, %eax
	leaq	4(,%rdx,4), %rsi
	addq	$1, %r8
	movl	%r13d, -136(%rbp)
	movq	%rsi, -144(%rbp)
	movslq	%r13d, %rsi
	salq	$4, %r8
	movq	%rdi, %r13
	movq	%rsi, -112(%rbp)
	movslq	%r14d, %rsi
	movq	%rsi, -120(%rbp)
	movl	%r14d, -128(%rbp)
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L130:
	leaq	(%rcx,%r13), %rsi
.L56:
	addq	$1, %rax
	movq	%rsi, %rcx
	cmpq	%r9, %rax
	je	.L52
.L55:
	movslq	%eax, %rdx
	movslq	%eax, %rdi
	imulq	%r12, %rdx
	cmpl	$-1, (%rbx,%rdx,4)
	jne	.L130
	movl	-96(%rbp), %edx
	testl	%edx, %edx
	jle	.L130
	cmpq	$8, -88(%rbp)
	leal	-1(%rdi), %r14d
	jbe	.L57
	cmpl	$2, %r11d
	jbe	.L57
	leaq	0(%r13,%rcx), %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L58:
	movdqu	(%rcx,%rdx), %xmm3
	movups	%xmm3, (%rsi,%rdx)
	addq	$16, %rdx
	cmpq	%r8, %rdx
	jne	.L58
	cmpl	%r10d, -96(%rbp)
	je	.L56
	movslq	%r14d, %rdx
	imulq	%r12, %rdi
	imulq	%r12, %rdx
	leaq	(%r15,%rdi), %r14
	leaq	(%r15,%rdx), %rcx
	movl	(%rbx,%rcx,4), %ecx
	movl	%ecx, (%rbx,%r14,4)
	movl	-96(%rbp), %ecx
	cmpl	%ecx, -136(%rbp)
	jge	.L56
	movq	-112(%rbp), %r14
	leaq	(%r14,%rdx), %rcx
	movl	(%rbx,%rcx,4), %r14d
	movq	-112(%rbp), %rcx
	addq	%rdi, %rcx
	movl	%r14d, (%rbx,%rcx,4)
	movl	-96(%rbp), %ecx
	cmpl	%ecx, -128(%rbp)
	jge	.L56
	movq	-120(%rbp), %rcx
	addq	%rcx, %rdx
	addq	%rcx, %rdi
	movl	(%rbx,%rdx,4), %edx
	movl	%edx, (%rbx,%rdi,4)
	jmp	.L56
.L5:
	movq	-112(%rbp), %rax
	shrq	$2, %rax
	movq	%rax, -104(%rbp)
.L14:
	movl	-120(%rbp), %r14d
.L69:
	subl	$1, %r14d
	jne	.L53
	movl	-64(%rbp), %eax
	movl	%eax, -96(%rbp)
.L52:
	movq	-104(%rbp), %r14
	movl	-96(%rbp), %eax
	xorl	%r15d, %r15d
	leaq	.LC2(%rip), %r13
	salq	$2, %r14
	testl	%eax, %eax
	jle	.L53
	.p2align 4,,10
	.p2align 3
.L78:
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L67:
	movl	(%rbx,%r12,4), %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-64(%rbp), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%r12d, %eax
	jg	.L131
	movl	$10, %edi
.L131:
	call	putchar@PLT
	movl	-64(%rbp), %eax
	addq	$1, %r12
	cmpl	%r12d, %eax
	jg	.L67
	addl	$1, %r15d
	cmpl	%r15d, -68(%rbp)
	jle	.L53
	addq	%r14, %rbx
	testl	%eax, %eax
	jg	.L78
.L53:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L140
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L139:
	.cfi_restore_state
	movq	-104(%rbp), %rdi
	movl	-88(%rbp), %esi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%ecx, %rdx
	leal	1(%rdx), %ecx
	cmpl	%esi, %edx
	je	.L30
	movslq	%ecx, %rax
	imulq	%rdi, %rax
	cmpl	$-1, (%rbx,%rax,4)
	je	.L29
	cmpl	$0, -96(%rbp)
	jle	.L30
	leal	-1(%rdx), %r8d
	cmpl	$1, %edx
	jle	.L141
	movq	-104(%rbp), %rdi
	movq	-112(%rbp), %rsi
	leaq	-1(%rdx), %rcx
	movl	%r8d, %r13d
	movl	%r14d, -200(%rbp)
	xorl	%r15d, %r15d
	imulq	$-8, %rdi, %rax
	movq	%rsi, %r11
	movq	%rsi, %r12
	imulq	%rcx, %r12
	imulq	%rdi, %rcx
	movq	%rax, -160(%rbp)
	leaq	1(%rdx), %rax
	imulq	%rax, %r11
	imulq	%rdi, %rax
	movq	%rcx, -192(%rbp)
	movq	%rdi, %rcx
	imulq	%rsi, %rdx
	movq	%rcx, %r14
	imulq	$-2, %rdi, %rsi
	movq	%rax, -176(%rbp)
	subq	%rdi, %rax
	movq	%rax, -184(%rbp)
	movl	-96(%rbp), %eax
	movq	%rdx, %r10
	movq	%rsi, -168(%rbp)
	negq	%rsi
	leal	-1(%rax), %edi
	movq	%rsi, -208(%rbp)
	movl	%edi, -88(%rbp)
	movl	%eax, %edi
	shrl	$2, %edi
	movl	%edi, -120(%rbp)
	movl	%eax, %edi
	andl	$3, %eax
	andl	$-4, %edi
	movl	%eax, -196(%rbp)
	movl	%edi, -128(%rbp)
.L41:
	movq	-192(%rbp), %rdi
	movq	%r12, %rcx
	leaq	4(%r11), %rsi
	leal	1(%r13), %edx
	leal	2(%r13), %eax
	addq	%r15, %rdi
	movq	%rdi, -136(%rbp)
	movq	-176(%rbp), %rdi
	addq	%r15, %rdi
	movq	%rdi, -144(%rbp)
	movq	-184(%rbp), %rdi
	addq	%r15, %rdi
	movq	%rdi, -152(%rbp)
	leaq	4(%r10), %rdi
	subq	%rdi, %rcx
	cmpq	$8, %rcx
	movq	%r12, %rcx
	seta	%dil
	subq	%rsi, %rcx
	cmpq	$8, %rcx
	seta	%cl
	andl	%edi, %ecx
	cmpl	$1, -96(%rbp)
	setne	%dil
	testb	%dil, %cl
	je	.L50
	movq	%r10, %rcx
	subq	%rsi, %rcx
	cmpq	$8, %rcx
	jbe	.L50
	cmpl	$2, -88(%rbp)
	jbe	.L76
	leaq	(%rbx,%r11), %r9
	leaq	(%rbx,%r10), %r8
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	leaq	(%rbx,%r12), %rdi
.L35:
	movdqu	(%r9,%rcx), %xmm0
	addl	$1, %esi
	movups	%xmm0, (%r8,%rcx)
	movups	%xmm0, (%rdi,%rcx)
	addq	$16, %rcx
	cmpl	%esi, -120(%rbp)
	jne	.L35
	movl	-128(%rbp), %ecx
	cmpl	%ecx, -96(%rbp)
	je	.L40
	movl	-196(%rbp), %esi
	movl	%esi, %edi
	subl	$1, %esi
	movl	%ecx, %esi
	je	.L142
.L34:
	movq	-144(%rbp), %r8
	addq	%rsi, %r8
	movq	(%rbx,%r8,4), %r9
	movq	-152(%rbp), %r8
	addq	%rsi, %r8
	addq	-136(%rbp), %rsi
	movq	%r9, (%rbx,%r8,4)
	movq	%r9, (%rbx,%rsi,4)
	movl	%edi, %esi
	andl	$-2, %esi
	addl	%esi, %ecx
	cmpl	%edi, %esi
	je	.L40
.L37:
	cltq
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	imulq	%r14, %rax
	imulq	%r14, %rdx
	addq	%rcx, %rax
	movl	(%rbx,%rax,4), %eax
	addq	%rcx, %rdx
	movl	%eax, (%rbx,%rdx,4)
	movslq	%r13d, %rdx
	imulq	%r14, %rdx
	addq	%rdx, %rcx
	movl	%eax, (%rbx,%rcx,4)
.L40:
	movq	-160(%rbp), %rax
	leal	-1(%r13), %edx
	subl	$2, %r13d
	addq	-168(%rbp), %r15
	addq	%rax, %r12
	addq	%rax, %r11
	addq	%rax, %r10
	testl	%r13d, %r13d
	jg	.L41
	movl	-200(%rbp), %r14d
	leal	-1(%rdx), %r8d
.L32:
	movq	-112(%rbp), %rdi
	movl	-96(%rbp), %esi
	movslq	%edx, %rax
	movl	$4, %r12d
	leaq	1(%rax), %rcx
	movq	-104(%rbp), %r13
	subq	%rbx, %r12
	movl	%r14d, -168(%rbp)
	movq	%rdi, %r9
	imulq	%rdi, %rcx
	movl	%esi, %r11d
	movq	%r12, -120(%rbp)
	imulq	%rax, %r9
	movl	%esi, %eax
	andl	$-4, %r11d
	shrl	$2, %eax
	movl	%r11d, -128(%rbp)
	imulq	$-4, %r13, %r10
	movl	%r11d, %r15d
	leal	-1(%rax), %edi
	leal	1(%r11), %eax
	addl	$2, %r11d
	negq	%r13
	movl	%eax, -136(%rbp)
	movl	%esi, %eax
	addq	$1, %rdi
	movq	%r13, %r12
	movl	%r11d, -144(%rbp)
	movq	%rax, %r11
	movslq	%r15d, %r13
	movslq	-136(%rbp), %r15
	leaq	0(,%rax,4), %rsi
	addq	%rbx, %rcx
	salq	$4, %rdi
	movslq	-144(%rbp), %rax
	movq	%rsi, -160(%rbp)
	movq	%rax, -152(%rbp)
.L47:
	movq	-120(%rbp), %rax
	leal	1(%rdx), %r14d
	leaq	(%rax,%rcx), %rsi
	movq	%r9, %rax
	subq	%rsi, %rax
	cmpq	$8, %rax
	jbe	.L42
	cmpl	$2, -88(%rbp)
	jbe	.L42
	leaq	(%rbx,%r9), %rsi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L43:
	movdqu	(%rcx,%rax), %xmm2
	movups	%xmm2, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L43
	cmpl	-128(%rbp), %r11d
	je	.L46
	movslq	%r14d, %rax
	movq	-104(%rbp), %r14
	movslq	%edx, %rdx
	imulq	%r14, %rax
	imulq	%r14, %rdx
	leaq	0(%r13,%rax), %rsi
	movl	(%rbx,%rsi,4), %esi
	leaq	0(%r13,%rdx), %r14
	movl	%esi, (%rbx,%r14,4)
	cmpl	%r11d, -136(%rbp)
	jge	.L46
	leaq	(%r15,%rax), %rsi
	movl	(%rbx,%rsi,4), %r14d
	leaq	(%r15,%rdx), %rsi
	movl	%r14d, (%rbx,%rsi,4)
	cmpl	-144(%rbp), %r11d
	jle	.L46
	movq	-152(%rbp), %rsi
	addq	%rsi, %rax
	addq	%rsi, %rdx
	movl	(%rbx,%rax,4), %eax
	movl	%eax, (%rbx,%rdx,4)
.L46:
	movl	%r8d, %edx
	addq	%r10, %r9
	addq	%r10, %rcx
	cmpl	$-1, %r8d
	je	.L128
	subl	$1, %r8d
	jmp	.L47
.L57:
	movq	-144(%rbp), %rdi
	movq	%rcx, %rdx
	leaq	(%rdi,%rcx), %rsi
.L61:
	movl	(%rdx), %edi
	movl	%edi, (%rdx,%r12,4)
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	.L61
	jmp	.L130
.L134:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L42:
	movq	-160(%rbp), %rax
	leaq	(%rax,%rcx), %rdx
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L45:
	movl	(%rax), %esi
	movl	%esi, (%rax,%r12,4)
	addq	$4, %rax
	cmpq	%rdx, %rax
	jne	.L45
	jmp	.L46
.L128:
	movl	-168(%rbp), %r14d
	jmp	.L30
.L50:
	movslq	%r13d, %rax
	imulq	-112(%rbp), %rax
	xorl	%edx, %edx
	addq	%rbx, %rax
.L39:
	movq	-208(%rbp), %rdi
	addl	$1, %edx
	movl	(%rax,%rdi,4), %ecx
	movl	%ecx, (%rax,%r14,4)
	addq	$4, %rax
	movl	%ecx, -4(%rax)
	cmpl	%edx, -96(%rbp)
	jne	.L39
	jmp	.L40
.L141:
	movl	-96(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L32
.L142:
	movl	-128(%rbp), %ecx
	jmp	.L37
.L76:
	movl	-96(%rbp), %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L34
.L140:
	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	"%d%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	pushq	%r13
	leaq	-68(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rcx
	movslq	-68(%rbp), %rdx
	movq	%rsp, %rsi
	movl	%edx, -120(%rbp)
	imulq	%rcx, %rdx
	leaq	0(,%rcx,4), %rdi
	movq	%rcx, %rax
	movq	%rdi, -112(%rbp)
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L133:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L133
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L134
.L4:
	leaq	3(%rsp), %rbx
	movq	%rbx, %rdi
	andq	$-4, %rbx
	shrq	$2, %rdi
	cmpl	$0, -120(%rbp)
	movq	%rdi, -144(%rbp)
	jle	.L5
	movq	-112(%rbp), %rcx
	xorl	%edx, %edx
	movq	%rbx, -96(%rbp)
	movq	%rbx, %r14
	movq	%rbx, -128(%rbp)
	movl	$1, %r13d
	movl	%edx, %r15d
	movq	%rcx, %rdi
	movq	%rcx, %rbx
	shrq	$2, %rdi
	movq	%rdi, -104(%rbp)
	leaq	.LC1(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %eax
	movq	%rsp, %rsi
	movq	%rsp, %r12
	cltq
	addq	$15, %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L7
.L135:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L135
.L7:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	je	.L8
	orq	$0, -8(%rsp,%rcx)
.L8:
	movq	%rsp, %r9
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%r9, -88(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rsi
	leaq	.LC1(%rip), %rdi
	testl	%esi, %esi
	jle	.L9
	movq	-88(%rbp), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	cmpb	$46, (%r9,%rax)
	movl	$-1, %ecx
	je	.L10
	movl	%r13d, %ecx
	addl	$1, %r13d
.L10:
	movl	%ecx, (%r14,%rax,4)
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movl	-68(%rbp), %eax
	addl	$1, %r15d
	movq	%r12, %rsp
	addq	%rbx, %r14
	cmpl	%r15d, %eax
	jle	.L12
	movl	-64(%rbp), %eax
	jmp	.L13
.L12:
	movq	-96(%rbp), %r12
	movq	-128(%rbp), %rbx
	movl	%eax, -120(%rbp)
	testl	%eax, %eax
	jle	.L14
	movl	-64(%rbp), %eax
	movl	$0, -88(%rbp)
	xorl	%r15d, %r15d
	leal	-1(%rax), %r13d
	movl	%eax, -96(%rbp)
	movslq	%r13d, %rax
	movl	%r13d, %r13d
	leaq	0(,%rax,4), %rdi
	subq	%r13, %rax
	leaq	-4(,%rax,4), %rax
	movq	%rdi, -128(%rbp)
	movq	%rax, -136(%rbp)
	.p2align 4,,10
	.p2align 3
.L15:
	movl	-96(%rbp), %esi
	xorl	%edx, %edx
	movl	$-1, %eax
	xorl	%ecx, %ecx
	testl	%esi, %esi
	jle	.L27
	movslq	-88(%rbp), %r11
	imulq	-104(%rbp), %r11
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rsi
	cmpq	%rdx, %r13
	je	.L136
.L72:
	movq	%rsi, %rdx
.L23:
	movl	(%r12,%rdx,4), %r8d
	leal	1(%rdx), %r9d
	cmpl	$-1, %r8d
	je	.L16
	movl	%edx, %r14d
	cmpl	%edx, %ecx
	jg	.L21
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	1(%rax), %r10d
	cmpl	$2, %eax
	jbe	.L18
	movslq	%ecx, %rax
	movd	%r8d, %xmm1
	addq	%r15, %rax
	pshufd	$0, %xmm1, %xmm0
	leaq	(%rbx,%rax,4), %rsi
	movl	%r10d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %edi
	leaq	16(%rsi), %rax
	salq	$4, %rdi
	addq	%rax, %rdi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L137:
	addq	$16, %rax
.L19:
	movups	%xmm0, (%rsi)
	movq	%rax, %rsi
	cmpq	%rdi, %rax
	jne	.L137
	movl	%r10d, %eax
	andl	$-4, %eax
	addl	%eax, %ecx
	cmpl	%eax, %r10d
	je	.L21
.L18:
	movslq	%ecx, %rax
	addq	%r11, %rax
	movl	%r8d, (%rbx,%rax,4)
	leal	1(%rcx), %eax
	cmpl	%r14d, %eax
	jg	.L21
	cltq
	addl	$2, %ecx
	addq	%r11, %rax
	movl	%r8d, (%rbx,%rax,4)
	cmpl	%r14d, %ecx
	jg	.L21
	movslq	%ecx, %rcx
	addq	%r11, %rcx
	movl	%r8d, (%rbx,%rcx,4)
.L21:
	movl	%r8d, %eax
	movl	%r9d, %ecx
	leaq	1(%rdx), %rsi
	cmpq	%rdx, %r13
	jne	.L72
.L136:
	cmpl	-96(%rbp), %ecx
	jge	.L27
	cmpl	$-1, %eax
	je	.L27
	movq	-128(%rbp), %rdi
	leaq	(%r12,%rdi), %rdx
	movq	-136(%rbp), %rdi
	leaq	(%rdi,%r12), %rcx
	.p2align 4,,10
	.p2align 3
.L28:
	cmpl	$-1, (%rdx)
	jne	.L27
	movl	%eax, (%rdx)
	subq	$4, %rdx
	cmpq	%rcx, %rdx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-88(%rbp), %eax
	addq	-112(%rbp), %r12
	addq	-104(%rbp), %r15
	leal	1(%rax), %r14d
	cmpl	%r14d, -120(%rbp)
	je	.L138
	movl	%r14d, -88(%rbp)
	jmp	.L15
.L138:
	movq	-144(%rbp), %rax
	cmpl	$-1, 0(,%rax,4)
	je	.L139
.L30:
	cmpl	$1, %r14d
	jle	.L69
	movl	-96(%rbp), %edi
	movslq	%r14d, %r9
	movq	-104(%rbp), %r12
	movq	%rbx, %rcx
	leal	-1(%rdi), %edx
	movl	%edi, %eax
	movl	%edi, %r10d
	movq	-112(%rbp), %rdi
	andl	$-4, %r10d
	shrl	$2, %eax
	movq	%rdx, %r11
	leaq	-4(%rdi), %rsi
	leal	1(%r10), %r13d
	movslq	%r10d, %r15
	movq	%rsi, -88(%rbp)
	leal	-1(%rax), %r8d
	leal	2(%r10), %r14d
	movl	$1, %eax
	leaq	4(,%rdx,4), %rsi
	addq	$1, %r8
	movl	%r13d, -136(%rbp)
	movq	%rsi, -144(%rbp)
	movslq	%r13d, %rsi
	salq	$4, %r8
	movq	%rdi, %r13
	movq	%rsi, -112(%rbp)
	movslq	%r14d, %rsi
	movq	%rsi, -120(%rbp)
	movl	%r14d, -128(%rbp)
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L130:
	leaq	(%rcx,%r13), %rsi
.L56:
	addq	$1, %rax
	movq	%rsi, %rcx
	cmpq	%r9, %rax
	je	.L52
.L55:
	movslq	%eax, %rdx
	movslq	%eax, %rdi
	imulq	%r12, %rdx
	cmpl	$-1, (%rbx,%rdx,4)
	jne	.L130
	movl	-96(%rbp), %edx
	testl	%edx, %edx
	jle	.L130
	cmpq	$8, -88(%rbp)
	leal	-1(%rdi), %r14d
	jbe	.L57
	cmpl	$2, %r11d
	jbe	.L57
	leaq	0(%r13,%rcx), %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L58:
	movdqu	(%rcx,%rdx), %xmm3
	movups	%xmm3, (%rsi,%rdx)
	addq	$16, %rdx
	cmpq	%r8, %rdx
	jne	.L58
	cmpl	%r10d, -96(%rbp)
	je	.L56
	movslq	%r14d, %rdx
	imulq	%r12, %rdi
	imulq	%r12, %rdx
	leaq	(%r15,%rdi), %r14
	leaq	(%r15,%rdx), %rcx
	movl	(%rbx,%rcx,4), %ecx
	movl	%ecx, (%rbx,%r14,4)
	movl	-96(%rbp), %ecx
	cmpl	%ecx, -136(%rbp)
	jge	.L56
	movq	-112(%rbp), %r14
	leaq	(%r14,%rdx), %rcx
	movl	(%rbx,%rcx,4), %r14d
	movq	-112(%rbp), %rcx
	addq	%rdi, %rcx
	movl	%r14d, (%rbx,%rcx,4)
	movl	-96(%rbp), %ecx
	cmpl	%ecx, -128(%rbp)
	jge	.L56
	movq	-120(%rbp), %rcx
	addq	%rcx, %rdx
	addq	%rcx, %rdi
	movl	(%rbx,%rdx,4), %edx
	movl	%edx, (%rbx,%rdi,4)
	jmp	.L56
.L5:
	movq	-112(%rbp), %rax
	shrq	$2, %rax
	movq	%rax, -104(%rbp)
.L14:
	movl	-120(%rbp), %r14d
.L69:
	subl	$1, %r14d
	jne	.L53
	movl	-64(%rbp), %eax
	movl	%eax, -96(%rbp)
.L52:
	movq	-104(%rbp), %r14
	movl	-96(%rbp), %eax
	xorl	%r15d, %r15d
	leaq	.LC2(%rip), %r13
	salq	$2, %r14
	testl	%eax, %eax
	jle	.L53
	.p2align 4,,10
	.p2align 3
.L78:
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L67:
	movl	(%rbx,%r12,4), %edx
	movl	$1, %edi
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-64(%rbp), %eax
	movl	$32, %edi
	subl	$1, %eax
	cmpl	%r12d, %eax
	jg	.L131
	movl	$10, %edi
.L131:
	call	putchar@PLT
	movl	-64(%rbp), %eax
	addq	$1, %r12
	cmpl	%r12d, %eax
	jg	.L67
	addl	$1, %r15d
	cmpl	%r15d, -68(%rbp)
	jle	.L53
	addq	%r14, %rbx
	testl	%eax, %eax
	jg	.L78
.L53:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L140
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L139:
	.cfi_restore_state
	movq	-104(%rbp), %rdi
	movl	-88(%rbp), %esi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%ecx, %rdx
	leal	1(%rdx), %ecx
	cmpl	%esi, %edx
	je	.L30
	movslq	%ecx, %rax
	imulq	%rdi, %rax
	cmpl	$-1, (%rbx,%rax,4)
	je	.L29
	cmpl	$0, -96(%rbp)
	jle	.L30
	leal	-1(%rdx), %r8d
	cmpl	$1, %edx
	jle	.L141
	movq	-104(%rbp), %rdi
	movq	-112(%rbp), %rsi
	leaq	-1(%rdx), %rcx
	movl	%r8d, %r13d
	movl	%r14d, -200(%rbp)
	xorl	%r15d, %r15d
	imulq	$-8, %rdi, %rax
	movq	%rsi, %r11
	movq	%rsi, %r12
	imulq	%rcx, %r12
	imulq	%rdi, %rcx
	movq	%rax, -160(%rbp)
	leaq	1(%rdx), %rax
	imulq	%rax, %r11
	imulq	%rdi, %rax
	movq	%rcx, -192(%rbp)
	movq	%rdi, %rcx
	imulq	%rsi, %rdx
	movq	%rcx, %r14
	imulq	$-2, %rdi, %rsi
	movq	%rax, -176(%rbp)
	subq	%rdi, %rax
	movq	%rax, -184(%rbp)
	movl	-96(%rbp), %eax
	movq	%rdx, %r10
	movq	%rsi, -168(%rbp)
	negq	%rsi
	leal	-1(%rax), %edi
	movq	%rsi, -208(%rbp)
	movl	%edi, -88(%rbp)
	movl	%eax, %edi
	shrl	$2, %edi
	movl	%edi, -120(%rbp)
	movl	%eax, %edi
	andl	$3, %eax
	andl	$-4, %edi
	movl	%eax, -196(%rbp)
	movl	%edi, -128(%rbp)
.L41:
	movq	-192(%rbp), %rdi
	movq	%r12, %rcx
	leaq	4(%r11), %rsi
	leal	1(%r13), %edx
	leal	2(%r13), %eax
	addq	%r15, %rdi
	movq	%rdi, -136(%rbp)
	movq	-176(%rbp), %rdi
	addq	%r15, %rdi
	movq	%rdi, -144(%rbp)
	movq	-184(%rbp), %rdi
	addq	%r15, %rdi
	movq	%rdi, -152(%rbp)
	leaq	4(%r10), %rdi
	subq	%rdi, %rcx
	cmpq	$8, %rcx
	movq	%r12, %rcx
	seta	%dil
	subq	%rsi, %rcx
	cmpq	$8, %rcx
	seta	%cl
	andl	%edi, %ecx
	cmpl	$1, -96(%rbp)
	setne	%dil
	testb	%dil, %cl
	je	.L50
	movq	%r10, %rcx
	subq	%rsi, %rcx
	cmpq	$8, %rcx
	jbe	.L50
	cmpl	$2, -88(%rbp)
	jbe	.L76
	leaq	(%rbx,%r11), %r9
	leaq	(%rbx,%r10), %r8
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	leaq	(%rbx,%r12), %rdi
.L35:
	movdqu	(%r9,%rcx), %xmm0
	addl	$1, %esi
	movups	%xmm0, (%r8,%rcx)
	movups	%xmm0, (%rdi,%rcx)
	addq	$16, %rcx
	cmpl	%esi, -120(%rbp)
	jne	.L35
	movl	-128(%rbp), %ecx
	cmpl	%ecx, -96(%rbp)
	je	.L40
	movl	-196(%rbp), %esi
	movl	%esi, %edi
	subl	$1, %esi
	movl	%ecx, %esi
	je	.L142
.L34:
	movq	-144(%rbp), %r8
	addq	%rsi, %r8
	movq	(%rbx,%r8,4), %r9
	movq	-152(%rbp), %r8
	addq	%rsi, %r8
	addq	-136(%rbp), %rsi
	movq	%r9, (%rbx,%r8,4)
	movq	%r9, (%rbx,%rsi,4)
	movl	%edi, %esi
	andl	$-2, %esi
	addl	%esi, %ecx
	cmpl	%edi, %esi
	je	.L40
.L37:
	cltq
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	imulq	%r14, %rax
	imulq	%r14, %rdx
	addq	%rcx, %rax
	movl	(%rbx,%rax,4), %eax
	addq	%rcx, %rdx
	movl	%eax, (%rbx,%rdx,4)
	movslq	%r13d, %rdx
	imulq	%r14, %rdx
	addq	%rdx, %rcx
	movl	%eax, (%rbx,%rcx,4)
.L40:
	movq	-160(%rbp), %rax
	leal	-1(%r13), %edx
	subl	$2, %r13d
	addq	-168(%rbp), %r15
	addq	%rax, %r12
	addq	%rax, %r11
	addq	%rax, %r10
	testl	%r13d, %r13d
	jg	.L41
	movl	-200(%rbp), %r14d
	leal	-1(%rdx), %r8d
.L32:
	movq	-112(%rbp), %rdi
	movl	-96(%rbp), %esi
	movslq	%edx, %rax
	movl	$4, %r12d
	leaq	1(%rax), %rcx
	movq	-104(%rbp), %r13
	subq	%rbx, %r12
	movl	%r14d, -168(%rbp)
	movq	%rdi, %r9
	imulq	%rdi, %rcx
	movl	%esi, %r11d
	movq	%r12, -120(%rbp)
	imulq	%rax, %r9
	movl	%esi, %eax
	andl	$-4, %r11d
	shrl	$2, %eax
	movl	%r11d, -128(%rbp)
	imulq	$-4, %r13, %r10
	movl	%r11d, %r15d
	leal	-1(%rax), %edi
	leal	1(%r11), %eax
	addl	$2, %r11d
	negq	%r13
	movl	%eax, -136(%rbp)
	movl	%esi, %eax
	addq	$1, %rdi
	movq	%r13, %r12
	movl	%r11d, -144(%rbp)
	movq	%rax, %r11
	movslq	%r15d, %r13
	movslq	-136(%rbp), %r15
	leaq	0(,%rax,4), %rsi
	addq	%rbx, %rcx
	salq	$4, %rdi
	movslq	-144(%rbp), %rax
	movq	%rsi, -160(%rbp)
	movq	%rax, -152(%rbp)
.L47:
	movq	-120(%rbp), %rax
	leal	1(%rdx), %r14d
	leaq	(%rax,%rcx), %rsi
	movq	%r9, %rax
	subq	%rsi, %rax
	cmpq	$8, %rax
	jbe	.L42
	cmpl	$2, -88(%rbp)
	jbe	.L42
	leaq	(%rbx,%r9), %rsi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L43:
	movdqu	(%rcx,%rax), %xmm2
	movups	%xmm2, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L43
	cmpl	-128(%rbp), %r11d
	je	.L46
	movslq	%r14d, %rax
	movq	-104(%rbp), %r14
	movslq	%edx, %rdx
	imulq	%r14, %rax
	imulq	%r14, %rdx
	leaq	0(%r13,%rax), %rsi
	movl	(%rbx,%rsi,4), %esi
	leaq	0(%r13,%rdx), %r14
	movl	%esi, (%rbx,%r14,4)
	cmpl	%r11d, -136(%rbp)
	jge	.L46
	leaq	(%r15,%rax), %rsi
	movl	(%rbx,%rsi,4), %r14d
	leaq	(%r15,%rdx), %rsi
	movl	%r14d, (%rbx,%rsi,4)
	cmpl	-144(%rbp), %r11d
	jle	.L46
	movq	-152(%rbp), %rsi
	addq	%rsi, %rax
	addq	%rsi, %rdx
	movl	(%rbx,%rax,4), %eax
	movl	%eax, (%rbx,%rdx,4)
.L46:
	movl	%r8d, %edx
	addq	%r10, %r9
	addq	%r10, %rcx
	cmpl	$-1, %r8d
	je	.L128
	subl	$1, %r8d
	jmp	.L47
.L57:
	movq	-144(%rbp), %rdi
	movq	%rcx, %rdx
	leaq	(%rdi,%rcx), %rsi
.L61:
	movl	(%rdx), %edi
	movl	%edi, (%rdx,%r12,4)
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	.L61
	jmp	.L130
.L134:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L42:
	movq	-160(%rbp), %rax
	leaq	(%rax,%rcx), %rdx
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L45:
	movl	(%rax), %esi
	movl	%esi, (%rax,%r12,4)
	addq	$4, %rax
	cmpq	%rdx, %rax
	jne	.L45
	jmp	.L46
.L128:
	movl	-168(%rbp), %r14d
	jmp	.L30
.L50:
	movslq	%r13d, %rax
	imulq	-112(%rbp), %rax
	xorl	%edx, %edx
	addq	%rbx, %rax
.L39:
	movq	-208(%rbp), %rdi
	addl	$1, %edx
	movl	(%rax,%rdi,4), %ecx
	movl	%ecx, (%rax,%r14,4)
	addq	$4, %rax
	movl	%ecx, -4(%rax)
	cmpl	%edx, -96(%rbp)
	jne	.L39
	jmp	.L40
.L141:
	movl	-96(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L32
.L142:
	movl	-128(%rbp), %ecx
	jmp	.L37
.L76:
	movl	-96(%rbp), %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L34
.L140:
	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>

int main(){
    int h, w, k;
    scanf("%d%d%d", &h, &w, &k);
    int t[h][w];
    int x = 1;
    for(int i=0; i<h; i++){
        char s[w+1];
        scanf("%s", s);
        for(int j=0; j<w; j++){
            if(s[j] == '.'){
                t[i][j] = -1;
            }else{
                t[i][j] = x;
                x++;
            }
        }
    }
    for(int i=0; i<h; i++){
        int buf = 0, id = -1;
        for(int j=0; j<w; j++){
            if(t[i][j] != -1){
                id = t[i][j];
                for(int l=buf; l<=j; l++){
                    t[i][l] = id;
                }
                buf = j+1;
            }
        }
        if(buf < w && id != -1){
            for(int l = w-1; l>=0; l--){
                if(t[i][l] != -1){
                    break;
                }
                t[i][l] = id;
            }
        }
    }
    if(t[0][0] == -1){
        int buf = 0;
        for(int i=0; i<h; i++){
            if(t[i][0] != -1){
                buf = i;
                break;
            }
        }
        for(int i=buf-1; i>=0; i--){
            for(int j=0; j<w; j++){
                t[i][j] = t[i+1][j];
            }
        }
    }
    for(int i=1; i<h; i++){
        if(t[i][0] == -1){
            for(int j=0; j<w; j++){
                t[i][j] = t[i-1][j];
            }
        }
    }
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            printf("%d", t[i][j]);
            if(j < w-1){
                printf(" ");
            }else{
                printf("\n");
            }
        }
    }

    return 0;
}
13 21 106
.....................
.####.####.####.####.
..#.#..#.$.#....#....
..#.#..#.#.#....#....
..#.#..#.#.#....#....
.####.####.####.####.
.....................
.####.####.####.####.
....#.#..#....#.#..#.
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 3 7 7
...#.#
..#./.#
.#..#..
 13 21 106
.....................
.####.####.####.####.
..#.#..#.$.#....#....
..#.#..#.#.#....#....
....#....#.#.#..#.#..
.####.####.####.####.
.....................
.####.####.####.####.
....#.#..#....#.#..#.
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 13 21 106
.....................
.####.####.####.###$.
..#.#..#.$.#....#....
..#.#..#.#.#....#....
....#....#.#.#..#.#..
.####.####.####.####.
.....................
.####.####.####.####.
....#.#..#....#.#..#.
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 13 21 106
.....................
.####.####.####.###$.
..#.#..#.$.#....#....
..#.#..#.#...#..#....
....#....#.#.#.-#.#-.
.####.####.####.####.
.....................
.####.####.####.####.
....#-#..#....#.#..#.
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 13 21 106
.....................
.####.####.####.###$.
..#.#..#.$.#....#....
..#.#..#.#...#..#....
....#....#.#.#.-#.#-.
.####.####.####.####.
.....................
.####.####.####.####.
.#..#.#....#..#-#....
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 13 21 106
.....................
.####.####.####.####.
..#.#..#.#.#....#....
..#.#..#.#.#....#....
....#....#.#.#..#.#..
.####.####.####.####.
.....................
.####.####.####.####.
....#.#..#....#.#..#.
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 3 3 4
.#
.#.
.#
 13 21 106
.....................
.####.####.####.####.
..#.#..#.$.#....#....
..#.#..#.#.#....#....
....#....#.#.#..#.#..
.####.####.####.##$#.
.....................
.####.####.####.####.
....#.#..#....#.#..#.
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................
 13 21 106
.....................
.####.####.####.###$.
..#.#..#.$.#....#....
..#.#..#.#.#....#....
....#....#.#.#.-#.#..
.####.####.####.####.
.....................
.####.####.####.####.
.#..#.#....#..#.#....
.####.#..#.####.#..#.
.#....#..#.#....#..#.
.####.####.####.####.
.....................

1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 28 28 28 28 28 28 28 28 28
29 29 29 30 30 31 31 31 32 32 33 33 34 34 34 34 34 34 34 34 34
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
51 51 52 53 54 55 55 56 57 58 59 59 60 61 62 63 63 64 65 66 66
67 67 67 67 67 68 68 69 69 69 70 70 70 70 70 71 71 72 72 72 72
73 73 74 75 76 77 77 78 78 78 79 79 80 81 82 83 83 84 84 84 84
85 85 86 86 86 86 86 87 87 87 88 88 89 89 89 89 89 90 90 90 90
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
 1 1 1 1 2 2 3
4 4 4 5 5 6 6
7 7 8 8 8 8 8
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 28 28 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 33 34 34 34 34
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
51 51 52 53 54 55 55 56 57 58 59 59 60 61 62 63 63 64 65 66 66
67 67 67 67 67 68 68 69 69 69 70 70 70 70 70 71 71 72 72 72 72
73 73 74 75 76 77 77 78 78 78 79 79 80 81 82 83 83 84 84 84 84
85 85 86 86 86 86 86 87 87 87 88 88 89 89 89 89 89 90 90 90 90
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 28 28 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 33 34 34 34 34
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
51 51 52 53 54 55 55 56 57 58 59 59 60 61 62 63 63 64 65 66 66
67 67 67 67 67 68 68 69 69 69 70 70 70 70 70 71 71 72 72 72 72
73 73 74 75 76 77 77 78 78 78 79 79 80 81 82 83 83 84 84 84 84
85 85 86 86 86 86 86 87 87 87 88 88 89 89 89 89 89 90 90 90 90
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 27 27 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 34 35 35 36 36
37 37 38 39 40 41 41 42 43 44 45 45 46 47 48 49 49 50 51 52 52
37 37 38 39 40 41 41 42 43 44 45 45 46 47 48 49 49 50 51 52 52
53 53 54 55 56 57 57 58 59 60 61 61 62 63 64 65 65 66 67 68 68
69 69 69 69 69 70 71 72 72 72 73 73 73 73 73 74 74 75 75 75 75
76 76 77 78 79 80 80 81 81 81 82 82 83 84 85 86 86 87 87 87 87
88 88 89 89 89 89 89 90 90 90 91 91 92 92 92 92 92 93 93 93 93
94 94 95 96 97 98 98 99 100 101 102 102 103 104 105 106 106 107 108 109 109
94 94 95 96 97 98 98 99 100 101 102 102 103 104 105 106 106 107 108 109 109
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 27 27 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 34 35 35 36 36
37 37 38 39 40 41 41 42 43 44 45 45 46 47 48 49 49 50 51 52 52
37 37 38 39 40 41 41 42 43 44 45 45 46 47 48 49 49 50 51 52 52
53 53 54 55 56 57 57 58 59 60 61 61 62 63 64 65 65 66 67 68 68
69 69 70 70 70 71 71 72 72 72 72 72 73 73 73 74 75 75 75 75 75
76 76 77 78 79 80 80 81 81 81 82 82 83 84 85 86 86 87 87 87 87
88 88 89 89 89 89 89 90 90 90 91 91 92 92 92 92 92 93 93 93 93
94 94 95 96 97 98 98 99 100 101 102 102 103 104 105 106 106 107 108 109 109
94 94 95 96 97 98 98 99 100 101 102 102 103 104 105 106 106 107 108 109 109
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 28 28 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 33 34 34 34 34
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
51 51 52 53 54 55 55 56 57 58 59 59 60 61 62 63 63 64 65 66 66
67 67 67 67 67 68 68 69 69 69 70 70 70 70 70 71 71 72 72 72 72
73 73 74 75 76 77 77 78 78 78 79 79 80 81 82 83 83 84 84 84 84
85 85 86 86 86 86 86 87 87 87 88 88 89 89 89 89 89 90 90 90 90
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
 1 1 2
3 3 3
4 4 5
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 28 28 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 33 34 34 34 34
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
35 35 36 37 38 39 39 40 41 42 43 43 44 45 46 47 47 48 49 50 50
51 51 52 53 54 55 55 56 57 58 59 59 60 61 62 63 63 64 65 66 66
67 67 67 67 67 68 68 69 69 69 70 70 70 70 70 71 71 72 72 72 72
73 73 74 75 76 77 77 78 78 78 79 79 80 81 82 83 83 84 84 84 84
85 85 86 86 86 86 86 87 87 87 88 88 89 89 89 89 89 90 90 90 90
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
91 91 92 93 94 95 95 96 97 98 99 99 100 101 102 103 103 104 105 106 106
 1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
1 1 2 3 4 5 5 6 7 8 9 9 10 11 12 13 13 14 15 16 16
17 17 17 18 18 19 19 19 20 20 21 21 22 22 22 22 22 22 22 22 22
23 23 23 24 24 25 25 25 26 26 27 27 28 28 28 28 28 28 28 28 28
29 29 29 29 29 30 30 30 30 30 31 31 32 32 33 33 34 35 35 35 35
36 36 37 38 39 40 40 41 42 43 44 44 45 46 47 48 48 49 50 51 51
36 36 37 38 39 40 40 41 42 43 44 44 45 46 47 48 48 49 50 51 51
52 52 53 54 55 56 56 57 58 59 60 60 61 62 63 64 64 65 66 67 67
68 68 69 69 69 70 70 71 71 71 71 71 72 72 72 73 73 73 73 73 73
74 74 75 76 77 78 78 79 79 79 80 80 81 82 83 84 84 85 85 85 85
86 86 87 87 87 87 87 88 88 88 89 89 90 90 90 90 90 91 91 91 91
92 92 93 94 95 96 96 97 98 99 100 100 101 102 103 104 104 105 106 107 107
92 92 93 94 95 96 96 97 98 99 100 100 101 102 103 104 104 105 106 107 107

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>

int main(){
    int h, w, k;
    scanf("%d%d%d", &h, &w, &k);
    int t[h][w];
    int x = 1;
    for(int i=0; i<h; i++){
        char s[w+1];
        scanf("%s", s);
        for(int j=0; j<w; j++){
            if(s[j] == '.'){
                t[i][j] = -1;
            }else{
                t[i][j] = x;
                x++;
            }
        }
    }
    for(int i=0; i<h; i++){
        int buf = 0, id = -1;
        for(int j=0; j<w; j++){
            if(t[i][j] != -1){
                id = t[i][j];
                for(int l=buf; l<=j; l++){
                    t[i][l] = id;
                }
                buf = j+1;
            }
        }
        if(buf < w && id != -1){
            for(int l = w-1; l>=0; l--){
                if(t[i][l] != -1){
                    break;
                }
                t[i][l] = id;
            }
        }
    }
    if(t[0][0] == -1){
        int buf = 0;
        for(int i=0; i<h; i++){
            if(t[i][0] != -1){
                buf = i;
                break;
            }
        }
        for(int i=buf-1; i>=0; i--){
            for(int j=0; j<w; j++){
                t[i][j] = t[i+1][j];
            }
        }
    }
    for(int i=1; i<h; i++){
        if(t[i][0] == -1){
            for(int j=0; j<w; j++){
                t[i][j] = t[i-1][j];
            }
        }
    }
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            printf("%d", t[i][j]);
            if(j < w-1){
                printf(" ");
            }else{
                printf("\n");
            }
        }
    }

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%s"
.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -264(%rbp)
	leaq	-168(%rbp), %rcx
	leaq	-172(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-172(%rbp), %esi
	movl	-176(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%esi, %rax
	leaq	0(,%rax,4), %r12
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r8
	movq	-184(%rbp), %r9
	movq	%r9, %rdx
	movq	-208(%rbp), %r10
	movq	-200(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	-224(%rbp), %r9
	movq	-216(%rbp), %r10
	movq	%r10, %rdx
	imulq	%r14, %rdx
	movq	%r9, %rax
	imulq	%r15, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r9, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$1, -164(%rbp)
	movl	$0, -160(%rbp)
	jmp	.L5
.L13:
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	-172(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -256(%rbp)
	movq	$0, -248(%rbp)
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -156(%rbp)
	jmp	.L9
.L12:
	movq	-64(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$46, %al
	jne	.L10
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-156(%rbp), %edx
	movslq	%edx, %rsi
	movl	-160(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$-1, (%rax,%rdx,4)
	jmp	.L11
.L10:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-156(%rbp), %edx
	movslq	%edx, %rsi
	movl	-160(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-164(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -164(%rbp)
.L11:
	addl	$1, -156(%rbp)
.L9:
	movl	-172(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L12
	movq	%rbx, %rsp
	addl	$1, -160(%rbp)
.L5:
	movl	-176(%rbp), %eax
	cmpl	%eax, -160(%rbp)
	jl	.L13
	movl	$0, -152(%rbp)
	jmp	.L14
.L24:
	movl	$0, -148(%rbp)
	movl	$-1, -144(%rbp)
	movl	$0, -140(%rbp)
	jmp	.L15
.L19:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	je	.L16
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -144(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -136(%rbp)
	jmp	.L17
.L18:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-136(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-144(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -136(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cmpl	-140(%rbp), %eax
	jle	.L18
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -148(%rbp)
.L16:
	addl	$1, -140(%rbp)
.L15:
	movl	-172(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L19
	movl	-172(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jge	.L20
	cmpl	$-1, -144(%rbp)
	je	.L20
	movl	-172(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -132(%rbp)
	jmp	.L21
.L23:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L47
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-144(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	subl	$1, -132(%rbp)
.L21:
	cmpl	$0, -132(%rbp)
	jns	.L23
	jmp	.L20
.L47:
	nop
.L20:
	addl	$1, -152(%rbp)
.L14:
	movl	-176(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jl	.L24
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	jne	.L25
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	jmp	.L26
.L29:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	je	.L27
	movl	-124(%rbp), %eax
	movl	%eax, -128(%rbp)
	jmp	.L28
.L27:
	addl	$1, -124(%rbp)
.L26:
	movl	-176(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L29
.L28:
	movl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -120(%rbp)
	jmp	.L30
.L33:
	movl	$0, -116(%rbp)
	jmp	.L31
.L32:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movl	-120(%rbp), %eax
	leal	1(%rax), %edi
	movq	%r12, %rsi
	shrq	$2, %rsi
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %r8
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r8, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %ecx
	movslq	%ecx, %rdi
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdi, %rcx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -116(%rbp)
.L31:
	movl	-172(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L32
	subl	$1, -120(%rbp)
.L30:
	cmpl	$0, -120(%rbp)
	jns	.L33
.L25:
	movl	$1, -112(%rbp)
	jmp	.L34
.L38:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L35
	movl	$0, -108(%rbp)
	jmp	.L36
.L37:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movl	-112(%rbp), %eax
	leal	-1(%rax), %edi
	movq	%r12, %rsi
	shrq	$2, %rsi
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %r8
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r8, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %ecx
	movslq	%ecx, %rdi
	movl	-112(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdi, %rcx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -108(%rbp)
.L36:
	movl	-172(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L37
.L35:
	addl	$1, -112(%rbp)
.L34:
	movl	-176(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L38
	movl	$0, -104(%rbp)
	jmp	.L39
.L44:
	movl	$0, -100(%rbp)
	jmp	.L40
.L43:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rsi
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-172(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -100(%rbp)
	jge	.L41
	movl	$32, %edi
	call	putchar@PLT
	jmp	.L42
.L41:
	movl	$10, %edi
	call	putchar@PLT
.L42:
	addl	$1, -100(%rbp)
.L40:
	movl	-172(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L43
	addl	$1, -104(%rbp)
.L39:
	movl	-176(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L44
	movl	$0, %eax
	movq	-264(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d%d%d"
.LC1:
	.string	"%s"
.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -264(%rbp)
	leaq	-168(%rbp), %rcx
	leaq	-172(%rbp), %rdx
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-172(%rbp), %esi
	movl	-176(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movslq	%esi, %rax
	leaq	0(,%rax,4), %r12
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r8
	movq	-184(%rbp), %r9
	movq	%r9, %rdx
	movq	-208(%rbp), %r10
	movq	-200(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movslq	%edi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	-224(%rbp), %r9
	movq	-216(%rbp), %r10
	movq	%r10, %rdx
	imulq	%r14, %rdx
	movq	%r9, %rax
	imulq	%r15, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r9, %rax
	mulq	%r14
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$1, -164(%rbp)
	movl	$0, -160(%rbp)
	jmp	.L5
.L13:
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	-172(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -240(%rbp)
	movq	$0, -232(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -256(%rbp)
	movq	$0, -248(%rbp)
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -156(%rbp)
	jmp	.L9
.L12:
	movq	-64(%rbp), %rdx
	movl	-156(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$46, %al
	jne	.L10
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-156(%rbp), %edx
	movslq	%edx, %rsi
	movl	-160(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$-1, (%rax,%rdx,4)
	jmp	.L11
.L10:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-156(%rbp), %edx
	movslq	%edx, %rsi
	movl	-160(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-164(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -164(%rbp)
.L11:
	addl	$1, -156(%rbp)
.L9:
	movl	-172(%rbp), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L12
	movq	%rbx, %rsp
	addl	$1, -160(%rbp)
.L5:
	movl	-176(%rbp), %eax
	cmpl	%eax, -160(%rbp)
	jl	.L13
	movl	$0, -152(%rbp)
	jmp	.L14
.L24:
	movl	$0, -148(%rbp)
	movl	$-1, -144(%rbp)
	movl	$0, -140(%rbp)
	jmp	.L15
.L19:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	je	.L16
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-140(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -144(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -136(%rbp)
	jmp	.L17
.L18:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-136(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-144(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -136(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cmpl	-140(%rbp), %eax
	jle	.L18
	movl	-140(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -148(%rbp)
.L16:
	addl	$1, -140(%rbp)
.L15:
	movl	-172(%rbp), %eax
	cmpl	%eax, -140(%rbp)
	jl	.L19
	movl	-172(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jge	.L20
	cmpl	$-1, -144(%rbp)
	je	.L20
	movl	-172(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -132(%rbp)
	jmp	.L21
.L23:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L47
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-132(%rbp), %edx
	movslq	%edx, %rsi
	movl	-152(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	leaq	(%rsi,%rdx), %rcx
	movl	-144(%rbp), %edx
	movl	%edx, (%rax,%rcx,4)
	subl	$1, -132(%rbp)
.L21:
	cmpl	$0, -132(%rbp)
	jns	.L23
	jmp	.L20
.L47:
	nop
.L20:
	addl	$1, -152(%rbp)
.L14:
	movl	-176(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jl	.L24
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	jne	.L25
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	jmp	.L26
.L29:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	je	.L27
	movl	-124(%rbp), %eax
	movl	%eax, -128(%rbp)
	jmp	.L28
.L27:
	addl	$1, -124(%rbp)
.L26:
	movl	-176(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L29
.L28:
	movl	-128(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -120(%rbp)
	jmp	.L30
.L33:
	movl	$0, -116(%rbp)
	jmp	.L31
.L32:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movl	-120(%rbp), %eax
	leal	1(%rax), %edi
	movq	%r12, %rsi
	shrq	$2, %rsi
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %r8
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r8, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %ecx
	movslq	%ecx, %rdi
	movl	-120(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdi, %rcx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -116(%rbp)
.L31:
	movl	-172(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L32
	subl	$1, -120(%rbp)
.L30:
	cmpl	$0, -120(%rbp)
	jns	.L33
.L25:
	movl	$1, -112(%rbp)
	jmp	.L34
.L38:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$-1, %eax
	jne	.L35
	movl	$0, -108(%rbp)
	jmp	.L36
.L37:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movl	-112(%rbp), %eax
	leal	-1(%rax), %edi
	movq	%r12, %rsi
	shrq	$2, %rsi
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %r8
	movslq	%edi, %rdx
	imulq	%rcx, %rdx
	addq	%r8, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %ecx
	movslq	%ecx, %rdi
	movl	-112(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdi, %rcx
	movl	%edx, (%rax,%rcx,4)
	addl	$1, -108(%rbp)
.L36:
	movl	-172(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L37
.L35:
	addl	$1, -112(%rbp)
.L34:
	movl	-176(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L38
	movl	$0, -104(%rbp)
	jmp	.L39
.L44:
	movl	$0, -100(%rbp)
	jmp	.L40
.L43:
	movq	%r12, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rsi
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-172(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -100(%rbp)
	jge	.L41
	movl	$32, %edi
	call	putchar@PLT
	jmp	.L42
.L41:
	movl	$10, %edi
	call	putchar@PLT
.L42:
	addl	$1, -100(%rbp)
.L40:
	movl	-172(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L43
	addl	$1, -104(%rbp)
.L39:
	movl	-176(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L44
	movl	$0, %eax
	movq	-264(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
