	.file	"129545.c"
	.intel_syntax noprefix
	.text
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 400
p:
	.zero	400
	.globl	mt
	.align 32
	.type	mt, @object
	.size	mt, 40000
mt:
	.zero	40000
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 40000
st:
	.zero	40000
	.section	.rodata
.LC0:
	.string	"A%d "
	.text
	.globl	print_optimal
	.type	print_optimal, @function
print_optimal:
.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, 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	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, st[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	print_optimal
	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, st[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, edx
	call	print_optimal
	mov	edi, 41
	call	putchar@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_optimal, .-print_optimal
	.section	.rodata
.LC1:
	.string	"Enter no. of elements in p: "
.LC2:
	.string	"%d"
.LC3:
	.string	"Enter the value P %d "
.LC4:
	.string	"\n\n M Table \n"
.LC5:
	.string	"%d \t"
.LC6:
	.string	"\n\n S Table \n"
	.align 8
.LC7:
	.string	"\nHence minimum cost for multiplication will be = %d"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -32[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, p[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -32[rbp], 1
.L6:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L7
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	mov	DWORD PTR -16[rbp], eax
	mov	DWORD PTR -32[rbp], 1
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	imul	rax, rax, 404
	lea	rdx, mt[rip]
	mov	DWORD PTR [rax+rdx], 0
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	imul	rax, rax, 404
	lea	rdx, st[rip]
	mov	DWORD PTR [rax+rdx], 0
	add	DWORD PTR -32[rbp], 1
.L8:
	cmp	DWORD PTR -32[rbp], 4
	jle	.L9
	mov	DWORD PTR -20[rbp], 2
	jmp	.L10
.L16:
	mov	DWORD PTR -32[rbp], 1
	jmp	.L11
.L15:
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	sub	eax, 1
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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, mt[rip]
	mov	DWORD PTR [rdx+rax], 1000000
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -24[rbp], eax
	jmp	.L12
.L14:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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, mt[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rsi, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, mt[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	esi, [rcx+rax]
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, p[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, p[rip]
	mov	eax, DWORD PTR [rcx+rax]
	imul	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, p[rip]
	mov	eax, DWORD PTR [rcx+rax]
	imul	eax, edx
	add	eax, esi
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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, mt[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L13
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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	rcx, 0[0+rax*4]
	lea	rdx, mt[rip]
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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	rcx, 0[0+rax*4]
	lea	rdx, st[rip]
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR [rcx+rdx], eax
.L13:
	add	DWORD PTR -24[rbp], 1
.L12:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jg	.L14
	add	DWORD PTR -32[rbp], 1
.L11:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cmp	DWORD PTR -32[rbp], eax
	jle	.L15
	add	DWORD PTR -20[rbp], 1
.L10:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L16
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -32[rbp], 1
	jmp	.L17
.L20:
	mov	DWORD PTR -28[rbp], 1
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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, mt[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L18:
	cmp	DWORD PTR -28[rbp], 4
	jle	.L19
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -32[rbp], 1
.L17:
	cmp	DWORD PTR -32[rbp], 4
	jle	.L20
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -32[rbp], 1
	jmp	.L21
.L24:
	mov	DWORD PTR -28[rbp], 1
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -32[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, st[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L22:
	cmp	DWORD PTR -28[rbp], 4
	jle	.L23
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -32[rbp], 1
.L21:
	cmp	DWORD PTR -32[rbp], 4
	jle	.L24
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	mov	edi, 1
	call	print_optimal
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 100
	lea	rdx, 0[0+rax*4]
	lea	rax, mt[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"129545.c"
	.text
	.comm	p,400,4
	.comm	mt,40000,4
	.comm	st,40000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"A%d \000"
	.text
	.align	2
	.global	print_optimal
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_optimal, %function
print_optimal:
	@ 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, #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]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	print_optimal
	ldr	r1, .L5+4
	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	r3, [r1, r3, lsl #2]
	add	r3, r3, #1
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	print_optimal
	mov	r0, #41
	bl	putchar
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	st
	.size	print_optimal, .-print_optimal
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Enter no. of elements in p: \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Enter the value P %d \000"
	.align	2
.LC4:
	.ascii	"\012\012 M Table \012\000"
	.align	2
.LC5:
	.ascii	"%d \011\000"
	.align	2
.LC6:
	.ascii	"\012\012 S Table \012\000"
	.align	2
.LC7:
	.ascii	"\012Hence minimum cost for multiplication will be ="
	.ascii	" %d\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L29+4
	bl	printf
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L29+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L8
.L9:
	ldr	r1, [fp, #-32]
	ldr	r0, .L29+12
	bl	printf
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, .L29+16
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L29+8
	bl	__isoc99_scanf
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L8:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L9
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L10
.L11:
	ldr	r2, .L29+20
	ldr	r3, [fp, #-32]
	mov	r1, #404
	mul	r3, r1, r3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, .L29+24
	ldr	r3, [fp, #-32]
	mov	r1, #404
	mul	r3, r1, r3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L10:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L11
	mov	r3, #2
	str	r3, [fp, #-20]
	b	.L12
.L18:
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L13
.L17:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r1, .L29+20
	ldr	r2, [fp, #-32]
	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, #-28]
	add	r3, r3, r2
	ldr	r2, .L29+28
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	b	.L14
.L16:
	ldr	r1, .L29+20
	ldr	r2, [fp, #-32]
	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, #-24]
	add	r3, r3, r2
	ldr	r1, [r1, r3, lsl #2]
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	ldr	r0, .L29+20
	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, #-28]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	add	r2, r1, r3
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	ldr	r1, .L29+16
	ldr	r3, [r1, r3, lsl #2]
	ldr	r0, .L29+16
	ldr	r1, [fp, #-24]
	ldr	r1, [r0, r1, lsl #2]
	mul	r3, r1, r3
	ldr	r0, .L29+16
	ldr	r1, [fp, #-28]
	ldr	r1, [r0, r1, lsl #2]
	mul	r3, r1, r3
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r1, .L29+20
	ldr	r2, [fp, #-32]
	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, #-28]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L15
	ldr	r1, .L29+20
	ldr	r2, [fp, #-32]
	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, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
	ldr	r1, .L29+24
	ldr	r2, [fp, #-32]
	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, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-24]
	str	r2, [r1, r3, lsl #2]
.L15:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L14:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bgt	.L16
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L13:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	ble	.L17
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L18
	ldr	r0, .L29+32
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L19
.L22:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L20
.L21:
	ldr	r1, .L29+20
	ldr	r2, [fp, #-32]
	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, #-28]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+36
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L20:
	ldr	r3, [fp, #-28]
	cmp	r3, #4
	ble	.L21
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L19:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L22
	ldr	r0, .L29+40
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L23
.L26:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L24
.L25:
	ldr	r1, .L29+24
	ldr	r2, [fp, #-32]
	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, #-28]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+36
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L24:
	ldr	r3, [fp, #-28]
	cmp	r3, #4
	ble	.L25
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L23:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L26
	ldr	r1, [fp, #-16]
	mov	r0, #1
	bl	print_optimal
	ldr	r2, .L29+20
	ldr	r3, [fp, #-16]
	add	r3, r3, #100
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+44
	bl	printf
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC8
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	p
	.word	mt
	.word	st
	.word	1000000
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
