	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_shared_memory_output
_copy_shared_memory_output:             ## @copy_shared_memory_output
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	js	LBB0_3
## %bb.1:
	movq	%rdx, %r14
	movl	%esi, %r8d
	movq	%rdi, %r15
	movq	_MAX_SHARED_MEMORY_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_2
## %bb.4:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.5:
	cmpq	%r15, (%rbx)
	jne	LBB0_7
## %bb.6:
	movl	8(%rbx), %edi
	cmpl	$5, %edi
	jb	LBB0_8
LBB0_7:
	movq	_forth_output_errors@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	$0, (%r14)
	leaq	L_.str.1(%rip), %rdi
	callq	_strdup
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_assert
	jmp	LBB0_11
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_last_mmap_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_vkprintf
	movq	_mmap_errors@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_max_task_time@GOTPCREL(%rip), %rax
	movq	16(%rbx), %rcx
	cmpq	%rcx, (%rax)
	jge	LBB0_10
## %bb.9:
	movq	%rcx, (%rax)
LBB0_10:
	movl	%edi, (%r14)
	incl	%edi
	callq	_malloc
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_assert
	movq	16(%r14), %rdi
	movl	24(%rbx), %esi
	movl	(%r14), %edx
	callq	_memcpy
	movq	16(%r14), %rax
	movslq	(%r14), %rcx
	movq	$0, (%rax,%rcx,8)
LBB0_11:
	movq	_now@GOTPCREL(%rip), %rax
	movq	_result_living_time@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%r14)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_munmap
	movl	(%r14), %eax
	movq	_all_results_memory@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	addl	%edx, %eax
	incl	%eax
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_forth_request_run_output_gc    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SHARED_MEMORY_SIZE,4,2     ## @MAX_SHARED_MEMORY_SIZE
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_errno,4,2                      ## @errno
	.comm	_last_mmap_errno,4,2            ## @last_mmap_errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"copy_shared_memory_output, mmap failed\n%m\n"

	.comm	_mmap_errors,4,2                ## @mmap_errors
	.comm	_forth_output_errors,4,2        ## @forth_output_errors
L_.str.1:                               ## @.str.1
	.space	1

	.comm	_max_task_time,8,3              ## @max_task_time
	.comm	_now,8,3                        ## @now
	.comm	_result_living_time,8,3         ## @result_living_time
	.comm	_all_results_memory,4,2         ## @all_results_memory
	.no_dead_strip	_copy_shared_memory_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_shared_memory_output
_copy_shared_memory_output:             ; @copy_shared_memory_output
	.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
	tbnz	w1, #31, LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x4, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _MAX_SHARED_MEMORY_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_SHARED_MEMORY_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, #0
	mov	w5, #0
	bl	_mmap
Lloh8:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_6
; %bb.2:
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x8, [x20]
	cmp	x8, x21
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x20, #8]
	cmp	w8, #5
	b.lo	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _forth_output_errors@GOTPAGE
Lloh12:
	ldr	x8, [x8, _forth_output_errors@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	wzr, [x19]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_strdup
	str	x0, [x19, #16]
	bl	_assert
	b	LBB0_11
LBB0_6:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _last_mmap_errno@GOTPAGE
Lloh19:
	ldr	x9, [x9, _last_mmap_errno@GOTPAGEOFF]
Lloh20:
	str	w8, [x9]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
Lloh23:
	adrp	x8, _mmap_errors@GOTPAGE
Lloh24:
	ldr	x8, [x8, _mmap_errors@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_7:
	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
LBB0_8:
Lloh25:
	adrp	x9, _max_task_time@GOTPAGE
Lloh26:
	ldr	x9, [x9, _max_task_time@GOTPAGEOFF]
	ldr	x11, [x9]
	ldr	x10, [x20, #16]
	cmp	x11, x10
	b.ge	LBB0_10
; %bb.9:
	str	x10, [x9]
LBB0_10:
	str	w8, [x19]
	add	w0, w8, #1
	bl	_malloc
	str	x0, [x19, #16]
	bl	_assert
	ldr	x0, [x19, #16]
	ldr	w1, [x20, #24]
	ldr	w2, [x19]
	bl	_memcpy
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
LBB0_11:
Lloh27:
	adrp	x8, _now@GOTPAGE
Lloh28:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
Lloh30:
	adrp	x9, _result_living_time@GOTPAGE
Lloh31:
	ldr	x9, [x9, _result_living_time@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19, #8]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_munmap
	ldr	w8, [x19]
Lloh33:
	adrp	x9, _all_results_memory@GOTPAGE
Lloh34:
	ldr	x9, [x9, _all_results_memory@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w8, w8, w10
	add	w8, w8, #1
	str	w8, [x9]
	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
	b	_forth_request_run_output_gc
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SHARED_MEMORY_SIZE,4,2     ; @MAX_SHARED_MEMORY_SIZE
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_errno,4,2                      ; @errno
	.comm	_last_mmap_errno,4,2            ; @last_mmap_errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"copy_shared_memory_output, mmap failed\n%m\n"

	.comm	_mmap_errors,4,2                ; @mmap_errors
	.comm	_forth_output_errors,4,2        ; @forth_output_errors
l_.str.1:                               ; @.str.1
	.space	1

	.comm	_max_task_time,8,3              ; @max_task_time
	.comm	_now,8,3                        ; @now
	.comm	_result_living_time,8,3         ; @result_living_time
	.comm	_all_results_memory,4,2         ; @all_results_memory
	.no_dead_strip	_copy_shared_memory_output
.subsections_via_symbols
