	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu7_read_sensor
_smu7_read_sensor:                      ## @smu7_read_sensor
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	cmpl	$3, (%rcx)
	jg	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_2:
	movq	%rcx, %r15
	leal	-128(%rsi), %ecx
	cmpl	$8, %ecx
	ja	LBB0_1
## %bb.3:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_4:
	movl	(%rax), %r12d
	movq	_SMU_SoftRegisters@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$134, %esi
	jne	LBB0_17
## %bb.5:
	movq	_AverageGraphicsActivity@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_6:
	xorl	%ecx, %ecx
	cmpl	$0, 12(%rax)
	jmp	LBB0_10
LBB0_7:
	cmpb	$2, 4(%rax)
	movl	(%rbx), %edi
	movq	_CGS_IND_REG__SMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PWR_SVI2_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jne	LBB0_23
## %bb.8:
	movq	_PLANE2_VID@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_9:
	xorl	%ecx, %ecx
	cmpl	$0, 8(%rax)
LBB0_10:
	sete	%cl
	jmp	LBB0_19
LBB0_11:
	movq	%rbx, %rdi
	callq	_smu7_thermal_get_temperature
	jmp	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smu7_get_gpu_power             ## TAILCALL
LBB0_13:
	movq	_PPSMC_MSG_API_GetSclkFrequency@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_PPSMC_MSG_API_GetMclkFrequency@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
	movl	(%rbx), %edi
	movq	_mmSMC_MSG_ARG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cgs_read_register
LBB0_16:
	movl	%eax, (%r14)
	jmp	LBB0_20
LBB0_17:
	movq	_AverageMemoryActivity@GOTPCREL(%rip), %rcx
LBB0_18:
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_smum_get_offsetof
	addl	%eax, %r12d
	movl	(%rbx), %edi
	movq	_CGS_IND_REG__SMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_cgs_read_ind_register
	subl	$-128, %eax
	sarl	$8, %eax
	cmpl	$100, %eax
	movl	$100, %ecx
	cmovll	%eax, %ecx
LBB0_19:
	movl	%ecx, (%r14)
LBB0_20:
	movl	$4, (%r15)
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	_PLANE1_VID@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %ecx
	callq	_PHM_READ_INDIRECT_FIELD
	movl	%eax, %edi
	callq	_convert_to_vddc
	movl	%eax, (%r14)
	jmp	LBB0_21
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_4
	.long	L0_0_set_13
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_MSG_API_GetSclkFrequency,4,2 ## @PPSMC_MSG_API_GetSclkFrequency
	.comm	_mmSMC_MSG_ARG_0,4,2            ## @mmSMC_MSG_ARG_0
	.comm	_PPSMC_MSG_API_GetMclkFrequency,4,2 ## @PPSMC_MSG_API_GetMclkFrequency
	.comm	_SMU_SoftRegisters,4,2          ## @SMU_SoftRegisters
	.comm	_AverageGraphicsActivity,4,2    ## @AverageGraphicsActivity
	.comm	_AverageMemoryActivity,4,2      ## @AverageMemoryActivity
	.comm	_CGS_IND_REG__SMC,4,2           ## @CGS_IND_REG__SMC
	.comm	_PWR_SVI2_STATUS,4,2            ## @PWR_SVI2_STATUS
	.comm	_PLANE2_VID,4,2                 ## @PLANE2_VID
	.comm	_PLANE1_VID,4,2                 ## @PLANE1_VID
	.no_dead_strip	_smu7_read_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu7_read_sensor
_smu7_read_sensor:                      ; @smu7_read_sensor
	.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
	ldr	w8, [x3]
	cmp	w8, #3
	b.gt	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_2:
	sub	w9, w1, #128
	cmp	w9, #8
	b.hi	LBB0_1
; %bb.3:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x0
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x10, lJTI0_0@PAGE
Lloh4:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
	ldr	w22, [x8]
Lloh5:
	adrp	x8, _SMU_SoftRegisters@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMU_SoftRegisters@GOTPAGEOFF]
