	.file	"extr_test_rs485.c_rs485_slave.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Start recieve loop.\r"
.LC1:
	.string	"Slave_ready"
.LC2:
	.string	"Master_started"
.LC3:
	.string	"Received "
.LC4:
	.string	"Incorrect packet received.\r"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC5:
	.string	"Incorrect data packet[%d] received.\r\n"
	.align 8
.LC6:
	.string	"Test completed. Received packets = %d, errors = %d\r\n"
	.text
	.p2align 4
	.type	rs485_slave, @function
rs485_slave:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	rs485_init@PLT
	mov	edi, DWORD PTR BUF_SIZE[rip]
	call	malloc@PLT
	lea	rdi, .LC0[rip]
	mov	rbp, rax
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	unity_send_signal@PLT
	lea	rdi, .LC2[rip]
	call	unity_wait_for_signal@PLT
	mov	eax, DWORD PTR PACKETS_NUMBER[rip]
	test	eax, eax
	jle	.L7
	xor	ebx, ebx
	xor	r15d, r15d
	lea	r14, .LC5[rip]
	xor	r13d, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, eax
	mov	rsi, rbp
	lea	rdi, .LC3[rip]
	call	print_packet_data@PLT
	cmp	QWORD PTR ESP_OK[rip], rax
	je	.L11
	lea	rdi, .LC4[rip]
	add	r13d, 1
	call	puts@PLT
.L5:
	add	ebx, 1
	cmp	DWORD PTR PACKETS_NUMBER[rip], ebx
	jle	.L12
.L6:
	mov	eax, DWORD PTR PACKET_READ_TICS[rip]
	mov	edx, DWORD PTR BUF_SIZE[rip]
	mov	rsi, rbp
	mov	edi, DWORD PTR UART_NUM1[rip]
	lea	ecx, [rax+rax]
	call	uart_read_bytes@PLT
	mov	r12d, eax
	cmp	eax, 2
	jg	.L13
	mov	esi, ebx
	xor	eax, eax
	mov	rdi, r14
	add	r13d, 1
	call	printf@PLT
	add	ebx, 1
	cmp	DWORD PTR PACKETS_NUMBER[rip], ebx
	jg	.L6
.L12:
	xor	r12d, r12d
	cmp	r13d, 1
	setle	r12b
.L2:
	mov	edx, r13d
	mov	esi, r15d
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	printf@PLT
	mov	esi, DWORD PTR PACKET_READ_TICS[rip]
	mov	edi, DWORD PTR UART_NUM1[rip]
	call	uart_wait_tx_done@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	edi, DWORD PTR UART_NUM1[rip]
	call	uart_driver_delete@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edi, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	TEST_ASSERT@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR UART_NUM1[rip]
	mov	edx, r12d
	mov	rsi, rbp
	add	r15d, 1
	call	uart_write_bytes@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r12d, 1
	xor	r15d, r15d
	xor	r13d, r13d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	rs485_slave, .-rs485_slave
	.comm	UART_NUM1,4,4
	.comm	PACKET_READ_TICS,4,4
	.comm	PACKETS_NUMBER,4,4
	.comm	ESP_OK,8,8
	.comm	BUF_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_test_rs485.c_rs485_slave.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Start recieve loop.\015\000"
	.align	2
.LC1:
	.ascii	"Slave_ready\000"
	.align	2
.LC2:
	.ascii	"Master_started\000"
	.align	2
.LC3:
	.ascii	"Received \000"
	.align	2
.LC4:
	.ascii	"Incorrect packet received.\015\000"
	.align	2
.LC5:
	.ascii	"Incorrect data packet[%d] received.\015\012\000"
	.align	2
.LC6:
	.ascii	"Test completed. Received packets = %d, errors = %d\015"
	.ascii	"\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rs485_slave, %function
rs485_slave:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L14
	sub	sp, sp, #12
	bl	rs485_init
	ldr	r0, [r9]
	bl	malloc
	mov	r5, r0
	ldr	r0, .L14+4
	bl	puts
	ldr	r8, .L14+8
	ldr	r0, .L14+12
	bl	unity_send_signal
	ldr	r0, .L14+16
	bl	unity_wait_for_signal
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L7
	mov	r4, #0
	ldr	r10, .L14+20
	mov	r6, r4
	ldr	r7, .L14+24
	ldr	fp, .L14+28
	str	r4, [sp, #4]
	b	.L6
.L13:
	str	r0, [sp]
	mov	r1, r5
	ldr	r0, .L14+32
	bl	print_packet_data
	ldr	r3, [fp]
	ldr	r2, [sp]
	cmp	r3, r0
	beq	.L11
	ldr	r0, .L14+36
	add	r6, r6, #1
	bl	puts
.L5:
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L12
.L6:
	ldr	r3, [r10]
	ldr	r2, [r9]
	mov	r1, r5
	ldr	r0, [r7]
	lsl	r3, r3, #1
	bl	uart_read_bytes
	cmp	r0, #2
	mov	r2, r0
	bgt	.L13
	mov	r1, r4
	ldr	r0, .L14+40
	bl	printf
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	add	r6, r6, #1
	bgt	.L6
.L12:
	cmp	r6, #1
	movgt	r4, #0
	movle	r4, #1
.L2:
	mov	r2, r6
	ldr	r1, [sp, #4]
	ldr	r0, .L14+44
	bl	printf
	ldr	r1, [r10]
	ldr	r0, [r7]
	bl	uart_wait_tx_done
	mov	r0, r5
	bl	free
	ldr	r0, [r7]
	bl	uart_driver_delete
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	TEST_ASSERT
.L11:
	ldr	r3, [sp, #4]
	mov	r1, r5
	add	r3, r3, #1
	ldr	r0, [r7]
	str	r3, [sp, #4]
	bl	uart_write_bytes
	b	.L5
.L7:
	mov	r3, #0
	mov	r4, #1
	mov	r6, r3
	ldr	r10, .L14+20
	ldr	r7, .L14+24
	str	r3, [sp, #4]
	b	.L2
.L15:
	.align	2
.L14:
	.word	BUF_SIZE
	.word	.LC0
	.word	PACKETS_NUMBER
	.word	.LC1
	.word	.LC2
	.word	PACKET_READ_TICS
	.word	UART_NUM1
	.word	ESP_OK
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	rs485_slave, .-rs485_slave
	.comm	UART_NUM1,4,4
	.comm	PACKET_READ_TICS,4,4
	.comm	PACKETS_NUMBER,4,4
	.comm	ESP_OK,4,4
	.comm	BUF_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
