	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdei_register_ghes             ## -- Begin function sdei_register_ghes
	.p2align	4, 0x90
_sdei_register_ghes:                    ## @sdei_register_ghes
	.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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_CONFIG_ACPI_APEI_GHES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	(%r15), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.5:
	movq	_SDEI_EVENT_INFO_EV_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sdei_api_event_get_info
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	-40(%rbp), %rax
	movq	_SDEI_EVENT_PRIORITY_CRITICAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r12, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_sdei_event_register
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_sdei_event_enable
	jmp	LBB0_8
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_ACPI_APEI_GHES,4,2      ## @CONFIG_ACPI_APEI_GHES
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SDEI_EVENT_INFO_EV_PRIORITY,4,2 ## @SDEI_EVENT_INFO_EV_PRIORITY
	.comm	_SDEI_EVENT_PRIORITY_CRITICAL,8,3 ## @SDEI_EVENT_PRIORITY_CRITICAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdei_register_ghes             ; -- Begin function sdei_register_ghes
	.p2align	2
_sdei_register_ghes:                    ; @sdei_register_ghes
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_ACPI_APEI_GHES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_ACPI_APEI_GHES@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19]
	ldr	x21, [x8]
	cbz	x21, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _SDEI_EVENT_INFO_EV_PRIORITY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDEI_EVENT_INFO_EV_PRIORITY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_sdei_api_event_get_info
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	x8, [sp, #8]
Lloh6:
	adrp	x9, _SDEI_EVENT_PRIORITY_CRITICAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SDEI_EVENT_PRIORITY_CRITICAL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x1, x20, x22, eq
	mov	x0, x21
	mov	x2, x19
	bl	_sdei_event_register
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x21
	bl	_sdei_event_enable
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_ACPI_APEI_GHES,4,2      ; @CONFIG_ACPI_APEI_GHES
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SDEI_EVENT_INFO_EV_PRIORITY,4,2 ; @SDEI_EVENT_INFO_EV_PRIORITY
	.comm	_SDEI_EVENT_PRIORITY_CRITICAL,8,3 ; @SDEI_EVENT_PRIORITY_CRITICAL
.subsections_via_symbols
