	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdei_unregister_ghes           ## -- Begin function sdei_unregister_ghes
	.p2align	4, 0x90
_sdei_unregister_ghes:                  ## @sdei_unregister_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movl	(%rax), %r14d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_might_sleep
	movq	_CONFIG_ACPI_APEI_GHES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%r14d, %edi
	callq	_sdei_event_disable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	%r14d, %edi
	callq	_sdei_event_unregister
	movl	%eax, %ebx
	movq	_EINPROGRESS@GOTPCREL(%rip), %r15
	addl	(%r15), %eax
	jne	LBB0_7
## %bb.4:
	xorl	%eax, %eax
	callq	_schedule
	movl	%r14d, %edi
	callq	_sdei_event_unregister
	movl	%eax, %ebx
	addl	(%r15), %eax
	jne	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	callq	_schedule
	movl	%r14d, %edi
	callq	_sdei_event_unregister
	movl	%eax, %ebx
	addl	(%r15), %eax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_7
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	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	_EINPROGRESS,4,2                ## @EINPROGRESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdei_unregister_ghes           ; -- Begin function sdei_unregister_ghes
	.p2align	2
_sdei_unregister_ghes:                  ; @sdei_unregister_ghes
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0]
	ldr	w19, [x8]
	bl	_might_sleep
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_6
; %bb.1:
	mov	x0, x19
	bl	_sdei_event_disable
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_sdei_event_unregister
	mov	x20, x0
Lloh3:
	adrp	x21, _EINPROGRESS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _EINPROGRESS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.3:
	bl	_schedule
	mov	x0, x19
	bl	_sdei_event_unregister
	mov	x20, x0
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.4:
	bl	_schedule
	mov	x0, x19
	bl	_sdei_event_unregister
	mov	x20, x0
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.5:
	bl	_schedule
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_ACPI_APEI_GHES,4,2      ; @CONFIG_ACPI_APEI_GHES
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
.subsections_via_symbols
