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>

int BubbleSort ( int *Arr, int *Order, int Max_order );

int SelectionSort ( int *Arr, int *Order, int Max_order );

int Judge_stable ( int *Arr, int *Order, int Max_order );

int Display_Arr ( char *name, int *Arr, int *Order, int Max_order );


int main(void)
{
    int     Max_order       = 0;
    int     Card_value[36]  = {};
    char    Card_name[36]   = {};
    int     Order[36]       = {};
    int     i               = 0;
    int     Judge_Bubble    = 0;
    int     Judge_Selection = 0;
    
    for ( i = 0; i < 36; i++ ) {
        Order[i] = i;
    }
    
    scanf ( "%d\n", &Max_order );
    
    for ( i = 0; i < Max_order; i++ ) {
        scanf( "%c%d ", &Card_name[i], &Card_value[i] );
    }
    

    BubbleSort( Card_value, Order, Max_order );
    
    Judge_Bubble = Judge_stable( Card_value, Order, Max_order );

        
    Display_Arr( Card_name, Card_value, Order, Max_order );
    
    if ( Judge_Bubble == 0 ) {
        printf("Stable\n");
    } else {
        printf("Not stable\n");
    }
    
    
    for ( i = 0; i < 36; i++ ) {
        Order[i] = i;
    }

    SelectionSort( Card_value, Order, Max_order );
    
    Judge_Selection = Judge_stable( Card_value, Order, Max_order );


    Display_Arr( Card_name, Card_value, Order, Max_order );
    
    if ( Judge_Selection == 0 ) {
        printf("Stable\n");
    } else {
        printf("Not stable\n");
    }    
    
    
    return 0;
}

int BubbleSort ( int *Arr, int *Order, int Max_order )
{
    int i = 0;
    int j = 0;
    int tmp = 0;
    
    for ( i = 0; i < Max_order; i++ ) {
        for ( j = Max_order - 1; j > i; j-- ) {
            if ( Arr[Order[j]] < Arr[Order[j-1]] ) {
                tmp = Order[j];
                Order[j] = Order[j-1];
                Order[j-1] = tmp;
            }
        }
    }
    
    return 0;
}

int SelectionSort ( int *Arr, int *Order, int Max_order )
{
    int i = 0;
    int j = 0;
    int tmp = 0;
    int  mini = 0;
    
    for ( i = 0; i < Max_order; i++ ) {
        mini = i;
        for ( j = i; j < Max_order; j++ ) {
            if ( Arr[Order[j]] < Arr[Order[mini]] ) {
                mini = j;
            }
            
            
        }
        tmp = Order[i];
        Order[i] = Order[mini];
        Order[mini] = tmp;
    }
    
    
    return 0;
}

int Judge_stable ( int *Arr, int *Order, int Max_order )
{
    int number_for_comp = 1;
    int indexes_of_the_same_value[10][5] ={};
    int count_of_indexes = 0;
    int i = 0;
    int j = 0;
    int k = 0;
    int target_index[4] = {};
    int stable = 0;
    
    /*元のデータから同じ値をとる添え字を格納する*/
    for ( number_for_comp = 1; number_for_comp < 10; number_for_comp++ ) {
        count_of_indexes = 0;
        for ( i = 0; i < Max_order; i++ ) {
            
            if ( Arr[i] == number_for_comp) {
                
                indexes_of_the_same_value[number_for_comp][count_of_indexes] = i;
                count_of_indexes++;
            }
            
        }
        indexes_of_the_same_value[number_for_comp][4] = count_of_indexes;
        //printf("count of indexes: %d\n", count_of_indexes);
    }
    
    /*同じ値の添え字が入れ替わったのかを確認する*/
    stable = 0;
    for ( number_for_comp = 1; number_for_comp < 10; number_for_comp++ ) {
        if ( indexes_of_the_same_value[number_for_comp][4] < 2 ) {
            continue;
        }
        
        /*判断に使う添え字をそろえる*/
        k = 0;
        for ( j = 0; j < indexes_of_the_same_value[number_for_comp][4]; j++ ) {
            for ( i = 0; i < Max_order; i++ ) {
                if ( Order[i] == indexes_of_the_same_value[number_for_comp][j] ) {
                    target_index[k] = i;
                    //printf("%d count of indexes: %d\n", number_for_comp, target_index[k]);
                    k++;
                }
            }
        }
        
        
        for ( k = 0; k < indexes_of_the_same_value[number_for_comp][4]; k++ ) {
            for ( j = k+1; j < indexes_of_the_same_value[number_for_comp][4]; j++ ) {
                if ( target_index[k] > target_index[j] ) {
                    stable = 1;
                    //printf("target_index: %d\n", target_index[k]);
                    break;
                }
            }
            if (stable == 1) {
                break;
            }
        }
        
        if (stable == 1) {
            //printf("target_index: %d\n", target_index[k]);
            //printf("target_index: %d\n", stable);
            break;
        }
        
    }
    //printf("target_index: %d\n", stable);
    return stable;
    
}

