	.file	"extr_i2c-taos-evm.c_taos_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"TAOS EVM reset failed (state=%d, pos=%d)\n"
	.align 8
.LC1:
	.string	"TAOS EVM identification failed\n"
	.align 8
.LC2:
	.string	"TAOS EVM echo off failed (state=%d)\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"Connected to TAOS EVM\n"
	.text
	.p2align 4
	.type	taos_connect, @function
taos_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	mov	edi, 64
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	test	rax, rax
	je	.L11
	mov	rbp, rax
	mov	rax, QWORD PTR TAOS_STATE_INIT[rip]
	mov	rdi, r12
	mov	rsi, rbp
	mov	QWORD PTR 0[rbp], rax
	call	serio_set_drvdata@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	serio_open@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L12
.L4:
	mov	rdi, rbp
	call	kfree@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	eax, DWORD PTR THIS_MODULE[rip]
	mov	QWORD PTR 40[rbp], r12
	mov	rdi, r12
	mov	QWORD PTR 32[rbp], r12
	mov	esi, DWORD PTR TAOS_CMD_RESET[rip]
	mov	DWORD PTR 56[rbp], eax
	lea	rax, taos_algorithm[rip]
	mov	QWORD PTR 48[rbp], rax
	call	serio_write@PLT
	mov	edi, 2000
	call	msecs_to_jiffies@PLT
	xor	esi, esi
	mov	edi, DWORD PTR wq[rip]
	mov	edx, eax
	mov	rax, QWORD PTR TAOS_STATE_IDLE[rip]
	cmp	QWORD PTR 0[rbp], rax
	sete	sil
	call	wait_event_interruptible_timeout@PLT
	mov	rdx, QWORD PTR 0[rbp]
	cmp	rdx, QWORD PTR TAOS_STATE_IDLE[rip]
	jne	.L13
	mov	edi, DWORD PTR 12[rbp]
	call	taos_adapter_name@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L14
	mov	edi, DWORD PTR 24[rbp]
	mov	edx, 4
	call	strlcpy@PLT
	mov	rax, QWORD PTR TAOS_STATE_EOFF[rip]
	mov	esi, DWORD PTR TAOS_CMD_ECHO_OFF[rip]
	mov	rdi, r12
	mov	QWORD PTR 0[rbp], rax
	call	serio_write@PLT
	mov	edi, 250
	call	msecs_to_jiffies@PLT
	xor	esi, esi
	mov	edi, DWORD PTR wq[rip]
	mov	edx, eax
	mov	rax, QWORD PTR TAOS_STATE_IDLE[rip]
	cmp	QWORD PTR 0[rbp], rax
	sete	sil
	call	wait_event_interruptible_timeout@PLT
	mov	rdx, QWORD PTR 0[rbp]
	cmp	rdx, QWORD PTR TAOS_STATE_IDLE[rip]
	je	.L8
	mov	r13d, DWORD PTR ENODEV[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	xor	eax, eax
	neg	r13d
	call	dev_err@PLT
.L6:
	mov	rdi, r12
	call	serio_close@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r13d, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	r13d
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	r13d, DWORD PTR ENODEV[rip]
	mov	ecx, DWORD PTR 16[rbp]
	mov	rdi, r12
	xor	eax, eax
	lea	rsi, .LC0[rip]
	neg	r13d
	call	dev_err@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	lea	r14, 24[rbp]
	mov	rdi, r14
	call	i2c_add_adapter@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L6
	lea	rsi, .LC3[rip]
	mov	rdi, r12
	call	dev_info@PLT
	mov	rdi, r14
	call	taos_instantiate_device@PLT
	mov	DWORD PTR 8[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r13d, DWORD PTR ENODEV[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	xor	eax, eax
	neg	r13d
	call	dev_err@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	taos_connect, .-taos_connect
	.comm	wq,4,4
	.comm	taos_algorithm,4,4
	.comm	THIS_MODULE,4,4
	.comm	TAOS_STATE_INIT,8,8
	.comm	TAOS_STATE_IDLE,8,8
	.comm	TAOS_STATE_EOFF,8,8
	.comm	TAOS_CMD_RESET,4,4
	.comm	TAOS_CMD_ECHO_OFF,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,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_i2c-taos-evm.c_taos_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"TAOS EVM reset failed (state=%d, pos=%d)\012\000"
	.align	2
.LC1:
	.ascii	"TAOS EVM identification failed\012\000"
	.align	2
.LC2:
	.ascii	"TAOS EVM echo off failed (state=%d)\012\000"
	.align	2
.LC3:
	.ascii	"Connected to TAOS EVM\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	taos_connect, %function
taos_connect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L15
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	mov	r6, r1
	mov	r0, #36
	ldr	r1, [r2]
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L11
	ldr	r3, .L15+4
	mov	r1, r4
	ldr	r3, [r3]
	mov	r0, r5
	str	r3, [r4]
	bl	serio_set_drvdata
	mov	r1, r6
	mov	r0, r5
	bl	serio_open
	subs	r6, r0, #0
	beq	.L12
.L4:
	mov	r0, r4
	bl	kfree
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	ldr	r3, .L15+8
	ldr	r2, .L15+12
	ldr	r1, [r3]
	ldr	r3, .L15+16
	ldr	r7, .L15+20
	str	r2, [r4, #28]
	str	r1, [r4, #32]
	mov	r0, r5
	ldr	r1, [r3]
	str	r5, [r4, #24]
	str	r5, [r4, #20]
	bl	serio_write
	ldr	r1, [r7]
	ldr	r6, [r4]
	ldr	r8, .L15+24
	sub	r6, r6, r1
	clz	r6, r6
	mov	r0, #2000
	ldr	r9, [r8]
	bl	msecs_to_jiffies
	lsr	r6, r6, #5
	mov	r2, r0
	mov	r1, r6
	mov	r0, r9
	bl	wait_event_interruptible_timeout
	ldr	r3, [r7]
	ldr	r2, [r4]
	cmp	r2, r3
	bne	.L13
	ldr	r0, [r4, #8]
	bl	taos_adapter_name
	subs	r1, r0, #0
	beq	.L14
	mov	r2, #4
	ldr	r0, [r4, #16]
	bl	strlcpy
	ldr	r3, .L15+28
	ldr	r2, .L15+32
	ldr	r3, [r3]
	ldr	r1, [r2]
	mov	r0, r5
	str	r3, [r4]
	bl	serio_write
	ldr	r1, [r7]
	ldr	r6, [r4]
	mov	r0, #250
	sub	r6, r6, r1
	clz	r6, r6
	ldr	r8, [r8]
	bl	msecs_to_jiffies
	lsr	r6, r6, #5
	mov	r2, r0
	mov	r1, r6
	mov	r0, r8
	bl	wait_event_interruptible_timeout
	ldr	r3, [r7]
	ldr	r2, [r4]
	cmp	r2, r3
	beq	.L8
	ldr	r3, .L15+36
	mov	r0, r5
	ldr	r6, [r3]
	ldr	r1, .L15+40
	rsb	r6, r6, #0
	bl	dev_err
.L6:
	mov	r0, r5
	bl	serio_close
	b	.L4
.L11:
	ldr	r3, .L15+44
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	ldr	r3, .L15+36
	mov	r0, r5
	ldr	r6, [r3]
	ldr	r1, .L15+48
	ldr	r3, [r4, #12]
	rsb	r6, r6, #0
	bl	dev_err
	b	.L6
.L8:
	add	r7, r4, #16
	mov	r0, r7
	bl	i2c_add_adapter
	subs	r6, r0, #0
	bne	.L6
	ldr	r1, .L15+52
	mov	r0, r5
	bl	dev_info
	mov	r0, r7
	bl	taos_instantiate_device
	str	r0, [r4, #4]
	b	.L1
.L14:
	ldr	r3, .L15+36
	mov	r0, r5
	ldr	r6, [r3]
	ldr	r1, .L15+56
	rsb	r6, r6, #0
	bl	dev_err
	b	.L6
.L16:
	.align	2
.L15:
	.word	GFP_KERNEL
	.word	TAOS_STATE_INIT
	.word	THIS_MODULE
	.word	taos_algorithm
	.word	TAOS_CMD_RESET
	.word	TAOS_STATE_IDLE
	.word	wq
	.word	TAOS_STATE_EOFF
	.word	TAOS_CMD_ECHO_OFF
	.word	ENODEV
	.word	.LC2
	.word	ENOMEM
	.word	.LC0
	.word	.LC3
	.word	.LC1
	.size	taos_connect, .-taos_connect
	.comm	wq,4,4
	.comm	taos_algorithm,4,4
	.comm	THIS_MODULE,4,4
	.comm	TAOS_STATE_INIT,4,4
	.comm	TAOS_STATE_IDLE,4,4
	.comm	TAOS_STATE_EOFF,4,4
	.comm	TAOS_CMD_RESET,4,4
	.comm	TAOS_CMD_ECHO_OFF,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
