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

```c
#include<stdio.h>
int M,Nmin,Nmax,P[300],g,r,i;
int main()
{
	for(;scanf("%d%d%d",&M,&Nmin,&Nmax),M;)
	{
		Nmin--;Nmax--;
		g=0;r=0;
		for(i=0;i<M;i++)scanf("%d",&P[i]);
		for(i=Nmax;i>=Nmin;i--)
		{
			if(g<P[i]-P[i+1])
			{
				g=P[i]-P[i+1];
				r=i+1;
			}
		}
		printf("%d\n",r);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d"
	.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	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	Nmax(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	Nmin(%rip), %rdx
	movq	%r13, %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	je	.L26
	movl	Nmin(%rip), %eax
	movl	Nmax(%rip), %edi
	movl	$0, g(%rip)
	movl	$0, r(%rip)
	movl	$0, i(%rip)
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movl	%eax, Nmin(%rip)
	movl	%ecx, Nmax(%rip)
	testl	%edx, %edx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	M(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L4
	movl	Nmax(%rip), %ecx
	movl	Nmin(%rip), %eax
.L3:
	movl	%ecx, i(%rip)
	cmpl	%eax, %ecx
	jl	.L24
	movslq	%ecx, %rsi
	leal	-1(%rcx), %edi
	movl	g(%rip), %edx
	salq	$2, %rsi
	leaq	4(%rbx,%rsi), %r8
	cmpl	%eax, %edi
	jle	.L15
	movl	(%r8), %r9d
	leal	-2(%rcx), %r8d
	movl	%eax, 12(%rsp)
	addq	%rbx, %rsi
	movl	%r8d, %edi
	movl	%r8d, %r14d
	subl	%eax, %edi
	andl	$-2, %edi
	subl	%edi, %r14d
	xorl	%edi, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rsi), %r9d
	movl	%edx, %r10d
	movl	%r12d, %eax
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jl	.L17
.L28:
	movl	%eax, %r12d
	movl	%r10d, %edx
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	je	.L22
.L29:
	subl	$2, %r8d
.L10:
	movl	(%rsi), %r11d
	leal	1(%rcx), %eax
	movl	%r11d, %r10d
	subl	%r9d, %r10d
	cmpl	%edx, %r10d
	jle	.L27
	movl	-4(%rsi), %r9d
	movl	$1, %edi
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jge	.L28
.L17:
	movl	%ecx, %r12d
	movl	$1, %edi
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	jne	.L29
.L22:
	movl	12(%rsp), %eax
.L7:
	movslq	%r14d, %rcx
	leaq	4+P(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rbx,%rcx,4), %esi
	subl	(%r9,%rcx,4), %esi
	leal	1(%rcx), %r8d
	cmpl	%esi, %edx
	jge	.L11
	movl	%r8d, %r12d
	movl	%esi, %edx
	movl	$1, %edi
.L11:
	subq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
	subl	$1, %eax
	movl	%eax, i(%rip)
	testb	%dil, %dil
	je	.L24
	movl	%r12d, r(%rip)
	movl	%edx, g(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	movl	r(%rip), %r12d
.L6:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$24, %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
.L15:
	.cfi_restore_state
	movl	%ecx, %r14d
	xorl	%edi, %edi
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1200
P:
	.zero	1200
	.globl	Nmax
	.align 4
	.type	Nmax, @object
	.size	Nmax, 4
Nmax:
	.zero	4
	.globl	Nmin
	.align 4
	.type	Nmin, @object
	.size	Nmin, 4
Nmin:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d"
	.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	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	Nmax(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	Nmin(%rip), %rdx
	movq	%r13, %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	je	.L26
	movl	Nmin(%rip), %eax
	movl	Nmax(%rip), %edi
	movl	$0, g(%rip)
	movl	$0, r(%rip)
	movl	$0, i(%rip)
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movl	%eax, Nmin(%rip)
	movl	%ecx, Nmax(%rip)
	testl	%edx, %edx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	M(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L4
	movl	Nmax(%rip), %ecx
	movl	Nmin(%rip), %eax
.L3:
	movl	%ecx, i(%rip)
	cmpl	%eax, %ecx
	jl	.L24
	movslq	%ecx, %rsi
	leal	-1(%rcx), %edi
	movl	g(%rip), %edx
	salq	$2, %rsi
	leaq	4(%rbx,%rsi), %r8
	cmpl	%eax, %edi
	jle	.L15
	movl	(%r8), %r9d
	leal	-2(%rcx), %r8d
	movl	%eax, 12(%rsp)
	addq	%rbx, %rsi
	movl	%r8d, %edi
	movl	%r8d, %r14d
	subl	%eax, %edi
	andl	$-2, %edi
	subl	%edi, %r14d
	xorl	%edi, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rsi), %r9d
	movl	%edx, %r10d
	movl	%r12d, %eax
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jl	.L17
.L28:
	movl	%eax, %r12d
	movl	%r10d, %edx
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	je	.L22
.L29:
	subl	$2, %r8d
.L10:
	movl	(%rsi), %r11d
	leal	1(%rcx), %eax
	movl	%r11d, %r10d
	subl	%r9d, %r10d
	cmpl	%edx, %r10d
	jle	.L27
	movl	-4(%rsi), %r9d
	movl	$1, %edi
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jge	.L28
.L17:
	movl	%ecx, %r12d
	movl	$1, %edi
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	jne	.L29
.L22:
	movl	12(%rsp), %eax
.L7:
	movslq	%r14d, %rcx
	leaq	4+P(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rbx,%rcx,4), %esi
	subl	(%r9,%rcx,4), %esi
	leal	1(%rcx), %r8d
	cmpl	%esi, %edx
	jge	.L11
	movl	%r8d, %r12d
	movl	%esi, %edx
	movl	$1, %edi
.L11:
	subq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
	subl	$1, %eax
	movl	%eax, i(%rip)
	testb	%dil, %dil
	je	.L24
	movl	%r12d, r(%rip)
	movl	%edx, g(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	movl	r(%rip), %r12d
.L6:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$24, %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
.L15:
	.cfi_restore_state
	movl	%ecx, %r14d
	xorl	%edi, %edi
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1200
P:
	.zero	1200
	.globl	Nmax
	.align 4
	.type	Nmax, @object
	.size	Nmax, 4
Nmax:
	.zero	4
	.globl	Nmin
	.align 4
	.type	Nmin, @object
	.size	Nmin, 4
Nmin:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d"
	.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	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	Nmax(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	Nmin(%rip), %rdx
	movq	%r13, %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	je	.L26
	movl	Nmin(%rip), %eax
	movl	Nmax(%rip), %edi
	movl	$0, g(%rip)
	movl	$0, r(%rip)
	movl	$0, i(%rip)
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movl	%eax, Nmin(%rip)
	movl	%ecx, Nmax(%rip)
	testl	%edx, %edx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	M(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L4
	movl	Nmax(%rip), %ecx
	movl	Nmin(%rip), %eax
.L3:
	movl	%ecx, i(%rip)
	cmpl	%eax, %ecx
	jl	.L24
	movslq	%ecx, %rsi
	leal	-1(%rcx), %edi
	movl	g(%rip), %edx
	salq	$2, %rsi
	leaq	4(%rbx,%rsi), %r8
	cmpl	%eax, %edi
	jle	.L15
	movl	(%r8), %r9d
	leal	-2(%rcx), %r8d
	movl	%eax, 12(%rsp)
	addq	%rbx, %rsi
	movl	%r8d, %edi
	movl	%r8d, %r14d
	subl	%eax, %edi
	andl	$-2, %edi
	subl	%edi, %r14d
	xorl	%edi, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rsi), %r9d
	movl	%edx, %r10d
	movl	%r12d, %eax
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jl	.L17
.L28:
	movl	%eax, %r12d
	movl	%r10d, %edx
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	je	.L22
.L29:
	subl	$2, %r8d
.L10:
	movl	(%rsi), %r11d
	leal	1(%rcx), %eax
	movl	%r11d, %r10d
	subl	%r9d, %r10d
	cmpl	%edx, %r10d
	jle	.L27
	movl	-4(%rsi), %r9d
	movl	$1, %edi
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jge	.L28
.L17:
	movl	%ecx, %r12d
	movl	$1, %edi
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	jne	.L29
.L22:
	movl	12(%rsp), %eax
.L7:
	movslq	%r14d, %rcx
	leaq	4+P(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rbx,%rcx,4), %esi
	subl	(%r9,%rcx,4), %esi
	leal	1(%rcx), %r8d
	cmpl	%esi, %edx
	jge	.L11
	movl	%r8d, %r12d
	movl	%esi, %edx
	movl	$1, %edi
.L11:
	subq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
	subl	$1, %eax
	movl	%eax, i(%rip)
	testb	%dil, %dil
	je	.L24
	movl	%r12d, r(%rip)
	movl	%edx, g(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	movl	r(%rip), %r12d
.L6:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$24, %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
.L15:
	.cfi_restore_state
	movl	%ecx, %r14d
	xorl	%edi, %edi
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1200
P:
	.zero	1200
	.globl	Nmax
	.align 4
	.type	Nmax, @object
	.size	Nmax, 4
Nmax:
	.zero	4
	.globl	Nmin
	.align 4
	.type	Nmin, @object
	.size	Nmin, 4
Nmin:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	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:
```
```c
#include<stdio.h>
int M,Nmin,Nmax,P[300],g,r,i;
int main()
{
	for(;scanf("%d%d%d",&M,&Nmin,&Nmax),M;)
	{
		Nmin--;Nmax--;
		g=0;r=0;
		for(i=0;i<M;i++)scanf("%d",&P[i]);
		for(i=Nmax;i>=Nmin;i--)
		{
			if(g<P[i]-P[i+1])
			{
				g=P[i]-P[i+1];
				r=i+1;
			}
		}
		printf("%d\n",r);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int M,Nmin,Nmax,P[300],g,r,i;
int main()
{
	for(;scanf("%d%d%d",&M,&Nmin,&Nmax),M;)
	{
		Nmin--;Nmax--;
		g=0;r=0;
		for(i=0;i<M;i++)scanf("%d",&P[i]);
		for(i=Nmax;i>=Nmin;i--)
		{
			if(g<P[i]-P[i+1])
			{
				g=P[i]-P[i+1];
				r=i+1;
			}
		}
		printf("%d\n",r);
	}
	return 0;
}```

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.
Optimized Assembly Code:

