	.file	"extr_af9013.c_af9013_read_reg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"I2C read failed reg:%04x"
	.text
	.p2align 4
	.type	af9013_read_reg, @function
af9013_read_reg:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdx
	sub	rsp, 88
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	eax, esi
	mov	rdx, rsp
	mov	DWORD PTR 12[rsp], 0
	sar	eax, 8
	mov	QWORD PTR 48[rsp], rdx
	mov	edx, DWORD PTR I2C_M_RD[rip]
	mov	DWORD PTR 4[rsp], eax
	movzx	eax, sil
	lea	rsi, 16[rsp]
	mov	DWORD PTR 8[rsp], eax
	lea	rax, 4[rsp]
	mov	QWORD PTR 24[rsp], rax
	mov	eax, DWORD PTR 4[rdi]
	mov	edi, DWORD PTR [rdi]
	mov	DWORD PTR 56[rsp], edx
	mov	edx, 2
	mov	DWORD PTR 16[rsp], 12
	mov	DWORD PTR 32[rsp], 0
	mov	DWORD PTR 36[rsp], eax
	mov	DWORD PTR 40[rsp], 4
	mov	DWORD PTR 60[rsp], eax
	call	i2c_transfer@PLT
	cmp	eax, 2
	jne	.L7
	mov	eax, DWORD PTR [rsp]
	mov	DWORD PTR [rbx], eax
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 72[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, ebp
	lea	rdi, .LC0[rip]
	call	warn@PLT
	mov	eax, DWORD PTR EREMOTEIO[rip]
	neg	eax
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	af9013_read_reg, .-af9013_read_reg
	.comm	I2C_M_RD,4,4
	.comm	EREMOTEIO,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_af9013.c_af9013_read_reg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"I2C read failed reg:%04x\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	af9013_read_reg, %function
af9013_read_reg:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r1
	mov	ip, #4
	mov	r4, #0
	mov	lr, #12
	ldr	r1, .L9
	ldr	r3, [r0, #4]
	mov	r6, r2
	ldr	r2, .L9+4
	sub	sp, sp, #60
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r2, [sp, #52]
	mov	r2,#0
	str	r3, [sp, #32]
	str	r3, [sp, #48]
	asr	r3, r5, #8
	str	r3, [sp, #8]
	str	r1, [sp, #44]
	and	r3, r5, #255
	add	r1, sp, #8
	str	r3, [sp, #12]
	str	r1, [sp, #24]
	add	r3, sp, ip
	mov	r2, #2
	ldr	r0, [r0]
	add	r1, sp, #20
	str	r4, [sp, #16]
	str	r4, [sp, #28]
	str	lr, [sp, #20]
	str	ip, [sp, #36]
	str	r3, [sp, #40]
	bl	i2c_transfer
	cmp	r0, #2
	bne	.L7
	mov	r0, r4
	ldr	r3, [sp, #4]
	str	r3, [r6]
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	mov	r1, r5
	ldr	r0, .L9+8
	bl	warn
	ldr	r3, .L9+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	I2C_M_RD
	.word	.LC1
	.word	.LC0
	.word	EREMOTEIO
	.size	af9013_read_reg, .-af9013_read_reg
	.comm	I2C_M_RD,4,4
	.comm	EREMOTEIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
