	.file	"extr_w1_ds250x.c_w1_ds2502_read_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	w1_ds2502_read_page, @function
w1_ds2502_read_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r14, QWORD PTR 8[rdi]
	mov	edi, ebp
	mov	r12d, DWORD PTR EIO[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r13d, DWORD PTR W1_PAGE_SIZE[rip]
	mov	esi, DWORD PTR 8[r14]
	neg	r12d
	call	test_bit@PLT
	test	rax, rax
	je	.L8
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L8:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	call	mutex_lock@PLT
	mov	rdi, rbx
	call	w1_reset_select_slave@PLT
	test	rax, rax
	jne	.L3
	imul	r13d, ebp
	mov	rax, QWORD PTR W1_READ_DATA_CRC[rip]
	mov	rdi, QWORD PTR [rbx]
	lea	r15, 16[rsp]
	mov	rsi, r15
	mov	edx, 3
	mov	QWORD PTR 16[rsp], rax
	movzx	eax, r13b
	mov	QWORD PTR 24[rsp], rax
	mov	eax, r13d
	sar	eax, 8
	cdqe
	mov	QWORD PTR 32[rsp], rax
	call	w1_write_block@PLT
	mov	rdi, QWORD PTR [rbx]
	call	w1_read_8@PLT
	mov	esi, 3
	mov	rdi, r15
	mov	QWORD PTR 8[rsp], rax
	call	w1_calc_crc8@PLT
	cmp	rax, QWORD PTR 8[rsp]
	je	.L10
.L3:
	mov	rdi, QWORD PTR [rbx]
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, QWORD PTR [r14]
	movsx	r13, r13d
	mov	edx, DWORD PTR W1_PAGE_SIZE[rip]
	sal	r13, 3
	mov	rdi, QWORD PTR [rbx]
	add	rsi, r13
	call	w1_read_block@PLT
	mov	rdi, QWORD PTR [rbx]
	call	w1_read_8@PLT
	mov	rdi, QWORD PTR [r14]
	mov	esi, DWORD PTR W1_PAGE_SIZE[rip]
	mov	r15, rax
	add	rdi, r13
	call	w1_calc_crc8@PLT
	cmp	rax, r15
	jne	.L3
	mov	esi, DWORD PTR 8[r14]
	mov	edi, ebp
	xor	r12d, r12d
	call	set_bit@PLT
	jmp	.L3
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	w1_ds2502_read_page, .-w1_ds2502_read_page
	.comm	W1_READ_DATA_CRC,8,8
	.comm	W1_PAGE_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
	.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_ds250x.c_w1_ds2502_read_page.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	w1_ds2502_read_page, %function
w1_ds2502_read_page:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	ldr	r3, .L11
	ldr	r8, [r0, #4]
	ldr	r5, [r3]
	ldr	r9, .L11+4
	ldr	r3, .L11+8
	sub	sp, sp, #20
	mov	r4, r0
	ldr	r1, [r8, #4]
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r7, [r9]
	bl	test_bit
	cmp	r0, #0
	movne	r5, #0
	beq	.L8
.L1:
	ldr	r3, .L11+8
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	ldr	r0, [r4]
	bl	mutex_lock
	mov	r0, r4
	bl	w1_reset_select_slave
	subs	r10, r0, #0
	rsb	r5, r5, #0
	bne	.L3
	mul	r7, r6, r7
	ldr	r3, .L11+12
	and	r2, r7, #255
	ldr	r3, [r3]
	asr	r0, r7, #8
	mov	r1, sp
	str	r2, [sp, #4]
	str	r0, [sp, #8]
	mov	r2, #3
	ldr	r0, [r4]
	str	r3, [sp]
	bl	w1_write_block
	ldr	r0, [r4]
	bl	w1_read_8
	mov	r1, #3
	mov	fp, r0
	mov	r0, sp
	bl	w1_calc_crc8
	cmp	r0, fp
	beq	.L10
.L3:
	ldr	r0, [r4]
	bl	mutex_unlock
	b	.L1
.L10:
	ldr	r1, [r8]
	ldr	r2, [r9]
	add	r1, r1, r7, lsl #2
	ldr	r0, [r4]
	bl	w1_read_block
	ldr	r0, [r4]
	bl	w1_read_8
	mov	r3, r0
	ldr	r0, [r8]
	lsl	r7, r7, #2
	add	r0, r0, r7
	ldr	r1, [r9]
	mov	r7, r3
	bl	w1_calc_crc8
	cmp	r0, r7
	bne	.L3
	mov	r0, r6
	ldr	r1, [r8, #4]
	bl	set_bit
	mov	r5, r10
	b	.L3
.L9:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	EIO
	.word	W1_PAGE_SIZE
	.word	.LC0
	.word	W1_READ_DATA_CRC
	.size	w1_ds2502_read_page, .-w1_ds2502_read_page
	.comm	W1_READ_DATA_CRC,4,4
	.comm	W1_PAGE_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
