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>

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int cn;

  for ( cn = 1; ; ++cn )
  {
    int n;

    scanf ( "%d", &n );
    if ( !( n ) ) break ;

    printf ( "Case %d:\n", cn );
    switch ( n )
    {
      case 1:
        puts ( "  1" );
        break ;
      case 2:
        puts ( "  1  2" );
        puts ( "  3  4" );
        break ;
      case 3:
        puts ( "  1  2  6" );
        puts ( "  3  5  7" );
        puts ( "  4  8  9" );
        break ;
      case 4:
        puts ( "  1  2  6  7" );
        puts ( "  3  5  8 13" );
        puts ( "  4  9 12 14" );
        puts ( " 10 11 15 16" );
        break;
      case 5:
        puts ( "  1  2  6  7 15" );
        puts ( "  3  5  8 14 16" );
        puts ( "  4  9 13 17 22" );
        puts ( " 10 12 18 21 23" );
        puts ( " 11 19 20 24 25" );
        break;
      case 6:
        puts ( "  1  2  6  7 15 16" );
        puts ( "  3  5  8 14 17 26" );
        puts ( "  4  9 13 18 25 27" );
        puts ( " 10 12 19 24 28 33" );
        puts ( " 11 20 23 29 32 34" );
        puts ( " 21 22 30 31 35 36" );
        break;
      case 7:
        puts ( "  1  2  6  7 15 16 28" );
        puts ( "  3  5  8 14 17 27 29" );
        puts ( "  4  9 13 18 26 30 39" );
        puts ( " 10 12 19 25 31 38 40" );
        puts ( " 11 20 24 32 37 41 46" );
        puts ( " 21 23 33 36 42 45 47" );
        puts ( " 22 34 35 43 44 48 49" );
        break;
      case 8:
        puts ( "  1  2  6  7 15 16 28 29" );
        puts ( "  3  5  8 14 17 27 30 43" );
        puts ( "  4  9 13 18 26 31 42 44" );
        puts ( " 10 12 19 25 32 41 45 54" );
        puts ( " 11 20 24 33 40 46 53 55" );
        puts ( " 21 23 34 39 47 52 56 61" );
        puts ( " 22 35 38 48 51 57 60 62" );
        puts ( " 36 37 49 50 58 59 63 64" );
        break;
      case 9:
        puts ( "  1  2  6  7 15 16 28 29 45" );
        puts ( "  3  5  8 14 17 27 30 44 46" );
        puts ( "  4  9 13 18 26 31 43 47 60" );
        puts ( " 10 12 19 25 32 42 48 59 61" );
        puts ( " 11 20 24 33 41 49 58 62 71" );
        puts ( " 21 23 34 40 50 57 63 70 72" );
        puts ( " 22 35 39 51 56 64 69 73 78" );
        puts ( " 36 38 52 55 65 68 74 77 79" );
        puts ( " 37 53 54 66 67 75 76 80 81" );
        break;
    }
  }

  return ( 0 );
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Case %d:\n"
.LC2:
	.string	"  1"
.LC3:
	.string	"  1  2"
.LC4:
	.string	"  3  4"
.LC5:
	.string	"  1  2  6"
.LC6:
	.string	"  3  5  7"
.LC7:
	.string	"  4  8  9"
.LC8:
	.string	"  1  2  6  7"
.LC9:
	.string	"  3  5  8 13"
.LC10:
	.string	"  4  9 12 14"
.LC11:
	.string	" 10 11 15 16"
.LC12:
	.string	"  1  2  6  7 15"
.LC13:
	.string	"  3  5  8 14 16"
.LC14:
	.string	"  4  9 13 17 22"
.LC15:
	.string	" 10 12 18 21 23"
.LC16:
	.string	" 11 19 20 24 25"
.LC17:
	.string	"  1  2  6  7 15 16"
.LC18:
	.string	"  3  5  8 14 17 26"
.LC19:
	.string	"  4  9 13 18 25 27"
.LC20:
	.string	" 10 12 19 24 28 33"
.LC21:
	.string	" 11 20 23 29 32 34"
.LC22:
	.string	" 21 22 30 31 35 36"
.LC23:
	.string	"  1  2  6  7 15 16 28"
.LC24:
	.string	"  3  5  8 14 17 27 29"
