	.file	"863748.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
	.data
	.align 4
	.type	charfd, @object
	.size	charfd, 4
charfd:
	.long	-1
	.local	fd
	.comm	fd,4,4
	.local	compute_flag
	.comm	compute_flag,4,4
	.align 4
	.type	ntimes, @object
	.size	ntimes, 4
ntimes:
	.long	1
	.local	i_matrix
	.comm	i_matrix,296,32
	.local	r_matrix
	.comm	r_matrix,148,32
	.section	.rodata
	.align 8
.LC4:
	.string	"\r\n **********************************"
.LC5:
	.string	"****\r"
	.align 8
.LC6:
	.string	"\r\n  Matrix multiplication demo Round %d \r\n"
	.align 8
.LC7:
	.string	"\r\n Compute thread unblocked .. \r"
	.align 8
.LC8:
	.string	" The compute thread is now blocking on"
.LC9:
	.string	"a read() from rpmsg device \r"
	.align 8
.LC10:
	.string	"\r\n Generating random matrices now ... \r"
	.align 8
.LC11:
	.string	"\r\n Writing generated matrices to rpmsg "
.LC12:
	.string	"rpmsg device, %d bytes .. \r\n"
	.align 8
.LC13:
	.string	"\r\nEnd of Matrix multiplication demo Round %d \r\n"
.LC14:
	.string	"\r\n Quitting application .. \r"
	.align 8
.LC15:
	.string	" Matrix multiplication demo end \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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L15
