	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fts_update_device
_fts_update_device:                     ## @fts_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
	movq	%rdi, %r15
	leaq	56(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	addq	%rsi, %rsi
	addq	64(%r15), %rsi
	callq	_time_after
	testl	%eax, %eax
	je	LBB0_1
LBB0_2:
	movl	72(%r15), %edi
	movq	_FTS_DEVICE_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.3:
	shrl	%ebx
	andl	$1, %ebx
	movl	%ebx, (%r15)
	xorl	$1, %ebx
	movl	%ebx, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	$0, (%r15)
	jne	LBB0_24
	jmp	LBB0_2
LBB0_5:
	movl	72(%r15), %edi
	movq	_FTS_FAN_PRESENT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.6:
	movl	%ebx, 4(%r15)
	movl	72(%r15), %edi
	movq	_FTS_FAN_EVENT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.7:
	movl	%ebx, 8(%r15)
	movq	_FTS_NO_FAN_SENSORS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_14
## %bb.8:
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%r15), %rax
	movl	$0, (%rax,%r12,4)
	xorl	%ebx, %ebx
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r15), %rax
	movl	%ebx, (%rax,%r12,4)
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %ebx
	movl	%r12d, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	72(%r15), %ebx
	movl	%r12d, %edi
	callq	_FTS_REG_FAN_INPUT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%r15), %rax
	movl	%ebx, (%rax,%r12,4)
	movl	72(%r15), %ebx
	movl	%r12d, %edi
	callq	_FTS_REG_FAN_SOURCE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_13
	jmp	LBB0_24
LBB0_14:
	movl	72(%r15), %edi
	movq	_FTS_SENSOR_EVENT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.15:
	movl	%ebx, 32(%r15)
	movq	_FTS_NO_TEMP_SENSORS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_19
## %bb.16:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	72(%r15), %ebx
	movl	%r12d, %edi
	callq	_FTS_REG_TEMP_INPUT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	40(%r15), %rax
	movl	%ebx, (%rax,%r12,4)
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jl	LBB0_17
LBB0_19:
	movq	_FTS_NO_VOLT_SENSORS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_23
## %bb.20:
	xorl	%r12d, %r12d
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	72(%r15), %ebx
	movl	%r12d, %edi
	callq	_FTS_REG_VOLT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_fts_read_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	48(%r15), %rax
	movl	%ebx, (%rax,%r12,4)
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jl	LBB0_21
LBB0_23:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r15)
	xorl	%ebx, %ebx
LBB0_24:
	movq	%r14, %rdi
	callq	_mutex_unlock
	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	_HZ,4,2                         ## @HZ
	.comm	_FTS_DEVICE_STATUS_REG,4,2      ## @FTS_DEVICE_STATUS_REG
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_FTS_FAN_PRESENT_REG,4,2        ## @FTS_FAN_PRESENT_REG
	.comm	_FTS_FAN_EVENT_REG,4,2          ## @FTS_FAN_EVENT_REG
	.comm	_FTS_NO_FAN_SENSORS,4,2         ## @FTS_NO_FAN_SENSORS
	.comm	_FTS_SENSOR_EVENT_REG,4,2       ## @FTS_SENSOR_EVENT_REG
	.comm	_FTS_NO_TEMP_SENSORS,4,2        ## @FTS_NO_TEMP_SENSORS
	.comm	_FTS_NO_VOLT_SENSORS,4,2        ## @FTS_NO_VOLT_SENSORS
	.no_dead_strip	_fts_update_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fts_update_device
_fts_update_device:                     ; @fts_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
	mov	x20, x0
	add	x19, x0, #56
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x0, [x23]
	ldr	x8, [x20, #64]
Lloh2:
	adrp	x9, _HZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh4:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #1
	bl	_time_after
	cbz	w0, LBB0_4
LBB0_1:
	ldr	w0, [x20, #72]
Lloh5:
	adrp	x8, _FTS_DEVICE_STATUS_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FTS_DEVICE_STATUS_REG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.2:
	ubfx	w8, w21, #1, #1
	str	w8, [x20]
	eor	w0, w8, #0x1
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_25
LBB0_4:
	ldr	w8, [x20]
	cbz	w8, LBB0_1
; %bb.5:
	mov	w21, #0
	b	LBB0_25
LBB0_6:
	ldr	w0, [x20, #72]
Lloh11:
	adrp	x8, _FTS_FAN_PRESENT_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FTS_FAN_PRESENT_REG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.7:
	str	w21, [x20, #4]
	ldr	w0, [x20, #72]
Lloh14:
	adrp	x8, _FTS_FAN_EVENT_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FTS_FAN_EVENT_REG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.8:
	str	w21, [x20, #8]
Lloh17:
	adrp	x24, _FTS_NO_FAN_SENSORS@GOTPAGE
Lloh18:
	ldr	x24, [x24, _FTS_NO_FAN_SENSORS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.9:
	mov	x22, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w21, #0
	ldr	x8, [x20, #16]
	str	wzr, [x8, x22, lsl #2]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x20, #24]
	str	w21, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x24]
	cmp	x22, x8
	b.ge	LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x20, #4]
	mov	x0, x22
	bl	_BIT
	tst	w0, w21
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w21, [x20, #72]
	mov	x0, x22
	bl	_FTS_REG_FAN_INPUT
	mov	x1, x0
	mov	x0, x21
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x20, #16]
	str	w21, [x8, x22, lsl #2]
	ldr	w21, [x20, #72]
	mov	x0, x22
	bl	_FTS_REG_FAN_SOURCE
	mov	x1, x0
	mov	x0, x21
	bl	_fts_read_byte
	mov	x21, x0
	tbz	w0, #31, LBB0_11
	b	LBB0_25
LBB0_15:
	ldr	w0, [x20, #72]
Lloh19:
	adrp	x8, _FTS_SENSOR_EVENT_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FTS_SENSOR_EVENT_REG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.16:
	str	w21, [x20, #32]
Lloh22:
	adrp	x24, _FTS_NO_TEMP_SENSORS@GOTPAGE
Lloh23:
	ldr	x24, [x24, _FTS_NO_TEMP_SENSORS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.17:
	mov	x22, #0
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x20, #72]
	mov	x0, x22
	bl	_FTS_REG_TEMP_INPUT
	mov	x1, x0
	mov	x0, x21
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x20, #40]
	str	w21, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x24]
	cmp	x22, x8
	b.lt	LBB0_18
LBB0_20:
Lloh24:
	adrp	x24, _FTS_NO_VOLT_SENSORS@GOTPAGE
Lloh25:
	ldr	x24, [x24, _FTS_NO_VOLT_SENSORS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.21:
	mov	x22, #0
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x20, #72]
	mov	x0, x22
	bl	_FTS_REG_VOLT
	mov	x1, x0
	mov	x0, x21
	bl	_fts_read_byte
	mov	x21, x0
	tbnz	w0, #31, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x8, [x20, #48]
	str	w21, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x24]
	cmp	x22, x8
	b.lt	LBB0_22
LBB0_24:
	mov	w21, #0
	ldr	x8, [x23]
	str	x8, [x20, #64]
LBB0_25:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_FTS_DEVICE_STATUS_REG,4,2      ; @FTS_DEVICE_STATUS_REG
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_FTS_FAN_PRESENT_REG,4,2        ; @FTS_FAN_PRESENT_REG
	.comm	_FTS_FAN_EVENT_REG,4,2          ; @FTS_FAN_EVENT_REG
	.comm	_FTS_NO_FAN_SENSORS,4,2         ; @FTS_NO_FAN_SENSORS
	.comm	_FTS_SENSOR_EVENT_REG,4,2       ; @FTS_SENSOR_EVENT_REG
	.comm	_FTS_NO_TEMP_SENSORS,4,2        ; @FTS_NO_TEMP_SENSORS
	.comm	_FTS_NO_VOLT_SENSORS,4,2        ; @FTS_NO_VOLT_SENSORS
	.no_dead_strip	_fts_update_device
.subsections_via_symbols
