	.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), %edx
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r14, 24(%rax)
	movl	12(%r14), %eax
	movl	%eax, 16(%r12)
	movq	%r12, %rdi
	addq	$20, %rdi
	callq	_INIT_LIST_HEAD
	movl	$0, (%r12)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	16(%r12), %edi
	movq	_BOARD_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_object_typed
	movq	_AE_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rdi
	cmpl	$2, (%rdi)
	jl	LBB0_7
## %bb.5:
	movq	8(%rdi), %rax
	movq	16(%rax), %rdx
	movq	_ACPI_TYPE_STRING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-48(%rbp), %rdi
LBB0_7:
	callq	_ACPI_FREE
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_8:
	movq	%r12, %rdi
	callq	_atk_probe_if
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_10:
	cmpl	$0, (%r12)
	je	LBB0_21
## %bb.11:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_atk_ec_ctl
LBB0_21:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	cmpq	$0, 8(%r12)
	je	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r12, %rdi
	callq	_atk_enumerate_old_hwmon
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r12, %rdi
	callq	_atk_enumerate_new_hwmon
LBB0_15:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.16:
	je	LBB0_17
## %bb.18:
	movq	%r12, %rdi
	callq	_atk_init_attribute_groups
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.19:
	movq	%r12, %rdi
	callq	_atk_register_hwmon
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.20:
	movq	%r12, %rdi
	callq	_atk_debugfs_init
	movq	%r12, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_17:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
	.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	_ACPI_TYPE_STRING,8,3           ## @ACPI_TYPE_STRING
L_.str.2:                               ## @.str.2
	.asciz	"board ID = %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"No usable hwmon interface detected\n"

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

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

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

	.comm	_ENODEV,4,2                     ## @ENODEV
	.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	w2, [x8]
	mov	x0, x21
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #24]
	ldr	w8, [x20, #12]
	str	w8, [x0, #16]
	add	x0, x0, #20
	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, #16]
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_7
; %bb.2:
	ldr	x0, [sp, #16]
	ldr	w8, [x0]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.3:
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #16]
Lloh17:
	adrp	x9, _ACPI_TYPE_STRING@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ACPI_TYPE_STRING@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	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
	b	LBB0_8
LBB0_6:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_7:
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_8:
	mov	x0, x19
	bl	_atk_probe_if
	cbz	w0, LBB0_13
; %bb.9:
	mov	x22, x0
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_10:
	ldr	w8, [x19]
	cbz	w8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	w1, #0
	bl	_atk_ec_ctl
LBB0_12:
	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_13:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.14:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x19
	bl	_atk_enumerate_old_hwmon
	mov	x22, x0
	tbz	w0, #31, LBB0_16
	b	LBB0_10
LBB0_15:
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x19
	bl	_atk_enumerate_new_hwmon
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
LBB0_16:
	cbz	w22, LBB0_20
; %bb.17:
	mov	x0, x19
	bl	_atk_init_attribute_groups
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.18:
	mov	x0, x19
	bl	_atk_register_hwmon
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.19:
	mov	x0, x19
	bl	_atk_debugfs_init
	str	x19, [x20]
	b	LBB0_12
LBB0_20:
Lloh33:
	adrp	x1, l_.str.6@PAGE
Lloh34:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_dev_info
Lloh35:
	adrp	x8, _ENODEV@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
	.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 AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.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	_ACPI_TYPE_STRING,8,3           ; @ACPI_TYPE_STRING
l_.str.2:                               ; @.str.2
	.asciz	"board ID = %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"No usable hwmon interface detected\n"

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

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

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

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_atk_add
.subsections_via_symbols