.LC25:
	.string	"  4  9 13 18 26 30 39"
.LC26:
	.string	" 10 12 19 25 31 38 40"
.LC27:
	.string	" 11 20 24 32 37 41 46"
.LC28:
	.string	" 21 23 33 36 42 45 47"
.LC29:
	.string	" 22 34 35 43 44 48 49"
.LC30:
	.string	"  1  2  6  7 15 16 28 29"
.LC31:
	.string	"  3  5  8 14 17 27 30 43"
.LC32:
	.string	"  4  9 13 18 26 31 42 44"
.LC33:
	.string	" 10 12 19 25 32 41 45 54"
.LC34:
	.string	" 11 20 24 33 40 46 53 55"
.LC35:
	.string	" 21 23 34 39 47 52 56 61"
.LC36:
	.string	" 22 35 38 48 51 57 60 62"
.LC37:
	.string	" 36 37 49 50 58 59 63 64"
.LC38:
	.string	"  1  2  6  7 15 16 28 29 45"
.LC39:
	.string	"  3  5  8 14 17 27 30 44 46"
.LC40:
	.string	"  4  9 13 18 26 31 43 47 60"
.LC41:
	.string	" 10 12 19 25 32 42 48 59 61"
.LC42:
	.string	" 11 20 24 33 41 49 58 62 71"
.LC43:
	.string	" 21 23 34 40 50 57 63 70 72"
.LC44:
	.string	" 22 35 39 51 56 64 69 73 78"
.LC45:
	.string	" 36 38 52 55 65 68 74 77 79"
.LC46:
	.string	" 37 53 54 66 67 75 76 80 81"
	.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)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -12(%rbp)
