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>
#include<stdlib.h>
#include<string.h>
#include<math.h>
 
#define sl(x) scanf("%ld", &x)
#define ss(x) scanf("%s", x)
#define pl(x) printf("%ld\n", x)
#define ps(x) printf("%s\n", x)
 
#define INF 100000000000
#define MOD 1000000007
 
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
 
int main() {
	long N, K;
	long ai, ao, at, aj, al, as, az;
	long i, j;
	long tmp;
	long ans = 0;
	long min_i, max_i;
	
	sl(ai); sl(ao); sl(at); sl(aj); sl(al); sl(as); sl(az);
	
	tmp = 0;
	if(ai % 2) tmp++;
	if(aj % 2) tmp++;
	if(al % 2) tmp++;
	
	if(tmp == 1 || ai == 0 || aj == 0 || al == 0) {
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	} else if(tmp == 2) {
		ans += 3;
		ai--; aj--; al--;
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	} else {
		ans += MIN(ai, MIN(aj, al)) * 3;
		ai -= (ans / 3);
		aj -= (ans / 3);
		al -= (ans / 3);
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	}
	
	pl(ans);
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L2
	addq	$1, -24(%rbp)
.L2:
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	addq	$1, -24(%rbp)
.L3:
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L4
	addq	$1, -24(%rbp)
.L4:
	cmpq	$1, -24(%rbp)
	je	.L5
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	je	.L5
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	.L5
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	.L6
.L5:
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L7
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L8
.L7:
	movq	-80(%rbp), %rax
.L8:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L9
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L10
.L9:
	movq	-56(%rbp), %rax
.L10:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L11
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L12
.L11:
	movq	-48(%rbp), %rax
.L12:
	addq	%rax, -16(%rbp)
	jmp	.L13
.L6:
	cmpq	$2, -24(%rbp)
	jne	.L14
	addq	$3, -16(%rbp)
	movq	-80(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movq	-56(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -48(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L15
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L16
.L15:
	movq	-80(%rbp), %rax
.L16:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L17
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L18
.L17:
	movq	-56(%rbp), %rax
.L18:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L19
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L20
.L19:
	movq	-48(%rbp), %rax
.L20:
	addq	%rax, -16(%rbp)
	jmp	.L13
.L14:
	movq	-48(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	-80(%rbp), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -80(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -56(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -48(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L21
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L22
.L21:
	movq	-80(%rbp), %rax
.L22:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L23
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L24
.L23:
	movq	-56(%rbp), %rax
.L24:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L25
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L26
.L25:
	movq	-48(%rbp), %rax
.L26:
	addq	%rax, -16(%rbp)
.L13:
	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	.L28
	call	__stack_chk_fail@PLT
.L28:
	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	"%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	32(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	40(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	48(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rcx
	movq	24(%rsp), %rsi
	movq	32(%rsp), %rdi
	movq	%rcx, %r10
	movq	%rsi, %r9
	andl	$1, %r10d
	andl	$1, %r9d
	movq	%rdi, %r8
	cmpq	$1, %r9
	movq	%r10, %rdx
	sbbq	$-1, %rdx
	andl	$1, %r8d
	cmpq	$1, %r8
	sbbq	$-1, %rdx
	testq	%rsi, %rsi
	sete	%al
	testq	%rcx, %rcx
	sete	%r11b
	orl	%r11d, %eax
	testq	%rdi, %rdi
	sete	%r11b
	orb	%r11b, %al
	jne	.L18
	cmpq	$1, %rdx
	jne	.L4
.L18:
	cmpq	$1, %r10
	adcq	$-1, %rcx
	addq	8(%rsp), %rcx
	cmpq	$1, %r9
	adcq	$-1, %rsi
	addq	%rsi, %rcx
	cmpq	$1, %r8
	adcq	$-1, %rdi
	leaq	(%rdi,%rcx), %rdx
.L9:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	cmpq	$2, %rdx
	je	.L47
	cmpq	%rsi, %rcx
	movq	%rsi, %r8
	movq	$-3, %r9
	cmovle	%rcx, %r8
	cmpq	%rdi, %r8
	cmovg	%rdi, %r8
	leaq	(%r8,%r8,2), %r8
	movq	%r8, %rax
	cqto
	idivq	%r9
	addq	%rax, %rcx
	addq	%rax, %rsi
	leaq	(%rdi,%rax), %rdx
	movq	%rcx, %rax
	movq	%rcx, (%rsp)
	andl	$1, %eax
	movq	%rsi, 24(%rsp)
	cmpq	$1, %rax
	movq	%rsi, %rax
	movq	%rdx, 32(%rsp)
	adcq	$-1, %rcx
	andl	$1, %eax
	addq	%rcx, %r8
	addq	8(%rsp), %r8
	cmpq	$1, %rax
	movq	%rdx, %rax
	adcq	$-1, %rsi
	andl	$1, %eax
	addq	%r8, %rsi
	cmpq	$1, %rax
	adcq	$-1, %rdx
	addq	%rsi, %rdx
	jmp	.L9
.L47:
	leaq	-1(%rcx), %r8
	leaq	-1(%rsi), %rax
	leaq	-1(%rdi), %rdx
	movq	%r8, (%rsp)
	movq	%rax, 24(%rsp)
	movq	%rdx, 32(%rsp)
	testb	$1, %r8b
	je	.L11
	leaq	-2(%rcx), %r8
.L11:
	movq	8(%rsp), %rcx
	leaq	3(%r8,%rcx), %rcx
	testb	$1, %al
	je	.L12
	leaq	-2(%rsi), %rax
.L12:
	addq	%rcx, %rax
	testb	$1, %dl
	je	.L13
	leaq	-2(%rdi), %rdx
.L13:
	addq	%rax, %rdx
	jmp	.L9
.L46:
	call	__stack_chk_fail@PLT
	.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	"%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	24(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	32(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	40(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	48(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rcx
	movq	24(%rsp), %rsi
	movq	32(%rsp), %rdi
	movq	%rcx, %r10
	movq	%rsi, %r9
	andl	$1, %r10d
	andl	$1, %r9d
	movq	%rdi, %r8
	cmpq	$1, %r9
	movq	%r10, %rdx
	sbbq	$-1, %rdx
	andl	$1, %r8d
	cmpq	$1, %r8
	sbbq	$-1, %rdx
	testq	%rsi, %rsi
	sete	%al
	testq	%rcx, %rcx
	sete	%r11b
	orl	%r11d, %eax
	testq	%rdi, %rdi
	sete	%r11b
	orb	%r11b, %al
	jne	.L18
	cmpq	$1, %rdx
	jne	.L4
.L18:
	cmpq	$1, %r10
	adcq	$-1, %rcx
	addq	8(%rsp), %rcx
	cmpq	$1, %r9
	adcq	$-1, %rsi
	addq	%rsi, %rcx
	cmpq	$1, %r8
	adcq	$-1, %rdi
	leaq	(%rdi,%rcx), %rdx
.L9:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	cmpq	$2, %rdx
	je	.L47
	cmpq	%rsi, %rcx
	movq	%rsi, %r8
	movq	$-3, %r9
	cmovle	%rcx, %r8
	cmpq	%rdi, %r8
	cmovg	%rdi, %r8
	leaq	(%r8,%r8,2), %r8
	movq	%r8, %rax
	cqto
	idivq	%r9
	addq	%rax, %rcx
	addq	%rax, %rsi
	leaq	(%rdi,%rax), %rdx
	movq	%rcx, %rax
	movq	%rcx, (%rsp)
	andl	$1, %eax
	movq	%rsi, 24(%rsp)
	cmpq	$1, %rax
	movq	%rsi, %rax
	movq	%rdx, 32(%rsp)
	adcq	$-1, %rcx
	andl	$1, %eax
	addq	%rcx, %r8
	addq	8(%rsp), %r8
	cmpq	$1, %rax
	movq	%rdx, %rax
	adcq	$-1, %rsi
	andl	$1, %eax
	addq	%r8, %rsi
	cmpq	$1, %rax
	adcq	$-1, %rdx
	addq	%rsi, %rdx
	jmp	.L9
.L47:
	leaq	-1(%rcx), %r8
	leaq	-1(%rsi), %rax
	leaq	-1(%rdi), %rdx
	movq	%r8, (%rsp)
	movq	%rax, 24(%rsp)
	movq	%rdx, 32(%rsp)
	testb	$1, %r8b
	je	.L11
	leaq	-2(%rcx), %r8
.L11:
	movq	8(%rsp), %rcx
	leaq	3(%r8,%rcx), %rcx
	testb	$1, %al
	je	.L12
	leaq	-2(%rsi), %rax
.L12:
	addq	%rcx, %rax
	testb	$1, %dl
	je	.L13
	leaq	-2(%rdi), %rdx
.L13:
	addq	%rax, %rdx
	jmp	.L9
.L46:
	call	__stack_chk_fail@PLT
	.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<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
 
#define sl(x) scanf("%ld", &x)
#define ss(x) scanf("%s", x)
#define pl(x) printf("%ld\n", x)
#define ps(x) printf("%s\n", x)
 
#define INF 100000000000
#define MOD 1000000007
 
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
 
int main() {
	long N, K;
	long ai, ao, at, aj, al, as, az;
	long i, j;
	long tmp;
	long ans = 0;
	long min_i, max_i;
	
	sl(ai); sl(ao); sl(at); sl(aj); sl(al); sl(as); sl(az);
	
	tmp = 0;
	if(ai % 2) tmp++;
	if(aj % 2) tmp++;
	if(al % 2) tmp++;
	
	if(tmp == 1 || ai == 0 || aj == 0 || al == 0) {
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	} else if(tmp == 2) {
		ans += 3;
		ai--; aj--; al--;
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	} else {
		ans += MIN(ai, MIN(aj, al)) * 3;
		ai -= (ans / 3);
		aj -= (ans / 3);
		al -= (ans / 3);
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	}
	
	pl(ans);
	
	return 0;
}
0 0 10 0 1 0 0
 1 1 1 0 0 0 0
 0 0 -1 0 2 0 2
 4 0 1 0 0 0 0
 0 3 0 0 1 0 0
 0 3 0 0 2 0 0
 6 0 2 0 0 0 0
 11 0 2 0 0 0 0
 14 0 2 0 0 0 0
 2 5 1 0 1 2 2

0
 1
 2
 4
 3
 5
 6
 10
 14
 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>
#include<stdlib.h>
#include<string.h>
#include<math.h>
 
#define sl(x) scanf("%ld", &x)
#define ss(x) scanf("%s", x)
#define pl(x) printf("%ld\n", x)
#define ps(x) printf("%s\n", x)
 
#define INF 100000000000
#define MOD 1000000007
 
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
 
int main() {
	long N, K;
	long ai, ao, at, aj, al, as, az;
	long i, j;
	long tmp;
	long ans = 0;
	long min_i, max_i;
	
	sl(ai); sl(ao); sl(at); sl(aj); sl(al); sl(as); sl(az);
	
	tmp = 0;
	if(ai % 2) tmp++;
	if(aj % 2) tmp++;
	if(al % 2) tmp++;
	
	if(tmp == 1 || ai == 0 || aj == 0 || al == 0) {
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	} else if(tmp == 2) {
		ans += 3;
		ai--; aj--; al--;
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	} else {
		ans += MIN(ai, MIN(aj, al)) * 3;
		ai -= (ans / 3);
		aj -= (ans / 3);
		al -= (ans / 3);
		ans += (ai % 2 ? ai - 1 : ai);
		ans += ao;
		ans += (aj % 2 ? aj - 1 : aj);
		ans += (al % 2 ? al - 1 : al);
	}
	
	pl(ans);
	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L2
	addq	$1, -24(%rbp)
.L2:
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	addq	$1, -24(%rbp)
.L3:
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L4
	addq	$1, -24(%rbp)
.L4:
	cmpq	$1, -24(%rbp)
	je	.L5
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	je	.L5
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	.L5
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	.L6
.L5:
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L7
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L8
.L7:
	movq	-80(%rbp), %rax
.L8:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L9
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L10
.L9:
	movq	-56(%rbp), %rax
.L10:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L11
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L12
.L11:
	movq	-48(%rbp), %rax
.L12:
	addq	%rax, -16(%rbp)
	jmp	.L13
.L6:
	cmpq	$2, -24(%rbp)
	jne	.L14
	addq	$3, -16(%rbp)
	movq	-80(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movq	-56(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -48(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L15
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L16
.L15:
	movq	-80(%rbp), %rax
.L16:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L17
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L18
.L17:
	movq	-56(%rbp), %rax
.L18:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L19
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L20
.L19:
	movq	-48(%rbp), %rax
.L20:
	addq	%rax, -16(%rbp)
	jmp	.L13
.L14:
	movq	-48(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	-80(%rbp), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -80(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -56(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -48(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L21
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L22
.L21:
	movq	-80(%rbp), %rax
.L22:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L23
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L24
.L23:
	movq	-56(%rbp), %rax
.L24:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L25
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L26
.L25:
	movq	-48(%rbp), %rax
.L26:
	addq	%rax, -16(%rbp)
.L13:
	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	.L28
	call	__stack_chk_fail@PLT
.L28:
	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	"%ld"
.LC1:
	.string	"%ld\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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L2
	addq	$1, -24(%rbp)
.L2:
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	addq	$1, -24(%rbp)
.L3:
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L4
	addq	$1, -24(%rbp)
.L4:
	cmpq	$1, -24(%rbp)
	je	.L5
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	je	.L5
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	.L5
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	.L6
.L5:
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L7
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L8
.L7:
	movq	-80(%rbp), %rax
.L8:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L9
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L10
.L9:
	movq	-56(%rbp), %rax
.L10:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L11
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L12
.L11:
	movq	-48(%rbp), %rax
.L12:
	addq	%rax, -16(%rbp)
	jmp	.L13
.L6:
	cmpq	$2, -24(%rbp)
	jne	.L14
	addq	$3, -16(%rbp)
	movq	-80(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movq	-56(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -48(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L15
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L16
.L15:
	movq	-80(%rbp), %rax
.L16:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L17
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L18
.L17:
	movq	-56(%rbp), %rax
.L18:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L19
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L20
.L19:
	movq	-48(%rbp), %rax
.L20:
	addq	%rax, -16(%rbp)
	jmp	.L13
.L14:
	movq	-48(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	-80(%rbp), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -80(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-56(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -56(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -48(%rbp)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L21
	movq	-80(%rbp), %rax
	subq	$1, %rax
	jmp	.L22
.L21:
	movq	-80(%rbp), %rax
.L22:
	addq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-56(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L23
	movq	-56(%rbp), %rax
	subq	$1, %rax
	jmp	.L24
.L23:
	movq	-56(%rbp), %rax
.L24:
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L25
	movq	-48(%rbp), %rax
	subq	$1, %rax
	jmp	.L26
.L25:
	movq	-48(%rbp), %rax
.L26:
	addq	%rax, -16(%rbp)
.L13:
	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	.L28
	call	__stack_chk_fail@PLT
.L28:
	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:
