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<math.h>

int isPrime(int a)
{
    int b=sqrt(a);
    for(int i=2;i<=b;i++)
    {
        if(a%i==0)return 0;
    }
    return 1;
}

int main()
{

    int n,m,count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&m);
        count+=isPrime(m);
    }
    printf("%d\n",count);
    return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L28
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L18
	testb	$1, %dil
	je	.L19
	movl	$2, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L22
.L21:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L23
.L18:
	movl	$1, %edx
.L22:
	movl	%edx, %eax
	ret
.L19:
	xorl	%edx, %edx
	jmp	.L22
.L28:
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%edi, 12(%rsp)
	call	sqrt@PLT
	movl	12(%rsp), %edi
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L8
	testb	$1, %dil
	je	.L9
	movl	$2, %ecx
	jmp	.L6
.L7:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L6:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L7
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L40
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L49
	sqrtsd	%xmm0, %xmm0
.L33:
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L51
	testb	$1, %bl
	je	.L35
	movl	$2, %ecx
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L35
.L36:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L37
.L51:
	addl	$1, %r12d
.L35:
	addl	$1, %r14d
	cmpl	%r14d, (%rsp)
	jg	.L38
.L30:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L40:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L30
.L49:
	call	sqrt@PLT
	jmp	.L33
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L28
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L18
	testb	$1, %dil
	je	.L19
	movl	$2, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L22
.L21:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L23
.L18:
	movl	$1, %edx
.L22:
	movl	%edx, %eax
	ret
.L19:
	xorl	%edx, %edx
	jmp	.L22
.L28:
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%edi, 12(%rsp)
	call	sqrt@PLT
	movl	12(%rsp), %edi
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L8
	testb	$1, %dil
	je	.L9
	movl	$2, %ecx
	jmp	.L6
.L7:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L6:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L7
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L40
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L49
	sqrtsd	%xmm0, %xmm0
.L33:
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L51
	testb	$1, %bl
	je	.L35
	movl	$2, %ecx
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L35
.L36:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L37
.L51:
	addl	$1, %r12d
.L35:
	addl	$1, %r14d
	cmpl	%r14d, (%rsp)
	jg	.L38
.L30:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L40:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L30
.L49:
	call	sqrt@PLT
	jmp	.L33
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L28
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L18
	testb	$1, %dil
	je	.L19
	movl	$2, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L22
.L21:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L23
.L18:
	movl	$1, %edx
.L22:
	movl	%edx, %eax
	ret
.L19:
	xorl	%edx, %edx
	jmp	.L22
.L28:
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%edi, 12(%rsp)
	call	sqrt@PLT
	movl	12(%rsp), %edi
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L8
	testb	$1, %dil
	je	.L9
	movl	$2, %ecx
	jmp	.L6
.L7:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L6:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L7
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L40
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L49
	sqrtsd	%xmm0, %xmm0
.L33:
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L51
	testb	$1, %bl
	je	.L35
	movl	$2, %ecx
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L35
.L36:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L37
.L51:
	addl	$1, %r12d
.L35:
	addl	$1, %r14d
	cmpl	%r14d, (%rsp)
	jg	.L38
.L30:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L40:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L30
.L49:
	call	sqrt@PLT
	jmp	.L33
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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>
#include<math.h>

int isPrime(int a)
{
    int b=sqrt(a);
    for(int i=2;i<=b;i++)
    {
        if(a%i==0)return 0;
    }
    return 1;
}

int main()
{

    int n,m,count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&m);
        count+=isPrime(m);
    }
    printf("%d\n",count);
    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<math.h>

int isPrime(int a)
{
    int b=sqrt(a);
    for(int i=2;i<=b;i++)
    {
        if(a%i==0)return 0;
    }
    return 1;
}

int main()
{

    int n,m,count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&m);
        count+=isPrime(m);
    }
    printf("%d\n",count);
    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:

11
7
8
9
10
11
12
13
14
27
16
17
 11
7
8
9
10
11
22
13
2
27
8
17
 5
2
4
7
5
6
 11
7
8
9
26
15
22
2
14
27
8
27
 11
14
8
9
26
15
22
2
14
27
8
27
 11
7
10
9
10
11
13
17
3
15
16
17
 11
7
8
9
11
11
22
17
3
17
8
17
 11
7
8
9
10
11
22
13
14
27
16
17
 11
7
8
9
10
11
22
13
14
27
8
17
 11
7
8
9
10
11
22
13
2
27
8
14

4
 5
 3
 2
 1
 6
 7
 4
 4
 4

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<math.h>

int isPrime(int a)
{
    int b=sqrt(a);
    for(int i=2;i<=b;i++)
    {
        if(a%i==0)return 0;
    }
    return 1;
}

int main()
{

    int n,m,count=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&m);
        count+=isPrime(m);
    }
    printf("%d\n",count);
    return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L28
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L18
	testb	$1, %dil
	je	.L19
	movl	$2, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L22
.L21:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L23
.L18:
	movl	$1, %edx
.L22:
	movl	%edx, %eax
	ret
.L19:
	xorl	%edx, %edx
	jmp	.L22
.L28:
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%edi, 12(%rsp)
	call	sqrt@PLT
	movl	12(%rsp), %edi
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L8
	testb	$1, %dil
	je	.L9
	movl	$2, %ecx
	jmp	.L6
.L7:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L6:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L7
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L40
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L49
	sqrtsd	%xmm0, %xmm0
.L33:
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L51
	testb	$1, %bl
	je	.L35
	movl	$2, %ecx
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L35
.L36:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L37
.L51:
	addl	$1, %r12d
.L35:
	addl	$1, %r14d
	cmpl	%r14d, (%rsp)
	jg	.L38
.L30:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L40:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L30
.L49:
	call	sqrt@PLT
	jmp	.L33
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%edi, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L28
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L18
	testb	$1, %dil
	je	.L19
	movl	$2, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L22
.L21:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L23
.L18:
	movl	$1, %edx
.L22:
	movl	%edx, %eax
	ret
.L19:
	xorl	%edx, %edx
	jmp	.L22
.L28:
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	%edi, 12(%rsp)
	call	sqrt@PLT
	movl	12(%rsp), %edi
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L8
	testb	$1, %dil
	je	.L9
	movl	$2, %ecx
	jmp	.L6
.L7:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L6:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L7
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L40
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L49
	sqrtsd	%xmm0, %xmm0
.L33:
	cvttsd2sil	%xmm0, %esi
	cmpl	$1, %esi
	jle	.L51
	testb	$1, %bl
	je	.L35
	movl	$2, %ecx
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L35
.L36:
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jge	.L37
.L51:
	addl	$1, %r12d
.L35:
	addl	$1, %r14d
	cmpl	%r14d, (%rsp)
	jg	.L38
.L30:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L40:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L30
.L49:
	call	sqrt@PLT
	jmp	.L33
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```