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>
#include <math.h>

int cmpfunc(const void *a, const void *b)
{
	return (*(int *)a - *(int *)b);
}

int main(void)
{
	int N, M, X, Y;
	scanf("%d %d %d %d", &N, &M, &X, &Y);

	int array[N];
	int array2[M];

	for (int i = 0; i < N; i++)
		scanf("%d", &array[i]);

	for (int i = 0; i < M; i++)
		scanf("%d", &array2[i]);

	qsort(array, N, sizeof(int), cmpfunc);
	qsort(array2, M, sizeof(int), cmpfunc);
	int C = 201;
	int res[C];

	memset(res, 0, sizeof(res[0]) * C);
	int index = 0;
    
	if (array[N-1]>=array2[0])
	{
      printf("War");
	  return 0;
	}

	for (int i = array[N-1]+1; i <=array2[0]; i++)
	{

		res[index] = i;
		index++;
	}
    int count = 0;

	for (int i = 0; i < index; i++)
	{
		if (res[i] > X && res[i] <= Y)
		{
			count++;
		}
	}

     if (count == 0)printf("War");
	 else printf("No War");

	return 0;
} 
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpfunc, .-cmpfunc
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"War"
.LC3:
	.string	"No War"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-136(%rbp), %rax
	leaq	-140(%rbp), %rcx
	leaq	-144(%rbp), %rdx
	leaq	-148(%rbp), %rsi
	movq	%rax, %r8
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-148(%rbp), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%edx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -132(%rbp)
	jmp	.L10
