	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_work
_add_work:                              ## @add_work
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_grep_lock
	movq	_todo_end@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%ebx
	movq	_todo@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movq	_todo_done@GOTPCREL(%rip), %r14
	cmpl	(%r14), %edx
	jne	LBB0_3
## %bb.1:
	movq	_cond_write@GOTPCREL(%rip), %r12
	movq	_grep_mutex@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_pthread_cond_wait
	movq	_todo_end@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%ebx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	cmpl	(%r14), %edx
	je	LBB0_2
LBB0_3:
	movq	(%r15), %rax
	movq	_todo_end@GOTPCREL(%rip), %r14
	movslq	(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %edx
	movl	%edx, 16(%rax,%rcx,8)
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rcx
	movq	_GREP_BINARY_TEXT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.4:
	movslq	(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$16, %rdi
	movq	8(%rsi), %rax
	movl	(%rax), %esi
	callq	_grep_source_load_driver
	movq	(%r15), %rax
LBB0_5:
	movslq	(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rdi
	movq	$0, 8(%rax,%rcx,8)
	callq	_strbuf_reset
	movl	(%r14), %ebx
	incl	%ebx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%edx, (%r14)
	movq	_cond_add@GOTPCREL(%rip), %rdi
	callq	_pthread_cond_signal
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grep_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_todo_end,4,2                   ## @todo_end
	.comm	_todo,8,3                       ## @todo
	.comm	_todo_done,4,2                  ## @todo_done
	.comm	_cond_write,4,2                 ## @cond_write
	.comm	_grep_mutex,4,2                 ## @grep_mutex
	.comm	_GREP_BINARY_TEXT,8,3           ## @GREP_BINARY_TEXT
	.comm	_cond_add,4,2                   ## @cond_add
	.no_dead_strip	_add_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_work
_add_work:                              ; @add_work
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	bl	_grep_lock
Lloh0:
	adrp	x23, _todo_end@GOTPAGE
Lloh1:
	ldr	x23, [x23, _todo_end@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w21, w8, #1
Lloh2:
	adrp	x24, _todo@GOTPAGE
Lloh3:
	ldr	x24, [x24, _todo@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	sdiv	w8, w21, w0
	msub	w8, w8, w0, w21
Lloh4:
	adrp	x25, _todo_done@GOTPAGE
Lloh5:
	ldr	x25, [x25, _todo_done@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x21, _cond_write@GOTPAGE
Lloh7:
	ldr	x21, [x21, _cond_write@GOTPAGEOFF]
Lloh8:
	adrp	x22, _grep_mutex@GOTPAGE
Lloh9:
	ldr	x22, [x22, _grep_mutex@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_pthread_cond_wait
	ldr	w8, [x23]
	add	w26, w8, #1
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	sdiv	w8, w26, w0
	msub	w8, w8, w0, w26
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_2
LBB0_3:
	ldr	x8, [x24]
	ldrsw	x9, [x23]
	mov	w10, #24
	madd	x9, x9, x10, x8
	ldr	w10, [x20]
	str	w10, [x9, #16]
	ldr	x9, [x19]
Lloh10:
	adrp	x10, _GREP_BINARY_TEXT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _GREP_BINARY_TEXT@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.4:
	ldrsw	x9, [x23]
	mov	w10, #24
	madd	x8, x9, x10, x8
	add	x0, x8, #16
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	bl	_grep_source_load_driver
	ldr	x8, [x24]
LBB0_5:
	ldrsw	x9, [x23]
	mov	w10, #24
	madd	x0, x9, x10, x8
	str	xzr, [x0, #8]
	bl	_strbuf_reset
	ldr	w8, [x23]
	add	w19, w8, #1
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	sdiv	w8, w19, w0
	msub	w8, w8, w0, w19
	str	w8, [x23]
Lloh13:
	adrp	x0, _cond_add@GOTPAGE
Lloh14:
	ldr	x0, [x0, _cond_add@GOTPAGEOFF]
	bl	_pthread_cond_signal
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_grep_unlock
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_todo_end,4,2                   ; @todo_end
	.comm	_todo,8,3                       ; @todo
	.comm	_todo_done,4,2                  ; @todo_done
	.comm	_cond_write,4,2                 ; @cond_write
	.comm	_grep_mutex,4,2                 ; @grep_mutex
	.comm	_GREP_BINARY_TEXT,8,3           ; @GREP_BINARY_TEXT
	.comm	_cond_add,4,2                   ; @cond_add
	.no_dead_strip	_add_work
.subsections_via_symbols
