	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AlterSchemaOwner_internal
_AlterSchemaOwner_internal:             ## @AlterSchemaOwner_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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	_NamespaceRelationId@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_Assert
	movl	%r14d, %edi
	callq	_RelationGetRelid
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_Assert
	movq	%r12, %rdi
	callq	_GETSTRUCT
	movq	%rax, %r15
	cmpl	%r13d, 4(%rax)
	je	LBB0_8
## %bb.1:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	_Natts_pg_namespace@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r14d
	leaq	(,%r14,4), %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	(%r15), %ebx
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pg_namespace_ownercheck
	testl	%eax, %eax
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	jne	LBB0_3
## %bb.2:
	movq	_ACLCHECK_NOT_OWNER@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_OBJECT_SCHEMA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r15), %edi
	callq	_NameStr
	movq	%r13, %rdi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_3:
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%eax, %edi
	movl	%r13d, %esi
	callq	_check_is_member_of_role
	movq	_MyDatabaseId@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_GetUserId
	movq	_ACL_CREATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pg_database_aclcheck
	movq	%rax, %r13
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_5
## %bb.4:
	movq	_OBJECT_DATABASE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MyDatabaseId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_database_name
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_5:
	shll	$2, %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	_Anum_pg_namespace_nspowner@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rax
	movl	$1, -4(%r12,%rax,4)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_ObjectIdGetDatum
	movslq	(%rbx), %rcx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, -4(%rbx,%rcx,4)
	movq	_NAMESPACENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_Anum_pg_namespace_nspacl@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-60(%rbp), %rcx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_SysCacheGetAttr
	cmpl	$0, -60(%rbp)
	jne	LBB0_7
## %bb.6:
	movl	%eax, %edi
	callq	_DatumGetAclP
	movl	4(%r15), %esi
	movl	%eax, %edi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_aclnewowner
	movslq	(%r13), %rcx
	movl	$1, -4(%r12,%rcx,4)
	movq	%rax, %rdi
	callq	_PointerGetDatum
	movslq	(%r13), %rcx
	movl	%eax, -4(%rbx,%rcx,4)
LBB0_7:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	callq	_RelationGetDescr
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r8
	callq	_heap_modify_tuple
	movq	%rax, %rbx
	leaq	8(%rax), %rsi
	movl	%r13d, %edi
	movq	%rax, %rdx
	callq	_CatalogTupleUpdate
	movq	%rbx, %rdi
	callq	_heap_freetuple
	movq	_NamespaceRelationId@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movl	(%r15), %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_changeDependencyOnOwner
	movq	-96(%rbp), %rsp                 ## 8-byte Reload
LBB0_8:
	movq	(%rbx), %rdi
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_InvokeObjectPostAlterHook
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NamespaceRelationId,8,3        ## @NamespaceRelationId
	.comm	_Natts_pg_namespace,4,2         ## @Natts_pg_namespace
	.comm	_ACLCHECK_NOT_OWNER,8,3         ## @ACLCHECK_NOT_OWNER
	.comm	_OBJECT_SCHEMA,4,2              ## @OBJECT_SCHEMA
	.comm	_MyDatabaseId,4,2               ## @MyDatabaseId
	.comm	_ACL_CREATE,4,2                 ## @ACL_CREATE
	.comm	_ACLCHECK_OK,8,3                ## @ACLCHECK_OK
	.comm	_OBJECT_DATABASE,4,2            ## @OBJECT_DATABASE
	.comm	_Anum_pg_namespace_nspowner,4,2 ## @Anum_pg_namespace_nspowner
	.comm	_NAMESPACENAME,4,2              ## @NAMESPACENAME
	.comm	_Anum_pg_namespace_nspacl,4,2   ## @Anum_pg_namespace_nspacl
	.no_dead_strip	_AlterSchemaOwner_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AlterSchemaOwner_internal
