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 min(int a, int b){
    if(a > b){
        return b;
    }else{
        return a;
    }
}

int main(void){
    int n, s;
    int b[100];

    scanf("%d", &n);
    for(int i = 0; i < n - 1; i++) scanf("%d", &b[i]);

    s =  b[0] + b[n - 2];
    for(int i = 0; i < n - 2; i++) s += min(b[i], b[i+1]);

    printf("%d\n", s);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$432, %rsp
	.cfi_def_cfa_offset 464
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	cmpl	$1, %edx
	jle	.L4
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	leal	-1(%rdx), %eax
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	leal	-2(%rdx), %ecx
	movslq	%ecx, %rax
	movl	16(%rsp,%rax,4), %r8d
	addl	16(%rsp), %r8d
	testl	%ecx, %ecx
	jle	.L6
	leal	-3(%rdx), %r9d
	cmpl	$2, %r9d
	jbe	.L14
	movl	%ecx, %esi
	leaq	16(%rsp), %r10
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r10, %rax
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm0
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	movdqu	-12(%rax), %xmm3
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	por	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L6
.L7:
	leal	-1(%rdx), %esi
	movslq	%eax, %r11
	leal	1(%rax), %edi
	cmpl	%r9d, %esi
	leaq	(%r10,%r11,4), %rbx
	cmovg	%r9d, %esi
	cmpl	%esi, %edi
	jge	.L11
	cmpl	$-2147483646, %edx
	je	.L11
	leal	2(%rax), %edx
	movl	(%rbx), %esi
	movslq	%edx, %rdx
.L12:
	movl	-4(%r10,%rdx,4), %edi
	movl	%edx, %eax
	cmpl	%esi, %edi
	cmovle	%edi, %esi
	addl	%esi, %r8d
	movl	(%r10,%rdx,4), %esi
	cmpl	%esi, %edi
	cmovg	%esi, %edi
	addq	$2, %rdx
	addl	%edi, %r8d
	leal	-1(%rdx), %edi
	cmpl	%edi, %r9d
	jg	.L12
	movslq	%eax, %r11
	leal	1(%rax), %edi
.L11:
	movslq	%edi, %rdx
	movl	16(%rsp,%r11,4), %esi
	movl	16(%rsp,%rdx,4), %edx
	cmpl	%esi, %edx
	cmovle	%edx, %esi
	addl	%esi, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	leal	2(%rax), %edi
	movslq	%edi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	%edx, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	addl	$3, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	addl	%esi, %r8d
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	16(%rsp), %r10
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$432, %rsp
	.cfi_def_cfa_offset 464
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	cmpl	$1, %edx
	jle	.L4
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	leal	-1(%rdx), %eax
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	leal	-2(%rdx), %ecx
	movslq	%ecx, %rax
	movl	16(%rsp,%rax,4), %r8d
	addl	16(%rsp), %r8d
	testl	%ecx, %ecx
	jle	.L6
	leal	-3(%rdx), %r9d
	cmpl	$2, %r9d
	jbe	.L14
	movl	%ecx, %esi
	leaq	16(%rsp), %r10
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r10, %rax
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm0
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	movdqu	-12(%rax), %xmm3
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	por	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L6
.L7:
	leal	-1(%rdx), %esi
	movslq	%eax, %r11
	leal	1(%rax), %edi
	cmpl	%r9d, %esi
	leaq	(%r10,%r11,4), %rbx
	cmovg	%r9d, %esi
	cmpl	%esi, %edi
	jge	.L11
	cmpl	$-2147483646, %edx
	je	.L11
	leal	2(%rax), %edx
	movl	(%rbx), %esi
	movslq	%edx, %rdx
.L12:
	movl	-4(%r10,%rdx,4), %edi
	movl	%edx, %eax
	cmpl	%esi, %edi
	cmovle	%edi, %esi
	addl	%esi, %r8d
	movl	(%r10,%rdx,4), %esi
	cmpl	%esi, %edi
	cmovg	%esi, %edi
	addq	$2, %rdx
	addl	%edi, %r8d
	leal	-1(%rdx), %edi
	cmpl	%edi, %r9d
	jg	.L12
	movslq	%eax, %r11
	leal	1(%rax), %edi
.L11:
	movslq	%edi, %rdx
	movl	16(%rsp,%r11,4), %esi
	movl	16(%rsp,%rdx,4), %edx
	cmpl	%esi, %edx
	cmovle	%edx, %esi
	addl	%esi, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	leal	2(%rax), %edi
	movslq	%edi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	%edx, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	addl	$3, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	addl	%esi, %r8d
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	16(%rsp), %r10
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$432, %rsp
	.cfi_def_cfa_offset 464
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	cmpl	$1, %edx
	jle	.L4
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	leal	-1(%rdx), %eax
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	leal	-2(%rdx), %ecx
	movslq	%ecx, %rax
	movl	16(%rsp,%rax,4), %r8d
	addl	16(%rsp), %r8d
	testl	%ecx, %ecx
	jle	.L6
	leal	-3(%rdx), %r9d
	cmpl	$2, %r9d
	jbe	.L14
	movl	%ecx, %esi
	leaq	16(%rsp), %r10
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r10, %rax
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm0
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	movdqu	-12(%rax), %xmm3
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	por	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L6
.L7:
	leal	-1(%rdx), %esi
	movslq	%eax, %r11
	leal	1(%rax), %edi
	cmpl	%r9d, %esi
	leaq	(%r10,%r11,4), %rbx
	cmovg	%r9d, %esi
	cmpl	%esi, %edi
	jge	.L11
	cmpl	$-2147483646, %edx
	je	.L11
	leal	2(%rax), %edx
	movl	(%rbx), %esi
	movslq	%edx, %rdx
.L12:
	movl	-4(%r10,%rdx,4), %edi
	movl	%edx, %eax
	cmpl	%esi, %edi
	cmovle	%edi, %esi
	addl	%esi, %r8d
	movl	(%r10,%rdx,4), %esi
	cmpl	%esi, %edi
	cmovg	%esi, %edi
	addq	$2, %rdx
	addl	%edi, %r8d
	leal	-1(%rdx), %edi
	cmpl	%edi, %r9d
	jg	.L12
	movslq	%eax, %r11
	leal	1(%rax), %edi
.L11:
	movslq	%edi, %rdx
	movl	16(%rsp,%r11,4), %esi
	movl	16(%rsp,%rdx,4), %edx
	cmpl	%esi, %edx
	cmovle	%edx, %esi
	addl	%esi, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	leal	2(%rax), %edi
	movslq	%edi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	%edx, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	addl	$3, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	addl	%esi, %r8d
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	16(%rsp), %r10
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```
```c
#include<stdio.h>

int min(int a, int b){
    if(a > b){
        return b;
    }else{
        return a;
    }
}

int main(void){
    int n, s;
    int b[100];

    scanf("%d", &n);
    for(int i = 0; i < n - 1; i++) scanf("%d", &b[i]);

    s =  b[0] + b[n - 2];
    for(int i = 0; i < n - 2; i++) s += min(b[i], b[i+1]);

    printf("%d\n", s);

    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 min(int a, int b){
    if(a > b){
        return b;
    }else{
        return a;
    }
}

int main(void){
    int n, s;
    int b[100];

    scanf("%d", &n);
    for(int i = 0; i < n - 1; i++) scanf("%d", &b[i]);

    s =  b[0] + b[n - 2];
    for(int i = 0; i < n - 2; i++) s += min(b[i], b[i+1]);

    printf("%d\n", s);

    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:

2
5
 6
0 153 10 14 23
 3
2 9
 2
4
 6
0 153 10 14 17
 3
2 12
 2
1
 6
0 153 10 14 26
 3
1 12
 2
0

10
 57
 13
 8
 51
 16
 2
 60
 14
 0

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 min(int a, int b){
    if(a > b){
        return b;
    }else{
        return a;
    }
}

int main(void){
    int n, s;
    int b[100];

    scanf("%d", &n);
    for(int i = 0; i < n - 1; i++) scanf("%d", &b[i]);

    s =  b[0] + b[n - 2];
    for(int i = 0; i < n - 2; i++) s += min(b[i], b[i+1]);

    printf("%d\n", s);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$432, %rsp
	.cfi_def_cfa_offset 464
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	cmpl	$1, %edx
	jle	.L4
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	leal	-1(%rdx), %eax
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	leal	-2(%rdx), %ecx
	movslq	%ecx, %rax
	movl	16(%rsp,%rax,4), %r8d
	addl	16(%rsp), %r8d
	testl	%ecx, %ecx
	jle	.L6
	leal	-3(%rdx), %r9d
	cmpl	$2, %r9d
	jbe	.L14
	movl	%ecx, %esi
	leaq	16(%rsp), %r10
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r10, %rax
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm0
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	movdqu	-12(%rax), %xmm3
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	por	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L6
.L7:
	leal	-1(%rdx), %esi
	movslq	%eax, %r11
	leal	1(%rax), %edi
	cmpl	%r9d, %esi
	leaq	(%r10,%r11,4), %rbx
	cmovg	%r9d, %esi
	cmpl	%esi, %edi
	jge	.L11
	cmpl	$-2147483646, %edx
	je	.L11
	leal	2(%rax), %edx
	movl	(%rbx), %esi
	movslq	%edx, %rdx
.L12:
	movl	-4(%r10,%rdx,4), %edi
	movl	%edx, %eax
	cmpl	%esi, %edi
	cmovle	%edi, %esi
	addl	%esi, %r8d
	movl	(%r10,%rdx,4), %esi
	cmpl	%esi, %edi
	cmovg	%esi, %edi
	addq	$2, %rdx
	addl	%edi, %r8d
	leal	-1(%rdx), %edi
	cmpl	%edi, %r9d
	jg	.L12
	movslq	%eax, %r11
	leal	1(%rax), %edi
.L11:
	movslq	%edi, %rdx
	movl	16(%rsp,%r11,4), %esi
	movl	16(%rsp,%rdx,4), %edx
	cmpl	%esi, %edx
	cmovle	%edx, %esi
	addl	%esi, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	leal	2(%rax), %edi
	movslq	%edi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	%edx, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	addl	$3, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	addl	%esi, %r8d
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	16(%rsp), %r10
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$432, %rsp
	.cfi_def_cfa_offset 464
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	cmpl	$1, %edx
	jle	.L4
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	leal	-1(%rdx), %eax
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	leal	-2(%rdx), %ecx
	movslq	%ecx, %rax
	movl	16(%rsp,%rax,4), %r8d
	addl	16(%rsp), %r8d
	testl	%ecx, %ecx
	jle	.L6
	leal	-3(%rdx), %r9d
	cmpl	$2, %r9d
	jbe	.L14
	movl	%ecx, %esi
	leaq	16(%rsp), %r10
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r10, %rax
	subl	$1, %esi
	salq	$4, %rsi
	leaq	32(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	4(%rax), %xmm0
	movdqa	(%rax), %xmm1
	addq	$16, %rax
	movdqu	-12(%rax), %xmm3
	pcmpgtd	-16(%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm3, %xmm0
	por	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L6
.L7:
	leal	-1(%rdx), %esi
	movslq	%eax, %r11
	leal	1(%rax), %edi
	cmpl	%r9d, %esi
	leaq	(%r10,%r11,4), %rbx
	cmovg	%r9d, %esi
	cmpl	%esi, %edi
	jge	.L11
	cmpl	$-2147483646, %edx
	je	.L11
	leal	2(%rax), %edx
	movl	(%rbx), %esi
	movslq	%edx, %rdx
.L12:
	movl	-4(%r10,%rdx,4), %edi
	movl	%edx, %eax
	cmpl	%esi, %edi
	cmovle	%edi, %esi
	addl	%esi, %r8d
	movl	(%r10,%rdx,4), %esi
	cmpl	%esi, %edi
	cmovg	%esi, %edi
	addq	$2, %rdx
	addl	%edi, %r8d
	leal	-1(%rdx), %edi
	cmpl	%edi, %r9d
	jg	.L12
	movslq	%eax, %r11
	leal	1(%rax), %edi
.L11:
	movslq	%edi, %rdx
	movl	16(%rsp,%r11,4), %esi
	movl	16(%rsp,%rdx,4), %edx
	cmpl	%esi, %edx
	cmovle	%edx, %esi
	addl	%esi, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	leal	2(%rax), %edi
	movslq	%edi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	addl	%edx, %r8d
	cmpl	%edi, %ecx
	jle	.L6
	addl	$3, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	addl	%esi, %r8d
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	16(%rsp), %r10
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```