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

#define lli long long int

int main(void)
{
	lli n;
	scanf("%lld",&n);
	
	lli *h;
	h = (lli *)malloc(sizeof(lli)*(n));
	lli i = 0;
	while (i < n)
	{
		scanf("%lld",&h[i]);
		i++;
	}
	i = 0;
	lli max = 0;
	lli tmp_step = 0;
	while (i < n-1)
	{
		if(h[i] < h[i+1])
		{
			if(max < tmp_step)
			{
				max = tmp_step;
			}
			tmp_step = 0;
		}
		else
		{
			tmp_step++;
			if(max < tmp_step)
			{
				max = tmp_step;
			}
		}
		//printf("max:%lld, tmp:%lld\n",max,tmp_step);
		i++;
	}
	printf("%lld\n",max);
	return(0);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movq	$0, -40(%rbp)
	jmp	.L2
.L3:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -40(%rbp)
.L2:
	movq	-48(%rbp), %rax
	cmpq	%rax, -40(%rbp)
	jl	.L3
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L4
.L8:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L6
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
.L6:
	movq	$0, -24(%rbp)
	jmp	.L7
.L5:
	addq	$1, -24(%rbp)
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L7
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
.L7:
	addq	$1, -40(%rbp)
.L4:
	movq	-48(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -40(%rbp)
	jl	.L8
	movq	-32(%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	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rbx
	leaq	0(,%rbx,8), %rdi
	call	malloc@PLT
	testq	%rbx, %rbx
	jle	.L9
	movq	%rax, %r12
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdx
	addq	$8, %rbp
	cmpq	%rbx, %rdx
	jg	.L3
	cmpq	$1, %rdx
	jle	.L9
	leaq	(%r12,%rdx,8), %rdi
	movq	(%r12), %rcx
	leaq	8(%r12), %rax
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	cmpq	%rdx, %r8
	cmovl	%rdx, %r8
	addq	$8, %rax
	xorl	%edx, %edx
	cmpq	%rdi, %rax
	je	.L2
.L6:
	movq	%rcx, %rsi
	movq	(%rax), %rcx
	cmpq	%rcx, %rsi
	jl	.L14
	addq	$1, %rdx
	cmpq	%rdx, %r8
	cmovl	%rdx, %r8
	addq	$8, %rax
	cmpq	%rdi, %rax
	jne	.L6
.L2:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rbx
	leaq	0(,%rbx,8), %rdi
	call	malloc@PLT
	testq	%rbx, %rbx
	jle	.L9
	movq	%rax, %r12
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdx
	addq	$8, %rbp
	cmpq	%rbx, %rdx
	jg	.L3
	cmpq	$1, %rdx
	jle	.L9
	leaq	(%r12,%rdx,8), %rdi
	movq	(%r12), %rcx
	leaq	8(%r12), %rax
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	cmpq	%rdx, %r8
	cmovl	%rdx, %r8
	addq	$8, %rax
	xorl	%edx, %edx
	cmpq	%rdi, %rax
	je	.L2
.L6:
	movq	%rcx, %rsi
	movq	(%rax), %rcx
	cmpq	%rcx, %rsi
	jl	.L14
	addq	$1, %rdx
	cmpq	%rdx, %r8
	cmovl	%rdx, %r8
	addq	$8, %rax
	cmpq	%rdi, %rax
	jne	.L6
.L2:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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 <stdbool.h>
#include <ctype.h>

#define lli long long int

int main(void)
{
	lli n;
	scanf("%lld",&n);
	
	lli *h;
	h = (lli *)malloc(sizeof(lli)*(n));
	lli i = 0;
	while (i < n)
	{
		scanf("%lld",&h[i]);
		i++;
	}
	i = 0;
	lli max = 0;
	lli tmp_step = 0;
	while (i < n-1)
	{
		if(h[i] < h[i+1])
		{
			if(max < tmp_step)
			{
				max = tmp_step;
			}
			tmp_step = 0;
		}
		else
		{
			tmp_step++;
			if(max < tmp_step)
			{
				max = tmp_step;
			}
		}
		//printf("max:%lld, tmp:%lld\n",max,tmp_step);
		i++;
	}
	printf("%lld\n",max);
	return(0);
}

5
10 4 8 13 3
 4
1 2 3 6
 7
4 4 8 6 6 5 5
 7
7 4 8 6 6 5 8
 5
12 4 8 4 3
 5
10 4 8 12 3
 4
1 2 6 6
 7
7 4 8 6 6 5 5
 5
12 4 8 12 3
 4
1 4 3 6

1
 0
 4
 3
 2
 1
 1
 4
 1
 1

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

#define lli long long int

int main(void)
{
	lli n;
	scanf("%lld",&n);
	
	lli *h;
	h = (lli *)malloc(sizeof(lli)*(n));
	lli i = 0;
	while (i < n)
	{
		scanf("%lld",&h[i]);
		i++;
	}
	i = 0;
	lli max = 0;
	lli tmp_step = 0;
	while (i < n-1)
	{
		if(h[i] < h[i+1])
		{
			if(max < tmp_step)
			{
				max = tmp_step;
			}
			tmp_step = 0;
		}
		else
		{
			tmp_step++;
			if(max < tmp_step)
			{
				max = tmp_step;
			}
		}
		//printf("max:%lld, tmp:%lld\n",max,tmp_step);
		i++;
	}
	printf("%lld\n",max);
	return(0);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movq	$0, -40(%rbp)
	jmp	.L2
.L3:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -40(%rbp)
.L2:
	movq	-48(%rbp), %rax
	cmpq	%rax, -40(%rbp)
	jl	.L3
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L4
.L8:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L6
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
.L6:
	movq	$0, -24(%rbp)
	jmp	.L7
.L5:
	addq	$1, -24(%rbp)
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L7
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
.L7:
	addq	$1, -40(%rbp)
.L4:
	movq	-48(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -40(%rbp)
	jl	.L8
	movq	-32(%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	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%lld"
.LC1:
	.string	"%lld\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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movq	$0, -40(%rbp)
	jmp	.L2
.L3:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -40(%rbp)
.L2:
	movq	-48(%rbp), %rax
	cmpq	%rax, -40(%rbp)
	jl	.L3
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L4
.L8:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L6
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
.L6:
	movq	$0, -24(%rbp)
	jmp	.L7
.L5:
	addq	$1, -24(%rbp)
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L7
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
.L7:
	addq	$1, -40(%rbp)
.L4:
	movq	-48(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -40(%rbp)
	jl	.L8
	movq	-32(%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	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
