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>
#define N 36

struct card{
  char mark;
  int value;
};

int n;

int isStable(struct card in[],struct card out[]){
  int i,j,a,b;
  for(i = 0; i < n; i++){
    for(j = i+1; j < n; j++){
      for(a = 0; a < n; a++){
	for(b = a+1; b < n; b++){
	  if((in[i].value == in[j].value) && ((in[i].value == out[b].value && in[i].mark == out[b].mark) && (in[j].value == out[a].value && in[j].mark == out[a].mark))) return 0;
	}
      }
    }
  }
  return 1;
}


void bubbleSort(struct card A[],int n){
  int i,j;
  int flag;
  struct card swap;
  flag = 1;
    i = 0;
    while(flag){
       flag = 0;
       for(j = n - 1; j >= i + 1; j--){
           if(A[j].value < A[j - 1].value){
	   swap = A[j];
	   A[j] = A[j - 1];
	   A[j - 1] = swap;
	   flag = 1;
           }
       }
       i++; 
    }
}

void selectionSort(struct card A[],int n){
  int i,j,minj;
  struct card swap;

  for(i = 0; i <= n - 1; i++){
    minj = i;
    for(j = i; j <= n - 1; j++){
      if(A[j].value < A[minj].value) {
	minj = j;
      }
    }
    swap = A[i];
    A[i] = A[minj];
    A[minj] = swap;
  }
}

int main(){
  int i;
  struct card C[N];
  struct card D[N];
  
  scanf("%d",&n);

  for(i = 0; i < n; i++){
    scanf(" %c",&C[i].mark);
    scanf("%d",&C[i].value);
    D[i] = C[i];
  }
 
  
  bubbleSort(C,n);
  for(i = 0; i < n; i++){
    if(i == n - 1) printf("%c%d",C[i].mark,C[i].value);
    else
    printf("%c%d ",C[i].mark,C[i].value);
  }
  printf("\nStable\n");

  selectionSort(D,n);
  for(i = 0; i < n; i++){
    if(i == n - 1) printf("%c%d",D[i].mark,D[i].value);
    else
    printf("%c%d ",D[i].mark,D[i].value);
  }
  if(isStable(C,D) == 1) printf("\nStable\n");
  else printf("\nNot stable\n");

  return 0;
}



```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	isStable
	.type	isStable, @function
isStable:
.LFB0:
	.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	$0, -16(%rbp)
	jmp	.L2
.L11:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L3
.L10:
	movl	$0, -8(%rbp)
	jmp	.L4
.L9:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L8:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L8
	addl	$1, -8(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L9
	addl	$1, -12(%rbp)
.L3:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L10
	addl	$1, -16(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	isStable, .-isStable
	.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, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L13
.L17:
	movl	$0, -12(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L14
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L15
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$1, -12(%rbp)
.L15:
	subl	$1, -16(%rbp)
.L14:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L16
	addl	$1, -20(%rbp)
.L13:
	cmpl	$0, -12(%rbp)
	jne	.L17
	nop
	nop
	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, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L19
.L23:
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L20
.L22:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L21
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
.L21:
	addl	$1, -16(%rbp)
.L20:
	movl	-44(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jg	.L22
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	addl	$1, -20(%rbp)
.L19:
	movl	-44(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L23
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	selectionSort, .-selectionSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c%d"
.LC3:
	.string	"%c%d "
.LC4:
	.string	"\nStable"
.LC5:
	.string	"\nNot stable"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$608, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -596(%rbp)
	jmp	.L25
.L26:
	leaq	-592(%rbp), %rdx
	movl	-596(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-592(%rbp), %rdx
	movl	-596(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-596(%rbp), %eax
	cltq
	movl	-596(%rbp), %edx
	movslq	%edx, %rdx
	movq	-592(%rbp,%rdx,8), %rdx
	movq	%rdx, -304(%rbp,%rax,8)
	addl	$1, -596(%rbp)
.L25:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L26
	movl	n(%rip), %edx
	leaq	-592(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	bubbleSort
	movl	$0, -596(%rbp)
	jmp	.L27
.L30:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -596(%rbp)
	jne	.L28
	movl	-596(%rbp), %eax
	cltq
	movl	-588(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-592(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L29
.L28:
	movl	-596(%rbp), %eax
	cltq
	movl	-588(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-592(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L29:
	addl	$1, -596(%rbp)
.L27:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L30
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	n(%rip), %edx
	leaq	-304(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	selectionSort
	movl	$0, -596(%rbp)
	jmp	.L31
.L34:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -596(%rbp)
	jne	.L32
	movl	-596(%rbp), %eax
	cltq
	movl	-300(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-304(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L33
.L32:
	movl	-596(%rbp), %eax
	cltq
	movl	-300(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-304(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L33:
	addl	$1, -596(%rbp)
.L31:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L34
	leaq	-304(%rbp), %rdx
	leaq	-592(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	isStable
	cmpl	$1, %eax
	jne	.L35
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L36
.L35:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L36:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	isStable
	.type	isStable, @function
isStable:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movl	n(%rip), %esi
	testl	%esi, %esi
	jle	.L11
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leal	-2(%rsi), %r9d
	movq	%rdi, %r10
	movl	$1, %r11d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	addq	$2, %r9
	leal	1(%rsi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
.L10:
	cmpl	%r11d, %esi
	jle	.L3
	movl	-4(%r10,%r11,8), %ecx
	movq	%r11, %rbx
.L9:
	movl	4(%r10,%rbx,8), %r8d
	movl	$1, %edi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %rdi
	cmpq	%r9, %rdi
	je	.L5
.L4:
	cmpl	%r8d, %ecx
	jne	.L6
	movq	%rdi, %rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L6
.L8:
	cmpl	4(%rdx,%rax,8), %ecx
	jne	.L7
	movzbl	(%rdx,%rax,8), %r14d
	cmpb	%r14b, -8(%r10,%r11,8)
	jne	.L7
	cmpl	-4(%rdx,%rdi,8), %r8d
	jne	.L7
	movzbl	-8(%rdx,%rdi,8), %r14d
	cmpb	%r14b, (%r10,%rbx,8)
	jne	.L7
	xorl	%eax, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L9
.L3:
	addq	$1, %r11
	cmpq	%rbp, %r11
	jne	.L10
	movl	$1, %eax
	jmp	.L1
.L11:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 14
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	isStable, .-isStable
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	%esi, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leal	-1(%rsi), %r11d
	xorl	%r8d, %r8d
	leaq	(%rdi,%rax,8), %r10
	leal	-2(%rsi), %r9d
	leaq	-8(%r10), %rbx
	.p2align 4,,10
	.p2align 3
.L25:
	cmpl	%r8d, %r11d
	jle	.L21
	movl	%r9d, %eax
	movq	%rbx, %rcx
	xorl	%esi, %esi
	subl	%r8d, %eax
	salq	$3, %rax
	subq	%rax, %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L24:
	movl	-4(%rax), %edx
	cmpl	-12(%rax), %edx
	jge	.L23
	movq	-16(%rax), %rdi
	movzbl	-8(%rax), %esi
	movl	%edx, -12(%rax)
	movq	%rdi, -8(%rax)
	movb	%sil, -16(%rax)
	movl	$1, %esi
.L23:
	subq	$8, %rax
	cmpq	%rcx, %rax
	jne	.L24
	addl	$1, %r8d
	testl	%esi, %esi
	jne	.L25
.L21:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	bubbleSort, .-bubbleSort
	.p2align 4
	.globl	selectionSort
	.type	selectionSort, @function
selectionSort:
.LFB25:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L41
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r10
	xorl	%r11d, %r11d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	.p2align 4,,10
	.p2align 3
.L34:
	movl	4(%r10), %ebp
	movq	%r10, %rax
	movl	%r11d, %r9d
	movl	%r11d, %edx
	movl	%ebp, %r8d
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L45:
	movslq	%r9d, %rcx
	addl	$1, %edx
	addq	$8, %rax
	leaq	(%rbx,%rcx,8), %rdi
	cmpl	%edx, %esi
	jle	.L44
.L33:
	movl	4(%rax), %ecx
	movq	%rax, %rdi
	cmpl	%ecx, %r8d
	jle	.L45
	movl	%edx, %r9d
	addl	$1, %edx
	movl	%ecx, %r8d
	addq	$8, %rax
	cmpl	%edx, %esi
	jg	.L33
.L44:
	movzbl	(%r10), %eax
	movq	(%rdi), %rdx
	addl	$1, %r11d
	addq	$8, %r10
	movq	%rdx, -8(%r10)
	movb	%al, (%rdi)
	movl	%ebp, 4(%rdi)
	cmpl	%r11d, %esi
	jne	.L34
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE25:
	.size	selectionSort, .-selectionSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"\nStable"
.LC3:
	.string	"%c%d"
.LC4:
	.string	"%c%d "
.LC5:
	.string	"\nNot stable"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$600, %rsp
	.cfi_def_cfa_offset 656
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	leaq	288(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	n(%rip), %esi
	testl	%esi, %esi
	jle	.L47
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r15
	leaq	288(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rbx, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	(%rbx), %rax
	movl	n(%rip), %esi
	addq	$8, %rbx
	movq	%rax, 0(%rbp,%r13,8)
	addq	$1, %r13
	cmpl	%r13d, %esi
	jg	.L48
.L47:
	movq	%r12, %rdi
	xorl	%ebx, %ebx
	leaq	.LC4(%rip), %r13
	call	bubbleSort
	movl	n(%rip), %eax
	leaq	.LC3(%rip), %r14
	testl	%eax, %eax
	jle	.L54
	.p2align 4,,10
	.p2align 3
.L49:
	subl	$1, %eax
	movl	4(%r12,%rbx,8), %ecx
	movsbl	(%r12,%rbx,8), %edx
	movq	%r14, %rsi
	cmpl	%ebx, %eax
	je	.L71
	movq	%r13, %rsi
.L71:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	n(%rip), %eax
	cmpl	%ebx, %eax
	jg	.L49
.L54:
	leaq	.LC2(%rip), %r15
	xorl	%ebx, %ebx
	leaq	.LC4(%rip), %r13
	movq	%r15, %rdi
	leaq	.LC3(%rip), %r14
	call	puts@PLT
	movl	n(%rip), %esi
	movq	%rbp, %rdi
	call	selectionSort
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L51
	.p2align 4,,10
	.p2align 3
.L50:
	subl	$1, %eax
	movl	4(%rbp,%rbx,8), %ecx
	movsbl	0(%rbp,%rbx,8), %edx
	movq	%r14, %rsi
	cmpl	%ebx, %eax
	je	.L73
	movq	%r13, %rsi
.L73:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	n(%rip), %eax
	cmpl	%ebx, %eax
	jg	.L50
.L51:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	isStable
	cmpl	$1, %eax
	je	.L74
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
.L59:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$600, %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
.L74:
	.cfi_restore_state
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L59
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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	isStable
	.type	isStable, @function
isStable:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %rdx
	movl	n(%rip), %esi
	testl	%esi, %esi
	jle	.L11
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leal	-2(%rsi), %r9d
	movq	%rdi, %r10
	movl	$1, %r11d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	addq	$2, %r9
	leal	1(%rsi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
.L10:
	cmpl	%r11d, %esi
	jle	.L3
	movl	-4(%r10,%r11,8), %ecx
	movq	%r11, %rbx
.L9:
	movl	4(%r10,%rbx,8), %r8d
	movl	$1, %edi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %rdi
	cmpq	%r9, %rdi
	je	.L5
.L4:
	cmpl	%r8d, %ecx
	jne	.L6
	movq	%rdi, %rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L6
.L8:
	cmpl	4(%rdx,%rax,8), %ecx
	jne	.L7
	movzbl	(%rdx,%rax,8), %r14d
	cmpb	%r14b, -8(%r10,%r11,8)
	jne	.L7
	cmpl	-4(%rdx,%rdi,8), %r8d
	jne	.L7
	movzbl	-8(%rdx,%rdi,8), %r14d
	cmpb	%r14b, (%r10,%rbx,8)
	jne	.L7
	xorl	%eax, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L9
.L3:
	addq	$1, %r11
	cmpq	%rbp, %r11
	jne	.L10
	movl	$1, %eax
	jmp	.L1
.L11:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 14
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	isStable, .-isStable
	.p2align 4
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	%esi, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leal	-1(%rsi), %r11d
	xorl	%r8d, %r8d
	leaq	(%rdi,%rax,8), %r10
	leal	-2(%rsi), %r9d
	leaq	-8(%r10), %rbx
	.p2align 4,,10
	.p2align 3
.L25:
	cmpl	%r8d, %r11d
	jle	.L21
	movl	%r9d, %eax
	movq	%rbx, %rcx
	xorl	%esi, %esi
	subl	%r8d, %eax
	salq	$3, %rax
	subq	%rax, %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L24:
	movl	-4(%rax), %edx
	cmpl	-12(%rax), %edx
	jge	.L23
	movq	-16(%rax), %rdi
	movzbl	-8(%rax), %esi
	movl	%edx, -12(%rax)
	movq	%rdi, -8(%rax)
	movb	%sil, -16(%rax)
	movl	$1, %esi
.L23:
	subq	$8, %rax
	cmpq	%rcx, %rax
	jne	.L24
	addl	$1, %r8d
	testl	%esi, %esi
	jne	.L25
.L21:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	bubbleSort, .-bubbleSort
	.p2align 4
	.globl	selectionSort
	.type	selectionSort, @function
selectionSort:
.LFB25:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L41
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %r10
	xorl	%r11d, %r11d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	.p2align 4,,10
	.p2align 3
.L34:
	movl	4(%r10), %ebp
	movq	%r10, %rax
	movl	%r11d, %r9d
	movl	%r11d, %edx
	movl	%ebp, %r8d
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L45:
	movslq	%r9d, %rcx
	addl	$1, %edx
	addq	$8, %rax
	leaq	(%rbx,%rcx,8), %rdi
	cmpl	%edx, %esi
	jle	.L44
.L33:
	movl	4(%rax), %ecx
	movq	%rax, %rdi
	cmpl	%ecx, %r8d
	jle	.L45
	movl	%edx, %r9d
	addl	$1, %edx
	movl	%ecx, %r8d
	addq	$8, %rax
	cmpl	%edx, %esi
	jg	.L33
.L44:
	movzbl	(%r10), %eax
	movq	(%rdi), %rdx
	addl	$1, %r11d
	addq	$8, %r10
	movq	%rdx, -8(%r10)
	movb	%al, (%rdi)
	movl	%ebp, 4(%rdi)
	cmpl	%r11d, %esi
	jne	.L34
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE25:
	.size	selectionSort, .-selectionSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"\nStable"
.LC3:
	.string	"%c%d"
.LC4:
	.string	"%c%d "
.LC5:
	.string	"\nNot stable"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$600, %rsp
	.cfi_def_cfa_offset 656
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	leaq	288(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	n(%rip), %esi
	testl	%esi, %esi
	jle	.L47
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r15
	leaq	288(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rbx, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	(%rbx), %rax
	movl	n(%rip), %esi
	addq	$8, %rbx
	movq	%rax, 0(%rbp,%r13,8)
	addq	$1, %r13
	cmpl	%r13d, %esi
	jg	.L48
.L47:
	movq	%r12, %rdi
	xorl	%ebx, %ebx
	leaq	.LC4(%rip), %r13
	call	bubbleSort
	movl	n(%rip), %eax
	leaq	.LC3(%rip), %r14
	testl	%eax, %eax
	jle	.L54
	.p2align 4,,10
	.p2align 3
.L49:
	subl	$1, %eax
	movl	4(%r12,%rbx,8), %ecx
	movsbl	(%r12,%rbx,8), %edx
	movq	%r14, %rsi
	cmpl	%ebx, %eax
	je	.L71
	movq	%r13, %rsi
.L71:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	n(%rip), %eax
	cmpl	%ebx, %eax
	jg	.L49
.L54:
	leaq	.LC2(%rip), %r15
	xorl	%ebx, %ebx
	leaq	.LC4(%rip), %r13
	movq	%r15, %rdi
	leaq	.LC3(%rip), %r14
	call	puts@PLT
	movl	n(%rip), %esi
	movq	%rbp, %rdi
	call	selectionSort
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L51
	.p2align 4,,10
	.p2align 3
.L50:
	subl	$1, %eax
	movl	4(%rbp,%rbx,8), %ecx
	movsbl	0(%rbp,%rbx,8), %edx
	movq	%r14, %rsi
	cmpl	%ebx, %eax
	je	.L73
	movq	%r13, %rsi
.L73:
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	n(%rip), %eax
	cmpl	%ebx, %eax
	jg	.L50
.L51:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	isStable
	cmpl	$1, %eax
	je	.L74
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
.L59:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$600, %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
.L74:
	.cfi_restore_state
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L59
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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>
#define N 36

struct card{
  char mark;
  int value;
};

int n;

int isStable(struct card in[],struct card out[]){
  int i,j,a,b;
  for(i = 0; i < n; i++){
    for(j = i+1; j < n; j++){
      for(a = 0; a < n; a++){
	for(b = a+1; b < n; b++){
	  if((in[i].value == in[j].value) && ((in[i].value == out[b].value && in[i].mark == out[b].mark) && (in[j].value == out[a].value && in[j].mark == out[a].mark))) return 0;
	}
      }
    }
  }
  return 1;
}


void bubbleSort(struct card A[],int n){
  int i,j;
  int flag;
  struct card swap;
  flag = 1;
    i = 0;
    while(flag){
       flag = 0;
       for(j = n - 1; j >= i + 1; j--){
           if(A[j].value < A[j - 1].value){
	   swap = A[j];
	   A[j] = A[j - 1];
	   A[j - 1] = swap;
	   flag = 1;
           }
       }
       i++; 
    }
}

void selectionSort(struct card A[],int n){
  int i,j,minj;
  struct card swap;

  for(i = 0; i <= n - 1; i++){
    minj = i;
    for(j = i; j <= n - 1; j++){
      if(A[j].value < A[minj].value) {
	minj = j;
      }
    }
    swap = A[i];
    A[i] = A[minj];
    A[minj] = swap;
  }
}

int main(){
  int i;
  struct card C[N];
  struct card D[N];
  
  scanf("%d",&n);

  for(i = 0; i < n; i++){
    scanf(" %c",&C[i].mark);
    scanf("%d",&C[i].value);
    D[i] = C[i];
  }
 
  
  bubbleSort(C,n);
  for(i = 0; i < n; i++){
    if(i == n - 1) printf("%c%d",C[i].mark,C[i].value);
    else
    printf("%c%d ",C[i].mark,C[i].value);
  }
  printf("\nStable\n");

  selectionSort(D,n);
  for(i = 0; i < n; i++){
    if(i == n - 1) printf("%c%d",D[i].mark,D[i].value);
    else
    printf("%c%d ",D[i].mark,D[i].value);
  }
  if(isStable(C,D) == 1) printf("\nStable\n");
  else printf("\nNot stable\n");

  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>
#define N 36

struct card{
  char mark;
  int value;
};

int n;

int isStable(struct card in[],struct card out[]){
  int i,j,a,b;
  for(i = 0; i < n; i++){
    for(j = i+1; j < n; j++){
      for(a = 0; a < n; a++){
	for(b = a+1; b < n; b++){
	  if((in[i].value == in[j].value) && ((in[i].value == out[b].value && in[i].mark == out[b].mark) && (in[j].value == out[a].value && in[j].mark == out[a].mark))) return 0;
	}
      }
    }
  }
  return 1;
}


void bubbleSort(struct card A[],int n){
  int i,j;
  int flag;
  struct card swap;
  flag = 1;
    i = 0;
    while(flag){
       flag = 0;
       for(j = n - 1; j >= i + 1; j--){
           if(A[j].value < A[j - 1].value){
	   swap = A[j];
	   A[j] = A[j - 1];
	   A[j - 1] = swap;
	   flag = 1;
           }
       }
       i++; 
    }
}

void selectionSort(struct card A[],int n){
  int i,j,minj;
  struct card swap;

  for(i = 0; i <= n - 1; i++){
    minj = i;
    for(j = i; j <= n - 1; j++){
      if(A[j].value < A[minj].value) {
	minj = j;
      }
    }
    swap = A[i];
    A[i] = A[minj];
    A[minj] = swap;
  }
}

int main(){
  int i;
  struct card C[N];
  struct card D[N];
  
  scanf("%d",&n);

  for(i = 0; i < n; i++){
    scanf(" %c",&C[i].mark);
    scanf("%d",&C[i].value);
    D[i] = C[i];
  }
 
  
  bubbleSort(C,n);
  for(i = 0; i < n; i++){
    if(i == n - 1) printf("%c%d",C[i].mark,C[i].value);
    else
    printf("%c%d ",C[i].mark,C[i].value);
  }
  printf("\nStable\n");

  selectionSort(D,n);
  for(i = 0; i < n; i++){
    if(i == n - 1) printf("%c%d",D[i].mark,D[i].value);
    else
    printf("%c%d ",D[i].mark,D[i].value);
  }
  if(isStable(C,D) == 1) printf("\nStable\n");
  else printf("\nNot stable\n");

  return 0;
}



```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	isStable
	.type	isStable, @function
