	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AlterPublicationOwner_internal
_AlterPublicationOwner_internal:        ## @AlterPublicationOwner_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	%rsi, %rdi
	callq	_GETSTRUCT
	cmpl	%r14d, 4(%rax)
	jne	LBB0_1
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_superuser
	testl	%eax, %eax
	je	LBB0_2
LBB0_9:
	movl	%r14d, 4(%r12)
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r15, %rdx
	callq	_CatalogTupleUpdate
	movq	_PublicationRelationId@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	(%r12), %esi
	movl	%r14d, %edx
	callq	_changeDependencyOnOwner
	movl	(%rbx), %edi
	movl	(%r12), %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_InvokeObjectPostAlterHook      ## TAILCALL
LBB0_2:
	movl	(%r12), %r13d
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_pg_publication_ownercheck
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_ACLCHECK_NOT_OWNER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_OBJECT_PUBLICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	8(%r12), %edi
	callq	_NameStr
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_4:
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_check_is_member_of_role
	movq	_MyDatabaseId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ACL_CREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	callq	_pg_database_aclcheck
	movq	%rax, %r13
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_6
## %bb.5:
	movq	_OBJECT_DATABASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_MyDatabaseId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_database_name
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_6:
	cmpq	$0, 16(%r12)
	je	LBB0_9
## %bb.7:
	movl	%r14d, %edi
	callq	_superuser_arg
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	8(%r12), %edi
	callq	_NameStr
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	callq	_errhint
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ACLCHECK_NOT_OWNER,8,3         ## @ACLCHECK_NOT_OWNER
	.comm	_OBJECT_PUBLICATION,4,2         ## @OBJECT_PUBLICATION
	.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	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ## @ERRCODE_INSUFFICIENT_PRIVILEGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"permission denied to change owner of publication \"%s\""

L_.str.1:                               ## @.str.1
	.asciz	"The owner of a FOR ALL TABLES publication must be a superuser."

	.comm	_PublicationRelationId,4,2      ## @PublicationRelationId
	.no_dead_strip	_AlterPublicationOwner_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AlterPublicationOwner_internal
_AlterPublicationOwner_internal:        ; @AlterPublicationOwner_internal
	.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	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_GETSTRUCT
	ldr	w8, [x0, #4]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x20, x0
	bl	_superuser
	cbz	w0, LBB0_4
LBB0_3:
	str	w19, [x20, #4]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x21
	bl	_CatalogTupleUpdate
Lloh0:
	adrp	x21, _PublicationRelationId@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PublicationRelationId@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [x20]
	mov	x2, x19
	bl	_changeDependencyOnOwner
	ldr	w0, [x21]
	ldr	w1, [x20]
	mov	w2, #0
	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
	b	_InvokeObjectPostAlterHook
LBB0_4:
	ldr	w23, [x20]
	bl	_GetUserId
	mov	x1, x0
	mov	x0, x23
	bl	_pg_publication_ownercheck
	cbnz	w0, LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _ACLCHECK_NOT_OWNER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACLCHECK_NOT_OWNER@GOTPAGEOFF]
Lloh4:
	ldr	x23, [x8]
Lloh5:
	adrp	x8, _OBJECT_PUBLICATION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OBJECT_PUBLICATION@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	ldr	w0, [x20, #8]
	bl	_NameStr
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_aclcheck_error
LBB0_6:
	bl	_GetUserId
	mov	x1, x19
	bl	_check_is_member_of_role
Lloh8:
	adrp	x25, _MyDatabaseId@GOTPAGE
Lloh9:
	ldr	x25, [x25, _MyDatabaseId@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh10:
	adrp	x8, _ACL_CREATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ACL_CREATE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_pg_database_aclcheck
Lloh13:
	adrp	x8, _ACLCHECK_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ACLCHECK_OK@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	mov	x23, x0
Lloh16:
	adrp	x8, _OBJECT_DATABASE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OBJECT_DATABASE@GOTPAGEOFF]
Lloh18:
	ldr	w24, [x8]
	ldr	w0, [x25]
	bl	_get_database_name
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_aclcheck_error
LBB0_8:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
; %bb.9:
	mov	x0, x19
	bl	_superuser_arg
	cbnz	w0, LBB0_3
; %bb.10:
Lloh19:
	adrp	x8, _ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w23, [x8]
Lloh22:
	adrp	x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_errcode
	ldr	w0, [x20, #8]
	bl	_NameStr
	mov	x1, x0
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ACLCHECK_NOT_OWNER,8,3         ; @ACLCHECK_NOT_OWNER
	.comm	_OBJECT_PUBLICATION,4,2         ; @OBJECT_PUBLICATION
	.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	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ; @ERRCODE_INSUFFICIENT_PRIVILEGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"permission denied to change owner of publication \"%s\""

l_.str.1:                               ; @.str.1
	.asciz	"The owner of a FOR ALL TABLES publication must be a superuser."

	.comm	_PublicationRelationId,4,2      ; @PublicationRelationId
	.no_dead_strip	_AlterPublicationOwner_internal
.subsections_via_symbols
