	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applespi_enable_spi
_applespi_enable_spi:                   ## @applespi_enable_spi
	.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, %rbx
	movl	12(%rdi), %edi
	xorl	%r14d, %r14d
	leaq	-32(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_acpi_evaluate_integer
	movl	%eax, %edi
	callq	_ACPI_SUCCESS
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, -32(%rbp)
	jne	LBB0_5
LBB0_2:
	movl	8(%rbx), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_acpi_execute_simple_method
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rbx
	movl	%r15d, %edi
	callq	_acpi_format_exception
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	movl	$50, %edi
	callq	_msleep
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SIEN failed: %s\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_applespi_enable_spi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applespi_enable_spi
_applespi_enable_spi:                   ; @applespi_enable_spi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #12]
	add	x3, sp, #8
	mov	x1, #0
	mov	x2, #0
	bl	_acpi_evaluate_integer
	bl	_ACPI_SUCCESS
	ldr	x8, [sp, #8]
	cmp	x0, #0
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x19, #8]
	mov	x1, #0
	mov	w2, #1
	bl	_acpi_execute_simple_method
	mov	x20, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x19, [x19]
	mov	x0, x20
	bl	_acpi_format_exception
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	mov	w0, #50
	bl	_msleep
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SIEN failed: %s\n"

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