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>
int main(){
  int a,b;
  scanf("%d",&a);
  for(int i=a; 0<a; i--){
    b=0;
    for(int j=1; j*j<=i; j++){
      if(j*j==i){b=1;}
    }
    if(b){printf("%d",i);break;}
  }
  return 0;}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.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), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	movl	$1, %ecx
	xorl	%esi, %esi
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	je	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r8d, %edx
	jg	.L20
	movl	%edx, %ecx
.L22:
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	jne	.L21
.L4:
	cmpl	%r8d, %edx
	jg	.L9
	movl	$1, %esi
	movl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%esi, %esi
	jne	.L9
.L7:
	subl	$1, %r8d
	testl	%r8d, %r8d
	jg	.L11
	jmp	.L7
.L9:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	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:
```

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

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	movl	$1, %ecx
	xorl	%esi, %esi
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	je	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r8d, %edx
	jg	.L20
	movl	%edx, %ecx
.L22:
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	jne	.L21
.L4:
	cmpl	%r8d, %edx
	jg	.L9
	movl	$1, %esi
	movl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%esi, %esi
	jne	.L9
.L7:
	subl	$1, %r8d
	testl	%r8d, %r8d
	jg	.L11
	jmp	.L7
.L9:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.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), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	movl	$1, %ecx
	xorl	%esi, %esi
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	je	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r8d, %edx
	jg	.L20
	movl	%edx, %ecx
.L22:
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	jne	.L21
.L4:
	cmpl	%r8d, %edx
	jg	.L9
	movl	$1, %esi
	movl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%esi, %esi
	jne	.L9
.L7:
	subl	$1, %r8d
	testl	%r8d, %r8d
	jg	.L11
	jmp	.L7
.L9:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	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:
```
```c
#include<stdio.h>
int main(){
  int a,b;
  scanf("%d",&a);
  for(int i=a; 0<a; i--){
    b=0;
    for(int j=1; j*j<=i; j++){
      if(j*j==i){b=1;}
    }
    if(b){printf("%d",i);break;}
  }
  return 0;}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int a,b;
  scanf("%d",&a);
  for(int i=a; 0<a; i--){
    b=0;
    for(int j=1; j*j<=i; j++){
      if(j*j==i){b=1;}
    }
    if(b){printf("%d",i);break;}
  }
  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:

70
 12
 115087508
 135
 167542739
 7
 16
 317532200
 315132601
 2

64 9 115068529 121 167521249 4 16 317516761 315098001 1
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>
int main(){
  int a,b;
  scanf("%d",&a);
  for(int i=a; 0<a; i--){
    b=0;
    for(int j=1; j*j<=i; j++){
      if(j*j==i){b=1;}
    }
    if(b){printf("%d",i);break;}
  }
  return 0;}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.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), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	movl	$1, %ecx
	xorl	%esi, %esi
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	je	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r8d, %edx
	jg	.L20
	movl	%edx, %ecx
.L22:
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	jne	.L21
.L4:
	cmpl	%r8d, %edx
	jg	.L9
	movl	$1, %esi
	movl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%esi, %esi
	jne	.L9
.L7:
	subl	$1, %r8d
	testl	%r8d, %r8d
	jg	.L11
	jmp	.L7
.L9:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	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:
```

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

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$1, %eax
	movl	$1, %ecx
	xorl	%esi, %esi
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	je	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	%r8d, %edx
	jg	.L20
	movl	%edx, %ecx
.L22:
	addl	$1, %eax
	movl	%eax, %edx
	imull	%eax, %edx
	cmpl	%r8d, %ecx
	jne	.L21
.L4:
	cmpl	%r8d, %edx
	jg	.L9
	movl	$1, %esi
	movl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	testl	%esi, %esi
	jne	.L9
.L7:
	subl	$1, %r8d
	testl	%r8d, %r8d
	jg	.L11
	jmp	.L7
.L9:
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	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:
```