Lloh7:
	adrp	x9, _AverageGraphicsActivity@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AverageGraphicsActivity@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x10, _AverageMemoryActivity@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AverageMemoryActivity@GOTPAGEOFF]
	cmp	w1, #134
	csel	x9, x9, x10, eq
	ldr	w2, [x9]
	mov	x0, x21
	mov	x1, x8
	bl	_smum_get_offsetof
	add	w2, w0, w22
	ldr	w0, [x21]
Lloh12:
	adrp	x8, _CGS_IND_REG__SMC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CGS_IND_REG__SMC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_cgs_read_ind_register
	mov	x8, x0
	mov	w0, #0
	add	w8, w8, #128
	asr	w8, w8, #8
	mov	w9, #100
	cmp	w8, #100
	csel	w8, w8, w9, lt
	b	LBB0_15
LBB0_5:
	ldrb	w8, [x8, #4]
Lloh15:
	adrp	x9, _CGS_IND_REG__SMC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CGS_IND_REG__SMC@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh17:
	ldr	w1, [x9]
Lloh18:
	adrp	x9, _PWR_SVI2_STATUS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PWR_SVI2_STATUS@GOTPAGEOFF]
Lloh20:
	adrp	x10, _PLANE2_VID@GOTPAGE
Lloh21:
	ldr	x10, [x10, _PLANE2_VID@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x9]
Lloh23:
	adrp	x9, _PLANE1_VID@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PLANE1_VID@GOTPAGEOFF]
	cmp	w8, #2
	csel	x8, x10, x9, eq
	ldr	w3, [x8]
	bl	_PHM_READ_INDIRECT_FIELD
	bl	_convert_to_vddc
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_16
LBB0_6:
	mov	w0, #0
	ldr	w8, [x8, #8]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
	ldr	w8, [x8, #12]
LBB0_8:
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_15
LBB0_9:
	mov	x0, x21
	bl	_smu7_thermal_get_temperature
	b	LBB0_14
LBB0_10:
	mov	x0, x21
	mov	x1, x19
	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
	b	_smu7_get_gpu_power
LBB0_11:
Lloh25:
	adrp	x8, _PPSMC_MSG_API_GetSclkFrequency@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PPSMC_MSG_API_GetSclkFrequency@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh27:
	adrp	x8, _PPSMC_MSG_API_GetMclkFrequency@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PPSMC_MSG_API_GetMclkFrequency@GOTPAGEOFF]
LBB0_13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_smum_send_msg_to_smc
	ldr	w0, [x21]
Lloh29:
	adrp	x8, _mmSMC_MSG_ARG_0@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mmSMC_MSG_ARG_0@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_cgs_read_register
LBB0_14:
	mov	x8, x0
	mov	w0, #0
LBB0_15:
	str	w8, [x19]
	mov	w8, #4
	str	w8, [x20]
LBB0_16:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_10-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_MSG_API_GetSclkFrequency,4,2 ; @PPSMC_MSG_API_GetSclkFrequency
	.comm	_mmSMC_MSG_ARG_0,4,2            ; @mmSMC_MSG_ARG_0
	.comm	_PPSMC_MSG_API_GetMclkFrequency,4,2 ; @PPSMC_MSG_API_GetMclkFrequency
	.comm	_SMU_SoftRegisters,4,2          ; @SMU_SoftRegisters
	.comm	_AverageGraphicsActivity,4,2    ; @AverageGraphicsActivity
	.comm	_AverageMemoryActivity,4,2      ; @AverageMemoryActivity
	.comm	_CGS_IND_REG__SMC,4,2           ; @CGS_IND_REG__SMC
	.comm	_PWR_SVI2_STATUS,4,2            ; @PWR_SVI2_STATUS
	.comm	_PLANE2_VID,4,2                 ; @PLANE2_VID
	.comm	_PLANE1_VID,4,2                 ; @PLANE1_VID
	.no_dead_strip	_smu7_read_sensor
.subsections_via_symbols
