	.file	"extr_pt1.c_pt1_i2c_read_msg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pt1_i2c_read_msg, @function
pt1_i2c_read_msg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	lea	r12, 12[rsp]
	mov	DWORD PTR 12[rsp], esi
	mov	rdx, r12
	call	pt1_i2c_prepare@PLT
	mov	ecx, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR 12[rsp]
	mov	rdx, r12
	mov	rdi, rbx
	lea	ecx, 1[rcx+rcx]
	call	pt1_i2c_write_byte@PLT
	mov	eax, DWORD PTR 4[rbp]
	test	eax, eax
	jle	.L2
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L3:
	sub	eax, 1
	xor	ecx, ecx
	mov	esi, DWORD PTR 12[rsp]
	mov	rdx, r12
	cmp	eax, r14d
	mov	rdi, rbx
	sete	cl
	add	r14d, 1
	call	pt1_i2c_read_byte@PLT
	mov	eax, DWORD PTR 4[rbp]
	cmp	eax, r14d
	jg	.L3
.L2:
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 0[r13], eax
	add	rsp, 16
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	pt1_i2c_read_msg, .-pt1_i2c_read_msg
	.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_pt1.c_pt1_i2c_read_msg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pt1_i2c_read_msg, %function
pt1_i2c_read_msg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r3
	mov	r6, r0
	sub	sp, sp, #12
	mov	r7, r2
	add	r2, sp, #4
	str	r1, [sp, #4]
	bl	pt1_i2c_prepare
	ldr	r3, [r5]
	mov	r0, r6
	lsl	r3, r3, #1
	orr	r3, r3, #1
	ldr	r1, [sp, #4]
	add	r2, sp, #4
	bl	pt1_i2c_write_byte
	ldr	r3, [r5, #4]
	cmp	r3, #0
	ble	.L2
	mov	r4, #0
.L3:
	sub	r3, r3, #1
	sub	r3, r3, r4
	clz	r3, r3
	mov	r0, r6
	lsr	r3, r3, #5
	ldr	r1, [sp, #4]
	add	r2, sp, #4
	bl	pt1_i2c_read_byte
	ldr	r3, [r5, #4]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L3
.L2:
	ldr	r3, [sp, #4]
	str	r3, [r7]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
	.size	pt1_i2c_read_msg, .-pt1_i2c_read_msg
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
