	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_runtime_env
_init_runtime_env:                      ## @init_runtime_env
	.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	%rdi, %rbx
	leaq	_init_runtime_env(%rip), %rdi
	callq	_TRACE_IN
	movl	$1, %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	_PF_LOCAL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r15d
	movl	%eax, 4(%r14)
	cmpl	$1, (%rbx)
	jne	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	callq	_unlink
LBB0_2:
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %edi
	movl	8(%rbx), %esi
	movl	$4, %edx
	callq	_strlcpy
	movl	-48(%rbp), %edi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	5(%rax), %edx
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_bind
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %r12
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_LOG_MSG_2
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_chmod
	movl	%r15d, %edi
	movl	$-1, %esi
	callq	_listen
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	callq	_fcntl
	xorl	%eax, %eax
	callq	_kqueue
	movl	%eax, %ebx
	movl	%eax, (%r14)
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_assert
	movq	_EVFILT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %rax
	movq	_EV_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	$0, (%rsp)
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	movl	%r15d, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	%ebx, %edi
	movq	%r13, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_kevent
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_LOG_MSG_2
	jmp	LBB0_5
LBB0_3:
	movl	%r15d, %edi
	callq	_close
	movq	%r14, %rdi
	callq	_free
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_LOG_ERR_2
	xorl	%r14d, %r14d
LBB0_5:
	leaq	_init_runtime_env(%rip), %rdi
	callq	_TRACE_OUT
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_LOCAL,4,2                   ## @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"runtime environment"

L_.str.1:                               ## @.str.1
	.asciz	"can't bind socket to path: %s"

L_.str.2:                               ## @.str.2
	.asciz	"using socket %s"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EVFILT_READ,4,2                ## @EVFILT_READ
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ## @EV_ONESHOT
L_.str.3:                               ## @.str.3
	.asciz	"successfully initialized"

	.no_dead_strip	_init_runtime_env
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_runtime_env
_init_runtime_env:                      ; @init_runtime_env
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x0
Lloh0:
	adrp	x0, _init_runtime_env@PAGE
Lloh1:
	add	x0, x0, _init_runtime_env@PAGEOFF
	bl	_TRACE_IN
	mov	w0, #1
	mov	w1, #8
	bl	_calloc
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
Lloh2:
	adrp	x22, _PF_LOCAL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PF_LOCAL@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh4:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	str	w0, [x19, #4]
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x21, #8]
	bl	_unlink
LBB0_2:
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #28]
	ldr	w0, [sp, #24]
	ldr	w1, [x21, #8]
	mov	w2, #4
	bl	_strlcpy
	ldr	w0, [sp, #24]
	bl	_strlen
	add	w2, w0, #5
	add	x1, sp, #24
	mov	x0, x20
	bl	_bind
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x21, #8]
	str	x8, [sp]
Lloh7:
	adrp	x22, l_.str@PAGE
Lloh8:
	add	x22, x22, l_.str@PAGEOFF
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_LOG_MSG_2
	ldp	w1, w0, [x21, #4]
	bl	_chmod
	mov	x0, x20
	mov	w1, #-1
	bl	_listen
Lloh11:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_fcntl
	bl	_kqueue
	mov	x21, x0
	str	w0, [x19]
	cmn	w0, #1
	cset	w0, ne
	bl	_assert
Lloh17:
	adrp	x8, _EVFILT_READ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EVFILT_READ@GOTPAGEOFF]
Lloh19:
	adrp	x9, _EV_ADD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EV_ADD@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	ldr	w8, [x9]
Lloh23:
	adrp	x9, _EV_ONESHOT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EV_ONESHOT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x0, sp, #16
	mov	x1, x20
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_EV_SET
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x1, sp, #16
	add	x5, sp, #8
	mov	x0, x21
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	bl	_kevent
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_LOG_MSG_2
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_close
	mov	x0, x19
	bl	_free
	ldr	w2, [x21, #8]
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LOG_ERR_2
	mov	x19, #0
LBB0_5:
Lloh32:
	adrp	x0, _init_runtime_env@PAGE
Lloh33:
	add	x0, x0, _init_runtime_env@PAGEOFF
	bl	_TRACE_OUT
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_LOCAL,4,2                   ; @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"runtime environment"

l_.str.1:                               ; @.str.1
	.asciz	"can't bind socket to path: %s"

l_.str.2:                               ; @.str.2
	.asciz	"using socket %s"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EVFILT_READ,4,2                ; @EVFILT_READ
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ; @EV_ONESHOT
l_.str.3:                               ; @.str.3
	.asciz	"successfully initialized"

	.no_dead_strip	_init_runtime_env
.subsections_via_symbols
