	.file	"649927.c"
	.intel_syntax noprefix
	.text
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 40000
A:
	.zero	40000
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	counter
	.align 4
	.type	counter, @object
	.size	counter, 4
counter:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Enter dimensions of matrix: "
.LC1:
	.string	"%d %d"
.LC2:
	.string	"\nEnter elements:"
.LC3:
	.string	"%d"
	.text
	.globl	insert_matrix
	.type	insert_matrix, @function
insert_matrix:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, n[rip]
	lea	rsi, m[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	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, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -4[rbp], 1
.L3:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L4
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L5
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insert_matrix, .-insert_matrix
	.section	.rodata
.LC4:
	.string	"\nMatrix is sparse"
.LC5:
	.string	"\nMatrix is not sparse"
	.text
	.globl	is_sparse
	.type	is_sparse, @function
is_sparse:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L11:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	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
	jne	.L9
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
.L9:
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L10
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L11
	mov	edx, DWORD PTR m[rip]
	mov	eax, DWORD PTR n[rip]
	imul	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR counter[rip]
	cmp	edx, eax
	jge	.L12
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L13
.L12:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	is_sparse, .-is_sparse
	.section	.rodata
.LC6:
	.string	"\nRows\tColumn\tValue"
.LC7:
	.string	"%d\t%d\t%d\t\n"
	.text
	.globl	tuple_matrix
	.type	tuple_matrix, @function
tuple_matrix:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	edx, DWORD PTR m[rip]
	mov	eax, DWORD PTR n[rip]
	imul	eax, edx
	mov	edx, DWORD PTR counter[rip]
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edx, DWORD PTR n[rip]
	mov	eax, DWORD PTR m[rip]
	mov	ecx, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L15
.L19:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L16
.L18:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	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	.L17
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	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]
	mov	edx, DWORD PTR -8[rbp]
	add	edx, 1
	mov	ecx, DWORD PTR -12[rbp]
	lea	esi, 1[rcx]
	mov	ecx, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	add	DWORD PTR -8[rbp], 1
.L16:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L18
	add	DWORD PTR -12[rbp], 1
.L15:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L19
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	tuple_matrix, .-tuple_matrix
	.globl	transpose_matrix
	.type	transpose_matrix, @function
transpose_matrix:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -8[rbp], 0
	jmp	.L21
.L24:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, A[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, A[rip]
	mov	DWORD PTR [rcx+rax], edx
	add	DWORD PTR -4[rbp], 1
.L22:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L23
	add	DWORD PTR -8[rbp], 1
.L21:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L24
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	transpose_matrix, .-transpose_matrix
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	insert_matrix
	mov	eax, 0
	call	is_sparse
	mov	eax, 0
	call	tuple_matrix
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"649927.c"
	.text
	.comm	A,40000,4
	.comm	m,4,4
	.comm	n,4,4
	.global	counter
	.bss
	.align	2
	.type	counter, %object
	.size	counter, 4
counter:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter dimensions of matrix: \000"
	.align	2
.LC1:
	.ascii	"%d %d\000"
	.align	2
.LC2:
	.ascii	"\012Enter elements:\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.text
	.align	2
	.global	insert_matrix
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_matrix, %function
insert_matrix:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L6
	bl	printf
	ldr	r2, .L6+4
	ldr	r1, .L6+8
	ldr	r0, .L6+12
	bl	__isoc99_scanf
	ldr	r0, .L6+16
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L6+20
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L6+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, .L6+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L6+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L5
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	n
	.word	m
	.word	.LC1
	.word	.LC2
	.word	A
	.word	.LC3
	.size	insert_matrix, .-insert_matrix
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\012Matrix is sparse\000"
	.align	2
.LC5:
	.ascii	"\012Matrix is not sparse\000"
	.text
	.align	2
	.global	is_sparse
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_sparse, %function
is_sparse:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L13:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L10
.L12:
	ldr	r1, .L16
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, 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
	bne	.L11
	ldr	r3, .L16+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L16+4
	str	r3, [r2]
.L11:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L10:
	ldr	r3, .L16+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r3, .L16+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L13
	ldr	r3, .L16+12
	ldr	r3, [r3]
	ldr	r2, .L16+8
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L14
	ldr	r0, .L16+16
	bl	puts
	b	.L15
.L14:
	ldr	r0, .L16+20
	bl	puts
.L15:
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	A
	.word	counter
	.word	n
	.word	m
	.word	.LC4
	.word	.LC5
	.size	is_sparse, .-is_sparse
	.section	.rodata
	.align	2
.LC6:
	.ascii	"\012Rows\011Column\011Value\000"
	.align	2
.LC7:
	.ascii	"%d\011%d\011%d\011\012\000"
	.text
	.align	2
	.global	tuple_matrix
	.syntax unified
	.arm
	.fpu softvfp
	.type	tuple_matrix, %function
tuple_matrix:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L24
	ldr	r3, [r3]
	ldr	r2, .L24+4
	ldr	r2, [r2]
	mul	r2, r3, r2
	ldr	r3, .L24+8
	ldr	r3, [r3]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, .L24+12
	bl	puts
	ldr	r3, .L24
	ldr	r1, [r3]
	ldr	r3, .L24+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r0, .L24+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L19
.L23:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L20
.L22:
	ldr	r1, .L24+20
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-16]
	add	r1, r3, #1
	ldr	r3, [fp, #-12]
	add	r0, r3, #1
	ldr	ip, .L24+20
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [ip, r3, lsl #2]
	mov	r2, r0
	ldr	r0, .L24+16
	bl	printf
.L21:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L20:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L22
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L19:
	ldr	r3, .L24
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L23
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	m
	.word	n
	.word	counter
	.word	.LC6
	.word	.LC7
	.word	A
	.size	tuple_matrix, .-tuple_matrix
	.align	2
	.global	transpose_matrix
	.syntax unified
	.arm
	.fpu softvfp
	.type	transpose_matrix, %function
transpose_matrix:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L27
.L30:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L28
.L29:
	ldr	r1, .L31
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r1, [r1, r3, lsl #2]
	ldr	r0, .L31
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	str	r1, [r0, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L28:
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L29
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L27:
	ldr	r3, .L31+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L30
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L32:
	.align	2
.L31:
	.word	A
	.word	n
	.word	m
	.size	transpose_matrix, .-transpose_matrix
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	insert_matrix
	bl	is_sparse
	bl	tuple_matrix
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
