	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_newtype                     ## -- Begin function ng_newtype
	.p2align	4, 0x90
_ng_newtype:                            ## @ng_newtype
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	12(%rdi), %edi
	callq	_strlen
	movq	(%rbx), %rcx
	movq	_NG_ABI_VERSION@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rcx
	jne	LBB0_3
## %bb.1:
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_NG_TYPESIZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_3
## %bb.6:
	movl	12(%rbx), %edi
	callq	_ng_findtype
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_TRAP_ERROR
	movq	_EEXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_9
LBB0_3:
	xorl	%eax, %eax
	callq	_TRAP_ERROR
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_5
## %bb.4:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_9
LBB0_8:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_TYPELIST_WLOCK
	movq	_types@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ng_typelist@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_LIST_INSERT_HEAD
	movl	$1, 8(%rbx)
	xorl	%eax, %eax
	callq	_TYPELIST_WUNLOCK
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_ABI_VERSION,8,3             ## @NG_ABI_VERSION
	.comm	_NG_TYPESIZ,8,3                 ## @NG_TYPESIZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_ng_typelist,4,2                ## @ng_typelist
	.comm	_types,4,2                      ## @types
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Netgraph: Node type rejected. ABI mismatch. Suggest recompile"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_newtype                     ; -- Begin function ng_newtype
	.p2align	2
_ng_newtype:                            ; @ng_newtype
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #12]
	bl	_strlen
	ldr	x8, [x19]
Lloh0:
	adrp	x20, _NG_ABI_VERSION@GOTPAGE
Lloh1:
	ldr	x20, [x20, _NG_ABI_VERSION@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh2:
	adrp	x10, _NG_TYPESIZ@GOTPAGE
Lloh3:
	ldr	x10, [x10, _NG_TYPESIZ@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x0, #0, #4, eq
	ccmp	x0, x10, #2, ne
	b.lo	LBB0_4
; %bb.1:
	bl	_TRAP_ERROR
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x0, l_str@PAGE
Lloh6:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #12]
	bl	_ng_findtype
	cbz	x0, LBB0_6
; %bb.5:
	bl	_TRAP_ERROR
Lloh10:
	adrp	x8, _EEXIST@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_6:
	bl	_TYPELIST_WLOCK
Lloh13:
	adrp	x8, _types@GOTPAGE
Lloh14:
	ldr	x8, [x8, _types@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x0, _ng_typelist@GOTPAGE
Lloh17:
	ldr	x0, [x0, _ng_typelist@GOTPAGEOFF]
	mov	x1, x19
	bl	_LIST_INSERT_HEAD
	mov	w8, #1
	str	w8, [x19, #8]
	bl	_TYPELIST_WUNLOCK
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_ABI_VERSION,8,3             ; @NG_ABI_VERSION
	.comm	_NG_TYPESIZ,8,3                 ; @NG_TYPESIZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_ng_typelist,4,2                ; @ng_typelist
	.comm	_types,4,2                      ; @types
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Netgraph: Node type rejected. ABI mismatch. Suggest recompile"

.subsections_via_symbols