5 2 4
100
90
82
70
65
5 2 4
100
90
80
75
65
3 1 2
5000
6502
3000
4 2 3
10000
10000
8000
8000
4 2 3
10000
10000
10000
8000
5 2 3
100
80
68
60
45
0 0 0
 5 2 4
100
90
82
94
65
5 2 4
100
90
80
144
65
3 1 2
5000
6502
3000
4 2 3
10000
10000
8000
8000
4 1 3
10000
10000
10000
8000
5 2 3
100
80
68
60
45
0 0 0
 5 2 3
100
90
82
70
65
5 2 4
100
90
25
144
65
3 1 2
5000
6502
3000
4 2 3
10000
10000
8000
8000
4 1 3
10000
10000
10000
8000
5 2 3
100
80
68
29
45
0 0 0
 5 2 4
100
90
82
70
65
5 2 4
100
170
80
75
65
3 1 2
5000
6502
3000
4 2 3
10000
10100
8000
8000
4 2 3
10000
10000
10000
8000
5 2 3
100
80
68
60
66
0 0 0
 5 2 3
100
161
82
70
65
5 2 4
100
90
25
144
65
3 1 2
5000
6502
3000
4 2 3
10000
10000
8000
8000
4 1 3
10000
10000
10000
8000
5 2 3
100
80
68
29
12
0 0 0
 5 2 4
