	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lazy_truncate_heap
_lazy_truncate_heap:                    ## @lazy_truncate_heap
	.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, %r14
	movl	%edi, %r15d
	movq	(%rsi), %r13
	leaq	-44(%rbp), %rdi
	callq	_pg_rusage_init
	movq	_PROGRESS_VACUUM_PHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PROGRESS_VACUUM_PHASE_TRUNCATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pgstat_progress_update_param
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	$0, 16(%r14)
	movq	_AccessExclusiveLock@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%r15d, %edi
	callq	_ConditionalLockRelation
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$-1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	_VACUUM_TRUNCATE_LOCK_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cltd
	idivl	%ecx
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	imull	$1000, %ecx, %edi               ## imm = 0x3E8
	callq	_pg_usleep
	movl	(%r12), %esi
	movl	%r15d, %edi
	callq	_ConditionalLockRelation
	testq	%rax, %rax
	je	LBB0_3
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %edi
	callq	_RelationGetNumberOfBlocks
	cmpq	%r13, %rax
	jne	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_count_nondeletable_pages
	cmpq	%rax, %r13
	jle	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r12
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_RelationTruncate
	movq	_AccessExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_UnlockRelation
	movl	%r13d, %eax
	subl	%r12d, %eax
	addl	%eax, 20(%r14)
	movq	%r12, (%r14)
	movq	_elevel@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_RelationGetRelationName
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_errmsg
	leaq	-44(%rbp), %rdi
	callq	_pg_rusage_show
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_errdetail_internal
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	cmpq	8(%r14), %r12
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, 16(%r14)
	movq	%r12, %r13
	jne	LBB0_1
	jmp	LBB0_13
LBB0_4:
	movl	$1, 16(%r14)
	movq	_elevel@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r15d, %edi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_13
LBB0_7:
	movl	(%r12), %esi
	jmp	LBB0_8
LBB0_10:
	movq	_AccessExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_8:
	movl	%r15d, %edi
	callq	_UnlockRelation
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROGRESS_VACUUM_PHASE,4,2      ## @PROGRESS_VACUUM_PHASE
	.comm	_PROGRESS_VACUUM_PHASE_TRUNCATE,4,2 ## @PROGRESS_VACUUM_PHASE_TRUNCATE
	.comm	_AccessExclusiveLock,4,2        ## @AccessExclusiveLock
	.comm	_VACUUM_TRUNCATE_LOCK_TIMEOUT,4,2 ## @VACUUM_TRUNCATE_LOCK_TIMEOUT
	.comm	_VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL,4,2 ## @VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL
	.comm	_elevel,4,2                     ## @elevel
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\"%s\": stopping truncate due to conflicting lock request"

L_.str.1:                               ## @.str.1
	.asciz	"\"%s\": truncated %u to %u pages"

L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.no_dead_strip	_lazy_truncate_heap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lazy_truncate_heap
_lazy_truncate_heap:                    ; @lazy_truncate_heap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x22, [x1]
	add	x0, sp, #28
	bl	_pg_rusage_init
Lloh0:
	adrp	x8, _PROGRESS_VACUUM_PHASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROGRESS_VACUUM_PHASE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _PROGRESS_VACUUM_PHASE_TRUNCATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROGRESS_VACUUM_PHASE_TRUNCATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_pgstat_progress_update_param
Lloh6:
	adrp	x25, _AccessExclusiveLock@GOTPAGE
Lloh7:
	ldr	x25, [x25, _AccessExclusiveLock@GOTPAGEOFF]
Lloh8:
	adrp	x26, _VACUUM_TRUNCATE_LOCK_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x26, [x26, _VACUUM_TRUNCATE_LOCK_TIMEOUT@GOTPAGEOFF]
	mov	w28, #1000
Lloh10:
	adrp	x21, _VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL@GOTPAGE
Lloh11:
	ldr	x21, [x21, _VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL@GOTPAGEOFF]
Lloh12:
	adrp	x27, _elevel@GOTPAGE
Lloh13:
	ldr	x27, [x27, _elevel@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	str	wzr, [x20, #16]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_ConditionalLockRelation
	cbnz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w23, #-1
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w9, [x26]
	ldr	w8, [x21]
	sdiv	w9, w9, w8
	add	w23, w23, #1
	cmp	w23, w9
	b.ge	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	mul	w0, w8, w28
	bl	_pg_usleep
	ldr	w1, [x25]
	mov	x0, x19
	bl	_ConditionalLockRelation
	cbz	x0, LBB0_3
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_RelationGetNumberOfBlocks
	cmp	x0, x22
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_count_nondeletable_pages
	cmp	x22, x0
	b.le	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	bl	_RelationTruncate
	ldr	w1, [x25]
	mov	x0, x19
	bl	_UnlockRelation
	ldr	w8, [x20, #20]
	sub	w9, w22, w23
	add	w8, w8, w9
	str	w8, [x20, #20]
	str	x23, [x20]
	ldr	w24, [x27]
	mov	x0, x19
	bl	_RelationGetRelationName
	mov	x1, x0
	stp	x22, x23, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	add	x0, sp, #28
	bl	_pg_rusage_show
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errdetail_internal
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
	ldr	x8, [x20, #8]
	cmp	x23, x8
	b.le	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x20, #16]
	mov	x22, x23
	cbnz	w8, LBB0_1
	b	LBB0_11
LBB0_9:
	mov	w8, #1
	str	w8, [x20, #16]
	ldr	w20, [x27]
	mov	x0, x19
	bl	_RelationGetRelationName
	mov	x1, x0
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
	b	LBB0_11
LBB0_10:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_UnlockRelation
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PROGRESS_VACUUM_PHASE,4,2      ; @PROGRESS_VACUUM_PHASE
	.comm	_PROGRESS_VACUUM_PHASE_TRUNCATE,4,2 ; @PROGRESS_VACUUM_PHASE_TRUNCATE
	.comm	_AccessExclusiveLock,4,2        ; @AccessExclusiveLock
	.comm	_VACUUM_TRUNCATE_LOCK_TIMEOUT,4,2 ; @VACUUM_TRUNCATE_LOCK_TIMEOUT
	.comm	_VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL,4,2 ; @VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL
	.comm	_elevel,4,2                     ; @elevel
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\"%s\": stopping truncate due to conflicting lock request"

l_.str.1:                               ; @.str.1
	.asciz	"\"%s\": truncated %u to %u pages"

l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.no_dead_strip	_lazy_truncate_heap
.subsections_via_symbols
