	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdei_event_register            ## -- Begin function sdei_event_register
	.p2align	4, 0x90
_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movl	%edi, %r14d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_in_nmi
	movl	%eax, %edi
	callq	_WARN_ON
	movq	_sdei_events_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	%r14d, %edi
	callq	_sdei_event_find
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movl	%r14d, %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_sdei_event_create
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	jmp	LBB0_7
LBB0_4:
	movq	%r15, %rdi
	callq	__sdei_event_register
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_sdei_event_destroy
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
LBB0_7:
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_8:
	movq	_sdei_events_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_sdei_events_lock,4,2           ## @sdei_events_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Event %u already registered\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create event %u: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to register event %u: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdei_event_register            ; -- Begin function sdei_event_register
	.p2align	2
_sdei_event_register:                   ; @sdei_event_register
	.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	x21, x1
	mov	x19, x0
	bl	_in_nmi
	bl	_WARN_ON
Lloh0:
	adrp	x0, _sdei_events_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _sdei_events_lock@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x19
	bl	_sdei_event_find
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_warn
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_sdei_event_create
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x20, x0
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pr_warn
	b	LBB0_7
LBB0_4:
	mov	x0, x20
	bl	__sdei_event_register
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	mov	x0, x20
	bl	_sdei_event_destroy
	str	x21, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_pr_warn
	mov	x20, x21
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
Lloh11:
	adrp	x0, _sdei_events_lock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _sdei_events_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_sdei_events_lock,4,2           ; @sdei_events_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Event %u already registered\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create event %u: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to register event %u: %d\n"

.subsections_via_symbols
