	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function work_done
_work_done:                             ## @work_done
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_grep_lock
	movl	$1, (%rbx)
	movq	_todo_done@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	movq	_todo@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	leaq	(%rdx,%rdx,2), %rax
	cmpl	$0, (%rbx,%rax,8)
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_15
## %bb.1:
	movq	_todo_start@GOTPCREL(%rip), %rcx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.2:
	movq	_skip_first_line@GOTPCREL(%rip), %r15
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	leaq	(%rdx,%rdx,2), %r13
	movq	8(%rbx,%r13,8), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx,%r13,8), %rsi
	cmpq	$0, (%r15)
	je	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	-1(%rax), %rdx
	cmpb	$10, (%rsi)
	leaq	1(%rsi), %rsi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpq	$1, %rax
	movq	%rdx, %rax
	jne	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%r15)
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdx
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_write_or_die
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rbx,%r13,8), %rdi
	addq	$4, %rdi
	callq	_grep_source_clear
	movq	(%r14), %rbx
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	movq	%rax, %rcx
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, (%r14)
	movq	(%r12), %rbx
	leaq	(%rdx,%rdx,2), %rax
	cmpl	$0, (%rbx,%rax,8)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_todo_start@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_3
LBB0_15:
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	cmpq	%rdx, %rax
	je	LBB0_17
## %bb.16:
	movq	_cond_write@GOTPCREL(%rip), %rdi
	callq	_pthread_cond_signal
LBB0_17:
	movq	_all_work_added@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.18:
	movq	(%r14), %rax
	movq	_todo_end@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.19:
	movq	_cond_result@GOTPCREL(%rip), %rdi
	callq	_pthread_cond_signal
LBB0_20:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grep_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_todo_done,8,3                  ## @todo_done
	.comm	_todo,8,3                       ## @todo
	.comm	_todo_start,8,3                 ## @todo_start
	.comm	_skip_first_line,8,3            ## @skip_first_line
	.comm	_cond_write,4,2                 ## @cond_write
	.comm	_all_work_added,8,3             ## @all_work_added
	.comm	_todo_end,8,3                   ## @todo_end
	.comm	_cond_result,4,2                ## @cond_result
	.no_dead_strip	_work_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function work_done
_work_done:                             ; @work_done
	.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	x19, x0
	bl	_grep_lock
	mov	w8, #1
	str	w8, [x19]
Lloh0:
	adrp	x19, _todo_done@GOTPAGE
Lloh1:
	ldr	x19, [x19, _todo_done@GOTPAGEOFF]
Lloh2:
	adrp	x21, _todo@GOTPAGE
Lloh3:
	ldr	x21, [x21, _todo@GOTPAGEOFF]
	ldr	x20, [x19]
	ldr	x25, [x21]
	mov	w8, #24
	mul	x8, x20, x8
	ldr	w8, [x25, x8]
Lloh4:
	adrp	x22, _todo_start@GOTPAGE
Lloh5:
	ldr	x22, [x22, _todo_start@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	w8, #0
	ccmp	x20, x9, #4, ne
	mov	x26, x20
	b.ne	LBB0_7
LBB0_1:
	cmp	x26, w20, sxtw
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, _cond_write@GOTPAGE
Lloh7:
	ldr	x0, [x0, _cond_write@GOTPAGEOFF]
	bl	_pthread_cond_signal
LBB0_3:
Lloh8:
	adrp	x8, _all_work_added@GOTPAGE
Lloh9:
	ldr	x8, [x8, _all_work_added@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _todo_end@GOTPAGE
Lloh12:
	ldr	x9, [x9, _todo_end@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, _cond_result@GOTPAGE
Lloh15:
	ldr	x0, [x0, _cond_result@GOTPAGEOFF]
	bl	_pthread_cond_signal
LBB0_6:
	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
LBB0_7:
	mov	w23, #24
Lloh16:
	adrp	x24, _skip_first_line@GOTPAGE
Lloh17:
	ldr	x24, [x24, _skip_first_line@GOTPAGEOFF]
	mov	x26, x20
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #1
	bl	_write_or_die
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	madd	x8, x26, x23, x25
	add	x0, x8, #4
	bl	_grep_source_clear
	ldr	x8, [x19]
	add	x25, x8, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	udiv	x8, x25, x0
	msub	x26, x8, x0, x25
	str	x26, [x19]
	ldr	x25, [x21]
	mul	x8, x26, x23
	ldr	w8, [x25, x8]
	ldr	x9, [x22]
	cmp	w8, #0
	ccmp	x26, x9, #4, ne
	b.eq	LBB0_1
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	madd	x8, x26, x23, x25
	ldr	x2, [x8, #8]
	cbz	x2, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	madd	x8, x26, x23, x25
	ldr	x1, [x8, #16]
	ldr	x8, [x24]
	cbz	x8, LBB0_8
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w8, [x1], #1
	cmp	w8, #10
	ccmp	x2, #1, #4, ne
	sub	x2, x2, #1
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	str	xzr, [x24]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_todo_done,8,3                  ; @todo_done
	.comm	_todo,8,3                       ; @todo
	.comm	_todo_start,8,3                 ; @todo_start
	.comm	_skip_first_line,8,3            ; @skip_first_line
	.comm	_cond_write,4,2                 ; @cond_write
	.comm	_all_work_added,8,3             ; @all_work_added
	.comm	_todo_end,8,3                   ; @todo_end
	.comm	_cond_result,4,2                ; @cond_result
	.no_dead_strip	_work_done
.subsections_via_symbols
