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 isPrime(int x) {
  int i;
  if (x == 1) return 0;
  if (x == 2) return 1;
  if (x == 3) return 1;
  if (x % 2 == 0) return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}

int main(void) {
  int a, d, n, c;

  while (1) {
    scanf("%d %d %d", &a, &d, &n);
    if (a == 0 && d == 0 && n == 0) break;

    c = 0;
    while (1) {
      if(isPrime(a)) c++;
      if (c == n) break;
      a += d;
    }

    printf("%d\n", a);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	cmpl	$1, -20(%rbp)
	jne	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	cmpl	$2, -20(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	cmpl	$3, -20(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L6
	movl	$0, %eax
	jmp	.L3
.L6:
	movl	$3, -4(%rbp)
	jmp	.L7
.L9:
	movl	-20(%rbp), %eax
	cltd
	idivl	-4(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	jmp	.L3
.L8:
	addl	$2, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jge	.L9
	movl	$1, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	isPrime, .-isPrime
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
.L17:
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L11:
	movl	$0, -12(%rbp)
.L16:
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	isPrime
	testl	%eax, %eax
	je	.L13
	addl	$1, -12(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	je	.L23
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -24(%rbp)
	jmp	.L16
.L23:
	nop
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L22:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	xorl	%edx, %edx
	cmpl	$1, %edi
	je	.L1
	leal	-2(%rdi), %eax
	movl	$1, %edx
	cmpl	$1, %eax
	jbe	.L1
	xorl	%edx, %edx
	testb	$1, %dil
	je	.L1
	cmpl	$8, %edi
	jle	.L8
	movslq	%edi, %rdx
	movl	%edi, %eax
	imulq	$1431655766, %rdx, %rdx
	sarl	$31, %eax
	shrq	$32, %rdx
	subl	%eax, %edx
	leal	(%rdx,%rdx,2), %eax
	movl	%edi, %edx
	subl	%eax, %edx
	je	.L1
	movl	$3, %ecx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L3:
	addl	$2, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%eax, %edi
	jge	.L4
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.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
	leaq	.LC1(%rip), %r14
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	movl	16(%rsp), %r8d
	movl	20(%rsp), %r9d
	movl	%esi, %eax
	orl	%r8d, %eax
	orl	%r9d, %eax
	je	.L19
	xorl	%r11d, %r11d
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%esi, %r10d
	cmpl	$1, %esi
	je	.L20
	leal	-2(%rsi), %eax
	cmpl	$1, %eax
	jbe	.L21
	testb	$1, %sil
	je	.L20
	cmpl	$8, %esi
	jle	.L21
	imull	$-1431655765, %esi, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	jbe	.L20
	movl	$3, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L20
.L22:
	addl	$2, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%eax, %esi
	jge	.L23
.L21:
	addl	$1, %edi
.L20:
	addl	%r8d, %esi
	cmpl	%edi, %r9d
	je	.L42
	movl	$1, %r11d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L42:
	testb	%r11b, %r11b
	je	.L25
	movl	%r10d, 12(%rsp)
.L25:
	movl	%r10d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
.L19:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$32, %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
.L43:
	.cfi_restore_state
	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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB23:
	.cfi_startproc
	endbr64
	xorl	%edx, %edx
	cmpl	$1, %edi
	je	.L1
	leal	-2(%rdi), %eax
	movl	$1, %edx
	cmpl	$1, %eax
	jbe	.L1
	xorl	%edx, %edx
	testb	$1, %dil
	je	.L1
	cmpl	$8, %edi
	jle	.L8
	movslq	%edi, %rdx
	movl	%edi, %eax
	imulq	$1431655766, %rdx, %rdx
	sarl	$31, %eax
	shrq	$32, %rdx
	subl	%eax, %edx
	leal	(%rdx,%rdx,2), %eax
	movl	%edi, %edx
	subl	%eax, %edx
	je	.L1
	movl	$3, %ecx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L3:
	addl	$2, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%eax, %edi
	jge	.L4
.L8:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	isPrime, .-isPrime
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.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
	leaq	.LC1(%rip), %r14
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	movl	16(%rsp), %r8d
	movl	20(%rsp), %r9d
	movl	%esi, %eax
	orl	%r8d, %eax
	orl	%r9d, %eax
	je	.L19
	xorl	%r11d, %r11d
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%esi, %r10d
	cmpl	$1, %esi
	je	.L20
	leal	-2(%rsi), %eax
	cmpl	$1, %eax
	jbe	.L21
	testb	$1, %sil
	je	.L20
	cmpl	$8, %esi
	jle	.L21
	imull	$-1431655765, %esi, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	jbe	.L20
	movl	$3, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L20
.L22:
	addl	$2, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%eax, %esi
	jge	.L23
.L21:
	addl	$1, %edi
.L20:
	addl	%r8d, %esi
	cmpl	%edi, %r9d
	je	.L42
	movl	$1, %r11d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L42:
	testb	%r11b, %r11b
	je	.L25
	movl	%r10d, 12(%rsp)
.L25:
	movl	%r10d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
.L19:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$32, %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
.L43:
	.cfi_restore_state
	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:

#include <stdio.h>

int isPrime(int x) {
  int i;
  if (x == 1) return 0;
  if (x == 2) return 1;
  if (x == 3) return 1;
  if (x % 2 == 0) return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}

int main(void) {
  int a, d, n, c;

  while (1) {
    scanf("%d %d %d", &a, &d, &n);
    if (a == 0 && d == 0 && n == 0) break;

    c = 0;
    while (1) {
      if(isPrime(a)) c++;
      if (c == n) break;
      a += d;
    }

    printf("%d\n", a);
  }
  return 0;
}
367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 87 85
1 1 1
9075 337 210
307 24 79
331 221 177
259 170 40
269 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 87 85
1 1 1
9075 337 210
307 24 79
331 221 345
259 170 40
269 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 87 85
1 1 1
9075 337 210
307 24 79
331 221 345
259 170 40
37 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 50 85
1 1 1
9075 337 210
307 24 79
331 221 177
259 170 40
269 75 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 87 85
1 1 1
10208 337 210
307 24 79
331 221 177
259 170 40
269 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 87 85
1 1 1
9075 337 210
307 24 79
331 221 345
259 33 40
269 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 87 85
1 1 1
9075 337 210
307 24 79
331 221 345
259 170 40
37 58 146
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
19 104 185
253 87 85
1 1 1
10208 337 210
307 24 79
331 221 177
259 170 40
269 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
103 230 1
27 104 185
253 145 85
1 1 1
9075 337 210
307 24 79
331 221 345
259 33 40
269 58 102
0 0 0
 367 186 151
179 10 203
271 37 39
73 230 1
19 104 185
253 87 85
1 1 1
10208 337 210
307 24 79
331 221 177
259 170 40
269 58 102
0 0 0

92809
6709
12037
103
93523
43579
2
899429
5107
412717
22699
25673
 92809
6709
12037
103
93523
43579
2
899429
5107
842341
22699
25673
 92809
6709
12037
103
93523
43579
2
899429
5107
842341
22699
24919
 92809
6709
12037
103
93523
14503
2
899429
5107
412717
22699
38669
 92809
6709
12037
103
93523
43579
2
925163
5107
412717
22699
25673
 92809
6709
12037
103
93523
43579
2
899429
5107
842341
6199
25673
 92809
6709
12037
103
93523
43579
2
899429
5107
842341
22699
36809
 92809
6709
12037
103
91019
43579
2
925163
5107
412717
22699
25673
 92809
6709
12037
103
93523
94793
2
899429
5107
842341
6199
25673
 92809
6709
12037
73
91019
43579
2
925163
5107
412717
22699
25673

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 isPrime(int x) {
  int i;
  if (x == 1) return 0;
  if (x == 2) return 1;
  if (x == 3) return 1;
  if (x % 2 == 0) return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}

int main(void) {
  int a, d, n, c;

  while (1) {
    scanf("%d %d %d", &a, &d, &n);
    if (a == 0 && d == 0 && n == 0) break;

    c = 0;
    while (1) {
      if(isPrime(a)) c++;
      if (c == n) break;
      a += d;
    }

    printf("%d\n", a);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	cmpl	$1, -20(%rbp)
	jne	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	cmpl	$2, -20(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	cmpl	$3, -20(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L6
	movl	$0, %eax
	jmp	.L3
.L6:
	movl	$3, -4(%rbp)
	jmp	.L7
.L9:
	movl	-20(%rbp), %eax
	cltd
	idivl	-4(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	jmp	.L3
.L8:
	addl	$2, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jge	.L9
	movl	$1, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	isPrime, .-isPrime
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
.L17:
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L11:
	movl	$0, -12(%rbp)
.L16:
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	isPrime
	testl	%eax, %eax
	je	.L13
	addl	$1, -12(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	je	.L23
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -24(%rbp)
	jmp	.L16
.L23:
	nop
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L22:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	isPrime
	.type	isPrime, @function
isPrime:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	cmpl	$1, -20(%rbp)
	jne	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	cmpl	$2, -20(%rbp)
	jne	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	cmpl	$3, -20(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L6
	movl	$0, %eax
	jmp	.L3
.L6:
	movl	$3, -4(%rbp)
	jmp	.L7
.L9:
	movl	-20(%rbp), %eax
	cltd
	idivl	-4(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	jmp	.L3
.L8:
	addl	$2, -4(%rbp)
.L7:
	movl	-4(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jge	.L9
	movl	$1, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	isPrime, .-isPrime
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
.L17:
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L11:
	movl	$0, -12(%rbp)
.L16:
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	isPrime
	testl	%eax, %eax
	je	.L13
	addl	$1, -12(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	je	.L23
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -24(%rbp)
	jmp	.L16
.L23:
	nop
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L22:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
