	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_check_workers                  ## -- Begin function check_workers
	.p2align	4, 0x90
_check_workers:                         ## @check_workers
	.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	_WORKERS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_23
## %bb.1:
	xorl	%ebx, %ebx
	movq	_g@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_WORKER_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	_g@GOTPCREL(%rip), %r12
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_mtx_unlock
	incq	%rbx
	movq	_WORKERS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_23
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	(%r12), %rax
	movq	(%rax), %r13
	leaq	(%rbx,%rbx,2), %r14
	shlq	$4, %r14
	leaq	(%r14,%r13), %r15
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mtx_lock
	movq	(%r13,%r14), %rax
	movq	_WORKER_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r13), %r12
	addq	$16, %r12
	movl	32(%r13,%r14), %esi
	movl	36(%r13,%r14), %edi
	callq	_find_chunk
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	cmpq	$0, 40(%r13,%r14)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%r13), %rax
	addq	$36, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r13,%r14), %rax
	movq	8(%rax), %rax
	movq	8(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	8(%rax), %rax
	movq	8(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_map_free
	movq	%rbx, %rdi
	callq	_map_free
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_map_copy
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_map_copy
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	-4(%rax), %esi
	callq	_request_chunk
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_generate_chunk
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	%r14, %r13
	addq	$24, %r13
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=2
	incq	%r14
	cmpq	$3, %r14
	je	LBB0_21
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %rbx
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %r15
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	%rbx, %rdi
	callq	_map_free
	movq	%rbx, %rdi
	callq	_free
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	testq	%r15, %r15
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%r15, %rdi
	callq	_map_free
	movq	%r15, %rdi
	callq	_free
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	(%r13), %rax
	movq	(%rax,%r14,8), %rax
	movq	8(%rax), %rbx
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rax
	movq	8(%rax), %r15
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%rbx, %rdi
	callq	_map_free
	movq	%rbx, %rdi
	callq	_free
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=2
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%r15, %rdi
	callq	_map_free
	movq	%r15, %rdi
	callq	_free
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	(%r13), %rax
	movq	(%rax,%r14,8), %rax
	movq	16(%rax), %rbx
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rax
	movq	16(%rax), %r15
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%rbx, %rdi
	callq	_map_free
	movq	%rbx, %rdi
	callq	_free
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=2
	testq	%r15, %r15
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%r15, %rdi
	callq	_map_free
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_20
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WORKERS,4,2                    ## @WORKERS
	.comm	_g,8,3                          ## @g
	.comm	_WORKER_DONE,8,3                ## @WORKER_DONE
	.comm	_WORKER_IDLE,8,3                ## @WORKER_IDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_check_workers                  ; -- Begin function check_workers
	.p2align	2
_check_workers:                         ; @check_workers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x20, _WORKERS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WORKERS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.1:
	mov	x26, #0
Lloh2:
	adrp	x21, _g@GOTPAGE
Lloh3:
	ldr	x21, [x21, _g@GOTPAGEOFF]
	mov	w22, #48
Lloh4:
	adrp	x23, _WORKER_DONE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _WORKER_DONE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x8, _WORKER_IDLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WORKER_IDLE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x27]
Lloh9:
	adrp	x20, _WORKERS@GOTPAGE
Lloh10:
	ldr	x20, [x20, _WORKERS@GOTPAGEOFF]
Lloh11:
	adrp	x21, _g@GOTPAGE
Lloh12:
	ldr	x21, [x21, _g@GOTPAGEOFF]
	mov	w22, #48
Lloh13:
	adrp	x23, _WORKER_DONE@GOTPAGE
Lloh14:
	ldr	x23, [x23, _WORKER_DONE@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_mtx_unlock
	add	x26, x26, #1
	ldrsw	x8, [x20]
	cmp	x26, x8
	b.ge	LBB0_23
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	x8, [x21]
	ldr	x25, [x8]
	madd	x27, x26, x22, x25
	add	x19, x27, #8
	mov	x0, x19
	bl	_mtx_lock
	ldr	x8, [x27]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x28, x26, x22, x25
	ldr	w1, [x28, #32]!
	sub	x20, x28, #16
	mov	x23, x28
	ldr	w0, [x23, #4]!
	bl	_find_chunk
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	madd	x8, x26, x22, x25
	ldr	x8, [x8, #40]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x26, x22, x25
	ldr	x8, [x8, #24]
	ldr	x8, [x8, #8]
	ldr	x22, [x8, #8]
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x24, x21, #4
	mov	x0, x24
	bl	_map_free
	mov	x0, x21
	bl	_map_free
	mov	x0, x24
	mov	x1, x22
	mov	w22, #48
	bl	_map_copy
	mov	x0, x21
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_map_copy
	ldr	w0, [x23]
	ldr	w1, [x28]
	bl	_request_chunk
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_generate_chunk
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
	madd	x8, x26, x22, x25
	add	x24, x8, #24
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x23, x23, #8
	cmp	x23, #24
	b.eq	LBB0_2
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24]
	ldr	x8, [x8, x23]
	ldr	x22, [x8]
	ldr	x8, [x20]
	ldr	x8, [x8, x23]
	ldr	x21, [x8]
	cbz	x22, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x22
	bl	_map_free
	mov	x0, x22
	bl	_free
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=2
	cbz	x21, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x21
	bl	_map_free
	mov	x0, x21
	bl	_free
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x24]
	ldr	x8, [x8, x23]
	ldr	x22, [x8, #8]
	ldr	x8, [x20]
	ldr	x8, [x8, x23]
	ldr	x21, [x8, #8]
	cbz	x22, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x22
	bl	_map_free
	mov	x0, x22
	bl	_free
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=2
	cbz	x21, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x21
	bl	_map_free
	mov	x0, x21
	bl	_free
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x24]
	ldr	x8, [x8, x23]
	ldr	x22, [x8, #16]
	ldr	x8, [x20]
	ldr	x8, [x8, x23]
	ldr	x21, [x8, #16]
	cbz	x22, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x22
	bl	_map_free
	mov	x0, x22
	bl	_free
LBB0_21:                                ;   in Loop: Header=BB0_11 Depth=2
	cbz	x21, LBB0_10
; %bb.22:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x21
	bl	_map_free
	mov	x0, x21
	bl	_free
	b	LBB0_10
LBB0_23:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WORKERS,4,2                    ; @WORKERS
	.comm	_g,8,3                          ; @g
	.comm	_WORKER_DONE,8,3                ; @WORKER_DONE
	.comm	_WORKER_IDLE,8,3                ; @WORKER_IDLE
.subsections_via_symbols
