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

```c
#include <stdio.h>
#include <stdlib.h>
#define Yes()       printf("Yes\n")
#define No()        printf("No\n")

char s[51][51]={0};

int check(int h, int w){
    if     ( h<0 || w<0 )   return 0;
    else if( s[h][w]=='.' ) return 1;
    else                    return 0;
}

int main(){
    int h,w;
    scanf("%d%d",&h,&w);
    for(int i=0; i<h; i++){ scanf("%s", s[i]); }
    
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            if( s[i][j]=='#'
            &&  check(i-1,j)    //上
            &&  check(i+1,j)    //下
            &&  check(i,j-1)    //左
            &&  check(i,j+1) )  //右
            {
                No();
                return 0;
            }
        }
    }
    Yes();
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %ecx
	xorl	%eax, %eax
	orl	%esi, %ecx
	js	.L1
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%rdi,%rdi,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	cmpb	$46, (%rax,%rsi)
	sete	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	s(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$51, %rbp
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L6
	subl	$1, %eax
	movl	4(%rsp), %ebx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	leaq	(%rax,%rax,2), %r11
	movq	$-51, %rsi
	addq	$51, %r12
	movl	$51, %ebp
	movq	%r11, %rax
	leal	-1(%rbx), %ecx
	salq	$4, %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L9
	cmpl	$-1, %r9d
	je	.L9
	movq	%rbp, %r10
	leaq	(%r12,%rsi), %rax
	movl	$-1, %edx
	subq	%r8, %r10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%ecx, %edx
	je	.L9
.L12:
	cmpb	$35, (%rax)
	jne	.L10
	leaq	(%r8,%rax), %rdi
	cmpb	$46, (%rdi,%rsi)
	jne	.L10
	cmpb	$46, (%rdi,%r10)
	jne	.L10
	cmpl	$-1, %edx
	je	.L10
	cmpb	$46, -1(%rax)
	jne	.L10
	cmpb	$46, 1(%rax)
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$51, %rsi
	addl	$1, %r9d
	subq	$51, %r8
	cmpq	%rsi, %r11
	jne	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L13:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2601
s:
	.zero	2601
	.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
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %ecx
	xorl	%eax, %eax
	orl	%esi, %ecx
	js	.L1
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%rdi,%rdi,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	cmpb	$46, (%rax,%rsi)
	sete	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	s(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$51, %rbp
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L6
	subl	$1, %eax
	movl	4(%rsp), %ebx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	leaq	(%rax,%rax,2), %r11
	movq	$-51, %rsi
	addq	$51, %r12
	movl	$51, %ebp
	movq	%r11, %rax
	leal	-1(%rbx), %ecx
	salq	$4, %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L9
	cmpl	$-1, %r9d
	je	.L9
	movq	%rbp, %r10
	leaq	(%r12,%rsi), %rax
	movl	$-1, %edx
	subq	%r8, %r10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%ecx, %edx
	je	.L9
.L12:
	cmpb	$35, (%rax)
	jne	.L10
	leaq	(%r8,%rax), %rdi
	cmpb	$46, (%rdi,%rsi)
	jne	.L10
	cmpb	$46, (%rdi,%r10)
	jne	.L10
	cmpl	$-1, %edx
	je	.L10
	cmpb	$46, -1(%rax)
	jne	.L10
	cmpb	$46, 1(%rax)
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$51, %rsi
	addl	$1, %r9d
	subq	$51, %r8
	cmpq	%rsi, %r11
	jne	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L13:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2601
s:
	.zero	2601
	.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
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %ecx
	xorl	%eax, %eax
	orl	%esi, %ecx
	js	.L1
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%rdi,%rdi,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	cmpb	$46, (%rax,%rsi)
	sete	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	s(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$51, %rbp
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L6
	subl	$1, %eax
	movl	4(%rsp), %ebx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	leaq	(%rax,%rax,2), %r11
	movq	$-51, %rsi
	addq	$51, %r12
	movl	$51, %ebp
	movq	%r11, %rax
	leal	-1(%rbx), %ecx
	salq	$4, %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L9
	cmpl	$-1, %r9d
	je	.L9
	movq	%rbp, %r10
	leaq	(%r12,%rsi), %rax
	movl	$-1, %edx
	subq	%r8, %r10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%ecx, %edx
	je	.L9
.L12:
	cmpb	$35, (%rax)
	jne	.L10
	leaq	(%r8,%rax), %rdi
	cmpb	$46, (%rdi,%rsi)
	jne	.L10
	cmpb	$46, (%rdi,%r10)
	jne	.L10
	cmpl	$-1, %edx
	je	.L10
	cmpb	$46, -1(%rax)
	jne	.L10
	cmpb	$46, 1(%rax)
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$51, %rsi
	addl	$1, %r9d
	subq	$51, %r8
	cmpq	%rsi, %r11
	jne	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L13:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2601
s:
	.zero	2601
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>
#include <stdlib.h>
#define Yes()       printf("Yes\n")
#define No()        printf("No\n")

char s[51][51]={0};

int check(int h, int w){
    if     ( h<0 || w<0 )   return 0;
    else if( s[h][w]=='.' ) return 1;
    else                    return 0;
}

int main(){
    int h,w;
    scanf("%d%d",&h,&w);
    for(int i=0; i<h; i++){ scanf("%s", s[i]); }
    
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            if( s[i][j]=='#'
            &&  check(i-1,j)    //上
            &&  check(i+1,j)    //下
            &&  check(i,j-1)    //左
            &&  check(i,j+1) )  //右
            {
                No();
                return 0;
            }
        }
    }
    Yes();
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#define Yes()       printf("Yes\n")
#define No()        printf("No\n")

char s[51][51]={0};

int check(int h, int w){
    if     ( h<0 || w<0 )   return 0;
    else if( s[h][w]=='.' ) return 1;
    else                    return 0;
}

int main(){
    int h,w;
    scanf("%d%d",&h,&w);
    for(int i=0; i<h; i++){ scanf("%s", s[i]); }
    
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            if( s[i][j]=='#'
            &&  check(i-1,j)    //上
            &&  check(i+1,j)    //下
            &&  check(i,j-1)    //左
            &&  check(i,j+1) )  //右
            {
                No();
                return 0;
            }
        }
    }
    Yes();
    return 0;
}```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

