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>

typedef struct node_t {
	int val;
	struct node_t *next;
} node;

node* new_node(int val) {
	static int it = 0;
	static node pool[200000];
	pool[it] = (node) { val, NULL };
	return &pool[it++];
}

node* st[1000];

int main(void)
{
	int n, q, com, t, x;
	node *tmp;
	scanf("%d%d", &n, &q);
	while (q--) {
		scanf("%d%d", &com, &t);
		if (com == 0) {
			scanf("%d", &x);
			tmp = new_node(x);
			tmp->next = st[t];
			st[t] = tmp;
		}
		else if (com == 1) {
			if (st[t]) printf("%d\n", st[t]->val);
		}
		else {
			if (st[t]) st[t] = st[t]->next;
		}
	}
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	new_node
	.type	new_node, @function
new_node:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	it.1(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rsi
	salq	$4, %rsi
	leaq	pool.0(%rip), %rcx
	movl	-20(%rbp), %edx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+pool.0(%rip), %rax
	movq	$0, (%rdx,%rax)
	movl	it.1(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, it.1(%rip)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	pool.0(%rip), %rax
	addq	%rdx, %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	new_node, .-new_node
	.globl	st
	.bss
	.align 32
	.type	st, @object
	.size	st, 8000
st:
	.zero	8000
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L4
.L7:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	new_node
	movq	%rax, -16(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, 8(%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	st(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	jmp	.L4
.L5:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L4
.L6:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-24(%rbp), %edx
	movq	8(%rax), %rax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	st(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L4:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -32(%rbp)
	testl	%eax, %eax
	jne	.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
.LFE1:
	.size	main, .-main
	.local	it.1
	.comm	it.1,4,4
	.local	pool.0
	.comm	pool.0,3200000,32
	.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	new_node
	.type	new_node, @function
new_node:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	it.1(%rip), %rcx
	leaq	pool.0(%rip), %rax
	movq	%rcx, %rdx
	salq	$4, %rcx
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edi, (%rax)
	movq	$0, 8(%rax)
	movl	%edx, it.1(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	new_node, .-new_node
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rsp)
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	st(%rip), %rbx
	leaq	20(%rsp), %r15
	leaq	.LC1(%rip), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	16(%rsp), %rcx
	movq	(%rbx,%rcx,8), %rdx
	cmpl	$1, %eax
	je	.L22
	testq	%rdx, %rdx
	je	.L6
	movq	8(%rdx), %rax
	movq	%rax, (%rbx,%rcx,8)
.L6:
	movl	8(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rsp)
	testl	%eax, %eax
	je	.L8
.L4:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L5
	movq	%r14, %rdi
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movslq	it.1(%rip), %rax
	movl	20(%rsp), %ecx
	leaq	pool.0(%rip), %rdi
	movq	%rax, %rdx
	salq	$4, %rax
	addl	$1, %edx
	addq	%rdi, %rax
	movl	%edx, it.1(%rip)
	movslq	16(%rsp), %rdx
	movl	%ecx, (%rax)
	movq	(%rbx,%rdx,8), %rcx
	movq	%rax, (%rbx,%rdx,8)
	movq	%rcx, 8(%rax)
	movl	8(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rsp)
	testl	%eax, %eax
	jne	.L4
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L22:
	.cfi_restore_state
	testq	%rdx, %rdx
	je	.L6
	movl	(%rdx), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	pool.0
	.comm	pool.0,3200000,32
	.local	it.1
	.comm	it.1,4,4
	.globl	st
	.bss
	.align 32
	.type	st, @object
	.size	st, 8000
st:
	.zero	8000
	.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	new_node
	.type	new_node, @function
new_node:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	it.1(%rip), %rcx
	leaq	pool.0(%rip), %rax
	movq	%rcx, %rdx
	salq	$4, %rcx
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edi, (%rax)
	movq	$0, 8(%rax)
	movl	%edx, it.1(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	new_node, .-new_node
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rsp)
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	st(%rip), %rbx
	leaq	20(%rsp), %r15
	leaq	.LC1(%rip), %r14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	16(%rsp), %rcx
	movq	(%rbx,%rcx,8), %rdx
	cmpl	$1, %eax
	je	.L22
	testq	%rdx, %rdx
	je	.L6
	movq	8(%rdx), %rax
	movq	%rax, (%rbx,%rcx,8)
.L6:
	movl	8(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rsp)
	testl	%eax, %eax
	je	.L8
.L4:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jne	.L5
	movq	%r14, %rdi
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movslq	it.1(%rip), %rax
	movl	20(%rsp), %ecx
	leaq	pool.0(%rip), %rdi
	movq	%rax, %rdx
	salq	$4, %rax
	addl	$1, %edx
	addq	%rdi, %rax
	movl	%edx, it.1(%rip)
	movslq	16(%rsp), %rdx
	movl	%ecx, (%rax)
	movq	(%rbx,%rdx,8), %rcx
	movq	%rax, (%rbx,%rdx,8)
	movq	%rcx, 8(%rax)
	movl	8(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 8(%rsp)
	testl	%eax, %eax
	jne	.L4
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L22:
	.cfi_restore_state
	testq	%rdx, %rdx
	je	.L6
	movl	(%rdx), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	pool.0
	.comm	pool.0,3200000,32
	.local	it.1
	.comm	it.1,4,4
	.globl	st
	.bss
	.align 32
	.type	st, @object
	.size	st, 8000
st:
	.zero	8000
	.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>

typedef struct node_t {
	int val;
	struct node_t *next;
} node;

node* new_node(int val) {
	static int it = 0;
	static node pool[200000];
	pool[it] = (node) { val, NULL };
	return &pool[it++];
}

node* st[1000];

int main(void)
{
	int n, q, com, t, x;
	node *tmp;
	scanf("%d%d", &n, &q);
	while (q--) {
		scanf("%d%d", &com, &t);
		if (com == 0) {
			scanf("%d", &x);
			tmp = new_node(x);
			tmp->next = st[t];
			st[t] = tmp;
		}
		else if (com == 1) {
			if (st[t]) printf("%d\n", st[t]->val);
		}
		else {
			if (st[t]) st[t] = st[t]->next;
		}
	}
	return 0;
}


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

3
5
2
 5
4
3
 5
2
 4
3
 9
2
 6
5
2
 5
4
1
 9
1
1
 6
5
2
2
2
2
 9
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>

typedef struct node_t {
	int val;
	struct node_t *next;
} node;

node* new_node(int val) {
	static int it = 0;
	static node pool[200000];
	pool[it] = (node) { val, NULL };
	return &pool[it++];
}

node* st[1000];

int main(void)
{
	int n, q, com, t, x;
	node *tmp;
	scanf("%d%d", &n, &q);
	while (q--) {
		scanf("%d%d", &com, &t);
		if (com == 0) {
			scanf("%d", &x);
			tmp = new_node(x);
			tmp->next = st[t];
			st[t] = tmp;
		}
		else if (com == 1) {
			if (st[t]) printf("%d\n", st[t]->val);
		}
		else {
			if (st[t]) st[t] = st[t]->next;
		}
	}
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	new_node
	.type	new_node, @function
new_node:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	it.1(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rsi
	salq	$4, %rsi
	leaq	pool.0(%rip), %rcx
	movl	-20(%rbp), %edx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+pool.0(%rip), %rax
	movq	$0, (%rdx,%rax)
	movl	it.1(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, it.1(%rip)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	pool.0(%rip), %rax
	addq	%rdx, %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	new_node, .-new_node
	.globl	st
	.bss
	.align 32
	.type	st, @object
	.size	st, 8000
st:
	.zero	8000
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L4
.L7:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	new_node
	movq	%rax, -16(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, 8(%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	st(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	jmp	.L4
.L5:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L4
.L6:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-24(%rbp), %edx
	movq	8(%rax), %rax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	st(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L4:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -32(%rbp)
	testl	%eax, %eax
	jne	.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
.LFE1:
	.size	main, .-main
	.local	it.1
	.comm	it.1,4,4
	.local	pool.0
	.comm	pool.0,3200000,32
	.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	new_node
	.type	new_node, @function
new_node:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	it.1(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rsi
	salq	$4, %rsi
	leaq	pool.0(%rip), %rcx
	movl	-20(%rbp), %edx
	movl	%edx, (%rsi,%rcx)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+pool.0(%rip), %rax
	movq	$0, (%rdx,%rax)
	movl	it.1(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, it.1(%rip)
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	pool.0(%rip), %rax
	addq	%rdx, %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	new_node, .-new_node
	.globl	st
	.bss
	.align 32
	.type	st, @object
	.size	st, 8000
st:
	.zero	8000
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L4
.L7:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	new_node
	movq	%rax, -16(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, 8(%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	st(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	jmp	.L4
.L5:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L4
.L6:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	st(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-24(%rbp), %edx
	movq	8(%rax), %rax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	st(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L4:
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -32(%rbp)
	testl	%eax, %eax
	jne	.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
.LFE1:
	.size	main, .-main
	.local	it.1
	.comm	it.1,4,4
	.local	pool.0
	.comm	pool.0,3200000,32
	.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:
