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 c=0;
void insertSort(int arr[],int n ,int g){
	for (int  i = g; i < n;i++){
	  int v = arr[i];
      int j = i - g;
      while ( j >= 0 && arr[j] > v){
        arr[ j +g] = arr[ j];
        j = j-g;
        c++;
      }
      arr[ j +g] =v;
	}
};
void shellSort(int A[],int n){

	int G [13]= {1,4,13,40,121,364,1093,3280,9841,29524,88573,265720,797161}; //"h"=3*"h-1"+1
	int m= 0;
for (;n/9 >= G[m];m++){}
	printf("%d\n",m+1);
	for (int i= m;i >= 0;i--){
		printf("%d ",G[i]);
		insertSort(A,n,G[i]);
	}
	printf("\n");
};
int main(){

  int n ,i ,j , m ,t,g ,k ,v;
  scanf("%d" ,&n);
  int arr[n];
  for ( i = 0; i < n; i++){
    scanf("%d",&arr[i]);
  }
shellSort(arr,n);
  printf("%d\n",c);

  for ( i = 0; i < n; i++){
    printf("%d\n",arr[i]);
  }


  return 0;

}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.text
	.globl	insertSort
	.type	insertSort, @function
insertSort:
.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %ecx
	movl	-32(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-32(%rbp), %eax
	subl	%eax, -8(%rbp)
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
.L3:
	cmpl	$0, -8(%rbp)
	js	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L5
.L4:
	movl	-8(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insertSort, .-insertSort
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d "
	.text
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%rdi, -88(%rbp)
	movl	%esi, -92(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -64(%rbp)
	movl	$4, -60(%rbp)
	movl	$13, -56(%rbp)
	movl	$40, -52(%rbp)
	movl	$121, -48(%rbp)
	movl	$364, -44(%rbp)
	movl	$1093, -40(%rbp)
	movl	$3280, -36(%rbp)
	movl	$9841, -32(%rbp)
	movl	$29524, -28(%rbp)
	movl	$88573, -24(%rbp)
	movl	$265720, -20(%rbp)
	movl	$797161, -16(%rbp)
	movl	$0, -72(%rbp)
	jmp	.L8
.L9:
	addl	$1, -72(%rbp)
.L8:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$954437177, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-72(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	-72(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-72(%rbp), %eax
	movl	%eax, -68(%rbp)
	jmp	.L10
.L11:
	movl	-68(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-68(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %edx
	movl	-92(%rbp), %ecx
	movq	-88(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	insertSort
	subl	$1, -68(%rbp)
.L10:
	cmpl	$0, -68(%rbp)
	jns	.L11
	movl	$10, %edi
	call	putchar@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	shellSort, .-shellSort
	.section	.rodata
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-80(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ecx
	movl	$0, %edx
	divq	%rcx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L17
.L18:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L17:
	movl	-80(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L18
	movl	-80(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	shellSort
	movl	c(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -76(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-76(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -76(%rbp)
.L19:
	movl	-80(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	insertSort
	.type	insertSort, @function
insertSort:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edx
	jge	.L10
	movslq	%edx, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	salq	$2, %r9
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subl	%edx, %ebp
	xorl	%ebx, %ebx
	leaq	(%rdi,%r9), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rsi, %rax
	movl	(%rsi), %r10d
	movl	%ebx, %edi
	movq	%rsi, %rcx
	subq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rax), %r8d
	movq	%rax, %r11
	cmpl	%r10d, %r8d
	jle	.L14
	movl	%r8d, (%rcx)
	subq	%r9, %rax
	subq	%r9, %rcx
	addl	$1, c(%rip)
	subl	%edx, %edi
	jns	.L3
	addl	$1, %ebx
	movl	%r10d, (%r11)
	addq	$4, %rsi
	cmpl	%ebp, %ebx
	jne	.L6
.L15:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movq	%rcx, %r11
	addl	$1, %ebx
	addq	$4, %rsi
	movl	%r10d, (%r11)
	cmpl	%ebp, %ebx
	jne	.L6
	jmp	.L15
.L10:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE23:
	.size	insertSort, .-insertSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d "
	.text
	.p2align 4
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	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	$88, %rsp
	.cfi_def_cfa_offset 144
	movdqa	.LC0(%rip), %xmm0
	movq	%rdi, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movl	$797161, 64(%rsp)
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	cmpl	$8, %esi
	jle	.L29
	cmpl	$35, %esi
	jle	.L30
	cmpl	$116, %esi
	jle	.L31
	cmpl	$359, %esi
	jle	.L32
	cmpl	$1088, %esi
	jle	.L33
	cmpl	$3275, %esi
	jle	.L34
	cmpl	$9836, %esi
	jle	.L35
	cmpl	$29519, %esi
	jle	.L36
	cmpl	$88568, %esi
	jle	.L37
	cmpl	$265715, %esi
	jle	.L38
	cmpl	$797156, %esi
	jle	.L39
	xorl	%r13d, %r13d
	cmpl	$2391479, %esi
	setg	%r13b
	addl	$11, %r13d
.L18:
	leal	1(%r13), %edx
.L17:
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movslq	%r13d, %r13
	leaq	.LC3(%rip), %rsi
	leaq	.LC4(%rip), %rbx
	call	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	movl	0(%rbp,%r13,4), %r12d
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	%r12d, %edx
	call	__printf_chk@PLT
	cmpl	%r14d, %r12d
	jge	.L26
	movq	8(%rsp), %rax
	movslq	%r12d, %rdi
	movl	%r14d, %r15d
	xorl	%r11d, %r11d
	salq	$2, %rdi
	subl	%r12d, %r15d
	leaq	(%rax,%rdi), %r10
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r10, %rax
	movl	(%r10), %r8d
	movl	%r11d, %ecx
	movq	%r10, %rdx
	subq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L22:
	movl	(%rax), %esi
	movq	%rax, %r9
	cmpl	%esi, %r8d
	jge	.L46
	movl	%esi, (%rdx)
	subq	%rdi, %rax
	subq	%rdi, %rdx
	addl	$1, c(%rip)
	subl	%r12d, %ecx
	jns	.L22
	addl	$1, %r11d
	movl	%r8d, (%r9)
	addq	$4, %r10
	cmpl	%r11d, %r15d
	jne	.L25
.L26:
	subq	$1, %r13
	cmpl	$-1, %r13d
	jne	.L20
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$10, %edi
	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
	jmp	putchar@PLT
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	movq	%rdx, %r9
	addl	$1, %r11d
	addq	$4, %r10
	movl	%r8d, (%r9)
	cmpl	%r11d, %r15d
	jne	.L25
	jmp	.L26
.L34:
	movl	$5, %r13d
	jmp	.L18
.L30:
	movl	$1, %r13d
	jmp	.L18
.L29:
	movl	$1, %edx
	xorl	%r13d, %r13d
	jmp	.L17
.L33:
	movl	$4, %r13d
	jmp	.L18
.L31:
	movl	$2, %r13d
	jmp	.L18
.L35:
	movl	$6, %r13d
	jmp	.L18
.L32:
	movl	$3, %r13d
	jmp	.L18
.L39:
	movl	$10, %r13d
	jmp	.L18
.L36:
	movl	$7, %r13d
	jmp	.L18
.L37:
	movl	$8, %r13d
	jmp	.L18
.L38:
	movl	$9, %r13d
	jmp	.L18
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	shellSort, .-shellSort
	.section	.rodata.str1.1
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC5(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %rsi
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L50
.L63:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L63
.L50:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L64
.L51:
	movq	%rsp, %r13
	testl	%esi, %esi
	jle	.L52
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L53:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %esi
	addq	$4, %r12
	cmpl	%ebx, %esi
	jg	.L53
.L52:
	movq	%r13, %rdi
	leaq	.LC3(%rip), %r12
	call	shellSort
	movl	c(%rip), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jle	.L54
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L55:
	movl	0(%r13,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, -44(%rbp)
	jg	.L55
.L54:
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L65
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L64:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L51
.L65:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	13
	.long	40
	.align 16
.LC1:
	.long	121
	.long	364
	.long	1093
	.long	3280
	.align 16
.LC2:
	.long	9841
	.long	29524
	.long	88573
	.long	265720
	.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	insertSort
	.type	insertSort, @function
insertSort:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edx
	jge	.L10
	movslq	%edx, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	salq	$2, %r9
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subl	%edx, %ebp
	xorl	%ebx, %ebx
	leaq	(%rdi,%r9), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rsi, %rax
	movl	(%rsi), %r10d
	movl	%ebx, %edi
	movq	%rsi, %rcx
	subq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rax), %r8d
	movq	%rax, %r11
	cmpl	%r10d, %r8d
	jle	.L14
	movl	%r8d, (%rcx)
	subq	%r9, %rax
	subq	%r9, %rcx
	addl	$1, c(%rip)
	subl	%edx, %edi
	jns	.L3
	addl	$1, %ebx
	movl	%r10d, (%r11)
	addq	$4, %rsi
	cmpl	%ebp, %ebx
	jne	.L6
.L15:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movq	%rcx, %r11
	addl	$1, %ebx
	addq	$4, %rsi
	movl	%r10d, (%r11)
	cmpl	%ebp, %ebx
	jne	.L6
	jmp	.L15
.L10:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE23:
	.size	insertSort, .-insertSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d "
	.text
	.p2align 4
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	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	$88, %rsp
	.cfi_def_cfa_offset 144
	movdqa	.LC0(%rip), %xmm0
	movq	%rdi, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movl	$797161, 64(%rsp)
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	cmpl	$8, %esi
	jle	.L29
	cmpl	$35, %esi
	jle	.L30
	cmpl	$116, %esi
	jle	.L31
	cmpl	$359, %esi
	jle	.L32
	cmpl	$1088, %esi
	jle	.L33
	cmpl	$3275, %esi
	jle	.L34
	cmpl	$9836, %esi
	jle	.L35
	cmpl	$29519, %esi
	jle	.L36
	cmpl	$88568, %esi
	jle	.L37
	cmpl	$265715, %esi
	jle	.L38
	cmpl	$797156, %esi
	jle	.L39
	xorl	%r13d, %r13d
	cmpl	$2391479, %esi
	setg	%r13b
	addl	$11, %r13d
.L18:
	leal	1(%r13), %edx
.L17:
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movslq	%r13d, %r13
	leaq	.LC3(%rip), %rsi
	leaq	.LC4(%rip), %rbx
	call	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	movl	0(%rbp,%r13,4), %r12d
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	%r12d, %edx
	call	__printf_chk@PLT
	cmpl	%r14d, %r12d
	jge	.L26
	movq	8(%rsp), %rax
	movslq	%r12d, %rdi
	movl	%r14d, %r15d
	xorl	%r11d, %r11d
	salq	$2, %rdi
	subl	%r12d, %r15d
	leaq	(%rax,%rdi), %r10
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r10, %rax
	movl	(%r10), %r8d
	movl	%r11d, %ecx
	movq	%r10, %rdx
	subq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L22:
	movl	(%rax), %esi
	movq	%rax, %r9
	cmpl	%esi, %r8d
	jge	.L46
	movl	%esi, (%rdx)
	subq	%rdi, %rax
	subq	%rdi, %rdx
	addl	$1, c(%rip)
	subl	%r12d, %ecx
	jns	.L22
	addl	$1, %r11d
	movl	%r8d, (%r9)
	addq	$4, %r10
	cmpl	%r11d, %r15d
	jne	.L25
.L26:
	subq	$1, %r13
	cmpl	$-1, %r13d
	jne	.L20
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$10, %edi
	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
	jmp	putchar@PLT
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	movq	%rdx, %r9
	addl	$1, %r11d
	addq	$4, %r10
	movl	%r8d, (%r9)
	cmpl	%r11d, %r15d
	jne	.L25
	jmp	.L26
.L34:
	movl	$5, %r13d
	jmp	.L18
.L30:
	movl	$1, %r13d
	jmp	.L18
.L29:
	movl	$1, %edx
	xorl	%r13d, %r13d
	jmp	.L17
.L33:
	movl	$4, %r13d
	jmp	.L18
.L31:
	movl	$2, %r13d
	jmp	.L18
.L35:
	movl	$6, %r13d
	jmp	.L18
.L32:
	movl	$3, %r13d
	jmp	.L18
.L39:
	movl	$10, %r13d
	jmp	.L18
.L36:
	movl	$7, %r13d
	jmp	.L18
.L37:
	movl	$8, %r13d
	jmp	.L18
.L38:
	movl	$9, %r13d
	jmp	.L18
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	shellSort, .-shellSort
	.section	.rodata.str1.1
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC5(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	movq	%rax, %rsi
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L50
.L63:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L63
.L50:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L64
.L51:
	movq	%rsp, %r13
	testl	%esi, %esi
	jle	.L52
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L53:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %esi
	addq	$4, %r12
	cmpl	%ebx, %esi
	jg	.L53
.L52:
	movq	%r13, %rdi
	leaq	.LC3(%rip), %r12
	call	shellSort
	movl	c(%rip), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jle	.L54
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L55:
	movl	0(%r13,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, -44(%rbp)
	jg	.L55
.L54:
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L65
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L64:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L51
.L65:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	13
	.long	40
	.align 16
.LC1:
	.long	121
	.long	364
	.long	1093
	.long	3280
	.align 16
.LC2:
	.long	9841
	.long	29524
	.long	88573
	.long	265720
	.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 c=0;
void insertSort(int arr[],int n ,int g){
	for (int  i = g; i < n;i++){
	  int v = arr[i];
      int j = i - g;
      while ( j >= 0 && arr[j] > v){
        arr[ j +g] = arr[ j];
        j = j-g;
        c++;
      }
      arr[ j +g] =v;
	}
};
void shellSort(int A[],int n){

	int G [13]= {1,4,13,40,121,364,1093,3280,9841,29524,88573,265720,797161}; //"h"=3*"h-1"+1
	int m= 0;
for (;n/9 >= G[m];m++){}
	printf("%d\n",m+1);
	for (int i= m;i >= 0;i--){
		printf("%d ",G[i]);
		insertSort(A,n,G[i]);
	}
	printf("\n");
};
int main(){

  int n ,i ,j , m ,t,g ,k ,v;
  scanf("%d" ,&n);
  int arr[n];
  for ( i = 0; i < n; i++){
    scanf("%d",&arr[i]);
  }
shellSort(arr,n);
  printf("%d\n",c);

  for ( i = 0; i < n; i++){
    printf("%d\n",arr[i]);
  }


  return 0;

}


5
5
1
4
5
2
 3
6
2
1
 5
6
1
4
5
2
 3
0
2
1
 5
6
1
4
9
2
 3
-1
2
1
 5
6
1
4
6
2
 3
0
2
0
 5
5
1
4
9
2
 3
0
1
0

1
1 
5
1
2
4
5
5
 1
1 
3
1
2
6
 1
1 
6
1
2
4
5
6
 1
1 
1
0
1
2
 1
1 
5
1
2
4
6
9
 1
1 
1
-1
1
2
 1
1 
5
1
2
4
6
6
 1
1 
1
0
0
2
 1
1 
5
1
2
4
5
9
 1
1 
1
0
0
1

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 c=0;
void insertSort(int arr[],int n ,int g){
	for (int  i = g; i < n;i++){
	  int v = arr[i];
      int j = i - g;
      while ( j >= 0 && arr[j] > v){
        arr[ j +g] = arr[ j];
        j = j-g;
        c++;
      }
      arr[ j +g] =v;
	}
};
void shellSort(int A[],int n){

	int G [13]= {1,4,13,40,121,364,1093,3280,9841,29524,88573,265720,797161}; //"h"=3*"h-1"+1
	int m= 0;
for (;n/9 >= G[m];m++){}
	printf("%d\n",m+1);
	for (int i= m;i >= 0;i--){
		printf("%d ",G[i]);
		insertSort(A,n,G[i]);
	}
	printf("\n");
};
int main(){

  int n ,i ,j , m ,t,g ,k ,v;
  scanf("%d" ,&n);
  int arr[n];
  for ( i = 0; i < n; i++){
    scanf("%d",&arr[i]);
  }
shellSort(arr,n);
  printf("%d\n",c);

  for ( i = 0; i < n; i++){
    printf("%d\n",arr[i]);
  }


  return 0;

}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.text
	.globl	insertSort
	.type	insertSort, @function
insertSort:
.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %ecx
	movl	-32(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-32(%rbp), %eax
	subl	%eax, -8(%rbp)
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
.L3:
	cmpl	$0, -8(%rbp)
	js	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L5
.L4:
	movl	-8(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insertSort, .-insertSort
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d "
	.text
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%rdi, -88(%rbp)
	movl	%esi, -92(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -64(%rbp)
	movl	$4, -60(%rbp)
	movl	$13, -56(%rbp)
	movl	$40, -52(%rbp)
	movl	$121, -48(%rbp)
	movl	$364, -44(%rbp)
	movl	$1093, -40(%rbp)
	movl	$3280, -36(%rbp)
	movl	$9841, -32(%rbp)
	movl	$29524, -28(%rbp)
	movl	$88573, -24(%rbp)
	movl	$265720, -20(%rbp)
	movl	$797161, -16(%rbp)
	movl	$0, -72(%rbp)
	jmp	.L8
.L9:
	addl	$1, -72(%rbp)
.L8:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$954437177, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-72(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	-72(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-72(%rbp), %eax
	movl	%eax, -68(%rbp)
	jmp	.L10
.L11:
	movl	-68(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-68(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %edx
	movl	-92(%rbp), %ecx
	movq	-88(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	insertSort
	subl	$1, -68(%rbp)
.L10:
	cmpl	$0, -68(%rbp)
	jns	.L11
	movl	$10, %edi
	call	putchar@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	shellSort, .-shellSort
	.section	.rodata
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-80(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ecx
	movl	$0, %edx
	divq	%rcx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L17
.L18:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L17:
	movl	-80(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L18
	movl	-80(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	shellSort
	movl	c(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -76(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-76(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -76(%rbp)
.L19:
	movl	-80(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.text
	.globl	insertSort
	.type	insertSort, @function
insertSort:
.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %ecx
	movl	-32(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-32(%rbp), %eax
	subl	%eax, -8(%rbp)
	movl	c(%rip), %eax
	addl	$1, %eax
	movl	%eax, c(%rip)
.L3:
	cmpl	$0, -8(%rbp)
	js	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L5
.L4:
	movl	-8(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insertSort, .-insertSort
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d "
	.text
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%rdi, -88(%rbp)
	movl	%esi, -92(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -64(%rbp)
	movl	$4, -60(%rbp)
	movl	$13, -56(%rbp)
	movl	$40, -52(%rbp)
	movl	$121, -48(%rbp)
	movl	$364, -44(%rbp)
	movl	$1093, -40(%rbp)
	movl	$3280, -36(%rbp)
	movl	$9841, -32(%rbp)
	movl	$29524, -28(%rbp)
	movl	$88573, -24(%rbp)
	movl	$265720, -20(%rbp)
	movl	$797161, -16(%rbp)
	movl	$0, -72(%rbp)
	jmp	.L8
.L9:
	addl	$1, -72(%rbp)
.L8:
	movl	-92(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$954437177, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-72(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	-72(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-72(%rbp), %eax
	movl	%eax, -68(%rbp)
	jmp	.L10
.L11:
	movl	-68(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-68(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %edx
	movl	-92(%rbp), %ecx
	movq	-88(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	insertSort
	subl	$1, -68(%rbp)
.L10:
	cmpl	$0, -68(%rbp)
	jns	.L11
	movl	$10, %edi
	call	putchar@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	shellSort, .-shellSort
	.section	.rodata
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-80(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ecx
	movl	$0, %edx
	divq	%rcx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L17
.L18:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L17:
	movl	-80(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L18
	movl	-80(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	shellSort
	movl	c(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -76(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-76(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -76(%rbp)
.L19:
	movl	-80(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L20
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
