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 bubbleSort(int num[],int n){
    int flag=1,j,tmp,count=0;
    while(flag){
        flag=0;
        for(j=n-1;j>0;j--){
            if(num[j]<num[j-1]){
                tmp=num[j];
                num[j]=num[j-1];
                num[j-1]=tmp;
                count++;
                flag=1;
            }
        }
    }
    for(j=0;j<n;j++){
        printf("%d%s",num[j],(j==n-1?"\n":" "));
    }
    printf("%d\n",count);
} 

int main(void){
    int num[101];
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&num[i]);
    }
    bubbleSort(num,n);
    return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC1:
	.string	"%d%s"
.LC2:
	.string	"\n"
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	-1(%rsi), %ebx
	movslq	%ebx, %rax
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rsi
	leal	-2(%r10), %eax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%ebx, %ebx
	jle	.L2
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L3
	movq	%xmm1, (%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L3:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L4
	testl	%edi, %edi
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	testl	%r10d, %r10d
	jle	.L6
	movl	%ebx, %eax
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	movq	%rax, 8(%rsp)
	leaq	.LC0(%rip), %r14
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	1(%r15), %rax
	cmpq	8(%rsp), %r15
	je	.L6
	movq	%rax, %r15
.L9:
	movl	0(%r13,%r15,4), %edx
	movq	%r14, %rcx
	cmpl	%r15d, %ebx
	jne	.L13
	leaq	.LC2(%rip), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$1, %edi
	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
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE23:
	.size	bubbleSort, .-bubbleSort
	.section	.rodata.str1.1
.LC4:
	.string	"%d"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC4(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L17
.L16:
	movq	%r13, %rdi
	call	bubbleSort
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %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
.L23:
	.cfi_restore_state
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC1:
	.string	"%d%s"
.LC2:
	.string	"\n"
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	-1(%rsi), %ebx
	movslq	%ebx, %rax
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rsi
	leal	-2(%r10), %eax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%ebx, %ebx
	jle	.L2
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L3
	movq	%xmm1, (%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L3:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L4
	testl	%edi, %edi
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	testl	%r10d, %r10d
	jle	.L6
	movl	%ebx, %eax
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	movq	%rax, 8(%rsp)
	leaq	.LC0(%rip), %r14
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	1(%r15), %rax
	cmpq	8(%rsp), %r15
	je	.L6
	movq	%rax, %r15
.L9:
	movl	0(%r13,%r15,4), %edx
	movq	%r14, %rcx
	cmpl	%r15d, %ebx
	jne	.L13
	leaq	.LC2(%rip), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$1, %edi
	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
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE23:
	.size	bubbleSort, .-bubbleSort
	.section	.rodata.str1.1
.LC4:
	.string	"%d"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC4(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L17
.L16:
	movq	%r13, %rdi
	call	bubbleSort
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %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
.L23:
	.cfi_restore_state
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC1:
	.string	"%d%s"
.LC2:
	.string	"\n"
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	-1(%rsi), %ebx
	movslq	%ebx, %rax
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rsi
	leal	-2(%r10), %eax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%ebx, %ebx
	jle	.L2
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L3
	movq	%xmm1, (%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L3:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L4
	testl	%edi, %edi
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	testl	%r10d, %r10d
	jle	.L6
	movl	%ebx, %eax
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	movq	%rax, 8(%rsp)
	leaq	.LC0(%rip), %r14
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	1(%r15), %rax
	cmpq	8(%rsp), %r15
	je	.L6
	movq	%rax, %r15
.L9:
	movl	0(%r13,%r15,4), %edx
	movq	%r14, %rcx
	cmpl	%r15d, %ebx
	jne	.L13
	leaq	.LC2(%rip), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$1, %edi
	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
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE23:
	.size	bubbleSort, .-bubbleSort
	.section	.rodata.str1.1
.LC4:
	.string	"%d"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC4(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L17
.L16:
	movq	%r13, %rdi
	call	bubbleSort
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %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
.L23:
	.cfi_restore_state
	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 bubbleSort(int num[],int n){
    int flag=1,j,tmp,count=0;
    while(flag){
        flag=0;
        for(j=n-1;j>0;j--){
            if(num[j]<num[j-1]){
                tmp=num[j];
                num[j]=num[j-1];
                num[j-1]=tmp;
                count++;
                flag=1;
            }
        }
    }
    for(j=0;j<n;j++){
        printf("%d%s",num[j],(j==n-1?"\n":" "));
    }
    printf("%d\n",count);
} 

int main(void){
    int num[101];
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&num[i]);
    }
    bubbleSort(num,n);
    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 bubbleSort(int num[],int n){
    int flag=1,j,tmp,count=0;
    while(flag){
        flag=0;
        for(j=n-1;j>0;j--){
            if(num[j]<num[j-1]){
                tmp=num[j];
                num[j]=num[j-1];
                num[j-1]=tmp;
                count++;
                flag=1;
            }
        }
    }
    for(j=0;j<n;j++){
        printf("%d%s",num[j],(j==n-1?"\n":" "));
    }
    printf("%d\n",count);
} 

int main(void){
    int num[101];
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&num[i]);
    }
    bubbleSort(num,n);
    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
7 3 2 4 1
 6
5 1 4 6 1 3
 5
7 3 2 3 1
 6
6 1 4 6 1 3
 5
7 3 2 3 0
 6
6 1 3 6 1 3
 5
7 3 4 3 0
 6
8 1 3 6 1 3
 5
7 1 4 3 0
 6
8 1 3 6 2 3

1 2 3 4 7
8
 1 1 3 4 5 6
8
 1 2 3 3 7
8
 1 1 3 4 6 6
8
 0 2 3 3 7
8
 1 1 3 3 6 6
7
 0 3 3 4 7
8
 1 1 3 3 6 8
8
 0 1 3 4 7
8
 1 2 3 3 6 8
8

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 bubbleSort(int num[],int n){
    int flag=1,j,tmp,count=0;
    while(flag){
        flag=0;
        for(j=n-1;j>0;j--){
            if(num[j]<num[j-1]){
                tmp=num[j];
                num[j]=num[j-1];
                num[j-1]=tmp;
                count++;
                flag=1;
            }
        }
    }
    for(j=0;j<n;j++){
        printf("%d%s",num[j],(j==n-1?"\n":" "));
    }
    printf("%d\n",count);
} 

int main(void){
    int num[101];
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&num[i]);
    }
    bubbleSort(num,n);
    return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC1:
	.string	"%d%s"
.LC2:
	.string	"\n"
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	-1(%rsi), %ebx
	movslq	%ebx, %rax
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rsi
	leal	-2(%r10), %eax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%ebx, %ebx
	jle	.L2
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L3
	movq	%xmm1, (%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L3:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L4
	testl	%edi, %edi
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	testl	%r10d, %r10d
	jle	.L6
	movl	%ebx, %eax
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	movq	%rax, 8(%rsp)
	leaq	.LC0(%rip), %r14
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	1(%r15), %rax
	cmpq	8(%rsp), %r15
	je	.L6
	movq	%rax, %r15
.L9:
	movl	0(%r13,%r15,4), %edx
	movq	%r14, %rcx
	cmpl	%r15d, %ebx
	jne	.L13
	leaq	.LC2(%rip), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$1, %edi
	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
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE23:
	.size	bubbleSort, .-bubbleSort
	.section	.rodata.str1.1
.LC4:
	.string	"%d"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC4(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L17
.L16:
	movq	%r13, %rdi
	call	bubbleSort
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %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
.L23:
	.cfi_restore_state
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC1:
	.string	"%d%s"
.LC2:
	.string	"\n"
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	-1(%rsi), %ebx
	movslq	%ebx, %rax
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rsi
	leal	-2(%r10), %eax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%ebx, %ebx
	jle	.L2
	movq	%r9, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jle	.L3
	movq	%xmm1, (%rdx)
	addl	$1, %r12d
	movl	$1, %edi
.L3:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L4
	testl	%edi, %edi
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	testl	%r10d, %r10d
	jle	.L6
	movl	%ebx, %eax
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	movq	%rax, 8(%rsp)
	leaq	.LC0(%rip), %r14
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	1(%r15), %rax
	cmpq	8(%rsp), %r15
	je	.L6
	movq	%rax, %r15
.L9:
	movl	0(%r13,%r15,4), %edx
	movq	%r14, %rcx
	cmpl	%r15d, %ebx
	jne	.L13
	leaq	.LC2(%rip), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$1, %edi
	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
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE23:
	.size	bubbleSort, .-bubbleSort
	.section	.rodata.str1.1
.LC4:
	.string	"%d"
	.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
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC4(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L17
.L16:
	movq	%r13, %rdi
	call	bubbleSort
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$440, %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
.L23:
	.cfi_restore_state
	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:
```