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>
void call(int n);
int cas, loop;
int main(){
	int n;
	cas = 0;
	loop = 1;
	scanf("%d", &n);
	call(n);
}

void call(int n){
	int i = 1;
	int x;
	while(loop){
		switch(cas){
			case 0:	// CHECK_NUM
				x = i;
				if(x%3==0){
					printf(" %d", i);
					cas = 2;
					break;
				}
				cas = 1;
				break;
			case 1:	// INCLUDE3
				if(x%10 == 3){
					printf(" %d", i);
					cas = 2;
					break;
				}
				x /= 10;
				if(x) {
					cas = 1;
					break;
				}
				cas = 2;
				break;
			case 2:	// END_CHECK_NUM
				if(++i <= n){
					cas = 0;
					break;
				}
				printf("\n");
				loop = 0;
				break;
			default:
				break;	
		}
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cas
	.bss
	.align 4
	.type	cas, @object
	.size	cas, 4
cas:
	.zero	4
	.globl	loop
	.align 4
	.type	loop, @object
	.size	loop, 4
loop:
	.zero	4
	.section	.rodata
.LC0:
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, cas(%rip)
	movl	$1, loop(%rip)
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	call
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	" %d"
	.text
	.globl	call
	.type	call, @function
call:
.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
	movl	%edi, -20(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L5
.L14:
	movl	cas(%rip), %eax
	cmpl	$2, %eax
	je	.L6
	cmpl	$2, %eax
	jg	.L15
	testl	%eax, %eax
	je	.L8
	cmpl	$1, %eax
	je	.L9
	jmp	.L7
.L8:
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, cas(%rip)
	jmp	.L5
.L10:
	movl	$1, cas(%rip)
	jmp	.L5
.L9:
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	cmpl	$3, %edx
	jne	.L11
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, cas(%rip)
	jmp	.L5
.L11:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	je	.L12
	movl	$1, cas(%rip)
	jmp	.L5
.L12:
	movl	$2, cas(%rip)
	jmp	.L5
.L6:
	addl	$1, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L13
	movl	$0, cas(%rip)
	jmp	.L5
.L13:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, loop(%rip)
	jmp	.L5
.L7:
.L15:
	nop
.L5:
	movl	loop(%rip), %eax
	testl	%eax, %eax
	jne	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	call, .-call
	.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	" %d"
	.text
	.p2align 4
	.globl	call
	.type	call, @function
call:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$1, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%edi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	loop(%rip), %ecx
	movl	cas(%rip), %eax
	testl	%ecx, %ecx
	je	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L8
.L17:
	cmpl	$2, %eax
	je	.L9
	testl	%eax, %eax
	jne	.L11
	imull	$-1431655765, %r12d, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	jbe	.L16
	movl	$1, cas(%rip)
	movl	$1, %eax
	movl	%r12d, %r13d
.L5:
	movl	loop(%rip), %edx
	testl	%edx, %edx
	je	.L1
	cmpl	$1, %eax
	jne	.L17
.L8:
	movslq	%r13d, %rdx
	movl	%r13d, %ecx
	movl	%r13d, %esi
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$34, %rdx
	subl	%ecx, %edx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	cmpl	$3, %esi
	je	.L18
	movl	%edx, %r13d
	testl	%edx, %edx
	jne	.L5
	movl	$2, cas(%rip)
	movl	$2, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r12d
	cmpl	%ebx, %r12d
	jg	.L7
	movl	$0, cas(%rip)
	xorl	%eax, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%r12d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r12d, %r13d
	movl	$2, %eax
	movl	$2, cas(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, loop(%rip)
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	%r12d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$2, %eax
	movl	$2, cas(%rip)
	jmp	.L5
	.cfi_endproc
.LFE24:
	.size	call, .-call
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$0, cas(%rip)
	movl	$1, loop(%rip)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	call	call
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	loop
	.bss
	.align 4
	.type	loop, @object
	.size	loop, 4
loop:
	.zero	4
	.globl	cas
	.align 4
	.type	cas, @object
	.size	cas, 4
cas:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
	.text
	.p2align 4
	.globl	call
	.type	call, @function
call:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	$1, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movl	%edi, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	loop(%rip), %ecx
	movl	cas(%rip), %eax
	testl	%ecx, %ecx
	je	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L8
.L17:
	cmpl	$2, %eax
	je	.L9
	testl	%eax, %eax
	jne	.L11
	imull	$-1431655765, %r12d, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	jbe	.L16
	movl	$1, cas(%rip)
	movl	$1, %eax
	movl	%r12d, %r13d
.L5:
	movl	loop(%rip), %edx
	testl	%edx, %edx
	je	.L1
	cmpl	$1, %eax
	jne	.L17
.L8:
	movslq	%r13d, %rdx
	movl	%r13d, %ecx
	movl	%r13d, %esi
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$34, %rdx
	subl	%ecx, %edx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	cmpl	$3, %esi
	je	.L18
	movl	%edx, %r13d
	testl	%edx, %edx
	jne	.L5
	movl	$2, cas(%rip)
	movl	$2, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r12d
	cmpl	%ebx, %r12d
	jg	.L7
	movl	$0, cas(%rip)
	xorl	%eax, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%r12d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r12d, %r13d
	movl	$2, %eax
	movl	$2, cas(%rip)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, loop(%rip)
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	%r12d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$2, %eax
	movl	$2, cas(%rip)
	jmp	.L5
	.cfi_endproc
.LFE24:
	.size	call, .-call
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$0, cas(%rip)
	movl	$1, loop(%rip)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	call	call
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	loop
	.bss
	.align 4
	.type	loop, @object
	.size	loop, 4
loop:
	.zero	4
	.globl	cas
	.align 4
	.type	cas, @object
	.size	cas, 4
cas:
	.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:

#include<stdio.h>
void call(int n);
int cas, loop;
int main(){
	int n;
	cas = 0;
	loop = 1;
	scanf("%d", &n);
	call(n);
}

void call(int n){
	int i = 1;
	int x;
	while(loop){
		switch(cas){
			case 0:	// CHECK_NUM
				x = i;
				if(x%3==0){
					printf(" %d", i);
					cas = 2;
					break;
				}
				cas = 1;
				break;
			case 1:	// INCLUDE3
				if(x%10 == 3){
					printf(" %d", i);
					cas = 2;
					break;
				}
				x /= 10;
				if(x) {
					cas = 1;
					break;
				}
				cas = 2;
				break;
			case 2:	// END_CHECK_NUM
				if(++i <= n){
					cas = 0;
					break;
				}
				printf("\n");
				loop = 0;
				break;
			default:
				break;	
		}
	}
}

53
 9
 17
 28
 7
 13
 25
 18
 4
 21

 3 6 9 12 13 15 18 21 23 24 27 30 31 32 33 34 35 36 37 38 39 42 43 45 48 51 53
  3 6 9
  3 6 9 12 13 15
  3 6 9 12 13 15 18 21 23 24 27
  3 6
  3 6 9 12 13
  3 6 9 12 13 15 18 21 23 24
  3 6 9 12 13 15 18
  3
  3 6 9 12 13 15 18 21

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>
void call(int n);
int cas, loop;
int main(){
	int n;
	cas = 0;
	loop = 1;
	scanf("%d", &n);
	call(n);
}

void call(int n){
	int i = 1;
	int x;
	while(loop){
		switch(cas){
			case 0:	// CHECK_NUM
				x = i;
				if(x%3==0){
					printf(" %d", i);
					cas = 2;
					break;
				}
				cas = 1;
				break;
			case 1:	// INCLUDE3
				if(x%10 == 3){
					printf(" %d", i);
					cas = 2;
					break;
				}
				x /= 10;
				if(x) {
					cas = 1;
					break;
				}
				cas = 2;
				break;
			case 2:	// END_CHECK_NUM
				if(++i <= n){
					cas = 0;
					break;
				}
				printf("\n");
				loop = 0;
				break;
			default:
				break;	
		}
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cas
	.bss
	.align 4
	.type	cas, @object
	.size	cas, 4
cas:
	.zero	4
	.globl	loop
	.align 4
	.type	loop, @object
	.size	loop, 4
loop:
	.zero	4
	.section	.rodata
.LC0:
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, cas(%rip)
	movl	$1, loop(%rip)
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	call
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	" %d"
	.text
	.globl	call
	.type	call, @function
call:
.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
	movl	%edi, -20(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L5
.L14:
	movl	cas(%rip), %eax
	cmpl	$2, %eax
	je	.L6
	cmpl	$2, %eax
	jg	.L15
	testl	%eax, %eax
	je	.L8
	cmpl	$1, %eax
	je	.L9
	jmp	.L7
.L8:
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, cas(%rip)
	jmp	.L5
.L10:
	movl	$1, cas(%rip)
	jmp	.L5
.L9:
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	cmpl	$3, %edx
	jne	.L11
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, cas(%rip)
	jmp	.L5
.L11:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	je	.L12
	movl	$1, cas(%rip)
	jmp	.L5
.L12:
	movl	$2, cas(%rip)
	jmp	.L5
.L6:
	addl	$1, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L13
	movl	$0, cas(%rip)
	jmp	.L5
.L13:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, loop(%rip)
	jmp	.L5
.L7:
.L15:
	nop
.L5:
	movl	loop(%rip), %eax
	testl	%eax, %eax
	jne	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	call, .-call
	.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	cas
	.bss
	.align 4
	.type	cas, @object
	.size	cas, 4
cas:
	.zero	4
	.globl	loop
	.align 4
	.type	loop, @object
	.size	loop, 4
loop:
	.zero	4
	.section	.rodata
.LC0:
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, cas(%rip)
	movl	$1, loop(%rip)
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	call
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	" %d"
	.text
	.globl	call
	.type	call, @function
call:
.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
	movl	%edi, -20(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L5
.L14:
	movl	cas(%rip), %eax
	cmpl	$2, %eax
	je	.L6
	cmpl	$2, %eax
	jg	.L15
	testl	%eax, %eax
	je	.L8
	cmpl	$1, %eax
	je	.L9
	jmp	.L7
.L8:
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, cas(%rip)
	jmp	.L5
.L10:
	movl	$1, cas(%rip)
	jmp	.L5
.L9:
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	cmpl	$3, %edx
	jne	.L11
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$2, cas(%rip)
	jmp	.L5
.L11:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	je	.L12
	movl	$1, cas(%rip)
	jmp	.L5
.L12:
	movl	$2, cas(%rip)
	jmp	.L5
.L6:
	addl	$1, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L13
	movl	$0, cas(%rip)
	jmp	.L5
.L13:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, loop(%rip)
	jmp	.L5
.L7:
.L15:
	nop
.L5:
	movl	loop(%rip), %eax
	testl	%eax, %eax
	jne	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	call, .-call
	.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:
