	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3_wmi_check_platform_device
_s3_wmi_check_platform_device:          ## @s3_wmi_check_platform_device
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$0, -40(%rbp)
	callq	_ACPI_HANDLE
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movl	%eax, %ebx
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_acpi_bus_get_device
	testq	%rax, %rax
	je	LBB0_2
LBB0_9:
	xorl	%eax, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ACPI_BUTTON_HID_LID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	-48(%rbp), %rdi
	callq	_acpi_device_hid
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_strcmp
	movq	-48(%rbp), %rdi
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	callq	_acpi_device_bid
	movl	%eax, %r15d
	movq	_SPI_CTL_OBJ_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_strlen
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:
	movq	_ACPI_TYPE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_s3_wmi_attach_spi_device@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	$0, (%rsp)
	leaq	-40(%rbp), %r9
	movl	%ebx, %esi
	movl	$1, %edx
	xorl	%r8d, %r8d
	callq	_acpi_walk_namespace
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_7:
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_s3_wmi@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_9
LBB0_3:
	movq	_s3_wmi@GOTPCREL(%rip), %rax
	movq	%rdi, 8(%rax)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_BUTTON_HID_LID,4,2        ## @ACPI_BUTTON_HID_LID
	.comm	_s3_wmi,16,3                    ## @s3_wmi
	.comm	_SPI_CTL_OBJ_NAME,4,2           ## @SPI_CTL_OBJ_NAME
	.comm	_ACPI_TYPE_DEVICE,4,2           ## @ACPI_TYPE_DEVICE
	.comm	_s3_wmi_attach_spi_device,4,2   ## @s3_wmi_attach_spi_device
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enumerate SPI slaves\n"

	.no_dead_strip	_s3_wmi_check_platform_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3_wmi_check_platform_device
_s3_wmi_check_platform_device:          ; @s3_wmi_check_platform_device
	.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
	mov	x19, x0
	str	xzr, [sp]
	bl	_ACPI_HANDLE
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	add	x1, sp, #8
	bl	_acpi_bus_get_device
	cbz	x0, LBB0_3
LBB0_2:
	mov	w0, #0
	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
LBB0_3:
Lloh0:
	adrp	x8, _ACPI_BUTTON_HID_LID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_BUTTON_HID_LID@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	x0, [sp, #8]
	bl	_acpi_device_hid
	mov	x1, x0
	mov	x0, x21
	bl	_strcmp
	mov	x8, x0
	ldr	x0, [sp, #8]
	cbz	w8, LBB0_9
; %bb.4:
	bl	_acpi_device_bid
	mov	x21, x0
Lloh3:
	adrp	x8, _SPI_CTL_OBJ_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPI_CTL_OBJ_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_strncmp
	cbnz	x0, LBB0_2
; %bb.5:
Lloh6:
	adrp	x8, _ACPI_TYPE_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_TYPE_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _s3_wmi_attach_spi_device@GOTPAGE
Lloh10:
	ldr	x8, [x8, _s3_wmi_attach_spi_device@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x5, sp
	mov	x1, x20
	mov	w2, #1
	mov	x4, #0
	mov	x6, #0
	bl	_acpi_walk_namespace
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_7:
	ldr	x8, [sp]
	cbz	x8, LBB0_2
; %bb.8:
Lloh14:
	adrp	x9, _s3_wmi@GOTPAGE
Lloh15:
	ldr	x9, [x9, _s3_wmi@GOTPAGEOFF]
Lloh16:
	str	x8, [x9]
	b	LBB0_2
LBB0_9:
Lloh17:
	adrp	x8, _s3_wmi@GOTPAGE
Lloh18:
	ldr	x8, [x8, _s3_wmi@GOTPAGEOFF]
Lloh19:
	str	x0, [x8, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_BUTTON_HID_LID,4,2        ; @ACPI_BUTTON_HID_LID
	.comm	_s3_wmi,16,3                    ; @s3_wmi
	.comm	_SPI_CTL_OBJ_NAME,4,2           ; @SPI_CTL_OBJ_NAME
	.comm	_ACPI_TYPE_DEVICE,4,2           ; @ACPI_TYPE_DEVICE
	.comm	_s3_wmi_attach_spi_device,4,2   ; @s3_wmi_attach_spi_device
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enumerate SPI slaves\n"

	.no_dead_strip	_s3_wmi_check_platform_device
.subsections_via_symbols
