	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateForeignTable             ## -- Begin function CreateForeignTable
	.p2align	4, 0x90
_CreateForeignTable:                    ## @CreateForeignTable
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_Natts_pg_foreign_table@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rbx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_CommandCounterIncrement
	movq	_ForeignTableRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_table_open
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%eax, %ebx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_GetForeignServerByName
	movq	%rax, %r14
	movl	(%rax), %edi
	movq	_ACL_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_pg_foreign_server_aclcheck
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_OBJECT_FOREIGN_SERVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	8(%r14), %edx
	movq	%rax, %rdi
	callq	_aclcheck_error
LBB0_2:
	movl	4(%r14), %edi
	callq	_GetForeignDataWrapper
	movq	%rax, %r13
	leal	(,%r12,4), %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_ObjectIdGetDatum
	movq	_Anum_pg_foreign_table_ftrelid@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movl	%eax, -4(%r15,%rcx,4)
	movl	(%r14), %edi
	callq	_ObjectIdGetDatum
	movq	_Anum_pg_foreign_table_ftserver@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movl	%eax, -4(%r15,%rcx,4)
	movq	_ForeignTableRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_PointerGetDatum
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	movl	(%r13), %ecx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_transformGenericOptions
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_DatumGetPointer
	movl	%eax, %edi
	callq	_PointerIsValid
	testq	%rax, %rax
	movq	_Anum_pg_foreign_table_ftoptions@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%r15, %rcx
	cmoveq	%r12, %rcx
	movl	$1, %edx
	cmovnel	%ebx, %edx
	movl	%edx, -4(%rcx,%rax,4)
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_heap_form_tuple
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_CatalogTupleInsert
	movl	%ebx, %edi
	callq	_heap_freetuple
	movq	_RelationRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -104(%rbp)
	movq	$0, -112(%rbp)
	movq	_ForeignServerRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	(%r14), %eax
	movl	%eax, -88(%rbp)
	movq	$0, -96(%rbp)
	movq	_DEPENDENCY_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-112(%rbp), %rdi
	leaq	-96(%rbp), %rsi
	callq	_recordDependencyOn
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_table_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_Natts_pg_foreign_table,4,2     ## @Natts_pg_foreign_table
	.comm	_ForeignTableRelationId,4,2     ## @ForeignTableRelationId
	.comm	_RowExclusiveLock,4,2           ## @RowExclusiveLock
	.comm	_ACL_USAGE,4,2                  ## @ACL_USAGE
	.comm	_ACLCHECK_OK,8,3                ## @ACLCHECK_OK
	.comm	_OBJECT_FOREIGN_SERVER,4,2      ## @OBJECT_FOREIGN_SERVER
	.comm	_Anum_pg_foreign_table_ftrelid,4,2 ## @Anum_pg_foreign_table_ftrelid
	.comm	_Anum_pg_foreign_table_ftserver,4,2 ## @Anum_pg_foreign_table_ftserver
	.comm	_Anum_pg_foreign_table_ftoptions,4,2 ## @Anum_pg_foreign_table_ftoptions
	.comm	_RelationRelationId,4,2         ## @RelationRelationId
	.comm	_ForeignServerRelationId,4,2    ## @ForeignServerRelationId
	.comm	_DEPENDENCY_NORMAL,4,2          ## @DEPENDENCY_NORMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateForeignTable             ; -- Begin function CreateForeignTable
	.p2align	2
_CreateForeignTable:                    ; @CreateForeignTable
	.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
	sub	sp, sp, #48
	mov	x19, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _Natts_pg_foreign_table@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Natts_pg_foreign_table@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	lsl	x8, x26, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x12
	mov	sp, x22
	bl	_CommandCounterIncrement
Lloh10:
	adrp	x28, _ForeignTableRelationId@GOTPAGE
Lloh11:
	ldr	x28, [x28, _ForeignTableRelationId@GOTPAGEOFF]
	ldr	w0, [x28]
Lloh12:
	adrp	x27, _RowExclusiveLock@GOTPAGE
Lloh13:
	ldr	x27, [x27, _RowExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_table_open
	mov	x20, x0
	bl	_GetUserId
	mov	x25, x0
	ldr	w0, [x24, #4]
	mov	w1, #0
	bl	_GetForeignServerByName
	mov	x23, x0
	ldr	w0, [x0]
Lloh14:
	adrp	x8, _ACL_USAGE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ACL_USAGE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x1, x25
	bl	_pg_foreign_server_aclcheck
Lloh17:
	adrp	x8, _ACLCHECK_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ACLCHECK_OK@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
Lloh20:
	adrp	x8, _OBJECT_FOREIGN_SERVER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OBJECT_FOREIGN_SERVER@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w2, [x23, #8]
	bl	_aclcheck_error
LBB0_2:
	ldr	w0, [x23, #4]
	bl	_GetForeignDataWrapper
	mov	x25, x0
	lsl	w26, w26, #2
	mov	x0, x21
	mov	w1, #0
	mov	x2, x26
	bl	_memset
	mov	x0, x22
	mov	w1, #0
	mov	x2, x26
	bl	_memset
	mov	x0, x19
	bl	_ObjectIdGetDatum
Lloh23:
	adrp	x8, _Anum_pg_foreign_table_ftrelid@GOTPAGE
Lloh24:
	ldr	x8, [x8, _Anum_pg_foreign_table_ftrelid@GOTPAGEOFF]
Lloh25:
	ldrsw	x8, [x8]
	add	x8, x21, x8, lsl #2
	stur	w0, [x8, #-4]
	ldr	w0, [x23]
	bl	_ObjectIdGetDatum
Lloh26:
	adrp	x8, _Anum_pg_foreign_table_ftserver@GOTPAGE
Lloh27:
	ldr	x8, [x8, _Anum_pg_foreign_table_ftserver@GOTPAGEOFF]
Lloh28:
	ldrsw	x8, [x8]
	add	x8, x21, x8, lsl #2
	stur	w0, [x8, #-4]
	ldr	w26, [x28]
	mov	x0, #0
	bl	_PointerGetDatum
	mov	x1, x0
	ldr	w2, [x24]
	ldr	w3, [x25]
	mov	x0, x26
	bl	_transformGenericOptions
	mov	x24, x0
	bl	_DatumGetPointer
	bl	_PointerIsValid
Lloh29:
	adrp	x8, _Anum_pg_foreign_table_ftoptions@GOTPAGE
Lloh30:
	ldr	x8, [x8, _Anum_pg_foreign_table_ftoptions@GOTPAGEOFF]
Lloh31:
	ldrsw	x8, [x8]
	cmp	x0, #0
	csel	x9, x22, x21, eq
	csinc	w10, w24, wzr, ne
	add	x8, x9, x8, lsl #2
	stur	w10, [x8, #-4]
	ldr	w0, [x20]
	mov	x1, x21
	mov	x2, x22
	bl	_heap_form_tuple
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_CatalogTupleInsert
	mov	x0, x21
	bl	_heap_freetuple
Lloh32:
	adrp	x8, _RelationRelationId@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RelationRelationId@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	stp	w19, w8, [x29, #-96]
	stur	xzr, [x29, #-104]
Lloh35:
	adrp	x8, _ForeignServerRelationId@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ForeignServerRelationId@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	stur	w8, [x29, #-108]
	ldr	w8, [x23]
	stur	w8, [x29, #-112]
	stur	xzr, [x29, #-120]
Lloh38:
	adrp	x8, _DEPENDENCY_NORMAL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DEPENDENCY_NORMAL@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	sub	x0, x29, #104
	sub	x1, x29, #120
	bl	_recordDependencyOn
	ldr	w1, [x27]
	mov	x0, x20
	bl	_table_close
	ldur	x8, [x29, #-88]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	sub	sp, x29, #80
	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
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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 AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_Natts_pg_foreign_table,4,2     ; @Natts_pg_foreign_table
	.comm	_ForeignTableRelationId,4,2     ; @ForeignTableRelationId
	.comm	_RowExclusiveLock,4,2           ; @RowExclusiveLock
	.comm	_ACL_USAGE,4,2                  ; @ACL_USAGE
	.comm	_ACLCHECK_OK,8,3                ; @ACLCHECK_OK
	.comm	_OBJECT_FOREIGN_SERVER,4,2      ; @OBJECT_FOREIGN_SERVER
	.comm	_Anum_pg_foreign_table_ftrelid,4,2 ; @Anum_pg_foreign_table_ftrelid
	.comm	_Anum_pg_foreign_table_ftserver,4,2 ; @Anum_pg_foreign_table_ftserver
	.comm	_Anum_pg_foreign_table_ftoptions,4,2 ; @Anum_pg_foreign_table_ftoptions
	.comm	_RelationRelationId,4,2         ; @RelationRelationId
	.comm	_ForeignServerRelationId,4,2    ; @ForeignServerRelationId
	.comm	_DEPENDENCY_NORMAL,4,2          ; @DEPENDENCY_NORMAL
.subsections_via_symbols
