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

```c
main(N){
	int i,S;
	for(;scanf("%d",&N)*N;){
		S=-N;
		for(i=1;i*i<N;i++){
			if(N%i==0)
				S+=i+N/i;
		}
		printf("%st number\n",S<N?"deficien":S>N?"abundan":"perfec");
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"abundan"
.LC1:
	.string	"perfec"
.LC2:
	.string	"deficien"
.LC3:
	.string	"%st number\n"
.LC4:
	.string	"%d"
	.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
	movl	%edi, -20(%rbp)
	jmp	.L2
.L10:
	movl	-20(%rbp), %eax
	negl	%eax
	movl	%eax, -4(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-20(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	addl	%eax, -4(%rbp)
.L4:
	addl	$1, -8(%rbp)
.L3:
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L5
	movl	-20(%rbp), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	-20(%rbp), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L7
	leaq	.LC0(%rip), %rax
	jmp	.L9
.L7:
	leaq	.LC1(%rip), %rax
	jmp	.L9
.L6:
	leaq	.LC2(%rip), %rax
.L9:
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	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
.LC0:
	.string	"perfec"
.LC1:
	.string	"deficien"
.LC2:
	.string	"abundan"
.LC3:
	.string	"%st number\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC4(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L13
	movl	%esi, %edi
	negl	%edi
	cmpl	$1, %esi
	jle	.L3
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	addl	%ecx, %eax
	addl	%edi, %eax
	testl	%edx, %edx
	cmove	%eax, %edi
	addl	$1, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%esi, %eax
	jl	.L5
.L3:
	movq	%r13, %r8
	cmpl	%edi, %esi
	jg	.L6
	movq	%r14, %r8
	cmovl	%r15, %r8
.L6:
	movq	%r8, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	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
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"perfec"
.LC1:
	.string	"deficien"
.LC2:
	.string	"abundan"
.LC3:
	.string	"%st number\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC4(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L13
	movl	%esi, %edi
	negl	%edi
	cmpl	$1, %esi
	jle	.L3
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	addl	%ecx, %eax
	addl	%edi, %eax
	testl	%edx, %edx
	cmove	%eax, %edi
	addl	$1, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%esi, %eax
	jl	.L5
.L3:
	movq	%r13, %r8
	cmpl	%edi, %esi
	jg	.L6
	movq	%r14, %r8
	cmovl	%r15, %r8
.L6:
	movq	%r8, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	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
	.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:

main(N){
	int i,S;
	for(;scanf("%d",&N)*N;){
		S=-N;
		for(i=1;i*i<N;i++){
			if(N%i==0)
				S+=i+N/i;
		}
		printf("%st number\n",S<N?"deficien":S>N?"abundan":"perfec");
	}
}
1
2
3
4
6
12
16
28
33550336
99999998
99999999
100001000
0
 1
2
5
4
6
12
16
28
820514
99999998
99999999
100001100
0
 1
2
5
4
6
12
18
28
820514
99999998
99999999
100001100
0
 1
1
5
0
6
12
16
28
33550336
99999998
99999999
100001100
0
 1
1
5
4
6
12
18
4
820514
99999998
99999999
100001100
0
 1
2
3
6
6
12
29
28
33550336
99999998
99999999
100001000
0
 1
1
5
4
6
12
18
4
820514
99999998
699564
100001100
0
 1
2
3
6
6
12
29
28
27350355
99999998
99999999
100001000
0
 1
2
5
3
7
12
16
28
33550336
119648219
124798312
100001000
0
 1
2
1
3
6
12
16
28
256736
48969127
99999999
100001100
0

deficient number
deficient number
deficient number
deficient number
perfect number
abundant number
deficient number
perfect number
perfect number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
deficient number
perfect number
abundant number
deficient number
perfect number
deficient number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
deficient number
perfect number
abundant number
abundant number
perfect number
deficient number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
 deficient number
deficient number
deficient number
deficient number
perfect number
abundant number
abundant number
deficient number
deficient number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
perfect number
perfect number
abundant number
deficient number
perfect number
perfect number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
deficient number
perfect number
abundant number
abundant number
deficient number
deficient number
deficient number
abundant number
abundant number
 deficient number
deficient number
deficient number
perfect number
perfect number
abundant number
deficient number
perfect number
deficient number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
deficient number
deficient number
abundant number
deficient number
perfect number
perfect number
deficient number
deficient number
abundant number
 deficient number
deficient number
deficient number
deficient number
perfect number
abundant number
deficient number
perfect number
abundant number
deficient number
deficient number
abundant number

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

```c
main(N){
	int i,S;
	for(;scanf("%d",&N)*N;){
		S=-N;
		for(i=1;i*i<N;i++){
			if(N%i==0)
				S+=i+N/i;
		}
		printf("%st number\n",S<N?"deficien":S>N?"abundan":"perfec");
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"abundan"
.LC1:
	.string	"perfec"
.LC2:
	.string	"deficien"
.LC3:
	.string	"%st number\n"
.LC4:
	.string	"%d"
	.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
	movl	%edi, -20(%rbp)
	jmp	.L2
.L10:
	movl	-20(%rbp), %eax
	negl	%eax
	movl	%eax, -4(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-20(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	addl	%eax, -4(%rbp)
.L4:
	addl	$1, -8(%rbp)
.L3:
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L5
	movl	-20(%rbp), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	-20(%rbp), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L7
	leaq	.LC0(%rip), %rax
	jmp	.L9
.L7:
	leaq	.LC1(%rip), %rax
	jmp	.L9
.L6:
	leaq	.LC2(%rip), %rax
.L9:
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	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	"abundan"
.LC1:
	.string	"perfec"
.LC2:
	.string	"deficien"
.LC3:
	.string	"%st number\n"
.LC4:
	.string	"%d"
	.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
	movl	%edi, -20(%rbp)
	jmp	.L2
.L10:
	movl	-20(%rbp), %eax
	negl	%eax
	movl	%eax, -4(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L3
.L5:
	movl	-20(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-20(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	addl	%eax, -4(%rbp)
.L4:
	addl	$1, -8(%rbp)
.L3:
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L5
	movl	-20(%rbp), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	-20(%rbp), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L7
	leaq	.LC0(%rip), %rax
	jmp	.L9
.L7:
	leaq	.LC1(%rip), %rax
	jmp	.L9
.L6:
	leaq	.LC2(%rip), %rax
.L9:
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	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:
