	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function restore_toc_entries_parallel
_restore_toc_entries_parallel:          ## @restore_toc_entries_parallel
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_pg_log_debug
	movl	4(%rbx), %esi
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	callq	_ready_list_init
	movq	_RESTORE_PASS_MAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, (%rbx)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_move_to_ready_list
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_info
	movq	_REQ_DATA@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_WaitForWorkers
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_pop_next_work_item
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %eax
	movq	_REQ_SCHEMA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	12(%r14), %esi
	movl	4(%r14), %ecx
	movl	8(%r14), %edx
	testl	%eax, (%r14)
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_info
	movq	_ACT_RESTORE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mark_restore_job_done@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r12, %r9
	callq	_DispatchJobForTocEntry
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_IsEveryWorkerIdle
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edx
	movq	_RESTORE_PASS_LAST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%edx
	movl	%edx, (%rbx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_move_to_ready_list
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_WFW_ONE_IDLE@GOTPCREL(%rip), %rax
	testq	%r14, %r14
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_WFW_GOT_STATUS@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_info
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_reduce_dependencies
	jmp	LBB0_1
LBB0_11:
	movq	-64(%rbp), %rax
	xorl	%edi, %edi
	cmpq	-56(%rbp), %rax
	setg	%dil
	callq	_Assert
	leaq	-64(%rbp), %rdi
	callq	_ready_list_free
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_info
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entering restore_toc_entries_parallel"

	.comm	_RESTORE_PASS_MAIN,4,2          ## @RESTORE_PASS_MAIN
L_.str.1:                               ## @.str.1
	.asciz	"entering main parallel loop"

	.comm	_REQ_SCHEMA,4,2                 ## @REQ_SCHEMA
	.comm	_REQ_DATA,4,2                   ## @REQ_DATA
L_.str.2:                               ## @.str.2
	.asciz	"skipping item %d %s %s"

L_.str.3:                               ## @.str.3
	.asciz	"launching item %d %s %s"

	.comm	_ACT_RESTORE,4,2                ## @ACT_RESTORE
	.comm	_mark_restore_job_done,4,2      ## @mark_restore_job_done
	.comm	_RESTORE_PASS_LAST,4,2          ## @RESTORE_PASS_LAST
	.comm	_WFW_ONE_IDLE,4,2               ## @WFW_ONE_IDLE
	.comm	_WFW_GOT_STATUS,4,2             ## @WFW_GOT_STATUS
L_.str.4:                               ## @.str.4
	.asciz	"finished main parallel loop"

	.no_dead_strip	_restore_toc_entries_parallel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function restore_toc_entries_parallel
_restore_toc_entries_parallel:          ; @restore_toc_entries_parallel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_debug
	ldr	w1, [x21, #4]
	add	x0, sp, #32
	bl	_ready_list_init
Lloh2:
	adrp	x8, _RESTORE_PASS_MAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RESTORE_PASS_MAIN@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	str	w2, [x21]
	add	x1, sp, #32
	mov	x22, x19
	mov	x0, x19
	bl	_move_to_ready_list
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pg_log_info
Lloh7:
	adrp	x26, _WFW_ONE_IDLE@GOTPAGE
Lloh8:
	ldr	x26, [x26, _WFW_ONE_IDLE@GOTPAGEOFF]
Lloh9:
	adrp	x27, _WFW_GOT_STATUS@GOTPAGE
Lloh10:
	ldr	x27, [x27, _WFW_GOT_STATUS@GOTPAGEOFF]
Lloh11:
	adrp	x28, _REQ_SCHEMA@GOTPAGE
Lloh12:
	ldr	x28, [x28, _REQ_SCHEMA@GOTPAGEOFF]
Lloh13:
	adrp	x25, _REQ_DATA@GOTPAGE
Lloh14:
	ldr	x25, [x25, _REQ_DATA@GOTPAGEOFF]
Lloh15:
	adrp	x23, l_.str.3@PAGE
Lloh16:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh17:
	adrp	x19, _mark_restore_job_done@GOTPAGE
Lloh18:
	ldr	x19, [x19, _mark_restore_job_done@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pg_log_info
	add	x2, sp, #32
	mov	x0, x21
	mov	x1, x24
	bl	_reduce_dependencies
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #32
	mov	x0, x21
	mov	x2, x20
	bl	_pop_next_work_item
	mov	x24, x0
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	ldr	w9, [x25]
	orr	w11, w9, w8
	ldp	w9, w8, [x24, #8]
	ldp	w12, w10, [x24]
	tst	w11, w12
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
	mov	x0, x23
	bl	_pg_log_info
Lloh21:
	adrp	x8, _ACT_RESTORE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ACT_RESTORE@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	ldr	w4, [x19]
	add	x5, sp, #32
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	bl	_DispatchJobForTocEntry
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_IsEveryWorkerIdle
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x21]
Lloh24:
	adrp	x9, _RESTORE_PASS_LAST@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RESTORE_PASS_LAST@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w2, w8, #1
	str	w2, [x21]
	add	x1, sp, #32
	mov	x0, x22
	bl	_move_to_ready_list
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	x24, #0
	csel	x8, x27, x26, eq
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_WaitForWorkers
	b	LBB0_2
LBB0_9:
	ldp	x8, x9, [sp, #32]
	cmp	x8, x9
	cset	w0, gt
	bl	_Assert
	add	x0, sp, #32
	bl	_ready_list_free
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pg_log_info
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering restore_toc_entries_parallel"

	.comm	_RESTORE_PASS_MAIN,4,2          ; @RESTORE_PASS_MAIN
l_.str.1:                               ; @.str.1
	.asciz	"entering main parallel loop"

	.comm	_REQ_SCHEMA,4,2                 ; @REQ_SCHEMA
	.comm	_REQ_DATA,4,2                   ; @REQ_DATA
l_.str.2:                               ; @.str.2
	.asciz	"skipping item %d %s %s"

l_.str.3:                               ; @.str.3
	.asciz	"launching item %d %s %s"

	.comm	_ACT_RESTORE,4,2                ; @ACT_RESTORE
	.comm	_mark_restore_job_done,4,2      ; @mark_restore_job_done
	.comm	_RESTORE_PASS_LAST,4,2          ; @RESTORE_PASS_LAST
	.comm	_WFW_ONE_IDLE,4,2               ; @WFW_ONE_IDLE
	.comm	_WFW_GOT_STATUS,4,2             ; @WFW_GOT_STATUS
l_.str.4:                               ; @.str.4
	.asciz	"finished main parallel loop"

	.no_dead_strip	_restore_toc_entries_parallel
.subsections_via_symbols
