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

```c
// AOJ 2048: Everlasting...?
// 2017.10.4 bal4u@uu

#include <stdio.h>
#include <math.h>

#define SIZE  10
int size;
int factor[SIZE];

int ptbl[] = {
         3,   5,   7,  11,  13,  17,  19,  23,  29,
   31,  37,  41,  43,  47,  53,  59,  61,  67,  71,
   73,  79,  83,  89,  97, 101, 103, 107, 109, 113,
  127, 131, 137, 139, 149, 151, 157, 163, 167, 173,
  179, 181, 191, 193, 197, 199, 211, 223, 227, 229,
  233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
  283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
  353, 359, 367, 373, 379, 383, 389, 397, 401, 409,
  419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
  467, 479, 487, 491, 499, 503, 509, 521, 523, 541,
  547, 557, 563, 569, 571, 577, 587, 593, 599, 601,
  607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
  661, 673, 677, 683, 691, 701, 709, 719, 727, 733,
  739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
  811, 821, 823, 827, 829, 839, 853, 857, 859, 863,
  877, 881, 883, 887, 907, 911, 919, 929, 937, 941,
  947, 953, 967, 971, 977, 983, 991, 997, 0 };

void prime_factor(int n)
{
  int i, d;
  int sw;
  int *pp;

  size = 0;
  if ((n & 1) == 0) {
    factor[size] = 2;
	do n >>= 1;
    while ((n & 1) == 0);
    size++;
  }
  if (n <= 1) return;
  for (pp = ptbl; *pp > 0; pp++) {
    if (n % *pp) continue;
    d = *pp;
    factor[size] = d;
    do n /= d;
    while (n % d == 0);
    size++;
  }
  if (n > 1) {
    int b = (int)sqrt(n);
    for (i = 1009, sw = 0; n > 1; ) {
      if (i > b) {
        factor[size++] = n;
        break;
      }
      if (n % i == 0) {
        factor[size] = i;
        do n /= i;
        while (n % i == 0);
        size++;
      }
      if (sw) { i += 2, sw = 0; }
      else    { i += 4, sw = 1; }
    }
  }
}

int main()
{
	int a[2], s[2], i, j;

	while (scanf("%d%d", &a[0], &a[1]) && a[0] > 0) {
		for (i = 0; i < 2; i++) {
			prime_factor(a[i]);
			for (s[i] = 0, j = 0; j < size-1; j++) s[i] += factor[j];
			s[i] = factor[size-1] - s[i];
		}
		puts(s[0] > s[1] ? "a" : "b");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	size
	.bss
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.globl	factor
	.align 32
	.type	factor, @object
	.size	factor, 40
factor:
	.zero	40
	.globl	ptbl
	.data
	.align 32
	.type	ptbl, @object
	.size	ptbl, 672
ptbl:
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.long	257
	.long	263
	.long	269
	.long	271
	.long	277
	.long	281
	.long	283
	.long	293
	.long	307
	.long	311
	.long	313
	.long	317
	.long	331
	.long	337
	.long	347
	.long	349
	.long	353
	.long	359
	.long	367
	.long	373
	.long	379
	.long	383
	.long	389
	.long	397
	.long	401
	.long	409
	.long	419
	.long	421
	.long	431
	.long	433
	.long	439
	.long	443
	.long	449
	.long	457
	.long	461
	.long	463
	.long	467
	.long	479
	.long	487
	.long	491
	.long	499
	.long	503
	.long	509
	.long	521
	.long	523
	.long	541
	.long	547
	.long	557
	.long	563
	.long	569
	.long	571
	.long	577
	.long	587
	.long	593
	.long	599
	.long	601
	.long	607
	.long	613
	.long	617
	.long	619
	.long	631
	.long	641
	.long	643
	.long	647
	.long	653
	.long	659
	.long	661
	.long	673
	.long	677
	.long	683
	.long	691
	.long	701
	.long	709
	.long	719
	.long	727
	.long	733
	.long	739
	.long	743
	.long	751
	.long	757
	.long	761
	.long	769
	.long	773
	.long	787
	.long	797
	.long	809
	.long	811
	.long	821
	.long	823
	.long	827
	.long	829
	.long	839
	.long	853
	.long	857
	.long	859
	.long	863
	.long	877
	.long	881
	.long	883
	.long	887
	.long	907
	.long	911
	.long	919
	.long	929
	.long	937
	.long	941
	.long	947
	.long	953
	.long	967
	.long	971
	.long	977
	.long	983
	.long	991
	.long	997
	.long	0
	.text
	.globl	prime_factor
	.type	prime_factor, @function
prime_factor:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movl	$0, size(%rip)
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L2
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	$2, (%rdx,%rax)
.L3:
	sarl	-36(%rbp)
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
.L2:
	cmpl	$1, -36(%rbp)
	jle	.L17
	leaq	ptbl(%rip), %rax
	movq	%rax, -8(%rbp)
	jmp	.L6
.L10:
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	-36(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L18
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L9:
	movl	-36(%rbp), %eax
	cltd
	idivl	-12(%rbp)
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-12(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L9
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
	jmp	.L8
.L18:
	nop
.L8:
	addq	$4, -8(%rbp)
.L6:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L10
	cmpl	$1, -36(%rbp)
	jle	.L1
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-36(%rbp), %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -16(%rbp)
	movl	$1009, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L11
.L16:
	movl	-24(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L12
	movl	size(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, size(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L1
.L12:
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L14:
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L14
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
.L13:
	cmpl	$0, -20(%rbp)
	je	.L15
	addl	$2, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L11
.L15:
	addl	$4, -24(%rbp)
	movl	$1, -20(%rbp)
.L11:
	cmpl	$1, -36(%rbp)
	jg	.L16
	jmp	.L1
.L17:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prime_factor, .-prime_factor
	.section	.rodata
.LC0:
	.string	"a"
.LC1:
	.string	"b"
.LC2:
	.string	"%d%d"
	.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
	jmp	.L20
.L28:
	movl	$0, -32(%rbp)
	jmp	.L21
.L24:
	movl	-32(%rbp), %eax
	cltq
	movl	-24(%rbp,%rax,4), %eax
	movl	%eax, %edi
	call	prime_factor
	movl	-32(%rbp), %eax
	cltq
	movl	$0, -16(%rbp,%rax,4)
	movl	$0, -28(%rbp)
	jmp	.L22
.L23:
	movl	-32(%rbp), %eax
	cltq
	movl	-16(%rbp,%rax,4), %ecx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -16(%rbp,%rax,4)
	addl	$1, -28(%rbp)
.L22:
	movl	size(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jl	.L23
	movl	size(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	-16(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -16(%rbp,%rax,4)
	addl	$1, -32(%rbp)
.L21:
	cmpl	$1, -32(%rbp)
	jle	.L24
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L25
	leaq	.LC0(%rip), %rax
	jmp	.L26
.L25:
	leaq	.LC1(%rip), %rax
.L26:
	movq	%rax, %rdi
	call	puts@PLT
.L20:
	leaq	-24(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jg	.L28
.L27:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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	prime_factor
	.type	prime_factor, @function
prime_factor:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	xorl	%edi, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movl	$0, size(%rip)
	testb	$1, %bl
	jne	.L2
	movl	$2, factor(%rip)
	.p2align 4,,10
	.p2align 3
.L3:
	sarl	%ebx
	movl	%ebx, %edi
	andl	$1, %edi
	je	.L3
	movl	$1, size(%rip)
.L2:
	cmpl	$1, %ebx
	jle	.L1
	movl	ptbl(%rip), %ecx
	movl	%edi, %ebp
	testl	%ecx, %ecx
	jle	.L6
	xorl	%r8d, %r8d
	leaq	ptbl(%rip), %rsi
	leaq	factor(%rip), %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	movl	4(%rsi), %ecx
	addq	$4, %rsi
	testl	%ecx, %ecx
	jle	.L41
.L9:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L7
	movslq	%ebp, %rax
	movl	%ecx, (%r9,%rax,4)
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	cltd
	movl	%eax, %ebx
	idivl	%ecx
	testl	%edx, %edx
	je	.L8
	movl	4(%rsi), %ecx
	addq	$4, %rsi
	addl	$1, %ebp
	movl	$1, %r8d
	testl	%ecx, %ecx
	jg	.L9
.L41:
	testb	%r8b, %r8b
	je	.L24
	movl	%ebp, size(%rip)
.L10:
	cmpl	$1, %ebx
	jle	.L1
.L6:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L37
	sqrtsd	%xmm0, %xmm0
.L14:
	cvttsd2sil	%xmm0, %r8d
	movl	%ebp, %edi
	xorl	%r10d, %r10d
	xorl	%esi, %esi
	movl	$1009, %ecx
	leaq	factor(%rip), %r9
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L45:
	addl	$2, %ecx
	xorl	%esi, %esi
	cmpl	$1, %ebx
	jle	.L42
.L21:
	cmpl	%ecx, %r8d
	jl	.L43
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L44
.L17:
	testl	%esi, %esi
	jne	.L45
	addl	$4, %ecx
	movl	$1, %esi
	cmpl	$1, %ebx
	jg	.L21
.L42:
	testb	%r10b, %r10b
	je	.L1
	movl	%edi, size(%rip)
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	movl	%edi, %ebp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L44:
	movslq	%edi, %rax
	movl	%ecx, (%r9,%rax,4)
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	cltd
	movl	%eax, %ebx
	idivl	%ecx
	testl	%edx, %edx
	je	.L18
	addl	$1, %edi
	movl	$1, %r10d
	jmp	.L17
.L43:
	testb	%r10b, %r10b
	cmove	%ebp, %edi
	leal	1(%rdi), %eax
	movslq	%edi, %rdi
	movl	%eax, size(%rip)
	leaq	factor(%rip), %rax
	movl	%ebx, (%rax,%rdi,4)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L37:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L14
	.cfi_endproc
.LFE23:
	.size	prime_factor, .-prime_factor
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"a"
.LC2:
	.string	"b"
.LC3:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	factor(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %r14
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L68:
	subl	$2, %eax
	cmpl	$2, %eax
	jbe	.L58
	movl	%edx, %eax
	movdqa	(%rbx), %xmm0
	shrl	$2, %eax
	cmpl	$1, %eax
	je	.L50
	paddd	16+factor(%rip), %xmm0
.L50:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L48
.L49:
	movslq	%ecx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L48
	movslq	%edi, %rdi
	addl	$2, %ecx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%ecx, %edx
	jle	.L48
	movslq	%ecx, %rcx
	addl	(%rbx,%rcx,4), %eax
.L48:
	movslq	%edx, %rdx
	addq	$4, %r15
	addq	$4, %r13
	movl	(%rbx,%rdx,4), %edx
	subl	%eax, %edx
	movl	%edx, -4(%r15)
	cmpq	%r15, %rbp
	jne	.L52
	movl	20(%rsp), %eax
	leaq	.LC2(%rip), %rdi
	cmpl	%eax, 16(%rsp)
	leaq	.LC1(%rip), %rax
	cmovg	%rax, %rdi
	call	puts@PLT
.L47:
	xorl	%eax, %eax
	movq	%r14, %rdx
	leaq	.LC3(%rip), %rdi
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L54
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L54
	movq	%r12, %r13
	leaq	16(%rsp), %r15
	leaq	24(%rsp), %rbp
.L52:
	movl	0(%r13), %edi
	call	prime_factor
	movl	size(%rip), %eax
	leal	-1(%rax), %edx
	testl	%edx, %edx
	jg	.L68
	xorl	%eax, %eax
	jmp	.L48
.L58:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L49
.L54:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L69
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L69:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	ptbl
	.data
	.align 32
	.type	ptbl, @object
	.size	ptbl, 672
ptbl:
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.long	257
	.long	263
	.long	269
	.long	271
	.long	277
	.long	281
	.long	283
	.long	293
	.long	307
	.long	311
	.long	313
	.long	317
	.long	331
	.long	337
	.long	347
	.long	349
	.long	353
	.long	359
	.long	367
	.long	373
	.long	379
	.long	383
	.long	389
	.long	397
	.long	401
	.long	409
	.long	419
	.long	421
	.long	431
	.long	433
	.long	439
	.long	443
	.long	449
	.long	457
	.long	461
	.long	463
	.long	467
	.long	479
	.long	487
	.long	491
	.long	499
	.long	503
	.long	509
	.long	521
	.long	523
	.long	541
	.long	547
	.long	557
	.long	563
	.long	569
	.long	571
	.long	577
	.long	587
	.long	593
	.long	599
	.long	601
	.long	607
	.long	613
	.long	617
	.long	619
	.long	631
	.long	641
	.long	643
	.long	647
	.long	653
	.long	659
	.long	661
	.long	673
	.long	677
	.long	683
	.long	691
	.long	701
	.long	709
	.long	719
	.long	727
	.long	733
	.long	739
	.long	743
	.long	751
	.long	757
	.long	761
	.long	769
	.long	773
	.long	787
	.long	797
	.long	809
	.long	811
	.long	821
	.long	823
	.long	827
	.long	829
	.long	839
	.long	853
	.long	857
	.long	859
	.long	863
	.long	877
	.long	881
	.long	883
	.long	887
	.long	907
	.long	911
	.long	919
	.long	929
	.long	937
	.long	941
	.long	947
	.long	953
	.long	967
	.long	971
	.long	977
	.long	983
	.long	991
	.long	997
	.long	0
	.globl	factor
	.bss
	.align 32
	.type	factor, @object
	.size	factor, 40
factor:
	.zero	40
	.globl	size
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.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	prime_factor
	.type	prime_factor, @function
prime_factor:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	xorl	%edi, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movl	$0, size(%rip)
	testb	$1, %bl
	jne	.L2
	movl	$2, factor(%rip)
	.p2align 4,,10
	.p2align 3
.L3:
	sarl	%ebx
	movl	%ebx, %edi
	andl	$1, %edi
	je	.L3
	movl	$1, size(%rip)
.L2:
	cmpl	$1, %ebx
	jle	.L1
	movl	ptbl(%rip), %ecx
	movl	%edi, %ebp
	testl	%ecx, %ecx
	jle	.L6
	xorl	%r8d, %r8d
	leaq	ptbl(%rip), %rsi
	leaq	factor(%rip), %r9
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	movl	4(%rsi), %ecx
	addq	$4, %rsi
	testl	%ecx, %ecx
	jle	.L41
.L9:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L7
	movslq	%ebp, %rax
	movl	%ecx, (%r9,%rax,4)
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	cltd
	movl	%eax, %ebx
	idivl	%ecx
	testl	%edx, %edx
	je	.L8
	movl	4(%rsi), %ecx
	addq	$4, %rsi
	addl	$1, %ebp
	movl	$1, %r8d
	testl	%ecx, %ecx
	jg	.L9
.L41:
	testb	%r8b, %r8b
	je	.L24
	movl	%ebp, size(%rip)
.L10:
	cmpl	$1, %ebx
	jle	.L1
.L6:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L37
	sqrtsd	%xmm0, %xmm0
.L14:
	cvttsd2sil	%xmm0, %r8d
	movl	%ebp, %edi
	xorl	%r10d, %r10d
	xorl	%esi, %esi
	movl	$1009, %ecx
	leaq	factor(%rip), %r9
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L45:
	addl	$2, %ecx
	xorl	%esi, %esi
	cmpl	$1, %ebx
	jle	.L42
.L21:
	cmpl	%ecx, %r8d
	jl	.L43
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L44
.L17:
	testl	%esi, %esi
	jne	.L45
	addl	$4, %ecx
	movl	$1, %esi
	cmpl	$1, %ebx
	jg	.L21
.L42:
	testb	%r10b, %r10b
	je	.L1
	movl	%edi, size(%rip)
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	movl	%edi, %ebp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L44:
	movslq	%edi, %rax
	movl	%ecx, (%r9,%rax,4)
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	cltd
	movl	%eax, %ebx
	idivl	%ecx
	testl	%edx, %edx
	je	.L18
	addl	$1, %edi
	movl	$1, %r10d
	jmp	.L17
.L43:
	testb	%r10b, %r10b
	cmove	%ebp, %edi
	leal	1(%rdi), %eax
	movslq	%edi, %rdi
	movl	%eax, size(%rip)
	leaq	factor(%rip), %rax
	movl	%ebx, (%rax,%rdi,4)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L37:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L14
	.cfi_endproc
.LFE23:
	.size	prime_factor, .-prime_factor
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"a"
.LC2:
	.string	"b"
.LC3:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	factor(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %r14
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L68:
	subl	$2, %eax
	cmpl	$2, %eax
	jbe	.L58
	movl	%edx, %eax
	movdqa	(%rbx), %xmm0
	shrl	$2, %eax
	cmpl	$1, %eax
	je	.L50
	paddd	16+factor(%rip), %xmm0
.L50:
	movdqa	%xmm0, %xmm1
	movl	%edx, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %dl
	je	.L48
.L49:
	movslq	%ecx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L48
	movslq	%edi, %rdi
	addl	$2, %ecx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%ecx, %edx
	jle	.L48
	movslq	%ecx, %rcx
	addl	(%rbx,%rcx,4), %eax
.L48:
	movslq	%edx, %rdx
	addq	$4, %r15
	addq	$4, %r13
	movl	(%rbx,%rdx,4), %edx
	subl	%eax, %edx
	movl	%edx, -4(%r15)
	cmpq	%r15, %rbp
	jne	.L52
	movl	20(%rsp), %eax
	leaq	.LC2(%rip), %rdi
	cmpl	%eax, 16(%rsp)
	leaq	.LC1(%rip), %rax
	cmovg	%rax, %rdi
	call	puts@PLT
.L47:
	xorl	%eax, %eax
	movq	%r14, %rdx
	leaq	.LC3(%rip), %rdi
	movq	%r12, %rsi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L54
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L54
	movq	%r12, %r13
	leaq	16(%rsp), %r15
	leaq	24(%rsp), %rbp
.L52:
	movl	0(%r13), %edi
	call	prime_factor
	movl	size(%rip), %eax
	leal	-1(%rax), %edx
	testl	%edx, %edx
	jg	.L68
	xorl	%eax, %eax
	jmp	.L48
.L58:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L49
.L54:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L69
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L69:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	ptbl
	.data
	.align 32
	.type	ptbl, @object
	.size	ptbl, 672
ptbl:
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.long	257
	.long	263
	.long	269
	.long	271
	.long	277
	.long	281
	.long	283
	.long	293
	.long	307
	.long	311
	.long	313
	.long	317
	.long	331
	.long	337
	.long	347
	.long	349
	.long	353
	.long	359
	.long	367
	.long	373
	.long	379
	.long	383
	.long	389
	.long	397
	.long	401
	.long	409
	.long	419
	.long	421
	.long	431
	.long	433
	.long	439
	.long	443
	.long	449
	.long	457
	.long	461
	.long	463
	.long	467
	.long	479
	.long	487
	.long	491
	.long	499
	.long	503
	.long	509
	.long	521
	.long	523
	.long	541
	.long	547
	.long	557
	.long	563
	.long	569
	.long	571
	.long	577
	.long	587
	.long	593
	.long	599
	.long	601
	.long	607
	.long	613
	.long	617
	.long	619
	.long	631
	.long	641
	.long	643
	.long	647
	.long	653
	.long	659
	.long	661
	.long	673
	.long	677
	.long	683
	.long	691
	.long	701
	.long	709
	.long	719
	.long	727
	.long	733
	.long	739
	.long	743
	.long	751
	.long	757
	.long	761
	.long	769
	.long	773
	.long	787
	.long	797
	.long	809
	.long	811
	.long	821
	.long	823
	.long	827
	.long	829
	.long	839
	.long	853
	.long	857
	.long	859
	.long	863
	.long	877
	.long	881
	.long	883
	.long	887
	.long	907
	.long	911
	.long	919
	.long	929
	.long	937
	.long	941
	.long	947
	.long	953
	.long	967
	.long	971
	.long	977
	.long	983
	.long	991
	.long	997
	.long	0
	.globl	factor
	.bss
	.align 32
	.type	factor, @object
	.size	factor, 40
factor:
	.zero	40
	.globl	size
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.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:

// AOJ 2048: Everlasting...?
// 2017.10.4 bal4u@uu

#include <stdio.h>
#include <math.h>

#define SIZE  10
int size;
int factor[SIZE];

int ptbl[] = {
         3,   5,   7,  11,  13,  17,  19,  23,  29,
   31,  37,  41,  43,  47,  53,  59,  61,  67,  71,
   73,  79,  83,  89,  97, 101, 103, 107, 109, 113,
  127, 131, 137, 139, 149, 151, 157, 163, 167, 173,
  179, 181, 191, 193, 197, 199, 211, 223, 227, 229,
  233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
  283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
  353, 359, 367, 373, 379, 383, 389, 397, 401, 409,
  419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
  467, 479, 487, 491, 499, 503, 509, 521, 523, 541,
  547, 557, 563, 569, 571, 577, 587, 593, 599, 601,
  607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
  661, 673, 677, 683, 691, 701, 709, 719, 727, 733,
  739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
  811, 821, 823, 827, 829, 839, 853, 857, 859, 863,
  877, 881, 883, 887, 907, 911, 919, 929, 937, 941,
  947, 953, 967, 971, 977, 983, 991, 997, 0 };

void prime_factor(int n)
{
  int i, d;
  int sw;
  int *pp;

  size = 0;
  if ((n & 1) == 0) {
    factor[size] = 2;
	do n >>= 1;
    while ((n & 1) == 0);
    size++;
  }
  if (n <= 1) return;
  for (pp = ptbl; *pp > 0; pp++) {
    if (n % *pp) continue;
    d = *pp;
    factor[size] = d;
    do n /= d;
    while (n % d == 0);
    size++;
  }
  if (n > 1) {
    int b = (int)sqrt(n);
    for (i = 1009, sw = 0; n > 1; ) {
      if (i > b) {
        factor[size++] = n;
        break;
      }
      if (n % i == 0) {
        factor[size] = i;
        do n /= i;
        while (n % i == 0);
        size++;
      }
      if (sw) { i += 2, sw = 0; }
      else    { i += 4, sw = 1; }
    }
  }
}

int main()
{
	int a[2], s[2], i, j;

	while (scanf("%d%d", &a[0], &a[1]) && a[0] > 0) {
		for (i = 0; i < 2; i++) {
			prime_factor(a[i]);
			for (s[i] = 0, j = 0; j < size-1; j++) s[i] += factor[j];
			s[i] = factor[size-1] - s[i];
		}
		puts(s[0] > s[1] ? "a" : "b");
	}
	return 0;
}
10 3
30 20
0 0
 9 15
30 20
0 0
 10 3
44 33
0 0
 10 4
11 70
0 0
 10 3
8 20
0 0
 4 3
8 20
0 0
 4 3
12 20
0 0
 10 3
30 33
0 0
 10 3
8 35
0 0
 8 3
8 20
0 0

b
b
 a
b
 b
a
 a
a
 b
b
 b
b
 b
b
 b
b
 b
b
 b
b

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

```c
// AOJ 2048: Everlasting...?
// 2017.10.4 bal4u@uu