3 5
.#.
###
.#.
 5 5
.#.#
.#.#.
-#.#
.#.#.
.#.#
 11 11
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#.#.#.#.#.
.#.#.#.#$
..##.#.##..
.##..#..##.
 3 6
.#.
###
.#.
 11 11
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#.#.#.#.#.
.$.#.#.#$
..##.#.##..
.##..#..##.
 5 6
.#.
###
.#.
 11 11
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#...#.###.
.$.#.#.#$
..##.#.##..
.##..#..##.
 6 6
.#.
###
.#.
 11 15
...#####...
.##.....##.
..##.##..#
..##.##..#
.........#
...###...#
.#########.
.#...#.###.
.$.#.#.#$
..##.#.##..
.##..#..##.
 6 6
#..
###
.#.

Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes

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

```c
#include <stdio.h>
#include <stdlib.h>
#define Yes()       printf("Yes\n")
#define No()        printf("No\n")

char s[51][51]={0};

int check(int h, int w){
    if     ( h<0 || w<0 )   return 0;
    else if( s[h][w]=='.' ) return 1;
    else                    return 0;
}

int main(){
    int h,w;
    scanf("%d%d",&h,&w);
    for(int i=0; i<h; i++){ scanf("%s", s[i]); }
    
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            if( s[i][j]=='#'
            &&  check(i-1,j)    //上
            &&  check(i+1,j)    //下
            &&  check(i,j-1)    //左
            &&  check(i,j+1) )  //右
            {
                No();
                return 0;
            }
        }
    }
    Yes();
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %ecx
	xorl	%eax, %eax
	orl	%esi, %ecx
	js	.L1
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%rdi,%rdi,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	cmpb	$46, (%rax,%rsi)
	sete	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	s(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$51, %rbp
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L6
	subl	$1, %eax
	movl	4(%rsp), %ebx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	leaq	(%rax,%rax,2), %r11
	movq	$-51, %rsi
	addq	$51, %r12
	movl	$51, %ebp
	movq	%r11, %rax
	leal	-1(%rbx), %ecx
	salq	$4, %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L9
	cmpl	$-1, %r9d
	je	.L9
	movq	%rbp, %r10
	leaq	(%r12,%rsi), %rax
	movl	$-1, %edx
	subq	%r8, %r10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%ecx, %edx
	je	.L9
.L12:
	cmpb	$35, (%rax)
	jne	.L10
	leaq	(%r8,%rax), %rdi
	cmpb	$46, (%rdi,%rsi)
	jne	.L10
	cmpb	$46, (%rdi,%r10)
	jne	.L10
	cmpl	$-1, %edx
	je	.L10
	cmpb	$46, -1(%rax)
	jne	.L10
	cmpb	$46, 1(%rax)
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$51, %rsi
	addl	$1, %r9d
	subq	$51, %r8
	cmpq	%rsi, %r11
	jne	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L13:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2601
s:
	.zero	2601
	.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
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %ecx
	xorl	%eax, %eax
	orl	%esi, %ecx
	js	.L1
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	leaq	(%rdi,%rdi,2), %rax
	movq	%rax, %rdx
	salq	$4, %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	cmpb	$46, (%rax,%rsi)
	sete	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	s(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$51, %rbp
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L6
	subl	$1, %eax
	movl	4(%rsp), %ebx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	leaq	(%rax,%rax,2), %r11
	movq	$-51, %rsi
	addq	$51, %r12
	movl	$51, %ebp
	movq	%r11, %rax
	leal	-1(%rbx), %ecx
	salq	$4, %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	testl	%ebx, %ebx
	jle	.L9
	cmpl	$-1, %r9d
	je	.L9
	movq	%rbp, %r10
	leaq	(%r12,%rsi), %rax
	movl	$-1, %edx
	subq	%r8, %r10
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	addl	$1, %edx
	addq	$1, %rax
	cmpl	%ecx, %edx
	je	.L9
.L12:
	cmpb	$35, (%rax)
	jne	.L10
	leaq	(%r8,%rax), %rdi
	cmpb	$46, (%rdi,%rsi)
	jne	.L10
	cmpb	$46, (%rdi,%r10)
	jne	.L10
	cmpl	$-1, %edx
	je	.L10
	cmpb	$46, -1(%rax)
	jne	.L10
	cmpb	$46, 1(%rax)
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$51, %rsi
	addl	$1, %r9d
	subq	$51, %r8
	cmpq	%rsi, %r11
	jne	.L8
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L13:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 2601
s:
	.zero	2601
	.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:
```