	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function njs_create_vm
_njs_create_vm:                         ## @njs_create_vm
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_njs_vm_create
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_njs_externals_init
	movq	_NJS_OK@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.4:
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.5:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	%rcx, -48(%rbp)
	movq	(%rax,%rbx,8), %rdi
	callq	_njs_strlen
	movq	%rax, -56(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_njs_vm_add_path
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	(%r12), %rbx
	jb	LBB0_8
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	movq	%rax, %rbx
	leaq	-56(%rbp), %r15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_njs_strchr
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rax
	subq	%rbx, %rax
	sarq	$2, %rax
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rbx, %rdi
	callq	_njs_strlen
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, -56(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_njs_vm_add_path
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	4(%r12), %rbx
	testq	%r12, %r12
	jne	LBB0_12
	jmp	LBB0_17
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
LBB0_2:
	callq	_njs_stderror
	xorl	%r14d, %r14d
LBB0_17:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create vm\n"

	.comm	_NJS_OK,8,3                     ## @NJS_OK
L_.str.1:                               ## @.str.1
	.asciz	"failed to add external protos\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to add path\n"

L_.str.3:                               ## @.str.3
	.asciz	"NJS_PATH"

	.no_dead_strip	_njs_create_vm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function njs_create_vm
_njs_create_vm:                         ; @njs_create_vm
	.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	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_njs_vm_create
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_njs_externals_init
Lloh0:
	adrp	x22, _NJS_OK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NJS_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	lsl	x9, x21, #3
	ldr	x10, [x8, x9]
	str	x10, [sp, #8]
	ldr	x0, [x8, x9]
	bl	_njs_strlen
	str	x0, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_njs_vm_add_path
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldr	x8, [x20]
	cmp	x21, x8
	b.lo	LBB0_4
LBB0_6:
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_17
; %bb.7:
	mov	x21, x0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #58
	bl	_njs_strchr
	mov	x20, x0
	str	x21, [sp, #8]
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x8, x20, x21
	asr	x0, x8, #2
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_njs_strlen
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	str	x0, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_njs_vm_add_path
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x20, #4
	cbnz	x20, LBB0_8
	b	LBB0_17
LBB0_13:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_njs_stderror
	b	LBB0_17
LBB0_14:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_16:
	bl	_njs_stderror
	mov	x19, #0
LBB0_17:
	mov	x0, x19
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create vm\n"

	.comm	_NJS_OK,8,3                     ; @NJS_OK
l_.str.1:                               ; @.str.1
	.asciz	"failed to add external protos\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to add path\n"

l_.str.3:                               ; @.str.3
	.asciz	"NJS_PATH"

	.no_dead_strip	_njs_create_vm
.subsections_via_symbols
