	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ensure_chunks_worker           ## -- Begin function ensure_chunks_worker
	.p2align	4, 0x90
_ensure_chunks_worker:                  ## @ensure_chunks_worker
	.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	$248, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -232(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_g@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	40(%rax), %esi
	movl	36(%rax), %edx
	movl	(%rdi), %r9d
	movl	4(%rdi), %ecx
	movl	16(%rdi), %r8d
	movl	12(%rdi), %r10d
	movl	8(%rdi), %r11d
	movl	32(%rax), %r15d
	movl	24(%rax), %r12d
	movl	28(%rax), %eax
	subq	$8, %rsp
	leaq	-112(%rbp), %r13
	movq	%r13, %rdi
	pushq	%r12
	pushq	%rax
	pushq	%r15
	pushq	%r11
	pushq	%r10
	callq	_set_matrix_3d
	addq	$48, %rsp
	movq	(%r14), %rax
	movl	24(%rax), %esi
	leaq	-208(%rbp), %rdi
	movq	%r13, %rdx
	callq	_frustum_planes
	movl	4(%rbx), %edi
	callq	_chunked
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -280(%rbp)                ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_chunked
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -240(%rbp)                ## 8-byte Spill
	movq	(%r14), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	js	LBB0_34
## %bb.1:
	movl	%ecx, %eax
	negl	%eax
	leal	(%rcx,%rcx), %edx
	incl	%edx
	movl	%edx, -244(%rbp)                ## 4-byte Spill
	movl	$0, -216(%rbp)                  ## 4-byte Folded Spill
	movl	$268435455, -220(%rbp)          ## 4-byte Folded Spill
                                        ## imm = 0xFFFFFFF
	movl	$0, -212(%rbp)                  ## 4-byte Folded Spill
	movl	%eax, -248(%rbp)                ## 4-byte Spill
	movl	%eax, %edx
	movq	%rcx, -272(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-264(%rbp), %rdx                ## 8-byte Reload
	leal	1(%rdx), %eax
	movq	-272(%rbp), %rcx                ## 8-byte Reload
	cmpl	%ecx, %edx
	movl	%eax, %edx
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	-280(%rbp), %rax                ## 8-byte Reload
	movq	%rdx, -264(%rbp)                ## 8-byte Spill
	addl	%eax, %edx
	movl	-244(%rbp), %r15d               ## 4-byte Reload
	movl	-248(%rbp), %eax                ## 4-byte Reload
	movl	%eax, %r14d
	movl	%edx, -224(%rbp)                ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	%r13d, %edx
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=2
	incl	%r14d
	decl	%r15d
	je	LBB0_5
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-240(%rbp), %rax                ## 8-byte Reload
	leal	(%rax,%r14), %r12d
	movl	%edx, %r13d
	movl	%edx, %edi
	callq	_ABS
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_ABS
	xorl	%ebx, %eax
	cltd
	movq	_WORKERS@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movq	-232(%rbp), %rax                ## 8-byte Reload
	cmpl	(%rax), %edx
	jne	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_find_chunk
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=2
	cmpq	$0, 8(%rbx)
	je	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=2
	movq	-264(%rbp), %rdi                ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ABS
	movl	%eax, %r13d
	movl	%r14d, %edi
	callq	_ABS
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_MAX
	movl	%eax, -252(%rbp)                ## 4-byte Spill
	xorl	%r13d, %r13d
	leaq	-208(%rbp), %rdi
	movl	-224(%rbp), %esi                ## 4-byte Reload
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	movl	$256, %r8d                      ## imm = 0x100
	callq	_chunk_visible
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=2
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=2
	cmpq	$0, 8(%rbx)
	setne	%cl
	jmp	LBB0_16
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=2
	movl	-224(%rbp), %edx                ## 4-byte Reload
	jmp	LBB0_18
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=2
	xorl	%ecx, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=2
	movzbl	%cl, %r13d
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=2
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	shll	$24, %ecx
	shll	$16, %r13d
	orl	%ecx, %r13d
	orl	-252(%rbp), %r13d               ## 4-byte Folded Reload
	movl	-220(%rbp), %ecx                ## 4-byte Reload
	cmpl	%ecx, %r13d
	movl	-212(%rbp), %eax                ## 4-byte Reload
	cmovll	%r12d, %eax
	movl	%eax, -212(%rbp)                ## 4-byte Spill
	movl	-216(%rbp), %eax                ## 4-byte Reload
	movl	-224(%rbp), %edx                ## 4-byte Reload
	cmovll	%edx, %eax
	movl	%eax, -216(%rbp)                ## 4-byte Spill
	cmovll	%r13d, %ecx
	movl	%ecx, -220(%rbp)                ## 4-byte Spill
	jmp	LBB0_18
LBB0_6:
	cmpl	$268435455, -220(%rbp)          ## 4-byte Folded Reload
                                        ## imm = 0xFFFFFFF
	je	LBB0_34
## %bb.7:
	movl	-216(%rbp), %edi                ## 4-byte Reload
	movl	-212(%rbp), %esi                ## 4-byte Reload
	callq	_find_chunk
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	%rax, %r14
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_19:
	movq	_g@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r14
	movq	_MAX_CHUNKS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r14
	jge	LBB0_34
## %bb.20:
	leaq	1(%r14), %rcx
	movq	%rcx, 8(%rax)
	shlq	$5, %r14
	addq	16(%rax), %r14
	movq	%r14, %rdi
	movl	-216(%rbp), %esi                ## 4-byte Reload
	movl	-212(%rbp), %edx                ## 4-byte Reload
	callq	_init_chunk
	movl	$1, %eax
LBB0_21:
	movl	(%r14), %ecx
	movq	-232(%rbp), %rdx                ## 8-byte Reload
	movl	%ecx, 16(%rdx)
	movl	4(%r14), %ecx
	movl	%ecx, 20(%rdx)
	movl	%eax, 24(%rdx)
	movq	$-1, %r13
	movq	%r14, -240(%rbp)                ## 8-byte Spill
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	%rax, %rbx
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r15
	leaq	20(%rbx), %rsi
	movq	%rax, %rdi
	callq	_map_copy
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r12
	addq	$16, %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_map_copy
LBB0_32:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	-232(%rbp), %rcx                ## 8-byte Reload
	movq	40(%rcx), %rax
	movq	8(%rax,%r13,8), %rax
	movq	%r15, 16(%rax)
	movq	32(%rcx), %rax
	movq	8(%rax,%r13,8), %rax
	movq	%r12, 16(%rax)
	movq	%r14, %r13
	cmpq	$2, %r14
	movq	-240(%rbp), %r14                ## 8-byte Reload
	je	LBB0_33
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	addl	%r13d, %edi
	movl	4(%r14), %esi
	decl	%esi
	callq	_find_chunk
	testq	%rax, %rax
	je	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%rax, %rbx
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r15
	leaq	20(%rbx), %rsi
	movq	%rax, %rdi
	callq	_map_copy
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r12
	addq	$16, %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_map_copy
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_22 Depth=1
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
LBB0_25:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	-232(%rbp), %rcx                ## 8-byte Reload
	movq	40(%rcx), %rax
	movq	8(%rax,%r13,8), %rax
	movq	%r15, (%rax)
	movq	32(%rcx), %rax
	movq	8(%rax,%r13,8), %rax
	movq	%r12, (%rax)
	movq	%r14, %rbx
	testq	%r13, %r13
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	(%r14), %edi
	addl	%r13d, %edi
	movl	4(%r14), %esi
	callq	_find_chunk
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_27
LBB0_28:                                ##   in Loop: Header=BB0_22 Depth=1
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r15
	leaq	20(%rbx), %rsi
	movq	%rax, %rdi
	callq	_map_copy
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r12
	addq	$16, %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_map_copy
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_22 Depth=1
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
LBB0_29:                                ##   in Loop: Header=BB0_22 Depth=1
	leaq	1(%r13), %r14
	movq	-232(%rbp), %rcx                ## 8-byte Reload
	movq	40(%rcx), %rax
	movq	8(%rax,%r13,8), %rax
	movq	%r15, 8(%rax)
	movq	32(%rcx), %rax
	movq	8(%rax,%r13,8), %rax
	movq	%r12, 8(%rax)
	movq	-240(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edi
	addl	%r13d, %edi
	movl	4(%rax), %esi
	incl	%esi
	callq	_find_chunk
	testq	%rax, %rax
	jne	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_22 Depth=1
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_32
LBB0_33:
	movq	$0, 8(%r14)
	movq	_WORKER_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-232(%rbp), %rdi                ## 8-byte Reload
	movl	%eax, 8(%rdi)
	addq	$4, %rdi
	callq	_cnd_signal
LBB0_34:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_36
## %bb.35:
	addq	$248, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_g,8,3                          ## @g
	.comm	_WORKERS,4,2                    ## @WORKERS
	.comm	_MAX_CHUNKS,8,3                 ## @MAX_CHUNKS
	.comm	_WORKER_BUSY,4,2                ## @WORKER_BUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ensure_chunks_worker           ; -- Begin function ensure_chunks_worker
	.p2align	2
_ensure_chunks_worker:                  ; @ensure_chunks_worker
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #320
	.cfi_def_cfa_offset 320
	stp	x28, x27, [sp, #224]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #240]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #256]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #272]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #288]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #304]            ; 16-byte Folded Spill
	add	x29, sp, #304
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x28, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x19, _g@GOTPAGE
Lloh4:
	ldr	x19, [x19, _g@GOTPAGEOFF]
	stur	x8, [x29, #-96]
	ldr	x8, [x19]
	ldp	w2, w1, [x8, #36]
	ldp	w6, w4, [x0, #12]
	ldp	w5, w3, [x0]
	ldr	w7, [x0, #8]
	ldp	w10, w9, [x8, #28]
	ldr	w8, [x8, #24]
	stp	w10, w8, [sp, #4]
	add	x0, sp, #144
	str	w9, [sp]
	bl	_set_matrix_3d
	ldr	x8, [x19]
	ldr	w1, [x8, #24]
	add	x0, sp, #48
	add	x2, sp, #144
	bl	_frustum_planes
	ldr	w0, [x20, #4]
	bl	_chunked
	str	w0, [sp, #32]                   ; 4-byte Folded Spill
	ldr	w0, [x20]
	bl	_chunked
	ldr	x8, [x19]
	ldr	w9, [x8]
	tbnz	w9, #31, LBB0_31
; %bb.1:
	mov	x23, x0
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	neg	w8, w9
	mov	w10, #1
	bfi	w10, w9, #1, #31
	str	w10, [sp, #20]                  ; 4-byte Folded Spill
	mov	w19, #268435455
Lloh5:
	adrp	x22, _WORKERS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _WORKERS@GOTPAGEOFF]
	stp	w8, w9, [sp, #24]               ; 8-byte Folded Spill
	mov	x10, x8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [sp, #36]                  ; 4-byte Folded Reload
	add	w8, w10, #1
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w10, w9
	mov	x10, x8
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	str	w10, [sp, #36]                  ; 4-byte Folded Spill
	add	w25, w10, w8
	ldp	w24, w26, [sp, #20]             ; 8-byte Folded Reload
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=2
	mov	w8, #0
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	cmp	w0, #0
	cset	w9, eq
	lsl	w9, w9, #24
	bfi	w9, w8, #16, #1
	orr	w8, w9, w28
	cmp	w8, w19
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	csel	w10, w27, w9, lt
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	csel	w9, w25, w9, lt
	stp	w9, w10, [sp, #40]              ; 8-byte Folded Spill
	csel	w19, w8, w19, lt
	mov	x28, x21
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w26, w26, #1
	subs	w24, w24, #1
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w27, w23, w26
	mov	x0, x25
	bl	_ABS
	mov	x20, x0
	mov	x0, x27
	bl	_ABS
	eor	w8, w0, w20
	ldr	w9, [x22]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	ldr	w9, [x28]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x25
	mov	x1, x27
	bl	_find_chunk
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x21, x28
	ldr	w0, [sp, #36]                   ; 4-byte Folded Reload
	bl	_ABS
	mov	x28, x0
	mov	x0, x26
	bl	_ABS
	mov	x1, x0
	mov	x0, x28
	bl	_MAX
	mov	x28, x0
	add	x0, sp, #48
	mov	x1, x25
	mov	x2, x27
	mov	w3, #0
	mov	w4, #256
	bl	_chunk_visible
	cbz	x20, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w8, ne
	b	LBB0_5
LBB0_13:
	mov	w8, #268435455
	cmp	w19, w8
	b.eq	LBB0_31
; %bb.14:
	ldp	w0, w1, [sp, #40]               ; 8-byte Folded Reload
	bl	_find_chunk
	cbz	x0, LBB0_16
; %bb.15:
	mov	x20, x0
	mov	w8, #0
	b	LBB0_18
LBB0_16:
Lloh7:
	adrp	x8, _g@GOTPAGE
Lloh8:
	ldr	x8, [x8, _g@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x9, [x8, #8]
Lloh10:
	adrp	x10, _MAX_CHUNKS@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MAX_CHUNKS@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_31
; %bb.17:
	ldr	x10, [x8, #16]
	add	x11, x9, #1
	str	x11, [x8, #8]
	add	x20, x10, x9, lsl #5
	mov	x0, x20
	ldp	w1, w2, [sp, #40]               ; 8-byte Folded Reload
	bl	_init_chunk
	mov	w8, #1
LBB0_18:
	mov	x24, #0
	ldr	d0, [x20]
	str	d0, [x28, #16]
	str	w8, [x28, #24]
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	x22, x0
	mov	w0, #4
	bl	_malloc
	mov	x21, x0
	add	x1, x22, #20
	bl	_map_copy
	mov	w0, #4
	bl	_malloc
	mov	x23, x0
	add	x1, x22, #16
	bl	_map_copy
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x28, #40]
	ldr	x8, [x8, x19]
	str	x21, [x8, #16]
	ldr	x8, [x28, #32]
	ldr	x8, [x8, x19]
	str	x23, [x8, #16]
	add	x24, x24, #1
	cmp	x24, #3
	b.eq	LBB0_30
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x20]
	add	w8, w24, w8
	sub	w0, w8, #1
	sub	w1, w9, #1
	bl	_find_chunk
	cbz	x0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x22, x0
	mov	w0, #4
	bl	_malloc
	mov	x21, x0
	add	x1, x22, #20
	bl	_map_copy
	mov	w0, #4
	bl	_malloc
	mov	x23, x0
	add	x1, x22, #16
	bl	_map_copy
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	x21, #0
	mov	x23, #0
LBB0_24:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x28, #40]
	lsl	x19, x24, #3
	ldr	x8, [x8, x19]
	str	x21, [x8]
	ldr	x8, [x28, #32]
	ldr	x8, [x8, x19]
	str	x23, [x8]
	mov	x22, x20
	cmp	x24, #1
	b.eq	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_21 Depth=1
	ldp	w8, w1, [x20]
	add	w8, w24, w8
	sub	w0, w8, #1
	bl	_find_chunk
	mov	x22, x0
	cbz	x0, LBB0_29
LBB0_26:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	w0, #4
	bl	_malloc
	mov	x21, x0
	add	x1, x22, #20
	bl	_map_copy
	mov	w0, #4
	bl	_malloc
	mov	x23, x0
	add	x1, x22, #16
	bl	_map_copy
LBB0_27:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x28, #40]
	ldr	x8, [x8, x19]
	str	x21, [x8, #8]
	ldr	x8, [x28, #32]
	ldr	x8, [x8, x19]
	str	x23, [x8, #8]
	ldp	w8, w9, [x20]
	add	w8, w24, w8
	sub	w0, w8, #1
	add	w1, w9, #1
	bl	_find_chunk
	cbnz	x0, LBB0_19
; %bb.28:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x21, #0
	mov	x23, #0
	b	LBB0_20
LBB0_29:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	x21, #0
	mov	x23, #0
	b	LBB0_27
LBB0_30:
	str	xzr, [x20, #8]
Lloh13:
	adrp	x8, _WORKER_BUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WORKER_BUSY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x28, #8]
	add	x0, x28, #4
	bl	_cnd_signal
LBB0_31:
	ldur	x8, [x29, #-96]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.32:
	ldp	x29, x30, [sp, #304]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #288]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #272]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #256]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #240]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #224]            ; 16-byte Folded Reload
	add	sp, sp, #320
	ret
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_g,8,3                          ; @g
	.comm	_WORKERS,4,2                    ; @WORKERS
	.comm	_MAX_CHUNKS,8,3                 ; @MAX_CHUNKS
	.comm	_WORKER_BUSY,4,2                ; @WORKER_BUSY
.subsections_via_symbols
