	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function postgresBeginForeignScan
_postgresBeginForeignScan:              ## @postgresBeginForeignScan
	.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	_EXEC_FLAG_EXPLAIN_ONLY@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_1
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	movq	16(%rdi), %r12
	movq	24(%rdi), %r15
	movl	$88, %edi
	callq	_palloc0
	movq	%rax, %rbx
	movq	%rax, 32(%r14)
	movl	4(%r15), %edi
	testl	%edi, %edi
	jg	LBB0_3
## %bb.2:
	movl	12(%r15), %edi
	movl	$-1, %esi
	callq	_bms_next_member
	movl	%eax, %edi
LBB0_3:
	movq	%r12, %rsi
	callq	_exec_rt_fetch
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	movq	8(%rax), %r13
	testq	%r13, %r13
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_GetUserId
	movq	%rax, %r13
LBB0_5:
	movl	(%r12), %edi
	callq	_GetForeignTable
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_GetUserMapping
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_GetConnection
	movl	%eax, 76(%rbx)
	movl	%eax, %edi
	callq	_GetCursorNumber
	movl	%eax, 80(%rbx)
	movl	$0, (%rbx)
	movl	8(%r15), %edi
	movq	_FdwScanPrivateSelectSql@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_list_nth
	movq	%rax, %rdi
	callq	_strVal
	movl	%eax, 72(%rbx)
	movl	8(%r15), %edi
	movq	_FdwScanPrivateRetrievedAttrs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_list_nth
	movq	%rax, 64(%rbx)
	movl	8(%r15), %edi
	movq	_FdwScanPrivateFetchSize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_list_nth
	movq	%rax, %rdi
	callq	_intVal
	movl	%eax, 56(%rbx)
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %edi
	movq	_ALLOCSET_DEFAULT_SIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_AllocSetContextCreate
	movq	%rax, 48(%rbx)
	movl	(%r12), %edi
	movq	_ALLOCSET_SMALL_SIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_AllocSetContextCreate
	movq	%rax, 40(%rbx)
	cmpl	$0, 4(%r15)
	jle	LBB0_7
## %bb.6:
	movq	8(%r14), %rdi
	movq	%rdi, 32(%rbx)
	callq	_RelationGetDescr
	movl	%eax, %edi
	jmp	LBB0_8
LBB0_7:
	movq	$0, 32(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
LBB0_8:
	movl	%edi, 20(%rbx)
	callq	_TupleDescGetAttInMetadata
	movl	%eax, 24(%rbx)
	movl	(%r15), %edi
	callq	_list_length
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	jle	LBB0_9
## %bb.10:
	movl	(%r15), %esi
	leaq	16(%rbx), %rcx
	leaq	12(%rbx), %r8
	addq	$8, %rbx
	movq	%r14, %rdi
	movl	%eax, %edx
	movq	%rbx, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_prepare_query_params           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EXEC_FLAG_EXPLAIN_ONLY,4,2     ## @EXEC_FLAG_EXPLAIN_ONLY
	.comm	_FdwScanPrivateSelectSql,4,2    ## @FdwScanPrivateSelectSql
	.comm	_FdwScanPrivateRetrievedAttrs,4,2 ## @FdwScanPrivateRetrievedAttrs
	.comm	_FdwScanPrivateFetchSize,4,2    ## @FdwScanPrivateFetchSize
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"postgres_fdw tuple data"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ## @ALLOCSET_DEFAULT_SIZES
L_.str.1:                               ## @.str.1
	.asciz	"postgres_fdw temporary data"

	.comm	_ALLOCSET_SMALL_SIZES,4,2       ## @ALLOCSET_SMALL_SIZES
	.no_dead_strip	_postgresBeginForeignScan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function postgresBeginForeignScan
_postgresBeginForeignScan:              ; @postgresBeginForeignScan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _EXEC_FLAG_EXPLAIN_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXEC_FLAG_EXPLAIN_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldp	x21, x24, [x0, #16]
	mov	w0, #88
	bl	_palloc0
	mov	x20, x0
	str	x0, [x19, #32]
	ldr	w0, [x24, #4]
	cmp	w0, #0
	b.gt	LBB0_4
; %bb.3:
	ldr	w0, [x24, #12]
	mov	w1, #-1
	bl	_bms_next_member
LBB0_4:
	mov	x1, x21
	bl	_exec_rt_fetch
	mov	x23, x0
	ldr	x22, [x0, #8]
	cbnz	x22, LBB0_6
; %bb.5:
	bl	_GetUserId
	mov	x22, x0
LBB0_6:
	ldr	w0, [x23]
	bl	_GetForeignTable
	ldr	w1, [x0]
	mov	x0, x22
	bl	_GetUserMapping
	mov	w1, #0
	bl	_GetConnection
	str	w0, [x20, #76]
	bl	_GetCursorNumber
	str	w0, [x20, #80]
	str	wzr, [x20]
	ldr	w0, [x24, #8]
Lloh3:
	adrp	x8, _FdwScanPrivateSelectSql@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FdwScanPrivateSelectSql@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_list_nth
	bl	_strVal
	str	w0, [x20, #72]
	ldr	w0, [x24, #8]
Lloh6:
	adrp	x8, _FdwScanPrivateRetrievedAttrs@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FdwScanPrivateRetrievedAttrs@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_list_nth
	str	x0, [x20, #64]
	ldr	w0, [x24, #8]
Lloh9:
	adrp	x8, _FdwScanPrivateFetchSize@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FdwScanPrivateFetchSize@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_list_nth
	bl	_intVal
	str	w0, [x20, #56]
	ldr	w0, [x21]
Lloh12:
	adrp	x8, _ALLOCSET_DEFAULT_SIZES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ALLOCSET_DEFAULT_SIZES@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_AllocSetContextCreate
	str	x0, [x20, #48]
	ldr	w0, [x21]
Lloh17:
	adrp	x8, _ALLOCSET_SMALL_SIZES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ALLOCSET_SMALL_SIZES@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_AllocSetContextCreate
	str	x0, [x20, #40]
	ldr	w8, [x24, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.7:
	ldr	x0, [x19, #8]
	str	x0, [x20, #32]
	bl	_RelationGetDescr
	b	LBB0_9
LBB0_8:
	str	xzr, [x20, #32]
	ldr	x8, [x19]
	ldr	w0, [x8]
LBB0_9:
	str	w0, [x20, #20]
	bl	_TupleDescGetAttInMetadata
	str	w0, [x20, #24]
	ldr	w0, [x24]
	bl	_list_length
	str	w0, [x20, #4]
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.10:
	mov	x2, x0
	ldr	w1, [x24]
	add	x3, x20, #16
	add	x4, x20, #12
	add	x5, x20, #8
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_prepare_query_params
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EXEC_FLAG_EXPLAIN_ONLY,4,2     ; @EXEC_FLAG_EXPLAIN_ONLY
	.comm	_FdwScanPrivateSelectSql,4,2    ; @FdwScanPrivateSelectSql
	.comm	_FdwScanPrivateRetrievedAttrs,4,2 ; @FdwScanPrivateRetrievedAttrs
	.comm	_FdwScanPrivateFetchSize,4,2    ; @FdwScanPrivateFetchSize
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"postgres_fdw tuple data"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ; @ALLOCSET_DEFAULT_SIZES
l_.str.1:                               ; @.str.1
	.asciz	"postgres_fdw temporary data"

	.comm	_ALLOCSET_SMALL_SIZES,4,2       ; @ALLOCSET_SMALL_SIZES
	.no_dead_strip	_postgresBeginForeignScan
.subsections_via_symbols
