	.file	"extr_jc42.c_jc42_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	jc42_read, @function
jc42_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edx
	call	jc42_update_device@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L18
	lea	edx, -128[rbx]
	cmp	edx, 8
	ja	.L3
	lea	rcx, .L5[rip]
	movsx	rax, DWORD PTR [rcx+rdx*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L13-.L5
	.long	.L12-.L5
	.long	.L11-.L5
	.long	.L10-.L5
	.long	.L9-.L5
	.long	.L8-.L5
	.long	.L7-.L5
	.long	.L6-.L5
	.long	.L4-.L5
	.text
	.p2align 4,,10
	.p2align 3
.L18:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	PTR_ERR@PLT
.L6:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_input[rip]
	mov	ecx, DWORD PTR JC42_ALARM_CRIT_BIT[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	sar	eax, cl
	and	eax, 1
	mov	QWORD PTR [r12], rax
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_crit[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	call	jc42_temp_from_reg@PLT
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	jmp	.L1
.L13:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_input[rip]
	mov	ecx, DWORD PTR JC42_ALARM_MIN_BIT[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	sar	eax, cl
	and	eax, 1
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	jmp	.L1
.L12:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_min[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	call	jc42_temp_from_reg@PLT
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	jmp	.L1
.L11:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_max[rip]
.L16:
	mov	edi, DWORD PTR [rax+rdx*4]
	call	jc42_temp_from_reg@PLT
	mov	rcx, QWORD PTR JC42_CFG_HYST_SHIFT[rip]
	mov	rdx, QWORD PTR 8[rbp]
	and	rdx, QWORD PTR JC42_CFG_HYST_MASK[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	shr	rdx, cl
	mov	rcx, QWORD PTR jc42_hysteresis[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	sub	eax, DWORD PTR [rcx+rdx*4]
	cdqe
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_input[rip]
	mov	ecx, DWORD PTR JC42_ALARM_MAX_BIT[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	sar	eax, cl
	and	eax, 1
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	jmp	.L1
.L9:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_max[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	call	jc42_temp_from_reg@PLT
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	jmp	.L1
.L8:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_input[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	call	jc42_temp_from_reg@PLT
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	jmp	.L1
.L7:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR t_crit[rip]
	jmp	.L16
.L3:
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	jc42_read, .-jc42_read
	.comm	t_min,8,8
	.comm	t_max,8,8
	.comm	t_input,8,8
	.comm	t_crit,8,8
	.comm	jc42_hysteresis,8,8
	.comm	JC42_CFG_HYST_SHIFT,8,8
	.comm	JC42_CFG_HYST_MASK,8,8
	.comm	JC42_ALARM_MIN_BIT,4,4
	.comm	JC42_ALARM_MAX_BIT,4,4
	.comm	JC42_ALARM_CRIT_BIT,4,4
	.comm	EOPNOTSUPP,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_jc42.c_jc42_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	jc42_read, %function
jc42_read:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, [sp, #24]
	mov	r4, r2
	bl	jc42_update_device
	mov	r5, r0
	bl	IS_ERR
	subs	r6, r0, #0
	bne	.L20
	sub	r2, r4, #128
	cmp	r2, #8
	ldrls	pc, [pc, r2, asl #2]
	b	.L3
.L5:
	.word	.L13
	.word	.L12
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L4
.L20:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	PTR_ERR
.L4:
	ldr	r2, .L21
.L17:
	ldr	r3, [r5]
	ldr	r2, [r2]
	ldr	r0, [r3, r2, lsl #2]
	bl	jc42_temp_from_reg
	str	r0, [r7]
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r2, .L21+4
	ldr	r3, [r5]
	ldr	r1, [r2]
	ldr	r2, .L21+8
.L16:
	ldr	r3, [r3, r1, lsl #2]
	ldr	r2, [r2]
	mov	r0, r6
	asr	r3, r3, r2
	and	r3, r3, #1
	str	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r2, .L21+12
	b	.L17
.L11:
	ldr	r2, .L21+16
.L18:
	ldr	r3, [r5]
	ldr	r2, [r2]
	ldr	r0, [r3, r2, lsl #2]
	bl	jc42_temp_from_reg
	ldr	r2, .L21+20
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	ldr	r1, .L21+24
	and	r3, r3, r2
	ldr	r2, .L21+28
	ldr	r1, [r1]
	ldr	r2, [r2]
	lsr	r3, r3, r1
	ldr	r3, [r2, r3, lsl #2]
	sub	r0, r0, r3
	str	r0, [r7]
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r2, .L21+4
	ldr	r3, [r5]
	ldr	r1, [r2]
	ldr	r2, .L21+32
	b	.L16
.L9:
	ldr	r2, .L21+16
	b	.L17
.L8:
	ldr	r2, .L21+4
	b	.L17
.L7:
	ldr	r2, .L21
	b	.L18
.L6:
	ldr	r2, .L21+4
	ldr	r3, [r5]
	ldr	r1, [r2]
	ldr	r2, .L21+36
	b	.L16
.L3:
	ldr	r3, .L21+40
	ldr	r0, [r3]
	rsb	r6, r0, #0
	b	.L1
.L22:
	.align	2
.L21:
	.word	t_crit
	.word	t_input
	.word	JC42_ALARM_MIN_BIT
	.word	t_min
	.word	t_max
	.word	JC42_CFG_HYST_MASK
	.word	JC42_CFG_HYST_SHIFT
	.word	jc42_hysteresis
	.word	JC42_ALARM_MAX_BIT
	.word	JC42_ALARM_CRIT_BIT
	.word	EOPNOTSUPP
	.size	jc42_read, .-jc42_read
	.comm	t_min,4,4
	.comm	t_max,4,4
	.comm	t_input,4,4
	.comm	t_crit,4,4
	.comm	jc42_hysteresis,4,4
	.comm	JC42_CFG_HYST_SHIFT,4,4
	.comm	JC42_CFG_HYST_MASK,4,4
	.comm	JC42_ALARM_MIN_BIT,4,4
	.comm	JC42_ALARM_MAX_BIT,4,4
	.comm	JC42_ALARM_CRIT_BIT,4,4
	.comm	EOPNOTSUPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
