	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdei_probe
_sdei_probe:                            ## @sdei_probe
	.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
	movl	$0, -28(%rbp)
	callq	_sdei_get_conduit
	movl	%eax, %r14d
	movq	_sdei_firmware_call@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	leaq	-28(%rbp), %rdi
	callq	_sdei_api_get_version
	movl	%eax, %ebx
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_5:
	xorl	%eax, %eax
	callq	_sdei_mark_interface_broken
	jmp	LBB0_13
LBB0_7:
	movl	-28(%rbp), %edi
	callq	_SDEI_VERSION_MAJOR
	movl	%eax, %r15d
	movl	-28(%rbp), %edi
	callq	_SDEI_VERSION_MINOR
	movq	%rax, %rbx
	movl	-28(%rbp), %edi
	callq	_SDEI_VERSION_VENDOR
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_pr_info
	movl	-28(%rbp), %edi
	callq	_SDEI_VERSION_MAJOR
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.8:
	xorl	%eax, %eax
	callq	_sdei_platform_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movl	%r14d, %edi
	callq	_sdei_arch_get_entry_point
	movq	_sdei_entry_point@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movq	_sdei_pm_nb@GOTPCREL(%rip), %rdi
	callq	_cpu_pm_register_notifier
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_5
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_warn
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_sdei_mark_interface_broken
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_15:
	movq	_sdei_reboot_nb@GOTPCREL(%rip), %rdi
	callq	_register_reboot_notifier
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_19
LBB0_17:
	movq	_CPUHP_AP_ARM_SDEI_STARTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movq	_sdei_cpuhp_up@GOTPCREL(%rip), %rdx
	movq	_sdei_cpuhp_down@GOTPCREL(%rip), %rcx
	callq	_cpuhp_setup_state
	testl	%eax, %eax
	je	LBB0_6
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_warn
	movq	_sdei_reboot_nb@GOTPCREL(%rip), %rdi
	callq	_unregister_reboot_notifier
LBB0_19:
	movq	_sdei_pm_nb@GOTPCREL(%rip), %rdi
	callq	_cpu_pm_unregister_notifier
	jmp	LBB0_5
LBB0_6:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sdei_firmware_call,4,2         ## @sdei_firmware_call
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"advertised but not implemented in platform firmware\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to get SDEI version: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"SDEIv%d.%d (0x%x) detected in firmware.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Conflicting SDEI version detected.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_sdei_entry_point,4,2           ## @sdei_entry_point
	.comm	_sdei_pm_nb,4,2                 ## @sdei_pm_nb
L_.str.4:                               ## @.str.4
	.asciz	"Failed to register CPU PM notifier...\n"

	.comm	_sdei_reboot_nb,4,2             ## @sdei_reboot_nb
L_.str.5:                               ## @.str.5
	.asciz	"Failed to register reboot notifier...\n"

	.comm	_CPUHP_AP_ARM_SDEI_STARTING,4,2 ## @CPUHP_AP_ARM_SDEI_STARTING
L_.str.6:                               ## @.str.6
	.asciz	"SDEI"

	.comm	_sdei_cpuhp_up,4,2              ## @sdei_cpuhp_up
	.comm	_sdei_cpuhp_down,4,2            ## @sdei_cpuhp_down
L_.str.7:                               ## @.str.7
	.asciz	"Failed to register CPU hotplug notifier...\n"

	.no_dead_strip	_sdei_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdei_probe
