	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc74_update_device
_tc74_update_device:                    ## @tc74_update_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	24(%rax), %r15
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	movq	16(%r12), %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_TC74_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:
	movl	$6, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_7
## %bb.8:
	movq	_TC74_REG_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	%ebx, 4(%r12)
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	addq	(%r13), %rax
	movq	%rax, 16(%r12)
	movl	$1, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_2:
	xorl	%ebx, %ebx
	cmpl	$0, (%r12)
	jne	LBB0_11
	jmp	LBB0_3
LBB0_4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_7:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
LBB0_11:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_TC74_REG_CONFIG,4,2            ## @TC74_REG_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TC74_REG_CONFIG read err %d\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_TC74_REG_TEMP,4,2              ## @TC74_REG_TEMP
L_.str.1:                               ## @.str.1
	.asciz	"TC74_REG_TEMP read err %d\n"

	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_tc74_update_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc74_update_device
_tc74_update_device:                    ; @tc74_update_device
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	x21, [x0, #24]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.1:
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x0, [x23]
	ldr	x1, [x20, #16]
	bl	_time_after
	cbz	x0, LBB0_6
LBB0_2:
Lloh2:
	adrp	x8, _TC74_REG_CONFIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TC74_REG_CONFIG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	w0, #6
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_9
; %bb.4:
Lloh5:
	adrp	x8, _TC74_REG_TEMP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TC74_REG_TEMP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
; %bb.5:
Lloh8:
	adrp	x8, _HZ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh10:
	ldr	w8, [x8]
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w8, w8, #2
	add	x8, x9, w8, sxtw
	str	x8, [x20, #16]
	mov	w8, #1
	stp	w8, w22, [x20]
	b	LBB0_7
LBB0_6:
	ldr	w8, [x20]
	cbz	w8, LBB0_2
LBB0_7:
	mov	w22, #0
	b	LBB0_12
LBB0_8:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh13:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_10:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	mov	x0, x21
	mov	x2, x22
	bl	_dev_dbg
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_TC74_REG_CONFIG,4,2            ; @TC74_REG_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TC74_REG_CONFIG read err %d\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_TC74_REG_TEMP,4,2              ; @TC74_REG_TEMP
l_.str.1:                               ; @.str.1
	.asciz	"TC74_REG_TEMP read err %d\n"

	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_tc74_update_device
.subsections_via_symbols
