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>
void swap(int* array, int i, int j) {
    int temp;
    temp = array[i];
    array[i] = array[j];
    array[j] = temp;
}
int main(void) {
    int n, l[400];
    int i, j;

    scanf("%d", &n);
    for (i = 0; i < n * 2; i++) {
        scanf("%d", &l[i]);
    }
    for (i = 0; i < 2 * n - 1; i++) {
        for (j = i + 1; j < 2 * n; j++) {
            if (l[i] > l[j]) {
                swap(l, i, j);
            }
        }
    }
    int ans = 0;
    for (i = 0; i < 2 * n; i += 2) {
        ans += l[i];
    }
    printf("%d\n", ans);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	leaq	(%rdi,%rsi,4), %rcx
	leaq	(%rdi,%rdx,4), %rax
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	%esi, (%rax)
	ret
	.cfi_endproc
.LFE23:
	.size	swap, .-swap
	.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	%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	$1640, %rsp
	.cfi_def_cfa_offset 1680
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	leal	(%rax,%rax), %r8d
	cmpl	%ebp, %r8d
	jg	.L5
	leal	-1(%r8), %r11d
	testl	%r11d, %r11d
	jle	.L6
	movq	%rbx, %rsi
	xorl	%r10d, %r10d
	leaq	20(%rsp), %rbp
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	cmpl	%r9d, %r8d
	jle	.L6
	movl	%r11d, %eax
	subl	%r9d, %eax
	addq	%r10, %rax
	leaq	0(%rbp,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L7
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L7:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addq	$1, %r10
	addq	$4, %rsi
	cmpl	%r11d, %r9d
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r8d, %r8d
	jle	.L4
	movl	%r11d, %ecx
	shrl	%ecx
	addl	$1, %ecx
	cmpl	$5, %r11d
	jbe	.L16
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$5, %rax
	leaq	48(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm1
	addq	$32, %rbx
	shufps	$136, -16(%rbx), %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	(%rsi,%rsi), %eax
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%ecx, %esi
	je	.L13
.L10:
	movslq	%eax, %rcx
	addl	16(%rsp,%rcx,4), %edx
	leal	2(%rax), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$4, %eax
	addl	16(%rsp,%rcx,4), %edx
	cmpl	%eax, %r8d
	jle	.L13
	cltq
	addl	16(%rsp,%rax,4), %edx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$1640, %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
.L4:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L10
.L22:
	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	swap
	.type	swap, @function
swap:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	leaq	(%rdi,%rsi,4), %rcx
	leaq	(%rdi,%rdx,4), %rax
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	%esi, (%rax)
	ret
	.cfi_endproc
.LFE23:
	.size	swap, .-swap
	.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	%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	$1640, %rsp
	.cfi_def_cfa_offset 1680
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	leal	(%rax,%rax), %r8d
	cmpl	%ebp, %r8d
	jg	.L5
	leal	-1(%r8), %r11d
	testl	%r11d, %r11d
	jle	.L6
	movq	%rbx, %rsi
	xorl	%r10d, %r10d
	leaq	20(%rsp), %rbp
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	cmpl	%r9d, %r8d
	jle	.L6
	movl	%r11d, %eax
	subl	%r9d, %eax
	addq	%r10, %rax
	leaq	0(%rbp,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L7
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L7:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addq	$1, %r10
	addq	$4, %rsi
	cmpl	%r11d, %r9d
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r8d, %r8d
	jle	.L4
	movl	%r11d, %ecx
	shrl	%ecx
	addl	$1, %ecx
	cmpl	$5, %r11d
	jbe	.L16
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$5, %rax
	leaq	48(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm1
	addq	$32, %rbx
	shufps	$136, -16(%rbx), %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	(%rsi,%rsi), %eax
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%ecx, %esi
	je	.L13
.L10:
	movslq	%eax, %rcx
	addl	16(%rsp,%rcx,4), %edx
	leal	2(%rax), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$4, %eax
	addl	16(%rsp,%rcx,4), %edx
	cmpl	%eax, %r8d
	jle	.L13
	cltq
	addl	16(%rsp,%rax,4), %edx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$1640, %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
.L4:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L10
.L22:
	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	swap
	.type	swap, @function
swap:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	leaq	(%rdi,%rsi,4), %rcx
	leaq	(%rdi,%rdx,4), %rax
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	%esi, (%rax)
	ret
	.cfi_endproc
.LFE23:
	.size	swap, .-swap
	.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	%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	$1640, %rsp
	.cfi_def_cfa_offset 1680
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	leal	(%rax,%rax), %r8d
	cmpl	%ebp, %r8d
	jg	.L5
	leal	-1(%r8), %r11d
	testl	%r11d, %r11d
	jle	.L6
	movq	%rbx, %rsi
	xorl	%r10d, %r10d
	leaq	20(%rsp), %rbp
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	cmpl	%r9d, %r8d
	jle	.L6
	movl	%r11d, %eax
	subl	%r9d, %eax
	addq	%r10, %rax
	leaq	0(%rbp,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L7
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L7:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addq	$1, %r10
	addq	$4, %rsi
	cmpl	%r11d, %r9d
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r8d, %r8d
	jle	.L4
	movl	%r11d, %ecx
	shrl	%ecx
	addl	$1, %ecx
	cmpl	$5, %r11d
	jbe	.L16
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$5, %rax
	leaq	48(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm1
	addq	$32, %rbx
	shufps	$136, -16(%rbx), %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	(%rsi,%rsi), %eax
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%ecx, %esi
	je	.L13
.L10:
	movslq	%eax, %rcx
	addl	16(%rsp,%rcx,4), %edx
	leal	2(%rax), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$4, %eax
	addl	16(%rsp,%rcx,4), %edx
	cmpl	%eax, %r8d
	jle	.L13
	cltq
	addl	16(%rsp,%rax,4), %edx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$1640, %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
.L4:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L10
.L22:
	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>
void swap(int* array, int i, int j) {
    int temp;
    temp = array[i];
    array[i] = array[j];
    array[j] = temp;
}
int main(void) {
    int n, l[400];
    int i, j;

    scanf("%d", &n);
    for (i = 0; i < n * 2; i++) {
        scanf("%d", &l[i]);
    }
    for (i = 0; i < 2 * n - 1; i++) {
        for (j = i + 1; j < 2 * n; j++) {
            if (l[i] > l[j]) {
                swap(l, i, j);
            }
        }
    }
    int ans = 0;
    for (i = 0; i < 2 * n; i += 2) {
        ans += l[i];
    }
    printf("%d\n", ans);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
void swap(int* array, int i, int j) {
    int temp;
    temp = array[i];
    array[i] = array[j];
    array[j] = temp;
}
int main(void) {
    int n, l[400];
    int i, j;

    scanf("%d", &n);
    for (i = 0; i < n * 2; i++) {
        scanf("%d", &l[i]);
    }
    for (i = 0; i < 2 * n - 1; i++) {
        for (j = i + 1; j < 2 * n; j++) {
            if (l[i] > l[j]) {
                swap(l, i, j);
            }
        }
    }
    int ans = 0;
    for (i = 0; i < 2 * n; i += 2) {
        ans += l[i];
    }
    printf("%d\n", ans);
    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
100 1 2 3 14 15 58 58 9 29
 2
1 3 1 1
 5
100 1 2 3 1 15 58 58 9 29
 2
1 2 1 2
 5
100 1 2 3 1 19 40 14 9 29
 2
1 2 0 1
 5
110 1 2 3 1 19 40 14 1 29
 5
110 1 0 3 1 19 40 14 1 29
 2
2 0 0 0
 2
2 -1 0 0

105
 2
 99
 3
 71
 1
 64
 63
 0
 -1

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>
void swap(int* array, int i, int j) {
    int temp;
    temp = array[i];
    array[i] = array[j];
    array[j] = temp;
}
int main(void) {
    int n, l[400];
    int i, j;

    scanf("%d", &n);
    for (i = 0; i < n * 2; i++) {
        scanf("%d", &l[i]);
    }
    for (i = 0; i < 2 * n - 1; i++) {
        for (j = i + 1; j < 2 * n; j++) {
            if (l[i] > l[j]) {
                swap(l, i, j);
            }
        }
    }
    int ans = 0;
    for (i = 0; i < 2 * n; i += 2) {
        ans += l[i];
    }
    printf("%d\n", ans);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	leaq	(%rdi,%rsi,4), %rcx
	leaq	(%rdi,%rdx,4), %rax
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	%esi, (%rax)
	ret
	.cfi_endproc
.LFE23:
	.size	swap, .-swap
	.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	%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	$1640, %rsp
	.cfi_def_cfa_offset 1680
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	leal	(%rax,%rax), %r8d
	cmpl	%ebp, %r8d
	jg	.L5
	leal	-1(%r8), %r11d
	testl	%r11d, %r11d
	jle	.L6
	movq	%rbx, %rsi
	xorl	%r10d, %r10d
	leaq	20(%rsp), %rbp
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	cmpl	%r9d, %r8d
	jle	.L6
	movl	%r11d, %eax
	subl	%r9d, %eax
	addq	%r10, %rax
	leaq	0(%rbp,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L7
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L7:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addq	$1, %r10
	addq	$4, %rsi
	cmpl	%r11d, %r9d
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r8d, %r8d
	jle	.L4
	movl	%r11d, %ecx
	shrl	%ecx
	addl	$1, %ecx
	cmpl	$5, %r11d
	jbe	.L16
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$5, %rax
	leaq	48(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm1
	addq	$32, %rbx
	shufps	$136, -16(%rbx), %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	(%rsi,%rsi), %eax
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%ecx, %esi
	je	.L13
.L10:
	movslq	%eax, %rcx
	addl	16(%rsp,%rcx,4), %edx
	leal	2(%rax), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$4, %eax
	addl	16(%rsp,%rcx,4), %edx
	cmpl	%eax, %r8d
	jle	.L13
	cltq
	addl	16(%rsp,%rax,4), %edx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$1640, %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
.L4:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L10
.L22:
	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	swap
	.type	swap, @function
swap:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	leaq	(%rdi,%rsi,4), %rcx
	leaq	(%rdi,%rdx,4), %rax
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	%esi, (%rax)
	ret
	.cfi_endproc
.LFE23:
	.size	swap, .-swap
	.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	%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	$1640, %rsp
	.cfi_def_cfa_offset 1680
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	leal	(%rax,%rax), %r8d
	cmpl	%ebp, %r8d
	jg	.L5
	leal	-1(%r8), %r11d
	testl	%r11d, %r11d
	jle	.L6
	movq	%rbx, %rsi
	xorl	%r10d, %r10d
	leaq	20(%rsp), %rbp
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	cmpl	%r9d, %r8d
	jle	.L6
	movl	%r11d, %eax
	subl	%r9d, %eax
	addq	%r10, %rax
	leaq	0(%rbp,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L7
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L7:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L8
	addq	$1, %r10
	addq	$4, %rsi
	cmpl	%r11d, %r9d
	jl	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r8d, %r8d
	jle	.L4
	movl	%r11d, %ecx
	shrl	%ecx
	addl	$1, %ecx
	cmpl	$5, %r11d
	jbe	.L16
	movl	%ecx, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$5, %rax
	leaq	48(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm1
	addq	$32, %rbx
	shufps	$136, -16(%rbx), %xmm1
	paddd	%xmm1, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	(%rsi,%rsi), %eax
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%ecx, %esi
	je	.L13
.L10:
	movslq	%eax, %rcx
	addl	16(%rsp,%rcx,4), %edx
	leal	2(%rax), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$4, %eax
	addl	16(%rsp,%rcx,4), %edx
	cmpl	%eax, %r8d
	jle	.L13
	cltq
	addl	16(%rsp,%rax,4), %edx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$1640, %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
.L4:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L16:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L10
.L22:
	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:
```