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 Adj[101][101],n,discover[101];
char color[101];
int Que[100],element_en,element_de;


void Bfs_initialization(){
  int i;
  for(i=1;i<=n;i++){
    discover[i]=-1;
    color[i]='w';
  }
  color[1]='g';
  discover[1]=0;
  
  element_en=0;
  element_de=0;
}

void Bfs_print(){
  int i;
  for(i=1;i<=n;i++)
    printf("%d %d\n",i,discover[i]);
}

int Empty(){
  if(element_en-element_de==0)
    return 1;
  return 0;
}

void Enqueue(int key){
  Que[element_en]=key;
  element_en++;
}

int Dequeue(){
  return Que[element_de++];
}

void Bfs_function(){
  int now,i;
  Bfs_initialization();

  Enqueue(1);
  while(Empty()!=1){
    now=Dequeue();

    i=1;
    while(i<=n){
      if(Adj[now][i]==0 || discover[i]!=-1){
	i++;
	continue;
      }
      discover[i]=discover[now]+1;
      Enqueue(i);
      color[i]='g';
      i++;
    }

    color[now]='b';
  }

  Bfs_print();
}

void Initialization(){
  int i,j;
  for(i=1;i<=n;i++)
    for(j=1;j<=n;j++)
      Adj[i][j]=0;
}

