	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atk_add
_atk_add:                               ## @atk_add
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	8(%rdi), %r15
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r12
	movq	%r14, 16(%rax)
	movl	12(%r14), %eax
	movl	%eax, 8(%r12)
	movq	%r12, %rdi
	addq	$12, %rdi
	callq	_INIT_LIST_HEAD
	movl	$0, (%r12)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	8(%r12), %edi
	movq	_BOARD_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_object_typed
	movq	_AE_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.2:
	movq	-48(%rbp), %rdi
	cmpl	$2, (%rdi)
	jl	LBB0_5
## %bb.3:
	movq	8(%rdi), %rax
	movq	16(%rax), %rcx
	movq	_ACPI_TYPE_STRING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.4:
	movl	24(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-48(%rbp), %rdi
LBB0_5:
	callq	_ACPI_FREE
	movq	%r12, %rdi
	callq	_atk_check_old_if
	testl	%eax, %eax
	je	LBB0_15
## %bb.6:
	movq	%r12, %rdi
	callq	_atk_check_new_if
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$0, 4(%r12)
	movq	%r12, %rdi
	callq	_atk_enumerate_new_hwmon
	jmp	LBB0_16
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	cmpl	$0, (%r12)
	je	LBB0_13
## %bb.12:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_atk_ec_ctl
LBB0_13:
	movq	%r12, %rdi
	callq	_kfree
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$1, 4(%r12)
	movq	%r12, %rdi
	callq	_atk_enumerate_old_hwmon
LBB0_16:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.17:
	je	LBB0_20
## %bb.18:
	movq	%r12, %rdi
	callq	_atk_register_hwmon
	testl	%eax, %eax
	je	LBB0_21
## %bb.19:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_atk_free_sensors
	jmp	LBB0_11
LBB0_20:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_21:
	movq	%r12, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adding...\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_BOARD_ID,4,2                   ## @BOARD_ID
	.comm	_ACPI_TYPE_PACKAGE,4,2          ## @ACPI_TYPE_PACKAGE
	.comm	_AE_OK,8,3                      ## @AE_OK
L_.str.1:                               ## @.str.1
	.asciz	"atk: method MBIF not found\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ACPI_TYPE_STRING,8,3           ## @ACPI_TYPE_STRING
L_.str.2:                               ## @.str.2
	.asciz	"board ID = %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"Using old hwmon interface\n"

L_.str.4:                               ## @.str.4
	.asciz	"Using new hwmon interface\n"

L_.str.5:                               ## @.str.5
	.asciz	"No usable sensor detected, bailing out\n"

	.no_dead_strip	_atk_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atk_add
_atk_add:                               ; @atk_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	add	x21, x0, #8
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #16]
	ldr	w8, [x20, #12]
	str	w8, [x0, #8]
	add	x0, x0, #12
	bl	_INIT_LIST_HEAD
	str	wzr, [x19]
Lloh5:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x8, _BOARD_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BOARD_ID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	add	x3, sp, #16
	mov	x2, #0
	bl	_acpi_evaluate_object_typed
Lloh14:
	adrp	x8, _AE_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.2:
	ldr	x0, [sp, #16]
	ldr	w8, [x0]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.3:
	ldr	x8, [x0, #8]
	ldr	x9, [x8, #16]
Lloh17:
	adrp	x10, _ACPI_TYPE_STRING@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ACPI_TYPE_STRING@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x8, #24]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	x0, [sp, #16]
LBB0_5:
	bl	_ACPI_FREE
	mov	x0, x19
	bl	_atk_check_old_if
	cbz	w0, LBB0_15
; %bb.6:
	mov	x0, x19
	bl	_atk_check_new_if
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.7:
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	str	wzr, [x19, #4]
	mov	x0, x19
	bl	_atk_enumerate_new_hwmon
	mov	x22, x0
	tbz	w0, #31, LBB0_16
	b	LBB0_11
LBB0_8:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_9:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_10:
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	ldr	w8, [x19]
	cbz	w8, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	w1, #0
	bl	_atk_ec_ctl
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_atk_enumerate_old_hwmon
	mov	x22, x0
	tbnz	w0, #31, LBB0_11
LBB0_16:
	cbz	w22, LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_atk_register_hwmon
	mov	x22, x0
	cbz	w0, LBB0_20
; %bb.18:
	mov	x0, x19
	bl	_atk_free_sensors
	b	LBB0_11
LBB0_19:
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_dev_info
	b	LBB0_10
LBB0_20:
	str	x19, [x20]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adding...\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_BOARD_ID,4,2                   ; @BOARD_ID
	.comm	_ACPI_TYPE_PACKAGE,4,2          ; @ACPI_TYPE_PACKAGE
	.comm	_AE_OK,8,3                      ; @AE_OK
l_.str.1:                               ; @.str.1
	.asciz	"atk: method MBIF not found\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ACPI_TYPE_STRING,8,3           ; @ACPI_TYPE_STRING
l_.str.2:                               ; @.str.2
	.asciz	"board ID = %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"Using old hwmon interface\n"

l_.str.4:                               ; @.str.4
	.asciz	"Using new hwmon interface\n"

l_.str.5:                               ; @.str.5
	.asciz	"No usable sensor detected, bailing out\n"

	.no_dead_strip	_atk_add
.subsections_via_symbols