100
90
82
70
65
5 2 4
100
90
80
144
65
3 1 2
5000
6502
3000
4 2 3
10000
10000
8000
8000
4 1 3
10000
10000
10000
8000
5 1 3
100
80
68
60
45
0 0 0
 5 2 3
100
90
82
70
65
5 2 4
100
90
25
144
65
3 1 2
5000
6502
3000
4 2 3
10000
10000
8000
4583
4 1 3
10000
10000
10000
8000
5 2 3
100
80
68
60
45
0 0 0
 5 2 4
100
90
82
70
65
5 4 4
100
90
80
115
65
3 1 2
5784
4000
3000
4 2 3
10000
10000
8000
8000
4 2 3
10000
10000
10000
8000
5 2 3
100
80
68
60
45
0 0 0
 5 2 4
100
90
82
70
65
5 2 4
100
170
80
75
65
3 1 2
5000
6502
3000
4 2 3
10000
10100
8000
8000
4 2 3
10000
10000
10000
8000
5 2 3
100
80
136
60
111
0 0 0
 5 2 4
100
90
82
70
13
5 4 4
100
90
80
115
65
3 1 2
5784
4000
3000
4 2 3
10000
10000
8000
8000
4 2 3
10000
10000
10000
8000
5 2 3
100
80
68
60
45
0 0 0

