	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atk_ec_present
_atk_ec_present:                        ## @atk_ec_present
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movq	_ATK_MUX_MGMT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_atk_ggrp
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.11:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_14
## %bb.12:
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_13
LBB0_1:
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movq	8(%rbx), %rcx
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_ATK_EC_ID@GOTPCREL(%rip), %rdi
	movq	(%rdi), %r8
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$16, %rcx
	decq	%rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rcx)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rcx), %rdi
	cmpq	%rsi, (%rdi)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r8, %rsi
	jne	LBB0_6
	jmp	LBB0_8
LBB0_14:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	xorl	%ecx, %ecx
LBB0_8:
	movl	$1, %r15d
	testq	%rcx, %rcx
	jne	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_10:
	movq	%rbx, %rdi
	callq	_ACPI_FREE
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATK_MUX_MGMT,4,2               ## @ATK_MUX_MGMT
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Class %#llx not found\n"

	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_ATK_EC_ID,8,3                  ## @ATK_EC_ID
L_.str.1:                               ## @.str.1
	.asciz	"EC not found\n"

	.no_dead_strip	_atk_ec_present
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atk_ec_present
_atk_ec_present:                        ; @atk_ec_present
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x21, _ATK_MUX_MGMT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ATK_MUX_MGMT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_atk_ggrp
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_PTR_ERR
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_10
; %bb.2:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w19, #0
	b	LBB0_14
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.4:
	ldr	x9, [x20, #8]
Lloh7:
	adrp	x10, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x11, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh11:
	ldr	x11, [x11, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
Lloh13:
	adrp	x12, _ATK_EC_ID@GOTPAGE
Lloh14:
	ldr	x12, [x12, _ATK_EC_ID@GOTPAGEOFF]
Lloh15:
	ldr	x12, [x12]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.eq	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9]
	cmp	x13, x10
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x13, [x9, #8]
	ldr	x13, [x13]
	cmp	x13, x11
	ccmp	x11, x12, #0, eq
	b.ne	LBB0_5
; %bb.8:
	cbz	x9, LBB0_12
LBB0_9:
	mov	w19, #1
	b	LBB0_13
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_11:
	mov	x9, #0
	cbnz	x9, LBB0_9
LBB0_12:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w19, #0
LBB0_13:
	mov	x0, x20
	bl	_ACPI_FREE
LBB0_14:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ATK_MUX_MGMT,4,2               ; @ATK_MUX_MGMT
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Class %#llx not found\n"

	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_ATK_EC_ID,8,3                  ; @ATK_EC_ID
l_.str.1:                               ; @.str.1
	.asciz	"EC not found\n"

	.no_dead_strip	_atk_ec_present
.subsections_via_symbols
