	.file	"122115.c"
	.intel_syntax noprefix
	.text
	.globl	cost
	.bss
	.align 4
	.type	cost, @object
	.size	cost, 4
cost:
	.zero	4
	.globl	array_cost
	.align 8
	.type	array_cost, @object
	.size	array_cost, 8
array_cost:
	.zero	8
	.globl	length
	.align 4
	.type	length, @object
	.size	length, 4
length:
	.zero	4
	.text
	.globl	search
	.type	search, @function
search:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	QWORD PTR [rax], 0
	mov	DWORD PTR cost[rip], 0
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L5
.L2:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR cost[rip]
	add	eax, 1
	mov	DWORD PTR cost[rip], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L4
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	search, .-search
	.globl	move_to_front
	.type	move_to_front, @function
move_to_front:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jne	.L7
	mov	eax, 1
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	search
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR cost[rip]
	add	eax, 1
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	move_to_front, .-move_to_front
	.globl	transpose
	.type	transpose, @function
transpose:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jne	.L10
	mov	eax, 1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -44[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	search
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L12
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
.L13:
	mov	eax, DWORD PTR cost[rip]
	add	eax, 1
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	transpose, .-transpose
	.globl	count
	.type	count, @function
count:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	cmp	QWORD PTR -104[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L16
.L15:
	mov	eax, 0
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jne	.L18
	mov	rax, QWORD PTR array_cost[rip]
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 4[rax]
	add	edx, 1
	mov	DWORD PTR 4[rax], edx
	mov	eax, 1
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jne	.L19
	mov	rax, QWORD PTR array_cost[rip]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR array_cost[rip]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	je	.L20
	mov	rax, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR [rax]
	mov	rdx, QWORD PTR array_cost[rip]
	add	rdx, 4
	mov	edx, DWORD PTR [rdx]
	add	edx, 1
	cmp	eax, edx
	jne	.L21
.L20:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	add	rax, 8
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 4[rax]
	add	edx, 1
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR array_cost[rip]
	add	rax, 4
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR array_cost[rip]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR array_cost[rip]
	lea	rdx, 4[rax]
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L22
.L21:
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR 4[rax]
	add	edx, 1
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR array_cost[rip]
	add	rax, 4
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
.L22:
	mov	eax, 2
	jmp	.L17
.L19:
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	DWORD PTR -96[rbp], 0
	mov	DWORD PTR cost[rip], 0
	jmp	.L23
.L26:
	add	DWORD PTR -96[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	je	.L38
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR cost[rip]
	add	eax, 1
	mov	DWORD PTR cost[rip], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
.L23:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L26
	jmp	.L25
.L38:
	nop
.L25:
	mov	rdx, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 2
	sub	rax, 4
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -92[rbp], 0
	mov	esi, 8
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	esi, 8
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	DWORD PTR -88[rbp], 0
.L30:
	add	DWORD PTR -88[rbp], 1
	mov	rdx, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	sal	rax, 2
	sub	rax, 4
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jge	.L39
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -92[rbp], 1
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L29
	mov	eax, 0
	jmp	.L17
.L29:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L30
.L39:
	nop
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	DWORD PTR -92[rbp], 0
	je	.L31
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -72[rbp], rax
.L31:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 4[rax]
	add	edx, 1
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 8[rax], rdx
	cmp	DWORD PTR -88[rbp], 0
	je	.L32
	mov	eax, DWORD PTR -96[rbp]
	sub	eax, 1
	mov	DWORD PTR -84[rbp], eax
	jmp	.L33
.L34:
	mov	rdx, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -80[rbp], eax
	mov	rdx, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	sal	rax, 2
	sub	rax, 4
	add	rax, rdx
	mov	rcx, QWORD PTR array_cost[rip]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	rdx, QWORD PTR array_cost[rip]
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	sal	rax, 2
	sub	rax, 4
	add	rdx, rax
	mov	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -84[rbp], 1
.L33:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -84[rbp]
	jle	.L34
	jmp	.L37
.L32:
	mov	eax, 0
	jmp	.L17
.L37:
	mov	eax, DWORD PTR cost[rip]
	add	eax, 1
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	count, .-count
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -72[rbp], 0
	lea	rsi, length[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -88[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR length[rip]
	cdqe
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR array_cost[rip], rax
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -68[rbp], 1
	jmp	.L41
.L42:
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -68[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -68[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -68[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -68[rbp], 1
.L41:
	mov	eax, DWORD PTR length[rip]
	cmp	DWORD PTR -68[rbp], eax
	jl	.L42
	mov	DWORD PTR -68[rbp], 0
	jmp	.L43
.L47:
	lea	rax, -84[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -84[rbp]
	mov	eax, DWORD PTR length[rip]
	cmp	edx, eax
	jg	.L44
	mov	eax, DWORD PTR -84[rbp]
	test	eax, eax
	jg	.L45
.L44:
	mov	eax, 0
	jmp	.L48
.L45:
	lea	rax, -64[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -84[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	move_to_front
	add	DWORD PTR -80[rbp], eax
	lea	rax, -56[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -84[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	transpose
	add	DWORD PTR -76[rbp], eax
	lea	rax, -48[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -84[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	count
	add	DWORD PTR -72[rbp], eax
	add	DWORD PTR -68[rbp], 1
.L43:
	mov	eax, DWORD PTR -88[rbp]
	cmp	DWORD PTR -68[rbp], eax
	jl	.L47
	mov	ecx, DWORD PTR -72[rbp]
	mov	edx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L48:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L49
	call	__stack_chk_fail@PLT
.L49:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"122115.c"
	.text
	.comm	cost,4,4
	.comm	array_cost,4,4
	.comm	length,4,4
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ 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]
	str	r1, [fp, #-20]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L6
	mov	r2, #0
	str	r2, [r3]
.L4:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L2
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	b	.L5
.L2:
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #4]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, .L6
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L6
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	b	.L4
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	cost
	.size	search, .-search
	.align	2
	.global	move_to_front
	.syntax unified
	.arm
	.fpu softvfp
	.type	move_to_front, %function
move_to_front:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L9
	mov	r3, #1
	b	.L10
.L9:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	search
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L11
	ldr	r3, [r3]
	add	r3, r3, #1
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	cost
	.size	move_to_front, .-move_to_front
	.align	2
	.global	transpose
	.syntax unified
	.arm
	.fpu softvfp
	.type	transpose, %function
transpose:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L14
	mov	r3, #1
	b	.L15
.L14:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	search
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #8]
	b	.L17
.L16:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #8]
.L17:
	ldr	r3, .L18
	ldr	r3, [r3]
	add	r3, r3, #1
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	cost
	.size	transpose, .-transpose
	.align	2
	.global	count
	.syntax unified
	.arm
	.fpu softvfp
	.type	count, %function
count:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
.L21:
	mov	r3, #0
	b	.L23
.L22:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	bne	.L24
	ldr	r3, .L46
	ldr	r3, [r3]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	add	r2, r2, #1
	str	r2, [r3, #4]
	mov	r3, #1
	b	.L23
.L24:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	bne	.L25
	ldr	r3, .L46
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L46
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L26
	ldr	r3, .L46
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L46
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	cmp	r2, r3
	bne	.L27
.L26:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	add	r3, r3, #8
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	add	r3, r3, #8
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	add	r2, r2, #1
	str	r2, [r3, #4]
	ldr	r3, .L46
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L46
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, .L46
	ldr	r3, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L46
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L28
.L27:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, [r3, #4]
	add	r2, r2, #1
	str	r2, [r3, #4]
	ldr	r3, .L46
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
.L28:
	mov	r3, #2
	b	.L23
.L25:
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-60]
	ldr	r3, .L46+4
	mov	r2, #0
	str	r2, [r3]
	b	.L29
.L32:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	beq	.L44
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	ldr	r2, [fp, #-40]
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L46+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L46+4
	str	r3, [r2]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-40]
	str	r2, [r3]
.L29:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L32
	b	.L31
.L44:
	nop
.L31:
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [fp, #-60]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r1, #4
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	mov	r1, #4
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-48]
.L36:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [fp, #-60]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bge	.L45
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	add	r3, r3, #8
	str	r3, [fp, #-52]
	mov	r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L35
	mov	r3, #0
	b	.L23
.L35:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	b	.L36
.L45:
	nop
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L37
	ldr	r3, [fp, #-52]
	str	r3, [fp, #-64]
.L37:
	ldr	r3, [fp, #-64]
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-64]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	add	r2, r2, #1
	str	r2, [r3, #4]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L39
.L40:
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L46
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
.L39:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	ble	.L40
	b	.L43
.L38:
	mov	r3, #0
	b	.L23
.L43:
	ldr	r3, .L46+4
	ldr	r3, [r3]
	add	r3, r3, #1
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	array_cost
	.word	cost
	.size	count, .-count
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d %d %d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r1, .L58+4
	ldr	r0, .L58+8
	bl	__isoc99_scanf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L58+8
	bl	__isoc99_scanf
	ldr	r3, .L58+4
	ldr	r3, [r3]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L58+12
	str	r2, [r3]
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	str	r3, [fp, #-24]
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-20]
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L49
.L50:
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-20]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L49:
	ldr	r3, .L58+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L50
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L51
.L55:
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, .L58+8
	bl	__isoc99_scanf
	ldr	r2, [fp, #-56]
	ldr	r3, .L58+4
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L52
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bgt	.L53
.L52:
	mov	r3, #0
	b	.L56
.L53:
	sub	r3, fp, #52
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	move_to_front
	mov	r2, r0
	ldr	r3, [fp, #-40]
	add	r3, r3, r2
	str	r3, [fp, #-40]
	sub	r3, fp, #48
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	transpose
	mov	r2, r0
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	str	r3, [fp, #-36]
	sub	r3, fp, #44
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	count
	mov	r2, r0
	ldr	r3, [fp, #-32]
	add	r3, r3, r2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L51:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L55
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-40]
	ldr	r0, .L58+16
	bl	printf
	mov	r3, #0
.L56:
	ldr	r2, .L58
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC2
	.word	length
	.word	.LC0
	.word	array_cost
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
