	.file	"extr_solo6x10-i2c.c_solo_i2c_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s I2C %d"
	.text
	.p2align 4
	.globl	solo_i2c_init
	.type	solo_i2c_init, @function
solo_i2c_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, solo_i2c_algo[rip]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	lea	r14, .LC0[rip]
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	edi, 8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	SOLO_IIC_PRESCALE@PLT
	mov	esi, DWORD PTR SOLO_IIC_CFG[rip]
	or	eax, DWORD PTR SOLO_IIC_ENABLE[rip]
	mov	rdi, r12
	mov	edx, eax
	call	solo_reg_write@PLT
	mov	eax, DWORD PTR IIC_STATE_IDLE[rip]
	lea	rdi, 28[r12]
	mov	DWORD PTR [r12], -1
	mov	DWORD PTR 32[r12], eax
	call	init_waitqueue_head@PLT
	lea	rdi, 24[r12]
	call	mutex_init@PLT
	mov	edx, DWORD PTR SOLO_I2C_ADAPTERS[rip]
	test	edx, edx
	jg	.L2
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	add	rbp, 1
	cmp	DWORD PTR SOLO_I2C_ADAPTERS[rip], ebp
	jle	.L6
.L2:
	mov	rdx, QWORD PTR 8[r12]
	lea	rax, 0[rbp+rbp*4]
	mov	rcx, QWORD PTR SOLO6X10_NAME[rip]
	mov	r8d, ebp
	mov	esi, DWORD PTR I2C_NAME_SIZE[rip]
	lea	rbx, [rdx+rax*8]
	mov	rdx, r14
	mov	edi, DWORD PTR 32[rbx]
	call	snprintf@PLT
	mov	rax, QWORD PTR 16[r12]
	mov	QWORD PTR 24[rbx], r15
	mov	rdi, rbx
	mov	QWORD PTR 8[rbx], r12
	mov	DWORD PTR [rbx], 1
	mov	QWORD PTR 16[rbx], rax
	call	i2c_add_adapter@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR SOLO_I2C_ADAPTERS[rip]
	mov	QWORD PTR 8[rbx], 0
	test	eax, eax
	jle	.L1
	mov	rdi, QWORD PTR 8[r12]
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	call	i2c_del_adapter@PLT
	mov	rdi, QWORD PTR 8[r12]
	add	rbx, 1
	cmp	DWORD PTR SOLO_I2C_ADAPTERS[rip], ebx
	mov	QWORD PTR 8[rdi+rbp], 0
	jle	.L1
.L7:
	lea	rbp, [rbx+rbx*4]
	sal	rbp, 3
	add	rdi, rbp
	cmp	QWORD PTR 8[rdi], 0
	jne	.L15
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	xor	r13d, r13d
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
	ret
	.cfi_endproc
.LFE0:
	.size	solo_i2c_init, .-solo_i2c_init
	.comm	solo_i2c_algo,4,4
	.comm	SOLO_IIC_ENABLE,4,4
	.comm	SOLO_IIC_CFG,4,4
	.comm	SOLO_I2C_ADAPTERS,4,4
	.comm	SOLO6X10_NAME,8,8
	.comm	IIC_STATE_IDLE,4,4
	.comm	I2C_NAME_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_solo6x10-i2c.c_solo_i2c_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s I2C %d\000"
	.text
	.align	2
	.global	solo_i2c_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	solo_i2c_init, %function
solo_i2c_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L19
	mov	r5, r0
	sub	sp, sp, #12
	mov	r0, #8
	ldr	r4, [r3]
	bl	SOLO_IIC_PRESCALE
	mov	r2, r0
	ldr	r3, .L19+4
	mov	r1, r4
	ldr	r3, [r3]
	mov	r0, r5
	orr	r2, r2, r3
	bl	solo_reg_write
	mvn	r2, #0
	ldr	r3, .L19+8
	str	r2, [r5]
	ldr	r3, [r3]
	ldr	r9, .L19+12
	str	r3, [r5, #20]
	add	r0, r5, #16
	bl	init_waitqueue_head
	add	r0, r5, #12
	bl	mutex_init
	ldr	r3, [r9]
	cmp	r3, #0
	ble	.L6
	mov	r6, #0
	mov	fp, #1
	mov	r7, r6
	ldr	r10, .L19+16
	b	.L2
.L4:
	ldr	r3, [r9]
	add	r6, r6, #20
	cmp	r3, r7
	ble	.L6
.L2:
	ldr	r8, [r5, #4]
	ldr	r3, .L19+20
	add	r4, r8, r6
	ldr	r1, .L19+24
	ldr	r3, [r3]
	ldr	r0, [r4, #16]
	str	r7, [sp]
	mov	r2, r10
	ldr	r1, [r1]
	bl	snprintf
	ldr	r3, [r5, #8]
	ldr	r2, .L19+28
	str	r5, [r4, #4]
	str	r2, [r4, #12]
	mov	r0, r4
	str	fp, [r8, r6]
	str	r3, [r4, #8]
	bl	i2c_add_adapter
	cmp	r0, #0
	add	r7, r7, #1
	beq	.L4
	mov	r7, #0
	ldr	r3, [r9]
	mov	r8, r0
	cmp	r3, r7
	movgt	r6, r7
	ldrgt	r0, [r5, #4]
	str	r7, [r4, #4]
	bgt	.L7
	b	.L1
.L18:
	bl	i2c_del_adapter
	ldr	r0, [r5, #4]
	ldr	r2, [r9]
	add	r3, r0, r4
	cmp	r2, r7
	str	r6, [r3, #4]
	ble	.L1
.L7:
	add	r3, r7, r7, lsl #2
	add	r0, r0, r3, lsl #2
	ldr	r2, [r0, #4]
	add	r7, r7, #1
	cmp	r2, #0
	lsl	r4, r3, #2
	bne	.L18
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	r8, #0
.L1:
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	.align	2
.L19:
	.word	SOLO_IIC_CFG
	.word	SOLO_IIC_ENABLE
	.word	IIC_STATE_IDLE
	.word	SOLO_I2C_ADAPTERS
	.word	.LC0
	.word	SOLO6X10_NAME
	.word	I2C_NAME_SIZE
	.word	solo_i2c_algo
	.size	solo_i2c_init, .-solo_i2c_init
	.comm	solo_i2c_algo,4,4
	.comm	SOLO_IIC_ENABLE,4,4
	.comm	SOLO_IIC_CFG,4,4
	.comm	SOLO_I2C_ADAPTERS,4,4
	.comm	SOLO6X10_NAME,4,4
	.comm	IIC_STATE_IDLE,4,4
	.comm	I2C_NAME_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
