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 1000000
 
int a[N];
int cnt=0;
int G[N];
int m=1;
 
void insertionSort(int n,int g){
    for(int i=g;i<n;i++){
        int v=a[i];
        int j=i-g;
        while(j>=0 && a[j] > v){
            a[j+g]=a[j];
            cnt++;
            j=j-g;
        }
        a[j+g]=v;
    }
    return;
}
 
 
void shellSort(int n){
    int temp=n;
     
    G[0]=1;
     
    while(1){
        G[m]=G[m-1]*3+1;
        if(G[m] > n)break;
        m++;
    }
     
    for(int i=m-1;i>=0;i--)
        insertionSort(n,G[i]);
     
    return;
}
 
 
 
int main(){
    int n,i;
     
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);
     
    shellSort(n);
     
     
    printf("%d\n",m);
    for(i=m-1;i>0;i--)
        printf("%d ",G[i]);
    printf("%d\n",G[0]);
     
    printf("%d\n",cnt);
     
    for(i=0;i<n;i++)
        printf("%d\n",a[i]);
     
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 4000000
a:
	.zero	4000000
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 4000000
G:
	.zero	4000000
	.globl	m
	.data
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.long	1
	.text
	.globl	insertionSort
	.type	insertionSort, @function
insertionSort:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L5:
	movl	-8(%rbp), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	-24(%rbp), %eax
	subl	%eax, -8(%rbp)
.L3:
	cmpl	$0, -8(%rbp)
	js	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L5
