	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_bridge_newhook
_ng_bridge_newhook:                     ## @ng_bridge_newhook
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_NG_NODE_PRIVATE
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_strlen
	movl	%eax, %ebx
	movq	_NG_BRIDGE_HOOK_LINK_PREFIX@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_strlen
	cmpl	%eax, %ebx
	jle	LBB0_3
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%rsp, %rbx
	movq	_NG_HOOKSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	(%r12), %rdi
	callq	_strlen
	movslq	%eax, %rdi
	addq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_strtoul
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %r8d
	callq	_snprintf
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rsp
	jmp	LBB0_11
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_4:
	movq	%rbx, %r14
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_NG_PEER_NODE
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.5:
	movq	_ELOOP@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_M_NETGRAPH_BRIDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$4, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	%ebx, (%rax)
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_NG_HOOK_SET_PRIVATE
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	movq	%r14, %rsp
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_BRIDGE_HOOK_LINK_PREFIX,8,3 ## @NG_BRIDGE_HOOK_LINK_PREFIX
	.comm	_NG_HOOKSIZ,4,2                 ## @NG_HOOKSIZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%u"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ELOOP,4,2                      ## @ELOOP
	.comm	_M_NETGRAPH_BRIDGE,4,2          ## @M_NETGRAPH_BRIDGE
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ng_bridge_newhook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_bridge_newhook
_ng_bridge_newhook:                     ; @ng_bridge_newhook
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_NG_NODE_PRIVATE
	mov	x20, x0
	mov	x0, x22
	bl	_strlen
	mov	x23, x0
Lloh3:
	adrp	x26, _NG_BRIDGE_HOOK_LINK_PREFIX@GOTPAGE
Lloh4:
	ldr	x26, [x26, _NG_BRIDGE_HOOK_LINK_PREFIX@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_strlen
	cmp	w23, w0
	b.le	LBB0_3
; %bb.1:
	mov	x25, sp
Lloh5:
	adrp	x8, _NG_HOOKSIZ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NG_HOOKSIZ@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x9, x23
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x9, x9, #0x1fffffff0
	sub	x24, x8, x9
	mov	sp, x24
	ldr	x0, [x26]
	bl	_strlen
	add	x0, x22, w0, sxtw
	mov	x1, #0
	mov	w2, #10
	bl	_strtoul
	mov	x4, x0
	ldr	x3, [x26]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x24
	mov	x1, x23
	bl	_snprintf
	mov	x0, x24
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.2:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_NG_PEER_NODE
	cmp	x0, x21
	b.ne	LBB0_6
; %bb.5:
Lloh17:
	adrp	x8, _ELOOP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ELOOP@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh19:
	adrp	x8, _M_NETGRAPH_BRIDGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _M_NETGRAPH_BRIDGE@GOTPAGEOFF]
Lloh21:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	ldr	w8, [x9]
Lloh25:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh26:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #4
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.7:
	mov	x1, x0
	str	w19, [x0]
	mov	x0, x19
	bl	_NG_HOOK_SET_PRIVATE
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	mov	sp, x25
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	mov	sp, x25
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_BRIDGE_HOOK_LINK_PREFIX,8,3 ; @NG_BRIDGE_HOOK_LINK_PREFIX
	.comm	_NG_HOOKSIZ,4,2                 ; @NG_HOOKSIZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%u"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ELOOP,4,2                      ; @ELOOP
	.comm	_M_NETGRAPH_BRIDGE,4,2          ; @M_NETGRAPH_BRIDGE
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ng_bridge_newhook
.subsections_via_symbols
