	.file	"extr_w83627hf.c_w83627hf_read_value.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	w83627hf_read_value, @function
w83627hf_read_value:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	movzx	r14d, r12b
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	mutex_lock@PLT
	mov	eax, r12d
	and	eax, 65280
	sub	eax, 256
	test	eax, -512
	jne	.L2
	lea	eax, -83[r14]
	and	eax, -3
	je	.L3
	cmp	r14d, 80
	jne	.L2
.L3:
	mov	esi, r12d
	mov	rdi, rbp
	call	w83627hf_set_bank@PLT
	mov	rsi, QWORD PTR W83781D_ADDR_REG_OFFSET[rip]
	mov	edi, r14d
	add	rsi, QWORD PTR 8[rbp]
	call	outb_p@PLT
	mov	rdi, QWORD PTR W83781D_DATA_REG_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbp]
	call	inb_p@PLT
	mov	rsi, QWORD PTR W83781D_ADDR_REG_OFFSET[rip]
	lea	edi, 1[r14]
	add	rsi, QWORD PTR 8[rbp]
	mov	r13d, eax
	call	outb_p@PLT
	mov	rdi, QWORD PTR W83781D_DATA_REG_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbp]
	sal	r13d, 8
	call	inb_p@PLT
	add	r13d, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, r12d
	mov	rdi, rbp
	call	w83627hf_set_bank@PLT
	mov	rsi, QWORD PTR W83781D_ADDR_REG_OFFSET[rip]
	mov	edi, r14d
	add	rsi, QWORD PTR 8[rbp]
	call	outb_p@PLT
	mov	rdi, QWORD PTR W83781D_DATA_REG_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbp]
	call	inb_p@PLT
	mov	r13d, eax
.L4:
	mov	esi, r12d
	mov	rdi, rbp
	call	w83627hf_reset_bank@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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	w83627hf_read_value, .-w83627hf_read_value
	.comm	W83781D_DATA_REG_OFFSET,8,8
	.comm	W83781D_ADDR_REG_OFFSET,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_w83627hf.c_w83627hf_read_value.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	w83627hf_read_value, %function
w83627hf_read_value:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r1
	mov	r4, r0
	bl	mutex_lock
	and	r3, r5, #65280
	sub	r3, r3, #256
	bic	r3, r3, #256
	cmp	r3, #0
	and	r7, r5, #255
	bne	.L2
	sub	r3, r7, #83
	bic	r3, r3, #2
	cmp	r3, #0
	cmpne	r7, #80
	bne	.L2
	ldr	r9, .L8
	mov	r1, r5
	mov	r0, r4
	bl	w83627hf_set_bank
	ldr	r3, [r9]
	ldr	r1, [r4, #4]
	ldr	r8, .L8+4
	add	r1, r1, r3
	mov	r0, r7
	bl	outb_p
	ldr	r3, [r8]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	inb_p
	ldr	r3, [r9]
	ldr	r1, [r4, #4]
	mov	r6, r0
	add	r1, r1, r3
	add	r0, r7, #1
	bl	outb_p
	ldr	r3, [r8]
	ldr	r0, [r4, #4]
	lsl	r6, r6, #8
	add	r0, r0, r3
	bl	inb_p
	add	r6, r6, r0
	b	.L4
.L2:
	mov	r1, r5
	mov	r0, r4
	bl	w83627hf_set_bank
	ldr	r3, .L8
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mov	r0, r7
	add	r1, r1, r3
	bl	outb_p
	ldr	r3, .L8+4
	ldr	r0, [r4, #4]
	ldr	r3, [r3]
	add	r0, r0, r3
	bl	inb_p
	mov	r6, r0
.L4:
	mov	r1, r5
	mov	r0, r4
	bl	w83627hf_reset_bank
	mov	r0, r4
	bl	mutex_unlock
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	.align	2
.L8:
	.word	W83781D_ADDR_REG_OFFSET
	.word	W83781D_DATA_REG_OFFSET
	.size	w83627hf_read_value, .-w83627hf_read_value
	.comm	W83781D_DATA_REG_OFFSET,4,4
	.comm	W83781D_ADDR_REG_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
