	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_beginscan                 ## -- Begin function heap_beginscan
	.p2align	4, 0x90
_heap_beginscan:                        ## @heap_beginscan
	.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
	movl	%r9d, %r14d
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r13
	movl	%edi, %r12d
	callq	_RelationIncrementReferenceCount
	movl	$4, %edi
	callq	_palloc
	movq	%rax, %rbx
	movl	%r12d, 32(%rax)
	movq	%r13, 24(%rax)
	movl	%r15d, (%rax)
	movl	%r14d, 4(%rax)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%rbx)
	movq	$0, 48(%rbx)
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_IsMVCCSnapshot
	movl	4(%rbx), %r14d
	testq	%rax, %rax
	jne	LBB0_3
LBB0_2:
	movq	_SO_ALLOW_PAGEMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	movl	%r14d, 4(%rbx)
LBB0_3:
	movq	_SO_TYPE_SEQSCAN@GOTPCREL(%rip), %rax
	movq	_SO_TYPE_SAMPLESCAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r14d, %ecx
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_Assert
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_PredicateLockRelation
LBB0_5:
	movl	%r12d, %edi
	callq	_RelationGetRelid
	movl	%eax, 40(%rbx)
	testl	%r15d, %r15d
	jle	LBB0_6
## %bb.7:
	shll	$2, %r15d
	movl	%r15d, %edi
	callq	_palloc
	jmp	LBB0_8
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_initscan
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SO_ALLOW_PAGEMODE,4,2          ## @SO_ALLOW_PAGEMODE
	.comm	_SO_TYPE_SEQSCAN,4,2            ## @SO_TYPE_SEQSCAN
	.comm	_SO_TYPE_SAMPLESCAN,4,2         ## @SO_TYPE_SAMPLESCAN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_beginscan                 ; -- Begin function heap_beginscan
	.p2align	2
_heap_beginscan:                        ; @heap_beginscan
	.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	x24, x5
	mov	x25, x4
	mov	x19, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	bl	_RelationIncrementReferenceCount
	mov	w0, #4
	bl	_palloc
	mov	x20, x0
	str	w22, [x0, #32]
	str	x23, [x0, #24]
	stp	w21, w24, [x0]
	str	w25, [x0, #16]
	str	xzr, [x0, #48]
	cbz	x23, LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_IsMVCCSnapshot
	ldr	w24, [x20, #4]
	cbnz	x0, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _SO_ALLOW_PAGEMODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SO_ALLOW_PAGEMODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w24, w24, w8
	str	w24, [x20, #4]
LBB0_3:
Lloh3:
	adrp	x8, _SO_TYPE_SEQSCAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SO_TYPE_SEQSCAN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SO_TYPE_SAMPLESCAN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SO_TYPE_SAMPLESCAN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w24
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_Assert
	mov	x0, x22
	mov	x1, x23
	bl	_PredicateLockRelation
LBB0_5:
	mov	x0, x22
	bl	_RelationGetRelid
	str	w0, [x20, #40]
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.6:
	lsl	w0, w21, #2
	bl	_palloc
	b	LBB0_8
LBB0_7:
	mov	x0, #0
LBB0_8:
	str	x0, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_initscan
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SO_ALLOW_PAGEMODE,4,2          ; @SO_ALLOW_PAGEMODE
	.comm	_SO_TYPE_SEQSCAN,4,2            ; @SO_TYPE_SEQSCAN
	.comm	_SO_TYPE_SAMPLESCAN,4,2         ; @SO_TYPE_SAMPLESCAN
.subsections_via_symbols
