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 q;
	scanf("%d",&q);
	while(q--){
		int a,b,c,d;
		scanf("%d%d%d%d",&a,&b,&c,&d);
		int ans=0;
		for(int i=a;i<=c;i++)for(int j=b;j<=d;j++)if(!(i%2==1&&j%2==0))ans++;
		printf("%d\n",ans);
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d\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
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	leaq	-24(%rbp), %rsi
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L3
.L8:
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L4
.L7:
	movl	-16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	-12(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
.L5:
	addl	$1, -20(%rbp)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L7
	addl	$1, -16(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L8
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	movl	-40(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -40(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 68(%rsp)
	testl	%eax, %eax
	je	.L2
	leaq	84(%rsp), %rax
	movq	%rax, 56(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L17:
	movq	40(%rsp), %rdx
	movq	56(%rsp), %r8
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	48(%rsp), %rcx
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	72(%rsp), %edx
	movl	80(%rsp), %r11d
	movdqa	.LC3(%rip), %xmm5
	movdqa	.LC4(%rip), %xmm4
	cmpl	%r11d, %edx
	jg	.L19
	movl	84(%rsp), %esi
	movl	76(%rsp), %r9d
	addl	$1, %r11d
	pxor	%xmm3, %xmm3
	movl	%esi, %ebp
	leal	1(%rsi), %ebx
	movd	%r9d, %xmm7
	subl	%r9d, %ebp
	pshufd	$0, %xmm7, %xmm6
	leal	1(%rbp), %r12d
	movl	%r12d, %r13d
	movl	%r12d, %edi
	andl	$-4, %r13d
	shrl	$2, %edi
	cmpl	$5, %ebp
	leal	(%r9,%r13), %r10d
	cmovbe	%r9d, %r10d
	xorl	%r8d, %r8d
	subl	%r9d, %ebx
	movl	%r10d, %eax
	leal	1(%r10), %r14d
	leal	3(%r10), %r15d
	andl	$1, %eax
	movl	%eax, (%rsp)
	movl	%r14d, %eax
	andl	$1, %eax
	movl	%eax, 4(%rsp)
	leal	2(%r10), %eax
	movl	%eax, 8(%rsp)
	movl	%r10d, %eax
	andl	$1, %eax
	movl	%eax, 12(%rsp)
	movl	%r15d, %eax
	andl	$1, %eax
	movl	%eax, 20(%rsp)
	leal	4(%r10), %eax
	movl	%eax, 16(%rsp)
	movl	%r10d, %eax
	addl	$5, %r10d
	andl	$1, %eax
	movl	%eax, 24(%rsp)
	movl	%r10d, %eax
	andl	$1, %eax
	movl	%eax, 28(%rsp)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L5:
	addl	%ebx, %r8d
.L4:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L3
.L16:
	cmpl	%esi, %r9d
	jg	.L4
	movl	%edx, %ecx
	shrl	$31, %ecx
	leal	(%rdx,%rcx), %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L5
	cmpl	$5, %ebp
	jbe	.L6
	movdqa	.LC2(%rip), %xmm2
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	paddd	%xmm6, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addl	$1, %eax
	paddd	%xmm5, %xmm2
	pand	%xmm4, %xmm0
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpl	%eax, %edi
	jne	.L7
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	cmpl	%r13d, %r12d
	je	.L4
.L6:
	cmpl	$1, (%rsp)
	sbbl	$-1, %r8d
	cmpl	%esi, %r14d
	jg	.L4
	cmpl	$1, 4(%rsp)
	sbbl	$-1, %r8d
	cmpl	8(%rsp), %esi
	jl	.L4
	cmpl	$1, 12(%rsp)
	sbbl	$-1, %r8d
	cmpl	%r15d, %esi
	jl	.L4
	cmpl	$1, 20(%rsp)
	sbbl	$-1, %r8d
	cmpl	16(%rsp), %esi
	jl	.L4
	cmpl	$1, 24(%rsp)
	sbbl	$-1, %r8d
	cmpl	%r10d, %esi
	jl	.L4
	cmpl	$1, 28(%rsp)
	sbbl	$-1, %r8d
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L16
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	68(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 68(%rsp)
	testl	%eax, %eax
	jne	.L17
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L3
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 68(%rsp)
	testl	%eax, %eax
	je	.L2
	leaq	84(%rsp), %rax
	movq	%rax, 56(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L17:
	movq	40(%rsp), %rdx
	movq	56(%rsp), %r8
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	48(%rsp), %rcx
	movq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	72(%rsp), %edx
	movl	80(%rsp), %r11d
	movdqa	.LC3(%rip), %xmm5
	movdqa	.LC4(%rip), %xmm4
	cmpl	%r11d, %edx
	jg	.L19
	movl	84(%rsp), %esi
	movl	76(%rsp), %r9d
	addl	$1, %r11d
	pxor	%xmm3, %xmm3
	movl	%esi, %ebp
	leal	1(%rsi), %ebx
	movd	%r9d, %xmm7
	subl	%r9d, %ebp
	pshufd	$0, %xmm7, %xmm6
	leal	1(%rbp), %r12d
	movl	%r12d, %r13d
	movl	%r12d, %edi
	andl	$-4, %r13d
	shrl	$2, %edi
	cmpl	$5, %ebp
	leal	(%r9,%r13), %r10d
	cmovbe	%r9d, %r10d
	xorl	%r8d, %r8d
	subl	%r9d, %ebx
	movl	%r10d, %eax
	leal	1(%r10), %r14d
	leal	3(%r10), %r15d
	andl	$1, %eax
	movl	%eax, (%rsp)
	movl	%r14d, %eax
	andl	$1, %eax
	movl	%eax, 4(%rsp)
	leal	2(%r10), %eax
	movl	%eax, 8(%rsp)
	movl	%r10d, %eax
	andl	$1, %eax
	movl	%eax, 12(%rsp)
	movl	%r15d, %eax
	andl	$1, %eax
	movl	%eax, 20(%rsp)
	leal	4(%r10), %eax
	movl	%eax, 16(%rsp)
	movl	%r10d, %eax
	addl	$5, %r10d
	andl	$1, %eax
	movl	%eax, 24(%rsp)
	movl	%r10d, %eax
	andl	$1, %eax
	movl	%eax, 28(%rsp)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L5:
	addl	%ebx, %r8d
.L4:
	addl	$1, %edx
	cmpl	%r11d, %edx
	je	.L3
.L16:
	cmpl	%esi, %r9d
	jg	.L4
	movl	%edx, %ecx
	shrl	$31, %ecx
	leal	(%rdx,%rcx), %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L5
	cmpl	$5, %ebp
	jbe	.L6
	movdqa	.LC2(%rip), %xmm2
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	paddd	%xmm6, %xmm2
	.p2align 4,,10
	.p2align 3
.L7:
	movdqa	%xmm2, %xmm0
	addl	$1, %eax
	paddd	%xmm5, %xmm2
	pand	%xmm4, %xmm0
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm1
	cmpl	%eax, %edi
	jne	.L7
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	addl	%eax, %r8d
	cmpl	%r13d, %r12d
	je	.L4
.L6:
	cmpl	$1, (%rsp)
	sbbl	$-1, %r8d
	cmpl	%esi, %r14d
	jg	.L4
	cmpl	$1, 4(%rsp)
	sbbl	$-1, %r8d
	cmpl	8(%rsp), %esi
	jl	.L4
	cmpl	$1, 12(%rsp)
	sbbl	$-1, %r8d
	cmpl	%r15d, %esi
	jl	.L4
	cmpl	$1, 20(%rsp)
	sbbl	$-1, %r8d
	cmpl	16(%rsp), %esi
	jl	.L4
	cmpl	$1, 24(%rsp)
	sbbl	$-1, %r8d
	cmpl	%r10d, %esi
	jl	.L4
	cmpl	$1, 28(%rsp)
	sbbl	$-1, %r8d
	addl	$1, %edx
	cmpl	%r11d, %edx
	jne	.L16
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	68(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 68(%rsp)
	testl	%eax, %eax
	jne	.L17
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L3
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 q;
	scanf("%d",&q);
	while(q--){
		int a,b,c,d;
		scanf("%d%d%d%d",&a,&b,&c,&d);
		int ans=0;
		for(int i=a;i<=c;i++)for(int j=b;j<=d;j++)if(!(i%2==1&&j%2==0))ans++;
		printf("%d\n",ans);
	}
}

3
1 1 8 8
2 4 3 8
8 3 8 8
 3
1 1 8 8
2 3 3 8
8 3 8 8
 3
1 1 8 7
2 3 3 8
8 3 8 8
 3
1 1 8 7
2 3 3 4
8 3 8 8
 3
1 1 8 7
2 3 3 4
8 3 8 2
 3
1 1 1 8
2 3 3 8
8 3 8 8
 3
1 1 8 7
2 3 3 8
8 3 8 3
 3
1 1 8 7
2 3 3 6
8 3 8 8
 3
1 1 8 7
2 1 3 4
8 3 8 2
 3
1 1 8 7
2 3 3 8
8 3 8 5

48
7
6
 48
9
6
 44
9
6
 44
3
6
 44
3
0
 4
9
6
 44
9
1
 44
6
6
 44
6
0
 44
9
3

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 q;
	scanf("%d",&q);
	while(q--){
		int a,b,c,d;
		scanf("%d%d%d%d",&a,&b,&c,&d);
		int ans=0;
		for(int i=a;i<=c;i++)for(int j=b;j<=d;j++)if(!(i%2==1&&j%2==0))ans++;
		printf("%d\n",ans);
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d\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
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	leaq	-24(%rbp), %rsi
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L3
.L8:
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L4
.L7:
	movl	-16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	-12(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
.L5:
	addl	$1, -20(%rbp)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L7
	addl	$1, -16(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L8
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	movl	-40(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -40(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d\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
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	leaq	-24(%rbp), %rsi
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L3
.L8:
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L4
.L7:
	movl	-16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	-12(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L6
.L5:
	addl	$1, -20(%rbp)
.L6:
	addl	$1, -12(%rbp)
.L4:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L7
	addl	$1, -16(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L8
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	movl	-40(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -40(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
