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>

int main(void){
    long int i, j, n, k, ans = 0;
    
    scanf("%ld %ld", &n, &k);
    
    n -= 2;
    if(n < 0) n = 0;
    
    ans = 5 * (n / 11);
    n %= 11;
    
    
    for(i = 1; i <= n; i++){
        for(j = 1; j <= 5; j++) if((9 * (7 * i + j + 1)) % 11 == k) ans++;
    }
    printf("%ld\n", ans);
    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	subq	$2, %rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jns	.L2
	movq	$0, -48(%rbp)
.L2:
	movq	-48(%rbp), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	sarq	$63, %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	%rdx, -48(%rbp)
	movq	$1, -32(%rbp)
	jmp	.L3
.L7:
	movq	$1, -24(%rbp)
	jmp	.L4
.L6:
	movq	-32(%rbp), %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	leaq	1(%rax), %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	leaq	(%rax,%rdx), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L5
	addq	$1, -16(%rbp)
.L5:
	addq	$1, -24(%rbp)
.L4:
	cmpq	$5, -24(%rbp)
	jle	.L6
	addq	$1, -32(%rbp)
.L3:
	movq	-48(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jle	.L7
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	subq	$2, %rcx
	js	.L17
	movabsq	$3353953467947191203, %rsi
	movq	%rcx, %rax
	imulq	%rsi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	%rdx
	subq	%rax, %rdx
	movq	%rcx, %rax
	leaq	(%rdx,%rdx,4), %r8
	leaq	(%rdx,%r8,2), %rdx
	subq	%rdx, %rax
	movq	%rax, 8(%rsp)
	je	.L3
	movq	%rax, %r9
	movq	16(%rsp), %rdi
	movl	$81, %ecx
	salq	$6, %r9
	subq	%rax, %r9
	addq	$81, %r9
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rcx, %rax
	leaq	9(%rcx), %r10
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	cmpq	%rax, %rdi
	sete	%al
	movzbl	%al, %eax
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%r10, %rdi
	leaq	18(%rcx), %r10
	sete	%al
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%r10, %rdi
	leaq	27(%rcx), %r10
	sete	%al
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%rdi, %r10
	leaq	36(%rcx), %r10
	sete	%al
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%rdi, %r10
	sete	%al
	addq	$63, %rcx
	addq	%rax, %r8
	cmpq	%r9, %rcx
	jne	.L9
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	movq	$0, 8(%rsp)
	xorl	%r8d, %r8d
	jmp	.L3
.L18:
	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	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	subq	$2, %rcx
	js	.L17
	movabsq	$3353953467947191203, %rsi
	movq	%rcx, %rax
	imulq	%rsi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	%rdx
	subq	%rax, %rdx
	movq	%rcx, %rax
	leaq	(%rdx,%rdx,4), %r8
	leaq	(%rdx,%r8,2), %rdx
	subq	%rdx, %rax
	movq	%rax, 8(%rsp)
	je	.L3
	movq	%rax, %r9
	movq	16(%rsp), %rdi
	movl	$81, %ecx
	salq	$6, %r9
	subq	%rax, %r9
	addq	$81, %r9
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rcx, %rax
	leaq	9(%rcx), %r10
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	cmpq	%rax, %rdi
	sete	%al
	movzbl	%al, %eax
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%r10, %rdi
	leaq	18(%rcx), %r10
	sete	%al
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%r10, %rdi
	leaq	27(%rcx), %r10
	sete	%al
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%rdi, %r10
	leaq	36(%rcx), %r10
	sete	%al
	addq	%rax, %r8
	movq	%r10, %rax
	mulq	%rsi
	shrq	%rdx
	leaq	(%rdx,%rdx,4), %rax
	leaq	(%rdx,%rax,2), %rax
	subq	%rax, %r10
	xorl	%eax, %eax
	cmpq	%rdi, %r10
	sete	%al
	addq	$63, %rcx
	addq	%rax, %r8
	cmpq	%r9, %rcx
	jne	.L9
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	movq	$0, 8(%rsp)
	xorl	%r8d, %r8d
	jmp	.L3
.L18:
	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>

int main(void){
    long int i, j, n, k, ans = 0;
    
    scanf("%ld %ld", &n, &k);
    
    n -= 2;
    if(n < 0) n = 0;
    
    ans = 5 * (n / 11);
    n %= 11;
    
    
    for(i = 1; i <= n; i++){
        for(j = 1; j <= 5; j++) if((9 * (7 * i + j + 1)) % 11 == k) ans++;
    }
    printf("%ld\n", ans);
    
    return 0;
}
7 7

2

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>

int main(void){
    long int i, j, n, k, ans = 0;
    
    scanf("%ld %ld", &n, &k);
    
    n -= 2;
    if(n < 0) n = 0;
    
    ans = 5 * (n / 11);
    n %= 11;
    
    
    for(i = 1; i <= n; i++){
        for(j = 1; j <= 5; j++) if((9 * (7 * i + j + 1)) % 11 == k) ans++;
    }
    printf("%ld\n", ans);
    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	subq	$2, %rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jns	.L2
	movq	$0, -48(%rbp)
.L2:
	movq	-48(%rbp), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	sarq	$63, %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	%rdx, -48(%rbp)
	movq	$1, -32(%rbp)
	jmp	.L3
.L7:
	movq	$1, -24(%rbp)
	jmp	.L4
.L6:
	movq	-32(%rbp), %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	leaq	1(%rax), %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	leaq	(%rax,%rdx), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L5
	addq	$1, -16(%rbp)
.L5:
	addq	$1, -24(%rbp)
.L4:
	cmpq	$5, -24(%rbp)
	jle	.L6
	addq	$1, -32(%rbp)
.L3:
	movq	-48(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jle	.L7
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	subq	$2, %rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jns	.L2
	movq	$0, -48(%rbp)
.L2:
	movq	-48(%rbp), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	sarq	$63, %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	%rdx, -48(%rbp)
	movq	$1, -32(%rbp)
	jmp	.L3
.L7:
	movq	$1, -24(%rbp)
	jmp	.L4
.L6:
	movq	-32(%rbp), %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	leaq	1(%rax), %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	leaq	(%rax,%rdx), %rcx
	movabsq	$3353953467947191203, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L5
	addq	$1, -16(%rbp)
.L5:
	addq	$1, -24(%rbp)
.L4:
	cmpq	$5, -24(%rbp)
	jle	.L6
	addq	$1, -32(%rbp)
.L3:
	movq	-48(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jle	.L7
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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:
