	.file	"extr_w1_ds2431.c_w1_f2d_read_bin.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	w1_f2d_read_bin, @function
w1_f2d_read_bin:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	rdi, rsi
	mov	r15, r9
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, r8d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	kobj_to_w1_slave@PLT
	mov	edx, DWORD PTR W1_F2D_EEPROM_SIZE[rip]
	mov	rsi, r15
	mov	edi, ebp
	mov	r13, rax
	call	w1_f2d_fix_count@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L12
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L12:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[r13]
	mov	ebx, r15d
	call	mutex_lock@PLT
	test	r15d, r15d
	jle	.L3
	mov	edx, DWORD PTR W1_F2D_READ_MAXLEN[rip]
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	edx, ebx
	mov	rcx, r14
	mov	esi, ebp
	mov	rdi, r13
	cmovg	edx, ebx
	call	w1_f2d_readblock@PLT
	test	rax, rax
	jns	.L4
	mov	r12, QWORD PTR EIO[rip]
	neg	r12
.L4:
	movsx	rax, DWORD PTR W1_F2D_READ_MAXLEN[rip]
	sub	ebx, eax
	mov	rdx, rax
	add	r14, rax
	add	ebp, eax
	test	ebx, ebx
	jg	.L5
.L3:
	mov	rdi, QWORD PTR 0[r13]
	call	mutex_unlock@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	w1_f2d_read_bin, .-w1_f2d_read_bin
	.comm	W1_F2D_READ_MAXLEN,4,4
	.comm	W1_F2D_EEPROM_SIZE,4,4
	.comm	EIO,8,8
	.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_w1_ds2431.c_w1_f2d_read_bin.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	w1_f2d_read_bin, %function
w1_f2d_read_bin:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r0, r1
	mov	r5, r3
	ldr	r6, [sp, #32]
	bl	kobj_to_w1_slave
	ldr	r3, .L13
	mov	r8, r0
	ldr	r1, [sp, #36]
	mov	r0, r6
	ldr	r2, [r3]
	bl	w1_f2d_fix_count
	subs	r7, r0, #0
	bne	.L12
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	ldr	r4, [sp, #36]
	ldr	r0, [r8]
	bl	mutex_lock
	cmp	r4, #0
	ble	.L3
	ldr	r9, .L13+4
	ldr	r10, .L13+8
	ldr	r2, [r9]
.L5:
	cmp	r2, r4
	movge	r2, r4
	mov	r3, r5
	mov	r1, r6
	mov	r0, r8
	bl	w1_f2d_readblock
	ldr	r2, [r9]
	cmp	r0, #0
	ldrlt	r7, [r10]
	sub	r4, r4, r2
	rsblt	r7, r7, #0
	cmp	r4, #0
	add	r5, r5, r2
	add	r6, r6, r2
	bgt	.L5
.L3:
	ldr	r0, [r8]
	bl	mutex_unlock
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	.align	2
.L13:
	.word	W1_F2D_EEPROM_SIZE
	.word	W1_F2D_READ_MAXLEN
	.word	EIO
	.size	w1_f2d_read_bin, .-w1_f2d_read_bin
	.comm	W1_F2D_READ_MAXLEN,4,4
	.comm	W1_F2D_EEPROM_SIZE,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
