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 <stdbool.h>

int g[100];
int a[100][100] ;
int k, v2, check=0, cycle = 0;

void HE(int x){
int i;
g[x] = 1;
for(int i = 0; i < v2; i++){
		if(a[x][i] == 0) continue;
		if(g[i] == 1){
				cycle = 1;
				return;
		}
		if(g[i] == 0) HE(i);
}
g[x] = 2;
}

int main(){

 int e,s,t,i,j;
		scanf("%d %d", &v2,&e);
		for(i=0; i<v2;i++){
			g[i] = 0;
			for(j=0; j<v2;j++){
				a[i][j]=0;
			}
		}
	for(i=0; i<e;i++){
		scanf("%d %d", &s,&t);
		a[s][t] = 1;
	}
	for( i = 0; i < s; i++){
			if(g[i] == 0) HE(i);
			if(cycle){
					printf("1\n");
					return 0;
				}

		}
		printf("0\n");

				return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 400
g:
	.zero	400
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	v2
	.align 4
	.type	v2, @object
	.size	v2, 4
v2:
	.zero	4
	.globl	check
	.align 4
	.type	check, @object
	.size	check, 4
check:
	.zero	4
	.globl	cycle
	.align 4
	.type	cycle, @object
	.size	cycle, 4
cycle:
	.zero	4
	.text
	.globl	HE
	.type	HE, @function
HE:
.LFB0:
	.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
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -4(%rbp)
	jmp	.L2
.L7:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L5
	movl	$1, cycle(%rip)
	jmp	.L1
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	HE
	jmp	.L4
.L8:
	nop
.L4:
	addl	$1, -4(%rbp)
.L2:
	movl	v2(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L7
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$2, (%rdx,%rax)
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	HE, .-HE
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"1"
.LC2:
	.string	"0"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rdx
	leaq	v2(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L10
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L11:
	movl	v2(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	addl	$1, -16(%rbp)
.L10:
	movl	v2(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L13
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	leaq	-20(%rbp), %rdx
	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
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L14:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	$0, -16(%rbp)
	jmp	.L16
.L20:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L17
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	HE
.L17:
	movl	cycle(%rip), %eax
	testl	%eax, %eax
	je	.L18
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L21
.L18:
	addl	$1, -16(%rbp)
.L16:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L20
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	HE
	.type	HE, @function
HE:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	leaq	g(%rip), %rcx
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movl	v2(%rip), %r10d
	movl	$1, (%rcx,%rax,4)
	movq	%rax, 72(%rsp)
	testl	%r10d, %r10d
	jle	.L31
	leaq	(%rax,%rax,4), %rax
	leaq	a(%rip), %rsi
	xorl	%r11d, %r11d
	leaq	(%rax,%rax,4), %rax
	movq	%rsi, 24(%rsp)
	salq	$4, %rax
	addq	%rsi, %rax
	movq	%rax, 64(%rsp)
	leaq	g(%rip), %rax
	movq	%rax, 32(%rsp)
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %r11
	addq	$4, 32(%rsp)
	addq	$400, 24(%rsp)
	cmpl	%r11d, %r10d
	jle	.L31
.L30:
	movq	64(%rsp), %rax
	movl	(%rax,%r11,4), %r12d
	testl	%r12d, %r12d
	je	.L4
	movq	32(%rsp), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	.L43
	testl	%eax, %eax
	jne	.L4
	movq	32(%rsp), %rax
	leaq	g(%rip), %r8
	xorl	%r9d, %r9d
	movq	%r11, 80(%rsp)
	leaq	a(%rip), %rsi
	movq	%r8, 8(%rsp)
	movq	%r9, %r11
	movl	%r10d, %r8d
	movl	$1, (%rax)
	movq	%rsi, %r10
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %r11
	addq	$4, 8(%rsp)
	addq	$400, %r10
	cmpl	%r11d, %r8d
	jle	.L44
.L29:
	movq	24(%rsp), %rax
	movl	(%rax,%r11,4), %ebp
	testl	%ebp, %ebp
	je	.L6
	movq	8(%rsp), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	.L45
	testl	%eax, %eax
	jne	.L6
	movq	8(%rsp), %rax
	leaq	a(%rip), %r9
	xorl	%ecx, %ecx
	movq	%r11, 88(%rsp)
	movq	%r10, 40(%rsp)
	movq	%rcx, %r11
	movq	%r9, %r10
	movl	$1, (%rax)
	leaq	g(%rip), %rax
	movq	%rax, 16(%rsp)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %r11
	addq	$4, 16(%rsp)
	addq	$400, %r10
	cmpl	%r11d, %r8d
	jle	.L46
.L28:
	movq	40(%rsp), %rax
	movl	(%rax,%r11,4), %ebx
	testl	%ebx, %ebx
	je	.L8
	movq	16(%rsp), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	.L47
	testl	%eax, %eax
	jne	.L8
	movq	16(%rsp), %rax
	leaq	a(%rip), %rdx
	movq	%r11, 96(%rsp)
	xorl	%r15d, %r15d
	leaq	g(%rip), %rcx
	movq	%r10, 48(%rsp)
	movq	%rdx, %r10
	movl	$1, (%rax)
	movq	%rcx, %r11
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %r15
	addq	$4, %r11
	addq	$400, %r10
	cmpl	%r15d, %r8d
	jle	.L48
.L27:
	movq	48(%rsp), %rax
	movl	(%rax,%r15,4), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	(%r11), %eax
	cmpl	$1, %eax
	je	.L49
	testl	%eax, %eax
	jne	.L10
	leaq	g(%rip), %rsi
	movl	$1, (%r11)
	xorl	%ebp, %ebp
	leaq	a(%rip), %r9
	movq	%r11, 112(%rsp)
	movq	%rsi, %r11
	movq	%r15, 104(%rsp)
	movq	%r10, 56(%rsp)
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$1, %rbp
	addq	$4, %r11
	addq	$400, %r9
	cmpl	%ebp, %r8d
	jle	.L50
.L26:
	movq	56(%rsp), %rax
	movl	(%rax,%rbp,4), %edi
	testl	%edi, %edi
	je	.L12
	movl	(%r11), %eax
	cmpl	$1, %eax
	je	.L51
	testl	%eax, %eax
	jne	.L12
	leaq	a(%rip), %r15
	movq	%rbp, 120(%rsp)
	leaq	g(%rip), %rax
	xorl	%r12d, %r12d
	movl	$1, (%r11)
	movq	%r15, %r10
	movq	%rax, %rbp
	movq	%r11, 128(%rsp)
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r12
	addq	$4, %rbp
	addq	$400, %r10
	cmpl	%r12d, %r8d
	jle	.L52
.L25:
	movl	(%r9,%r12,4), %esi
	testl	%esi, %esi
	je	.L14
	movl	0(%rbp), %edx
	cmpl	$1, %edx
	je	.L53
	testl	%edx, %edx
	jne	.L14
	leaq	a(%rip), %r15
	leaq	g(%rip), %rdx
	movl	$1, 0(%rbp)
	xorl	%r13d, %r13d
	movq	%r12, 136(%rsp)
	movq	%r10, %r12
	movq	%rbp, 144(%rsp)
	movq	%r15, %rbp
	movq	%r9, 152(%rsp)
	movq	%rdx, %r9
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %r13
	addq	$4, %r9
	addq	$400, %rbp
	cmpl	%r13d, %r8d
	jle	.L54
.L24:
	movl	(%r12,%r13,4), %ecx
	testl	%ecx, %ecx
	je	.L16
	movl	(%r9), %eax
	cmpl	$1, %eax
	je	.L55
	testl	%eax, %eax
	jne	.L16
	leaq	g(%rip), %rax
	movq	%r12, 168(%rsp)
	leaq	a(%rip), %r15
	movq	%rbp, %r12
	movl	$1, (%r9)
	xorl	%r14d, %r14d
	movq	%rax, %rbp
	movq	%r9, 160(%rsp)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L18:
	addq	$1, %r14
	addq	$4, %rbp
	addq	$400, %r15
	cmpl	%r14d, %r8d
	jle	.L56
.L23:
	movl	(%r12,%r14,4), %edx
	testl	%edx, %edx
	je	.L18
	movl	0(%rbp), %eax
	cmpl	$1, %eax
	je	.L57
	testl	%eax, %eax
	jne	.L18
	movl	$1, 0(%rbp)
	xorl	%ebx, %ebx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rbx
	cmpl	%ebx, %r8d
	jle	.L58
.L22:
	movl	(%r15,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	je	.L20
	leaq	g(%rip), %rax
	movl	(%rax,%rbx,4), %eax
	cmpl	$1, %eax
	je	.L59
	testl	%eax, %eax
	jne	.L20
	call	HE
	movl	v2(%rip), %r8d
	addq	$1, %rbx
	cmpl	%ebx, %r8d
	jg	.L22
.L58:
	movl	$2, 0(%rbp)
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L31:
	movq	72(%rsp), %rsi
	leaq	g(%rip), %rax
	movl	$2, (%rax,%rsi,4)
.L1:
	addq	$184, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L44:
	.cfi_restore_state
	movq	32(%rsp), %rax
	movq	80(%rsp), %r11
	movl	%r8d, %r10d
	movl	$2, (%rax)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L46:
	movq	8(%rsp), %rax
	movq	88(%rsp), %r11
	movq	40(%rsp), %r10
	movl	$2, (%rax)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L48:
	movq	16(%rsp), %rax
	movq	96(%rsp), %r11
	movq	48(%rsp), %r10
	movl	$2, (%rax)
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L50:
	movq	112(%rsp), %r11
	movq	104(%rsp), %r15
	movq	56(%rsp), %r10
	movl	$2, (%r11)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L52:
	movq	128(%rsp), %r11
	movq	120(%rsp), %rbp
	movl	$2, (%r11)
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L54:
	movq	144(%rsp), %rbp
	movq	%r12, %r10
	movq	152(%rsp), %r9
	movq	136(%rsp), %r12
	movl	$2, 0(%rbp)
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L56:
	movq	160(%rsp), %r9
	movq	%r12, %rbp
	movq	168(%rsp), %r12
	movl	$2, (%r9)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L43:
	movl	$1, cycle(%rip)
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L45:
	movl	$1, cycle(%rip)
	movq	80(%rsp), %r11
	movl	%r8d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L47:
	movl	$1, cycle(%rip)
	movq	88(%rsp), %r11
	movq	40(%rsp), %r10
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L49:
	movl	$1, cycle(%rip)
	movq	96(%rsp), %r11
	movq	48(%rsp), %r10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L51:
	movl	$1, cycle(%rip)
	movq	104(%rsp), %r15
	movq	112(%rsp), %r11
	movq	56(%rsp), %r10
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L53:
	movl	$1, cycle(%rip)
	movq	120(%rsp), %rbp
	movq	128(%rsp), %r11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%r12, %r10
	movq	144(%rsp), %rbp
	movl	$1, cycle(%rip)
	movq	136(%rsp), %r12
	movq	152(%rsp), %r9
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L57:
	movq	%r12, %rbp
	movq	160(%rsp), %r9
	movl	$1, cycle(%rip)
	movq	168(%rsp), %r12
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L59:
	movl	$1, cycle(%rip)
	jmp	.L18
	.cfi_endproc
.LFE23:
	.size	HE, .-HE
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	v2(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	v2(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L68
	movl	%ebp, %edx
	leaq	g(%rip), %rdi
	leal	-1(%rbp), %r13d
	xorl	%esi, %esi
	salq	$2, %rdx
	leaq	a(%rip), %r12
	call	memset@PLT
	movl	%ebp, %eax
	movl	%ebp, %r8d
	movq	%r12, %rsi
	shrl	$2, %eax
	andl	$-4, %r8d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	leal	-1(%rax), %r9d
	addq	$1, %r9
	salq	$4, %r9
	.p2align 4,,10
	.p2align 3
.L67:
	cmpl	$2, %r13d
	jbe	.L83
	leaq	(%r9,%rsi), %rdx
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L65:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L65
	movl	%r8d, %eax
	cmpl	%r8d, %ebp
	je	.L66
.L64:
	movslq	%edi, %rdx
	movslq	%eax, %rcx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	salq	$2, %rdx
	addq	%rdx, %rcx
	movl	$0, (%r12,%rcx,4)
	leal	1(%rax), %ecx
	cmpl	%ebp, %ecx
	jge	.L66
	movslq	%ecx, %rcx
	addl	$2, %eax
	addq	%rdx, %rcx
	movl	$0, (%r12,%rcx,4)
	cmpl	%eax, %ebp
	jle	.L66
	cltq
	addq	%rax, %rdx
	movl	$0, (%r12,%rdx,4)
.L66:
	addl	$1, %edi
	addq	$400, %rsi
	cmpl	%ebp, %edi
	jne	.L67
.L68:
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L94
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	a(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L62:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rcx
	addl	$1, %ebp
	movq	%rax, %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rax
	movl	$1, (%r12,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L62
.L69:
	leaq	g(%rip), %r14
	leaq	a(%rip), %rbp
	xorl	%r13d, %r13d
	movq	%r14, %r12
	testl	%edx, %edx
	jg	.L79
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L72:
	movl	cycle(%rip), %eax
	testl	%eax, %eax
	jne	.L76
	addl	$1, %r13d
	addq	$4, %r12
	addq	$400, %rbp
	cmpl	%r13d, 16(%rsp)
	jle	.L80
.L79:
	movl	(%r12), %esi
	testl	%esi, %esi
	jne	.L72
	movl	v2(%rip), %edx
	movl	$1, (%r12)
	xorl	%ebx, %ebx
	testl	%edx, %edx
	jg	.L73
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L74:
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jle	.L77
.L73:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edi
	testl	%ecx, %ecx
	je	.L74
	movl	(%r14,%rbx,4), %eax
	cmpl	$1, %eax
	je	.L95
	testl	%eax, %eax
	jne	.L74
	call	HE
	movl	v2(%rip), %edx
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L73
	.p2align 4,,10
	.p2align 3
.L77:
	movl	$2, (%r12)
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L95:
	movl	$1, cycle(%rip)
.L76:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L71:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L96
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L64
.L80:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L71
.L94:
	movl	16(%rsp), %edx
	jmp	.L69
.L96:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	cycle
	.bss
	.align 4
	.type	cycle, @object
	.size	cycle, 4
cycle:
	.zero	4
	.globl	check
	.align 4
	.type	check, @object
	.size	check, 4
check:
	.zero	4
	.globl	v2
	.align 4
	.type	v2, @object
	.size	v2, 4
v2:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 400
g:
	.zero	400
	.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	HE
	.type	HE, @function
HE:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	leaq	g(%rip), %rcx
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movl	v2(%rip), %r10d
	movl	$1, (%rcx,%rax,4)
	movq	%rax, 72(%rsp)
	testl	%r10d, %r10d
	jle	.L31
	leaq	(%rax,%rax,4), %rax
	leaq	a(%rip), %rsi
	xorl	%r11d, %r11d
	leaq	(%rax,%rax,4), %rax
	movq	%rsi, 24(%rsp)
	salq	$4, %rax
	addq	%rsi, %rax
	movq	%rax, 64(%rsp)
	leaq	g(%rip), %rax
	movq	%rax, 32(%rsp)
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %r11
	addq	$4, 32(%rsp)
	addq	$400, 24(%rsp)
	cmpl	%r11d, %r10d
	jle	.L31
.L30:
	movq	64(%rsp), %rax
	movl	(%rax,%r11,4), %r12d
	testl	%r12d, %r12d
	je	.L4
	movq	32(%rsp), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	.L43
	testl	%eax, %eax
	jne	.L4
	movq	32(%rsp), %rax
	leaq	g(%rip), %r8
	xorl	%r9d, %r9d
	movq	%r11, 80(%rsp)
	leaq	a(%rip), %rsi
	movq	%r8, 8(%rsp)
	movq	%r9, %r11
	movl	%r10d, %r8d
	movl	$1, (%rax)
	movq	%rsi, %r10
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L6:
	addq	$1, %r11
	addq	$4, 8(%rsp)
	addq	$400, %r10
	cmpl	%r11d, %r8d
	jle	.L44
.L29:
	movq	24(%rsp), %rax
	movl	(%rax,%r11,4), %ebp
	testl	%ebp, %ebp
	je	.L6
	movq	8(%rsp), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	.L45
	testl	%eax, %eax
	jne	.L6
	movq	8(%rsp), %rax
	leaq	a(%rip), %r9
	xorl	%ecx, %ecx
	movq	%r11, 88(%rsp)
	movq	%r10, 40(%rsp)
	movq	%rcx, %r11
	movq	%r9, %r10
	movl	$1, (%rax)
	leaq	g(%rip), %rax
	movq	%rax, 16(%rsp)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %r11
	addq	$4, 16(%rsp)
	addq	$400, %r10
	cmpl	%r11d, %r8d
	jle	.L46
.L28:
	movq	40(%rsp), %rax
	movl	(%rax,%r11,4), %ebx
	testl	%ebx, %ebx
	je	.L8
	movq	16(%rsp), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	.L47
	testl	%eax, %eax
	jne	.L8
	movq	16(%rsp), %rax
	leaq	a(%rip), %rdx
	movq	%r11, 96(%rsp)
	xorl	%r15d, %r15d
	leaq	g(%rip), %rcx
	movq	%r10, 48(%rsp)
	movq	%rdx, %r10
	movl	$1, (%rax)
	movq	%rcx, %r11
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %r15
	addq	$4, %r11
	addq	$400, %r10
	cmpl	%r15d, %r8d
	jle	.L48
.L27:
	movq	48(%rsp), %rax
	movl	(%rax,%r15,4), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	(%r11), %eax
	cmpl	$1, %eax
	je	.L49
	testl	%eax, %eax
	jne	.L10
	leaq	g(%rip), %rsi
	movl	$1, (%r11)
	xorl	%ebp, %ebp
	leaq	a(%rip), %r9
	movq	%r11, 112(%rsp)
	movq	%rsi, %r11
	movq	%r15, 104(%rsp)
	movq	%r10, 56(%rsp)
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$1, %rbp
	addq	$4, %r11
	addq	$400, %r9
	cmpl	%ebp, %r8d
	jle	.L50
.L26:
	movq	56(%rsp), %rax
	movl	(%rax,%rbp,4), %edi
	testl	%edi, %edi
	je	.L12
	movl	(%r11), %eax
	cmpl	$1, %eax
	je	.L51
	testl	%eax, %eax
	jne	.L12
	leaq	a(%rip), %r15
	movq	%rbp, 120(%rsp)
	leaq	g(%rip), %rax
	xorl	%r12d, %r12d
	movl	$1, (%r11)
	movq	%r15, %r10
	movq	%rax, %rbp
	movq	%r11, 128(%rsp)
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r12
	addq	$4, %rbp
	addq	$400, %r10
	cmpl	%r12d, %r8d
	jle	.L52
.L25:
	movl	(%r9,%r12,4), %esi
	testl	%esi, %esi
	je	.L14
	movl	0(%rbp), %edx
	cmpl	$1, %edx
	je	.L53
	testl	%edx, %edx
	jne	.L14
	leaq	a(%rip), %r15
	leaq	g(%rip), %rdx
	movl	$1, 0(%rbp)
	xorl	%r13d, %r13d
	movq	%r12, 136(%rsp)
	movq	%r10, %r12
	movq	%rbp, 144(%rsp)
	movq	%r15, %rbp
	movq	%r9, 152(%rsp)
	movq	%rdx, %r9
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %r13
	addq	$4, %r9
	addq	$400, %rbp
	cmpl	%r13d, %r8d
	jle	.L54
.L24:
	movl	(%r12,%r13,4), %ecx
	testl	%ecx, %ecx
	je	.L16
	movl	(%r9), %eax
	cmpl	$1, %eax
	je	.L55
	testl	%eax, %eax
	jne	.L16
	leaq	g(%rip), %rax
	movq	%r12, 168(%rsp)
	leaq	a(%rip), %r15
	movq	%rbp, %r12
	movl	$1, (%r9)
	xorl	%r14d, %r14d
	movq	%rax, %rbp
	movq	%r9, 160(%rsp)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L18:
	addq	$1, %r14
	addq	$4, %rbp
	addq	$400, %r15
	cmpl	%r14d, %r8d
	jle	.L56
.L23:
	movl	(%r12,%r14,4), %edx
	testl	%edx, %edx
	je	.L18
	movl	0(%rbp), %eax
	cmpl	$1, %eax
	je	.L57
	testl	%eax, %eax
	jne	.L18
	movl	$1, 0(%rbp)
	xorl	%ebx, %ebx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rbx
	cmpl	%ebx, %r8d
	jle	.L58
.L22:
	movl	(%r15,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	je	.L20
	leaq	g(%rip), %rax
	movl	(%rax,%rbx,4), %eax
	cmpl	$1, %eax
	je	.L59
	testl	%eax, %eax
	jne	.L20
	call	HE
	movl	v2(%rip), %r8d
	addq	$1, %rbx
	cmpl	%ebx, %r8d
	jg	.L22
.L58:
	movl	$2, 0(%rbp)
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L31:
	movq	72(%rsp), %rsi
	leaq	g(%rip), %rax
	movl	$2, (%rax,%rsi,4)
.L1:
	addq	$184, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L44:
	.cfi_restore_state
	movq	32(%rsp), %rax
	movq	80(%rsp), %r11
	movl	%r8d, %r10d
	movl	$2, (%rax)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L46:
	movq	8(%rsp), %rax
	movq	88(%rsp), %r11
	movq	40(%rsp), %r10
	movl	$2, (%rax)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L48:
	movq	16(%rsp), %rax
	movq	96(%rsp), %r11
	movq	48(%rsp), %r10
	movl	$2, (%rax)
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L50:
	movq	112(%rsp), %r11
	movq	104(%rsp), %r15
	movq	56(%rsp), %r10
	movl	$2, (%r11)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L52:
	movq	128(%rsp), %r11
	movq	120(%rsp), %rbp
	movl	$2, (%r11)
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L54:
	movq	144(%rsp), %rbp
	movq	%r12, %r10
	movq	152(%rsp), %r9
	movq	136(%rsp), %r12
	movl	$2, 0(%rbp)
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L56:
	movq	160(%rsp), %r9
	movq	%r12, %rbp
	movq	168(%rsp), %r12
	movl	$2, (%r9)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L43:
	movl	$1, cycle(%rip)
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L45:
	movl	$1, cycle(%rip)
	movq	80(%rsp), %r11
	movl	%r8d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L47:
	movl	$1, cycle(%rip)
	movq	88(%rsp), %r11
	movq	40(%rsp), %r10
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L49:
	movl	$1, cycle(%rip)
	movq	96(%rsp), %r11
	movq	48(%rsp), %r10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L51:
	movl	$1, cycle(%rip)
	movq	104(%rsp), %r15
	movq	112(%rsp), %r11
	movq	56(%rsp), %r10
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L53:
	movl	$1, cycle(%rip)
	movq	120(%rsp), %rbp
	movq	128(%rsp), %r11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%r12, %r10
	movq	144(%rsp), %rbp
	movl	$1, cycle(%rip)
	movq	136(%rsp), %r12
	movq	152(%rsp), %r9
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L57:
	movq	%r12, %rbp
	movq	160(%rsp), %r9
	movl	$1, cycle(%rip)
	movq	168(%rsp), %r12
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L59:
	movl	$1, cycle(%rip)
	jmp	.L18
	.cfi_endproc
.LFE23:
	.size	HE, .-HE
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.LC2:
	.string	"1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	v2(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	v2(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L68
	movl	%ebp, %edx
	leaq	g(%rip), %rdi
	leal	-1(%rbp), %r13d
	xorl	%esi, %esi
	salq	$2, %rdx
	leaq	a(%rip), %r12
	call	memset@PLT
	movl	%ebp, %eax
	movl	%ebp, %r8d
	movq	%r12, %rsi
	shrl	$2, %eax
	andl	$-4, %r8d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	leal	-1(%rax), %r9d
	addq	$1, %r9
	salq	$4, %r9
	.p2align 4,,10
	.p2align 3
.L67:
	cmpl	$2, %r13d
	jbe	.L83
	leaq	(%r9,%rsi), %rdx
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L65:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L65
	movl	%r8d, %eax
	cmpl	%r8d, %ebp
	je	.L66
.L64:
	movslq	%edi, %rdx
	movslq	%eax, %rcx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	salq	$2, %rdx
	addq	%rdx, %rcx
	movl	$0, (%r12,%rcx,4)
	leal	1(%rax), %ecx
	cmpl	%ebp, %ecx
	jge	.L66
	movslq	%ecx, %rcx
	addl	$2, %eax
	addq	%rdx, %rcx
	movl	$0, (%r12,%rcx,4)
	cmpl	%eax, %ebp
	jle	.L66
	cltq
	addq	%rax, %rdx
	movl	$0, (%r12,%rdx,4)
.L66:
	addl	$1, %edi
	addq	$400, %rsi
	cmpl	%ebp, %edi
	jne	.L67
.L68:
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L94
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	a(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L62:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rax
	movslq	20(%rsp), %rcx
	addl	$1, %ebp
	movq	%rax, %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rax
	movl	$1, (%r12,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L62
.L69:
	leaq	g(%rip), %r14
	leaq	a(%rip), %rbp
	xorl	%r13d, %r13d
	movq	%r14, %r12
	testl	%edx, %edx
	jg	.L79
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L72:
	movl	cycle(%rip), %eax
	testl	%eax, %eax
	jne	.L76
	addl	$1, %r13d
	addq	$4, %r12
	addq	$400, %rbp
	cmpl	%r13d, 16(%rsp)
	jle	.L80
.L79:
	movl	(%r12), %esi
	testl	%esi, %esi
	jne	.L72
	movl	v2(%rip), %edx
	movl	$1, (%r12)
	xorl	%ebx, %ebx
	testl	%edx, %edx
	jg	.L73
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L74:
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jle	.L77
.L73:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edi
	testl	%ecx, %ecx
	je	.L74
	movl	(%r14,%rbx,4), %eax
	cmpl	$1, %eax
	je	.L95
	testl	%eax, %eax
	jne	.L74
	call	HE
	movl	v2(%rip), %edx
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L73
	.p2align 4,,10
	.p2align 3
.L77:
	movl	$2, (%r12)
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L95:
	movl	$1, cycle(%rip)
.L76:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L71:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L96
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L64
.L80:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L71
.L94:
	movl	16(%rsp), %edx
	jmp	.L69
.L96:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	cycle
	.bss
	.align 4
	.type	cycle, @object
	.size	cycle, 4
cycle:
	.zero	4
	.globl	check
	.align 4
	.type	check, @object
	.size	check, 4
check:
	.zero	4
	.globl	v2
	.align 4
	.type	v2, @object
	.size	v2, 4
v2:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 400
g:
	.zero	400
	.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 <stdbool.h>

int g[100];
int a[100][100] ;
int k, v2, check=0, cycle = 0;

void HE(int x){
int i;
g[x] = 1;
for(int i = 0; i < v2; i++){
		if(a[x][i] == 0) continue;
		if(g[i] == 1){
				cycle = 1;
				return;
		}
		if(g[i] == 0) HE(i);
}
g[x] = 2;
}

int main(){

 int e,s,t,i,j;
		scanf("%d %d", &v2,&e);
		for(i=0; i<v2;i++){
			g[i] = 0;
			for(j=0; j<v2;j++){
				a[i][j]=0;
			}
		}
	for(i=0; i<e;i++){
		scanf("%d %d", &s,&t);
		a[s][t] = 1;
	}
	for( i = 0; i < s; i++){
			if(g[i] == 0) HE(i);
			if(cycle){
					printf("1\n");
					return 0;
				}

		}
		printf("0\n");

				return 0;
}


5 3
0 1
0 2
1 2
 8 3
0 1
0 2
1 2
 8 3
0 2
0 2
1 2
 5 3
0 2
0 2
1 2
 11 3
0 1
0 2
1 2
 8 2
0 1
0 2
1 2
 8 3
1 2
0 2
1 2
 8 2
0 1
0 2
1 4
 8 2
0 1
0 2
2 4
 8 2
0 2
0 2
2 4

0
 0
 0
 0
 0
 0
 0
 0
 0
 0

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 <stdbool.h>

int g[100];
int a[100][100] ;
int k, v2, check=0, cycle = 0;

void HE(int x){
int i;
g[x] = 1;
for(int i = 0; i < v2; i++){
		if(a[x][i] == 0) continue;
		if(g[i] == 1){
				cycle = 1;
				return;
		}
		if(g[i] == 0) HE(i);
}
g[x] = 2;
}

int main(){

 int e,s,t,i,j;
		scanf("%d %d", &v2,&e);
		for(i=0; i<v2;i++){
			g[i] = 0;
			for(j=0; j<v2;j++){
				a[i][j]=0;
			}
		}
	for(i=0; i<e;i++){
		scanf("%d %d", &s,&t);
		a[s][t] = 1;
	}
	for( i = 0; i < s; i++){
			if(g[i] == 0) HE(i);
			if(cycle){
					printf("1\n");
					return 0;
				}

		}
		printf("0\n");

				return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 400
g:
	.zero	400
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	v2
	.align 4
	.type	v2, @object
	.size	v2, 4
v2:
	.zero	4
	.globl	check
	.align 4
	.type	check, @object
	.size	check, 4
check:
	.zero	4
	.globl	cycle
	.align 4
	.type	cycle, @object
	.size	cycle, 4
cycle:
	.zero	4
	.text
	.globl	HE
	.type	HE, @function
HE:
.LFB0:
	.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
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -4(%rbp)
	jmp	.L2
.L7:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L5
	movl	$1, cycle(%rip)
	jmp	.L1
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	HE
	jmp	.L4
.L8:
	nop
.L4:
	addl	$1, -4(%rbp)
.L2:
	movl	v2(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L7
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$2, (%rdx,%rax)
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	HE, .-HE
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"1"
.LC2:
	.string	"0"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rdx
	leaq	v2(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L10
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L11:
	movl	v2(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	addl	$1, -16(%rbp)
.L10:
	movl	v2(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L13
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	leaq	-20(%rbp), %rdx
	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
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L14:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	$0, -16(%rbp)
	jmp	.L16
.L20:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L17
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	HE
.L17:
	movl	cycle(%rip), %eax
	testl	%eax, %eax
	je	.L18
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L21
.L18:
	addl	$1, -16(%rbp)
.L16:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L20
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 400
g:
	.zero	400
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	v2
	.align 4
	.type	v2, @object
	.size	v2, 4
v2:
	.zero	4
	.globl	check
	.align 4
	.type	check, @object
	.size	check, 4
check:
	.zero	4
	.globl	cycle
	.align 4
	.type	cycle, @object
	.size	cycle, 4
cycle:
	.zero	4
	.text
	.globl	HE
	.type	HE, @function
HE:
.LFB0:
	.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
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -4(%rbp)
	jmp	.L2
.L7:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L5
	movl	$1, cycle(%rip)
	jmp	.L1
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	HE
	jmp	.L4
.L8:
	nop
.L4:
	addl	$1, -4(%rbp)
.L2:
	movl	v2(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L7
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$2, (%rdx,%rax)
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	HE, .-HE
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"1"
.LC2:
	.string	"0"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rdx
	leaq	v2(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L10
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	$0, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L11:
	movl	v2(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	addl	$1, -16(%rbp)
.L10:
	movl	v2(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L13
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	leaq	-20(%rbp), %rdx
	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
	movl	-20(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L14:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	$0, -16(%rbp)
	jmp	.L16
.L20:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L17
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	HE
.L17:
	movl	cycle(%rip), %eax
	testl	%eax, %eax
	je	.L18
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L21
.L18:
	addl	$1, -16(%rbp)
.L16:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L20
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