int Display_Arr ( char *name, int *Arr, int *Order, int Max_order )
{
    int i = 0;
    for ( i = 0; i < Max_order-1; i++ ) {
        printf("%c%d ", name[Order[i]], Arr[Order[i]]);
    }
    
    printf("%c%d\n", name[Order[i]], Arr[Order[i]]);
    
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%c%d "
.LC2:
	.string	"Stable"
.LC3:
	.string	"Not stable"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -352(%rbp)
	leaq	-336(%rbp), %rdx
	movl	$0, %eax
	movl	$18, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	leaq	-192(%rbp), %rdx
	movl	$0, %eax
	movl	$18, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -348(%rbp)
	movl	$0, -344(%rbp)
	movl	$0, -340(%rbp)
	movl	$0, -348(%rbp)
	jmp	.L2
.L3:
	movl	-348(%rbp), %eax
	cltq
	movl	-348(%rbp), %edx
	movl	%edx, -192(%rbp,%rax,4)
	addl	$1, -348(%rbp)
.L2:
	cmpl	$35, -348(%rbp)
	jle	.L3
	leaq	-352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -348(%rbp)
	jmp	.L4
.L5:
	leaq	-336(%rbp), %rdx
	movl	-348(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rcx
	movl	-348(%rbp), %eax
	cltq
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -348(%rbp)
.L4:
	movl	-352(%rbp), %eax
	cmpl	%eax, -348(%rbp)
	jl	.L5
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	BubbleSort
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Judge_stable
	movl	%eax, -344(%rbp)
	movl	-352(%rbp), %ecx
	leaq	-192(%rbp), %rdx
	leaq	-336(%rbp), %rsi
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	Display_Arr
	cmpl	$0, -344(%rbp)
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L7:
	movl	$0, -348(%rbp)
	jmp	.L8
.L9:
	movl	-348(%rbp), %eax
	cltq
	movl	-348(%rbp), %edx
	movl	%edx, -192(%rbp,%rax,4)
	addl	$1, -348(%rbp)
.L8:
	cmpl	$35, -348(%rbp)
	jle	.L9
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	SelectionSort
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Judge_stable
	movl	%eax, -340(%rbp)
	movl	-352(%rbp), %ecx
	leaq	-192(%rbp), %rdx
	leaq	-336(%rbp), %rsi
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	Display_Arr
	cmpl	$0, -340(%rbp)
	jne	.L10
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L11
.L10:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L11:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	BubbleSort
	.type	BubbleSort, @function
BubbleSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L15
.L19:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
.L17:
	subl	$1, -8(%rbp)
.L16:
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.L18
	addl	$1, -12(%rbp)
.L15:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L19
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	BubbleSort, .-BubbleSort
	.globl	SelectionSort
	.type	SelectionSort, @function
SelectionSort:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L22
.L26:
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L23
.L25:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L24
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
.L24:
	addl	$1, -12(%rbp)
.L23:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L25
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
.L22:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L26
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	SelectionSort, .-SelectionSort
	.globl	Judge_stable
	.type	Judge_stable, @function
Judge_stable:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$288, %rsp
	movq	%rdi, -264(%rbp)
	movq	%rsi, -272(%rbp)
	movl	%edx, -276(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -248(%rbp)
	leaq	-208(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -244(%rbp)
	movl	$0, -240(%rbp)
	movl	$0, -236(%rbp)
	movl	$0, -232(%rbp)
	movq	$0, -224(%rbp)
	movq	$0, -216(%rbp)
	movl	$0, -228(%rbp)
	movl	$1, -248(%rbp)
	jmp	.L29
.L33:
	movl	$0, -244(%rbp)
	movl	$0, -240(%rbp)
	jmp	.L30
.L32:
	movl	-240(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-264(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -248(%rbp)
	jne	.L31
	movl	-244(%rbp), %eax
	movslq	%eax, %rcx
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-240(%rbp), %eax
	movl	%eax, -208(%rbp,%rdx,4)
	addl	$1, -244(%rbp)
.L31:
	addl	$1, -240(%rbp)
.L30:
	movl	-240(%rbp), %eax
	cmpl	-276(%rbp), %eax
	jl	.L32
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	leaq	-192(%rax), %rdx
	movl	-244(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -248(%rbp)
.L29:
	cmpl	$9, -248(%rbp)
	jle	.L33
	movl	$0, -228(%rbp)
	movl	$1, -248(%rbp)
	jmp	.L34
.L51:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	jle	.L54
	movl	$0, -232(%rbp)
	movl	$0, -236(%rbp)
	jmp	.L37
.L41:
	movl	$0, -240(%rbp)
	jmp	.L38
.L40:
	movl	-240(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-272(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-236(%rbp), %eax
	movslq	%eax, %rsi
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-208(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L39
	movl	-232(%rbp), %eax
	cltq
	movl	-240(%rbp), %edx
	movl	%edx, -224(%rbp,%rax,4)
	addl	$1, -232(%rbp)
.L39:
	addl	$1, -240(%rbp)
.L38:
	movl	-240(%rbp), %eax
	cmpl	-276(%rbp), %eax
	jl	.L40
	addl	$1, -236(%rbp)
.L37:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -236(%rbp)
	jl	.L41
	movl	$0, -232(%rbp)
	jmp	.L42
.L49:
	movl	-232(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -236(%rbp)
	jmp	.L43
.L46:
	movl	-232(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %edx
	movl	-236(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L44
	movl	$1, -228(%rbp)
	jmp	.L45
.L44:
	addl	$1, -236(%rbp)
.L43:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -236(%rbp)
	jl	.L46
.L45:
	cmpl	$1, -228(%rbp)
	je	.L55
	addl	$1, -232(%rbp)
.L42:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -232(%rbp)
	jl	.L49
	jmp	.L48
.L55:
	nop
.L48:
	cmpl	$1, -228(%rbp)
	je	.L56
	jmp	.L36
.L54:
	nop
.L36:
	addl	$1, -248(%rbp)
.L34:
	cmpl	$9, -248(%rbp)
	jle	.L51
	jmp	.L50
.L56:
	nop
.L50:
	movl	-228(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Judge_stable, .-Judge_stable
	.section	.rodata
.LC4:
	.string	"%c%d\n"
	.text
	.globl	Display_Arr
	.type	Display_Arr, @function
Display_Arr:
.LFB4:
	.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	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L58
.L59:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L58:
	movl	-44(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L59
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Display_Arr, .-Display_Arr
	.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
	.p2align 4
	.globl	BubbleSort
	.type	BubbleSort, @function
BubbleSort:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%edx, %edx
	jle	.L10
	subl	$1, %edx
	je	.L10
	xorl	%r9d, %r9d
	movslq	%edx, %r10
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r10, %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	-4(%rsi,%rcx,4), %xmm0
	movslq	(%rsi,%rcx,4), %r8
	movd	%xmm0, %eax
	pshufd	$225, %xmm0, %xmm1
	cltq
	movl	(%rdi,%rax,4), %eax
	cmpl	%eax, (%rdi,%r8,4)
	jge	.L7
	movq	%xmm1, -4(%rsi,%rcx,4)
.L7:
	subq	$1, %rcx
	cmpl	%ecx, %r9d
	jl	.L4
	addl	$1, %r9d
	cmpl	%edx, %r9d
	jl	.L5
.L10:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	BubbleSort, .-BubbleSort
	.p2align 4
	.globl	SelectionSort
	.type	SelectionSort, @function
SelectionSort:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%edx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	testl	%r13d, %r13d
	jle	.L27
	movq	%rdi, %r11
	movq	%rsi, %rcx
	movq	%r13, %r10
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%rcx,%rbx,4), %rax
	movl	%ebx, %r9d
	movl	(%r11,%rax,4), %esi
	movq	%rax, %r12
	movq	%rbx, %rax
	movl	%r12d, %ebp
	movl	%esi, %edx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%r9d, %rdx
	addq	$1, %rax
	leaq	(%rcx,%rdx,4), %rdi
	cmpl	%eax, %r10d
	jle	.L20
.L30:
	movslq	(%rcx,%rax,4), %rdx
	movl	(%r11,%rdx,4), %edx
.L21:
	movl	(%rcx,%rax,4), %r8d
	leaq	(%rcx,%rax,4), %rdi
	cmpl	%edx, %esi
	jle	.L29
	movl	%eax, %r9d
	addq	$1, %rax
	movl	%edx, %esi
	movl	%r8d, %ebp
	cmpl	%eax, %r10d
	jg	.L30
.L20:
	movl	%ebp, (%rcx,%rbx,4)
	addq	$1, %rbx
	movl	%r12d, (%rdi)
	cmpq	%rbx, %r13
	jne	.L22
.L27:
	popq	%rbx
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	SelectionSort, .-SelectionSort
	.p2align 4
	.globl	Judge_stable
	.type	Judge_stable, @function
Judge_stable:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r8
	movl	$25, %ecx
	movslq	%edx, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pxor	%xmm0, %xmm0
	movq	%r10, %r9
	movl	$1, %edx
	subq	$232, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movaps	%xmm0, (%rsp)
	leaq	52(%rsp), %rbx
	rep stosq
	.p2align 4,,10
	.p2align 3
.L32:
	movslq	%edx, %rcx
	xorl	%eax, %eax
	xorl	%edi, %edi
	leaq	(%rcx,%rcx,4), %r11
	testl	%r9d, %r9d
	jle	.L37
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	%edx, (%r8,%rax,4)
	jne	.L33
	movslq	%edi, %rcx
	addl	$1, %edi
	addq	%r11, %rcx
	movl	%eax, 16(%rsp,%rcx,4)
.L33:
	addq	$1, %rax
	cmpq	%rax, %r10
	jne	.L34
.L37:
	addl	$1, %edx
	movl	%edi, (%rbx)
	addq	$20, %rbx
	cmpl	$10, %edx
	jne	.L32
	leaq	36(%rsp), %r11
	leaq	216(%rsp), %rbp
	movslq	%r9d, %rdi
	.p2align 4,,10
	.p2align 3
.L47:
	movl	16(%r11), %ebx
	cmpl	$1, %ebx
	jle	.L38
	testl	%r9d, %r9d
	jle	.L46
	xorl	%r10d, %r10d
	xorl	%ecx, %ecx
.L42:
	movl	(%r11,%r10,4), %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	%edx, (%rsi,%rax,4)
	jne	.L40
	movslq	%ecx, %r8
	addl	$1, %ecx
	movl	%eax, (%rsp,%r8,4)
.L40:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L41
	addq	$1, %r10
	cmpl	%r10d, %ebx
	jg	.L42
.L46:
	movl	(%rsp), %edx
	movl	4(%rsp), %eax
	cmpl	%edx, %eax
	jl	.L55
	cmpl	$2, %ebx
	je	.L38
	cmpl	8(%rsp), %edx
	jg	.L55
	cmpl	$3, %ebx
	je	.L44
	cmpl	%edx, 12(%rsp)
	jl	.L55
.L44:
	movl	8(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L55
	cmpl	$3, %ebx
	je	.L38
	cmpl	12(%rsp), %eax
	jg	.L55
	cmpl	$4, %ebx
	je	.L45
	cmpl	16(%rsp), %eax
	jg	.L55
.L45:
	cmpl	%edx, 12(%rsp)
	jl	.L55
.L38:
	addq	$20, %r11
	cmpq	%r11, %rbp
	jne	.L47
	xorl	%eax, %eax
.L31:
	movq	216(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L75
	addq	$232, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L55:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L31
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	Judge_stable, .-Judge_stable
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%c%d "
.LC1:
	.string	"%c%d\n"
	.text
	.p2align 4
	.globl	Display_Arr
	.type	Display_Arr, @function
Display_Arr:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rcx), %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L77
	leal	-2(%rcx), %eax
	movq	%rdx, %r15
	leaq	.LC0(%rip), %r12
	leaq	4(%rdx,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L78:
	movslq	(%r15), %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$4, %r15
	movl	0(%rbp,%rax,4), %ecx
	movsbl	(%rbx,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpq	%r15, %r13
	jne	.L78
	movslq	12(%rsp), %r15
	leaq	(%r14,%r15,4), %r14
.L77:
	movslq	(%r14), %rax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	0(%rbp,%rax,4), %ecx
	movsbl	(%rbx,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	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
	ret
	.cfi_endproc
.LFE27:
	.size	Display_Arr, .-Display_Arr
	.section	.rodata.str1.1
.LC11:
	.string	"%d\n"
.LC12:
	.string	"Stable"
.LC13:
	.string	"Not stable"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$18, %ecx
	pxor	%xmm0, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$360, %rsp
	.cfi_def_cfa_offset 416
	movdqa	.LC2(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	movdqa	.LC4(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm4
	movaps	%xmm1, 160(%rsp)
	movq	%r14, %rdi
	leaq	12(%rsp), %rsi
	movdqa	.LC6(%rip), %xmm5
	movdqa	.LC7(%rip), %xmm6
	movdqa	.LC8(%rip), %xmm7
	movaps	%xmm2, 176(%rsp)
	leaq	304(%rsp), %r13
	movdqa	.LC9(%rip), %xmm1
	movdqa	.LC10(%rip), %xmm2
	movl	$0, 12(%rsp)
	movl	$0, 336(%rsp)
	movaps	%xmm0, 304(%rsp)
	rep stosq
	leaq	.LC11(%rip), %rdi
	movaps	%xmm0, 320(%rsp)
	movaps	%xmm3, 192(%rsp)
	movaps	%xmm4, 208(%rsp)
	movaps	%xmm5, 224(%rsp)
	movaps	%xmm6, 240(%rsp)
	movaps	%xmm7, 256(%rsp)
	movaps	%xmm1, 272(%rsp)
	movaps	%xmm2, 288(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L82
	movq	%r14, %rbp
	xorl	%ebx, %ebx
	leaq	304(%rsp), %r13
	leaq	.LC0(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L83:
	leaq	0(%r13,%rbx), %rsi
	movq	%rbp, %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jg	.L83
.L82:
	leaq	160(%rsp), %r15
	movq	%r14, %rdi
	movl	%r12d, %edx
	movq	%r15, %rsi
	call	BubbleSort
	movl	%r12d, %edx
	call	Judge_stable
	movl	%r12d, %ecx
	movq	%r15, %rdx
	movq	%r14, %rsi
	movl	%eax, %ebx
	movq	%r13, %rdi
	call	Display_Arr
	testl	%ebx, %ebx
	jne	.L84
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L85:
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm4
	movq	%r15, %rsi
	movq	%r14, %rdi
	movdqa	.LC4(%rip), %xmm5
	movdqa	.LC5(%rip), %xmm6
	movdqa	.LC6(%rip), %xmm7
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm3, 160(%rsp)
	movdqa	.LC8(%rip), %xmm1
	movdqa	.LC9(%rip), %xmm2
	movaps	%xmm4, 176(%rsp)
	movdqa	.LC10(%rip), %xmm3
	movl	12(%rsp), %edx
	movaps	%xmm5, 192(%rsp)
	movaps	%xmm6, 208(%rsp)
	movaps	%xmm7, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm1, 256(%rsp)
	movaps	%xmm2, 272(%rsp)
	movaps	%xmm3, 288(%rsp)
	call	SelectionSort
	movl	12(%rsp), %r12d
	movq	%r15, %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	call	Judge_stable
	movl	%r12d, %ecx
	movq	%r15, %rdx
	movq	%r14, %rsi
	movl	%eax, %ebx
	movq	%r13, %rdi
	call	Display_Arr
	testl	%ebx, %ebx
	jne	.L86
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L87:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L93
	addq	$360, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	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
	ret
.L84:
	.cfi_restore_state
	leaq	.LC13(%rip), %rdi
	call	puts@PLT
	jmp	.L85
.L86:
	leaq	.LC13(%rip), %rdi
	call	puts@PLT
	jmp	.L87
.L93:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	5
	.long	6
	.long	7
	.align 16
.LC4:
	.long	8
	.long	9
	.long	10
	.long	11
	.align 16
.LC5:
	.long	12
	.long	13
	.long	14
	.long	15
	.align 16
.LC6:
	.long	16
	.long	17
	.long	18
	.long	19
	.align 16
.LC7:
	.long	20
	.long	21
	.long	22
	.long	23
	.align 16
.LC8:
	.long	24
	.long	25
	.long	26
	.long	27
	.align 16
.LC9:
	.long	28
	.long	29
	.long	30
	.long	31
	.align 16
.LC10:
	.long	32
	.long	33
	.long	34
	.long	35
	.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
	.p2align 4
	.globl	BubbleSort
	.type	BubbleSort, @function
BubbleSort:
.LFB24:
	.cfi_startproc
	endbr64
	testl	%edx, %edx
	jle	.L10
	subl	$1, %edx
	je	.L10
	xorl	%r9d, %r9d
	movslq	%edx, %r10
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r10, %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movq	-4(%rsi,%rcx,4), %xmm0
	movslq	(%rsi,%rcx,4), %r8
	movd	%xmm0, %eax
	pshufd	$225, %xmm0, %xmm1
	cltq
	movl	(%rdi,%rax,4), %eax
	cmpl	%eax, (%rdi,%r8,4)
	jge	.L7
	movq	%xmm1, -4(%rsi,%rcx,4)
.L7:
	subq	$1, %rcx
	cmpl	%ecx, %r9d
	jl	.L4
	addl	$1, %r9d
	cmpl	%edx, %r9d
	jl	.L5
.L10:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	BubbleSort, .-BubbleSort
	.p2align 4
	.globl	SelectionSort
	.type	SelectionSort, @function
SelectionSort:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%edx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	testl	%r13d, %r13d
	jle	.L27
	movq	%rdi, %r11
	movq	%rsi, %rcx
	movq	%r13, %r10
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%rcx,%rbx,4), %rax
	movl	%ebx, %r9d
	movl	(%r11,%rax,4), %esi
	movq	%rax, %r12
	movq	%rbx, %rax
	movl	%r12d, %ebp
	movl	%esi, %edx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%r9d, %rdx
	addq	$1, %rax
	leaq	(%rcx,%rdx,4), %rdi
	cmpl	%eax, %r10d
	jle	.L20
.L30:
	movslq	(%rcx,%rax,4), %rdx
	movl	(%r11,%rdx,4), %edx
.L21:
	movl	(%rcx,%rax,4), %r8d
	leaq	(%rcx,%rax,4), %rdi
	cmpl	%edx, %esi
	jle	.L29
	movl	%eax, %r9d
	addq	$1, %rax
	movl	%edx, %esi
	movl	%r8d, %ebp
	cmpl	%eax, %r10d
	jg	.L30
.L20:
	movl	%ebp, (%rcx,%rbx,4)
	addq	$1, %rbx
	movl	%r12d, (%rdi)
	cmpq	%rbx, %r13
	jne	.L22
.L27:
	popq	%rbx
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	SelectionSort, .-SelectionSort
	.p2align 4
	.globl	Judge_stable
	.type	Judge_stable, @function
Judge_stable:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r8
	movl	$25, %ecx
	movslq	%edx, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pxor	%xmm0, %xmm0
	movq	%r10, %r9
	movl	$1, %edx
	subq	$232, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movaps	%xmm0, (%rsp)
	leaq	52(%rsp), %rbx
	rep stosq
	.p2align 4,,10
	.p2align 3
.L32:
	movslq	%edx, %rcx
	xorl	%eax, %eax
	xorl	%edi, %edi
	leaq	(%rcx,%rcx,4), %r11
	testl	%r9d, %r9d
	jle	.L37
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	%edx, (%r8,%rax,4)
	jne	.L33
	movslq	%edi, %rcx
	addl	$1, %edi
	addq	%r11, %rcx
	movl	%eax, 16(%rsp,%rcx,4)
.L33:
	addq	$1, %rax
	cmpq	%rax, %r10
	jne	.L34
.L37:
	addl	$1, %edx
	movl	%edi, (%rbx)
	addq	$20, %rbx
	cmpl	$10, %edx
	jne	.L32
	leaq	36(%rsp), %r11
	leaq	216(%rsp), %rbp
	movslq	%r9d, %rdi
	.p2align 4,,10
	.p2align 3
.L47:
	movl	16(%r11), %ebx
	cmpl	$1, %ebx
	jle	.L38
	testl	%r9d, %r9d
	jle	.L46
	xorl	%r10d, %r10d
	xorl	%ecx, %ecx
.L42:
	movl	(%r11,%r10,4), %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	%edx, (%rsi,%rax,4)
	jne	.L40
	movslq	%ecx, %r8
	addl	$1, %ecx
	movl	%eax, (%rsp,%r8,4)
.L40:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L41
	addq	$1, %r10
	cmpl	%r10d, %ebx
	jg	.L42
.L46:
	movl	(%rsp), %edx
	movl	4(%rsp), %eax
	cmpl	%edx, %eax
	jl	.L55
	cmpl	$2, %ebx
	je	.L38
	cmpl	8(%rsp), %edx
	jg	.L55
	cmpl	$3, %ebx
	je	.L44
	cmpl	%edx, 12(%rsp)
	jl	.L55
.L44:
	movl	8(%rsp), %edx
	cmpl	%edx, %eax
	jg	.L55
	cmpl	$3, %ebx
	je	.L38
	cmpl	12(%rsp), %eax
	jg	.L55
	cmpl	$4, %ebx
	je	.L45
	cmpl	16(%rsp), %eax
	jg	.L55
.L45:
	cmpl	%edx, 12(%rsp)
	jl	.L55
.L38:
	addq	$20, %r11
	cmpq	%r11, %rbp
	jne	.L47
	xorl	%eax, %eax
.L31:
	movq	216(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L75
	addq	$232, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L55:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L31
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	Judge_stable, .-Judge_stable
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%c%d "
.LC1:
	.string	"%c%d\n"
	.text
	.p2align 4
	.globl	Display_Arr
	.type	Display_Arr, @function
Display_Arr:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	-1(%rcx), %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L77
	leal	-2(%rcx), %eax
	movq	%rdx, %r15
	leaq	.LC0(%rip), %r12
	leaq	4(%rdx,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L78:
	movslq	(%r15), %rax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$4, %r15
	movl	0(%rbp,%rax,4), %ecx
	movsbl	(%rbx,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpq	%r15, %r13
	jne	.L78
	movslq	12(%rsp), %r15
	leaq	(%r14,%r15,4), %r14
.L77:
	movslq	(%r14), %rax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	0(%rbp,%rax,4), %ecx
	movsbl	(%rbx,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	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
	ret
	.cfi_endproc
.LFE27:
	.size	Display_Arr, .-Display_Arr
	.section	.rodata.str1.1
.LC11:
	.string	"%d\n"
.LC12:
	.string	"Stable"
.LC13:
	.string	"Not stable"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$18, %ecx
	pxor	%xmm0, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$360, %rsp
	.cfi_def_cfa_offset 416
	movdqa	.LC2(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	movdqa	.LC4(%rip), %xmm3
	movdqa	.LC5(%rip), %xmm4
	movaps	%xmm1, 160(%rsp)
	movq	%r14, %rdi
	leaq	12(%rsp), %rsi
	movdqa	.LC6(%rip), %xmm5
	movdqa	.LC7(%rip), %xmm6
	movdqa	.LC8(%rip), %xmm7
	movaps	%xmm2, 176(%rsp)
	leaq	304(%rsp), %r13
	movdqa	.LC9(%rip), %xmm1
	movdqa	.LC10(%rip), %xmm2
	movl	$0, 12(%rsp)
	movl	$0, 336(%rsp)
	movaps	%xmm0, 304(%rsp)
	rep stosq
	leaq	.LC11(%rip), %rdi
	movaps	%xmm0, 320(%rsp)
	movaps	%xmm3, 192(%rsp)
	movaps	%xmm4, 208(%rsp)
	movaps	%xmm5, 224(%rsp)
	movaps	%xmm6, 240(%rsp)
	movaps	%xmm7, 256(%rsp)
	movaps	%xmm1, 272(%rsp)
	movaps	%xmm2, 288(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L82
	movq	%r14, %rbp
	xorl	%ebx, %ebx
	leaq	304(%rsp), %r13
	leaq	.LC0(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L83:
	leaq	0(%r13,%rbx), %rsi
	movq	%rbp, %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jg	.L83
.L82:
	leaq	160(%rsp), %r15
	movq	%r14, %rdi
	movl	%r12d, %edx
	movq	%r15, %rsi
	call	BubbleSort
	movl	%r12d, %edx
	call	Judge_stable
	movl	%r12d, %ecx
	movq	%r15, %rdx
	movq	%r14, %rsi
	movl	%eax, %ebx
	movq	%r13, %rdi
	call	Display_Arr
	testl	%ebx, %ebx
	jne	.L84
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L85:
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm4
	movq	%r15, %rsi
	movq	%r14, %rdi
	movdqa	.LC4(%rip), %xmm5
	movdqa	.LC5(%rip), %xmm6
	movdqa	.LC6(%rip), %xmm7
	movdqa	.LC7(%rip), %xmm0
	movaps	%xmm3, 160(%rsp)
	movdqa	.LC8(%rip), %xmm1
	movdqa	.LC9(%rip), %xmm2
	movaps	%xmm4, 176(%rsp)
	movdqa	.LC10(%rip), %xmm3
	movl	12(%rsp), %edx
	movaps	%xmm5, 192(%rsp)
	movaps	%xmm6, 208(%rsp)
	movaps	%xmm7, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm1, 256(%rsp)
	movaps	%xmm2, 272(%rsp)
	movaps	%xmm3, 288(%rsp)
	call	SelectionSort
	movl	12(%rsp), %r12d
	movq	%r15, %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	call	Judge_stable
	movl	%r12d, %ecx
	movq	%r15, %rdx
	movq	%r14, %rsi
	movl	%eax, %ebx
	movq	%r13, %rdi
	call	Display_Arr
	testl	%ebx, %ebx
	jne	.L86
	leaq	.LC12(%rip), %rdi
	call	puts@PLT
.L87:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L93
	addq	$360, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	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
	ret
.L84:
	.cfi_restore_state
	leaq	.LC13(%rip), %rdi
	call	puts@PLT
	jmp	.L85
.L86:
	leaq	.LC13(%rip), %rdi
	call	puts@PLT
	jmp	.L87
.L93:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	5
	.long	6
	.long	7
	.align 16
.LC4:
	.long	8
	.long	9
	.long	10
	.long	11
	.align 16
.LC5:
	.long	12
	.long	13
	.long	14
	.long	15
	.align 16
.LC6:
	.long	16
	.long	17
	.long	18
	.long	19
	.align 16
.LC7:
	.long	20
	.long	21
	.long	22
	.long	23
	.align 16
.LC8:
	.long	24
	.long	25
	.long	26
	.long	27
	.align 16
.LC9:
	.long	28
	.long	29
	.long	30
	.long	31
	.align 16
.LC10:
	.long	32
	.long	33
	.long	34
	.long	35
	.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>

int BubbleSort ( int *Arr, int *Order, int Max_order );

int SelectionSort ( int *Arr, int *Order, int Max_order );

int Judge_stable ( int *Arr, int *Order, int Max_order );

int Display_Arr ( char *name, int *Arr, int *Order, int Max_order );


int main(void)
{
    int     Max_order       = 0;
    int     Card_value[36]  = {};
    char    Card_name[36]   = {};
    int     Order[36]       = {};
    int     i               = 0;
    int     Judge_Bubble    = 0;
    int     Judge_Selection = 0;
    
    for ( i = 0; i < 36; i++ ) {
        Order[i] = i;
    }
    
    scanf ( "%d\n", &Max_order );
    
    for ( i = 0; i < Max_order; i++ ) {
        scanf( "%c%d ", &Card_name[i], &Card_value[i] );
    }
    

    BubbleSort( Card_value, Order, Max_order );
    
    Judge_Bubble = Judge_stable( Card_value, Order, Max_order );

        
    Display_Arr( Card_name, Card_value, Order, Max_order );
    
    if ( Judge_Bubble == 0 ) {
        printf("Stable\n");
    } else {
        printf("Not stable\n");
    }
    
    
    for ( i = 0; i < 36; i++ ) {
        Order[i] = i;
    }

    SelectionSort( Card_value, Order, Max_order );
    
    Judge_Selection = Judge_stable( Card_value, Order, Max_order );


    Display_Arr( Card_name, Card_value, Order, Max_order );
    
    if ( Judge_Selection == 0 ) {
        printf("Stable\n");
    } else {
        printf("Not stable\n");
    }    
    
    
    return 0;
}

int BubbleSort ( int *Arr, int *Order, int Max_order )
{
    int i = 0;
    int j = 0;
    int tmp = 0;
    
    for ( i = 0; i < Max_order; i++ ) {
        for ( j = Max_order - 1; j > i; j-- ) {
            if ( Arr[Order[j]] < Arr[Order[j-1]] ) {
                tmp = Order[j];
                Order[j] = Order[j-1];
                Order[j-1] = tmp;
            }
        }
    }
    
    return 0;
}

int SelectionSort ( int *Arr, int *Order, int Max_order )
{
    int i = 0;
    int j = 0;
    int tmp = 0;
    int  mini = 0;
    
    for ( i = 0; i < Max_order; i++ ) {
        mini = i;
        for ( j = i; j < Max_order; j++ ) {
            if ( Arr[Order[j]] < Arr[Order[mini]] ) {
                mini = j;
            }
            
            
        }
        tmp = Order[i];
        Order[i] = Order[mini];
        Order[mini] = tmp;
    }
    
    
    return 0;
}

int Judge_stable ( int *Arr, int *Order, int Max_order )
{
    int number_for_comp = 1;
    int indexes_of_the_same_value[10][5] ={};
    int count_of_indexes = 0;
    int i = 0;
    int j = 0;
    int k = 0;
    int target_index[4] = {};
    int stable = 0;
    
    /*元のデータから同じ値をとる添え字を格納する*/
    for ( number_for_comp = 1; number_for_comp < 10; number_for_comp++ ) {
        count_of_indexes = 0;
        for ( i = 0; i < Max_order; i++ ) {
            
            if ( Arr[i] == number_for_comp) {
                
                indexes_of_the_same_value[number_for_comp][count_of_indexes] = i;
                count_of_indexes++;
            }
            
        }
        indexes_of_the_same_value[number_for_comp][4] = count_of_indexes;
        //printf("count of indexes: %d\n", count_of_indexes);
    }
    
    /*同じ値の添え字が入れ替わったのかを確認する*/
    stable = 0;
    for ( number_for_comp = 1; number_for_comp < 10; number_for_comp++ ) {
        if ( indexes_of_the_same_value[number_for_comp][4] < 2 ) {
            continue;
        }
        
        /*判断に使う添え字をそろえる*/
        k = 0;
        for ( j = 0; j < indexes_of_the_same_value[number_for_comp][4]; j++ ) {
            for ( i = 0; i < Max_order; i++ ) {
                if ( Order[i] == indexes_of_the_same_value[number_for_comp][j] ) {
                    target_index[k] = i;
                    //printf("%d count of indexes: %d\n", number_for_comp, target_index[k]);
                    k++;
                }
            }
        }
        
        
        for ( k = 0; k < indexes_of_the_same_value[number_for_comp][4]; k++ ) {
            for ( j = k+1; j < indexes_of_the_same_value[number_for_comp][4]; j++ ) {
                if ( target_index[k] > target_index[j] ) {
                    stable = 1;
                    //printf("target_index: %d\n", target_index[k]);
                    break;
                }
            }
            if (stable == 1) {
                break;
            }
        }
        
        if (stable == 1) {
            //printf("target_index: %d\n", target_index[k]);
            //printf("target_index: %d\n", stable);
            break;
        }
        
    }
    //printf("target_index: %d\n", stable);
    return stable;
    
}

int Display_Arr ( char *name, int *Arr, int *Order, int Max_order )
{
    int i = 0;
    for ( i = 0; i < Max_order-1; i++ ) {
        printf("%c%d ", name[Order[i]], Arr[Order[i]]);
    }
    
    printf("%c%d\n", name[Order[i]], Arr[Order[i]]);
    
    return 0;
}

5
H4 B9 S4 D2 C3
 5
H4 C9 S4 D2 C2
 5
H4 B9 S4 E2 C3
 5
I4 C9 S4 D2 C2
 5
H3 B9 S4 E2 C3
 5
H3 B9 S4 E2 B3
 5
H3 B9 S4 E3 B3
 5
H3 A9 S4 E3 B3
 5
H4 C9 S4 C2 C3
 5
H4 B9 T4 D2 C3

D2 C3 H4 S4 B9
Stable
D2 C3 S4 H4 B9
Not stable
 D2 C2 H4 S4 C9
Stable
D2 C2 S4 H4 C9
Not stable
 E2 C3 H4 S4 B9
Stable
E2 C3 S4 H4 B9
Not stable
 D2 C2 I4 S4 C9
Stable
D2 C2 S4 I4 C9
Not stable
 E2 H3 C3 S4 B9
Stable
E2 H3 C3 S4 B9
Stable
 E2 H3 B3 S4 B9
Stable
E2 H3 B3 S4 B9
Stable
 H3 E3 B3 S4 B9
Stable
H3 E3 B3 S4 B9
Stable
 H3 E3 B3 S4 A9
Stable
H3 E3 B3 S4 A9
Stable
 C2 C3 H4 S4 C9
Stable
C2 C3 S4 H4 C9
Not stable
 D2 C3 H4 T4 B9
Stable
D2 C3 T4 H4 B9
Not stable

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>

int BubbleSort ( int *Arr, int *Order, int Max_order );

int SelectionSort ( int *Arr, int *Order, int Max_order );

int Judge_stable ( int *Arr, int *Order, int Max_order );

int Display_Arr ( char *name, int *Arr, int *Order, int Max_order );


int main(void)
{
    int     Max_order       = 0;
    int     Card_value[36]  = {};
    char    Card_name[36]   = {};
    int     Order[36]       = {};
    int     i               = 0;
    int     Judge_Bubble    = 0;
    int     Judge_Selection = 0;
    
    for ( i = 0; i < 36; i++ ) {
        Order[i] = i;
    }
    
    scanf ( "%d\n", &Max_order );
    
    for ( i = 0; i < Max_order; i++ ) {
        scanf( "%c%d ", &Card_name[i], &Card_value[i] );
    }
    

    BubbleSort( Card_value, Order, Max_order );
    
    Judge_Bubble = Judge_stable( Card_value, Order, Max_order );

        
    Display_Arr( Card_name, Card_value, Order, Max_order );
    
    if ( Judge_Bubble == 0 ) {
        printf("Stable\n");
    } else {
        printf("Not stable\n");
    }
    
    
    for ( i = 0; i < 36; i++ ) {
        Order[i] = i;
    }

    SelectionSort( Card_value, Order, Max_order );
    
    Judge_Selection = Judge_stable( Card_value, Order, Max_order );


    Display_Arr( Card_name, Card_value, Order, Max_order );
    
    if ( Judge_Selection == 0 ) {
        printf("Stable\n");
    } else {
        printf("Not stable\n");
    }    
    
    
    return 0;
}

int BubbleSort ( int *Arr, int *Order, int Max_order )
{
    int i = 0;
    int j = 0;
    int tmp = 0;
    
    for ( i = 0; i < Max_order; i++ ) {
        for ( j = Max_order - 1; j > i; j-- ) {
            if ( Arr[Order[j]] < Arr[Order[j-1]] ) {
                tmp = Order[j];
                Order[j] = Order[j-1];
                Order[j-1] = tmp;
            }
        }
    }
    
    return 0;
}

int SelectionSort ( int *Arr, int *Order, int Max_order )
{
    int i = 0;
    int j = 0;
    int tmp = 0;
    int  mini = 0;
    
    for ( i = 0; i < Max_order; i++ ) {
        mini = i;
        for ( j = i; j < Max_order; j++ ) {
            if ( Arr[Order[j]] < Arr[Order[mini]] ) {
                mini = j;
            }
            
            
        }
        tmp = Order[i];
        Order[i] = Order[mini];
        Order[mini] = tmp;
    }
    
    
    return 0;
}

int Judge_stable ( int *Arr, int *Order, int Max_order )
{
    int number_for_comp = 1;
    int indexes_of_the_same_value[10][5] ={};
    int count_of_indexes = 0;
    int i = 0;
    int j = 0;
    int k = 0;
    int target_index[4] = {};
    int stable = 0;
    
    /*元のデータから同じ値をとる添え字を格納する*/
    for ( number_for_comp = 1; number_for_comp < 10; number_for_comp++ ) {
        count_of_indexes = 0;
        for ( i = 0; i < Max_order; i++ ) {
            
            if ( Arr[i] == number_for_comp) {
                
                indexes_of_the_same_value[number_for_comp][count_of_indexes] = i;
                count_of_indexes++;
            }
            
        }
        indexes_of_the_same_value[number_for_comp][4] = count_of_indexes;
        //printf("count of indexes: %d\n", count_of_indexes);
    }
    
    /*同じ値の添え字が入れ替わったのかを確認する*/
    stable = 0;
    for ( number_for_comp = 1; number_for_comp < 10; number_for_comp++ ) {
        if ( indexes_of_the_same_value[number_for_comp][4] < 2 ) {
            continue;
        }
        
        /*判断に使う添え字をそろえる*/
        k = 0;
        for ( j = 0; j < indexes_of_the_same_value[number_for_comp][4]; j++ ) {
            for ( i = 0; i < Max_order; i++ ) {
                if ( Order[i] == indexes_of_the_same_value[number_for_comp][j] ) {
                    target_index[k] = i;
                    //printf("%d count of indexes: %d\n", number_for_comp, target_index[k]);
                    k++;
                }
            }
        }
        
        
        for ( k = 0; k < indexes_of_the_same_value[number_for_comp][4]; k++ ) {
            for ( j = k+1; j < indexes_of_the_same_value[number_for_comp][4]; j++ ) {
                if ( target_index[k] > target_index[j] ) {
                    stable = 1;
                    //printf("target_index: %d\n", target_index[k]);
                    break;
                }
            }
            if (stable == 1) {
                break;
            }
        }
        
        if (stable == 1) {
            //printf("target_index: %d\n", target_index[k]);
            //printf("target_index: %d\n", stable);
            break;
        }
        
    }
    //printf("target_index: %d\n", stable);
    return stable;
    
}

int Display_Arr ( char *name, int *Arr, int *Order, int Max_order )
{
    int i = 0;
    for ( i = 0; i < Max_order-1; i++ ) {
        printf("%c%d ", name[Order[i]], Arr[Order[i]]);
    }
    
    printf("%c%d\n", name[Order[i]], Arr[Order[i]]);
    
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%c%d "
.LC2:
	.string	"Stable"
.LC3:
	.string	"Not stable"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -352(%rbp)
	leaq	-336(%rbp), %rdx
	movl	$0, %eax
	movl	$18, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	leaq	-192(%rbp), %rdx
	movl	$0, %eax
	movl	$18, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -348(%rbp)
	movl	$0, -344(%rbp)
	movl	$0, -340(%rbp)
	movl	$0, -348(%rbp)
	jmp	.L2
.L3:
	movl	-348(%rbp), %eax
	cltq
	movl	-348(%rbp), %edx
	movl	%edx, -192(%rbp,%rax,4)
	addl	$1, -348(%rbp)
.L2:
	cmpl	$35, -348(%rbp)
	jle	.L3
	leaq	-352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -348(%rbp)
	jmp	.L4
.L5:
	leaq	-336(%rbp), %rdx
	movl	-348(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rcx
	movl	-348(%rbp), %eax
	cltq
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -348(%rbp)
.L4:
	movl	-352(%rbp), %eax
	cmpl	%eax, -348(%rbp)
	jl	.L5
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	BubbleSort
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Judge_stable
	movl	%eax, -344(%rbp)
	movl	-352(%rbp), %ecx
	leaq	-192(%rbp), %rdx
	leaq	-336(%rbp), %rsi
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	Display_Arr
	cmpl	$0, -344(%rbp)
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L7:
	movl	$0, -348(%rbp)
	jmp	.L8
.L9:
	movl	-348(%rbp), %eax
	cltq
	movl	-348(%rbp), %edx
	movl	%edx, -192(%rbp,%rax,4)
	addl	$1, -348(%rbp)
.L8:
	cmpl	$35, -348(%rbp)
	jle	.L9
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	SelectionSort
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Judge_stable
	movl	%eax, -340(%rbp)
	movl	-352(%rbp), %ecx
	leaq	-192(%rbp), %rdx
	leaq	-336(%rbp), %rsi
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	Display_Arr
	cmpl	$0, -340(%rbp)
	jne	.L10
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L11
.L10:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L11:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	BubbleSort
	.type	BubbleSort, @function
BubbleSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L15
.L19:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
.L17:
	subl	$1, -8(%rbp)
.L16:
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.L18
	addl	$1, -12(%rbp)
.L15:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L19
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	BubbleSort, .-BubbleSort
	.globl	SelectionSort
	.type	SelectionSort, @function
SelectionSort:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L22
.L26:
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L23
.L25:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L24
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
.L24:
	addl	$1, -12(%rbp)
.L23:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L25
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
.L22:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L26
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	SelectionSort, .-SelectionSort
	.globl	Judge_stable
	.type	Judge_stable, @function
Judge_stable:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$288, %rsp
	movq	%rdi, -264(%rbp)
	movq	%rsi, -272(%rbp)
	movl	%edx, -276(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -248(%rbp)
	leaq	-208(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -244(%rbp)
	movl	$0, -240(%rbp)
	movl	$0, -236(%rbp)
	movl	$0, -232(%rbp)
	movq	$0, -224(%rbp)
	movq	$0, -216(%rbp)
	movl	$0, -228(%rbp)
	movl	$1, -248(%rbp)
	jmp	.L29
.L33:
	movl	$0, -244(%rbp)
	movl	$0, -240(%rbp)
	jmp	.L30
.L32:
	movl	-240(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-264(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -248(%rbp)
	jne	.L31
	movl	-244(%rbp), %eax
	movslq	%eax, %rcx
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-240(%rbp), %eax
	movl	%eax, -208(%rbp,%rdx,4)
	addl	$1, -244(%rbp)
.L31:
	addl	$1, -240(%rbp)
.L30:
	movl	-240(%rbp), %eax
	cmpl	-276(%rbp), %eax
	jl	.L32
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	leaq	-192(%rax), %rdx
	movl	-244(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -248(%rbp)
.L29:
	cmpl	$9, -248(%rbp)
	jle	.L33
	movl	$0, -228(%rbp)
	movl	$1, -248(%rbp)
	jmp	.L34
.L51:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	jle	.L54
	movl	$0, -232(%rbp)
	movl	$0, -236(%rbp)
	jmp	.L37
.L41:
	movl	$0, -240(%rbp)
	jmp	.L38
.L40:
	movl	-240(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-272(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-236(%rbp), %eax
	movslq	%eax, %rsi
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-208(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L39
	movl	-232(%rbp), %eax
	cltq
	movl	-240(%rbp), %edx
	movl	%edx, -224(%rbp,%rax,4)
	addl	$1, -232(%rbp)
.L39:
	addl	$1, -240(%rbp)
.L38:
	movl	-240(%rbp), %eax
	cmpl	-276(%rbp), %eax
	jl	.L40
	addl	$1, -236(%rbp)
.L37:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -236(%rbp)
	jl	.L41
	movl	$0, -232(%rbp)
	jmp	.L42
.L49:
	movl	-232(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -236(%rbp)
	jmp	.L43
.L46:
	movl	-232(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %edx
	movl	-236(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L44
	movl	$1, -228(%rbp)
	jmp	.L45
.L44:
	addl	$1, -236(%rbp)
.L43:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -236(%rbp)
	jl	.L46
.L45:
	cmpl	$1, -228(%rbp)
	je	.L55
	addl	$1, -232(%rbp)
.L42:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -232(%rbp)
	jl	.L49
	jmp	.L48
.L55:
	nop
.L48:
	cmpl	$1, -228(%rbp)
	je	.L56
	jmp	.L36
.L54:
	nop
.L36:
	addl	$1, -248(%rbp)
.L34:
	cmpl	$9, -248(%rbp)
	jle	.L51
	jmp	.L50
.L56:
	nop
.L50:
	movl	-228(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Judge_stable, .-Judge_stable
	.section	.rodata
.LC4:
	.string	"%c%d\n"
	.text
	.globl	Display_Arr
	.type	Display_Arr, @function
Display_Arr:
.LFB4:
	.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	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L58
.L59:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L58:
	movl	-44(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L59
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Display_Arr, .-Display_Arr
	.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"
.LC1:
	.string	"%c%d "
.LC2:
	.string	"Stable"
.LC3:
	.string	"Not stable"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -352(%rbp)
	leaq	-336(%rbp), %rdx
	movl	$0, %eax
	movl	$18, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	leaq	-192(%rbp), %rdx
	movl	$0, %eax
	movl	$18, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -348(%rbp)
	movl	$0, -344(%rbp)
	movl	$0, -340(%rbp)
	movl	$0, -348(%rbp)
	jmp	.L2
.L3:
	movl	-348(%rbp), %eax
	cltq
	movl	-348(%rbp), %edx
	movl	%edx, -192(%rbp,%rax,4)
	addl	$1, -348(%rbp)
.L2:
	cmpl	$35, -348(%rbp)
	jle	.L3
	leaq	-352(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -348(%rbp)
	jmp	.L4
.L5:
	leaq	-336(%rbp), %rdx
	movl	-348(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rcx
	movl	-348(%rbp), %eax
	cltq
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -348(%rbp)
.L4:
	movl	-352(%rbp), %eax
	cmpl	%eax, -348(%rbp)
	jl	.L5
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	BubbleSort
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Judge_stable
	movl	%eax, -344(%rbp)
	movl	-352(%rbp), %ecx
	leaq	-192(%rbp), %rdx
	leaq	-336(%rbp), %rsi
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	Display_Arr
	cmpl	$0, -344(%rbp)
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L7:
	movl	$0, -348(%rbp)
	jmp	.L8
.L9:
	movl	-348(%rbp), %eax
	cltq
	movl	-348(%rbp), %edx
	movl	%edx, -192(%rbp,%rax,4)
	addl	$1, -348(%rbp)
.L8:
	cmpl	$35, -348(%rbp)
	jle	.L9
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	SelectionSort
	movl	-352(%rbp), %edx
	leaq	-192(%rbp), %rcx
	leaq	-336(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Judge_stable
	movl	%eax, -340(%rbp)
	movl	-352(%rbp), %ecx
	leaq	-192(%rbp), %rdx
	leaq	-336(%rbp), %rsi
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	Display_Arr
	cmpl	$0, -340(%rbp)
	jne	.L10
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L11
.L10:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L11:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	BubbleSort
	.type	BubbleSort, @function
BubbleSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L15
.L19:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L17
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
.L17:
	subl	$1, -8(%rbp)
.L16:
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.L18
	addl	$1, -12(%rbp)
.L15:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L19
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	BubbleSort, .-BubbleSort
	.globl	SelectionSort
	.type	SelectionSort, @function
SelectionSort:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L22
.L26:
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L23
.L25:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L24
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
.L24:
	addl	$1, -12(%rbp)
.L23:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L25
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
.L22:
	movl	-16(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L26
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	SelectionSort, .-SelectionSort
	.globl	Judge_stable
	.type	Judge_stable, @function
Judge_stable:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$288, %rsp
	movq	%rdi, -264(%rbp)
	movq	%rsi, -272(%rbp)
	movl	%edx, -276(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -248(%rbp)
	leaq	-208(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -244(%rbp)
	movl	$0, -240(%rbp)
	movl	$0, -236(%rbp)
	movl	$0, -232(%rbp)
	movq	$0, -224(%rbp)
	movq	$0, -216(%rbp)
	movl	$0, -228(%rbp)
	movl	$1, -248(%rbp)
	jmp	.L29
.L33:
	movl	$0, -244(%rbp)
	movl	$0, -240(%rbp)
	jmp	.L30
.L32:
	movl	-240(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-264(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -248(%rbp)
	jne	.L31
	movl	-244(%rbp), %eax
	movslq	%eax, %rcx
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-240(%rbp), %eax
	movl	%eax, -208(%rbp,%rdx,4)
	addl	$1, -244(%rbp)
.L31:
	addl	$1, -240(%rbp)
.L30:
	movl	-240(%rbp), %eax
	cmpl	-276(%rbp), %eax
	jl	.L32
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	leaq	-192(%rax), %rdx
	movl	-244(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -248(%rbp)
.L29:
	cmpl	$9, -248(%rbp)
	jle	.L33
	movl	$0, -228(%rbp)
	movl	$1, -248(%rbp)
	jmp	.L34
.L51:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	jle	.L54
	movl	$0, -232(%rbp)
	movl	$0, -236(%rbp)
	jmp	.L37
.L41:
	movl	$0, -240(%rbp)
	jmp	.L38
.L40:
	movl	-240(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-272(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-236(%rbp), %eax
	movslq	%eax, %rsi
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-208(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L39
	movl	-232(%rbp), %eax
	cltq
	movl	-240(%rbp), %edx
	movl	%edx, -224(%rbp,%rax,4)
	addl	$1, -232(%rbp)
.L39:
	addl	$1, -240(%rbp)
.L38:
	movl	-240(%rbp), %eax
	cmpl	-276(%rbp), %eax
	jl	.L40
	addl	$1, -236(%rbp)
.L37:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -236(%rbp)
	jl	.L41
	movl	$0, -232(%rbp)
	jmp	.L42
.L49:
	movl	-232(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -236(%rbp)
	jmp	.L43
.L46:
	movl	-232(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %edx
	movl	-236(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L44
	movl	$1, -228(%rbp)
	jmp	.L45
.L44:
	addl	$1, -236(%rbp)
.L43:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -236(%rbp)
	jl	.L46
.L45:
	cmpl	$1, -228(%rbp)
	je	.L55
	addl	$1, -232(%rbp)
.L42:
	movl	-248(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$192, %rax
	movl	(%rax), %eax
	cmpl	%eax, -232(%rbp)
	jl	.L49
	jmp	.L48
.L55:
	nop
.L48:
	cmpl	$1, -228(%rbp)
	je	.L56
	jmp	.L36
.L54:
	nop
.L36:
	addl	$1, -248(%rbp)
.L34:
	cmpl	$9, -248(%rbp)
	jle	.L51
	jmp	.L50
.L56:
	nop
.L50:
	movl	-228(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Judge_stable, .-Judge_stable
	.section	.rodata
.LC4:
	.string	"%c%d\n"
	.text
	.globl	Display_Arr
	.type	Display_Arr, @function
Display_Arr:
.LFB4:
	.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	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movl	%ecx, -44(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L58
.L59:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L58:
	movl	-44(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L59
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Display_Arr, .-Display_Arr
	.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:
