	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _sdei_event_register
__sdei_event_register:                  ## @_sdei_event_register
	.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
	movq	_sdei_events_lock@GOTPCREL(%rip), %rdi
	callq	_lockdep_assert_held
	movq	_sdei_list_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	$1, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	8(%rbx), %rax
	movq	_SDEI_EVENT_TYPE_SHARED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.5:
	movl	20(%rbx), %edx
	movl	24(%rbx), %edi
	movq	_sdei_entry_point@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDEI_EVENT_REGISTER_RM_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r8d, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdei_api_event_register        ## TAILCALL
LBB0_1:
	movq	__local_event_register@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_sdei_do_cross_call
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %r14d
	movq	_sdei_list_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	$0, (%rbx)
	movl	$0, 16(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	__local_event_unregister@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_sdei_do_cross_call
	jmp	LBB0_4
LBB0_2:
	xorl	%r14d, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sdei_events_lock,4,2           ## @sdei_events_lock
	.comm	_sdei_list_lock,4,2             ## @sdei_list_lock
	.comm	_SDEI_EVENT_TYPE_SHARED,8,3     ## @SDEI_EVENT_TYPE_SHARED
	.comm	_sdei_entry_point,4,2           ## @sdei_entry_point
	.comm	_SDEI_EVENT_REGISTER_RM_ANY,4,2 ## @SDEI_EVENT_REGISTER_RM_ANY
	.comm	__local_event_register,4,2      ## @_local_event_register
	.comm	__local_event_unregister,4,2    ## @_local_event_unregister
	.no_dead_strip	__sdei_event_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _sdei_event_register
__sdei_event_register:                  ; @_sdei_event_register
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _sdei_events_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _sdei_events_lock@GOTPAGEOFF]
	bl	_lockdep_assert_held
Lloh2:
	adrp	x20, _sdei_list_lock@GOTPAGE
Lloh3:
	ldr	x20, [x20, _sdei_list_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock
	ldr	x8, [x19, #8]
Lloh4:
	adrp	x9, _SDEI_EVENT_TYPE_SHARED@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SDEI_EVENT_TYPE_SHARED@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _sdei_entry_point@GOTPAGE
Lloh8:
	ldr	x8, [x8, _sdei_entry_point@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldp	w2, w0, [x19, #20]
Lloh10:
	adrp	x8, _SDEI_EVENT_REGISTER_RM_ANY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SDEI_EVENT_REGISTER_RM_ANY@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	w4, #0
	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
	b	_sdei_api_event_register
LBB0_2:
Lloh13:
	adrp	x8, __local_event_register@GOTPAGE
Lloh14:
	ldr	x8, [x8, __local_event_register@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_sdei_do_cross_call
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh16:
	adrp	x21, _sdei_list_lock@GOTPAGE
Lloh17:
	ldr	x21, [x21, _sdei_list_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock
	str	wzr, [x19]
	str	wzr, [x19, #16]
	mov	x0, x21
	bl	_spin_unlock
Lloh18:
	adrp	x8, __local_event_unregister@GOTPAGE
Lloh19:
	ldr	x8, [x8, __local_event_unregister@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_sdei_do_cross_call
LBB0_4:
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_sdei_events_lock,4,2           ; @sdei_events_lock
	.comm	_sdei_list_lock,4,2             ; @sdei_list_lock
	.comm	_SDEI_EVENT_TYPE_SHARED,8,3     ; @SDEI_EVENT_TYPE_SHARED
	.comm	_sdei_entry_point,4,2           ; @sdei_entry_point
	.comm	_SDEI_EVENT_REGISTER_RM_ANY,4,2 ; @SDEI_EVENT_REGISTER_RM_ANY
	.comm	__local_event_register,4,2      ; @_local_event_register
	.comm	__local_event_unregister,4,2    ; @_local_event_unregister
	.no_dead_strip	__sdei_event_register
.subsections_via_symbols
