	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AlterForeignServerOwner_internal
_AlterForeignServerOwner_internal:      ## @AlterForeignServerOwner_internal
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r15
	movl	%edi, -64(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_Natts_pg_foreign_server@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	(,%r14,4), %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	movq	%r15, %rbx
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rdi
	callq	_GETSTRUCT
	cmpl	%r13d, 4(%rax)
	je	LBB0_9
## %bb.1:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_superuser
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %ebx
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pg_foreign_server_ownercheck
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_ACLCHECK_NOT_OWNER@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_OBJECT_FOREIGN_SERVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	12(%r12), %edi
	callq	_NameStr
	movq	%rbx, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_4:
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%eax, %edi
	movl	%r13d, %ebx
	movl	%r13d, %esi
	callq	_check_is_member_of_role
	movl	8(%r12), %edi
	movq	_ACL_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %esi
	callq	_pg_foreign_data_wrapper_aclcheck
	movq	%rax, %rbx
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_GetForeignDataWrapper
	movq	_OBJECT_FDW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_aclcheck_error
LBB0_6:
	shll	$2, %r14d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	%r15, %rbx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	_Anum_pg_foreign_server_srvowner@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	movl	$1, -4(%r15,%rax,4)
	movl	%r13d, %r15d
	movl	%r13d, %edi
	callq	_ObjectIdGetDatum
	movslq	(%r14), %rcx
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, -4(%r13,%rcx,4)
	movq	_Anum_pg_foreign_server_srvacl@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_RelationGetDescr
	leaq	-68(%rbp), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_heap_getattr
	cmpl	$0, -68(%rbp)
	jne	LBB0_8
## %bb.7:
	movl	%eax, %edi
	callq	_DatumGetAclP
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %esi
	movl	%eax, %edi
	movl	%r15d, %edx
	callq	_aclnewowner
	movq	_Anum_pg_foreign_server_srvacl@GOTPCREL(%rip), %r12
	movslq	(%r12), %rcx
	movl	$1, -4(%rbx,%rcx,4)
	movq	%rax, %rdi
	callq	_PointerGetDatum
	movslq	(%r12), %rcx
	movl	%eax, -4(%r13,%rcx,4)
LBB0_8:
	movl	%r14d, %edi
	callq	_RelationGetDescr
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movq	%r13, %rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_heap_modify_tuple
	movl	%r14d, %edi
	movq	%rax, %rsi
	movq	%rax, %rdx
	callq	_CatalogTupleUpdate
	movq	_ForeignServerRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movl	%r15d, %edx
	callq	_changeDependencyOnOwner
	movq	%rbx, %rax
LBB0_9:
	movq	_ForeignServerRelationId@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_InvokeObjectPostAlterHook
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_Natts_pg_foreign_server,4,2    ## @Natts_pg_foreign_server
	.comm	_ACLCHECK_NOT_OWNER,8,3         ## @ACLCHECK_NOT_OWNER
	.comm	_OBJECT_FOREIGN_SERVER,4,2      ## @OBJECT_FOREIGN_SERVER
	.comm	_ACL_USAGE,4,2                  ## @ACL_USAGE
	.comm	_ACLCHECK_OK,8,3                ## @ACLCHECK_OK
	.comm	_OBJECT_FDW,4,2                 ## @OBJECT_FDW
	.comm	_Anum_pg_foreign_server_srvowner,4,2 ## @Anum_pg_foreign_server_srvowner
	.comm	_Anum_pg_foreign_server_srvacl,4,2 ## @Anum_pg_foreign_server_srvacl
	.comm	_ForeignServerRelationId,4,2    ## @ForeignServerRelationId
	.no_dead_strip	_AlterForeignServerOwner_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AlterForeignServerOwner_internal
_AlterForeignServerOwner_internal:      ; @AlterForeignServerOwner_internal
	.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, #16
	mov	x19, x2
	mov	x21, x1
	mov	x20, 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_server@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Natts_pg_foreign_server@GOTPAGEOFF]
Lloh5:
	ldr	w27, [x8]
	lsl	x8, x27, #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	x23, x9, x12
	mov	sp, x23
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x24, x9, x12
	mov	sp, x24
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x25, x8, x12
	mov	sp, x25
	mov	x0, x1
	bl	_GETSTRUCT
	mov	x22, x0
	ldr	w8, [x0, #4]
Lloh12:
	adrp	x26, _ForeignServerRelationId@GOTPAGE
Lloh13:
	ldr	x26, [x26, _ForeignServerRelationId@GOTPAGEOFF]
	cmp	w8, w19
	b.eq	LBB0_9
; %bb.1:
	bl	_superuser
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w26, [x22]
	bl	_GetUserId
	mov	x1, x0
	mov	x0, x26
	bl	_pg_foreign_server_ownercheck
	cbnz	w0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _ACLCHECK_NOT_OWNER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ACLCHECK_NOT_OWNER@GOTPAGEOFF]
Lloh16:
	ldr	x28, [x8]
Lloh17:
	adrp	x8, _OBJECT_FOREIGN_SERVER@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OBJECT_FOREIGN_SERVER@GOTPAGEOFF]
Lloh19:
	ldr	w26, [x8]
	ldr	w0, [x22, #12]
	bl	_NameStr
	mov	x2, x0
	mov	x0, x28
	mov	x1, x26
	bl	_aclcheck_error
LBB0_4:
	bl	_GetUserId
	mov	x1, x19
	bl	_check_is_member_of_role
	ldr	w0, [x22, #8]
Lloh20:
	adrp	x8, _ACL_USAGE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ACL_USAGE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_pg_foreign_data_wrapper_aclcheck
Lloh23:
	adrp	x8, _ACLCHECK_OK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ACLCHECK_OK@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x26, x0
	ldr	w0, [x22, #8]
	bl	_GetForeignDataWrapper
Lloh26:
	adrp	x8, _OBJECT_FDW@GOTPAGE
Lloh27:
	ldr	x8, [x8, _OBJECT_FDW@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w2, [x0]
	mov	x0, x26
	bl	_aclcheck_error
LBB0_6:
	lsl	w26, w27, #2
	mov	x0, x24
	mov	w1, #0
	mov	x2, x26
	bl	_memset
	mov	x0, x25
	mov	w1, #0
	mov	x2, x26
	bl	_memset
Lloh29:
	adrp	x26, _Anum_pg_foreign_server_srvowner@GOTPAGE
Lloh30:
	ldr	x26, [x26, _Anum_pg_foreign_server_srvowner@GOTPAGEOFF]
	ldrsw	x8, [x26]
	add	x8, x25, x8, lsl #2
	mov	w27, #1
	stur	w27, [x8, #-4]
	mov	x0, x19
	bl	_ObjectIdGetDatum
	ldrsw	x8, [x26]
	add	x8, x23, x8, lsl #2
	stur	w0, [x8, #-4]
Lloh31:
	adrp	x28, _Anum_pg_foreign_server_srvacl@GOTPAGE
Lloh32:
	ldr	x28, [x28, _Anum_pg_foreign_server_srvacl@GOTPAGEOFF]
	ldr	w26, [x28]
	mov	x0, x20
	bl	_RelationGetDescr
	mov	x2, x0
	sub	x3, x29, #92
	mov	x0, x21
	mov	x1, x26
	bl	_heap_getattr
	ldur	w8, [x29, #-92]
	cbnz	w8, LBB0_8
; %bb.7:
	bl	_DatumGetAclP
	ldr	w1, [x22, #4]
	mov	x2, x19
	bl	_aclnewowner
	ldrsw	x8, [x28]
	add	x8, x25, x8, lsl #2
	stur	w27, [x8, #-4]
	bl	_PointerGetDatum
	ldrsw	x8, [x28]
	add	x8, x23, x8, lsl #2
	stur	w0, [x8, #-4]
LBB0_8:
	mov	x0, x20
	bl	_RelationGetDescr
	mov	x1, x0
	mov	x0, x21
	mov	x2, x23
	mov	x3, x24
	mov	x4, x25
	bl	_heap_modify_tuple
	mov	x1, x0
	mov	x0, x20
	mov	x2, x1
	bl	_CatalogTupleUpdate
Lloh33:
	adrp	x26, _ForeignServerRelationId@GOTPAGE
Lloh34:
	ldr	x26, [x26, _ForeignServerRelationId@GOTPAGEOFF]
	ldr	w0, [x26]
	ldr	w1, [x22]
	mov	x2, x19
	bl	_changeDependencyOnOwner
LBB0_9:
	ldr	w0, [x26]
	ldr	w1, [x22]
	mov	w2, #0
	bl	_InvokeObjectPostAlterHook
	ldur	x8, [x29, #-88]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	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_11:
	bl	___stack_chk_fail
	.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	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_Natts_pg_foreign_server,4,2    ; @Natts_pg_foreign_server
	.comm	_ACLCHECK_NOT_OWNER,8,3         ; @ACLCHECK_NOT_OWNER
	.comm	_OBJECT_FOREIGN_SERVER,4,2      ; @OBJECT_FOREIGN_SERVER
	.comm	_ACL_USAGE,4,2                  ; @ACL_USAGE
	.comm	_ACLCHECK_OK,8,3                ; @ACLCHECK_OK
	.comm	_OBJECT_FDW,4,2                 ; @OBJECT_FDW
	.comm	_Anum_pg_foreign_server_srvowner,4,2 ; @Anum_pg_foreign_server_srvowner
	.comm	_Anum_pg_foreign_server_srvacl,4,2 ; @Anum_pg_foreign_server_srvacl
	.comm	_ForeignServerRelationId,4,2    ; @ForeignServerRelationId
	.no_dead_strip	_AlterForeignServerOwner_internal
.subsections_via_symbols
