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

void find(int a[],int x,int y){
    int i;
    int min=pow(2,31)-1;
    for(i=x;i<=y;i++){
        if(a[i]<min)min=a[i];
    }
    printf("%d\n",min);
}

int main(void){
    int i;
    
    int n;
    scanf("%d ",&n);
    
    int a[n];
    for(i=0;i<n;i++)a[i]=pow(2,31)-1;

    int q;
    scanf("%d\n",&q);
    
    int com,x,y;
    while(q--){
        scanf("%d %d %d\n",&com,&x,&y);
        switch(com){
            case 0:
                a[x]=y;
                break;
            case 1:
                find(a,x,y);
                break;
        }
    }

    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	find
	.type	find, @function
find:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$2147483647, -4(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L4
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.section	.rodata
.LC1:
	.string	"%d "
.LC2:
	.string	"%d %d %d\n"
	.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	$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
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%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
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L9
.L10:
	movq	-64(%rbp), %rax
	movl	-76(%rbp), %edx
	movslq	%edx, %rdx
	movl	$2147483647, (%rax,%rdx,4)
	addl	$1, -76(%rbp)
.L9:
	movl	-96(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L10
	leaq	-92(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L11
.L14:
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-88(%rbp), %eax
	testl	%eax, %eax
	je	.L12
	cmpl	$1, %eax
	je	.L13
	jmp	.L11
.L12:
	movl	-84(%rbp), %edx
	movl	-80(%rbp), %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	.L11
.L13:
	movl	-80(%rbp), %edx
	movl	-84(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	find
	nop
.L11:
	movl	-92(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -92(%rbp)
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	movl	%esi, %ecx
	movl	%edx, %edi
	cmpl	%edx, %esi
	jg	.L7
	movl	%edx, %eax
	subl	%esi, %eax
	leal	1(%rax), %r9d
	cmpl	$2, %eax
	jbe	.L8
	movslq	%esi, %rax
	movdqa	.LC0(%rip), %xmm0
	leaq	(%r8,%rax,4), %rdx
	movl	%r9d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %esi
	leaq	16(%rdx), %rax
	salq	$4, %rsi
	addq	%rax, %rsi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$16, %rax
.L4:
	movdqu	(%rdx), %xmm2
	movq	%rax, %rdx
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L12
	movdqa	%xmm0, %xmm2
	movl	%r9d, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	addl	%eax, %ecx
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r9d
	je	.L2
.L3:
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rsi
	movl	(%r8,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %edi
	jl	.L2
	movl	4(%r8,%rsi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	addl	$2, %ecx
	cmpl	%ecx, %edi
	jl	.L2
	movl	8(%r8,%rsi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$2147483647, %edx
	jmp	.L2
.L8:
	movl	$2147483647, %edx
	jmp	.L3
	.cfi_endproc
.LFE39:
	.size	find, .-find
	.section	.rodata.str1.1
.LC2:
	.string	"%d "
.LC3:
	.string	"%d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC2(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-60(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%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	.L15
.L41:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L41
.L15:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L42
.L16:
	movq	%rsp, %rbx
	testl	%ecx, %ecx
	jle	.L17
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L32
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	salq	$4, %rdx
	addq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L19
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L17
.L18:
	movslq	%eax, %rdx
	leal	1(%rax), %esi
	leaq	(%rbx,%rdx,4), %rdx
	movl	$2147483647, (%rdx)
	cmpl	%esi, %ecx
	jle	.L17
	addl	$2, %eax
	movl	$2147483647, 4(%rdx)
	cmpl	%eax, %ecx
	jle	.L17
	movl	$2147483647, 8(%rdx)
.L17:
	leaq	.LC1(%rip), %r14
	leaq	-56(%rbp), %rsi
	xorl	%eax, %eax
	movq	%r14, %rdi
	leaq	.LC3(%rip), %r13
	leaq	-44(%rbp), %r12
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	je	.L43
.L30:
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rsi
	movq	%r12, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	cmpl	$1, %eax
	jne	.L24
	movl	-44(%rbp), %esi
	movl	-48(%rbp), %ecx
	cmpl	%ecx, %esi
	jl	.L33
	movl	%esi, %eax
	subl	%ecx, %eax
	leal	1(%rax), %edi
	cmpl	$2, %eax
	jbe	.L34
	movl	%edi, %edx
	movslq	%ecx, %rax
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	leaq	(%rbx,%rax,4), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L28:
	movdqu	(%rax), %xmm1
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L28
	movdqa	%xmm0, %xmm2
	movl	%edi, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	addl	%eax, %ecx
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%eax, %edi
	je	.L26
.L27:
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rdi
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %esi
	jl	.L26
	movl	4(%rbx,%rdi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	leal	2(%rcx), %eax
	cmpl	%eax, %esi
	jl	.L26
	movl	8(%rbx,%rdi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L26:
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	jne	.L30
.L43:
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L44
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	movslq	-48(%rbp), %rax
	movl	-44(%rbp), %edx
	movl	%edx, (%rbx,%rax,4)
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L33:
	movl	$2147483647, %edx
	jmp	.L26
.L34:
	movl	$2147483647, %edx
	jmp	.L27
.L42:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L16
.L32:
	xorl	%eax, %eax
	jmp	.L18
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.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
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	movl	%esi, %ecx
	movl	%edx, %edi
	cmpl	%edx, %esi
	jg	.L7
	movl	%edx, %eax
	subl	%esi, %eax
	leal	1(%rax), %r9d
	cmpl	$2, %eax
	jbe	.L8
	movslq	%esi, %rax
	movdqa	.LC0(%rip), %xmm0
	leaq	(%r8,%rax,4), %rdx
	movl	%r9d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %esi
	leaq	16(%rdx), %rax
	salq	$4, %rsi
	addq	%rax, %rsi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$16, %rax
.L4:
	movdqu	(%rdx), %xmm2
	movq	%rax, %rdx
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L12
	movdqa	%xmm0, %xmm2
	movl	%r9d, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	addl	%eax, %ecx
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%eax, %r9d
	je	.L2
.L3:
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rsi
	movl	(%r8,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %edi
	jl	.L2
	movl	4(%r8,%rsi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	addl	$2, %ecx
	cmpl	%ecx, %edi
	jl	.L2
	movl	8(%r8,%rsi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L2:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$2147483647, %edx
	jmp	.L2
.L8:
	movl	$2147483647, %edx
	jmp	.L3
	.cfi_endproc
.LFE39:
	.size	find, .-find
	.section	.rodata.str1.1
.LC2:
	.string	"%d "
.LC3:
	.string	"%d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC2(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	leaq	-60(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%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	.L15
.L41:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L41
.L15:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L42
.L16:
	movq	%rsp, %rbx
	testl	%ecx, %ecx
	jle	.L17
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L32
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	salq	$4, %rdx
	addq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L19
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L17
.L18:
	movslq	%eax, %rdx
	leal	1(%rax), %esi
	leaq	(%rbx,%rdx,4), %rdx
	movl	$2147483647, (%rdx)
	cmpl	%esi, %ecx
	jle	.L17
	addl	$2, %eax
	movl	$2147483647, 4(%rdx)
	cmpl	%eax, %ecx
	jle	.L17
	movl	$2147483647, 8(%rdx)
.L17:
	leaq	.LC1(%rip), %r14
	leaq	-56(%rbp), %rsi
	xorl	%eax, %eax
	movq	%r14, %rdi
	leaq	.LC3(%rip), %r13
	leaq	-44(%rbp), %r12
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	je	.L43
.L30:
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rsi
	movq	%r12, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	cmpl	$1, %eax
	jne	.L24
	movl	-44(%rbp), %esi
	movl	-48(%rbp), %ecx
	cmpl	%ecx, %esi
	jl	.L33
	movl	%esi, %eax
	subl	%ecx, %eax
	leal	1(%rax), %edi
	cmpl	$2, %eax
	jbe	.L34
	movl	%edi, %edx
	movslq	%ecx, %rax
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	leaq	(%rbx,%rax,4), %rax
	salq	$4, %rdx
	addq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L28:
	movdqu	(%rax), %xmm1
	movdqu	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm3, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rax, %rdx
	jne	.L28
	movdqa	%xmm0, %xmm2
	movl	%edi, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	movdqa	%xmm2, %xmm1
	addl	%eax, %ecx
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%eax, %edi
	je	.L26
.L27:
	movslq	%ecx, %rax
	leaq	0(,%rax,4), %rdi
	movl	(%rbx,%rax,4), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %esi
	jl	.L26
	movl	4(%rbx,%rdi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	leal	2(%rcx), %eax
	cmpl	%eax, %esi
	jl	.L26
	movl	8(%rbx,%rdi), %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L26:
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-56(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -56(%rbp)
	testl	%eax, %eax
	jne	.L30
.L43:
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L44
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	movslq	-48(%rbp), %rax
	movl	-44(%rbp), %edx
	movl	%edx, (%rbx,%rax,4)
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L33:
	movl	$2147483647, %edx
	jmp	.L26
.L34:
	movl	$2147483647, %edx
	jmp	.L27
.L42:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L16
.L32:
	xorl	%eax, %eax
	jmp	.L18
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.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 <math.h>

void find(int a[],int x,int y){
    int i;
    int min=pow(2,31)-1;
    for(i=x;i<=y;i++){
        if(a[i]<min)min=a[i];
    }
    printf("%d\n",min);
}

int main(void){
    int i;
    
    int n;
    scanf("%d ",&n);
    
    int a[n];
    for(i=0;i<n;i++)a[i]=pow(2,31)-1;

    int q;
    scanf("%d\n",&q);
    
    int com,x,y;
    while(q--){
        scanf("%d %d %d\n",&com,&x,&y);
        switch(com){
            case 0:
                a[x]=y;
                break;
            case 1:
                find(a,x,y);
                break;
        }
    }

    return 0;
}


1 3
1 -1 0
0 0 5
1 0 0
 3 5
0 0 1
0 1 2
0 2 3
1 0 2
1 1 4
 1 3
1 -1 0
0 0 9
1 0 0
 3 5
0 0 1
0 2 2
0 2 3
1 0 2
1 1 2
 1 3
1 -1 0
0 0 5
0 0 0
 1 3
1 -1 0
0 0 15
1 0 0
 3 5
0 0 1
0 2 2
0 2 3
1 0 2
0 1 2
 3 5
0 0 1
0 0 2
0 2 6
1 0 2
1 1 4
 3 5
0 0 2
0 2 2
0 2 3
1 0 2
0 1 2
 1 3
1 -1 0
0 0 4
1 0 0

25420
5
 1
2
 25285
9
 1
3
 24140
 25186
15
 1
 2
3
 2
 24097
4

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

void find(int a[],int x,int y){
    int i;
    int min=pow(2,31)-1;
    for(i=x;i<=y;i++){
        if(a[i]<min)min=a[i];
    }
    printf("%d\n",min);
}

int main(void){
    int i;
    
    int n;
    scanf("%d ",&n);
    
    int a[n];
    for(i=0;i<n;i++)a[i]=pow(2,31)-1;

    int q;
    scanf("%d\n",&q);
    
    int com,x,y;
    while(q--){
        scanf("%d %d %d\n",&com,&x,&y);
        switch(com){
            case 0:
                a[x]=y;
                break;
            case 1:
                find(a,x,y);
                break;
        }
    }

    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	find
	.type	find, @function
find:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$2147483647, -4(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L4
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.section	.rodata
.LC1:
	.string	"%d "
.LC2:
	.string	"%d %d %d\n"
	.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	$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
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%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
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L9
.L10:
	movq	-64(%rbp), %rax
	movl	-76(%rbp), %edx
	movslq	%edx, %rdx
	movl	$2147483647, (%rax,%rdx,4)
	addl	$1, -76(%rbp)
.L9:
	movl	-96(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L10
	leaq	-92(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L11
.L14:
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-88(%rbp), %eax
	testl	%eax, %eax
	je	.L12
	cmpl	$1, %eax
	je	.L13
	jmp	.L11
.L12:
	movl	-84(%rbp), %edx
	movl	-80(%rbp), %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	.L11
.L13:
	movl	-80(%rbp), %edx
	movl	-84(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	find
	nop
.L11:
	movl	-92(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -92(%rbp)
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	find
	.type	find, @function
find:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$2147483647, -4(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L4
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.section	.rodata
.LC1:
	.string	"%d "
.LC2:
	.string	"%d %d %d\n"
	.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	$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
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%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
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L9
.L10:
	movq	-64(%rbp), %rax
	movl	-76(%rbp), %edx
	movslq	%edx, %rdx
	movl	$2147483647, (%rax,%rdx,4)
	addl	$1, -76(%rbp)
.L9:
	movl	-96(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L10
	leaq	-92(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L11
.L14:
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-88(%rbp), %eax
	testl	%eax, %eax
	je	.L12
	cmpl	$1, %eax
	je	.L13
	jmp	.L11
.L12:
	movl	-84(%rbp), %edx
	movl	-80(%rbp), %ecx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	.L11
.L13:
	movl	-80(%rbp), %edx
	movl	-84(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	find
	nop
.L11:
	movl	-92(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -92(%rbp)
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
