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(){
int a[4];
for(int n=0;n<4;n++){
 scanf("%1d",&a[n]);
}
//a[0]-a[1]
int m=7-a[0]+a[1];
if(a[2]+a[3]==m){
 printf("%d-%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("%d-%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("%d-%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("%d-%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//a[0]+a[1]
m=7-a[0]-a[1];
if(a[2]+a[3]==m){
 printf("%d+%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("%d+%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("%d+%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("%d+%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//-a[0]+a[1]
m=7+a[0]-a[1];
if(a[2]+a[3]==m){
 printf("-%d+%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("-%d+%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("-%d+%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("-%d+%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//-a[0]-a[1]
m=7+a[0]+a[1];
if(a[2]+a[3]==m){
 printf("-%d-%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("-%d-%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("-%d-%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("-%d-%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%1d"
.LC1:
	.string	"%d-%d+%d+%d=7"
.LC2:
	.string	"%d-%d+%d-%d=7"
.LC3:
	.string	"%d-%d-%d-%d=7"
.LC4:
	.string	"%d-%d-%d+%d=7"
.LC5:
	.string	"%d+%d+%d+%d=7"
.LC6:
	.string	"%d+%d+%d-%d=7"
.LC7:
	.string	"%d+%d-%d-%d=7"
.LC8:
	.string	"%d+%d-%d+%d=7"
.LC9:
	.string	"-%d+%d+%d+%d=7"
.LC10:
	.string	"-%d+%d+%d-%d=7"
.LC11:
	.string	"-%d+%d-%d-%d=7"
.LC12:
	.string	"-%d+%d-%d+%d=7"
.LC13:
	.string	"-%d-%d+%d+%d=7"
.LC14:
	.string	"-%d-%d+%d-%d=7"
.LC15:
	.string	"-%d-%d-%d-%d=7"
.LC16:
	.string	"-%d-%d-%d+%d=7"
	.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
	movl	$0, -40(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L2:
	cmpl	$3, -40(%rbp)
	jle	.L3
	movl	-32(%rbp), %eax
	movl	$7, %edx
	subl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L4
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L4:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L6
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L6:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L7
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L7:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L8
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L8:
	movl	-32(%rbp), %edx
	movl	$7, %eax
	subl	%edx, %eax
	movl	-28(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L9
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L9:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L10
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L10:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L11
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L11:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L12
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L12:
	movl	-32(%rbp), %eax
	addl	$7, %eax
	movl	-28(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L13
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L13:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L14
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L14:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L15
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L15:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L16
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L16:
	movl	-32(%rbp), %eax
	leal	7(%rax), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L17
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC13(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L17:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L18
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC14(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L18:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L19
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC15(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L19:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L20
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC16(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L20:
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"%1d"
.LC1:
	.string	"%d-%d+%d+%d=7"
.LC2:
	.string	"%d-%d+%d-%d=7"
.LC3:
	.string	"%d-%d-%d-%d=7"
.LC4:
	.string	"%d-%d-%d+%d=7"
.LC5:
	.string	"%d+%d+%d+%d=7"
.LC6:
	.string	"%d+%d+%d-%d=7"
.LC7:
	.string	"%d+%d-%d-%d=7"
.LC8:
	.string	"%d+%d-%d+%d=7"
.LC9:
	.string	"-%d+%d+%d+%d=7"
.LC10:
	.string	"-%d+%d+%d-%d=7"
.LC11:
	.string	"-%d+%d-%d-%d=7"
.LC12:
	.string	"-%d+%d-%d+%d=7"
.LC13:
	.string	"-%d-%d+%d+%d=7"
.LC14:
	.string	"-%d-%d+%d-%d=7"
.LC15:
	.string	"-%d-%d-%d-%d=7"
.LC16:
	.string	"-%d-%d-%d+%d=7"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	movl	(%rsp), %r11d
	movl	4(%rsp), %r10d
	movl	$7, %eax
	movl	8(%rsp), %r8d
	movl	12(%rsp), %r9d
	subl	%r11d, %eax
	leal	(%rax,%r10), %edx
	leal	(%r8,%r9), %esi
	cmpl	%edx, %esi
	je	.L23
	movl	%r8d, %edi
	subl	%r9d, %edi
	cmpl	%edx, %edi
	je	.L24
	movl	%r8d, %ecx
	negl	%ecx
	subl	%r9d, %ecx
	cmpl	%edx, %ecx
	je	.L25
	movl	%r9d, %ebx
	subl	%r8d, %ebx
	cmpl	%edx, %ebx
	je	.L26
	subl	%r10d, %eax
	cmpl	%eax, %esi
	je	.L27
	cmpl	%eax, %edi
	je	.L28
	cmpl	%eax, %ecx
	je	.L29
	cmpl	%eax, %ebx
	je	.L30
	leal	7(%r11), %eax
	movl	%eax, %edx
	subl	%r10d, %edx
	cmpl	%edx, %esi
	je	.L31
	cmpl	%edx, %edi
	je	.L32
	cmpl	%edx, %ecx
	je	.L33
	cmpl	%edx, %ebx
	je	.L34
	addl	%r10d, %eax
	cmpl	%eax, %esi
	je	.L35
	cmpl	%eax, %edi
	je	.L36
	cmpl	%eax, %ecx
	je	.L37
	cmpl	%eax, %ebx
	je	.L38
	.p2align 4,,10
	.p2align 3
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$32, %rsp
	.cfi_remember_state
	.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
.L28:
	.cfi_restore_state
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC6(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L23:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L24:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L25:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L26:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L27:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L29:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC7(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L36:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC14(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L30:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L31:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC9(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L32:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC10(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L33:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC11(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L34:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC12(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L35:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC13(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L37:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC15(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L38:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC16(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L39:
	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	"%1d"
.LC1:
	.string	"%d-%d+%d+%d=7"
.LC2:
	.string	"%d-%d+%d-%d=7"
.LC3:
	.string	"%d-%d-%d-%d=7"
.LC4:
	.string	"%d-%d-%d+%d=7"
.LC5:
	.string	"%d+%d+%d+%d=7"
.LC6:
	.string	"%d+%d+%d-%d=7"
.LC7:
	.string	"%d+%d-%d-%d=7"
.LC8:
	.string	"%d+%d-%d+%d=7"
.LC9:
	.string	"-%d+%d+%d+%d=7"
.LC10:
	.string	"-%d+%d+%d-%d=7"
.LC11:
	.string	"-%d+%d-%d-%d=7"
.LC12:
	.string	"-%d+%d-%d+%d=7"
.LC13:
	.string	"-%d-%d+%d+%d=7"
.LC14:
	.string	"-%d-%d+%d-%d=7"
.LC15:
	.string	"-%d-%d-%d-%d=7"
.LC16:
	.string	"-%d-%d-%d+%d=7"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	movl	(%rsp), %r11d
	movl	4(%rsp), %r10d
	movl	$7, %eax
	movl	8(%rsp), %r8d
	movl	12(%rsp), %r9d
	subl	%r11d, %eax
	leal	(%rax,%r10), %edx
	leal	(%r8,%r9), %esi
	cmpl	%edx, %esi
	je	.L23
	movl	%r8d, %edi
	subl	%r9d, %edi
	cmpl	%edx, %edi
	je	.L24
	movl	%r8d, %ecx
	negl	%ecx
	subl	%r9d, %ecx
	cmpl	%edx, %ecx
	je	.L25
	movl	%r9d, %ebx
	subl	%r8d, %ebx
	cmpl	%edx, %ebx
	je	.L26
	subl	%r10d, %eax
	cmpl	%eax, %esi
	je	.L27
	cmpl	%eax, %edi
	je	.L28
	cmpl	%eax, %ecx
	je	.L29
	cmpl	%eax, %ebx
	je	.L30
	leal	7(%r11), %eax
	movl	%eax, %edx
	subl	%r10d, %edx
	cmpl	%edx, %esi
	je	.L31
	cmpl	%edx, %edi
	je	.L32
	cmpl	%edx, %ecx
	je	.L33
	cmpl	%edx, %ebx
	je	.L34
	addl	%r10d, %eax
	cmpl	%eax, %esi
	je	.L35
	cmpl	%eax, %edi
	je	.L36
	cmpl	%eax, %ecx
	je	.L37
	cmpl	%eax, %ebx
	je	.L38
	.p2align 4,,10
	.p2align 3
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$32, %rsp
	.cfi_remember_state
	.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
.L28:
	.cfi_restore_state
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC6(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L23:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L24:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L25:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L26:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L27:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L29:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC7(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L36:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC14(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L30:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L31:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC9(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L32:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC10(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L33:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC11(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L34:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC12(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L35:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC13(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L37:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC15(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L38:
	movl	%r10d, %ecx
	movl	%r11d, %edx
	leaq	.LC16(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L4
.L39:
	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(){
int a[4];
for(int n=0;n<4;n++){
 scanf("%1d",&a[n]);
}
//a[0]-a[1]
int m=7-a[0]+a[1];
if(a[2]+a[3]==m){
 printf("%d-%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("%d-%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("%d-%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("%d-%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//a[0]+a[1]
m=7-a[0]-a[1];
if(a[2]+a[3]==m){
 printf("%d+%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("%d+%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("%d+%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("%d+%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//-a[0]+a[1]
m=7+a[0]-a[1];
if(a[2]+a[3]==m){
 printf("-%d+%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("-%d+%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("-%d+%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("-%d+%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//-a[0]-a[1]
m=7+a[0]+a[1];
if(a[2]+a[3]==m){
 printf("-%d-%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("-%d-%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("-%d-%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("-%d-%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

}
2364
 1114
 2005
 1455
 1152
 3246
 6120
 2768
 1183
 1024

2+3+6-4=7 1+1+1+4=7 2-0+0+5=7 1-4+5+5=7 1-1+5+2=7 3+2-4+6=7 6-1+2+0=7 2+7+6-8=7 1+1+8-3=7 1-0+2+4=7
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(){
int a[4];
for(int n=0;n<4;n++){
 scanf("%1d",&a[n]);
}
//a[0]-a[1]
int m=7-a[0]+a[1];
if(a[2]+a[3]==m){
 printf("%d-%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("%d-%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("%d-%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("%d-%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//a[0]+a[1]
m=7-a[0]-a[1];
if(a[2]+a[3]==m){
 printf("%d+%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("%d+%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("%d+%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("%d+%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//-a[0]+a[1]
m=7+a[0]-a[1];
if(a[2]+a[3]==m){
 printf("-%d+%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("-%d+%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("-%d+%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("-%d+%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

//-a[0]-a[1]
m=7+a[0]+a[1];
if(a[2]+a[3]==m){
 printf("-%d-%d+%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(a[2]-a[3]==m){
 printf("-%d-%d+%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]-a[3]==m){
 printf("-%d-%d-%d-%d=7",a[0],a[1],a[2],a[3]);
 return 0;}
if(-a[2]+a[3]==m){
 printf("-%d-%d-%d+%d=7",a[0],a[1],a[2],a[3]);
 return 0;}

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%1d"
.LC1:
	.string	"%d-%d+%d+%d=7"
.LC2:
	.string	"%d-%d+%d-%d=7"
.LC3:
	.string	"%d-%d-%d-%d=7"
.LC4:
	.string	"%d-%d-%d+%d=7"
.LC5:
	.string	"%d+%d+%d+%d=7"
.LC6:
	.string	"%d+%d+%d-%d=7"
.LC7:
	.string	"%d+%d-%d-%d=7"
.LC8:
	.string	"%d+%d-%d+%d=7"
.LC9:
	.string	"-%d+%d+%d+%d=7"
.LC10:
	.string	"-%d+%d+%d-%d=7"
.LC11:
	.string	"-%d+%d-%d-%d=7"
.LC12:
	.string	"-%d+%d-%d+%d=7"
.LC13:
	.string	"-%d-%d+%d+%d=7"
.LC14:
	.string	"-%d-%d+%d-%d=7"
.LC15:
	.string	"-%d-%d-%d-%d=7"
.LC16:
	.string	"-%d-%d-%d+%d=7"
	.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
	movl	$0, -40(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L2:
	cmpl	$3, -40(%rbp)
	jle	.L3
	movl	-32(%rbp), %eax
	movl	$7, %edx
	subl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L4
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L4:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L6
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L6:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L7
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L7:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L8
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L8:
	movl	-32(%rbp), %edx
	movl	$7, %eax
	subl	%edx, %eax
	movl	-28(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L9
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L9:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L10
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L10:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L11
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L11:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L12
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L12:
	movl	-32(%rbp), %eax
	addl	$7, %eax
	movl	-28(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L13
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L13:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L14
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L14:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L15
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L15:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L16
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L16:
	movl	-32(%rbp), %eax
	leal	7(%rax), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L17
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC13(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L17:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L18
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC14(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L18:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L19
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC15(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L19:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L20
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC16(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L20:
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"%1d"
.LC1:
	.string	"%d-%d+%d+%d=7"
.LC2:
	.string	"%d-%d+%d-%d=7"
.LC3:
	.string	"%d-%d-%d-%d=7"
.LC4:
	.string	"%d-%d-%d+%d=7"
.LC5:
	.string	"%d+%d+%d+%d=7"
.LC6:
	.string	"%d+%d+%d-%d=7"
.LC7:
	.string	"%d+%d-%d-%d=7"
.LC8:
	.string	"%d+%d-%d+%d=7"
.LC9:
	.string	"-%d+%d+%d+%d=7"
.LC10:
	.string	"-%d+%d+%d-%d=7"
.LC11:
	.string	"-%d+%d-%d-%d=7"
.LC12:
	.string	"-%d+%d-%d+%d=7"
.LC13:
	.string	"-%d-%d+%d+%d=7"
.LC14:
	.string	"-%d-%d+%d-%d=7"
.LC15:
	.string	"-%d-%d-%d-%d=7"
.LC16:
	.string	"-%d-%d-%d+%d=7"
	.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
	movl	$0, -40(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40(%rbp)
.L2:
	cmpl	$3, -40(%rbp)
	jle	.L3
	movl	-32(%rbp), %eax
	movl	$7, %edx
	subl	%eax, %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L4
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L4:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L6
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L6:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L7
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L7:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L8
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L8:
	movl	-32(%rbp), %edx
	movl	$7, %eax
	subl	%edx, %eax
	movl	-28(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L9
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L9:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L10
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L10:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L11
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L11:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L12
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L12:
	movl	-32(%rbp), %eax
	addl	$7, %eax
	movl	-28(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L13
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L13:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L14
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC10(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L14:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L15
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC11(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L15:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L16
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC12(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L16:
	movl	-32(%rbp), %eax
	leal	7(%rax), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L17
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC13(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L17:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L18
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC14(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L18:
	movl	-24(%rbp), %eax
	negl	%eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L19
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC15(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L19:
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jne	.L20
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC16(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L21
.L20:
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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:
