	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smusat_sensor_read
_smusat_sensor_read:                    ## @smusat_sensor_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	8(%rdi), %ebx
	movl	%ebx, %edi
	callq	_device_get_softc
	movq	%rax, %r15
	movq	_time_uptime@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	(%r15), %eax
	cmpl	$2, %eax
	jl	LBB0_3
## %bb.1:
	movl	%ebx, %edi
	callq	_smusat_updatecache
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	negl	%eax
	jmp	LBB0_12
LBB0_3:
	movq	8(%r15), %rcx
	movslq	(%r14), %rdx
	movl	(%rcx,%rdx,8), %eax
	addq	%rdx, %rdx
	shll	$8, %eax
	orl	$1, %edx
	movslq	%edx, %rdx
	addl	(%rcx,%rdx,4), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_5
## %bb.4:
	movl	$0, (%r15)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_5:
	movl	4(%r14), %ecx
	cmpl	$128, %ecx
	je	LBB0_9
## %bb.6:
	cmpl	$131, %ecx
	je	LBB0_10
## %bb.7:
	cmpl	$129, %ecx
	jne	LBB0_12
## %bb.8:
	movl	%eax, %ecx
	shrl	$6, %ecx
	movswl	%cx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	andl	$63, %eax
	shll	$11, %eax
	leal	(%rax,%rax,4), %eax
	shrl	$16, %eax
	leal	(%rax,%rcx,2), %eax
	addl	$2731, %eax                     ## imm = 0xAAB
	jmp	LBB0_12
LBB0_9:
	shrl	$12, %eax
	jmp	LBB0_11
LBB0_10:
	shrl	$8, %eax
LBB0_11:
	cwtl
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_time_uptime,4,2                ## @time_uptime
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_smusat_sensor_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smusat_sensor_read
_smusat_sensor_read:                    ; @smusat_sensor_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w21, [x0, #8]
	mov	x0, x21
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, _time_uptime@GOTPAGE
Lloh1:
	ldr	x8, [x8, _time_uptime@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0]
	sub	w8, w8, w9
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_smusat_updatecache
	cbz	w0, LBB0_3
; %bb.2:
	neg	w0, w0
	b	LBB0_11
LBB0_3:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x19]
	lsl	x10, x9, #3
	ldr	w10, [x8, x10]
	mov	w11, #1
	bfi	w11, w9, #1, #31
	ldr	w8, [x8, w11, sxtw #2]
	add	w0, w8, w10, lsl #8
	mov	w8, #65535
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	str	wzr, [x20]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #131
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.8:
	sbfx	w8, w0, #6, #16
	mov	w9, #10
	mul	w8, w8, w9
	ubfiz	w9, w0, #10, #6
	add	w9, w9, w9, lsl #2
	lsl	w9, w9, #1
	add	w8, w8, w9, lsr #16
	add	w0, w8, #2731
	b	LBB0_11
LBB0_9:
	sbfx	w0, w0, #12, #16
	b	LBB0_11
LBB0_10:
	sbfx	w0, w0, #8, #16
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_time_uptime,4,2                ; @time_uptime
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_smusat_sensor_read
.subsections_via_symbols
