	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thermal_get_sensors
_thermal_get_sensors:                   ## @thermal_get_sensors
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_thermal_read_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TPACPI_THERMAL_TPEC_16@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	leal	8(,%rdx,8), %r15d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rsi
	addq	%r12, %rsi
	movl	%ebx, %edi
	callq	_thermal_get_sensor
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	addq	$4, %r12
	cmpq	%rbx, %r15
	jne	LBB0_4
## %bb.5:
	movl	%r15d, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_thermal_read_mode,8,3          ## @thermal_read_mode
	.comm	_TPACPI_THERMAL_TPEC_16,8,3     ## @TPACPI_THERMAL_TPEC_16
	.no_dead_strip	_thermal_get_sensors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thermal_get_sensors
_thermal_get_sensors:                   ; @thermal_get_sensors
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	mov	x20, #0
Lloh0:
	adrp	x8, _thermal_read_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _thermal_read_mode@GOTPAGEOFF]
Lloh2:
	adrp	x9, _TPACPI_THERMAL_TPEC_16@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TPACPI_THERMAL_TPEC_16@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #8
	mov	w9, #16
	csel	w22, w9, w8, eq
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x1, x8, x21
	mov	x0, x20
	bl	_thermal_get_sensor
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	add	x21, x21, #4
	cmp	x22, x20
	b.ne	LBB0_2
; %bb.4:
	mov	x0, x22
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_thermal_read_mode,8,3          ; @thermal_read_mode
	.comm	_TPACPI_THERMAL_TPEC_16,8,3     ; @TPACPI_THERMAL_TPEC_16
	.no_dead_strip	_thermal_get_sensors
.subsections_via_symbols