#include <stdio.h>
#include <math.h>

#define SIZE  10
int size;
int factor[SIZE];

int ptbl[] = {
         3,   5,   7,  11,  13,  17,  19,  23,  29,
   31,  37,  41,  43,  47,  53,  59,  61,  67,  71,
   73,  79,  83,  89,  97, 101, 103, 107, 109, 113,
  127, 131, 137, 139, 149, 151, 157, 163, 167, 173,
  179, 181, 191, 193, 197, 199, 211, 223, 227, 229,
  233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
  283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
  353, 359, 367, 373, 379, 383, 389, 397, 401, 409,
  419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
  467, 479, 487, 491, 499, 503, 509, 521, 523, 541,
  547, 557, 563, 569, 571, 577, 587, 593, 599, 601,
  607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
  661, 673, 677, 683, 691, 701, 709, 719, 727, 733,
  739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
  811, 821, 823, 827, 829, 839, 853, 857, 859, 863,
  877, 881, 883, 887, 907, 911, 919, 929, 937, 941,
  947, 953, 967, 971, 977, 983, 991, 997, 0 };

void prime_factor(int n)
{
  int i, d;
  int sw;
  int *pp;

  size = 0;
  if ((n & 1) == 0) {
    factor[size] = 2;
	do n >>= 1;
    while ((n & 1) == 0);
    size++;
  }
  if (n <= 1) return;
  for (pp = ptbl; *pp > 0; pp++) {
    if (n % *pp) continue;
    d = *pp;
    factor[size] = d;
    do n /= d;
    while (n % d == 0);
    size++;
  }
  if (n > 1) {
    int b = (int)sqrt(n);
    for (i = 1009, sw = 0; n > 1; ) {
      if (i > b) {
        factor[size++] = n;
        break;
      }
      if (n % i == 0) {
        factor[size] = i;
        do n /= i;
        while (n % i == 0);
        size++;
      }
      if (sw) { i += 2, sw = 0; }
      else    { i += 4, sw = 1; }
    }
  }
}