int main(){
  int i,j,element,number,key;
  scanf("%d",&n);
  Initialization();

  for(i=0;i<n;i++){
    scanf("%d%d",&element,&number);
    for(j=0;j<number;j++){
      scanf("%d",&key);
      Adj[element][key]=1;
    }
  }

  Bfs_function();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Adj
	.bss
	.align 32
	.type	Adj, @object
	.size	Adj, 40804
Adj:
	.zero	40804
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	discover
	.align 32
	.type	discover, @object
	.size	discover, 404
discover:
	.zero	404
	.globl	color
	.align 32
	.type	color, @object
	.size	color, 101
color:
	.zero	101
	.globl	Que
	.align 32
	.type	Que, @object
	.size	Que, 400
Que:
	.zero	400
	.globl	element_en
	.align 4
	.type	element_en, @object
	.size	element_en, 4
element_en:
	.zero	4
	.globl	element_de
	.align 4
	.type	element_de, @object
	.size	element_de, 4
element_de:
	.zero	4
	.text
	.globl	Bfs_initialization
	.type	Bfs_initialization, @function
Bfs_initialization:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$119, (%rax,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movb	$103, 1+color(%rip)
	movl	$0, 4+discover(%rip)
	movl	$0, element_en(%rip)
	movl	$0, element_de(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Bfs_initialization, .-Bfs_initialization
	.section	.rodata
.LC0:
	.string	"%d %d\n"
	.text
	.globl	Bfs_print
	.type	Bfs_print, @function
Bfs_print:
.LFB1:
	.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
	movl	$1, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L6
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Bfs_print, .-Bfs_print
	.globl	Empty
	.type	Empty, @function
Empty:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	element_en(%rip), %edx
	movl	element_de(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	Empty, .-Empty
	.globl	Enqueue
	.type	Enqueue, @function
Enqueue:
.LFB3:
	.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)
	movl	element_en(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Que(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	element_en(%rip), %eax
	addl	$1, %eax
	movl	%eax, element_en(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Enqueue, .-Enqueue
	.globl	Dequeue
	.type	Dequeue, @function
Dequeue:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	element_de(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, element_de(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Que(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Dequeue, .-Dequeue
	.globl	Bfs_function
	.type	Bfs_function, @function
Bfs_function:
.LFB5:
	.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
	movl	$0, %eax
	call	Bfs_initialization
	movl	$1, %edi
	call	Enqueue
	jmp	.L14
.L19:
	movl	$0, %eax
	call	Dequeue
	movl	%eax, -4(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L15
.L18:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L17
.L16:
	addl	$1, -8(%rbp)
	jmp	.L15
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	Enqueue
	movl	-8(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$103, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L18
	movl	-4(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$98, (%rax,%rdx)
.L14:
	movl	$0, %eax
	call	Empty
	cmpl	$1, %eax
	jne	.L19
	movl	$0, %eax
	call	Bfs_print
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	Bfs_function, .-Bfs_function
	.globl	Initialization
	.type	Initialization, @function
Initialization:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$1, -8(%rbp)
	jmp	.L21
.L24:
	movl	$1, -4(%rbp)
	jmp	.L22
.L23:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L23
	addl	$1, -8(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L24
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Initialization, .-Initialization
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	Initialization
	movl	$0, -16(%rbp)
	jmp	.L26
.L29:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L27
.L28:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L27:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L28
	addl	$1, -16(%rbp)
.L26:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L29
	movl	$0, %eax
	call	Bfs_function
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	Bfs_initialization
	.type	Bfs_initialization, @function
Bfs_initialization:
.LFB23:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	testl	%eax, %eax
	jle	.L2
	movslq	%eax, %r12
	movl	$255, %esi
	leaq	4+discover(%rip), %rdi
	leaq	0(,%r12,4), %rdx
	call	memset@PLT
	movq	%r12, %rdx
	movl	$119, %esi
	leaq	1+color(%rip), %rdi
	call	memset@PLT
.L2:
	movb	$103, 1+color(%rip)
	popq	%r12
	.cfi_def_cfa_offset 8
	movl	$0, 4+discover(%rip)
	movl	$0, element_en(%rip)
	movl	$0, element_de(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	Bfs_initialization, .-Bfs_initialization
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.text
	.p2align 4
	.globl	Bfs_print
	.type	Bfs_print, @function
Bfs_print:
.LFB24:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L10
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	discover(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rbx,4), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, n(%rip)
	jge	.L7
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE24:
	.size	Bfs_print, .-Bfs_print
	.p2align 4
	.globl	Empty
	.type	Empty, @function
Empty:
.LFB25:
	.cfi_startproc
	endbr64
	movl	element_de(%rip), %eax
	cmpl	%eax, element_en(%rip)
	sete	%al
	movzbl	%al, %eax
	ret
	.cfi_endproc
.LFE25:
	.size	Empty, .-Empty
	.p2align 4
	.globl	Enqueue
	.type	Enqueue, @function
Enqueue:
.LFB26:
	.cfi_startproc
	endbr64
	movslq	element_en(%rip), %rcx
	leaq	Que(%rip), %rdx
	movq	%rcx, %rax
	movl	%edi, (%rdx,%rcx,4)
	addl	$1, %eax
	movl	%eax, element_en(%rip)
	ret
	.cfi_endproc
.LFE26:
	.size	Enqueue, .-Enqueue
	.p2align 4
	.globl	Dequeue
	.type	Dequeue, @function
Dequeue:
.LFB27:
	.cfi_startproc
	endbr64
	movslq	element_de(%rip), %rax
	leal	1(%rax), %edx
	movl	%edx, element_de(%rip)
	leaq	Que(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE27:
	.size	Dequeue, .-Dequeue
	.p2align 4
	.globl	Bfs_function
	.type	Bfs_function, @function
Bfs_function:
.LFB28:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	n(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L19
	movslq	%ebp, %r12
	movl	$255, %esi
	leaq	4+discover(%rip), %rdi
	leaq	0(,%r12,4), %rdx
	call	memset@PLT
	movq	%r12, %rdx
	movl	$119, %esi
	leaq	1+color(%rip), %rdi
	call	memset@PLT
.L19:
	movb	$103, 1+color(%rip)
	xorl	%r10d, %r10d
	xorl	%ecx, %ecx
	leal	1(%rbp), %r8d
	movl	$0, 4+discover(%rip)
	movl	$1, %edi
	leaq	Que(%rip), %rbx
	leaq	color(%rip), %r11
	leaq	Adj(%rip), %r13
	leaq	discover(%rip), %rdx
	movl	$1, Que(%rip)
	movl	$1, element_en(%rip)
.L18:
	movslq	(%rbx,%r10,4), %r9
	leal	1(%r10), %r12d
	testl	%ebp, %ebp
	jle	.L25
	imulq	$404, %r9, %rsi
	movl	$1, %eax
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	$0, (%rsi,%rax,4)
	je	.L20
	cmpl	$-1, (%rdx,%rax,4)
	jne	.L20
	movl	(%rdx,%r9,4), %ecx
	movb	$103, (%r11,%rax)
	addl	$1, %ecx
	movl	%ecx, (%rdx,%rax,4)
	movslq	%edi, %rcx
	addl	$1, %edi
	movl	%eax, (%rbx,%rcx,4)
	movl	$1, %ecx
.L20:
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L21
.L25:
	addq	$1, %r10
	movb	$98, (%r11,%r9)
	cmpl	%r10d, %edi
	jne	.L18
	movl	%r12d, element_de(%rip)
	testb	%cl, %cl
	je	.L22
	movl	%edi, element_en(%rip)
.L22:
	movl	$1, %ebx
	leaq	discover(%rip), %r13
	leaq	.LC0(%rip), %r12
	testl	%ebp, %ebp
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L23:
	movl	0(%r13,%rbx,4), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, n(%rip)
	jge	.L23
.L16:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE28:
	.size	Bfs_function, .-Bfs_function
	.p2align 4
	.globl	Initialization
	.type	Initialization, @function
Initialization:
.LFB29:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L41
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leal	-1(%rax), %ebp
	leaq	408+Adj(%rip), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	imulq	$404, %rbp, %rbp
	leaq	404(%rcx), %rdx
	leaq	0(,%rax,4), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	addq	%rdx, %rbp
	.p2align 4,,10
	.p2align 3
.L38:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$404, %rcx
	cmpq	%rbp, %rcx
	jne	.L38
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE29:
	.size	Initialization, .-Initialization
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB30:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	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	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L45
	leal	-1(%rax), %r12d
	leaq	408+Adj(%rip), %rcx
	imulq	$404, %r12, %r12
	leaq	404(%rcx), %rdx
	leaq	0(,%rax,4), %rbx
	addq	%rdx, %r12
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$404, %rcx
	cmpq	%rcx, %r12
	jne	.L46
	leaq	28(%rsp), %rax
	xorl	%r13d, %r13d
	leaq	32(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	Adj(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L48:
	movq	8(%rsp), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %rdi
	leaq	36(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	testl	%eax, %eax
	jle	.L49
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movslq	36(%rsp), %rsi
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rsi, %rax
	movl	$1, (%r12,%rax,4)
	cmpl	%r14d, 32(%rsp)
	jg	.L47
.L49:
	addl	$1, %r13d
	cmpl	%r13d, n(%rip)
	jg	.L48
.L45:
	xorl	%eax, %eax
	call	Bfs_function
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L58
	addq	$56, %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
.L58:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE30:
	.size	main, .-main
	.globl	element_de
	.bss
	.align 4
	.type	element_de, @object
	.size	element_de, 4
element_de:
	.zero	4
	.globl	element_en
	.align 4
	.type	element_en, @object
	.size	element_en, 4
element_en:
	.zero	4
	.globl	Que
	.align 32
	.type	Que, @object
	.size	Que, 400
Que:
	.zero	400
	.globl	color
	.align 32
	.type	color, @object
	.size	color, 101
color:
	.zero	101
	.globl	discover
	.align 32
	.type	discover, @object
	.size	discover, 404
discover:
	.zero	404
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	Adj
	.align 32
	.type	Adj, @object
	.size	Adj, 40804
Adj:
	.zero	40804
	.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	Bfs_initialization
	.type	Bfs_initialization, @function
Bfs_initialization:
.LFB23:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	testl	%eax, %eax
	jle	.L2
	movslq	%eax, %r12
	movl	$255, %esi
	leaq	4+discover(%rip), %rdi
	leaq	0(,%r12,4), %rdx
	call	memset@PLT
	movq	%r12, %rdx
	movl	$119, %esi
	leaq	1+color(%rip), %rdi
	call	memset@PLT
.L2:
	movb	$103, 1+color(%rip)
	popq	%r12
	.cfi_def_cfa_offset 8
	movl	$0, 4+discover(%rip)
	movl	$0, element_en(%rip)
	movl	$0, element_de(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	Bfs_initialization, .-Bfs_initialization
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.text
	.p2align 4
	.globl	Bfs_print
	.type	Bfs_print, @function
Bfs_print:
.LFB24:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L10
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	discover(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r12,%rbx,4), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, n(%rip)
	jge	.L7
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE24:
	.size	Bfs_print, .-Bfs_print
	.p2align 4
	.globl	Empty
	.type	Empty, @function
Empty:
.LFB25:
	.cfi_startproc
	endbr64
	movl	element_de(%rip), %eax
	cmpl	%eax, element_en(%rip)
	sete	%al
	movzbl	%al, %eax
	ret
	.cfi_endproc
.LFE25:
	.size	Empty, .-Empty
	.p2align 4
	.globl	Enqueue
	.type	Enqueue, @function
Enqueue:
.LFB26:
	.cfi_startproc
	endbr64
	movslq	element_en(%rip), %rcx
	leaq	Que(%rip), %rdx
	movq	%rcx, %rax
	movl	%edi, (%rdx,%rcx,4)
	addl	$1, %eax
	movl	%eax, element_en(%rip)
	ret
	.cfi_endproc
.LFE26:
	.size	Enqueue, .-Enqueue
	.p2align 4
	.globl	Dequeue
	.type	Dequeue, @function
Dequeue:
.LFB27:
	.cfi_startproc
	endbr64
	movslq	element_de(%rip), %rax
	leal	1(%rax), %edx
	movl	%edx, element_de(%rip)
	leaq	Que(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE27:
	.size	Dequeue, .-Dequeue
	.p2align 4
	.globl	Bfs_function
	.type	Bfs_function, @function
Bfs_function:
.LFB28:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	n(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L19
	movslq	%ebp, %r12
	movl	$255, %esi
	leaq	4+discover(%rip), %rdi
	leaq	0(,%r12,4), %rdx
	call	memset@PLT
	movq	%r12, %rdx
	movl	$119, %esi
	leaq	1+color(%rip), %rdi
	call	memset@PLT
.L19:
	movb	$103, 1+color(%rip)
	xorl	%r10d, %r10d
	xorl	%ecx, %ecx
	leal	1(%rbp), %r8d
	movl	$0, 4+discover(%rip)
	movl	$1, %edi
	leaq	Que(%rip), %rbx
	leaq	color(%rip), %r11
	leaq	Adj(%rip), %r13
	leaq	discover(%rip), %rdx
	movl	$1, Que(%rip)
	movl	$1, element_en(%rip)
.L18:
	movslq	(%rbx,%r10,4), %r9
	leal	1(%r10), %r12d
	testl	%ebp, %ebp
	jle	.L25
	imulq	$404, %r9, %rsi
	movl	$1, %eax
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L21:
	cmpl	$0, (%rsi,%rax,4)
	je	.L20
	cmpl	$-1, (%rdx,%rax,4)
	jne	.L20
	movl	(%rdx,%r9,4), %ecx
	movb	$103, (%r11,%rax)
	addl	$1, %ecx
	movl	%ecx, (%rdx,%rax,4)
	movslq	%edi, %rcx
	addl	$1, %edi
	movl	%eax, (%rbx,%rcx,4)
	movl	$1, %ecx
.L20:
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L21
.L25:
	addq	$1, %r10
	movb	$98, (%r11,%r9)
	cmpl	%r10d, %edi
	jne	.L18
	movl	%r12d, element_de(%rip)
	testb	%cl, %cl
	je	.L22
	movl	%edi, element_en(%rip)
.L22:
	movl	$1, %ebx
	leaq	discover(%rip), %r13
	leaq	.LC0(%rip), %r12
	testl	%ebp, %ebp
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L23:
	movl	0(%r13,%rbx,4), %ecx
	movl	%ebx, %edx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, n(%rip)
	jge	.L23
.L16:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE28:
	.size	Bfs_function, .-Bfs_function
	.p2align 4
	.globl	Initialization
	.type	Initialization, @function
Initialization:
.LFB29:
	.cfi_startproc
	endbr64
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L41
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leal	-1(%rax), %ebp
	leaq	408+Adj(%rip), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	imulq	$404, %rbp, %rbp
	leaq	404(%rcx), %rdx
	leaq	0(,%rax,4), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	addq	%rdx, %rbp
	.p2align 4,,10
	.p2align 3
.L38:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$404, %rcx
	cmpq	%rbp, %rcx
	jne	.L38
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE29:
	.size	Initialization, .-Initialization
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB30:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	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	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L45
	leal	-1(%rax), %r12d
	leaq	408+Adj(%rip), %rcx
	imulq	$404, %r12, %r12
	leaq	404(%rcx), %rdx
	leaq	0(,%rax,4), %rbx
	addq	%rdx, %r12
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rcx, %rdi
	movq	%rbx, %rdx
	xorl	%esi, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$404, %rcx
	cmpq	%rcx, %r12
	jne	.L46
	leaq	28(%rsp), %rax
	xorl	%r13d, %r13d
	leaq	32(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	Adj(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L48:
	movq	8(%rsp), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %rdi
	leaq	36(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	testl	%eax, %eax
	jle	.L49
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movslq	36(%rsp), %rsi
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	%rsi, %rax
	movl	$1, (%r12,%rax,4)
	cmpl	%r14d, 32(%rsp)
	jg	.L47
.L49:
	addl	$1, %r13d
	cmpl	%r13d, n(%rip)
	jg	.L48
.L45:
	xorl	%eax, %eax
	call	Bfs_function
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L58
	addq	$56, %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
.L58:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE30:
	.size	main, .-main
	.globl	element_de
	.bss
	.align 4
	.type	element_de, @object
	.size	element_de, 4
element_de:
	.zero	4
	.globl	element_en
	.align 4
	.type	element_en, @object
	.size	element_en, 4
element_en:
	.zero	4
	.globl	Que
	.align 32
	.type	Que, @object
	.size	Que, 400
Que:
	.zero	400
	.globl	color
	.align 32
	.type	color, @object
	.size	color, 101
color:
	.zero	101
	.globl	discover
	.align 32
	.type	discover, @object
	.size	discover, 404
discover:
	.zero	404
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	Adj
	.align 32
	.type	Adj, @object
	.size	Adj, 40804
Adj:
	.zero	40804
	.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 Adj[101][101],n,discover[101];
char color[101];
int Que[100],element_en,element_de;


void Bfs_initialization(){
  int i;
  for(i=1;i<=n;i++){
    discover[i]=-1;
    color[i]='w';
  }
  color[1]='g';
  discover[1]=0;
  
  element_en=0;
  element_de=0;
}

void Bfs_print(){
  int i;
  for(i=1;i<=n;i++)
    printf("%d %d\n",i,discover[i]);
}

int Empty(){
  if(element_en-element_de==0)
    return 1;
  return 0;
}

void Enqueue(int key){
  Que[element_en]=key;
  element_en++;
}

int Dequeue(){
  return Que[element_de++];
}

void Bfs_function(){
  int now,i;
  Bfs_initialization();

  Enqueue(1);
  while(Empty()!=1){
    now=Dequeue();

    i=1;
    while(i<=n){
      if(Adj[now][i]==0 || discover[i]!=-1){
	i++;
	continue;
      }
      discover[i]=discover[now]+1;
      Enqueue(i);
      color[i]='g';
      i++;
    }

    color[now]='b';
  }

  Bfs_print();
}

void Initialization(){
  int i,j;
  for(i=1;i<=n;i++)
    for(j=1;j<=n;j++)
      Adj[i][j]=0;
}

int main(){
  int i,j,element,number,key;
  scanf("%d",&n);
  Initialization();

  for(i=0;i<n;i++){
    scanf("%d%d",&element,&number);
    for(j=0;j<number;j++){
      scanf("%d",&key);
      Adj[element][key]=1;
    }
  }

  Bfs_function();
  return 0;
}

4
1 2 1 4
2 1 4
3 0
4 1 3
 4
1 2 1 4
2 1 4
3 0
4 1 4
 4
1 2 2 4
2 1 4
3 0
4 1 1
 4
1 2 2 4
2 1 1
3 0
4 1 3
 4
1 2 1 1
2 1 4
3 0
4 1 4
 4
1 2 2 1
2 1 1
3 0
4 1 3
 4
1 2 1 4
3 1 4
3 0
4 1 2
 4
1 2 3 4
4 1 4
3 -1
3 1 0
 4
1 2 1 3
0 1 1
4 0
4 1 1
 4
1 2 2 1
2 1 4
3 0
3 1 0

1 0
2 -1
3 2
4 1
 1 0
2 -1
3 -1
4 1
 1 0
2 1
3 -1
4 1
 1 0
2 1
3 2
4 1
 1 0
2 -1
3 -1
4 -1
 1 0
2 1
3 -1
4 -1
 1 0
2 2
3 -1
4 1
 1 0
2 -1
3 1
4 1
 1 0
2 -1
3 1
4 -1
 1 0
2 1
3 -1
4 2

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 Adj[101][101],n,discover[101];
char color[101];
int Que[100],element_en,element_de;


void Bfs_initialization(){
  int i;
  for(i=1;i<=n;i++){
    discover[i]=-1;
    color[i]='w';
  }
  color[1]='g';
  discover[1]=0;
  
  element_en=0;
  element_de=0;
}

void Bfs_print(){
  int i;
  for(i=1;i<=n;i++)
    printf("%d %d\n",i,discover[i]);
}

int Empty(){
  if(element_en-element_de==0)
    return 1;
  return 0;
}

void Enqueue(int key){
  Que[element_en]=key;
  element_en++;
}

int Dequeue(){
  return Que[element_de++];
}

void Bfs_function(){
  int now,i;
  Bfs_initialization();

  Enqueue(1);
  while(Empty()!=1){
    now=Dequeue();

    i=1;
    while(i<=n){
      if(Adj[now][i]==0 || discover[i]!=-1){
	i++;
	continue;
      }
      discover[i]=discover[now]+1;
      Enqueue(i);
      color[i]='g';
      i++;
    }

    color[now]='b';
  }

  Bfs_print();
}

void Initialization(){
  int i,j;
  for(i=1;i<=n;i++)
    for(j=1;j<=n;j++)
      Adj[i][j]=0;
}

int main(){
  int i,j,element,number,key;
  scanf("%d",&n);
  Initialization();

  for(i=0;i<n;i++){
    scanf("%d%d",&element,&number);
    for(j=0;j<number;j++){
      scanf("%d",&key);
      Adj[element][key]=1;
    }
  }

  Bfs_function();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Adj
	.bss
	.align 32
	.type	Adj, @object
	.size	Adj, 40804
Adj:
	.zero	40804
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	discover
	.align 32
	.type	discover, @object
	.size	discover, 404
discover:
	.zero	404
	.globl	color
	.align 32
	.type	color, @object
	.size	color, 101
color:
	.zero	101
	.globl	Que
	.align 32
	.type	Que, @object
	.size	Que, 400
Que:
	.zero	400
	.globl	element_en
	.align 4
	.type	element_en, @object
	.size	element_en, 4
element_en:
	.zero	4
	.globl	element_de
	.align 4
	.type	element_de, @object
	.size	element_de, 4
element_de:
	.zero	4
	.text
	.globl	Bfs_initialization
	.type	Bfs_initialization, @function
Bfs_initialization:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$119, (%rax,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movb	$103, 1+color(%rip)
	movl	$0, 4+discover(%rip)
	movl	$0, element_en(%rip)
	movl	$0, element_de(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Bfs_initialization, .-Bfs_initialization
	.section	.rodata
.LC0:
	.string	"%d %d\n"
	.text
	.globl	Bfs_print
	.type	Bfs_print, @function
Bfs_print:
.LFB1:
	.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
	movl	$1, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L6
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Bfs_print, .-Bfs_print
	.globl	Empty
	.type	Empty, @function
Empty:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	element_en(%rip), %edx
	movl	element_de(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	Empty, .-Empty
	.globl	Enqueue
	.type	Enqueue, @function
Enqueue:
.LFB3:
	.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)
	movl	element_en(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Que(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	element_en(%rip), %eax
	addl	$1, %eax
	movl	%eax, element_en(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Enqueue, .-Enqueue
	.globl	Dequeue
	.type	Dequeue, @function
Dequeue:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	element_de(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, element_de(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Que(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Dequeue, .-Dequeue
	.globl	Bfs_function
	.type	Bfs_function, @function
Bfs_function:
.LFB5:
	.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
	movl	$0, %eax
	call	Bfs_initialization
	movl	$1, %edi
	call	Enqueue
	jmp	.L14
.L19:
	movl	$0, %eax
	call	Dequeue
	movl	%eax, -4(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L15
.L18:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L17
.L16:
	addl	$1, -8(%rbp)
	jmp	.L15
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	Enqueue
	movl	-8(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$103, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L18
	movl	-4(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$98, (%rax,%rdx)
.L14:
	movl	$0, %eax
	call	Empty
	cmpl	$1, %eax
	jne	.L19
	movl	$0, %eax
	call	Bfs_print
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	Bfs_function, .-Bfs_function
	.globl	Initialization
	.type	Initialization, @function
Initialization:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$1, -8(%rbp)
	jmp	.L21
.L24:
	movl	$1, -4(%rbp)
	jmp	.L22
.L23:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L23
	addl	$1, -8(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L24
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Initialization, .-Initialization
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	Initialization
	movl	$0, -16(%rbp)
	jmp	.L26
.L29:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L27
.L28:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L27:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L28
	addl	$1, -16(%rbp)
.L26:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L29
	movl	$0, %eax
	call	Bfs_function
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	Adj
	.bss
	.align 32
	.type	Adj, @object
	.size	Adj, 40804
Adj:
	.zero	40804
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	discover
	.align 32
	.type	discover, @object
	.size	discover, 404
discover:
	.zero	404
	.globl	color
	.align 32
	.type	color, @object
	.size	color, 101
color:
	.zero	101
	.globl	Que
	.align 32
	.type	Que, @object
	.size	Que, 400
Que:
	.zero	400
	.globl	element_en
	.align 4
	.type	element_en, @object
	.size	element_en, 4
element_en:
	.zero	4
	.globl	element_de
	.align 4
	.type	element_de, @object
	.size	element_de, 4
element_de:
	.zero	4
	.text
	.globl	Bfs_initialization
	.type	Bfs_initialization, @function
Bfs_initialization:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$119, (%rax,%rdx)
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movb	$103, 1+color(%rip)
	movl	$0, 4+discover(%rip)
	movl	$0, element_en(%rip)
	movl	$0, element_de(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Bfs_initialization, .-Bfs_initialization
	.section	.rodata
.LC0:
	.string	"%d %d\n"
	.text
	.globl	Bfs_print
	.type	Bfs_print, @function
Bfs_print:
.LFB1:
	.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
	movl	$1, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L6
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Bfs_print, .-Bfs_print
	.globl	Empty
	.type	Empty, @function
Empty:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	element_en(%rip), %edx
	movl	element_de(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	Empty, .-Empty
	.globl	Enqueue
	.type	Enqueue, @function
Enqueue:
.LFB3:
	.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)
	movl	element_en(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	Que(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	element_en(%rip), %eax
	addl	$1, %eax
	movl	%eax, element_en(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Enqueue, .-Enqueue
	.globl	Dequeue
	.type	Dequeue, @function
Dequeue:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	element_de(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, element_de(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Que(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Dequeue, .-Dequeue
	.globl	Bfs_function
	.type	Bfs_function, @function
Bfs_function:
.LFB5:
	.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
	movl	$0, %eax
	call	Bfs_initialization
	movl	$1, %edi
	call	Enqueue
	jmp	.L14
.L19:
	movl	$0, %eax
	call	Dequeue
	movl	%eax, -4(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L15
.L18:
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L17
.L16:
	addl	$1, -8(%rbp)
	jmp	.L15
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	discover(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	Enqueue
	movl	-8(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$103, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L18
	movl	-4(%rbp), %eax
	cltq
	leaq	color(%rip), %rdx
	movb	$98, (%rax,%rdx)
.L14:
	movl	$0, %eax
	call	Empty
	cmpl	$1, %eax
	jne	.L19
	movl	$0, %eax
	call	Bfs_print
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	Bfs_function, .-Bfs_function
	.globl	Initialization
	.type	Initialization, @function
Initialization:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$1, -8(%rbp)
	jmp	.L21
.L24:
	movl	$1, -4(%rbp)
	jmp	.L22
.L23:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L23
	addl	$1, -8(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L24
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Initialization, .-Initialization
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	Initialization
	movl	$0, -16(%rbp)
	jmp	.L26
.L29:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L27
.L28:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	Adj(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L27:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L28
	addl	$1, -16(%rbp)
.L26:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L29
	movl	$0, %eax
	call	Bfs_function
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
