	.file	"extr_i2c.c_i2c_readreg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	i2c_readreg
	.type	i2c_readreg, @function
i2c_readreg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movzx	r14d, r14b
	mov	r13d, 4
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edi
	lea	rdi, i2c_lock[rip]
	mov	r15d, ebx
	or	ebx, 1
	and	r15d, 254
	movzx	ebx, bl
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	spin_lock@PLT
.L6:
	xor	edi, edi
	call	local_irq_save@PLT
	xor	eax, eax
	call	i2c_start@PLT
	mov	edi, r15d
	call	i2c_outbyte@PLT
	xor	eax, eax
	call	i2c_getack@PLT
	mov	ebp, eax
	xor	eax, eax
	call	i2c_dir_out@PLT
	mov	edi, r14d
	call	i2c_outbyte@PLT
	xor	eax, eax
	call	i2c_getack@PLT
	mov	edi, DWORD PTR CLOCK_LOW_TIME[rip]
	test	eax, eax
	je	.L2
	call	i2c_delay@PLT
	xor	eax, eax
	call	i2c_start@PLT
	mov	edi, ebx
	call	i2c_outbyte@PLT
	xor	eax, eax
	call	i2c_getack@PLT
	test	eax, eax
	je	.L14
	xor	eax, eax
	call	i2c_inbyte@PLT
	mov	r12d, eax
	xor	eax, eax
	call	i2c_sendnack@PLT
	xor	eax, eax
	call	i2c_stop@PLT
	xor	edi, edi
	call	local_irq_restore@PLT
	test	ebp, ebp
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	sub	r13d, 1
	jne	.L6
.L5:
	lea	rdi, i2c_lock[rip]
	call	spin_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	i2c_delay@PLT
	xor	eax, eax
	call	i2c_start@PLT
	mov	edi, ebx
	call	i2c_outbyte@PLT
	xor	eax, eax
	call	i2c_getack@PLT
.L14:
	xor	eax, eax
	call	i2c_inbyte@PLT
	mov	r12d, eax
	xor	eax, eax
	call	i2c_sendnack@PLT
	xor	eax, eax
	call	i2c_stop@PLT
	xor	edi, edi
	call	local_irq_restore@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	i2c_readreg, .-i2c_readreg
	.comm	i2c_lock,4,4
	.comm	CLOCK_LOW_TIME,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.c_i2c_readreg.c"
	.text
	.align	2
	.global	i2c_readreg
	.syntax unified
	.arm
	.fpu softvfp
	.type	i2c_readreg, %function
i2c_readreg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	ldr	r0, .L17
	mov	r7, r1
	mov	r5, #4
	bl	spin_lock
	ldr	r9, .L17+4
	and	r8, r6, #254
	orr	r6, r6, #1
.L6:
	mov	r0, #0
	bl	local_irq_save
	bl	i2c_start
	mov	r0, r8
	bl	i2c_outbyte
	bl	i2c_getack
	mov	r10, r0
	bl	i2c_dir_out
	mov	r0, r7
	bl	i2c_outbyte
	bl	i2c_getack
	cmp	r0, #0
	ldr	r0, [r9]
	beq	.L2
	bl	i2c_delay
	bl	i2c_start
	mov	r0, r6
	bl	i2c_outbyte
	bl	i2c_getack
	cmp	r0, #0
	beq	.L14
	bl	i2c_inbyte
	mov	r4, r0
	bl	i2c_sendnack
	bl	i2c_stop
	mov	r0, #0
	bl	local_irq_restore
	cmp	r10, #0
	bne	.L5
.L4:
	subs	r5, r5, #1
	bne	.L6
.L5:
	ldr	r0, .L17
	bl	spin_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	bl	i2c_delay
	bl	i2c_start
	mov	r0, r6
	bl	i2c_outbyte
	bl	i2c_getack
.L14:
	bl	i2c_inbyte
	mov	r4, r0
	bl	i2c_sendnack
	bl	i2c_stop
	mov	r0, #0
	bl	local_irq_restore
	b	.L4
.L18:
	.align	2
.L17:
	.word	i2c_lock
	.word	CLOCK_LOW_TIME
	.size	i2c_readreg, .-i2c_readreg
	.comm	i2c_lock,4,4
	.comm	CLOCK_LOW_TIME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