.L15:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	jmp	.L17
.L2:
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	cmpl	$9, %eax
	ja	.L4
	movl	%eax, %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L6(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L6(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L4-.L6
	.long	.L14-.L6
	.long	.L13-.L6
	.long	.L12-.L6
	.long	.L11-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
.L14:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L13:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L12:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L11:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC13(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC14(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC15(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC16(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L9:
	leaq	.LC17(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC18(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC19(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC20(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC21(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC22(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L8:
	leaq	.LC23(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC24(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC25(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC26(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC27(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC28(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC29(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L7:
	leaq	.LC30(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC31(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC32(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC33(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC34(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC35(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC36(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC37(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L5:
	leaq	.LC38(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC39(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC40(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC41(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC42(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC43(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC44(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC45(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC46(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
.L4:
	addl	$1, -12(%rbp)
	jmp	.L15
.L17:
	call	__stack_chk_fail@PLT
.L16:
	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	"%d"
.LC1:
	.string	"Case %d:\n"
.LC2:
	.string	"  1"
.LC3:
	.string	"  1  2"
.LC4:
	.string	"  3  4"
.LC5:
	.string	"  1  2  6"
.LC6:
	.string	"  3  5  7"
.LC7:
	.string	"  4  8  9"
.LC8:
	.string	"  1  2  6  7"
.LC9:
	.string	"  3  5  8 13"
.LC10:
	.string	"  4  9 12 14"
.LC11:
	.string	" 10 11 15 16"
.LC12:
	.string	"  1  2  6  7 15"
.LC13:
	.string	"  3  5  8 14 16"
.LC14:
	.string	"  4  9 13 17 22"
.LC15:
	.string	" 10 12 18 21 23"
.LC16:
	.string	" 11 19 20 24 25"
.LC17:
	.string	"  1  2  6  7 15 16"
.LC18:
	.string	"  3  5  8 14 17 26"
.LC19:
	.string	"  4  9 13 18 25 27"
.LC20:
	.string	" 10 12 19 24 28 33"
.LC21:
	.string	" 11 20 23 29 32 34"
.LC22:
	.string	" 21 22 30 31 35 36"
.LC23:
	.string	"  1  2  6  7 15 16 28"
.LC24:
	.string	"  3  5  8 14 17 27 29"
.LC25:
	.string	"  4  9 13 18 26 30 39"
.LC26:
	.string	" 10 12 19 25 31 38 40"
.LC27:
	.string	" 11 20 24 32 37 41 46"
.LC28:
	.string	" 21 23 33 36 42 45 47"
.LC29:
	.string	" 22 34 35 43 44 48 49"
.LC30:
	.string	"  1  2  6  7 15 16 28 29"
.LC31:
	.string	"  3  5  8 14 17 27 30 43"
.LC32:
	.string	"  4  9 13 18 26 31 42 44"
.LC33:
	.string	" 10 12 19 25 32 41 45 54"
.LC34:
	.string	" 11 20 24 33 40 46 53 55"
.LC35:
	.string	" 21 23 34 39 47 52 56 61"
.LC36:
	.string	" 22 35 38 48 51 57 60 62"
.LC37:
	.string	" 36 37 49 50 58 59 63 64"
.LC38:
	.string	"  1  2  6  7 15 16 28 29 45"
.LC39:
	.string	"  3  5  8 14 17 27 30 44 46"
.LC40:
	.string	"  4  9 13 18 26 31 43 47 60"
.LC41:
	.string	" 10 12 19 25 32 42 48 59 61"
.LC42:
	.string	" 11 20 24 33 41 49 58 62 71"
.LC43:
	.string	" 21 23 34 40 50 57 63 70 72"
.LC44:
	.string	" 22 35 39 51 56 64 69 73 78"
.LC45:
	.string	" 36 38 52 55 65 68 74 77 79"
.LC46:
	.string	" 37 53 54 66 67 75 76 80 81"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC38(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.L5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$1, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	xorl	%eax, %eax
	movl	%ebx, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	$9, 4(%rsp)
	ja	.L3
	movl	4(%rsp), %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L3-.L5
	.long	.L13-.L5
	.long	.L12-.L5
	.long	.L11-.L5
	.long	.L10-.L5
	.long	.L9-.L5
	.long	.L8-.L5
	.long	.L7-.L5
	.long	.L6-.L5
	.long	.L4-.L5
	.section	.text.startup
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r15, %rdi
	call	puts@PLT
	leaq	.LC39(%rip), %rdi
	call	puts@PLT
	leaq	.LC40(%rip), %rdi
	call	puts@PLT
	leaq	.LC41(%rip), %rdi
	call	puts@PLT
	leaq	.LC42(%rip), %rdi
	call	puts@PLT
	leaq	.LC43(%rip), %rdi
	call	puts@PLT
	leaq	.LC44(%rip), %rdi
	call	puts@PLT
	leaq	.LC45(%rip), %rdi
	call	puts@PLT
	leaq	.LC46(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	.LC30(%rip), %rdi
	call	puts@PLT
	leaq	.LC31(%rip), %rdi
	call	puts@PLT
	leaq	.LC32(%rip), %rdi
	call	puts@PLT
	leaq	.LC33(%rip), %rdi
	call	puts@PLT
	leaq	.LC34(%rip), %rdi
	call	puts@PLT
	leaq	.LC35(%rip), %rdi
	call	puts@PLT
	leaq	.LC36(%rip), %rdi
	call	puts@PLT
	leaq	.LC37(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	.LC23(%rip), %rdi
	call	puts@PLT
	leaq	.LC24(%rip), %rdi
	call	puts@PLT
	leaq	.LC25(%rip), %rdi
	call	puts@PLT
	leaq	.LC26(%rip), %rdi
	call	puts@PLT
	leaq	.LC27(%rip), %rdi
	call	puts@PLT
	leaq	.LC28(%rip), %rdi
	call	puts@PLT
	leaq	.LC29(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC17(%rip), %rdi
	call	puts@PLT
	leaq	.LC18(%rip), %rdi
	call	puts@PLT
	leaq	.LC19(%rip), %rdi
	call	puts@PLT
	leaq	.LC20(%rip), %rdi
	call	puts@PLT
	leaq	.LC21(%rip), %rdi
	call	puts@PLT
	leaq	.LC22(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
	leaq	.LC13(%rip), %rdi
	call	puts@PLT
	leaq	.LC14(%rip), %rdi
	call	puts@PLT
	leaq	.LC15(%rip), %rdi
	call	puts@PLT
	leaq	.LC16(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC8(%rip), %rdi
	call	puts@PLT
	leaq	.LC9(%rip), %rdi
	call	puts@PLT
	leaq	.LC10(%rip), %rdi
	call	puts@PLT
	leaq	.LC11(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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	"%d"
.LC1:
	.string	"Case %d:\n"
.LC2:
	.string	"  1"
.LC3:
	.string	"  1  2"
.LC4:
	.string	"  3  4"
.LC5:
	.string	"  1  2  6"
.LC6:
	.string	"  3  5  7"
.LC7:
	.string	"  4  8  9"
.LC8:
	.string	"  1  2  6  7"
.LC9:
	.string	"  3  5  8 13"
.LC10:
	.string	"  4  9 12 14"
.LC11:
	.string	" 10 11 15 16"
.LC12:
	.string	"  1  2  6  7 15"
.LC13:
	.string	"  3  5  8 14 16"
.LC14:
	.string	"  4  9 13 17 22"
.LC15:
	.string	" 10 12 18 21 23"
.LC16:
	.string	" 11 19 20 24 25"
.LC17:
	.string	"  1  2  6  7 15 16"
.LC18:
	.string	"  3  5  8 14 17 26"
.LC19:
	.string	"  4  9 13 18 25 27"
.LC20:
	.string	" 10 12 19 24 28 33"
.LC21:
	.string	" 11 20 23 29 32 34"
.LC22:
	.string	" 21 22 30 31 35 36"
.LC23:
	.string	"  1  2  6  7 15 16 28"
.LC24:
	.string	"  3  5  8 14 17 27 29"
.LC25:
	.string	"  4  9 13 18 26 30 39"
.LC26:
	.string	" 10 12 19 25 31 38 40"
.LC27:
	.string	" 11 20 24 32 37 41 46"
.LC28:
	.string	" 21 23 33 36 42 45 47"
.LC29:
	.string	" 22 34 35 43 44 48 49"
.LC30:
	.string	"  1  2  6  7 15 16 28 29"
.LC31:
	.string	"  3  5  8 14 17 27 30 43"
.LC32:
	.string	"  4  9 13 18 26 31 42 44"
.LC33:
	.string	" 10 12 19 25 32 41 45 54"
.LC34:
	.string	" 11 20 24 33 40 46 53 55"
.LC35:
	.string	" 21 23 34 39 47 52 56 61"
.LC36:
	.string	" 22 35 38 48 51 57 60 62"
.LC37:
	.string	" 36 37 49 50 58 59 63 64"
.LC38:
	.string	"  1  2  6  7 15 16 28 29 45"
.LC39:
	.string	"  3  5  8 14 17 27 30 44 46"
.LC40:
	.string	"  4  9 13 18 26 31 43 47 60"
.LC41:
	.string	" 10 12 19 25 32 42 48 59 61"
.LC42:
	.string	" 11 20 24 33 41 49 58 62 71"
.LC43:
	.string	" 21 23 34 40 50 57 63 70 72"
.LC44:
	.string	" 22 35 39 51 56 64 69 73 78"
.LC45:
	.string	" 36 38 52 55 65 68 74 77 79"
.LC46:
	.string	" 37 53 54 66 67 75 76 80 81"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC38(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.L5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$1, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	xorl	%eax, %eax
	movl	%ebx, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	$9, 4(%rsp)
	ja	.L3
	movl	4(%rsp), %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L3-.L5
	.long	.L13-.L5
	.long	.L12-.L5
	.long	.L11-.L5
	.long	.L10-.L5
	.long	.L9-.L5
	.long	.L8-.L5
	.long	.L7-.L5
	.long	.L6-.L5
	.long	.L4-.L5
	.section	.text.startup
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r15, %rdi
	call	puts@PLT
	leaq	.LC39(%rip), %rdi
	call	puts@PLT
	leaq	.LC40(%rip), %rdi
	call	puts@PLT
	leaq	.LC41(%rip), %rdi
	call	puts@PLT
	leaq	.LC42(%rip), %rdi
	call	puts@PLT
	leaq	.LC43(%rip), %rdi
	call	puts@PLT
	leaq	.LC44(%rip), %rdi
	call	puts@PLT
	leaq	.LC45(%rip), %rdi
	call	puts@PLT
	leaq	.LC46(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	.LC30(%rip), %rdi
	call	puts@PLT
	leaq	.LC31(%rip), %rdi
	call	puts@PLT
	leaq	.LC32(%rip), %rdi
	call	puts@PLT
	leaq	.LC33(%rip), %rdi
	call	puts@PLT
	leaq	.LC34(%rip), %rdi
	call	puts@PLT
	leaq	.LC35(%rip), %rdi
	call	puts@PLT
	leaq	.LC36(%rip), %rdi
	call	puts@PLT
	leaq	.LC37(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	.LC23(%rip), %rdi
	call	puts@PLT
	leaq	.LC24(%rip), %rdi
	call	puts@PLT
	leaq	.LC25(%rip), %rdi
	call	puts@PLT
	leaq	.LC26(%rip), %rdi
	call	puts@PLT
	leaq	.LC27(%rip), %rdi
	call	puts@PLT
	leaq	.LC28(%rip), %rdi
	call	puts@PLT
	leaq	.LC29(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	.LC17(%rip), %rdi
	call	puts@PLT
	leaq	.LC18(%rip), %rdi
	call	puts@PLT
	leaq	.LC19(%rip), %rdi
	call	puts@PLT
	leaq	.LC20(%rip), %rdi
	call	puts@PLT
	leaq	.LC21(%rip), %rdi
	call	puts@PLT
	leaq	.LC22(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
	leaq	.LC13(%rip), %rdi
	call	puts@PLT
	leaq	.LC14(%rip), %rdi
	call	puts@PLT
	leaq	.LC15(%rip), %rdi
	call	puts@PLT
	leaq	.LC16(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC8(%rip), %rdi
	call	puts@PLT
	leaq	.LC9(%rip), %rdi
	call	puts@PLT
	leaq	.LC10(%rip), %rdi
	call	puts@PLT
	leaq	.LC11(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int cn;

  for ( cn = 1; ; ++cn )
  {
    int n;

    scanf ( "%d", &n );
    if ( !( n ) ) break ;

    printf ( "Case %d:\n", cn );
    switch ( n )
    {
      case 1:
        puts ( "  1" );
        break ;
      case 2:
        puts ( "  1  2" );
        puts ( "  3  4" );
        break ;
      case 3:
        puts ( "  1  2  6" );
        puts ( "  3  5  7" );
        puts ( "  4  8  9" );
        break ;
      case 4:
        puts ( "  1  2  6  7" );
        puts ( "  3  5  8 13" );
        puts ( "  4  9 12 14" );
        puts ( " 10 11 15 16" );
        break;
      case 5:
        puts ( "  1  2  6  7 15" );
        puts ( "  3  5  8 14 16" );
        puts ( "  4  9 13 17 22" );
        puts ( " 10 12 18 21 23" );
        puts ( " 11 19 20 24 25" );
        break;
      case 6:
        puts ( "  1  2  6  7 15 16" );
        puts ( "  3  5  8 14 17 26" );
        puts ( "  4  9 13 18 25 27" );
        puts ( " 10 12 19 24 28 33" );
        puts ( " 11 20 23 29 32 34" );
        puts ( " 21 22 30 31 35 36" );
        break;
      case 7:
        puts ( "  1  2  6  7 15 16 28" );
        puts ( "  3  5  8 14 17 27 29" );
        puts ( "  4  9 13 18 26 30 39" );
        puts ( " 10 12 19 25 31 38 40" );
        puts ( " 11 20 24 32 37 41 46" );
        puts ( " 21 23 33 36 42 45 47" );
        puts ( " 22 34 35 43 44 48 49" );
        break;
      case 8:
        puts ( "  1  2  6  7 15 16 28 29" );
        puts ( "  3  5  8 14 17 27 30 43" );
        puts ( "  4  9 13 18 26 31 42 44" );
        puts ( " 10 12 19 25 32 41 45 54" );
        puts ( " 11 20 24 33 40 46 53 55" );
        puts ( " 21 23 34 39 47 52 56 61" );
        puts ( " 22 35 38 48 51 57 60 62" );
        puts ( " 36 37 49 50 58 59 63 64" );
        break;
      case 9:
        puts ( "  1  2  6  7 15 16 28 29 45" );
        puts ( "  3  5  8 14 17 27 30 44 46" );
        puts ( "  4  9 13 18 26 31 43 47 60" );
        puts ( " 10 12 19 25 32 42 48 59 61" );
        puts ( " 11 20 24 33 41 49 58 62 71" );
        puts ( " 21 23 34 40 50 57 63 70 72" );
        puts ( " 22 35 39 51 56 64 69 73 78" );
        puts ( " 36 38 52 55 65 68 74 77 79" );
        puts ( " 37 53 54 66 67 75 76 80 81" );
        break;
    }
  }

  return ( 0 );
}
3
7
0
 3
3
0
 3
0
0
 3
1
0
 3
2
0
 3
-1
0
 3
5
0
 3
8
0
 3
6
0
 3
9
0

Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2  6  7 15 16 28
  3  5  8 14 17 27 29
  4  9 13 18 26 30 39
 10 12 19 25 31 38 40
 11 20 24 32 37 41 46
 21 23 33 36 42 45 47
 22 34 35 43 44 48 49
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2  6
  3  5  7
  4  8  9
 Case 1:
  1  2  6
  3  5  7
  4  8  9
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2
  3  4
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2  6  7 15
  3  5  8 14 16
  4  9 13 17 22
 10 12 18 21 23
 11 19 20 24 25
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2  6  7 15 16 28 29
  3  5  8 14 17 27 30 43
  4  9 13 18 26 31 42 44
 10 12 19 25 32 41 45 54
 11 20 24 33 40 46 53 55
 21 23 34 39 47 52 56 61
 22 35 38 48 51 57 60 62
 36 37 49 50 58 59 63 64
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2  6  7 15 16
  3  5  8 14 17 26
  4  9 13 18 25 27
 10 12 19 24 28 33
 11 20 23 29 32 34
 21 22 30 31 35 36
 Case 1:
  1  2  6
  3  5  7
  4  8  9
Case 2:
  1  2  6  7 15 16 28 29 45
  3  5  8 14 17 27 30 44 46
  4  9 13 18 26 31 43 47 60
 10 12 19 25 32 42 48 59 61
 11 20 24 33 41 49 58 62 71
 21 23 34 40 50 57 63 70 72
 22 35 39 51 56 64 69 73 78
 36 38 52 55 65 68 74 77 79
 37 53 54 66 67 75 76 80 81

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>

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int cn;

  for ( cn = 1; ; ++cn )
  {
    int n;

    scanf ( "%d", &n );
    if ( !( n ) ) break ;

    printf ( "Case %d:\n", cn );
    switch ( n )
    {
      case 1:
        puts ( "  1" );
        break ;
      case 2:
        puts ( "  1  2" );
        puts ( "  3  4" );
        break ;
      case 3:
        puts ( "  1  2  6" );
        puts ( "  3  5  7" );
        puts ( "  4  8  9" );
        break ;
      case 4:
        puts ( "  1  2  6  7" );
        puts ( "  3  5  8 13" );
        puts ( "  4  9 12 14" );
        puts ( " 10 11 15 16" );
        break;
      case 5:
        puts ( "  1  2  6  7 15" );
        puts ( "  3  5  8 14 16" );
        puts ( "  4  9 13 17 22" );
        puts ( " 10 12 18 21 23" );
        puts ( " 11 19 20 24 25" );
        break;
      case 6:
        puts ( "  1  2  6  7 15 16" );
        puts ( "  3  5  8 14 17 26" );
        puts ( "  4  9 13 18 25 27" );
        puts ( " 10 12 19 24 28 33" );
        puts ( " 11 20 23 29 32 34" );
        puts ( " 21 22 30 31 35 36" );
        break;
      case 7:
        puts ( "  1  2  6  7 15 16 28" );
        puts ( "  3  5  8 14 17 27 29" );
        puts ( "  4  9 13 18 26 30 39" );
        puts ( " 10 12 19 25 31 38 40" );
        puts ( " 11 20 24 32 37 41 46" );
        puts ( " 21 23 33 36 42 45 47" );
        puts ( " 22 34 35 43 44 48 49" );
        break;
      case 8:
        puts ( "  1  2  6  7 15 16 28 29" );
        puts ( "  3  5  8 14 17 27 30 43" );
        puts ( "  4  9 13 18 26 31 42 44" );
        puts ( " 10 12 19 25 32 41 45 54" );
        puts ( " 11 20 24 33 40 46 53 55" );
        puts ( " 21 23 34 39 47 52 56 61" );
        puts ( " 22 35 38 48 51 57 60 62" );
        puts ( " 36 37 49 50 58 59 63 64" );
        break;
      case 9:
        puts ( "  1  2  6  7 15 16 28 29 45" );
        puts ( "  3  5  8 14 17 27 30 44 46" );
        puts ( "  4  9 13 18 26 31 43 47 60" );
        puts ( " 10 12 19 25 32 42 48 59 61" );
        puts ( " 11 20 24 33 41 49 58 62 71" );
        puts ( " 21 23 34 40 50 57 63 70 72" );
        puts ( " 22 35 39 51 56 64 69 73 78" );
        puts ( " 36 38 52 55 65 68 74 77 79" );
        puts ( " 37 53 54 66 67 75 76 80 81" );
        break;
    }
  }

  return ( 0 );
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Case %d:\n"
.LC2:
	.string	"  1"
.LC3:
	.string	"  1  2"
.LC4:
	.string	"  3  4"
.LC5:
	.string	"  1  2  6"
.LC6:
	.string	"  3  5  7"
.LC7:
	.string	"  4  8  9"
.LC8:
	.string	"  1  2  6  7"
.LC9:
	.string	"  3  5  8 13"
.LC10:
	.string	"  4  9 12 14"
.LC11:
	.string	" 10 11 15 16"
.LC12:
	.string	"  1  2  6  7 15"
.LC13:
	.string	"  3  5  8 14 16"
.LC14:
	.string	"  4  9 13 17 22"
.LC15:
	.string	" 10 12 18 21 23"
.LC16:
	.string	" 11 19 20 24 25"
.LC17:
	.string	"  1  2  6  7 15 16"
.LC18:
	.string	"  3  5  8 14 17 26"
.LC19:
	.string	"  4  9 13 18 25 27"
.LC20:
	.string	" 10 12 19 24 28 33"
.LC21:
	.string	" 11 20 23 29 32 34"
.LC22:
	.string	" 21 22 30 31 35 36"
.LC23:
	.string	"  1  2  6  7 15 16 28"
.LC24:
	.string	"  3  5  8 14 17 27 29"
.LC25:
	.string	"  4  9 13 18 26 30 39"
.LC26:
	.string	" 10 12 19 25 31 38 40"
.LC27:
	.string	" 11 20 24 32 37 41 46"
.LC28:
	.string	" 21 23 33 36 42 45 47"
.LC29:
	.string	" 22 34 35 43 44 48 49"
.LC30:
	.string	"  1  2  6  7 15 16 28 29"
.LC31:
	.string	"  3  5  8 14 17 27 30 43"
.LC32:
	.string	"  4  9 13 18 26 31 42 44"
.LC33:
	.string	" 10 12 19 25 32 41 45 54"
.LC34:
	.string	" 11 20 24 33 40 46 53 55"
.LC35:
	.string	" 21 23 34 39 47 52 56 61"
.LC36:
	.string	" 22 35 38 48 51 57 60 62"
.LC37:
	.string	" 36 37 49 50 58 59 63 64"
.LC38:
	.string	"  1  2  6  7 15 16 28 29 45"
.LC39:
	.string	"  3  5  8 14 17 27 30 44 46"
.LC40:
	.string	"  4  9 13 18 26 31 43 47 60"
.LC41:
	.string	" 10 12 19 25 32 42 48 59 61"
.LC42:
	.string	" 11 20 24 33 41 49 58 62 71"
.LC43:
	.string	" 21 23 34 40 50 57 63 70 72"
.LC44:
	.string	" 22 35 39 51 56 64 69 73 78"
.LC45:
	.string	" 36 38 52 55 65 68 74 77 79"
.LC46:
	.string	" 37 53 54 66 67 75 76 80 81"
	.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)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -12(%rbp)
.L15:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	jmp	.L17
.L2:
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	cmpl	$9, %eax
	ja	.L4
	movl	%eax, %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L6(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L6(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L4-.L6
	.long	.L14-.L6
	.long	.L13-.L6
	.long	.L12-.L6
	.long	.L11-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
.L14:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L13:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L12:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L11:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC13(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC14(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC15(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC16(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L9:
	leaq	.LC17(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC18(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC19(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC20(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC21(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC22(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L8:
	leaq	.LC23(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC24(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC25(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC26(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC27(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC28(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC29(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L7:
	leaq	.LC30(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC31(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC32(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC33(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC34(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC35(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC36(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC37(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L5:
	leaq	.LC38(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC39(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC40(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC41(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC42(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC43(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC44(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC45(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC46(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
.L4:
	addl	$1, -12(%rbp)
	jmp	.L15
.L17:
	call	__stack_chk_fail@PLT
.L16:
	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	"%d"
.LC1:
	.string	"Case %d:\n"
.LC2:
	.string	"  1"
.LC3:
	.string	"  1  2"
.LC4:
	.string	"  3  4"
.LC5:
	.string	"  1  2  6"
.LC6:
	.string	"  3  5  7"
.LC7:
	.string	"  4  8  9"
.LC8:
	.string	"  1  2  6  7"
.LC9:
	.string	"  3  5  8 13"
.LC10:
	.string	"  4  9 12 14"
.LC11:
	.string	" 10 11 15 16"
.LC12:
	.string	"  1  2  6  7 15"
.LC13:
	.string	"  3  5  8 14 16"
.LC14:
	.string	"  4  9 13 17 22"
.LC15:
	.string	" 10 12 18 21 23"
.LC16:
	.string	" 11 19 20 24 25"
.LC17:
	.string	"  1  2  6  7 15 16"
.LC18:
	.string	"  3  5  8 14 17 26"
.LC19:
	.string	"  4  9 13 18 25 27"
.LC20:
	.string	" 10 12 19 24 28 33"
.LC21:
	.string	" 11 20 23 29 32 34"
.LC22:
	.string	" 21 22 30 31 35 36"
.LC23:
	.string	"  1  2  6  7 15 16 28"
.LC24:
	.string	"  3  5  8 14 17 27 29"
.LC25:
	.string	"  4  9 13 18 26 30 39"
.LC26:
	.string	" 10 12 19 25 31 38 40"
.LC27:
	.string	" 11 20 24 32 37 41 46"
.LC28:
	.string	" 21 23 33 36 42 45 47"
.LC29:
	.string	" 22 34 35 43 44 48 49"
.LC30:
	.string	"  1  2  6  7 15 16 28 29"
.LC31:
	.string	"  3  5  8 14 17 27 30 43"
.LC32:
	.string	"  4  9 13 18 26 31 42 44"
.LC33:
	.string	" 10 12 19 25 32 41 45 54"
.LC34:
	.string	" 11 20 24 33 40 46 53 55"
.LC35:
	.string	" 21 23 34 39 47 52 56 61"
.LC36:
	.string	" 22 35 38 48 51 57 60 62"
.LC37:
	.string	" 36 37 49 50 58 59 63 64"
.LC38:
	.string	"  1  2  6  7 15 16 28 29 45"
.LC39:
	.string	"  3  5  8 14 17 27 30 44 46"
.LC40:
	.string	"  4  9 13 18 26 31 43 47 60"
.LC41:
	.string	" 10 12 19 25 32 42 48 59 61"
.LC42:
	.string	" 11 20 24 33 41 49 58 62 71"
.LC43:
	.string	" 21 23 34 40 50 57 63 70 72"
.LC44:
	.string	" 22 35 39 51 56 64 69 73 78"
.LC45:
	.string	" 36 38 52 55 65 68 74 77 79"
.LC46:
	.string	" 37 53 54 66 67 75 76 80 81"
	.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)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -12(%rbp)
.L15:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	jmp	.L17
.L2:
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	cmpl	$9, %eax
	ja	.L4
	movl	%eax, %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L6(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L6(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L4-.L6
	.long	.L14-.L6
	.long	.L13-.L6
	.long	.L12-.L6
	.long	.L11-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
.L14:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L13:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L12:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L11:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC13(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC14(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC15(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC16(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L9:
	leaq	.LC17(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC18(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC19(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC20(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC21(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC22(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L8:
	leaq	.LC23(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC24(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC25(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC26(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC27(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC28(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC29(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L7:
	leaq	.LC30(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC31(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC32(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC33(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC34(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC35(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC36(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC37(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L5:
	leaq	.LC38(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC39(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC40(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC41(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC42(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC43(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC44(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC45(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	leaq	.LC46(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
.L4:
	addl	$1, -12(%rbp)
	jmp	.L15
.L17:
	call	__stack_chk_fail@PLT
.L16:
	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:
