	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function restore_toc_entries_prefork
_restore_toc_entries_prefork:           ## @restore_toc_entries_prefork
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_pg_log_debug
	movq	%r15, %rdi
	callq	_fix_dependencies
	movq	_RESTORE_PASS_MAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r15)
	movq	40(%r15), %rax
	movq	24(%rax), %rbx
	cmpq	%rax, %rbx
	je	LBB0_12
## %bb.1:
	xorl	%eax, %eax
	movq	_SECTION_PRE_DATA@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_pending_list_append
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rbx
	movl	%r14d, %eax
	cmpq	40(%r15), %rbx
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rcx
	movl	$1, %r13d
	cmpq	(%r12), %rcx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	movl	$1, %r14d
	movq	_SECTION_DATA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SECTION_POST_DATA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	testl	%eax, %eax
	sete	%r13b
	setne	%r14b
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	__tocEntryRestorePass
	movq	_RESTORE_PASS_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%rbx), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_pg_log_info
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_restore_toc_entry
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_reduce_dependencies
	jmp	LBB0_11
LBB0_12:
	leaq	32(%r15), %rdi
	callq	_DisconnectDatabase
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_free
LBB0_14:
	movq	$0, 24(%r15)
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_free
LBB0_16:
	movq	$0, 16(%r15)
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_free
LBB0_18:
	movq	$0, 8(%r15)
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_free
LBB0_20:
	movq	$0, (%r15)
	addq	$8, %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_prefork"

	.comm	_RESTORE_PASS_MAIN,8,3          ## @RESTORE_PASS_MAIN
	.comm	_SECTION_PRE_DATA,8,3           ## @SECTION_PRE_DATA
	.comm	_SECTION_DATA,8,3               ## @SECTION_DATA
	.comm	_SECTION_POST_DATA,8,3          ## @SECTION_POST_DATA
L_.str.1:                               ## @.str.1
	.asciz	"processing item %d %s %s"

	.no_dead_strip	_restore_toc_entries_prefork
.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_prefork
_restore_toc_entries_prefork:           ; @restore_toc_entries_prefork
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_debug
	mov	x0, x19
	bl	_fix_dependencies
Lloh2:
	adrp	x23, _RESTORE_PASS_MAIN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RESTORE_PASS_MAIN@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x19, #48]
	ldr	x8, [x19, #40]
	ldr	x21, [x8, #24]
	cmp	x21, x8
	b.eq	LBB0_9
; %bb.1:
	mov	w25, #0
Lloh4:
	adrp	x24, _SECTION_PRE_DATA@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SECTION_PRE_DATA@GOTPAGEOFF]
	mov	w27, #1
Lloh6:
	adrp	x28, _SECTION_POST_DATA@GOTPAGE
Lloh7:
	ldr	x28, [x28, _SECTION_POST_DATA@GOTPAGEOFF]
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_pending_list_append
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x21, #24]
	ldr	x8, [x19, #40]
	cmp	x21, x8
	b.eq	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x9, _SECTION_DATA@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SECTION_DATA@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	x10, [x28]
	cmp	w25, #0
	cset	w11, ne
	cset	w12, eq
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	csel	w25, w27, w11, eq
	csel	w26, wzr, w12, eq
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	__tocEntryRestorePass
	ldr	x8, [x23]
	cmp	x0, x8
	ccmp	w26, #0, #4, eq
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	w2, w1, [x21, #12]
	ldr	w3, [x21, #8]
	mov	x0, x22
	bl	_pg_log_info
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_restore_toc_entry
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_reduce_dependencies
	b	LBB0_3
LBB0_9:
	add	x0, x19, #32
	bl	_DisconnectDatabase
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_free
LBB0_11:
	str	xzr, [x19, #24]
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_free
LBB0_13:
	str	xzr, [x19, #16]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_free
LBB0_15:
	str	xzr, [x19, #8]
	ldr	x0, [x19]
	cbz	x0, LBB0_17
; %bb.16:
	bl	_free
LBB0_17:
	str	xzr, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering restore_toc_entries_prefork"

	.comm	_RESTORE_PASS_MAIN,8,3          ; @RESTORE_PASS_MAIN
	.comm	_SECTION_PRE_DATA,8,3           ; @SECTION_PRE_DATA
	.comm	_SECTION_DATA,8,3               ; @SECTION_DATA
	.comm	_SECTION_POST_DATA,8,3          ; @SECTION_POST_DATA
l_.str.1:                               ; @.str.1
	.asciz	"processing item %d %s %s"

	.no_dead_strip	_restore_toc_entries_prefork
.subsections_via_symbols
