	.file	"extr_esp_modbus_slave.c_mbc_slave_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Slave interface initialization failure, error=(0x%x), port type=(0x%x)."
	.text
	.p2align 4
	.globl	mbc_slave_init
	.type	mbc_slave_init, @function
mbc_slave_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	cmp	rdi, 129
	je	.L2
	mov	r12, QWORD PTR ESP_ERR_NOT_SUPPORTED[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, 129
	mov	rbx, rsi
	mov	rsi, rsp
	call	mbc_serial_slave_create@PLT
	xor	edi, edi
	mov	esi, DWORD PTR ESP_ERR_INVALID_STATE[rip]
	cmp	QWORD PTR [rsp], 0
	setne	dil
	mov	r8d, 129
	mov	rcx, rax
	mov	r12, rax
	lea	rdx, .LC0[rip]
	call	MB_SLAVE_CHECK@PLT
	mov	rax, QWORD PTR [rsp]
	test	rax, rax
	je	.L1
	cmp	QWORD PTR ESP_OK[rip], r12
	jne	.L1
	mov	QWORD PTR slave_interface_ptr[rip], rax
	mov	QWORD PTR [rbx], rax
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mbc_slave_init, .-mbc_slave_init
	.comm	slave_interface_ptr,8,8
	.comm	ESP_OK,8,8
	.comm	ESP_ERR_NOT_SUPPORTED,8,8
	.comm	ESP_ERR_INVALID_STATE,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_esp_modbus_slave.c_mbc_slave_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Slave interface initialization failure, error=(0x%x"
	.ascii	"), port type=(0x%x).\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mbc_slave_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	mbc_slave_init, %function
mbc_slave_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, lr}
	ldr	r2, .L11
	sub	sp, sp, #16
	cmp	r0, #129
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r3, [sp, #8]
	beq	.L2
	ldr	r3, .L11+4
	ldr	r5, [r3]
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	mov	r6, r1
	add	r1, sp, #8
	mov	r4, r0
	bl	mbc_serial_slave_create
	mov	r5, r0
	ldr	r0, [sp, #8]
	ldr	r2, .L11+8
	subs	r0, r0, #0
	str	r4, [sp]
	mov	r3, r5
	movne	r0, #1
	ldr	r1, [r2]
	ldr	r2, .L11+12
	bl	MB_SLAVE_CHECK
	ldr	r3, [sp, #8]
	cmp	r3, #0
	beq	.L1
	ldr	r2, .L11+16
	ldr	r2, [r2]
	cmp	r2, r5
	ldreq	r2, .L11+20
	streq	r3, [r2]
	streq	r3, [r6]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	ESP_ERR_NOT_SUPPORTED
	.word	ESP_ERR_INVALID_STATE
	.word	.LC0
	.word	ESP_OK
	.word	slave_interface_ptr
	.size	mbc_slave_init, .-mbc_slave_init
	.comm	slave_interface_ptr,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_NOT_SUPPORTED,4,4
	.comm	ESP_ERR_INVALID_STATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
