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

```c
main(b,a){for(;~scanf("%d",&a);)b-=b?1:a%3&&a%5&&a%2-1;puts(b?"DENIED":"APPROVED");}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DENIED"
.LC1:
	.string	"APPROVED"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movl	%esi, 12(%rsp)
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	testl	%ebx, %ebx
	je	.L3
	subl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	12(%rsp), %rsi
	imulq	$1431655766, %rsi, %rbx
	movq	%rsi, %rax
	cltd
	shrq	$32, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,2), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	imulq	$1717986919, %rsi, %rbx
	sarq	$33, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,4), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	shrl	$31, %edx
	xorl	%ebx, %ebx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	setne	%bl
	negl	%ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rax
	leaq	.LC0(%rip), %rdi
	cmove	%rax, %rdi
	call	puts@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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:
```

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	"DENIED"
.LC1:
	.string	"APPROVED"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movl	%esi, 12(%rsp)
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	testl	%ebx, %ebx
	je	.L3
	subl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	12(%rsp), %rsi
	imulq	$1431655766, %rsi, %rbx
	movq	%rsi, %rax
	cltd
	shrq	$32, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,2), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	imulq	$1717986919, %rsi, %rbx
	sarq	$33, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,4), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	shrl	$31, %edx
	xorl	%ebx, %ebx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	setne	%bl
	negl	%ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rax
	leaq	.LC0(%rip), %rdi
	cmove	%rax, %rdi
	call	puts@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DENIED"
.LC1:
	.string	"APPROVED"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movl	%esi, 12(%rsp)
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	testl	%ebx, %ebx
	je	.L3
	subl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	12(%rsp), %rsi
	imulq	$1431655766, %rsi, %rbx
	movq	%rsi, %rax
	cltd
	shrq	$32, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,2), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	imulq	$1717986919, %rsi, %rbx
	sarq	$33, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,4), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	shrl	$31, %edx
	xorl	%ebx, %ebx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	setne	%bl
	negl	%ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rax
	leaq	.LC0(%rip), %rdi
	cmove	%rax, %rdi
	call	puts@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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:
```
```c
main(b,a){for(;~scanf("%d",&a);)b-=b?1:a%3&&a%5&&a%2-1;puts(b?"DENIED":"APPROVED");}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
main(b,a){for(;~scanf("%d",&a);)b-=b?1:a%3&&a%5&&a%2-1;puts(b?"DENIED":"APPROVED");}```

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:

5
6 7 3 10 31
 3
28 27 47
 5
6 7 4 10 31
 3
28 15 47
 5
0 7 4 10 31
 3
2 15 47
 5
-1 7 4 10 31
 3
2 26 47
 5
1 7 4 10 31
 3
4 26 47

APPROVED
 DENIED
 DENIED
 DENIED
 DENIED
 DENIED
 DENIED
 DENIED
 DENIED
 DENIED

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

```c
main(b,a){for(;~scanf("%d",&a);)b-=b?1:a%3&&a%5&&a%2-1;puts(b?"DENIED":"APPROVED");}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DENIED"
.LC1:
	.string	"APPROVED"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movl	%esi, 12(%rsp)
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	testl	%ebx, %ebx
	je	.L3
	subl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	12(%rsp), %rsi
	imulq	$1431655766, %rsi, %rbx
	movq	%rsi, %rax
	cltd
	shrq	$32, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,2), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	imulq	$1717986919, %rsi, %rbx
	sarq	$33, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,4), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	shrl	$31, %edx
	xorl	%ebx, %ebx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	setne	%bl
	negl	%ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rax
	leaq	.LC0(%rip), %rdi
	cmove	%rax, %rdi
	call	puts@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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:
```

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	"DENIED"
.LC1:
	.string	"APPROVED"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movl	%esi, 12(%rsp)
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	testl	%ebx, %ebx
	je	.L3
	subl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	12(%rsp), %rsi
	imulq	$1431655766, %rsi, %rbx
	movq	%rsi, %rax
	cltd
	shrq	$32, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,2), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	imulq	$1717986919, %rsi, %rbx
	sarq	$33, %rbx
	subl	%edx, %ebx
	leal	(%rbx,%rbx,4), %ecx
	movl	%esi, %ebx
	subl	%ecx, %ebx
	je	.L2
	shrl	$31, %edx
	xorl	%ebx, %ebx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	setne	%bl
	negl	%ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%ebx, %ebx
	leaq	.LC1(%rip), %rax
	leaq	.LC0(%rip), %rdi
	cmove	%rax, %rdi
	call	puts@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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:
```