3
4
2
2
3
2
 4
4
2
2
3
2
 3
4
2
2
3
3
 3
2
2
2
3
2
 2
4
2
2
3
3
 3
4
2
2
3
1
 3
4
2
3
3
2
 3
4
1
2
3
2
 3
2
2
2
3
3
 4
4
1
2
3
2

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

```c
#include<stdio.h>
int M,Nmin,Nmax,P[300],g,r,i;
int main()
{
	for(;scanf("%d%d%d",&M,&Nmin,&Nmax),M;)
	{
		Nmin--;Nmax--;
		g=0;r=0;
		for(i=0;i<M;i++)scanf("%d",&P[i]);
		for(i=Nmax;i>=Nmin;i--)
		{
			if(g<P[i]-P[i+1])
			{
				g=P[i]-P[i+1];
				r=i+1;
			}
		}
		printf("%d\n",r);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d"
	.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	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	Nmax(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	Nmin(%rip), %rdx
	movq	%r13, %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	je	.L26
	movl	Nmin(%rip), %eax
	movl	Nmax(%rip), %edi
	movl	$0, g(%rip)
	movl	$0, r(%rip)
	movl	$0, i(%rip)
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movl	%eax, Nmin(%rip)
	movl	%ecx, Nmax(%rip)
	testl	%edx, %edx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	M(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L4
	movl	Nmax(%rip), %ecx
	movl	Nmin(%rip), %eax
.L3:
	movl	%ecx, i(%rip)
	cmpl	%eax, %ecx
	jl	.L24
	movslq	%ecx, %rsi
	leal	-1(%rcx), %edi
	movl	g(%rip), %edx
	salq	$2, %rsi
	leaq	4(%rbx,%rsi), %r8
	cmpl	%eax, %edi
	jle	.L15
	movl	(%r8), %r9d
	leal	-2(%rcx), %r8d
	movl	%eax, 12(%rsp)
	addq	%rbx, %rsi
	movl	%r8d, %edi
	movl	%r8d, %r14d
	subl	%eax, %edi
	andl	$-2, %edi
	subl	%edi, %r14d
	xorl	%edi, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rsi), %r9d
	movl	%edx, %r10d
	movl	%r12d, %eax
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jl	.L17
.L28:
	movl	%eax, %r12d
	movl	%r10d, %edx
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	je	.L22
.L29:
	subl	$2, %r8d
.L10:
	movl	(%rsi), %r11d
	leal	1(%rcx), %eax
	movl	%r11d, %r10d
	subl	%r9d, %r10d
	cmpl	%edx, %r10d
	jle	.L27
	movl	-4(%rsi), %r9d
	movl	$1, %edi
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jge	.L28
.L17:
	movl	%ecx, %r12d
	movl	$1, %edi
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	jne	.L29
.L22:
	movl	12(%rsp), %eax
.L7:
	movslq	%r14d, %rcx
	leaq	4+P(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rbx,%rcx,4), %esi
	subl	(%r9,%rcx,4), %esi
	leal	1(%rcx), %r8d
	cmpl	%esi, %edx
	jge	.L11
	movl	%r8d, %r12d
	movl	%esi, %edx
	movl	$1, %edi
.L11:
	subq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
	subl	$1, %eax
	movl	%eax, i(%rip)
	testb	%dil, %dil
	je	.L24
	movl	%r12d, r(%rip)
	movl	%edx, g(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	movl	r(%rip), %r12d
.L6:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$24, %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
.L15:
	.cfi_restore_state
	movl	%ecx, %r14d
	xorl	%edi, %edi
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1200
P:
	.zero	1200
	.globl	Nmax
	.align 4
	.type	Nmax, @object
	.size	Nmax, 4
Nmax:
	.zero	4
	.globl	Nmin
	.align 4
	.type	Nmin, @object
	.size	Nmin, 4
Nmin:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d"
	.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	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	Nmax(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	P(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	Nmin(%rip), %rdx
	movq	%r13, %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	call	__isoc99_scanf@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	je	.L26
	movl	Nmin(%rip), %eax
	movl	Nmax(%rip), %edi
	movl	$0, g(%rip)
	movl	$0, r(%rip)
	movl	$0, i(%rip)
	subl	$1, %eax
	leal	-1(%rdi), %ecx
	movl	%eax, Nmin(%rip)
	movl	%ecx, Nmax(%rip)
	testl	%edx, %edx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	M(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L4
	movl	Nmax(%rip), %ecx
	movl	Nmin(%rip), %eax
.L3:
	movl	%ecx, i(%rip)
	cmpl	%eax, %ecx
	jl	.L24
	movslq	%ecx, %rsi
	leal	-1(%rcx), %edi
	movl	g(%rip), %edx
	salq	$2, %rsi
	leaq	4(%rbx,%rsi), %r8
	cmpl	%eax, %edi
	jle	.L15
	movl	(%r8), %r9d
	leal	-2(%rcx), %r8d
	movl	%eax, 12(%rsp)
	addq	%rbx, %rsi
	movl	%r8d, %edi
	movl	%r8d, %r14d
	subl	%eax, %edi
	andl	$-2, %edi
	subl	%edi, %r14d
	xorl	%edi, %edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	movl	-4(%rsi), %r9d
	movl	%edx, %r10d
	movl	%r12d, %eax
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jl	.L17
.L28:
	movl	%eax, %r12d
	movl	%r10d, %edx
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	je	.L22
.L29:
	subl	$2, %r8d
.L10:
	movl	(%rsi), %r11d
	leal	1(%rcx), %eax
	movl	%r11d, %r10d
	subl	%r9d, %r10d
	cmpl	%edx, %r10d
	jle	.L27
	movl	-4(%rsi), %r9d
	movl	$1, %edi
	movl	%r9d, %edx
	subl	%r11d, %edx
	cmpl	%edx, %r10d
	jge	.L28
.L17:
	movl	%ecx, %r12d
	movl	$1, %edi
	movl	%r8d, %ecx
	subq	$8, %rsi
	cmpl	%r14d, %r8d
	jne	.L29
.L22:
	movl	12(%rsp), %eax
.L7:
	movslq	%r14d, %rcx
	leaq	4+P(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rbx,%rcx,4), %esi
	subl	(%r9,%rcx,4), %esi
	leal	1(%rcx), %r8d
	cmpl	%esi, %edx
	jge	.L11
	movl	%r8d, %r12d
	movl	%esi, %edx
	movl	$1, %edi
.L11:
	subq	$1, %rcx
	cmpl	%ecx, %eax
	jle	.L12
	subl	$1, %eax
	movl	%eax, i(%rip)
	testb	%dil, %dil
	je	.L24
	movl	%r12d, r(%rip)
	movl	%edx, g(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	movl	r(%rip), %r12d
.L6:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$24, %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
.L15:
	.cfi_restore_state
	movl	%ecx, %r14d
	xorl	%edi, %edi
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1200
P:
	.zero	1200
	.globl	Nmax
	.align 4
	.type	Nmax, @object
	.size	Nmax, 4
Nmax:
	.zero	4
	.globl	Nmin
	.align 4
	.type	Nmin, @object
	.size	Nmin, 4
Nmin:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	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:
```