isStable:
.LFB0:
	.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	$0, -16(%rbp)
	jmp	.L2
.L11:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L3
.L10:
	movl	$0, -8(%rbp)
	jmp	.L4
.L9:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L8:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L8
	addl	$1, -8(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L9
	addl	$1, -12(%rbp)
.L3:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L10
	addl	$1, -16(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	isStable, .-isStable
	.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, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L13
.L17:
	movl	$0, -12(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L14
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L15
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$1, -12(%rbp)
.L15:
	subl	$1, -16(%rbp)
.L14:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L16
	addl	$1, -20(%rbp)
.L13:
	cmpl	$0, -12(%rbp)
	jne	.L17
	nop
	nop
	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, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L19
.L23:
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L20
.L22:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L21
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
.L21:
	addl	$1, -16(%rbp)
.L20:
	movl	-44(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jg	.L22
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	addl	$1, -20(%rbp)
.L19:
	movl	-44(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L23
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	selectionSort, .-selectionSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c%d"
.LC3:
	.string	"%c%d "
.LC4:
	.string	"\nStable"
.LC5:
	.string	"\nNot stable"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$608, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -596(%rbp)
	jmp	.L25
.L26:
	leaq	-592(%rbp), %rdx
	movl	-596(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-592(%rbp), %rdx
	movl	-596(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-596(%rbp), %eax
	cltq
	movl	-596(%rbp), %edx
	movslq	%edx, %rdx
	movq	-592(%rbp,%rdx,8), %rdx
	movq	%rdx, -304(%rbp,%rax,8)
	addl	$1, -596(%rbp)
.L25:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L26
	movl	n(%rip), %edx
	leaq	-592(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	bubbleSort
	movl	$0, -596(%rbp)
	jmp	.L27
.L30:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -596(%rbp)
	jne	.L28
	movl	-596(%rbp), %eax
	cltq
	movl	-588(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-592(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L29
.L28:
	movl	-596(%rbp), %eax
	cltq
	movl	-588(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-592(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L29:
	addl	$1, -596(%rbp)
.L27:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L30
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	n(%rip), %edx
	leaq	-304(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	selectionSort
	movl	$0, -596(%rbp)
	jmp	.L31
.L34:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -596(%rbp)
	jne	.L32
	movl	-596(%rbp), %eax
	cltq
	movl	-300(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-304(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L33
.L32:
	movl	-596(%rbp), %eax
	cltq
	movl	-300(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-304(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L33:
	addl	$1, -596(%rbp)
.L31:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L34
	leaq	-304(%rbp), %rdx
	leaq	-592(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	isStable
	cmpl	$1, %eax
	jne	.L35
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L36
.L35:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L36:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	isStable
	.type	isStable, @function
isStable:
.LFB0:
	.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	$0, -16(%rbp)
	jmp	.L2
.L11:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L3
.L10:
	movl	$0, -8(%rbp)
	jmp	.L4
.L9:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L8:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L8
	addl	$1, -8(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L9
	addl	$1, -12(%rbp)
.L3:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L10
	addl	$1, -16(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L11
	movl	$1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	isStable, .-isStable
	.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, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	$1, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L13
.L17:
	movl	$0, -12(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L14
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L15
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$1, -12(%rbp)
.L15:
	subl	$1, -16(%rbp)
.L14:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jl	.L16
	addl	$1, -20(%rbp)
.L13:
	cmpl	$0, -12(%rbp)
	jne	.L17
	nop
	nop
	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, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L19
.L23:
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L20
.L22:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L21
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
.L21:
	addl	$1, -16(%rbp)
.L20:
	movl	-44(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jg	.L22
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	addl	$1, -20(%rbp)
.L19:
	movl	-44(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L23
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	selectionSort, .-selectionSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c%d"
.LC3:
	.string	"%c%d "
.LC4:
	.string	"\nStable"
.LC5:
	.string	"\nNot stable"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$608, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -596(%rbp)
	jmp	.L25
.L26:
	leaq	-592(%rbp), %rdx
	movl	-596(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-592(%rbp), %rdx
	movl	-596(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-596(%rbp), %eax
	cltq
	movl	-596(%rbp), %edx
	movslq	%edx, %rdx
	movq	-592(%rbp,%rdx,8), %rdx
	movq	%rdx, -304(%rbp,%rax,8)
	addl	$1, -596(%rbp)
.L25:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L26
	movl	n(%rip), %edx
	leaq	-592(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	bubbleSort
	movl	$0, -596(%rbp)
	jmp	.L27
.L30:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -596(%rbp)
	jne	.L28
	movl	-596(%rbp), %eax
	cltq
	movl	-588(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-592(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L29
.L28:
	movl	-596(%rbp), %eax
	cltq
	movl	-588(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-592(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L29:
	addl	$1, -596(%rbp)
.L27:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L30
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	n(%rip), %edx
	leaq	-304(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	selectionSort
	movl	$0, -596(%rbp)
	jmp	.L31
.L34:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -596(%rbp)
	jne	.L32
	movl	-596(%rbp), %eax
	cltq
	movl	-300(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-304(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L33
.L32:
	movl	-596(%rbp), %eax
	cltq
	movl	-300(%rbp,%rax,8), %edx
	movl	-596(%rbp), %eax
	cltq
	movzbl	-304(%rbp,%rax,8), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L33:
	addl	$1, -596(%rbp)
.L31:
	movl	n(%rip), %eax
	cmpl	%eax, -596(%rbp)
	jl	.L34
	leaq	-304(%rbp), %rdx
	leaq	-592(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	isStable
	cmpl	$1, %eax
	jne	.L35
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L36
.L35:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L36:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