.L4:
	movl	-8(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insertionSort, .-insertionSort
	.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	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$1, G(%rip)
.L11:
	movl	m(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	m(%rip), %eax
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	m(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L16
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	jmp	.L11
.L16:
	nop
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L12
.L13:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	insertionSort
	subl	$1, -8(%rbp)
.L12:
	cmpl	$0, -8(%rbp)
	jns	.L13
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	shellSort, .-shellSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.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
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	shellSort
	movl	m(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L20
.L21:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -12(%rbp)
.L20:
	cmpl	$0, -12(%rbp)
	jg	.L21
	movl	G(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	cnt(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -12(%rbp)
	jmp	.L22
.L23:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L22:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.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	insertionSort
	.type	insertionSort, @function
insertionSort:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	jge	.L15
	movl	%esi, %r11d
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	cnt(%rip), %ecx
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	negl	%r11d
	leal	-1(%rdi), %r14d
	leaq	a(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	subl	%esi, %r14d
	xorl	%r13d, %r13d
	movslq	%r11d, %r11
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movslq	%esi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	salq	$2, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	0(%r13,%rbp), %r8
	movl	(%rdi,%rbp), %r9d
	movq	%r12, %rax
	addq	%rdi, %r8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	(%rdi,%rax,4), %edx
	movslq	%eax, %rsi
	leal	(%r10,%rax), %r15d
	cmpl	%r9d, %edx
	jle	.L19
	movl	%edx, (%r8,%rax,4)
	addq	%r11, %rax
	addl	$1, %ecx
	movl	$1, %ebx
	testl	%eax, %eax
	jns	.L4
.L5:
	movl	%r9d, (%rdi,%rsi,4)
	leaq	1(%r12), %rax
	subq	$4, %r13
	addq	$4, %rbp
	cmpq	%r14, %r12
	je	.L20
	movq	%rax, %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	movslq	%r15d, %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	testb	%bl, %bl
	je	.L1
	movl	%ecx, cnt(%rip)
.L1:
	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
.L15:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE23:
	.size	insertionSort, .-insertionSort
	.p2align 4
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	m(%rip), %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leal	-1(%rcx), %esi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%esi, %rax
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	movl	$1, G(%rip)
	movl	%edi, -8(%rsp)
	leaq	G(%rip), %rdi
	movl	(%rdi,%rax,4), %eax
	leal	1(%rax,%rax,2), %edx
	movslq	%ecx, %rax
	movl	%edx, (%rdi,%rax,4)
	cmpl	%edx, %ebx
	jl	.L26
	leaq	(%rdi,%rax,4), %rdx
	movl	%ebx, %r8d
	movl	(%rdx), %eax
	.p2align 4,,10
	.p2align 3
.L25:
	leal	1(%rax,%rax,2), %eax
	movl	%ecx, %esi
	leal	1(%rcx), %ecx
	addq	$4, %rdx
	movl	%eax, (%rdx)
	cmpl	%r8d, %eax
	jle	.L25
	movl	%ecx, m(%rip)
.L26:
	testl	%esi, %esi
	js	.L21
	movslq	%esi, %rsi
	movl	cnt(%rip), %ecx
	xorl	%ebp, %ebp
	leaq	(%rdi,%rsi,4), %rax
	leaq	a(%rip), %rdi
	movq	%rax, -16(%rsp)
	movl	-8(%rsp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rsp)
	.p2align 4,,10
	.p2align 3
.L32:
	movq	-16(%rsp), %rax
	movl	(%rax), %r10d
	cmpl	-8(%rsp), %r10d
	jge	.L27
	movl	-4(%rsp), %r15d
	movl	%r10d, %ebx
	movslq	%r10d, %r12
	xorl	%r14d, %r14d
	negl	%ebx
	salq	$2, %r12
	xorl	%r13d, %r13d
	subl	%r10d, %r15d
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L31:
	leaq	(%r14,%r12), %r8
	movl	(%rdi,%r12), %r9d
	movq	%r13, %rax
	addq	%rdi, %r8
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%rdi,%rax,4), %edx
	movslq	%eax, %rsi
	leal	(%r10,%rax), %r11d
	cmpl	%edx, %r9d
	jge	.L43
	movl	%edx, (%r8,%rax,4)
	addq	%rbx, %rax
	addl	$1, %ecx
	movl	$1, %ebp
	testl	%eax, %eax
	jns	.L28
.L29:
	movl	%r9d, (%rdi,%rsi,4)
	leaq	1(%r13), %rax
	subq	$4, %r14
	addq	$4, %r12
	cmpq	%r15, %r13
	je	.L27
	movq	%rax, %r13
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L43:
	movslq	%r11d, %rsi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L27:
	subq	$4, -16(%rsp)
	movq	-16(%rsp), %rax
	leaq	-4+G(%rip), %rbx
	cmpq	%rbx, %rax
	jne	.L32
	testb	%bpl, %bpl
	je	.L21
	movl	%ecx, cnt(%rip)
.L21:
	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
.LFE24:
	.size	shellSort, .-shellSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	testl	%edi, %edi
	jle	.L45
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	addq	$4, %rbp
	cmpl	%ebx, %edi
	jg	.L46
.L45:
	call	shellSort
	leaq	.LC1(%rip), %rbp
	movl	m(%rip), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	m(%rip), %edx
	cmpl	$1, %edx
	jle	.L47
	movslq	%edx, %rax
	leaq	G(%rip), %rcx
	subl	$2, %edx
	leaq	(%rcx,%rax,4), %rbx
	subq	%rdx, %rax
	leaq	-4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L48:
	movl	-4(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L48
.L47:
	movl	G(%rip), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	cnt(%rip), %edx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L49
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L50:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 4(%rsp)
	jg	.L50
.L49:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L56
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L56:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	m
	.data
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.long	1
	.globl	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 4000000
G:
	.zero	4000000
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4000000
a:
	.zero	4000000
	.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	insertionSort
	.type	insertionSort, @function
insertionSort:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	jge	.L15
	movl	%esi, %r11d
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	cnt(%rip), %ecx
	movl	%esi, %r10d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	negl	%r11d
	leal	-1(%rdi), %r14d
	leaq	a(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	subl	%esi, %r14d
	xorl	%r13d, %r13d
	movslq	%r11d, %r11
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movslq	%esi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	salq	$2, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	0(%r13,%rbp), %r8
	movl	(%rdi,%rbp), %r9d
	movq	%r12, %rax
	addq	%rdi, %r8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	(%rdi,%rax,4), %edx
	movslq	%eax, %rsi
	leal	(%r10,%rax), %r15d
	cmpl	%r9d, %edx
	jle	.L19
	movl	%edx, (%r8,%rax,4)
	addq	%r11, %rax
	addl	$1, %ecx
	movl	$1, %ebx
	testl	%eax, %eax
	jns	.L4
.L5:
	movl	%r9d, (%rdi,%rsi,4)
	leaq	1(%r12), %rax
	subq	$4, %r13
	addq	$4, %rbp
	cmpq	%r14, %r12
	je	.L20
	movq	%rax, %r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	movslq	%r15d, %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	testb	%bl, %bl
	je	.L1
	movl	%ecx, cnt(%rip)
.L1:
	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
.L15:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE23:
	.size	insertionSort, .-insertionSort
	.p2align 4
	.globl	shellSort
	.type	shellSort, @function
shellSort:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	m(%rip), %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leal	-1(%rcx), %esi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%esi, %rax
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	movl	$1, G(%rip)
	movl	%edi, -8(%rsp)
	leaq	G(%rip), %rdi
	movl	(%rdi,%rax,4), %eax
	leal	1(%rax,%rax,2), %edx
	movslq	%ecx, %rax
	movl	%edx, (%rdi,%rax,4)
	cmpl	%edx, %ebx
	jl	.L26
	leaq	(%rdi,%rax,4), %rdx
	movl	%ebx, %r8d
	movl	(%rdx), %eax
	.p2align 4,,10
	.p2align 3
.L25:
	leal	1(%rax,%rax,2), %eax
	movl	%ecx, %esi
	leal	1(%rcx), %ecx
	addq	$4, %rdx
	movl	%eax, (%rdx)
	cmpl	%r8d, %eax
	jle	.L25
	movl	%ecx, m(%rip)
.L26:
	testl	%esi, %esi
	js	.L21
	movslq	%esi, %rsi
	movl	cnt(%rip), %ecx
	xorl	%ebp, %ebp
	leaq	(%rdi,%rsi,4), %rax
	leaq	a(%rip), %rdi
	movq	%rax, -16(%rsp)
	movl	-8(%rsp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rsp)
	.p2align 4,,10
	.p2align 3
.L32:
	movq	-16(%rsp), %rax
	movl	(%rax), %r10d
	cmpl	-8(%rsp), %r10d
	jge	.L27
	movl	-4(%rsp), %r15d
	movl	%r10d, %ebx
	movslq	%r10d, %r12
	xorl	%r14d, %r14d
	negl	%ebx
	salq	$2, %r12
	xorl	%r13d, %r13d
	subl	%r10d, %r15d
	movslq	%ebx, %rbx
	.p2align 4,,10
	.p2align 3
.L31:
	leaq	(%r14,%r12), %r8
	movl	(%rdi,%r12), %r9d
	movq	%r13, %rax
	addq	%rdi, %r8
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%rdi,%rax,4), %edx
	movslq	%eax, %rsi
	leal	(%r10,%rax), %r11d
	cmpl	%edx, %r9d
	jge	.L43
	movl	%edx, (%r8,%rax,4)
	addq	%rbx, %rax
	addl	$1, %ecx
	movl	$1, %ebp
	testl	%eax, %eax
	jns	.L28
.L29:
	movl	%r9d, (%rdi,%rsi,4)
	leaq	1(%r13), %rax
	subq	$4, %r14
	addq	$4, %r12
	cmpq	%r15, %r13
	je	.L27
	movq	%rax, %r13
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L43:
	movslq	%r11d, %rsi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L27:
	subq	$4, -16(%rsp)
	movq	-16(%rsp), %rax
	leaq	-4+G(%rip), %rbx
	cmpq	%rbx, %rax
	jne	.L32
	testb	%bpl, %bpl
	je	.L21
	movl	%ecx, cnt(%rip)
.L21:
	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
.LFE24:
	.size	shellSort, .-shellSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	testl	%edi, %edi
	jle	.L45
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	addq	$4, %rbp
	cmpl	%ebx, %edi
	jg	.L46
.L45:
	call	shellSort
	leaq	.LC1(%rip), %rbp
	movl	m(%rip), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	m(%rip), %edx
	cmpl	$1, %edx
	jle	.L47
	movslq	%edx, %rax
	leaq	G(%rip), %rcx
	subl	$2, %edx
	leaq	(%rcx,%rax,4), %rbx
	subq	%rdx, %rax
	leaq	-4(%rcx), %rdx
	leaq	(%rdx,%rax,4), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L48:
	movl	-4(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L48
.L47:
	movl	G(%rip), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	cnt(%rip), %edx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L49
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L50:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 4(%rsp)
	jg	.L50
.L49:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L56
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L56:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	m
	.data
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.long	1
	.globl	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 4000000
G:
	.zero	4000000
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4000000
a:
	.zero	4000000
	.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 1000000
 
int a[N];
int cnt=0;
int G[N];
int m=1;
 
void insertionSort(int n,int g){
    for(int i=g;i<n;i++){
        int v=a[i];
        int j=i-g;
        while(j>=0 && a[j] > v){
            a[j+g]=a[j];
            cnt++;
            j=j-g;
        }
        a[j+g]=v;
    }
    return;
}
 
 
void shellSort(int n){
    int temp=n;
     
    G[0]=1;
     
    while(1){
        G[m]=G[m-1]*3+1;
        if(G[m] > n)break;
        m++;
    }
     
    for(int i=m-1;i>=0;i--)
        insertionSort(n,G[i]);
     
    return;
}
 
 
 
int main(){
    int n,i;
     
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);
     
    shellSort(n);
     
     
    printf("%d\n",m);
    for(i=m-1;i>0;i--)
        printf("%d ",G[i]);
    printf("%d\n",G[0]);
     
    printf("%d\n",cnt);
     
    for(i=0;i<n;i++)
        printf("%d\n",a[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

2
4 1
2
1
2
4
5
5
 1
1
3
1
2
6
 2
4 1
2
1
2
4
5
6
 1
1
1
0
1
2
 2
4 1
3
1
2
4
6
9
 1
1
1
-1
1
2
 2
4 1
2
1
2
4
6
6
 1
1
1
0
0
2
 2
4 1
3
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>
#define N 1000000
 
int a[N];
int cnt=0;
int G[N];
int m=1;
 
void insertionSort(int n,int g){
    for(int i=g;i<n;i++){
        int v=a[i];
        int j=i-g;
        while(j>=0 && a[j] > v){
            a[j+g]=a[j];
            cnt++;
            j=j-g;
        }
        a[j+g]=v;
    }
    return;
}
 
 
void shellSort(int n){
    int temp=n;
     
    G[0]=1;
     
    while(1){
        G[m]=G[m-1]*3+1;
        if(G[m] > n)break;
        m++;
    }
     
    for(int i=m-1;i>=0;i--)
        insertionSort(n,G[i]);
     
    return;
}
 
 
 
int main(){
    int n,i;
     
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&a[i]);
     
    shellSort(n);
     
     
    printf("%d\n",m);
    for(i=m-1;i>0;i--)
        printf("%d ",G[i]);
    printf("%d\n",G[0]);
     
    printf("%d\n",cnt);
     
    for(i=0;i<n;i++)
        printf("%d\n",a[i]);
     
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 4000000
a:
	.zero	4000000
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 4000000
G:
	.zero	4000000
	.globl	m
	.data
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.long	1
	.text
	.globl	insertionSort
	.type	insertionSort, @function
insertionSort:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L5:
	movl	-8(%rbp), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	-24(%rbp), %eax
	subl	%eax, -8(%rbp)
.L3:
	cmpl	$0, -8(%rbp)
	js	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L5
.L4:
	movl	-8(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insertionSort, .-insertionSort
	.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	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$1, G(%rip)
.L11:
	movl	m(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	m(%rip), %eax
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	m(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L16
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	jmp	.L11
.L16:
	nop
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L12
.L13:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	insertionSort
	subl	$1, -8(%rbp)
.L12:
	cmpl	$0, -8(%rbp)
	jns	.L13
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	shellSort, .-shellSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.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
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	shellSort
	movl	m(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L20
.L21:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -12(%rbp)
.L20:
	cmpl	$0, -12(%rbp)
	jg	.L21
	movl	G(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	cnt(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -12(%rbp)
	jmp	.L22
.L23:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L22:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 4000000
a:
	.zero	4000000
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 4000000
G:
	.zero	4000000
	.globl	m
	.data
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.long	1
	.text
	.globl	insertionSort
	.type	insertionSort, @function
insertionSort:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L2
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L5:
	movl	-8(%rbp), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
	movl	-24(%rbp), %eax
	subl	%eax, -8(%rbp)
.L3:
	cmpl	$0, -8(%rbp)
	js	.L4
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L5
.L4:
	movl	-8(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insertionSort, .-insertionSort
	.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	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$1, G(%rip)
.L11:
	movl	m(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%eax, %edx
	movl	m(%rip), %eax
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	m(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L16
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	jmp	.L11
.L16:
	nop
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L12
.L13:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	insertionSort
	subl	$1, -8(%rbp)
.L12:
	cmpl	$0, -8(%rbp)
	jns	.L13
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	shellSort, .-shellSort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.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
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	shellSort
	movl	m(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L20
.L21:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -12(%rbp)
.L20:
	cmpl	$0, -12(%rbp)
	jg	.L21
	movl	G(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	cnt(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -12(%rbp)
	jmp	.L22
.L23:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L22:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.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:
