	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_thermal_select_sensor
_mv_thermal_select_sensor:              ## @mv_thermal_select_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	%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
	cmpl	%esi, (%rdi)
	jne	LBB0_1
## %bb.4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_CONTROL0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_RD4
	movq	_CONTROL0_TSEN_START@GOTPCREL(%rip), %r13
	movq	_CONTROL0_TSEN_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%r13), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_WR4
	movq	_CONTROL0_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CONTROL0_MODE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	%cl, %edx
	notl	%edx
	andl	%ebx, %edx
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_CONTROL0_MODE_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movq	_CONTROL0_CHANNEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CONTROL0_CHANNEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%edx, %eax
	notl	%esi
	andl	%eax, %esi
	leal	-1(%r14), %edx
	shll	%cl, %edx
	orl	%esi, %edx
LBB0_3:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_WR4
	movl	%r14d, (%r15)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_RD4
	orl	(%r13), %eax
	movq	_CONTROL0_TSEN_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_WR4
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mv_thermal_wait_sensor         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTROL0,4,2                   ## @CONTROL0
	.comm	_CONTROL0_TSEN_START,4,2        ## @CONTROL0_TSEN_START
	.comm	_CONTROL0_TSEN_EN,4,2           ## @CONTROL0_TSEN_EN
	.comm	_CONTROL0_MODE_MASK,4,2         ## @CONTROL0_MODE_MASK
	.comm	_CONTROL0_MODE_SHIFT,4,2        ## @CONTROL0_MODE_SHIFT
	.comm	_CONTROL0_MODE_EXTERNAL,4,2     ## @CONTROL0_MODE_EXTERNAL
	.comm	_CONTROL0_CHANNEL_MASK,4,2      ## @CONTROL0_CHANNEL_MASK
	.comm	_CONTROL0_CHANNEL_SHIFT,4,2     ## @CONTROL0_CHANNEL_SHIFT
	.no_dead_strip	_mv_thermal_select_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_thermal_select_sensor
_mv_thermal_select_sensor:              ; @mv_thermal_select_sensor
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	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
LBB0_2:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _CONTROL0@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CONTROL0@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_RD4
Lloh2:
	adrp	x23, _CONTROL0_TSEN_START@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CONTROL0_TSEN_START@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh4:
	adrp	x24, _CONTROL0_TSEN_EN@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CONTROL0_TSEN_EN@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
	bic	w21, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_WR4
Lloh6:
	adrp	x8, _CONTROL0_MODE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONTROL0_MODE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
Lloh9:
	adrp	x8, _CONTROL0_MODE_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CONTROL0_MODE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w9, w9, w8
	bic	w2, w21, w9
	cbz	w20, LBB0_4
; %bb.3:
Lloh12:
	adrp	x9, _CONTROL0_MODE_EXTERNAL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CONTROL0_MODE_EXTERNAL@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w8, w9, w8
	orr	w8, w8, w2
Lloh15:
	adrp	x9, _CONTROL0_CHANNEL_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CONTROL0_CHANNEL_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _CONTROL0_CHANNEL_SHIFT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CONTROL0_CHANNEL_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	bic	w8, w8, w9
	sub	w9, w20, #1
	lsl	w9, w9, w10
	orr	w2, w8, w9
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_WR4
	str	w20, [x19]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_RD4
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_WR4
	mov	x0, x19
	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
	b	_mv_thermal_wait_sensor
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTROL0,4,2                   ; @CONTROL0
	.comm	_CONTROL0_TSEN_START,4,2        ; @CONTROL0_TSEN_START
	.comm	_CONTROL0_TSEN_EN,4,2           ; @CONTROL0_TSEN_EN
	.comm	_CONTROL0_MODE_MASK,4,2         ; @CONTROL0_MODE_MASK
	.comm	_CONTROL0_MODE_SHIFT,4,2        ; @CONTROL0_MODE_SHIFT
	.comm	_CONTROL0_MODE_EXTERNAL,4,2     ; @CONTROL0_MODE_EXTERNAL
	.comm	_CONTROL0_CHANNEL_MASK,4,2      ; @CONTROL0_CHANNEL_MASK
	.comm	_CONTROL0_CHANNEL_SHIFT,4,2     ; @CONTROL0_CHANNEL_SHIFT
	.no_dead_strip	_mv_thermal_select_sensor
.subsections_via_symbols
