	.file	"extr_envy24ht.c_envy24ht_rdi2c.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	envy24ht_rdi2c, @function
envy24ht_rdi2c:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	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, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR ENVY24HT_TIMEOUT[rip]
	test	eax, eax
	jg	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, 32
	add	ebx, 1
	call	DELAY@PLT
	mov	eax, DWORD PTR ENVY24HT_TIMEOUT[rip]
	cmp	eax, ebx
	jle	.L2
.L4:
	mov	esi, DWORD PTR ENVY24HT_CCS_I2CSTAT[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	envy24ht_rdcs@PLT
	test	DWORD PTR ENVY24HT_CCS_I2CSTAT_BSY[rip], eax
	jne	.L3
	mov	eax, DWORD PTR ENVY24HT_TIMEOUT[rip]
.L2:
	cmp	eax, ebx
	je	.L6
	mov	esi, DWORD PTR ENVY24HT_CCS_I2CADDR[rip]
	mov	ecx, 1
	mov	edx, r13d
	xor	ebx, ebx
	mov	rdi, rbp
	call	envy24ht_wrcs@PLT
	mov	edx, DWORD PTR ENVY24HT_CCS_I2CDEV_ADDR[rip]
	mov	ecx, 1
	mov	rdi, rbp
	mov	esi, DWORD PTR ENVY24HT_CCS_I2CDEV[rip]
	and	edx, r12d
	or	edx, DWORD PTR ENVY24HT_CCS_I2CDEV_RD[rip]
	call	envy24ht_wrcs@PLT
	mov	eax, DWORD PTR ENVY24HT_TIMEOUT[rip]
	test	eax, eax
	jg	.L9
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, 32
	add	ebx, 1
	call	DELAY@PLT
	mov	eax, DWORD PTR ENVY24HT_TIMEOUT[rip]
	cmp	eax, ebx
	jle	.L7
.L9:
	mov	esi, DWORD PTR ENVY24HT_CCS_I2CSTAT[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	envy24ht_rdcs@PLT
	test	DWORD PTR ENVY24HT_CCS_I2CSTAT_BSY[rip], eax
	jne	.L8
	mov	eax, DWORD PTR ENVY24HT_TIMEOUT[rip]
.L7:
	cmp	eax, ebx
	je	.L6
	mov	esi, DWORD PTR ENVY24HT_CCS_I2CDATA[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	mov	edx, 1
	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
	jmp	envy24ht_rdcs@PLT
.L6:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, -1
	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	envy24ht_rdi2c, .-envy24ht_rdi2c
	.comm	ENVY24HT_TIMEOUT,4,4
	.comm	ENVY24HT_CCS_I2CSTAT_BSY,4,4
	.comm	ENVY24HT_CCS_I2CSTAT,4,4
	.comm	ENVY24HT_CCS_I2CDEV_RD,4,4
	.comm	ENVY24HT_CCS_I2CDEV_ADDR,4,4
	.comm	ENVY24HT_CCS_I2CDEV,4,4
	.comm	ENVY24HT_CCS_I2CDATA,4,4
	.comm	ENVY24HT_CCS_I2CADDR,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_envy24ht.c_envy24ht_rdi2c.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	envy24ht_rdi2c, %function
envy24ht_rdi2c:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, .L17
	mov	r5, r0
	ldr	r3, [r6]
	mov	r9, r1
	cmp	r3, #0
	mov	r4, #0
	mov	r10, r2
	ble	.L2
	ldr	r8, .L17+4
	ldr	r7, .L17+8
	b	.L4
.L3:
	mov	r0, #32
	bl	DELAY
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L4:
	mov	r2, #1
	mov	r0, r5
	ldr	r1, [r8]
	bl	envy24ht_rdcs
	ldr	r3, [r7]
	tst	r0, r3
	bne	.L3
	ldr	r3, [r6]
.L2:
	cmp	r3, r4
	beq	.L6
	ldr	r3, .L17+12
	mov	r2, r10
	ldr	r1, [r3]
	mov	r0, r5
	mov	r3, #1
	bl	envy24ht_wrcs
	ldr	r2, .L17+16
	ldr	r3, .L17+20
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L17+24
	and	r9, r9, r1
	mov	r0, r5
	ldr	r1, [r3]
	orr	r2, r9, r2
	mov	r3, #1
	bl	envy24ht_wrcs
	ldr	r3, [r6]
	mov	r4, #0
	cmp	r3, #0
	ble	.L7
	ldr	r8, .L17+4
	ldr	r7, .L17+8
	b	.L9
.L8:
	mov	r0, #32
	bl	DELAY
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L7
.L9:
	mov	r2, #1
	mov	r0, r5
	ldr	r1, [r8]
	bl	envy24ht_rdcs
	ldr	r3, [r7]
	tst	r0, r3
	bne	.L8
	ldr	r3, [r6]
.L7:
	cmp	r3, r4
	beq	.L6
	ldr	r3, .L17+28
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r2, #1
	ldr	r1, [r3]
	b	envy24ht_rdcs
.L6:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	.align	2
.L17:
	.word	ENVY24HT_TIMEOUT
	.word	ENVY24HT_CCS_I2CSTAT
	.word	ENVY24HT_CCS_I2CSTAT_BSY
	.word	ENVY24HT_CCS_I2CADDR
	.word	ENVY24HT_CCS_I2CDEV_ADDR
	.word	ENVY24HT_CCS_I2CDEV_RD
	.word	ENVY24HT_CCS_I2CDEV
	.word	ENVY24HT_CCS_I2CDATA
	.size	envy24ht_rdi2c, .-envy24ht_rdi2c
	.comm	ENVY24HT_TIMEOUT,4,4
	.comm	ENVY24HT_CCS_I2CSTAT_BSY,4,4
	.comm	ENVY24HT_CCS_I2CSTAT,4,4
	.comm	ENVY24HT_CCS_I2CDEV_RD,4,4
	.comm	ENVY24HT_CCS_I2CDEV_ADDR,4,4
	.comm	ENVY24HT_CCS_I2CDEV,4,4
	.comm	ENVY24HT_CCS_I2CDATA,4,4
	.comm	ENVY24HT_CCS_I2CADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
