	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atk_enumerate_new_hwmon
_atk_enumerate_new_hwmon:               ## @atk_enumerate_new_hwmon
	.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
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	callq	_atk_ec_present
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_atk_ec_enabled
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movl	%r15d, (%r14)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atk_ec_ctl
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	$0, (%r14)
	jmp	LBB0_11
LBB0_1:
	movl	%eax, %r15d
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movq	_ATK_MUX_HWMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atk_ggrp
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.12:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	cmpl	$0, (%r12)
	jle	LBB0_10
## %bb.8:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	addq	%r15, %rsi
	movq	%r14, %rdi
	callq	_atk_add_sensor
	incq	%rbx
	movslq	(%r12), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movl	8(%r14), %r15d
	addl	4(%r14), %r15d
	addl	12(%r14), %r15d
	movq	%r12, %rdi
	callq	_ACPI_FREE
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enumerating hwmon sensors\n"

	.comm	_ATK_MUX_HWMON,4,2              ## @ATK_MUX_HWMON
	.no_dead_strip	_atk_enumerate_new_hwmon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atk_enumerate_new_hwmon
_atk_enumerate_new_hwmon:               ; @atk_enumerate_new_hwmon
	.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	x20, [x0, #16]
	bl	_atk_ec_present
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.1:
	cbz	w21, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_atk_ec_enabled
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.3:
	str	w21, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_atk_ec_ctl
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
	str	wzr, [x19]
	b	LBB0_11
LBB0_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
Lloh2:
	adrp	x8, _ATK_MUX_HWMON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATK_MUX_HWMON@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atk_ggrp
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x20
	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	_PTR_ERR
LBB0_7:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x21, #0
	mov	x22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x21
	mov	x0, x19
	bl	_atk_add_sensor
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #16
	cmp	x22, x8
	b.lt	LBB0_9
LBB0_10:
	ldp	w8, w9, [x19, #4]
	ldr	w10, [x19, #12]
	add	w8, w9, w8
	add	w21, w8, w10
	mov	x0, x20
	bl	_ACPI_FREE
LBB0_11:
	mov	x0, x21
	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, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enumerating hwmon sensors\n"

	.comm	_ATK_MUX_HWMON,4,2              ; @ATK_MUX_HWMON
	.no_dead_strip	_atk_enumerate_new_hwmon
.subsections_via_symbols
