	.file	"extr_technisat-usb2.c_technisat_usb2_i2c_xfer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	technisat_usb2_i2c_xfer, @function
technisat_usb2_i2c_xfer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	i2c_get_adapdata@PLT
	mov	rdi, rax
	mov	r13, rax
	call	mutex_lock_interruptible@PLT
	test	rax, rax
	js	.L2
	xor	ebx, ebx
	xor	r12d, r12d
	test	ebp, ebp
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movsx	rax, ebx
	lea	r12d, 1[rbx]
	mov	edi, DWORD PTR 4[r13]
	lea	rax, [rax+rax*2]
	sal	rax, 3
	lea	rdx, [r14+rax]
	mov	ecx, DWORD PTR 4[rdx]
	mov	r10, QWORD PTR 8[rdx]
	cmp	r12d, ebp
	jge	.L6
	lea	rax, 24[r14+rax]
	mov	esi, DWORD PTR [rax]
	test	DWORD PTR I2C_M_RD[rip], esi
	jne	.L16
	mov	esi, DWORD PTR 16[rdx]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdx, r10
	call	technisat_usb2_i2c_access@PLT
	test	eax, eax
	jne	.L10
	mov	ebx, r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR 16[rdx]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdx, r10
	call	technisat_usb2_i2c_access@PLT
	test	eax, eax
	cmovne	r12d, eax
.L4:
	mov	rdi, r13
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L16:
	.cfi_restore_state
	mov	esi, DWORD PTR 16[rax]
	mov	r9d, DWORD PTR 4[rax]
	mov	rdx, r10
	mov	r8, QWORD PTR 8[rax]
	call	technisat_usb2_i2c_access@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	add	ebx, 2
	cmp	ebp, ebx
	jg	.L3
	mov	r12d, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r12d, DWORD PTR EAGAIN[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	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
.L10:
	.cfi_restore_state
	mov	r12d, eax
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	technisat_usb2_i2c_xfer, .-technisat_usb2_i2c_xfer
	.comm	I2C_M_RD,4,4
	.comm	EAGAIN,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_technisat-usb2.c_technisat_usb2_i2c_xfer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	technisat_usb2_i2c_xfer, %function
technisat_usb2_i2c_xfer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	sub	sp, sp, #8
	mov	r6, r1
	mov	r7, r2
	bl	i2c_get_adapdata
	mov	r8, r0
	bl	mutex_lock_interruptible
	cmp	r0, #0
	blt	.L2
	cmp	r7, #0
	movle	r5, #0
	ble	.L4
	mov	r4, #0
	ldr	r9, .L16
.L3:
	add	r5, r4, #1
	add	r1, r6, r4, lsl #4
	lsl	ip, r4, #4
	cmp	r5, r7
	ldr	r2, [r1, #8]
	ldr	r3, [r1, #4]
	ldr	r0, [r8, #4]
	add	ip, ip, #16
	bge	.L6
	ldr	lr, [r6, ip]
	ldr	r10, [r9]
	add	ip, r6, ip
	ands	lr, lr, r10
	bne	.L15
	str	lr, [sp, #4]
	str	lr, [sp]
	ldr	r1, [r1, #12]
	bl	technisat_usb2_i2c_access
	cmp	r0, #0
	bne	.L10
	mov	r4, r5
	b	.L3
.L6:
	mov	ip, #0
	ldr	r1, [r1, #12]
	str	ip, [sp, #4]
	str	ip, [sp]
	bl	technisat_usb2_i2c_access
	cmp	r0, #0
	movne	r5, r0
.L4:
	mov	r0, r8
	bl	mutex_unlock
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	ldr	r1, [ip, #8]
	ldr	lr, [ip, #4]
	add	r4, r4, #2
	stm	sp, {r1, lr}
	ldr	r1, [ip, #12]
	bl	technisat_usb2_i2c_access
	subs	r5, r0, #0
	bne	.L4
	cmp	r7, r4
	bgt	.L3
	mov	r5, r4
	b	.L4
.L2:
	ldr	r3, .L16+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r5, r0
	b	.L4
.L17:
	.align	2
.L16:
	.word	I2C_M_RD
	.word	EAGAIN
	.size	technisat_usb2_i2c_xfer, .-technisat_usb2_i2c_xfer
	.comm	I2C_M_RD,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
