	.file	"extr_dibusb-common.c_dibusb_i2c_xfer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dibusb_i2c_xfer, @function
dibusb_i2c_xfer:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	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	r14, rax
	call	mutex_lock_interruptible@PLT
	test	rax, rax
	js	.L2
	mov	ecx, DWORD PTR I2C_M_RD[rip]
	xor	ebx, ebx
	xor	r13d, r13d
	test	ebp, ebp
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movsx	rax, ebx
	lea	r13d, 1[rbx]
	lea	rdx, [rax+rax*2]
	sal	rdx, 3
	lea	rax, [r12+rdx]
	mov	edi, DWORD PTR [rax]
	mov	esi, DWORD PTR 4[rax]
	and	edi, ecx
	cmp	r13d, ebp
	jge	.L6
	test	edi, edi
	jne	.L7
	lea	rdx, 24[r12+rdx]
	mov	r11d, DWORD PTR 8[rax]
	mov	r10, QWORD PTR 16[rax]
	test	DWORD PTR [rdx], ecx
	jne	.L24
	xor	r9d, r9d
	xor	r8d, r8d
	mov	ecx, r11d
	mov	rdx, r10
	mov	rdi, r14
	call	dibusb_i2c_msg@PLT
	test	rax, rax
	js	.L18
	mov	ebx, r13d
.L21:
	mov	ecx, DWORD PTR I2C_M_RD[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	test	edi, edi
	je	.L25
	cmp	esi, 80
	je	.L4
.L12:
	mov	r9d, DWORD PTR 8[rax]
	mov	r8, QWORD PTR 16[rax]
	xor	ecx, ecx
	xor	edx, edx
	mov	rdi, r14
	call	dibusb_i2c_msg@PLT
	test	rax, rax
	js	.L18
.L22:
	mov	ebx, r13d
.L9:
	cmp	ebp, ebx
	jg	.L21
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r13d, ebx
.L4:
	mov	rdi, r14
	call	mutex_unlock@PLT
	pop	rbx
	.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
.L7:
	.cfi_restore_state
	cmp	esi, 80
	jne	.L12
	mov	ebx, r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L25:
	mov	ecx, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR 16[rax]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdi, r14
	call	dibusb_i2c_msg@PLT
	test	rax, rax
	jns	.L22
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L24:
	mov	r9d, DWORD PTR 8[rdx]
	mov	r8, QWORD PTR 16[rdx]
	mov	ecx, r11d
	mov	rdx, r10
	mov	rdi, r14
	call	dibusb_i2c_msg@PLT
	test	rax, rax
	js	.L18
	add	ebx, 2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r13d, DWORD PTR EAGAIN[rip]
	pop	rbx
	.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
	.cfi_endproc
.LFE0:
	.size	dibusb_i2c_xfer, .-dibusb_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_dibusb-common.c_dibusb_i2c_xfer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dibusb_i2c_xfer, %function
dibusb_i2c_xfer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	sub	sp, sp, #12
	mov	r6, r1
	mov	r7, r2
	bl	i2c_get_adapdata
	mov	r9, r0
	bl	mutex_lock_interruptible
	cmp	r0, #0
	blt	.L2
	cmp	r7, #0
	movle	r5, #0
	ble	.L4
	mov	r4, #0
	ldr	r8, .L25
.L3:
	ldr	r2, [r8]
	ldr	r3, [r6, r4, lsl #4]
	add	r5, r4, #1
	add	r0, r6, r4, lsl #4
	cmp	r5, r7
	ldr	r1, [r0, #4]
	and	r3, r3, r2
	lsl	ip, r4, #4
	bge	.L6
	cmp	r3, #0
	bne	.L7
	add	ip, ip, #16
	ldr	r3, [r6, ip]
	add	lr, r6, ip
	ands	ip, r2, r3
	ldr	r2, [r0, #12]
	ldr	r3, [r0, #8]
	bne	.L23
	mov	r0, r9
	str	ip, [sp, #4]
	str	ip, [sp]
	bl	dibusb_i2c_msg
	cmp	r0, #0
	blt	.L18
.L20:
	mov	r4, r5
	b	.L3
.L6:
	cmp	r3, #0
	beq	.L24
	cmp	r1, #80
	beq	.L4
.L12:
	mov	r3, #0
	ldr	ip, [r0, #8]
	ldr	r0, [r0, #12]
	mov	r2, r3
	stm	sp, {r0, ip}
	mov	r0, r9
	bl	dibusb_i2c_msg
	cmp	r0, #0
	blt	.L18
.L21:
	mov	r4, r5
.L9:
	cmp	r7, r4
	bgt	.L3
.L18:
	mov	r5, r4
.L4:
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L7:
	cmp	r1, #80
	beq	.L20
	b	.L12
.L24:
	str	r3, [sp, #4]
	str	r3, [sp]
	ldr	r3, [r0, #8]
	ldr	r2, [r0, #12]
	mov	r0, r9
	bl	dibusb_i2c_msg
	cmp	r0, #0
	bge	.L21
	b	.L18
.L23:
	ldr	r0, [lr, #12]
	ldr	ip, [lr, #8]
	stm	sp, {r0, ip}
	mov	r0, r9
	bl	dibusb_i2c_msg
	cmp	r0, #0
	blt	.L18
	add	r4, r4, #2
	b	.L9
.L2:
	ldr	r3, .L25+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L26:
	.align	2
.L25:
	.word	I2C_M_RD
	.word	EAGAIN
	.size	dibusb_i2c_xfer, .-dibusb_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