.L16:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	DWORD PTR compute_flag[rip], 1
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdx, i_matrix[rip]
	mov	esi, 6
	mov	edi, 2
	call	generate_matrices
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 296
	lea	rdi, .LC12[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
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L15:
	mov	eax, DWORD PTR ntimes[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L16
	mov	DWORD PTR compute_flag[rip], 0
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ui_thread_entry, .-ui_thread_entry
	.section	.rodata
	.align 8
.LC16:
	.string	"\r\n Received results! - %d bytes from "
	.align 8
.LC17:
	.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	.L19
.L20:
	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	.L20
	cmp	DWORD PTR -4[rbp], 0
	js	.L20
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC17[rip]
	call	puts@PLT
	lea	rdi, r_matrix[rip]
	call	matrix_print
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_lock@PLT
.L19:
	mov	eax, DWORD PTR compute_flag[rip]
	cmp	eax, 1
	je	.L20
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	compute_thread_entry, .-compute_thread_entry
	.section	.rodata
.LC18:
	.string	"Failed to create endpoint.\n"
	.text
	.globl	rpmsg_create_ept
	.type	rpmsg_create_ept, @function
rpmsg_create_ept:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 1076409601
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L23
	lea	rdi, .LC18[rip]
	call	perror@PLT
.L23:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	rpmsg_create_ept, .-rpmsg_create_ept
	.section	.rodata
.LC19:
	.string	"/sys/class/rpmsg"
.LC20:
	.string	"%s/%s/rpmsg%d/name"
.LC21:
	.string	"checking %s\n"
.LC22:
	.string	"r"
.LC23:
	.string	"failed to open %s\n"
.LC24:
	.string	"svc_name: %s.\n"
.LC25:
	.string	"rpmsg%d"
	.align 8
.LC26:
	.string	"Not able to RPMsg endpoint file for %s:%s.\n"
	.text
	.globl	get_rpmsg_ept_dev_name
	.type	get_rpmsg_ept_dev_name, @function
get_rpmsg_ept_dev_name:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	QWORD PTR -184[rbp], rdi
	mov	QWORD PTR -192[rbp], rsi
	mov	QWORD PTR -200[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC19[rip]
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -168[rbp], 0
	jmp	.L26
.L32:
	mov	esi, DWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	r8d, esi
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -144[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L27
	lea	rax, -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L28
.L27:
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -80[rbp]
	mov	esi, 64
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -164[rbp], eax
	mov	eax, DWORD PTR -164[rbp]
	cmp	eax, 64
	jbe	.L29
	mov	DWORD PTR -164[rbp], 64
.L29:
	mov	eax, DWORD PTR -164[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -192[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L30
	mov	edx, DWORD PTR -168[rbp]
	mov	rax, QWORD PTR -200[rbp]
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -200[rbp]
	jmp	.L33
.L30:
	add	DWORD PTR -168[rbp], 1
.L26:
	cmp	DWORD PTR -168[rbp], 127
	jle	.L32
.L28:
	mov	rdx, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L33:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_rpmsg_ept_dev_name, .-get_rpmsg_ept_dev_name
	.section	.rodata
.LC27:
	.string	"/dev/rpmsg0"
	.align 8
.LC28:
	.string	"getopt return unsupported option: -%c\n"
.LC29:
	.string	"d:n:"
	.align 8
.LC30:
	.string	"\r\n Matrix multiplication demo start \r"
.LC31:
	.string	"\r\n Open rpmsg dev %s! \r\n"
.LC32:
	.string	"Failed to open rpmsg device.\n"
.LC33:
	.string	"rpmsg_ctrl"
	.align 8
.LC34:
	.string	"failed to create RPMsg endpoint."
.LC35:
	.string	"/dev/%s"
.LC36:
	.string	"Failed to open rpmsg device."
	.align 8
.LC37:
	.string	"\r\n mutex initialization failure \r"
	.align 8
.LC38:
	.string	"\r\n Creating ui_thread and compute_thread ... \r"
.LC39:
	.string	"ui_thread"
.LC40:
	.string	"compute_thread"
	.align 8
.LC41:
	.string	" Matrix multiply application end \r"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC27[rip]
	mov	QWORD PTR -128[rbp], rax
	jmp	.L36
.L40:
	cmp	DWORD PTR -136[rbp], 100
	je	.L37
	cmp	DWORD PTR -136[rbp], 110
	je	.L38
	jmp	.L52
.L37:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -128[rbp], rax
	jmp	.L36
.L38:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR ntimes[rip], eax
	jmp	.L36
.L52:
	mov	eax, DWORD PTR -136[rbp]
	mov	esi, eax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L36:
	mov	rcx, QWORD PTR -160[rbp]
	mov	eax, DWORD PTR -148[rbp]
	lea	rdx, .LC29[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -136[rbp], eax
	cmp	DWORD PTR -136[rbp], -1
	jne	.L40
	lea	rdi, .LC30[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L41
	lea	rdi, .LC32[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L50
.L41:
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	je	.L43
	lea	rax, -112[rbp]
	movabs	rdx, 8101744177004245106
	movabs	rcx, 7306014456396476005
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR 8[rax], rcx
	movabs	rcx, 7957404692578660205
	mov	QWORD PTR 16[rax], rcx
	mov	WORD PTR 24[rax], 27749
	mov	BYTE PTR 26[rax], 0
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], -1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -112[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	rpmsg_create_ept
	mov	DWORD PTR -132[rbp], eax
	cmp	DWORD PTR -132[rbp], 0
	je	.L44
	lea	rdi, .LC34[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L50
.L44:
	mov	eax, DWORD PTR fd[rip]
	mov	DWORD PTR charfd[rip], eax
	lea	rdx, -64[rbp]
	lea	rcx, -112[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	get_rpmsg_ept_dev_name
	test	rax, rax
	jne	.L46
	mov	eax, -1
	jmp	.L50
.L46:
	lea	rdx, -64[rbp]
	lea	rax, -48[rbp]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -48[rbp]
	mov	esi, 2050
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L43
	lea	rdi, .LC36[rip]
	call	perror@PLT
	mov	eax, DWORD PTR charfd[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L50
.L43:
	mov	esi, 0
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_init@PLT
	test	eax, eax
	je	.L48
	lea	rdi, .LC37[rip]
	call	puts@PLT
.L48:
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC38[rip]
	call	puts@PLT
	lea	rcx, .LC39[rip]
	lea	rdx, ui_thread_entry[rip]
	mov	esi, 0
	lea	rdi, ui_thread[rip]
	call	pthread_create@PLT
	lea	rcx, .LC40[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]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR charfd[rip]
	test	eax, eax
	js	.L49
	mov	eax, DWORD PTR charfd[rip]
	mov	edi, eax
	call	close@PLT
.L49:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC41[rip]
	call	puts@PLT
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_destroy@PLT
	mov	eax, 0
.L50:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"863748.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
	.data
	.align	2
	.type	charfd, %object
	.size	charfd, 4
charfd:
	.word	-1
	.local	fd
	.comm	fd,4,4
	.local	compute_flag
	.comm	compute_flag,4,4
	.align	2
	.type	ntimes, %object
	.size	ntimes, 4
ntimes:
	.word	1
	.local	i_matrix
	.comm	i_matrix,296,4
	.local	r_matrix
	.comm	r_matrix,148,4
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\015\012 **********************************\000"
	.align	2
.LC6:
	.ascii	"****\015\000"
	.align	2
.LC7:
	.ascii	"\015\012  Matrix multiplication demo Round %d \015\012"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"\015\012 Compute thread unblocked .. \015\000"
	.align	2
.LC9:
	.ascii	" The compute thread is now blocking on\000"
	.align	2
.LC10:
	.ascii	"a read() from rpmsg device \015\000"
	.align	2
.LC11:
	.ascii	"\015\012 Generating random matrices now ... \015\000"
	.align	2
.LC12:
	.ascii	"\015\012 Writing generated matrices to rpmsg \000"
	.align	2
.LC13:
	.ascii	"rpmsg device, %d bytes .. \015\012\000"
	.align	2
.LC14:
	.ascii	"\015\012End of Matrix multiplication demo Round %d "
	.ascii	"\015\012\000"
	.align	2
.LC15:
	.ascii	"\015\012 Quitting application .. \015\000"
	.align	2
.LC16:
	.ascii	" Matrix multiplication demo end \015\000"
	.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 = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L19
.L20:
	ldr	r0, .L22
	bl	printf
	ldr	r0, .L22+4
	bl	puts
	ldr	r1, [fp, #-8]
	ldr	r0, .L22+8
	bl	printf
	ldr	r0, .L22
	bl	printf
	ldr	r0, .L22+4
	bl	puts
	ldr	r3, .L22+12
	mov	r2, #1
	str	r2, [r3]
	ldr	r0, .L22+16
	bl	pthread_mutex_unlock
	ldr	r0, .L22+20
	bl	puts
	ldr	r0, .L22+24
	bl	printf
	ldr	r0, .L22+28
	bl	puts
	ldr	r0, .L22+32
	bl	puts
	ldr	r2, .L22+36
	mov	r1, #6
	mov	r0, #2
	bl	generate_matrices
	ldr	r0, .L22+40
	bl	printf
	mov	r1, #296
	ldr	r0, .L22+44
	bl	printf
	ldr	r3, .L22+48
	ldr	r3, [r3]
	mov	r2, #296
	ldr	r1, .L22+36
	mov	r0, r3
	bl	write
	mov	r0, #1
	bl	sleep
	ldr	r1, [fp, #-8]
	ldr	r0, .L22+52
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, .L22+56
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L20
	ldr	r3, .L22+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L22+16
	bl	pthread_mutex_unlock
	ldr	r0, .L22+60
	bl	puts
	ldr	r0, .L22+64
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	compute_flag
	.word	sync_lock
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	i_matrix
	.word	.LC12
	.word	.LC13
	.word	fd
	.word	.LC14
	.word	ntimes
	.word	.LC15
	.word	.LC16
	.size	ui_thread_entry, .-ui_thread_entry
	.section	.rodata
	.align	2
.LC17:
	.ascii	"\015\012 Received results! - %d bytes from \000"
	.align	2
.LC18:
	.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, .L28
	bl	pthread_mutex_lock
	b	.L25
.L26:
	ldr	r3, .L28+4
	ldr	r3, [r3]
	mov	r2, #148
	ldr	r1, .L28+8
	mov	r0, r3
	bl	read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #147
	bls	.L26
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L26
	ldr	r1, [fp, #-8]
	ldr	r0, .L28+12
	bl	printf
	ldr	r0, .L28+16
	bl	puts
	ldr	r0, .L28+8
	bl	matrix_print
	ldr	r0, .L28
	bl	pthread_mutex_lock
.L25:
	ldr	r3, .L28+20
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L26
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	sync_lock
	.word	fd
	.word	r_matrix
	.word	.LC17
	.word	.LC18
	.word	compute_flag
	.size	compute_thread_entry, .-compute_thread_entry
	.section	.rodata
	.align	2
.LC19:
	.ascii	"Failed to create endpoint.\012\000"
	.text
	.align	2
	.global	rpmsg_create_ept
	.syntax unified
	.arm
	.fpu softvfp
	.type	rpmsg_create_ept, %function
rpmsg_create_ept:
	@ 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	r2, [fp, #-20]
	ldr	r1, .L33
	ldr	r0, [fp, #-16]
	bl	ioctl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L31
	ldr	r0, .L33+4
	bl	perror
.L31:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	1076409601
	.word	.LC19
	.size	rpmsg_create_ept, .-rpmsg_create_ept
	.section	.rodata
	.align	2
.LC20:
	.ascii	"/sys/class/rpmsg\000"
	.align	2
.LC21:
	.ascii	"%s/%s/rpmsg%d/name\000"
	.align	2
.LC22:
	.ascii	"checking %s\012\000"
	.align	2
.LC23:
	.ascii	"r\000"
	.align	2
.LC24:
	.ascii	"failed to open %s\012\000"
	.align	2
.LC25:
	.ascii	"svc_name: %s.\012\000"
	.align	2
.LC26:
	.ascii	"rpmsg%d\000"
	.align	2
.LC27:
	.ascii	"Not able to RPMsg endpoint file for %s:%s.\012\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_rpmsg_ept_dev_name
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_rpmsg_ept_dev_name, %function
get_rpmsg_ept_dev_name:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #176
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	str	r2, [fp, #-168]
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L45+4
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L36
.L42:
	sub	r0, fp, #136
	ldr	r3, [fp, #-152]
	str	r3, [sp]
	ldr	r3, [fp, #-160]
	ldr	r2, [fp, #-144]
	ldr	r1, .L45+8
	bl	sprintf
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L45+12
	bl	printf
	sub	r3, fp, #136
	ldr	r1, .L45+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L37
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L45+20
	bl	printf
	b	.L38
.L37:
	sub	r3, fp, #72
	ldr	r2, [fp, #-140]
	mov	r1, #64
	mov	r0, r3
	bl	fgets
	ldr	r0, [fp, #-140]
	bl	fclose
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L45+24
	bl	printf
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #64
	bls	.L39
	mov	r3, #64
	str	r3, [fp, #-148]
.L39:
	ldr	r2, [fp, #-148]
	sub	r3, fp, #72
	ldr	r1, [fp, #-164]
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L40
	ldr	r2, [fp, #-152]
	ldr	r1, .L45+28
	ldr	r0, [fp, #-168]
	bl	sprintf
	ldr	r3, [fp, #-168]
	b	.L43
.L40:
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L36:
	ldr	r3, [fp, #-152]
	cmp	r3, #127
	ble	.L42
.L38:
	ldr	r2, [fp, #-164]
	ldr	r1, [fp, #-160]
	ldr	r0, .L45+32
	bl	printf
	mov	r3, #0
.L43:
	ldr	r2, .L45
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L44
	bl	__stack_chk_fail
.L44:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC28
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.size	get_rpmsg_ept_dev_name, .-get_rpmsg_ept_dev_name
	.section	.rodata
	.align	2
.LC29:
	.ascii	"/dev/rpmsg0\000"
	.align	2
.LC30:
	.ascii	"getopt return unsupported option: -%c\012\000"
	.align	2
.LC31:
	.ascii	"d:n:\000"
	.align	2
.LC32:
	.ascii	"\015\012 Matrix multiplication demo start \015\000"
	.align	2
.LC33:
	.ascii	"\015\012 Open rpmsg dev %s! \015\012\000"
	.align	2
.LC34:
	.ascii	"Failed to open rpmsg device.\012\000"
	.align	2
.LC35:
	.ascii	"rpmsg_ctrl\000"
	.align	2
.LC36:
	.ascii	"rpmsg-openamp-demo-channel\000"
	.align	2
.LC37:
	.ascii	"failed to create RPMsg endpoint.\000"
	.align	2
.LC38:
	.ascii	"/dev/%s\000"
	.align	2
.LC39:
	.ascii	"Failed to open rpmsg device.\000"
	.align	2
.LC40:
	.ascii	"\015\012 mutex initialization failure \015\000"
	.align	2
.LC41:
	.ascii	"\015\012 Creating ui_thread and compute_thread ... "
	.ascii	"\015\000"
	.align	2
.LC42:
	.ascii	"ui_thread\000"
	.align	2
.LC43:
	.ascii	"compute_thread\000"
	.align	2
.LC44:
	.ascii	" Matrix multiply application end \015\000"
	.align	2
.LC45:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L65+4
	str	r3, [fp, #-112]
	b	.L48
.L52:
	ldr	r3, [fp, #-108]
	cmp	r3, #100
	beq	.L49
	ldr	r3, [fp, #-108]
	cmp	r3, #110
	beq	.L50
	b	.L64
.L49:
	ldr	r3, .L65+8
	ldr	r3, [r3]
	str	r3, [fp, #-112]
	b	.L48
.L50:
	ldr	r3, .L65+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L65+12
	str	r3, [r2]
	b	.L48
.L64:
	ldr	r1, [fp, #-108]
	ldr	r0, .L65+16
	bl	printf
	nop
.L48:
	ldr	r2, .L65+20
	ldr	r1, [fp, #-124]
	ldr	r0, [fp, #-120]
	bl	getopt
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	bne	.L52
	ldr	r0, .L65+24
	bl	puts
	ldr	r1, [fp, #-112]
	ldr	r0, .L65+28
	bl	printf
	mov	r1, #2
	ldr	r0, [fp, #-112]
	bl	open
	mov	r3, r0
	ldr	r2, .L65+32
	str	r3, [r2]
	ldr	r3, .L65+32
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L53
	ldr	r0, .L65+36
	bl	perror
	mvn	r3, #0
	b	.L62
.L53:
	ldr	r1, .L65+40
	ldr	r0, [fp, #-112]
	bl	strstr
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	beq	.L55
	sub	r3, fp, #96
	ldr	r2, .L65+44
	mov	ip, r3
	mov	lr, r2
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stmia	ip!, {r0, r1}
	strh	r2, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r2, #16
	strb	r3, [ip]
	mov	r3, #0
	str	r3, [fp, #-64]
	mvn	r3, #0
	str	r3, [fp, #-60]
	ldr	r3, .L65+32
	ldr	r3, [r3]
	sub	r2, fp, #96
	mov	r1, r2
	mov	r0, r3
	bl	rpmsg_create_ept
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	beq	.L56
	ldr	r0, .L65+48
	bl	puts
	mvn	r3, #0
	b	.L62
.L56:
	ldr	r3, .L65+32
	ldr	r3, [r3]
	ldr	r2, .L65+52
	str	r3, [r2]
	sub	r2, fp, #56
	sub	r3, fp, #96
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	get_rpmsg_ept_dev_name
	mov	r3, r0
	cmp	r3, #0
	bne	.L58
	mvn	r3, #0
	b	.L62
.L58:
	sub	r2, fp, #56
	sub	r3, fp, #40
	ldr	r1, .L65+56
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #40
	ldr	r1, .L65+60
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L65+32
	str	r3, [r2]
	ldr	r3, .L65+32
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L55
	ldr	r0, .L65+64
	bl	perror
	ldr	r3, .L65+52
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mvn	r3, #0
	b	.L62
.L55:
	mov	r1, #0
	ldr	r0, .L65+68
	bl	pthread_mutex_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L60
	ldr	r0, .L65+72
	bl	puts
.L60:
	ldr	r0, .L65+68
	bl	pthread_mutex_lock
	ldr	r0, .L65+76
	bl	puts
	ldr	r3, .L65+80
	ldr	r2, .L65+84
	mov	r1, #0
	ldr	r0, .L65+88
	bl	pthread_create
	ldr	r3, .L65+92
	ldr	r2, .L65+96
	mov	r1, #0
	ldr	r0, .L65+100
	bl	pthread_create
	ldr	r3, .L65+88
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L65+100
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L65+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L65+52
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L61
	ldr	r3, .L65+52
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L61:
	ldr	r0, .L65+104
	bl	puts
	ldr	r0, .L65+108
	bl	puts
	ldr	r0, .L65+68
	bl	pthread_mutex_destroy
	mov	r3, #0
.L62:
	ldr	r2, .L65
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC45
	.word	.LC29
	.word	optarg
	.word	ntimes
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	fd
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	charfd
	.word	.LC38
	.word	2050
	.word	.LC39
	.word	sync_lock
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	ui_thread_entry
	.word	ui_thread
	.word	.LC43
	.word	compute_thread_entry
	.word	compute_thread
	.word	.LC15
	.word	.LC44
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