int main()
{
	int a[2], s[2], i, j;

	while (scanf("%d%d", &a[0], &a[1]) && a[0] > 0) {
		for (i = 0; i < 2; i++) {
			prime_factor(a[i]);
			for (s[i] = 0, j = 0; j < size-1; j++) s[i] += factor[j];
			s[i] = factor[size-1] - s[i];
		}
		puts(s[0] > s[1] ? "a" : "b");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	size
	.bss
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.globl	factor
	.align 32
	.type	factor, @object
	.size	factor, 40
factor:
	.zero	40
	.globl	ptbl
	.data
	.align 32
	.type	ptbl, @object
	.size	ptbl, 672
ptbl:
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.long	257
	.long	263
	.long	269
	.long	271
	.long	277
	.long	281
	.long	283
	.long	293
	.long	307
	.long	311
	.long	313
	.long	317
	.long	331
	.long	337
	.long	347
	.long	349
	.long	353
	.long	359
	.long	367
	.long	373
	.long	379
	.long	383
	.long	389
	.long	397
	.long	401
	.long	409
	.long	419
	.long	421
	.long	431
	.long	433
	.long	439
	.long	443
	.long	449
	.long	457
	.long	461
	.long	463
	.long	467
	.long	479
	.long	487
	.long	491
	.long	499
	.long	503
	.long	509
	.long	521
	.long	523
	.long	541
	.long	547
	.long	557
	.long	563
	.long	569
	.long	571
	.long	577
	.long	587
	.long	593
	.long	599
	.long	601
	.long	607
	.long	613
	.long	617
	.long	619
	.long	631
	.long	641
	.long	643
	.long	647
	.long	653
	.long	659
	.long	661
	.long	673
	.long	677
	.long	683
	.long	691
	.long	701
	.long	709
	.long	719
	.long	727
	.long	733
	.long	739
	.long	743
	.long	751
	.long	757
	.long	761
	.long	769
	.long	773
	.long	787
	.long	797
	.long	809
	.long	811
	.long	821
	.long	823
	.long	827
	.long	829
	.long	839
	.long	853
	.long	857
	.long	859
	.long	863
	.long	877
	.long	881
	.long	883
	.long	887
	.long	907
	.long	911
	.long	919
	.long	929
	.long	937
	.long	941
	.long	947
	.long	953
	.long	967
	.long	971
	.long	977
	.long	983
	.long	991
	.long	997
	.long	0
	.text
	.globl	prime_factor
	.type	prime_factor, @function
prime_factor:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movl	$0, size(%rip)
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L2
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	$2, (%rdx,%rax)
.L3:
	sarl	-36(%rbp)
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
.L2:
	cmpl	$1, -36(%rbp)
	jle	.L17
	leaq	ptbl(%rip), %rax
	movq	%rax, -8(%rbp)
	jmp	.L6
.L10:
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	-36(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L18
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L9:
	movl	-36(%rbp), %eax
	cltd
	idivl	-12(%rbp)
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-12(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L9
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
	jmp	.L8
.L18:
	nop
.L8:
	addq	$4, -8(%rbp)
.L6:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L10
	cmpl	$1, -36(%rbp)
	jle	.L1
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-36(%rbp), %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -16(%rbp)
	movl	$1009, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L11
.L16:
	movl	-24(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L12
	movl	size(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, size(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L1
.L12:
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L14:
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L14
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
.L13:
	cmpl	$0, -20(%rbp)
	je	.L15
	addl	$2, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L11
.L15:
	addl	$4, -24(%rbp)
	movl	$1, -20(%rbp)
.L11:
	cmpl	$1, -36(%rbp)
	jg	.L16
	jmp	.L1
.L17:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prime_factor, .-prime_factor
	.section	.rodata
.LC0:
	.string	"a"
.LC1:
	.string	"b"
.LC2:
	.string	"%d%d"
	.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
	jmp	.L20
.L28:
	movl	$0, -32(%rbp)
	jmp	.L21
.L24:
	movl	-32(%rbp), %eax
	cltq
	movl	-24(%rbp,%rax,4), %eax
	movl	%eax, %edi
	call	prime_factor
	movl	-32(%rbp), %eax
	cltq
	movl	$0, -16(%rbp,%rax,4)
	movl	$0, -28(%rbp)
	jmp	.L22
.L23:
	movl	-32(%rbp), %eax
	cltq
	movl	-16(%rbp,%rax,4), %ecx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -16(%rbp,%rax,4)
	addl	$1, -28(%rbp)
.L22:
	movl	size(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jl	.L23
	movl	size(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	-16(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -16(%rbp,%rax,4)
	addl	$1, -32(%rbp)
.L21:
	cmpl	$1, -32(%rbp)
	jle	.L24
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L25
	leaq	.LC0(%rip), %rax
	jmp	.L26
.L25:
	leaq	.LC1(%rip), %rax
.L26:
	movq	%rax, %rdi
	call	puts@PLT
.L20:
	leaq	-24(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jg	.L28
.L27:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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	size
	.bss
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.globl	factor
	.align 32
	.type	factor, @object
	.size	factor, 40
factor:
	.zero	40
	.globl	ptbl
	.data
	.align 32
	.type	ptbl, @object
	.size	ptbl, 672
ptbl:
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.long	257
	.long	263
	.long	269
	.long	271
	.long	277
	.long	281
	.long	283
	.long	293
	.long	307
	.long	311
	.long	313
	.long	317
	.long	331
	.long	337
	.long	347
	.long	349
	.long	353
	.long	359
	.long	367
	.long	373
	.long	379
	.long	383
	.long	389
	.long	397
	.long	401
	.long	409
	.long	419
	.long	421
	.long	431
	.long	433
	.long	439
	.long	443
	.long	449
	.long	457
	.long	461
	.long	463
	.long	467
	.long	479
	.long	487
	.long	491
	.long	499
	.long	503
	.long	509
	.long	521
	.long	523
	.long	541
	.long	547
	.long	557
	.long	563
	.long	569
	.long	571
	.long	577
	.long	587
	.long	593
	.long	599
	.long	601
	.long	607
	.long	613
	.long	617
	.long	619
	.long	631
	.long	641
	.long	643
	.long	647
	.long	653
	.long	659
	.long	661
	.long	673
	.long	677
	.long	683
	.long	691
	.long	701
	.long	709
	.long	719
	.long	727
	.long	733
	.long	739
	.long	743
	.long	751
	.long	757
	.long	761
	.long	769
	.long	773
	.long	787
	.long	797
	.long	809
	.long	811
	.long	821
	.long	823
	.long	827
	.long	829
	.long	839
	.long	853
	.long	857
	.long	859
	.long	863
	.long	877
	.long	881
	.long	883
	.long	887
	.long	907
	.long	911
	.long	919
	.long	929
	.long	937
	.long	941
	.long	947
	.long	953
	.long	967
	.long	971
	.long	977
	.long	983
	.long	991
	.long	997
	.long	0
	.text
	.globl	prime_factor
	.type	prime_factor, @function
prime_factor:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movl	$0, size(%rip)
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L2
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	$2, (%rdx,%rax)
.L3:
	sarl	-36(%rbp)
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
.L2:
	cmpl	$1, -36(%rbp)
	jle	.L17
	leaq	ptbl(%rip), %rax
	movq	%rax, -8(%rbp)
	jmp	.L6
.L10:
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	-36(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L18
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L9:
	movl	-36(%rbp), %eax
	cltd
	idivl	-12(%rbp)
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-12(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L9
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
	jmp	.L8
.L18:
	nop
.L8:
	addq	$4, -8(%rbp)
.L6:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L10
	cmpl	$1, -36(%rbp)
	jle	.L1
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-36(%rbp), %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -16(%rbp)
	movl	$1009, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L11
.L16:
	movl	-24(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L12
	movl	size(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, size(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L1
.L12:
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	size(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	factor(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L14:
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L14
	movl	size(%rip), %eax
	addl	$1, %eax
	movl	%eax, size(%rip)
.L13:
	cmpl	$0, -20(%rbp)
	je	.L15
	addl	$2, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L11
.L15:
	addl	$4, -24(%rbp)
	movl	$1, -20(%rbp)
.L11:
	cmpl	$1, -36(%rbp)
	jg	.L16
	jmp	.L1
.L17:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prime_factor, .-prime_factor
	.section	.rodata
.LC0:
	.string	"a"
.LC1:
	.string	"b"
.LC2:
	.string	"%d%d"
	.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
	jmp	.L20
.L28:
	movl	$0, -32(%rbp)
	jmp	.L21
.L24:
	movl	-32(%rbp), %eax
	cltq
	movl	-24(%rbp,%rax,4), %eax
	movl	%eax, %edi
	call	prime_factor
	movl	-32(%rbp), %eax
	cltq
	movl	$0, -16(%rbp,%rax,4)
	movl	$0, -28(%rbp)
	jmp	.L22
.L23:
	movl	-32(%rbp), %eax
	cltq
	movl	-16(%rbp,%rax,4), %ecx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -16(%rbp,%rax,4)
	addl	$1, -28(%rbp)
.L22:
	movl	size(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -28(%rbp)
	jl	.L23
	movl	size(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	factor(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	-16(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -16(%rbp,%rax,4)
	addl	$1, -32(%rbp)
.L21:
	cmpl	$1, -32(%rbp)
	jle	.L24
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L25
	leaq	.LC0(%rip), %rax
	jmp	.L26
.L25:
	leaq	.LC1(%rip), %rax
.L26:
	movq	%rax, %rdi
	call	puts@PLT
.L20:
	leaq	-24(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jg	.L28
.L27:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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:
