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(void){
    int a, b, c, i, flag;
    scanf("%d%d", &a, &b);
    if(b < 10){
        c = a * 10 + b;
    }else if(b < 100){
        c = a * 100 + b;
    }else{
        c = a * 1000 + b;
    }
    //printf("%d", c);
    flag = 0;
    for(i = 1; i <= 400; i++){
        if(c == i * i){
            flag = 1;
            //printf("あった");
        }     
        
    }
    if(flag == 1){
        printf("Yes");
    }else{
        printf("No");
    }
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cmpl	$9, %eax
	jg	.L2
	movl	-28(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L2:
	movl	-24(%rbp), %eax
	cmpl	$99, %eax
	jg	.L4
	movl	-28(%rbp), %eax
	imull	$100, %eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L4:
	movl	-28(%rbp), %eax
	imull	$1000, %eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
.L3:
	movl	$0, -12(%rbp)
	movl	$1, -16(%rbp)
	jmp	.L5
.L7:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L6
	movl	$1, -12(%rbp)
.L6:
	addl	$1, -16(%rbp)
.L5:
	cmpl	$400, -16(%rbp)
	jle	.L7
	cmpl	$1, -12(%rbp)
	jne	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L8:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.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
.LC1:
	.string	"%d%d"
.LC4:
	.string	"Yes"
.LC5:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$9, %eax
	jg	.L2
	imull	$10, (%rsp), %edx
	addl	%edx, %eax
	movd	%eax, %xmm4
.L3:
	movdqa	.LC0(%rip), %xmm2
	pshufd	$0, %xmm4, %xmm4
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	.LC2(%rip), %xmm6
	movdqa	.LC3(%rip), %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm2
	movdqa	%xmm1, %xmm0
	pmuludq	%xmm1, %xmm0
	psrlq	$32, %xmm1
	pmuludq	%xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	movdqa	%xmm0, %xmm3
	por	%xmm1, %xmm3
	cmpl	$100, %eax
	jne	.L5
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm3, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpl	$1, %eax
	je	.L12
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	(%rsp), %edx
	cmpl	$99, %eax
	jg	.L4
	imull	$100, %edx, %edx
	addl	%edx, %eax
	movd	%eax, %xmm4
	jmp	.L3
.L4:
	imull	$1000, %edx, %edx
	addl	%edx, %eax
	movd	%eax, %xmm4
	jmp	.L3
.L12:
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d%d"
.LC4:
	.string	"Yes"
.LC5:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$9, %eax
	jg	.L2
	imull	$10, (%rsp), %edx
	addl	%edx, %eax
	movd	%eax, %xmm4
.L3:
	movdqa	.LC0(%rip), %xmm2
	pshufd	$0, %xmm4, %xmm4
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	movdqa	.LC2(%rip), %xmm6
	movdqa	.LC3(%rip), %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm2
	movdqa	%xmm1, %xmm0
	pmuludq	%xmm1, %xmm0
	psrlq	$32, %xmm1
	pmuludq	%xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	movdqa	%xmm0, %xmm3
	por	%xmm1, %xmm3
	cmpl	$100, %eax
	jne	.L5
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm3, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpl	$1, %eax
	je	.L12
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	(%rsp), %edx
	cmpl	$99, %eax
	jg	.L4
	imull	$100, %edx, %edx
	addl	%edx, %eax
	movd	%eax, %xmm4
	jmp	.L3
.L4:
	imull	$1000, %edx, %edx
	addl	%edx, %eax
	movd	%eax, %xmm4
	jmp	.L3
.L12:
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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(void){
    int a, b, c, i, flag;
    scanf("%d%d", &a, &b);
    if(b < 10){
        c = a * 10 + b;
    }else if(b < 100){
        c = a * 100 + b;
    }else{
        c = a * 1000 + b;
    }
    //printf("%d", c);
    flag = 0;
    for(i = 1; i <= 400; i++){
        if(c == i * i){
            flag = 1;
            //printf("あった");
        }     
        
    }
    if(flag == 1){
        printf("Yes");
    }else{
        printf("No");
    }
}

2 21
 000 001
 5 10
 110 100
 2 22
 7 10
 101 100
 4 22
 7 16
 101 101

No Yes No No No No No No No No
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(void){
    int a, b, c, i, flag;
    scanf("%d%d", &a, &b);
    if(b < 10){
        c = a * 10 + b;
    }else if(b < 100){
        c = a * 100 + b;
    }else{
        c = a * 1000 + b;
    }
    //printf("%d", c);
    flag = 0;
    for(i = 1; i <= 400; i++){
        if(c == i * i){
            flag = 1;
            //printf("あった");
        }     
        
    }
    if(flag == 1){
        printf("Yes");
    }else{
        printf("No");
    }
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cmpl	$9, %eax
	jg	.L2
	movl	-28(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L2:
	movl	-24(%rbp), %eax
	cmpl	$99, %eax
	jg	.L4
	movl	-28(%rbp), %eax
	imull	$100, %eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L4:
	movl	-28(%rbp), %eax
	imull	$1000, %eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
.L3:
	movl	$0, -12(%rbp)
	movl	$1, -16(%rbp)
	jmp	.L5
.L7:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L6
	movl	$1, -12(%rbp)
.L6:
	addl	$1, -16(%rbp)
.L5:
	cmpl	$400, -16(%rbp)
	jle	.L7
	cmpl	$1, -12(%rbp)
	jne	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L8:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.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"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cmpl	$9, %eax
	jg	.L2
	movl	-28(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L2:
	movl	-24(%rbp), %eax
	cmpl	$99, %eax
	jg	.L4
	movl	-28(%rbp), %eax
	imull	$100, %eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L4:
	movl	-28(%rbp), %eax
	imull	$1000, %eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
.L3:
	movl	$0, -12(%rbp)
	movl	$1, -16(%rbp)
	jmp	.L5
.L7:
	movl	-16(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L6
	movl	$1, -12(%rbp)
.L6:
	addl	$1, -16(%rbp)
.L5:
	cmpl	$400, -16(%rbp)
	jle	.L7
	cmpl	$1, -12(%rbp)
	jne	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L8:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.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:
