	.file	"extr_i2c-octeon-core.h_octeon_i2c_reg_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	octeon_i2c_reg_read, @function
octeon_i2c_reg_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR [rdi]
	call	SW_TWSI@PLT
	mov	edi, DWORD PTR SW_TWSI_V[rip]
	or	edi, DWORD PTR SW_TWSI_R[rip]
	lea	rsi, [rbx+rax]
	or	edi, r12d
	mov	r12d, 1000
	call	__raw_writeq@PLT
	mov	rbx, QWORD PTR 0[r13]
	mov	rdi, r13
	call	SW_TWSI@PLT
	lea	rdi, [rbx+rax]
	call	__raw_readq@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rbx, QWORD PTR 0[r13]
	mov	rdi, r13
	call	SW_TWSI@PLT
	lea	rdi, [rbx+rax]
	call	__raw_readq@PLT
	sub	r12d, 1
	je	.L10
.L2:
	test	DWORD PTR SW_TWSI_V[rip], eax
	jne	.L4
	movzx	eax, al
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	xor	eax, eax
	test	rbp, rbp
	je	.L1
	mov	edx, DWORD PTR EIO[rip]
	neg	edx
	mov	DWORD PTR 0[rbp], edx
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	octeon_i2c_reg_read, .-octeon_i2c_reg_read
	.comm	SW_TWSI_V,4,4
	.comm	SW_TWSI_R,4,4
	.comm	EIO,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-octeon-core.h_octeon_i2c_reg_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	octeon_i2c_reg_read, %function
octeon_i2c_reg_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, .L10
	ldr	r8, .L10+4
	ldr	r4, [ip]
	ldr	r3, [r8]
	mov	r6, r2
	orr	r3, r3, r4
	orr	r4, r3, r1
	mov	r5, r0
	ldr	r7, [r0]
	bl	SW_TWSI
	mov	r1, r0
	mov	r0, r4
	add	r1, r7, r1
	bl	__raw_writeq
	mov	r0, r5
	ldr	r4, [r5]
	bl	SW_TWSI
	add	r0, r4, r0
	bl	__raw_readq
	mov	r4, #1000
	b	.L2
.L4:
	mov	r0, r5
	ldr	r7, [r5]
	bl	SW_TWSI
	add	r0, r7, r0
	bl	__raw_readq
	subs	r4, r4, #1
	beq	.L9
.L2:
	ldr	r3, [r8]
	tst	r0, r3
	bne	.L4
	and	r0, r0, #255
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	cmp	r6, #0
	beq	.L5
	ldr	r3, .L10+8
	mov	r0, r4
	ldr	r3, [r3]
	rsb	r3, r3, #0
	str	r3, [r6]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	SW_TWSI_R
	.word	SW_TWSI_V
	.word	EIO
	.size	octeon_i2c_reg_read, .-octeon_i2c_reg_read
	.comm	SW_TWSI_V,4,4
	.comm	SW_TWSI_R,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