_sdei_probe:                            ; @sdei_probe
	.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
	str	wzr, [sp, #12]
	bl	_sdei_get_conduit
Lloh0:
	adrp	x8, _sdei_firmware_call@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sdei_firmware_call@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x0
	add	x0, sp, #12
	bl	_sdei_api_get_version
	mov	x19, x0
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_3:
	cbz	w19, LBB0_7
; %bb.4:
	str	x19, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_5:
	bl	_sdei_mark_interface_broken
	b	LBB0_13
LBB0_6:
	mov	w19, #0
	b	LBB0_13
LBB0_7:
	ldr	w0, [sp, #12]
	bl	_SDEI_VERSION_MAJOR
	mov	x19, x0
	ldr	w0, [sp, #12]
	bl	_SDEI_VERSION_MINOR
	mov	x21, x0
	ldr	w0, [sp, #12]
	bl	_SDEI_VERSION_VENDOR
	mov	x3, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	x2, x21
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_pr_info
	ldr	w0, [sp, #12]
	bl	_SDEI_VERSION_MAJOR
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.8:
	bl	_sdei_platform_reset
	mov	x19, x0
	cbnz	w0, LBB0_13
; %bb.9:
	mov	x0, x20
	bl	_sdei_arch_get_entry_point
Lloh12:
	adrp	x8, _sdei_entry_point@GOTPAGE
Lloh13:
	ldr	x8, [x8, _sdei_entry_point@GOTPAGEOFF]
Lloh14:
	str	w0, [x8]
	cbz	w0, LBB0_14
; %bb.10:
Lloh15:
	adrp	x0, _sdei_pm_nb@GOTPAGE
Lloh16:
	ldr	x0, [x0, _sdei_pm_nb@GOTPAGEOFF]
	bl	_cpu_pm_register_notifier
	cbz	w0, LBB0_15
; %bb.11:
	mov	x19, x0
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_warn
	b	LBB0_5
LBB0_12:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_warn
	bl	_sdei_mark_interface_broken
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_13:
	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
LBB0_14:
	bl	_sdei_mark_interface_broken
	mov	w19, #0
	b	LBB0_13
LBB0_15:
Lloh24:
	adrp	x0, _sdei_reboot_nb@GOTPAGE
Lloh25:
	ldr	x0, [x0, _sdei_reboot_nb@GOTPAGEOFF]
	bl	_register_reboot_notifier
	cbz	w0, LBB0_17
; %bb.16:
	mov	x19, x0
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_warn
	b	LBB0_19
LBB0_17:
Lloh28:
	adrp	x8, _CPUHP_AP_ARM_SDEI_STARTING@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CPUHP_AP_ARM_SDEI_STARTING@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
Lloh33:
	adrp	x2, _sdei_cpuhp_up@GOTPAGE
Lloh34:
	ldr	x2, [x2, _sdei_cpuhp_up@GOTPAGEOFF]
Lloh35:
	adrp	x3, _sdei_cpuhp_down@GOTPAGE
Lloh36:
	ldr	x3, [x3, _sdei_cpuhp_down@GOTPAGEOFF]
	bl	_cpuhp_setup_state
	mov	x19, x0
	cbz	w0, LBB0_13
; %bb.18:
Lloh37:
	adrp	x0, l_.str.7@PAGE
Lloh38:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_warn
Lloh39:
	adrp	x0, _sdei_reboot_nb@GOTPAGE
Lloh40:
	ldr	x0, [x0, _sdei_reboot_nb@GOTPAGEOFF]
	bl	_unregister_reboot_notifier
LBB0_19:
Lloh41:
	adrp	x0, _sdei_pm_nb@GOTPAGE
Lloh42:
	ldr	x0, [x0, _sdei_pm_nb@GOTPAGEOFF]
	bl	_cpu_pm_unregister_notifier
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_sdei_firmware_call,4,2         ; @sdei_firmware_call
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"advertised but not implemented in platform firmware\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to get SDEI version: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"SDEIv%d.%d (0x%x) detected in firmware.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Conflicting SDEI version detected.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_sdei_entry_point,4,2           ; @sdei_entry_point
	.comm	_sdei_pm_nb,4,2                 ; @sdei_pm_nb
l_.str.4:                               ; @.str.4
	.asciz	"Failed to register CPU PM notifier...\n"

	.comm	_sdei_reboot_nb,4,2             ; @sdei_reboot_nb
l_.str.5:                               ; @.str.5
	.asciz	"Failed to register reboot notifier...\n"

	.comm	_CPUHP_AP_ARM_SDEI_STARTING,4,2 ; @CPUHP_AP_ARM_SDEI_STARTING
l_.str.6:                               ; @.str.6
	.asciz	"SDEI"

	.comm	_sdei_cpuhp_up,4,2              ; @sdei_cpuhp_up
	.comm	_sdei_cpuhp_down,4,2            ; @sdei_cpuhp_down
l_.str.7:                               ; @.str.7
	.asciz	"Failed to register CPU hotplug notifier...\n"

	.no_dead_strip	_sdei_probe
.subsections_via_symbols
