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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cnt
	.bss
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 400
G:
	.zero	400
	.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
	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	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%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	insertionsort, .-insertionsort
	.globl	makeg
	.type	makeg, @function
makeg:
.LFB1:
	.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	$1, G(%rip)
	movl	$0, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %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	-4(%rbp), %eax
	addl	$1, %eax
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L9
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	makeg, .-makeg
	.globl	shellsort
	.type	shellsort, @function
shellsort:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	makeg
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L11
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	insertionsort
	subl	$1, -4(%rbp)
.L11:
	cmpl	$0, -4(%rbp)
	jns	.L12
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	shellsort, .-shellsort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n%d\n"
	.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
	leaq	-3997696(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2336, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4000020(%rbp)
	jmp	.L14
.L15:
	leaq	-4000016(%rbp), %rdx
	movl	-4000020(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4000020(%rbp)
.L14:
	movl	-4000024(%rbp), %eax
	cmpl	%eax, -4000020(%rbp)
	jl	.L15
	movl	-4000024(%rbp), %edx
	leaq	-4000016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	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, -4000020(%rbp)
	jmp	.L16
.L17:
	movl	-4000020(%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, -4000020(%rbp)
.L16:
	cmpl	$0, -4000020(%rbp)
	jg	.L17
	movl	cnt(%rip), %edx
	movl	G(%rip), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -4000020(%rbp)
	jmp	.L18
.L19:
	movl	-4000020(%rbp), %eax
	cltq
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4000020(%rbp)
.L18:
	movl	-4000024(%rbp), %eax
	cmpl	%eax, -4000020(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	insertionsort
	.type	insertionsort, @function
insertionsort:
.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, cnt(%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	insertionsort, .-insertionsort
	.p2align 4
	.globl	makeg
	.type	makeg, @function
makeg:
.LFB24:
	.cfi_startproc
	endbr64
	movl	$1, G(%rip)
	testl	%edi, %edi
	jle	.L16
	movl	m(%rip), %eax
	leaq	4+G(%rip), %rcx
	leal	1(%rax), %edx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	leal	1(%rax,%rax,2), %eax
	movl	%edx, %esi
	addq	$4, %rcx
	addl	$1, %edx
	movl	%eax, -4(%rcx)
	cmpl	%edi, %eax
	jle	.L18
	movl	%esi, m(%rip)
.L16:
	ret
	.cfi_endproc
.LFE24:
	.size	makeg, .-makeg
	.p2align 4
	.globl	shellsort
	.type	shellsort, @function
shellsort:
.LFB25:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	movl	m(%rip), %esi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$1, G(%rip)
	leal	-1(%rsi), %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	testl	%r12d, %r12d
	jle	.L22
	leaq	4+G(%rip), %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L23:
	leal	1(%rax,%rax,2), %eax
	movl	%esi, %ecx
	leal	1(%rsi), %esi
	addq	$4, %rdx
	movl	%eax, -4(%rdx)
	cmpl	%eax, %r12d
	jge	.L23
	movl	%esi, m(%rip)
.L22:
	testl	%ecx, %ecx
	js	.L20
	leaq	G(%rip), %rax
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rbp
	leaq	-4(%rax), %r14
	.p2align 4,,10
	.p2align 3
.L26:
	movl	0(%rbp), %r8d
	cmpl	%r12d, %r8d
	jge	.L32
	movslq	%r8d, %rdi
	movl	%r12d, %r15d
	xorl	%ebx, %ebx
	salq	$2, %rdi
	subl	%r8d, %r15d
	leaq	0(%r13,%rdi), %r11
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%r11, %rax
	movl	(%r11), %r9d
	movl	%ebx, %ecx
	movq	%r11, %rdx
	subq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%rax), %esi
	movq	%rax, %r10
	cmpl	%esi, %r9d
	jge	.L39
	movl	%esi, (%rdx)
	subq	%rdi, %rax
	subq	%rdi, %rdx
	addl	$1, cnt(%rip)
	subl	%r8d, %ecx
	jns	.L28
	addl	$1, %ebx
	movl	%r9d, (%r10)
	addq	$4, %r11
	cmpl	%ebx, %r15d
	jne	.L31
.L32:
	subq	$4, %rbp
	cmpq	%r14, %rbp
	jne	.L26
.L20:
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L39:
	.cfi_restore_state
	movq	%rdx, %r10
	addl	$1, %ebx
	addq	$4, %r11
	movl	%r9d, (%r10)
	cmpl	%ebx, %r15d
	jne	.L31
	jmp	.L32
	.cfi_endproc
.LFE25:
	.size	shellsort, .-shellsort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-3997696(%rsp), %r11
	.cfi_def_cfa 11, 3997744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2336, %rsp
	.cfi_def_cfa_offset 4000080
	leaq	.LC0(%rip), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 4000024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L41
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L42
.L41:
	movq	%r12, %rdi
	leaq	.LC1(%rip), %rbp
	call	shellsort
	movl	m(%rip), %edx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	m(%rip), %edx
	cmpl	$1, %edx
	jle	.L43
	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), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L44:
	movl	-4(%rbx), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L44
.L43:
	movl	cnt(%rip), %ecx
	movl	G(%rip), %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L45
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L46:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L46
.L45:
	movq	4000024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$4000032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L54:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 400
G:
	.zero	400
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.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	insertionsort
	.type	insertionsort, @function
insertionsort:
.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, cnt(%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	insertionsort, .-insertionsort
	.p2align 4
	.globl	makeg
	.type	makeg, @function
makeg:
.LFB24:
	.cfi_startproc
	endbr64
	movl	$1, G(%rip)
	testl	%edi, %edi
	jle	.L16
	movl	m(%rip), %eax
	leaq	4+G(%rip), %rcx
	leal	1(%rax), %edx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	leal	1(%rax,%rax,2), %eax
	movl	%edx, %esi
	addq	$4, %rcx
	addl	$1, %edx
	movl	%eax, -4(%rcx)
	cmpl	%edi, %eax
	jle	.L18
	movl	%esi, m(%rip)
.L16:
	ret
	.cfi_endproc
.LFE24:
	.size	makeg, .-makeg
	.p2align 4
	.globl	shellsort
	.type	shellsort, @function
shellsort:
.LFB25:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	movl	m(%rip), %esi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$1, G(%rip)
	leal	-1(%rsi), %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	testl	%r12d, %r12d
	jle	.L22
	leaq	4+G(%rip), %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L23:
	leal	1(%rax,%rax,2), %eax
	movl	%esi, %ecx
	leal	1(%rsi), %esi
	addq	$4, %rdx
	movl	%eax, -4(%rdx)
	cmpl	%eax, %r12d
	jge	.L23
	movl	%esi, m(%rip)
.L22:
	testl	%ecx, %ecx
	js	.L20
	leaq	G(%rip), %rax
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rbp
	leaq	-4(%rax), %r14
	.p2align 4,,10
	.p2align 3
.L26:
	movl	0(%rbp), %r8d
	cmpl	%r12d, %r8d
	jge	.L32
	movslq	%r8d, %rdi
	movl	%r12d, %r15d
	xorl	%ebx, %ebx
	salq	$2, %rdi
	subl	%r8d, %r15d
	leaq	0(%r13,%rdi), %r11
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%r11, %rax
	movl	(%r11), %r9d
	movl	%ebx, %ecx
	movq	%r11, %rdx
	subq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%rax), %esi
	movq	%rax, %r10
	cmpl	%esi, %r9d
	jge	.L39
	movl	%esi, (%rdx)
	subq	%rdi, %rax
	subq	%rdi, %rdx
	addl	$1, cnt(%rip)
	subl	%r8d, %ecx
	jns	.L28
	addl	$1, %ebx
	movl	%r9d, (%r10)
	addq	$4, %r11
	cmpl	%ebx, %r15d
	jne	.L31
.L32:
	subq	$4, %rbp
	cmpq	%r14, %rbp
	jne	.L26
.L20:
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L39:
	.cfi_restore_state
	movq	%rdx, %r10
	addl	$1, %ebx
	addq	$4, %r11
	movl	%r9d, (%r10)
	cmpl	%ebx, %r15d
	jne	.L31
	jmp	.L32
	.cfi_endproc
.LFE25:
	.size	shellsort, .-shellsort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-3997696(%rsp), %r11
	.cfi_def_cfa 11, 3997744
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2336, %rsp
	.cfi_def_cfa_offset 4000080
	leaq	.LC0(%rip), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 4000024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L41
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L42
.L41:
	movq	%r12, %rdi
	leaq	.LC1(%rip), %rbp
	call	shellsort
	movl	m(%rip), %edx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	m(%rip), %edx
	cmpl	$1, %edx
	jle	.L43
	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), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L44:
	movl	-4(%rbx), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r14, %rbx
	jne	.L44
.L43:
	movl	cnt(%rip), %ecx
	movl	G(%rip), %edx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L45
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L46:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L46
.L45:
	movq	4000024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$4000032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L54:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 400
G:
	.zero	400
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.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>
int cnt=0,m=0,G[100];
void insertionsort(int a[],int n,int g){
    int i,j,v;
    for(i=g;i<n;i++){
        v=a[i];
        j=i-g;
        while(j>=0&&a[j]>v){
            a[j+g]=a[j];
            j=j-g;
            cnt++;
        }
        a[j+g]=v;
    }
}
void makeg(int n){
    int i;
    G[0]=1;
    for(i=0;G[i]<=n;i++){
        G[i+1]=G[i]*3+1;
        m++;
    }
}
void shellsort(int a[],int n){
  int i;
  makeg(n);
  for(i=m-1;i>=0;i--)insertionsort(a,n,G[i]);
}
int main(){
    int n,i,a[1000000];
    scanf("%d",&n);
    for(i=0;i<n;i++)scanf("%d",&a[i]);
    shellsort(a,n);
    printf("%d\n",m);
    for(i=m-1;i>0;i--)printf("%d ",G[i]);
    printf("%d\n%d\n",G[0],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>
int cnt=0,m=0,G[100];
void insertionsort(int a[],int n,int g){
    int i,j,v;
    for(i=g;i<n;i++){
        v=a[i];
        j=i-g;
        while(j>=0&&a[j]>v){
            a[j+g]=a[j];
            j=j-g;
            cnt++;
        }
        a[j+g]=v;
    }
}
void makeg(int n){
    int i;
    G[0]=1;
    for(i=0;G[i]<=n;i++){
        G[i+1]=G[i]*3+1;
        m++;
    }
}
void shellsort(int a[],int n){
  int i;
  makeg(n);
  for(i=m-1;i>=0;i--)insertionsort(a,n,G[i]);
}
int main(){
    int n,i,a[1000000];
    scanf("%d",&n);
    for(i=0;i<n;i++)scanf("%d",&a[i]);
    shellsort(a,n);
    printf("%d\n",m);
    for(i=m-1;i>0;i--)printf("%d ",G[i]);
    printf("%d\n%d\n",G[0],cnt);
    for(i=0;i<n;i++)printf("%d\n",a[i]);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cnt
	.bss
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 400
G:
	.zero	400
	.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
	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	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%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	insertionsort, .-insertionsort
	.globl	makeg
	.type	makeg, @function
makeg:
.LFB1:
	.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	$1, G(%rip)
	movl	$0, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %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	-4(%rbp), %eax
	addl	$1, %eax
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L9
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	makeg, .-makeg
	.globl	shellsort
	.type	shellsort, @function
shellsort:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	makeg
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L11
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	insertionsort
	subl	$1, -4(%rbp)
.L11:
	cmpl	$0, -4(%rbp)
	jns	.L12
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	shellsort, .-shellsort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n%d\n"
	.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
	leaq	-3997696(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2336, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4000020(%rbp)
	jmp	.L14
.L15:
	leaq	-4000016(%rbp), %rdx
	movl	-4000020(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4000020(%rbp)
.L14:
	movl	-4000024(%rbp), %eax
	cmpl	%eax, -4000020(%rbp)
	jl	.L15
	movl	-4000024(%rbp), %edx
	leaq	-4000016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	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, -4000020(%rbp)
	jmp	.L16
.L17:
	movl	-4000020(%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, -4000020(%rbp)
.L16:
	cmpl	$0, -4000020(%rbp)
	jg	.L17
	movl	cnt(%rip), %edx
	movl	G(%rip), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -4000020(%rbp)
	jmp	.L18
.L19:
	movl	-4000020(%rbp), %eax
	cltq
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4000020(%rbp)
.L18:
	movl	-4000024(%rbp), %eax
	cmpl	%eax, -4000020(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	cnt
	.bss
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 400
G:
	.zero	400
	.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
	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	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%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	insertionsort, .-insertionsort
	.globl	makeg
	.type	makeg, @function
makeg:
.LFB1:
	.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	$1, G(%rip)
	movl	$0, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %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	-4(%rbp), %eax
	addl	$1, %eax
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	m(%rip), %eax
	addl	$1, %eax
	movl	%eax, m(%rip)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L9
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	makeg, .-makeg
	.globl	shellsort
	.type	shellsort, @function
shellsort:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	makeg
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L11
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	insertionsort
	subl	$1, -4(%rbp)
.L11:
	cmpl	$0, -4(%rbp)
	jns	.L12
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	shellsort, .-shellsort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\n%d\n"
	.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
	leaq	-3997696(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2336, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4000024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4000020(%rbp)
	jmp	.L14
.L15:
	leaq	-4000016(%rbp), %rdx
	movl	-4000020(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4000020(%rbp)
.L14:
	movl	-4000024(%rbp), %eax
	cmpl	%eax, -4000020(%rbp)
	jl	.L15
	movl	-4000024(%rbp), %edx
	leaq	-4000016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	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, -4000020(%rbp)
	jmp	.L16
.L17:
	movl	-4000020(%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, -4000020(%rbp)
.L16:
	cmpl	$0, -4000020(%rbp)
	jg	.L17
	movl	cnt(%rip), %edx
	movl	G(%rip), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -4000020(%rbp)
	jmp	.L18
.L19:
	movl	-4000020(%rbp), %eax
	cltq
	movl	-4000016(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4000020(%rbp)
.L18:
	movl	-4000024(%rbp), %eax
	cmpl	%eax, -4000020(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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:
