	.file	"349790.c"
	.intel_syntax noprefix
	.text
	.globl	bracket
	.bss
	.align 32
	.type	bracket, @object
	.size	bracket, 400000000
bracket:
	.zero	400000000
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 400000000
m:
	.zero	400000000
	.section	.rodata
.LC0:
	.string	"A%d"
	.text
	.globl	printParenthesis
	.type	printParenthesis, @function
printParenthesis:
.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
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jne	.L2
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L2:
	mov	edi, 40
	call	putchar@PLT
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bracket[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	printParenthesis
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bracket[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, edx
	call	printParenthesis
	mov	edi, 41
	call	putchar@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	printParenthesis, .-printParenthesis
	.section	.rodata
	.align 8
.LC1:
	.string	"\nOptimal Parenthesization is : "
	.align 8
.LC2:
	.string	"\nMinimum number of multiplications is %d "
.LC3:
	.string	"\nM matrix is: \n"
.LC4:
	.string	"-\t "
.LC5:
	.string	"%d\t "
.LC6:
	.string	"\nS matrix is: \n"
	.text
	.globl	MatrixChainMultiplication
	.type	MatrixChainMultiplication, @function
MatrixChainMultiplication:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 1
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 40004
	lea	rdx, m[rip]
	mov	DWORD PTR [rax+rdx], 0
	add	DWORD PTR -20[rbp], 1
.L6:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L7
	mov	DWORD PTR -8[rbp], 2
	jmp	.L8
.L14:
	mov	DWORD PTR -20[rbp], 1
	jmp	.L9
.L13:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	sub	eax, 1
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, m[rip]
	mov	DWORD PTR [rdx+rax], 2147483647
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, m[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rsi, eax
	movsx	rax, edx
	imul	rax, rax, 10000
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, m[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	eax, DWORD PTR [rax]
	imul	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	eax, DWORD PTR [rax]
	imul	eax, edx
	add	eax, ecx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, m[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L11
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rcx, 0[0+rax*4]
	lea	rdx, m[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rcx, 0[0+rax*4]
	lea	rdx, bracket[rip]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rcx+rdx], eax
.L11:
	add	DWORD PTR -12[rbp], 1
.L10:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jg	.L12
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -20[rbp], 1
.L9:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L13
	add	DWORD PTR -8[rbp], 1
.L8:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L14
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	mov	esi, eax
	mov	edi, 1
	call	printParenthesis
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cdqe
	add	rax, 10000
	lea	rdx, 0[0+rax*4]
	lea	rax, m[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -20[rbp], 1
	jmp	.L15
.L20:
	mov	DWORD PTR -16[rbp], 1
	jmp	.L16
.L19:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L17
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L17:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, m[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	add	DWORD PTR -16[rbp], 1
.L16:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L19
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -20[rbp], 1
.L15:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L20
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -20[rbp], 1
	jmp	.L21
.L26:
	mov	DWORD PTR -16[rbp], 1
	jmp	.L22
.L25:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L23
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L24
.L23:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 10000
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bracket[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L24:
	add	DWORD PTR -16[rbp], 1
.L22:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L25
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -20[rbp], 1
.L21:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L26
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MatrixChainMultiplication, .-MatrixChainMultiplication
	.section	.rodata
.LC7:
	.string	"Enter number of matrices"
.LC8:
	.string	"%d"
.LC9:
	.string	"Enter dimensions "
.LC10:
	.string	"Enter d%d :: "
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r12
	push	rbx
	sub	rsp, 64
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	r12, rax
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, -68[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -68[rbp]
	add	eax, 1
	mov	DWORD PTR -68[rbp], eax
	mov	ebx, DWORD PTR -68[rbp]
	movsx	rax, ebx
	sub	rax, 1
	mov	QWORD PTR -56[rbp], rax
	movsx	rax, ebx
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], 0
	movsx	rax, ebx
	mov	r14, rax
	mov	r15d, 0
	movsx	rax, ebx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L28:
	cmp	rsp, rdx
	je	.L29
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L28
.L29:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L30
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L30:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -48[rbp], rax
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L31
.L32:
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -64[rbp], 1
.L31:
	mov	eax, DWORD PTR -68[rbp]
	cmp	DWORD PTR -64[rbp], eax
	jl	.L32
	movsx	rax, ebx
	sal	rax, 2
	shr	rax, 2
	mov	DWORD PTR -60[rbp], eax
	mov	edx, DWORD PTR -60[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	MatrixChainMultiplication
	mov	eax, 0
	mov	rsp, r12
	mov	rsi, QWORD PTR -40[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"349790.c"
	.text
	.comm	bracket,400000000,4
	.comm	m,400000000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"A%d\000"
	.text
	.align	2
	.global	printParenthesis
	.syntax unified
	.arm
	.fpu softvfp
	.type	printParenthesis, %function
printParenthesis:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bne	.L2
	ldr	r1, [fp, #-8]
	ldr	r0, .L5
	bl	printf
	b	.L4
.L2:
	mov	r0, #40
	bl	putchar
	ldr	r1, .L5+4
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	printParenthesis
	ldr	r1, .L5+4
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	add	r3, r3, #1
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	printParenthesis
	mov	r0, #41
	bl	putchar
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	bracket
	.size	printParenthesis, .-printParenthesis
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\012Optimal Parenthesization is : \000"
	.align	2
.LC2:
	.ascii	"\012Minimum number of multiplications is %d \000"
	.align	2
.LC3:
	.ascii	"\012M matrix is: \012\000"
	.align	2
.LC4:
	.ascii	"-\011 \000"
	.align	2
.LC5:
	.ascii	"%d\011 \000"
	.align	2
.LC6:
	.ascii	"\012S matrix is: \012\000"
	.text
	.align	2
	.global	MatrixChainMultiplication
	.syntax unified
	.arm
	.fpu softvfp
	.type	MatrixChainMultiplication, %function
MatrixChainMultiplication:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L8
.L9:
	ldr	r2, .L29
	ldr	r3, [fp, #-24]
	ldr	r1, .L29+4
	mul	r3, r1, r3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L9
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L10
.L16:
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L11
.L15:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r1, .L29
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	mvn	r2, #-2147483648
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	b	.L12
.L14:
	ldr	r1, .L29
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r3, r2
	ldr	r1, [r1, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	ldr	r0, .L29
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	add	r2, r1, r3
	ldr	r3, [fp, #-24]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-32]
	add	r1, r0, r1
	ldr	r1, [r1]
	mul	r3, r1, r3
	ldr	r1, [fp, #-20]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-32]
	add	r1, r0, r1
	ldr	r1, [r1]
	mul	r3, r1, r3
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, .L29
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L13
	ldr	r1, .L29
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r1, .L29+8
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
.L13:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bgt	.L14
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L11:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L15
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L16
	ldr	r0, .L29+12
	bl	printf
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	mov	r1, r3
	mov	r0, #1
	bl	printParenthesis
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, .L29
	add	r3, r3, #9984
	add	r3, r3, #16
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+16
	bl	printf
	ldr	r0, .L29+20
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L17
.L22:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L18
.L21:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L19
	ldr	r0, .L29+24
	bl	printf
	b	.L20
.L19:
	ldr	r1, .L29
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+28
	bl	printf
.L20:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L21
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L17:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L22
	ldr	r0, .L29+32
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L23
.L28:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L24
.L27:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L25
	ldr	r0, .L29+24
	bl	printf
	b	.L26
.L25:
	ldr	r1, .L29+8
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+28
	bl	printf
.L26:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L24:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L27
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L23:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L28
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	m
	.word	40004
	.word	bracket
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	MatrixChainMultiplication, .-MatrixChainMultiplication
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Enter number of matrices\000"
	.align	2
.LC8:
	.ascii	"%d\000"
	.align	2
.LC9:
	.ascii	"Enter dimensions \000"
	.align	2
.LC10:
	.ascii	"Enter d%d :: \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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r5, r3
	ldr	r0, .L36+4
	bl	puts
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L36+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r4, [fp, #-36]
	sub	r3, r4, #1
	str	r3, [fp, #-28]
	mov	r3, r4
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, r4
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, r4
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-24]
	ldr	r0, .L36+12
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L32
.L33:
	ldr	r1, [fp, #-32]
	ldr	r0, .L36+16
	bl	printf
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L36+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L32:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L33
	mov	r3, r4
	lsl	r3, r3, #2
	lsr	r3, r3, #2
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	MatrixChainMultiplication
	mov	r3, #0
	mov	sp, r5
	ldr	r2, .L36
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC11
	.word	.LC7
	.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
