	.file	"659690.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	" \r\n Master : Linux : Printing results \r"
.LC1:
	.string	" %d "
.LC2:
	.string	"\r"
	.text
	.type	matrix_print, @function
matrix_print:
.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
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	add	rax, rax
	add	rax, rsi
	mov	eax, DWORD PTR 4[rdx+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cmp	edx, eax
	ja	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cmp	edx, eax
	ja	.L5
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	matrix_print, .-matrix_print
	.section	.rodata
	.align 8
.LC3:
	.string	" \r\n Master : Linux : Input matrix %d \r\n"
	.text
	.type	generate_matrices, @function
generate_matrices:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -56[rbp], esi
	mov	QWORD PTR -64[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -40[rbp], 0
	jmp	.L8
.L11:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L9
.L10:
	call	rand@PLT
	cdqe
	and	eax, 127
	mov	QWORD PTR -16[rbp], rax
	mov	rcx, QWORD PTR -16[rbp]
	movabs	rdx, -3689348814741910323
	mov	rax, rcx
	mul	rdx
	shr	rdx, 3
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	sub	rcx, rax
	mov	rdx, rcx
	mov	QWORD PTR -16[rbp], rdx
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdi, eax
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rax
	add	rax, rdi
	mov	DWORD PTR 4[rcx+rax*4], esi
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rax
	add	rax, rsi
	mov	eax, DWORD PTR 4[rcx+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -36[rbp], 1
.L9:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -56[rbp], eax
	ja	.L10
	add	DWORD PTR -40[rbp], 1
.L8:
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -56[rbp], eax
	ja	.L11
	lea	rdi, .LC2[rip]
	call	puts@PLT
	add	DWORD PTR -44[rbp], 1
.L7:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L12
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	generate_matrices, .-generate_matrices
	.local	ui_thread
	.comm	ui_thread,8,8
	.local	compute_thread
	.comm	compute_thread,8,8
	.local	sync_lock
	.comm	sync_lock,40,32
	.local	fd
	.comm	fd,4,4
	.local	compute_flag
	.comm	compute_flag,4,4
	.local	i_matrix
	.comm	i_matrix,296,32
	.local	r_matrix
	.comm	r_matrix,148,32
	.section	.rodata
	.align 8
.LC4:
	.string	"\r\n **************************************** \r"
	.align 8
.LC5:
	.string	" Please enter command and press enter key\r"
	.align 8
.LC6:
	.string	" **************************************** \r"
	.align 8
.LC7:
	.string	" 1 - Generates random 6x6 matrices and transmits"
	.align 8
.LC8:
	.string	" them to remote core over rpmsg .. \r"
	.align 8
.LC9:
	.string	" 2 - Quit this application .. \r"
.LC10:
	.string	" CMD>"
.LC11:
	.string	"%d"
.LC12:
	.string	"\r\n invalid command\r"
	.align 8
.LC13:
	.string	"\r\n Compute thread unblocked .. \r"
	.align 8
.LC14:
	.string	" The compute thread is now blocking on"
.LC15:
	.string	"a read() from rpmsg device \r"
	.align 8
.LC16:
	.string	"\r\n Generating random matrices now ... \r"
	.align 8
.LC17:
	.string	"\r\n Writing generated matrices to rpmsg "
	.align 8
.LC18:
	.string	"rpmsg device, %d bytes written .. \r\n"
.LC19:
	.string	"\r\n Quitting application .. \r"
	.align 8
.LC20:
	.string	" Matrix multiplication demo end \r"
.LC21:
	.string	"\r\n invalid command! \r"
	.text
	.globl	ui_thread_entry
	.type	ui_thread_entry, @function
ui_thread_entry:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 1
	jmp	.L15
.L22:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L16
.L19:
	call	getchar@PLT
	cmp	eax, 10
	je	.L26
	jmp	.L19
.L26:
	nop
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 1
	jne	.L20
	mov	DWORD PTR compute_flag[rip], 1
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	lea	rdx, i_matrix[rip]
	mov	esi, 6
	mov	edi, 2
	call	generate_matrices
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 296
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR fd[rip]
	mov	edx, 296
	lea	rsi, i_matrix[rip]
	mov	edi, eax
	call	write@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L15
.L20:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 2
	jne	.L21
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR compute_flag[rip], 0
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L15
.L21:
	lea	rdi, .LC21[rip]
	call	puts@PLT
.L15:
	cmp	DWORD PTR -16[rbp], 0
	jne	.L22
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ui_thread_entry, .-ui_thread_entry
	.section	.rodata
	.align 8
.LC22:
	.string	"\r\n Received results! - %d bytes from "
	.align 8
.LC23:
	.string	"rpmsg device (transmitted from remote context) \r"
	.text
	.globl	compute_thread_entry
	.type	compute_thread_entry, @function
compute_thread_entry:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L28
.L29:
	mov	eax, DWORD PTR fd[rip]
	mov	edx, 148
	lea	rsi, r_matrix[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, 147
	jbe	.L29
	cmp	DWORD PTR -4[rbp], 0
	js	.L29
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	lea	rdi, r_matrix[rip]
	call	matrix_print
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_lock@PLT
.L28:
	mov	eax, DWORD PTR compute_flag[rip]
	cmp	eax, 1
	je	.L29
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	compute_thread_entry, .-compute_thread_entry
	.section	.rodata
.LC24:
	.string	"/dev/rpmsg0"
	.align 8
.LC25:
	.string	"getopt return unsupported option: -%c\n"
.LC26:
	.string	"d:"
	.align 8
.LC27:
	.string	"\r\n Matrix multiplication demo start \r"
.LC28:
	.string	"\r\n Open rpmsg dev! \r"
.LC29:
	.string	"\r\n Query internal info .. \r"
	.align 8
.LC30:
	.string	" rpmsg kernel fifo size = %u \r\n"
	.align 8
.LC31:
	.string	" rpmsg kernel fifo free space = %u \r\n"
	.align 8
.LC32:
	.string	"\r\n mutex initialization failure \r"
	.align 8
.LC33:
	.string	"\r\n Creating ui_thread and compute_thread ... \r"
.LC34:
	.string	"ui_thread"
.LC35:
	.string	"compute_thread"
	.align 8
.LC36:
	.string	" Matrix multiply application end \r"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -24[rbp], -279534246
	lea	rax, .LC24[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L32
.L34:
	cmp	DWORD PTR -20[rbp], 100
	jne	.L33
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L32:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	lea	rdx, .LC26[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L34
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	lea	rdi, .LC29[rip]
	call	puts@PLT
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -28[rbp]
	mov	esi, 1
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -28[rbp]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 0
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_init@PLT
	test	eax, eax
	je	.L35
	lea	rdi, .LC32[rip]
	call	puts@PLT
.L35:
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC33[rip]
	call	puts@PLT
	lea	rcx, .LC34[rip]
	lea	rdx, ui_thread_entry[rip]
	mov	esi, 0
	lea	rdi, ui_thread[rip]
	call	pthread_create@PLT
	lea	rcx, .LC35[rip]
	lea	rdx, compute_thread_entry[rip]
	mov	esi, 0
	lea	rdi, compute_thread[rip]
	call	pthread_create@PLT
	mov	rax, QWORD PTR ui_thread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR compute_thread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, DWORD PTR fd[rip]
	lea	rcx, -24[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC36[rip]
	call	puts@PLT
	mov	eax, DWORD PTR fd[rip]
	mov	edi, eax
	call	close@PLT
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_destroy@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	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	"659690.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	" \015\012 Master : Linux : Printing results \015\000"
	.align	2
.LC1:
	.ascii	" %d \000"
	.align	2
.LC2:
	.ascii	"\015\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	matrix_print, %function
matrix_print:
	@ 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	r0, .L6
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r1, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L6+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bhi	.L4
	ldr	r0, .L6+8
	bl	puts
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L5
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	matrix_print, .-matrix_print
	.section	.rodata
	.align	2
.LC3:
	.ascii	" \015\012 Master : Linux : Input matrix %d \015\012"
	.ascii	"\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_matrices, %function
generate_matrices:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-16]
	sub	r3, fp, #32
	mov	r0, r3
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L9
.L14:
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-44]
	str	r2, [r3]
	ldr	r1, [fp, #-28]
	ldr	r0, .L16+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L10
.L13:
	ldr	r0, .L16+8
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L11
.L12:
	bl	rand
	mov	r3, r0
	and	r3, r3, #127
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, .L16+12
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r1, r3, r2
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r1, r3, r2
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L16+16
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	bhi	.L12
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L10:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	bhi	.L13
	ldr	r0, .L16+8
	bl	puts
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L9:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L14
	nop
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC4
	.word	.LC3
	.word	.LC2
	.word	-858993459
	.word	.LC1
	.size	generate_matrices, .-generate_matrices
	.local	ui_thread
	.comm	ui_thread,4,4
	.local	compute_thread
	.comm	compute_thread,4,4
	.local	sync_lock
	.comm	sync_lock,24,4
	.local	fd
	.comm	fd,4,4
	.local	compute_flag
	.comm	compute_flag,4,4
	.local	i_matrix
	.comm	i_matrix,296,4
	.local	r_matrix
	.comm	r_matrix,148,4
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\015\012 **************************************** \015"
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	" Please enter command and press enter key\015\000"
	.align	2
.LC7:
	.ascii	" **************************************** \015\000"
	.align	2
.LC8:
	.ascii	" 1 - Generates random 6x6 matrices and transmits\000"
	.align	2
.LC9:
	.ascii	" them to remote core over rpmsg .. \015\000"
	.align	2
.LC10:
	.ascii	" 2 - Quit this application .. \015\000"
	.align	2
.LC11:
	.ascii	" CMD>\000"
	.align	2
.LC12:
	.ascii	"%d\000"
	.align	2
.LC13:
	.ascii	"\015\012 invalid command\015\000"
	.align	2
.LC14:
	.ascii	"\015\012 Compute thread unblocked .. \015\000"
	.align	2
.LC15:
	.ascii	" The compute thread is now blocking on\000"
	.align	2
.LC16:
	.ascii	"a read() from rpmsg device \015\000"
	.align	2
.LC17:
	.ascii	"\015\012 Generating random matrices now ... \015\000"
	.align	2
.LC18:
	.ascii	"\015\012 Writing generated matrices to rpmsg \000"
	.align	2
.LC19:
	.ascii	"rpmsg device, %d bytes written .. \015\012\000"
	.align	2
.LC20:
	.ascii	"\015\012 Quitting application .. \015\000"
	.align	2
.LC21:
	.ascii	" Matrix multiplication demo end \015\000"
	.align	2
.LC22:
	.ascii	"\015\012 invalid command! \015\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ui_thread_entry
	.syntax unified
	.arm
	.fpu softvfp
	.type	ui_thread_entry, %function
ui_thread_entry:
	@ 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]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L19
.L26:
	ldr	r0, .L31+4
	bl	puts
	ldr	r0, .L31+8
	bl	puts
	ldr	r0, .L31+12
	bl	puts
	ldr	r0, .L31+16
	bl	printf
	ldr	r0, .L31+20
	bl	puts
	ldr	r0, .L31+24
	bl	puts
	ldr	r0, .L31+28
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L31+32
	bl	__isoc99_scanf
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L20
.L23:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	beq	.L30
	b	.L23
.L30:
	nop
	ldr	r0, .L31+36
	bl	puts
	b	.L19
.L20:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L24
	ldr	r3, .L31+40
	mov	r2, #1
	str	r2, [r3]
	ldr	r0, .L31+44
	bl	pthread_mutex_unlock
	ldr	r0, .L31+48
	bl	puts
	ldr	r0, .L31+52
	bl	printf
	ldr	r0, .L31+56
	bl	puts
	ldr	r0, .L31+60
	bl	puts
	ldr	r2, .L31+64
	mov	r1, #6
	mov	r0, #2
	bl	generate_matrices
	ldr	r0, .L31+68
	bl	printf
	mov	r1, #296
	ldr	r0, .L31+72
	bl	printf
	ldr	r3, .L31+76
	ldr	r3, [r3]
	mov	r2, #296
	ldr	r1, .L31+64
	mov	r0, r3
	bl	write
	mov	r0, #1
	bl	sleep
	b	.L19
.L24:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L25
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L31+40
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L31+44
	bl	pthread_mutex_unlock
	ldr	r0, .L31+80
	bl	puts
	ldr	r0, .L31+84
	bl	puts
	b	.L19
.L25:
	ldr	r0, .L31+88
	bl	puts
.L19:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
	ldr	r2, .L31
	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}
.L32:
	.align	2
.L31:
	.word	.LC23
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	compute_flag
	.word	sync_lock
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	i_matrix
	.word	.LC18
	.word	.LC19
	.word	fd
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	ui_thread_entry, .-ui_thread_entry
	.section	.rodata
	.align	2
.LC24:
	.ascii	"\015\012 Received results! - %d bytes from \000"
	.align	2
.LC25:
	.ascii	"rpmsg device (transmitted from remote context) \015"
	.ascii	"\000"
	.text
	.align	2
	.global	compute_thread_entry
	.syntax unified
	.arm
	.fpu softvfp
	.type	compute_thread_entry, %function
compute_thread_entry:
	@ 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	r0, .L37
	bl	pthread_mutex_lock
	b	.L34
.L35:
	ldr	r3, .L37+4
	ldr	r3, [r3]
	mov	r2, #148
	ldr	r1, .L37+8
	mov	r0, r3
	bl	read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #147
	bls	.L35
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L35
	ldr	r1, [fp, #-8]
	ldr	r0, .L37+12
	bl	printf
	ldr	r0, .L37+16
	bl	puts
	ldr	r0, .L37+8
	bl	matrix_print
	ldr	r0, .L37
	bl	pthread_mutex_lock
.L34:
	ldr	r3, .L37+20
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L35
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	sync_lock
	.word	fd
	.word	r_matrix
	.word	.LC24
	.word	.LC25
	.word	compute_flag
	.size	compute_thread_entry, .-compute_thread_entry
	.section	.rodata
	.align	2
.LC26:
	.ascii	"/dev/rpmsg0\000"
	.align	2
.LC27:
	.ascii	"getopt return unsupported option: -%c\012\000"
	.align	2
.LC28:
	.ascii	"d:\000"
	.align	2
.LC29:
	.ascii	"\015\012 Matrix multiplication demo start \015\000"
	.align	2
.LC30:
	.ascii	"\015\012 Open rpmsg dev! \015\000"
	.align	2
.LC31:
	.ascii	"\015\012 Query internal info .. \015\000"
	.align	2
.LC32:
	.ascii	" rpmsg kernel fifo size = %u \015\012\000"
	.align	2
.LC33:
	.ascii	" rpmsg kernel fifo free space = %u \015\012\000"
	.align	2
.LC34:
	.ascii	"\015\012 mutex initialization failure \015\000"
	.align	2
.LC35:
	.ascii	"\015\012 Creating ui_thread and compute_thread ... "
	.ascii	"\015\000"
	.align	2
.LC36:
	.ascii	"ui_thread\000"
	.align	2
.LC37:
	.ascii	"compute_thread\000"
	.align	2
.LC38:
	.ascii	" Matrix multiply application end \015\000"
	.align	2
.LC39:
	.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
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L46
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L46+4
	str	r3, [fp, #-20]
	ldr	r3, .L46+8
	str	r3, [fp, #-16]
	b	.L40
.L42:
	ldr	r3, [fp, #-12]
	cmp	r3, #100
	bne	.L41
	ldr	r3, .L46+12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L40
.L41:
	ldr	r1, [fp, #-12]
	ldr	r0, .L46+16
	bl	printf
	nop
.L40:
	ldr	r2, .L46+20
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	getopt
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L42
	ldr	r0, .L46+24
	bl	puts
	ldr	r0, .L46+28
	bl	puts
	mov	r1, #2
	ldr	r0, [fp, #-16]
	bl	open
	mov	r3, r0
	ldr	r2, .L46+32
	str	r3, [r2]
	ldr	r0, .L46+36
	bl	puts
	ldr	r3, .L46+32
	ldr	r3, [r3]
	sub	r2, fp, #24
	mov	r1, #1
	mov	r0, r3
	bl	ioctl
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L46+40
	bl	printf
	ldr	r3, .L46+32
	ldr	r3, [r3]
	sub	r2, fp, #24
	mov	r1, #3
	mov	r0, r3
	bl	ioctl
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L46+44
	bl	printf
	mov	r1, #0
	ldr	r0, .L46+48
	bl	pthread_mutex_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L43
	ldr	r0, .L46+52
	bl	puts
.L43:
	ldr	r0, .L46+48
	bl	pthread_mutex_lock
	ldr	r0, .L46+56
	bl	puts
	ldr	r3, .L46+60
	ldr	r2, .L46+64
	mov	r1, #0
	ldr	r0, .L46+68
	bl	pthread_create
	ldr	r3, .L46+72
	ldr	r2, .L46+76
	mov	r1, #0
	ldr	r0, .L46+80
	bl	pthread_create
	ldr	r3, .L46+68
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L46+80
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L46+32
	ldr	r3, [r3]
	sub	r1, fp, #20
	mov	r2, #4
	mov	r0, r3
	bl	write
	mov	r0, #1
	bl	sleep
	ldr	r0, .L46+84
	bl	puts
	ldr	r0, .L46+88
	bl	puts
	ldr	r3, .L46+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r0, .L46+48
	bl	pthread_mutex_destroy
	mov	r3, #0
	ldr	r2, .L46
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L45
	bl	__stack_chk_fail
.L45:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC39
	.word	-279534246
	.word	.LC26
	.word	optarg
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	fd
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	sync_lock
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	ui_thread_entry
	.word	ui_thread
	.word	.LC37
	.word	compute_thread_entry
	.word	compute_thread
	.word	.LC20
	.word	.LC38
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