.L11:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -132(%rbp)
.L10:
	movl	-148(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L11
	movl	$0, -128(%rbp)
	jmp	.L12
.L13:
	movl	-128(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -128(%rbp)
.L12:
	movl	-144(%rbp), %eax
	cmpl	%eax, -128(%rbp)
	jl	.L13
	movl	-148(%rbp), %eax
	movslq	%eax, %rsi
	movq	-96(%rbp), %rax
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-144(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$201, -108(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -124(%rbp)
	movl	-148(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	-148(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	-120(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -124(%rbp)
	addl	$1, -120(%rbp)
.L19:
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -120(%rbp)
	jle	.L20
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L21
.L23:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-140(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L22
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-136(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L22
	addl	$1, -116(%rbp)
.L22:
	addl	$1, -112(%rbp)
.L21:
	movl	-112(%rbp), %eax
	cmpl	-124(%rbp), %eax
	jl	.L23
	cmpl	$0, -116(%rbp)
	jne	.L24
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L25
.L24:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L25:
	movl	$0, %eax
.L18:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmpfunc, .-cmpfunc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"War"
.LC5:
	.string	"No War"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rcx
	leaq	-68(%rbp), %rdx
	pushq	%r13
	leaq	-72(%rbp), %rsi
	leaq	-60(%rbp), %r8
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-72(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L5
.L52:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L52
.L5:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L53
.L6:
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rsp, %r13
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L7:
	cmpq	%rsi, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L53:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L6
.L8:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L54
.L9:
	leaq	3(%rsp), %r14
	movq	%r14, %rax
	andq	$-4, %r14
	shrq	$2, %rax
	movq	%rax, -88(%rbp)
	testl	%ecx, %ecx
	jle	.L10
	movq	%r13, %r15
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r15
	cmpl	%ebx, -72(%rbp)
	jg	.L11
.L10:
	movl	-68(%rbp), %eax
	testl	%eax, %eax
	jle	.L12
	movq	%r14, %r15
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r15
	cmpl	%ebx, -68(%rbp)
	jg	.L13
.L12:
	movslq	-72(%rbp), %rsi
	leaq	cmpfunc(%rip), %r12
	movl	$4, %edx
	movq	%r13, %rdi
	movq	%r12, %rcx
	call	qsort@PLT
	movslq	-68(%rbp), %rsi
	movq	%r12, %rcx
	movq	%r14, %rdi
	movl	$4, %edx
	call	qsort@PLT
	movq	%rsp, %rax
	cmpq	%rax, %rsp
	je	.L15
.L55:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rax, %rsp
	jne	.L55
.L15:
	subq	$816, %rsp
	orq	$0, 808(%rsp)
	leaq	3(%rsp), %rsi
	movq	%rsi, %rax
	andq	$-4, %rsi
	leaq	8(%rsi), %rdi
	movq	%rsi, %rcx
	shrq	$2, %rax
	movq	$0, 0(,%rax,4)
	andq	$-8, %rdi
	xorl	%eax, %eax
	movq	$0, 796(%rsi)
	subq	%rdi, %rcx
	addl	$804, %ecx
	shrl	$3, %ecx
	rep stosq
	movl	-72(%rbp), %eax
	movq	-88(%rbp), %rcx
	subl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	movl	0(,%rcx,4), %r9d
	cmpl	%r9d, %eax
	jge	.L20
	leal	1(%rax), %r8d
	cmpl	%r8d, %r9d
	jl	.L20
	movl	%r9d, %ecx
	subl	%eax, %ecx
	leal	-1(%rcx), %edi
	cmpl	$2, %edi
	jbe	.L36
	movl	%ecx, %edx
	movd	%eax, %xmm6
	movdqa	.LC4(%rip), %xmm2
	movq	%rsi, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm6, %xmm0
	paddd	.LC3(%rip), %xmm0
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L22:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movups	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L22
	movl	%ecx, %eax
	andl	$-4, %eax
	addl	%eax, %r8d
	cmpl	%eax, %ecx
	je	.L23
.L21:
	cltq
	leal	1(%r8), %edx
	leaq	(%rsi,%rax,4), %rax
	movl	%r8d, (%rax)
	cmpl	%edx, %r9d
	jl	.L23
	addl	$2, %r8d
	movl	%edx, 4(%rax)
	cmpl	%r8d, %r9d
	jl	.L23
	movl	%r8d, 8(%rax)
.L23:
	movl	-64(%rbp), %r8d
	movl	-60(%rbp), %r9d
	cmpl	$2, %edi
	jle	.L37
	movl	%ecx, %edx
	movd	%r8d, %xmm7
	movd	%r9d, %xmm6
	movq	%rsi, %rax
	shrl	$2, %edx
	pxor	%xmm1, %xmm1
	pshufd	$0, %xmm7, %xmm5
	salq	$4, %rdx
	pshufd	$0, %xmm6, %xmm4
	movdqa	%xmm1, %xmm3
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm4, %xmm0
	pcmpgtd	%xmm5, %xmm2
	pcmpeqd	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L25
	movdqa	%xmm1, %xmm0
	movl	%ecx, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	andl	$3, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	je	.L26
.L24:
	movslq	%edx, %rcx
	leaq	(%rsi,%rcx,4), %rcx
	movl	(%rcx), %esi
	cmpl	%esi, %r8d
	jge	.L27
	cmpl	%esi, %r9d
	jl	.L27
	addl	$1, %eax
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jle	.L29
.L28:
	movl	4(%rcx), %edx
	cmpl	%edx, %r8d
	jge	.L30
	cmpl	%edx, %r9d
	jl	.L30
	addl	$1, %eax
	cmpl	%edi, %esi
	jge	.L29
.L31:
	movl	8(%rcx), %edx
	cmpl	%edx, %r8d
	jge	.L26
	cmpl	%edx, %r9d
	jl	.L26
	addl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%eax, %eax
	je	.L20
.L29:
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L18:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L56
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L18
.L27:
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jg	.L28
	jmp	.L26
.L30:
	cmpl	%edi, %esi
	jl	.L31
	jmp	.L26
.L36:
	xorl	%eax, %eax
	jmp	.L21
.L37:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L24
.L54:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L9
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC4:
	.long	4
	.long	4
	.long	4
	.long	4
	.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
	.p2align 4
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	cmpfunc, .-cmpfunc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"War"
.LC5:
	.string	"No War"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rcx
	leaq	-68(%rbp), %rdx
	pushq	%r13
	leaq	-72(%rbp), %rsi
	leaq	-60(%rbp), %r8
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-72(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L5
.L52:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L52
.L5:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L53
.L6:
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rsp, %r13
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L7:
	cmpq	%rsi, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L53:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L6
.L8:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L54
.L9:
	leaq	3(%rsp), %r14
	movq	%r14, %rax
	andq	$-4, %r14
	shrq	$2, %rax
	movq	%rax, -88(%rbp)
	testl	%ecx, %ecx
	jle	.L10
	movq	%r13, %r15
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r15
	cmpl	%ebx, -72(%rbp)
	jg	.L11
.L10:
	movl	-68(%rbp), %eax
	testl	%eax, %eax
	jle	.L12
	movq	%r14, %r15
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r15
	cmpl	%ebx, -68(%rbp)
	jg	.L13
.L12:
	movslq	-72(%rbp), %rsi
	leaq	cmpfunc(%rip), %r12
	movl	$4, %edx
	movq	%r13, %rdi
	movq	%r12, %rcx
	call	qsort@PLT
	movslq	-68(%rbp), %rsi
	movq	%r12, %rcx
	movq	%r14, %rdi
	movl	$4, %edx
	call	qsort@PLT
	movq	%rsp, %rax
	cmpq	%rax, %rsp
	je	.L15
.L55:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rax, %rsp
	jne	.L55
.L15:
	subq	$816, %rsp
	orq	$0, 808(%rsp)
	leaq	3(%rsp), %rsi
	movq	%rsi, %rax
	andq	$-4, %rsi
	leaq	8(%rsi), %rdi
	movq	%rsi, %rcx
	shrq	$2, %rax
	movq	$0, 0(,%rax,4)
	andq	$-8, %rdi
	xorl	%eax, %eax
	movq	$0, 796(%rsi)
	subq	%rdi, %rcx
	addl	$804, %ecx
	shrl	$3, %ecx
	rep stosq
	movl	-72(%rbp), %eax
	movq	-88(%rbp), %rcx
	subl	$1, %eax
	cltq
	movl	0(%r13,%rax,4), %eax
	movl	0(,%rcx,4), %r9d
	cmpl	%r9d, %eax
	jge	.L20
	leal	1(%rax), %r8d
	cmpl	%r8d, %r9d
	jl	.L20
	movl	%r9d, %ecx
	subl	%eax, %ecx
	leal	-1(%rcx), %edi
	cmpl	$2, %edi
	jbe	.L36
	movl	%ecx, %edx
	movd	%eax, %xmm6
	movdqa	.LC4(%rip), %xmm2
	movq	%rsi, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm6, %xmm0
	paddd	.LC3(%rip), %xmm0
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L22:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movups	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L22
	movl	%ecx, %eax
	andl	$-4, %eax
	addl	%eax, %r8d
	cmpl	%eax, %ecx
	je	.L23
.L21:
	cltq
	leal	1(%r8), %edx
	leaq	(%rsi,%rax,4), %rax
	movl	%r8d, (%rax)
	cmpl	%edx, %r9d
	jl	.L23
	addl	$2, %r8d
	movl	%edx, 4(%rax)
	cmpl	%r8d, %r9d
	jl	.L23
	movl	%r8d, 8(%rax)
.L23:
	movl	-64(%rbp), %r8d
	movl	-60(%rbp), %r9d
	cmpl	$2, %edi
	jle	.L37
	movl	%ecx, %edx
	movd	%r8d, %xmm7
	movd	%r9d, %xmm6
	movq	%rsi, %rax
	shrl	$2, %edx
	pxor	%xmm1, %xmm1
	pshufd	$0, %xmm7, %xmm5
	salq	$4, %rdx
	pshufd	$0, %xmm6, %xmm4
	movdqa	%xmm1, %xmm3
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm4, %xmm0
	pcmpgtd	%xmm5, %xmm2
	pcmpeqd	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L25
	movdqa	%xmm1, %xmm0
	movl	%ecx, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	andl	$3, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	je	.L26
.L24:
	movslq	%edx, %rcx
	leaq	(%rsi,%rcx,4), %rcx
	movl	(%rcx), %esi
	cmpl	%esi, %r8d
	jge	.L27
	cmpl	%esi, %r9d
	jl	.L27
	addl	$1, %eax
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jle	.L29
.L28:
	movl	4(%rcx), %edx
	cmpl	%edx, %r8d
	jge	.L30
	cmpl	%edx, %r9d
	jl	.L30
	addl	$1, %eax
	cmpl	%edi, %esi
	jge	.L29
.L31:
	movl	8(%rcx), %edx
	cmpl	%edx, %r8d
	jge	.L26
	cmpl	%edx, %r9d
	jl	.L26
	addl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%eax, %eax
	je	.L20
.L29:
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L18:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L56
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L18
.L27:
	leal	1(%rdx), %esi
	cmpl	%edx, %edi
	jg	.L28
	jmp	.L26
.L30:
	cmpl	%edi, %esi
	jl	.L31
	jmp	.L26
.L36:
	xorl	%eax, %eax
	jmp	.L21
.L37:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L24
.L54:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L9
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC4:
	.long	4
	.long	4
	.long	4
	.long	4
	.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>
#include <math.h>

int cmpfunc(const void *a, const void *b)
{
	return (*(int *)a - *(int *)b);
}

int main(void)
{
	int N, M, X, Y;
	scanf("%d %d %d %d", &N, &M, &X, &Y);

	int array[N];
	int array2[M];

	for (int i = 0; i < N; i++)
		scanf("%d", &array[i]);

	for (int i = 0; i < M; i++)
		scanf("%d", &array2[i]);

	qsort(array, N, sizeof(int), cmpfunc);
	qsort(array2, M, sizeof(int), cmpfunc);
	int C = 201;
	int res[C];

	memset(res, 0, sizeof(res[0]) * C);
	int index = 0;
    
	if (array[N-1]>=array2[0])
	{
      printf("War");
	  return 0;
	}

	for (int i = array[N-1]+1; i <=array2[0]; i++)
	{

		res[index] = i;
		index++;
	}
    int count = 0;

	for (int i = 0; i < index; i++)
	{
		if (res[i] > X && res[i] <= Y)
		{
			count++;
		}
	}

     if (count == 0)printf("War");
	 else printf("No War");

	return 0;
} 

3 2 10 20
8 15 15
16 22
 4 2 -48 -1
-20 -35 -91 -23
-22 75
 5 3 6 8
-10 3 1 5 -100
101 6 14
 3 2 10 40
8 15 15
16 22
 4 2 -48 -1
-20 -35 -35 -23
-22 75
 5 3 6 8
-10 0 1 5 -100
101 6 14
 3 2 10 40
8 11 15
16 22
 4 2 -48 -1
-20 -7 -35 -23
-22 75
 5 3 6 8
-1 0 1 5 -100
101 6 14
 3 2 10 40
8 1 15
16 22

No War War War No War War War No War War War No War
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>
#include <math.h>

int cmpfunc(const void *a, const void *b)
{
	return (*(int *)a - *(int *)b);
}

int main(void)
{
	int N, M, X, Y;
	scanf("%d %d %d %d", &N, &M, &X, &Y);

	int array[N];
	int array2[M];

	for (int i = 0; i < N; i++)
		scanf("%d", &array[i]);

	for (int i = 0; i < M; i++)
		scanf("%d", &array2[i]);

	qsort(array, N, sizeof(int), cmpfunc);
	qsort(array2, M, sizeof(int), cmpfunc);
	int C = 201;
	int res[C];

	memset(res, 0, sizeof(res[0]) * C);
	int index = 0;
    
	if (array[N-1]>=array2[0])
	{
      printf("War");
	  return 0;
	}

	for (int i = array[N-1]+1; i <=array2[0]; i++)
	{

		res[index] = i;
		index++;
	}
    int count = 0;

	for (int i = 0; i < index; i++)
	{
		if (res[i] > X && res[i] <= Y)
		{
			count++;
		}
	}

     if (count == 0)printf("War");
	 else printf("No War");

	return 0;
} 
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpfunc, .-cmpfunc
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"War"
.LC3:
	.string	"No War"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-136(%rbp), %rax
	leaq	-140(%rbp), %rcx
	leaq	-144(%rbp), %rdx
	leaq	-148(%rbp), %rsi
	movq	%rax, %r8
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-148(%rbp), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%edx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -132(%rbp)
	jmp	.L10
.L11:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -132(%rbp)
.L10:
	movl	-148(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L11
	movl	$0, -128(%rbp)
	jmp	.L12
.L13:
	movl	-128(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -128(%rbp)
.L12:
	movl	-144(%rbp), %eax
	cmpl	%eax, -128(%rbp)
	jl	.L13
	movl	-148(%rbp), %eax
	movslq	%eax, %rsi
	movq	-96(%rbp), %rax
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-144(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$201, -108(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -124(%rbp)
	movl	-148(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	-148(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	-120(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -124(%rbp)
	addl	$1, -120(%rbp)
.L19:
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -120(%rbp)
	jle	.L20
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L21
.L23:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-140(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L22
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-136(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L22
	addl	$1, -116(%rbp)
.L22:
	addl	$1, -112(%rbp)
.L21:
	movl	-112(%rbp), %eax
	cmpl	-124(%rbp), %eax
	jl	.L23
	cmpl	$0, -116(%rbp)
	jne	.L24
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L25
.L24:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L25:
	movl	$0, %eax
.L18:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.globl	cmpfunc
	.type	cmpfunc, @function
cmpfunc:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpfunc, .-cmpfunc
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"War"
.LC3:
	.string	"No War"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-136(%rbp), %rax
	leaq	-140(%rbp), %rcx
	leaq	-144(%rbp), %rdx
	leaq	-148(%rbp), %rsi
	movq	%rax, %r8
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-148(%rbp), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -104(%rbp)
	movslq	%edx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -96(%rbp)
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -132(%rbp)
	jmp	.L10
.L11:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -132(%rbp)
.L10:
	movl	-148(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jl	.L11
	movl	$0, -128(%rbp)
	jmp	.L12
.L13:
	movl	-128(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -128(%rbp)
.L12:
	movl	-144(%rbp), %eax
	cmpl	%eax, -128(%rbp)
	jl	.L13
	movl	-148(%rbp), %eax
	movslq	%eax, %rsi
	movq	-96(%rbp), %rax
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-144(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmpfunc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$201, -108(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -124(%rbp)
	movl	-148(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	-148(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-96(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-124(%rbp), %edx
	movslq	%edx, %rdx
	movl	-120(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -124(%rbp)
	addl	$1, -120(%rbp)
.L19:
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -120(%rbp)
	jle	.L20
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L21
.L23:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-140(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L22
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-136(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L22
	addl	$1, -116(%rbp)
.L22:
	addl	$1, -112(%rbp)
.L21:
	movl	-112(%rbp), %eax
	cmpl	-124(%rbp), %eax
	jl	.L23
	cmpl	$0, -116(%rbp)
	jne	.L24
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L25
.L24:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L25:
	movl	$0, %eax
.L18:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
