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

```c
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char a, b, c, d;
	a=getchar()-'0';
	b=getchar()-'0';
	c=getchar()-'0';
	d=getchar()-'0';
	if(0);
	else if(a+b+c+d==7) printf("%c+%c+%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b+c-d==7) printf("%c+%c+%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b-c+d==7) printf("%c+%c-%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b-c-d==7) printf("%c+%c-%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b+c+d==7) printf("%c-%c+%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b+c-d==7) printf("%c-%c+%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b-c+d==7) printf("%c-%c-%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b-c-d==7) printf("%c-%c-%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%c+%c+%c+%c=7\n"
.LC1:
	.string	"%c+%c+%c-%c=7\n"
.LC2:
	.string	"%c+%c-%c+%c=7\n"
.LC3:
	.string	"%c+%c-%c-%c=7\n"
.LC4:
	.string	"%c-%c+%c+%c=7\n"
.LC5:
	.string	"%c-%c+%c-%c=7\n"
.LC6:
	.string	"%c-%c-%c+%c=7\n"
.LC7:
	.string	"%c-%c-%c-%c=7\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -4(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -3(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -2(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -1(%rbp)
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%eax, %edx
	movsbl	-2(%rbp), %eax
	addl	%eax, %edx
	movsbl	-1(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L2
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L2:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%eax, %edx
	movsbl	-2(%rbp), %eax
	addl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L4
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L4:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-1(%rbp), %eax
	addl	%ecx, %eax
	cmpl	$7, %eax
	jne	.L5
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L5:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L6
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L6:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-2(%rbp), %eax
	leal	(%rcx,%rax), %edx
	movsbl	-1(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L7
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L7:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-2(%rbp), %eax
	addl	%ecx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L8
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L8:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-1(%rbp), %eax
	addl	%ecx, %eax
	cmpl	$7, %eax
	jne	.L9
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L9:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L3
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%c+%c+%c+%c=7\n"
.LC1:
	.string	"%c+%c+%c-%c=7\n"
.LC2:
	.string	"%c+%c-%c+%c=7\n"
.LC3:
	.string	"%c+%c-%c-%c=7\n"
.LC4:
	.string	"%c-%c+%c+%c=7\n"
.LC5:
	.string	"%c-%c+%c-%c=7\n"
.LC6:
	.string	"%c-%c-%c+%c=7\n"
.LC7:
	.string	"%c-%c-%c-%c=7\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	getc@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ebx
	call	getc@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %r12d
	call	getc@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ebp
	call	getc@PLT
	leal	-48(%rbx), %edx
	leal	-48(%r12), %ecx
	subl	$48, %ebp
	movsbl	%dl, %edx
	movsbl	%cl, %ecx
	movsbl	%bpl, %ebp
	subl	$48, %eax
	leal	(%rdx,%rcx), %esi
	movsbl	%al, %eax
	leal	(%rsi,%rbp), %edi
	leal	(%rdi,%rax), %r8d
	cmpl	$7, %r8d
	je	.L12
	subl	%eax, %edi
	cmpl	$7, %edi
	je	.L13
	subl	%ebp, %esi
	leal	(%rax,%rsi), %edi
	cmpl	$7, %edi
	je	.L14
	subl	%eax, %esi
	cmpl	$7, %esi
	je	.L15
	movl	%edx, %esi
	subl	%ecx, %esi
	leal	0(%rbp,%rsi), %edi
	leal	(%rax,%rdi), %r8d
	cmpl	$7, %r8d
	je	.L16
	subl	%eax, %edi
	cmpl	$7, %edi
	je	.L17
	subl	%ebp, %esi
	leal	(%rax,%rsi), %edi
	cmpl	$7, %edi
	je	.L18
	subl	%eax, %esi
	cmpl	$7, %esi
	je	.L19
.L3:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L15:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L14:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L16:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L17:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L18:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC6(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L19:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC7(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
	.cfi_endproc
.LFE51:
	.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	"%c+%c+%c+%c=7\n"
.LC1:
	.string	"%c+%c+%c-%c=7\n"
.LC2:
	.string	"%c+%c-%c+%c=7\n"
.LC3:
	.string	"%c+%c-%c-%c=7\n"
.LC4:
	.string	"%c-%c+%c+%c=7\n"
.LC5:
	.string	"%c-%c+%c-%c=7\n"
.LC6:
	.string	"%c-%c-%c+%c=7\n"
.LC7:
	.string	"%c-%c-%c-%c=7\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	getc@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ebx
	call	getc@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %r12d
	call	getc@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ebp
	call	getc@PLT
	leal	-48(%rbx), %edx
	leal	-48(%r12), %ecx
	subl	$48, %ebp
	movsbl	%dl, %edx
	movsbl	%cl, %ecx
	movsbl	%bpl, %ebp
	subl	$48, %eax
	leal	(%rdx,%rcx), %esi
	movsbl	%al, %eax
	leal	(%rsi,%rbp), %edi
	leal	(%rdi,%rax), %r8d
	cmpl	$7, %r8d
	je	.L12
	subl	%eax, %edi
	cmpl	$7, %edi
	je	.L13
	subl	%ebp, %esi
	leal	(%rax,%rsi), %edi
	cmpl	$7, %edi
	je	.L14
	subl	%eax, %esi
	cmpl	$7, %esi
	je	.L15
	movl	%edx, %esi
	subl	%ecx, %esi
	leal	0(%rbp,%rsi), %edi
	leal	(%rax,%rdi), %r8d
	cmpl	$7, %r8d
	je	.L16
	subl	%eax, %edi
	cmpl	$7, %edi
	je	.L17
	subl	%ebp, %esi
	leal	(%rax,%rsi), %edi
	cmpl	$7, %edi
	je	.L18
	subl	%eax, %esi
	cmpl	$7, %esi
	je	.L19
.L3:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L15:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L14:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L16:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L17:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L18:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC6(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L19:
	leal	48(%rax), %r9d
	addl	$48, %ecx
	addl	$48, %edx
	movl	$1, %edi
	leal	48(%rbp), %r8d
	leaq	.LC7(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
	.cfi_endproc
.LFE51:
	.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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char a, b, c, d;
	a=getchar()-'0';
	b=getchar()-'0';
	c=getchar()-'0';
	d=getchar()-'0';
	if(0);
	else if(a+b+c+d==7) printf("%c+%c+%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b+c-d==7) printf("%c+%c+%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b-c+d==7) printf("%c+%c-%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b-c-d==7) printf("%c+%c-%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b+c+d==7) printf("%c-%c+%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b+c-d==7) printf("%c-%c+%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b-c+d==7) printf("%c-%c-%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b-c-d==7) printf("%c-%c-%c-%c=7\n", a+'0', b+'0', c+'0', d+'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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char a, b, c, d;
	a=getchar()-'0';
	b=getchar()-'0';
	c=getchar()-'0';
	d=getchar()-'0';
	if(0);
	else if(a+b+c+d==7) printf("%c+%c+%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b+c-d==7) printf("%c+%c+%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b-c+d==7) printf("%c+%c-%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a+b-c-d==7) printf("%c+%c-%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b+c+d==7) printf("%c-%c+%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b+c-d==7) printf("%c-%c+%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b-c+d==7) printf("%c-%c-%c+%c=7\n", a+'0', b+'0', c+'0', d+'0');
	else if(a-b-c-d==7) printf("%c-%c-%c-%c=7\n", a+'0', b+'0', c+'0', d+'0');
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%c+%c+%c+%c=7\n"
.LC1:
	.string	"%c+%c+%c-%c=7\n"
.LC2:
	.string	"%c+%c-%c+%c=7\n"
.LC3:
	.string	"%c+%c-%c-%c=7\n"
.LC4:
	.string	"%c-%c+%c+%c=7\n"
.LC5:
	.string	"%c-%c+%c-%c=7\n"
.LC6:
	.string	"%c-%c-%c+%c=7\n"
.LC7:
	.string	"%c-%c-%c-%c=7\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -4(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -3(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -2(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -1(%rbp)
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%eax, %edx
	movsbl	-2(%rbp), %eax
	addl	%eax, %edx
	movsbl	-1(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L2
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L2:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%eax, %edx
	movsbl	-2(%rbp), %eax
	addl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L4
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L4:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-1(%rbp), %eax
	addl	%ecx, %eax
	cmpl	$7, %eax
	jne	.L5
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L5:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L6
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L6:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-2(%rbp), %eax
	leal	(%rcx,%rax), %edx
	movsbl	-1(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L7
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L7:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-2(%rbp), %eax
	addl	%ecx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L8
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L8:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-1(%rbp), %eax
	addl	%ecx, %eax
	cmpl	$7, %eax
	jne	.L9
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L9:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L3
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%c+%c+%c+%c=7\n"
.LC1:
	.string	"%c+%c+%c-%c=7\n"
.LC2:
	.string	"%c+%c-%c+%c=7\n"
.LC3:
	.string	"%c+%c-%c-%c=7\n"
.LC4:
	.string	"%c-%c+%c+%c=7\n"
.LC5:
	.string	"%c-%c+%c-%c=7\n"
.LC6:
	.string	"%c-%c-%c+%c=7\n"
.LC7:
	.string	"%c-%c-%c-%c=7\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -4(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -3(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -2(%rbp)
	call	getchar@PLT
	subl	$48, %eax
	movb	%al, -1(%rbp)
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%eax, %edx
	movsbl	-2(%rbp), %eax
	addl	%eax, %edx
	movsbl	-1(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L2
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L2:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%eax, %edx
	movsbl	-2(%rbp), %eax
	addl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L4
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L4:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-1(%rbp), %eax
	addl	%ecx, %eax
	cmpl	$7, %eax
	jne	.L5
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L5:
	movsbl	-4(%rbp), %edx
	movsbl	-3(%rbp), %eax
	addl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L6
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L6:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-2(%rbp), %eax
	leal	(%rcx,%rax), %edx
	movsbl	-1(%rbp), %eax
	addl	%edx, %eax
	cmpl	$7, %eax
	jne	.L7
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L7:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-2(%rbp), %eax
	addl	%ecx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L8
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L8:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movsbl	-1(%rbp), %eax
	addl	%ecx, %eax
	cmpl	$7, %eax
	jne	.L9
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L9:
	movsbl	-4(%rbp), %eax
	movsbl	-3(%rbp), %edx
	subl	%edx, %eax
	movsbl	-2(%rbp), %edx
	subl	%edx, %eax
	movsbl	-1(%rbp), %edx
	subl	%edx, %eax
	cmpl	$7, %eax
	jne	.L3
	movsbl	-1(%rbp), %eax
	leal	48(%rax), %esi
	movsbl	-2(%rbp), %eax
	leal	48(%rax), %ecx
	movsbl	-3(%rbp), %eax
	leal	48(%rax), %edx
	movsbl	-4(%rbp), %eax
	addl	$48, %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