_AlterSchemaOwner_internal:             ; @AlterSchemaOwner_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, #32
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0]
Lloh3:
	adrp	x23, _NamespaceRelationId@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NamespaceRelationId@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	bl	_RelationGetRelid
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	mov	x0, x22
	bl	_GETSTRUCT
	mov	x21, x0
	ldr	w8, [x0, #4]
	cmp	w8, w19
	b.eq	LBB0_8
; %bb.1:
	mov	x8, sp
	stur	x8, [x29, #-104]                ; 8-byte Folded Spill
Lloh5:
	adrp	x12, _Natts_pg_namespace@GOTPAGE
Lloh6:
	ldr	x12, [x12, _Natts_pg_namespace@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	ldr	w28, [x12]
	lsl	x8, x28, #2
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x9, x9, x12
	stur	x9, [x29, #-112]                ; 8-byte Folded Spill
	mov	sp, x9
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x25, x8, x12
	mov	sp, x25
	ldr	w26, [x21]
	bl	_GetUserId
	mov	x1, x0
	mov	x0, x26
	bl	_pg_namespace_ownercheck
	cbnz	w0, LBB0_3
; %bb.2:
Lloh13:
	adrp	x8, _ACLCHECK_NOT_OWNER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ACLCHECK_NOT_OWNER@GOTPAGEOFF]
Lloh15:
	ldr	x26, [x8]
Lloh16:
	adrp	x8, _OBJECT_SCHEMA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OBJECT_SCHEMA@GOTPAGEOFF]
Lloh18:
	ldr	w27, [x8]
	ldr	w0, [x21, #8]
	bl	_NameStr
	mov	x2, x0
	mov	x0, x26
	mov	x1, x27
	bl	_aclcheck_error
LBB0_3:
	bl	_GetUserId
	mov	x1, x19
	bl	_check_is_member_of_role
Lloh19:
	adrp	x24, _MyDatabaseId@GOTPAGE
Lloh20:
	ldr	x24, [x24, _MyDatabaseId@GOTPAGEOFF]
	ldr	w26, [x24]
	bl	_GetUserId
	mov	x1, x0
Lloh21:
	adrp	x8, _ACL_CREATE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ACL_CREATE@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x26
	bl	_pg_database_aclcheck
Lloh24:
	adrp	x8, _ACLCHECK_OK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ACLCHECK_OK@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	mov	x26, x0
Lloh27:
	adrp	x8, _OBJECT_DATABASE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OBJECT_DATABASE@GOTPAGEOFF]
Lloh29:
	ldr	w27, [x8]
	ldr	w0, [x24]
	bl	_get_database_name
	mov	x2, x0
	mov	x0, x26
	mov	x1, x27
	bl	_aclcheck_error
LBB0_5:
	lsl	w26, w28, #2
	ldur	x28, [x29, #-112]               ; 8-byte Folded Reload
	mov	x0, x28
	mov	w1, #0
	mov	x2, x26
	bl	_memset
	mov	x0, x25
	mov	w1, #0
	mov	x2, x26
	bl	_memset
Lloh30:
	adrp	x24, _Anum_pg_namespace_nspowner@GOTPAGE
Lloh31:
	ldr	x24, [x24, _Anum_pg_namespace_nspowner@GOTPAGEOFF]
	ldrsw	x8, [x24]
	add	x8, x25, x8, lsl #2
	mov	w26, #1
	stur	w26, [x8, #-4]
	mov	x0, x19
	bl	_ObjectIdGetDatum
	ldrsw	x8, [x24]
	add	x8, x23, x8, lsl #2
	stur	w0, [x8, #-4]
Lloh32:
	adrp	x8, _NAMESPACENAME@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NAMESPACENAME@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x27, _Anum_pg_namespace_nspacl@GOTPAGE
Lloh36:
	ldr	x27, [x27, _Anum_pg_namespace_nspacl@GOTPAGEOFF]
	ldr	w2, [x27]
	sub	x3, x29, #92
	mov	x1, x22
	bl	_SysCacheGetAttr
	ldur	w8, [x29, #-92]
	cbnz	w8, LBB0_7
; %bb.6:
	bl	_DatumGetAclP
	ldr	w1, [x21, #4]
	mov	x2, x19
	bl	_aclnewowner
	ldrsw	x8, [x27]
	add	x8, x25, x8, lsl #2
	stur	w26, [x8, #-4]
	bl	_PointerGetDatum
	ldrsw	x8, [x27]
	add	x8, x23, x8, lsl #2
	stur	w0, [x8, #-4]
LBB0_7:
	mov	x0, x20
	bl	_RelationGetDescr
	mov	x1, x0
	mov	x0, x22
	mov	x2, x23
	mov	x3, x28
	mov	x4, x25
	bl	_heap_modify_tuple
	mov	x22, x0
	add	x1, x0, #8
	mov	x0, x20
	mov	x2, x22
	bl	_CatalogTupleUpdate
	mov	x0, x22
	bl	_heap_freetuple
Lloh37:
	adrp	x23, _NamespaceRelationId@GOTPAGE
Lloh38:
	ldr	x23, [x23, _NamespaceRelationId@GOTPAGEOFF]
	ldr	x0, [x23]
	ldr	w1, [x21]
	mov	x2, x19
	bl	_changeDependencyOnOwner
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	mov	sp, x8
LBB0_8:
	ldr	x0, [x23]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_InvokeObjectPostAlterHook
	ldur	x8, [x29, #-88]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_NamespaceRelationId,8,3        ; @NamespaceRelationId
	.comm	_Natts_pg_namespace,4,2         ; @Natts_pg_namespace
	.comm	_ACLCHECK_NOT_OWNER,8,3         ; @ACLCHECK_NOT_OWNER
	.comm	_OBJECT_SCHEMA,4,2              ; @OBJECT_SCHEMA
	.comm	_MyDatabaseId,4,2               ; @MyDatabaseId
	.comm	_ACL_CREATE,4,2                 ; @ACL_CREATE
	.comm	_ACLCHECK_OK,8,3                ; @ACLCHECK_OK
	.comm	_OBJECT_DATABASE,4,2            ; @OBJECT_DATABASE
	.comm	_Anum_pg_namespace_nspowner,4,2 ; @Anum_pg_namespace_nspowner
	.comm	_NAMESPACENAME,4,2              ; @NAMESPACENAME
	.comm	_Anum_pg_namespace_nspacl,4,2   ; @Anum_pg_namespace_nspacl
	.no_dead_strip	_AlterSchemaOwner_internal
.subsections_via_symbols
