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>
#include<stdlib.h>
typedef struct node
{
  int id;
  struct node *next;
} *nodePointer;
nodePointer *headArr;
nodePointer *tailArr;
void pushBack(int,int);
void dump(int);
void clear(int);
nodePointer make1node(int);
void init(int);
int main(void)
{
  int i;
  int n,q;
  int x1,x2,x3;
  scanf("%d",&n);
  init(n);
  scanf("%d",&q);
  for(i=0;i<q;i++)
    {
      scanf("%d",&x1);
      switch(x1)
        {
        case 0:
          scanf("%d%d",&x2,&x3);
          pushBack(x2,x3);
          break;
        case 1:
          scanf("%d",&x2);
          dump(x2);
          break;
        case 2:
          scanf("%d",&x2);
          clear(x2);
          break;
        }
    }
  return 0;
}
void pushBack(int t,int x)
{
  nodePointer p=make1node(x);
  if(headArr[t]==NULL)
    {
      headArr[t]=p;
      tailArr[t]=p;
    }
  else
    {
      tailArr[t]->next=p;
      tailArr[t]=p;
    }
}
void dump(int t)
{
  nodePointer p;
  for(p=headArr[t];p!=NULL;p=p->next)
    {
      printf("%d",p->id);
      if(p->next!=NULL) printf(" ");
    }
  printf("\n");
}
void clear(int t)
{
  headArr[t]=NULL;
  tailArr[t]=NULL;
}
nodePointer make1node(int x)
{
  nodePointer p=(nodePointer)malloc(sizeof(struct node));
  p->id=x;
  p->next=NULL;
  return p;
}
void init(int n)
{
  int i;
  headArr=(nodePointer*)malloc(sizeof(nodePointer)*n);
  for(i=0;i<n;i++) headArr[i]=NULL;
  tailArr=(nodePointer*)malloc(sizeof(nodePointer)*n);
  for(i=0;i<n;i++) tailArr[i]=NULL;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	headArr
	.bss
	.align 8
	.type	headArr, @object
	.size	headArr, 8
headArr:
	.zero	8
	.globl	tailArr
	.align 8
	.type	tailArr, @object
	.size	tailArr, 8
tailArr:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	init
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cmpl	$2, %eax
	je	.L3
	cmpl	$2, %eax
	jg	.L4
	testl	%eax, %eax
	je	.L5
	cmpl	$1, %eax
	je	.L6
	jmp	.L4
.L5:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	pushBack
	jmp	.L4
.L6:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	dump
	jmp	.L4
.L3:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	clear
	nop
.L4:
	addl	$1, -12(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	make1node
	movq	%rax, -8(%rbp)
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L11
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L13
.L11:
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pushBack, .-pushBack
	.globl	dump
	.type	dump, @function
dump:
.LFB8:
	.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
	movl	%edi, -20(%rbp)
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L15
.L17:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	.L16
	movl	$32, %edi
	call	putchar@PLT
.L16:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L15:
	cmpq	$0, -8(%rbp)
	jne	.L17
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dump, .-dump
	.globl	clear
	.type	clear, @function
clear:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movq	headArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	movq	tailArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	clear, .-clear
	.globl	make1node
	.type	make1node, @function
make1node:
.LFB10:
	.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
	movl	%edi, -20(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movq	$0, 8(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	make1node, .-make1node
	.globl	init
	.type	init, @function
init:
.LFB11:
	.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
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, headArr(%rip)
	movl	$0, -4(%rbp)
	jmp	.L22
.L23:
	movq	headArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	addl	$1, -4(%rbp)
.L22:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L23
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, tailArr(%rip)
	movl	$0, -4(%rbp)
	jmp	.L24
.L25:
	movq	tailArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	addl	$1, -4(%rbp)
.L24:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	init, .-init
	.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	pushBack
	.type	pushBack, @function
pushBack:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	movl	$16, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	movq	headArr(%rip), %rdx
	movslq	%ebx, %rdi
	salq	$3, %rdi
	movq	$0, 8(%rax)
	addq	%rdi, %rdx
	addq	tailArr(%rip), %rdi
	movl	%ebp, (%rax)
	cmpq	$0, (%rdx)
	je	.L6
	movq	(%rdi), %rdx
	movq	%rax, 8(%rdx)
	movq	%rax, (%rdi)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movq	%rax, (%rdx)
	movq	%rax, (%rdi)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	pushBack, .-pushBack
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movslq	%edi, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movq	headArr(%rip), %rax
	movq	(%rax,%rdi,8), %rbx
	testq	%rbx, %rbx
	je	.L8
	leaq	.LC0(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	movl	$32, %edi
	call	putchar@PLT
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L8
.L9:
	movl	(%rbx), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	$0, 8(%rbx)
	jne	.L15
.L8:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movl	$10, %edi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	putchar@PLT
	.cfi_endproc
.LFE41:
	.size	dump, .-dump
	.p2align 4
	.globl	clear
	.type	clear, @function
clear:
.LFB42:
	.cfi_startproc
	endbr64
	movq	headArr(%rip), %rax
	movslq	%edi, %rdi
	movq	$0, (%rax,%rdi,8)
	movq	tailArr(%rip), %rax
	movq	$0, (%rax,%rdi,8)
	ret
	.cfi_endproc
.LFE42:
	.size	clear, .-clear
	.p2align 4
	.globl	make1node
	.type	make1node, @function
make1node:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	movl	$16, %edi
	call	malloc@PLT
	movl	%ebx, (%rax)
	movq	$0, 8(%rax)
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE43:
	.size	make1node, .-make1node
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	%edi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%r12, %rbx
	salq	$3, %r12
	movq	%r12, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	movq	%rax, headArr(%rip)
	testl	%ebx, %ebx
	jle	.L20
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%rax, tailArr(%rip)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%rax, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	memset@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%rax, tailArr(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE44:
	.size	init, .-init
	.section	.rodata.str1.1
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	call	init
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L24
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r14
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L40:
	testl	%eax, %eax
	je	.L39
.L27:
	addl	$1, %r12d
	cmpl	%r12d, 8(%rsp)
	jle	.L24
.L31:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L25
	cmpl	$2, %eax
	jne	.L40
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movq	headArr(%rip), %rdx
	movslq	16(%rsp), %rax
	movq	$0, (%rdx,%rax,8)
	movq	tailArr(%rip), %rdx
	movq	$0, (%rdx,%rax,8)
	cmpl	%r12d, 8(%rsp)
	jg	.L31
.L24:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movq	headArr(%rip), %rax
	movq	(%rax,%rdx,8), %rbx
	testq	%rbx, %rbx
	jne	.L30
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L42:
	movl	$32, %edi
	call	putchar@PLT
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L29
.L30:
	movl	(%rbx), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	$0, 8(%rbx)
	jne	.L42
.L29:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L39:
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rbx
	movl	$16, %edi
	movl	20(%rsp), %r15d
	call	malloc@PLT
	movq	headArr(%rip), %rcx
	leaq	0(,%rbx,8), %rdx
	movq	$0, 8(%rax)
	addq	%rdx, %rcx
	movl	%r15d, (%rax)
	cmpq	$0, (%rcx)
	je	.L43
	addq	tailArr(%rip), %rdx
	movq	(%rdx), %rcx
	movq	%rax, 8(%rcx)
	movq	%rax, (%rdx)
	jmp	.L27
.L43:
	movq	tailArr(%rip), %rdx
	movq	%rax, (%rcx)
	movq	%rax, (%rdx,%rbx,8)
	jmp	.L27
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	tailArr
	.bss
	.align 8
	.type	tailArr, @object
	.size	tailArr, 8
tailArr:
	.zero	8
	.globl	headArr
	.align 8
	.type	headArr, @object
	.size	headArr, 8
headArr:
	.zero	8
	.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	pushBack
	.type	pushBack, @function
pushBack:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	movl	$16, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	movq	headArr(%rip), %rdx
	movslq	%ebx, %rdi
	salq	$3, %rdi
	movq	$0, 8(%rax)
	addq	%rdi, %rdx
	addq	tailArr(%rip), %rdi
	movl	%ebp, (%rax)
	cmpq	$0, (%rdx)
	je	.L6
	movq	(%rdi), %rdx
	movq	%rax, 8(%rdx)
	movq	%rax, (%rdi)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movq	%rax, (%rdx)
	movq	%rax, (%rdi)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	pushBack, .-pushBack
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movslq	%edi, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movq	headArr(%rip), %rax
	movq	(%rax,%rdi,8), %rbx
	testq	%rbx, %rbx
	je	.L8
	leaq	.LC0(%rip), %rbp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	movl	$32, %edi
	call	putchar@PLT
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L8
.L9:
	movl	(%rbx), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	$0, 8(%rbx)
	jne	.L15
.L8:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movl	$10, %edi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	putchar@PLT
	.cfi_endproc
.LFE41:
	.size	dump, .-dump
	.p2align 4
	.globl	clear
	.type	clear, @function
clear:
.LFB42:
	.cfi_startproc
	endbr64
	movq	headArr(%rip), %rax
	movslq	%edi, %rdi
	movq	$0, (%rax,%rdi,8)
	movq	tailArr(%rip), %rax
	movq	$0, (%rax,%rdi,8)
	ret
	.cfi_endproc
.LFE42:
	.size	clear, .-clear
	.p2align 4
	.globl	make1node
	.type	make1node, @function
make1node:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	movl	$16, %edi
	call	malloc@PLT
	movl	%ebx, (%rax)
	movq	$0, 8(%rax)
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE43:
	.size	make1node, .-make1node
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	%edi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%r12, %rbx
	salq	$3, %r12
	movq	%r12, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	movq	%rax, headArr(%rip)
	testl	%ebx, %ebx
	jle	.L20
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%r12, %rdx
	xorl	%esi, %esi
	movq	%rax, tailArr(%rip)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%rax, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	memset@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%rax, tailArr(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE44:
	.size	init, .-init
	.section	.rodata.str1.1
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	call	init
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L24
	xorl	%r12d, %r12d
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r14
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L40:
	testl	%eax, %eax
	je	.L39
.L27:
	addl	$1, %r12d
	cmpl	%r12d, 8(%rsp)
	jle	.L24
.L31:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L25
	cmpl	$2, %eax
	jne	.L40
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movq	headArr(%rip), %rdx
	movslq	16(%rsp), %rax
	movq	$0, (%rdx,%rax,8)
	movq	tailArr(%rip), %rdx
	movq	$0, (%rdx,%rax,8)
	cmpl	%r12d, 8(%rsp)
	jg	.L31
.L24:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movq	headArr(%rip), %rax
	movq	(%rax,%rdx,8), %rbx
	testq	%rbx, %rbx
	jne	.L30
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L42:
	movl	$32, %edi
	call	putchar@PLT
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L29
.L30:
	movl	(%rbx), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	$0, 8(%rbx)
	jne	.L42
.L29:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L39:
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rbx
	movl	$16, %edi
	movl	20(%rsp), %r15d
	call	malloc@PLT
	movq	headArr(%rip), %rcx
	leaq	0(,%rbx,8), %rdx
	movq	$0, 8(%rax)
	addq	%rdx, %rcx
	movl	%r15d, (%rax)
	cmpq	$0, (%rcx)
	je	.L43
	addq	tailArr(%rip), %rdx
	movq	(%rdx), %rcx
	movq	%rax, 8(%rcx)
	movq	%rax, (%rdx)
	jmp	.L27
.L43:
	movq	tailArr(%rip), %rdx
	movq	%rax, (%rcx)
	movq	%rax, (%rdx,%rbx,8)
	jmp	.L27
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	tailArr
	.bss
	.align 8
	.type	tailArr, @object
	.size	tailArr, 8
tailArr:
	.zero	8
	.globl	headArr
	.align 8
	.type	headArr, @object
	.size	headArr, 8
headArr:
	.zero	8
	.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>
#include<stdlib.h>
typedef struct node
{
  int id;
  struct node *next;
} *nodePointer;
nodePointer *headArr;
nodePointer *tailArr;
void pushBack(int,int);
void dump(int);
void clear(int);
nodePointer make1node(int);
void init(int);
int main(void)
{
  int i;
  int n,q;
  int x1,x2,x3;
  scanf("%d",&n);
  init(n);
  scanf("%d",&q);
  for(i=0;i<q;i++)
    {
      scanf("%d",&x1);
      switch(x1)
        {
        case 0:
          scanf("%d%d",&x2,&x3);
          pushBack(x2,x3);
          break;
        case 1:
          scanf("%d",&x2);
          dump(x2);
          break;
        case 2:
          scanf("%d",&x2);
          clear(x2);
          break;
        }
    }
  return 0;
}
void pushBack(int t,int x)
{
  nodePointer p=make1node(x);
  if(headArr[t]==NULL)
    {
      headArr[t]=p;
      tailArr[t]=p;
    }
  else
    {
      tailArr[t]->next=p;
      tailArr[t]=p;
    }
}
void dump(int t)
{
  nodePointer p;
  for(p=headArr[t];p!=NULL;p=p->next)
    {
      printf("%d",p->id);
      if(p->next!=NULL) printf(" ");
    }
  printf("\n");
}
void clear(int t)
{
  headArr[t]=NULL;
  tailArr[t]=NULL;
}
nodePointer make1node(int x)
{
  nodePointer p=(nodePointer)malloc(sizeof(struct node));
  p->id=x;
  p->next=NULL;
  return p;
}
void init(int n)
{
  int i;
  headArr=(nodePointer*)malloc(sizeof(nodePointer)*n);
  for(i=0;i<n;i++) headArr[i]=NULL;
  tailArr=(nodePointer*)malloc(sizeof(nodePointer)*n);
  for(i=0;i<n;i++) tailArr[i]=NULL;
}

3 13
0 0 1
0 0 3
0 0 3
0 1 -1
0 2 4
0 2 5
1 0
1 1
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 2
0 0 3
0 1 0
0 2 4
0 2 5
1 0
1 1
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 3
0 0 3
0 1 -1
0 2 4
0 2 5
1 1
1 1
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 2
0 0 3
0 1 0
0 0 4
0 2 5
1 0
1 1
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 1 2
0 0 3
0 1 -1
0 2 4
0 2 5
1 0
1 1
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 3
0 0 3
0 1 -1
0 2 4
0 2 5
1 0
2 1
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 3
0 0 3
0 1 -1
0 2 4
0 2 5
1 1
1 0
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 2
0 0 3
0 1 0
0 0 4
0 2 5
1 0
1 1
1 2
2 1
1 0
0 1
1 2
 3 13
0 0 1
0 0 3
0 0 3
0 1 -1
0 2 4
0 2 5
1 0
2 0
1 2
2 1
1 0
1 1
1 2
 3 13
0 0 1
0 0 2
0 0 4
0 1 0
0 0 4
0 2 5
1 0
1 1
1 2
2 1
1 0
0 1
1 2

1 3 3
-1
4 5
1 3 3

4 5
 1 2 3
0
4 5
1 2 3

4 5
 -1
-1
4 5
1 3 3

4 5
 1 2 3 4
0
5
1 2 3 4

5
 1 3
2 -1
4 5
1 3

4 5
 1 3 3
4 5
1 3 3

4 5
 -1
1 3 3
4 5
1 3 3

4 5
 1 2 3 4
0
5
1 2 3 4
 1 3 3
4 5


4 5
 1 2 4 4
0
5
1 2 4 4

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>
#include<stdlib.h>
typedef struct node
{
  int id;
  struct node *next;
} *nodePointer;
nodePointer *headArr;
nodePointer *tailArr;
void pushBack(int,int);
void dump(int);
void clear(int);
nodePointer make1node(int);
void init(int);
int main(void)
{
  int i;
  int n,q;
  int x1,x2,x3;
  scanf("%d",&n);
  init(n);
  scanf("%d",&q);
  for(i=0;i<q;i++)
    {
      scanf("%d",&x1);
      switch(x1)
        {
        case 0:
          scanf("%d%d",&x2,&x3);
          pushBack(x2,x3);
          break;
        case 1:
          scanf("%d",&x2);
          dump(x2);
          break;
        case 2:
          scanf("%d",&x2);
          clear(x2);
          break;
        }
    }
  return 0;
}
void pushBack(int t,int x)
{
  nodePointer p=make1node(x);
  if(headArr[t]==NULL)
    {
      headArr[t]=p;
      tailArr[t]=p;
    }
  else
    {
      tailArr[t]->next=p;
      tailArr[t]=p;
    }
}
void dump(int t)
{
  nodePointer p;
  for(p=headArr[t];p!=NULL;p=p->next)
    {
      printf("%d",p->id);
      if(p->next!=NULL) printf(" ");
    }
  printf("\n");
}
void clear(int t)
{
  headArr[t]=NULL;
  tailArr[t]=NULL;
}
nodePointer make1node(int x)
{
  nodePointer p=(nodePointer)malloc(sizeof(struct node));
  p->id=x;
  p->next=NULL;
  return p;
}
void init(int n)
{
  int i;
  headArr=(nodePointer*)malloc(sizeof(nodePointer)*n);
  for(i=0;i<n;i++) headArr[i]=NULL;
  tailArr=(nodePointer*)malloc(sizeof(nodePointer)*n);
  for(i=0;i<n;i++) tailArr[i]=NULL;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	headArr
	.bss
	.align 8
	.type	headArr, @object
	.size	headArr, 8
headArr:
	.zero	8
	.globl	tailArr
	.align 8
	.type	tailArr, @object
	.size	tailArr, 8
tailArr:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	init
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cmpl	$2, %eax
	je	.L3
	cmpl	$2, %eax
	jg	.L4
	testl	%eax, %eax
	je	.L5
	cmpl	$1, %eax
	je	.L6
	jmp	.L4
.L5:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	pushBack
	jmp	.L4
.L6:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	dump
	jmp	.L4
.L3:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	clear
	nop
.L4:
	addl	$1, -12(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	make1node
	movq	%rax, -8(%rbp)
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L11
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L13
.L11:
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pushBack, .-pushBack
	.globl	dump
	.type	dump, @function
dump:
.LFB8:
	.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
	movl	%edi, -20(%rbp)
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L15
.L17:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	.L16
	movl	$32, %edi
	call	putchar@PLT
.L16:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L15:
	cmpq	$0, -8(%rbp)
	jne	.L17
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dump, .-dump
	.globl	clear
	.type	clear, @function
clear:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movq	headArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	movq	tailArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	clear, .-clear
	.globl	make1node
	.type	make1node, @function
make1node:
.LFB10:
	.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
	movl	%edi, -20(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movq	$0, 8(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	make1node, .-make1node
	.globl	init
	.type	init, @function
init:
.LFB11:
	.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
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, headArr(%rip)
	movl	$0, -4(%rbp)
	jmp	.L22
.L23:
	movq	headArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	addl	$1, -4(%rbp)
.L22:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L23
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, tailArr(%rip)
	movl	$0, -4(%rbp)
	jmp	.L24
.L25:
	movq	tailArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	addl	$1, -4(%rbp)
.L24:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	init, .-init
	.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	headArr
	.bss
	.align 8
	.type	headArr, @object
	.size	headArr, 8
headArr:
	.zero	8
	.globl	tailArr
	.align 8
	.type	tailArr, @object
	.size	tailArr, 8
tailArr:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	init
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cmpl	$2, %eax
	je	.L3
	cmpl	$2, %eax
	jg	.L4
	testl	%eax, %eax
	je	.L5
	cmpl	$1, %eax
	je	.L6
	jmp	.L4
.L5:
	leaq	-16(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	pushBack
	jmp	.L4
.L6:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	dump
	jmp	.L4
.L3:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	clear
	nop
.L4:
	addl	$1, -12(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	make1node
	movq	%rax, -8(%rbp)
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L11
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L13
.L11:
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
	movq	tailArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pushBack, .-pushBack
	.globl	dump
	.type	dump, @function
dump:
.LFB8:
	.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
	movl	%edi, -20(%rbp)
	movq	headArr(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L15
.L17:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	.L16
	movl	$32, %edi
	call	putchar@PLT
.L16:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L15:
	cmpq	$0, -8(%rbp)
	jne	.L17
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dump, .-dump
	.globl	clear
	.type	clear, @function
clear:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movq	headArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	movq	tailArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	clear, .-clear
	.globl	make1node
	.type	make1node, @function
make1node:
.LFB10:
	.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
	movl	%edi, -20(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movq	$0, 8(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	make1node, .-make1node
	.globl	init
	.type	init, @function
init:
.LFB11:
	.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
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, headArr(%rip)
	movl	$0, -4(%rbp)
	jmp	.L22
.L23:
	movq	headArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	addl	$1, -4(%rbp)
.L22:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L23
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, tailArr(%rip)
	movl	$0, -4(%rbp)
	jmp	.L24
.L25:
	movq	tailArr(%rip), %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	addl	$1, -4(%rbp)
.L24:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L25
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	init, .-init
	.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:
