	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_mod_event                   ## -- Begin function ng_mod_event
	.p2align	4, 0x90
_ng_mod_event:                          ## @ng_mod_event
	.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	%rdx, %r14
	movl	%edi, %r15d
	cmpl	$128, %esi
	je	LBB0_6
## %bb.1:
	cmpl	$129, %esi
	jne	LBB0_13
## %bb.2:
	movq	%r14, %rdi
	callq	_ng_newtype
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.3:
	movq	(%r14), %rcx
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.4:
	movl	%r15d, %edi
	movl	$129, %esi
	movq	%r14, %rdx
	callq	*%rcx
	testl	%eax, %eax
	je	LBB0_16
## %bb.5:
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_TYPELIST_WLOCK
	decl	8(%r14)
	movq	_types@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_LIST_REMOVE
	xorl	%eax, %eax
	callq	_TYPELIST_WUNLOCK
	movl	%r15d, %ebx
	jmp	LBB0_16
LBB0_6:
	movl	8(%r14), %eax
	cmpl	$2, %eax
	jl	LBB0_8
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	movl	%r15d, %edi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_8:
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	%r15d, %edi
	movl	$128, %esi
	movq	%r14, %rdx
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
LBB0_12:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TYPELIST_WLOCK
	movq	_types@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_LIST_REMOVE
	xorl	%eax, %eax
	callq	_TYPELIST_WUNLOCK
	jmp	LBB0_16
LBB0_14:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_types,4,2                      ## @types
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_mod_event                   ; -- Begin function ng_mod_event
	.p2align	2
_ng_mod_event:                          ; @ng_mod_event
	.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, x2
	mov	x21, x0
	cmp	w1, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w1, #129
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x19
	bl	_ng_newtype
	mov	x20, x0
	cbnz	w0, LBB0_17
; %bb.3:
	ldr	x8, [x19]
	cbz	x8, LBB0_16
; %bb.4:
	mov	x0, x21
	mov	w1, #129
	mov	x2, x19
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_17
; %bb.5:
	bl	_TYPELIST_WLOCK
	ldr	w8, [x19, #8]
	sub	w8, w8, #1
	str	w8, [x19, #8]
Lloh0:
	adrp	x8, _types@GOTPAGE
Lloh1:
	ldr	x8, [x8, _types@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LIST_REMOVE
	bl	_TYPELIST_WUNLOCK
	b	LBB0_17
LBB0_6:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.7:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
	ldr	x3, [x19]
	cbz	x3, LBB0_14
; %bb.9:
	mov	x0, x21
	mov	x2, x19
	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
	br	x3
LBB0_10:
	cbz	w8, LBB0_16
; %bb.11:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x21
	mov	w1, #128
	mov	x2, x19
	blr	x8
	mov	x20, x0
	cbnz	w0, LBB0_17
LBB0_13:
	bl	_TYPELIST_WLOCK
Lloh5:
	adrp	x8, _types@GOTPAGE
Lloh6:
	ldr	x8, [x8, _types@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LIST_REMOVE
	bl	_TYPELIST_WUNLOCK
	mov	w20, #0
	b	LBB0_17
LBB0_14:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_15:
	ldr	w20, [x8]
	b	LBB0_17
LBB0_16:
	mov	w20, #0
LBB0_17:
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_types,4,2                      ; @types
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
