	.file	"extr_da9150-core.c_da9150_i2c_read_device.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	da9150_i2c_read_device, @function
da9150_i2c_read_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	mov	edx, 1
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 12[rsp], esi
	lea	r13, 16[rsp]
	mov	rsi, r13
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 4[rdi]
	mov	edi, DWORD PTR [rdi]
	mov	DWORD PTR 16[rsp], 1
	mov	QWORD PTR 32[rsp], 0
	mov	DWORD PTR 40[rsp], eax
	lea	rax, 12[rsp]
	mov	QWORD PTR 24[rsp], rax
	call	i2c_transfer@PLT
	cmp	eax, 1
	je	.L2
.L8:
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
.L1:
	mov	rsi, QWORD PTR 56[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L10
	add	rsp, 72
	.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
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 1
	mov	rsi, r13
	mov	DWORD PTR 16[rsp], r12d
	mov	DWORD PTR 40[rsp], eax
	mov	rax, QWORD PTR I2C_M_RD[rip]
	mov	QWORD PTR 24[rsp], rbp
	mov	QWORD PTR 32[rsp], rax
	call	i2c_transfer@PLT
	cmp	eax, 1
	jne	.L8
	xor	eax, eax
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	da9150_i2c_read_device, .-da9150_i2c_read_device
	.comm	I2C_M_RD,8,8
	.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_da9150-core.c_da9150_i2c_read_device.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	da9150_i2c_read_device, %function
da9150_i2c_read_device:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #1
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, #0
	sub	sp, sp, #32
	mov	r5, r3
	ldr	r3, .L10
	ldr	lr, [r0, #4]
	str	r1, [sp, #4]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r4, r0
	add	r3, sp, #4
	mov	r6, r2
	ldr	r0, [r0]
	mov	r2, ip
	add	r1, sp, #12
	str	lr, [sp, #24]
	str	ip, [sp, #12]
	str	r7, [sp, #20]
	str	r3, [sp, #16]
	bl	i2c_transfer
	cmp	r0, #1
	beq	.L2
	cmp	r0, r7
	blt	.L1
.L7:
	ldr	r3, .L10+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L10+8
	mov	r2, r0
	ldr	ip, [r3]
	add	r1, sp, #12
	ldm	r4, {r0, r3}
	str	r6, [sp, #12]
	str	r5, [sp, #16]
	str	ip, [sp, #20]
	str	r3, [sp, #24]
	bl	i2c_transfer
	cmp	r0, #1
	moveq	r0, r7
	beq	.L1
	cmp	r0, #0
	bge	.L7
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	EIO
	.word	I2C_M_RD
	.size	da9150_i2c_read_device, .-da9150_i2c_read_device
	.comm	I2C_M_RD,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
