	.file	"173578123.c"
	.intel_syntax noprefix
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600
a:
	.zero	1600
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 80
q:
	.zero	80
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 80
visited:
	.zero	80
	.globl	reach
	.align 32
	.type	reach, @object
	.size	reach, 80
reach:
	.zero	80
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	r
	.data
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.long	-1
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.text
	.globl	bfs
	.type	bfs, @function
bfs:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 1
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, visited[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, visited[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, DWORD PTR r[rip]
	add	eax, 1
	mov	DWORD PTR r[rip], eax
	mov	eax, DWORD PTR r[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, q[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L4
	mov	edx, DWORD PTR f[rip]
	mov	eax, DWORD PTR r[rip]
	cmp	edx, eax
	jg	.L6
	mov	eax, DWORD PTR f[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR f[rip], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, q[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	bfs
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bfs, .-bfs
	.section	.rodata
.LC0:
	.string	"%d->%d\n"
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, reach[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	DWORD PTR -4[rbp], 1
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, reach[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L9
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	dfs
.L9:
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dfs, .-dfs
	.section	.rodata
.LC1:
	.string	"\nenter no. of vertices:"
.LC2:
	.string	"%d"
	.align 8
.LC3:
	.string	"\nEnter graph data in matrix form:"
	.align 8
.LC4:
	.string	"\n1.BFS\n2.DFS\n3.Exit\nEnter choice:"
.LC5:
	.string	"\nEnter vertex:"
	.align 8
.LC6:
	.string	"\nThe nodes that are reacheble from %d are:\n"
.LC7:
	.string	"%d "
.LC8:
	.string	"\ngraph is connected"
.LC9:
	.string	"\ngraph is not connected"
.LC10:
	.string	"\nInvalid choice"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, n[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 1
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, q[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, q[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, visited[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, visited[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, reach[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -16[rbp], 1
.L12:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L13
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -16[rbp], 1
	jmp	.L14
.L17:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -12[rbp], 1
.L15:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L16
	add	DWORD PTR -16[rbp], 1
.L14:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L17
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 3
	je	.L18
	cmp	eax, 3
	jg	.L19
	cmp	eax, 1
	je	.L20
	cmp	eax, 2
	je	.L21
	jmp	.L19
.L20:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	bfs
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -16[rbp], 1
	jmp	.L22
.L24:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, visited[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L23
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	add	DWORD PTR -16[rbp], 1
.L22:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L24
	jmp	.L25
.L21:
	mov	edi, 1
	call	dfs
	mov	eax, DWORD PTR n[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR count[rip]
	cmp	edx, eax
	jne	.L26
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L25
.L26:
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L25
.L18:
	mov	edi, 0
	call	exit@PLT
.L19:
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"173578123.c"
	.text
	.comm	a,1600,4
	.comm	q,80,4
	.comm	visited,80,4
	.comm	reach,80,4
	.comm	n,4,4
	.global	f
	.bss
	.align	2
	.type	f, %object
	.size	f, 4
f:
	.space	4
	.global	r
	.data
	.align	2
	.type	r, %object
	.size	r, 4
r:
	.word	-1
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.text
	.align	2
	.global	bfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	bfs, %function
bfs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L2
.L4:
	ldr	r1, .L7
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L3
	ldr	r2, .L7+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L3
	ldr	r2, .L7+4
	ldr	r3, [fp, #-8]
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
	ldr	r3, .L7+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+8
	str	r3, [r2]
	ldr	r3, .L7+8
	ldr	r3, [r3]
	ldr	r1, .L7+12
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, .L7+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L4
	ldr	r3, .L7+20
	ldr	r2, [r3]
	ldr	r3, .L7+8
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L6
	ldr	r3, .L7+20
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L7+20
	str	r2, [r1]
	ldr	r2, .L7+12
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	bfs
.L6:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	a
	.word	visited
	.word	r
	.word	q
	.word	n
	.word	f
	.size	bfs, .-bfs
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d->%d\012\000"
	.text
	.align	2
	.global	dfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	dfs, %function
dfs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r2, .L13
	ldr	r3, [fp, #-16]
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L10
.L12:
	ldr	r1, .L13+4
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L11
	ldr	r2, .L13
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L11
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-16]
	ldr	r0, .L13+8
	bl	printf
	ldr	r3, .L13+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+12
	str	r3, [r2]
	ldr	r0, [fp, #-8]
	bl	dfs
.L11:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L10:
	ldr	r3, .L13+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L12
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	reach
	.word	a
	.word	.LC0
	.word	count
	.word	n
	.size	dfs, .-dfs
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\012enter no. of vertices:\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"\012Enter graph data in matrix form:\000"
	.align	2
.LC4:
	.ascii	"\0121.BFS\0122.DFS\0123.Exit\012Enter choice:\000"
	.align	2
.LC5:
	.ascii	"\012Enter vertex:\000"
	.align	2
.LC6:
	.ascii	"\012The nodes that are reacheble from %d are:\012\000"
	.align	2
.LC7:
	.ascii	"%d \000"
	.align	2
.LC8:
	.ascii	"\012graph is connected\000"
	.align	2
.LC9:
	.ascii	"\012graph is not connected\000"
	.align	2
.LC10:
	.ascii	"\012Invalid choice\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L34+4
	bl	printf
	ldr	r1, .L34+8
	ldr	r0, .L34+12
	bl	__isoc99_scanf
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L16
.L17:
	ldr	r2, .L34+16
	ldr	r3, [fp, #-16]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r2, .L34+16
	ldr	r3, [fp, #-16]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L34+20
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L34+20
	ldr	r3, [fp, #-16]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L34+24
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L16:
	ldr	r3, .L34+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L17
	ldr	r0, .L34+28
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L18
.L21:
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L34+32
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L34+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L19:
	ldr	r3, .L34+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L20
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L18:
	ldr	r3, .L34+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L21
	ldr	r0, .L34+36
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L34+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	beq	.L22
	cmp	r3, #3
	bgt	.L23
	cmp	r3, #1
	beq	.L24
	cmp	r3, #2
	beq	.L25
	b	.L23
.L24:
	ldr	r0, .L34+40
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L34+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	bfs
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L34+44
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L26
.L28:
	ldr	r2, .L34+20
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L27
	ldr	r1, [fp, #-16]
	ldr	r0, .L34+48
	bl	printf
.L27:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L26:
	ldr	r3, .L34+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L28
	b	.L29
.L25:
	mov	r0, #1
	bl	dfs
	ldr	r3, .L34+8
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, .L34+52
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L30
	ldr	r0, .L34+56
	bl	printf
	b	.L29
.L30:
	ldr	r0, .L34+60
	bl	printf
	b	.L29
.L22:
	mov	r0, #0
	bl	exit
.L23:
	ldr	r0, .L34+64
	bl	printf
.L29:
	mov	r3, #0
	ldr	r2, .L34
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC11
	.word	.LC1
	.word	n
	.word	.LC2
	.word	q
	.word	visited
	.word	reach
	.word	.LC3
	.word	a
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	count
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
