	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AlterTypeOwner                 ## -- Begin function AlterTypeOwner
	.p2align	4, 0x90
_AlterTypeOwner:                        ## @AlterTypeOwner
	.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	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_TypeRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_table_open
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_makeTypeNameFromNameList
	movq	%rax, %r12
	xorl	%edi, %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_LookupTypeName
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_UNDEFINED_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r12, %rdi
	callq	_TypeNameToString
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	%rbx, %rdi
	callq	_typeTypeId
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_heap_copytuple
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_ReleaseSysCache
	movq	%r14, %rdi
	callq	_GETSTRUCT
	movq	%rax, %rbx
	movq	_OBJECT_DOMAIN@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_5
## %bb.3:
	movq	(%rbx), %rax
	movq	_TYPTYPE_DOMAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_WRONG_OBJECT_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r12, %rdi
	callq	_format_type_be
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movq	(%rbx), %rax
	movq	_TYPTYPE_COMPOSITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movl	32(%rbx), %edi
	callq	_get_rel_relkind
	movq	_RELKIND_COMPOSITE_TYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_WRONG_OBJECT_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r12, %rdi
	callq	_format_type_be
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_errhint
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_8:
	movq	8(%rbx), %rdi
	callq	_OidIsValid
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	8(%rbx), %rdi
	callq	_get_array_type
	cmpq	%r12, %rax
	jne	LBB0_11
## %bb.10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_WRONG_OBJECT_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r12, %rdi
	callq	_format_type_be
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_errmsg
	movq	8(%rbx), %rdi
	callq	_format_type_be
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errhint
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:
	cmpq	%r15, 16(%rbx)
	je	LBB0_18
## %bb.12:
	xorl	%eax, %eax
	callq	_superuser
	testl	%eax, %eax
	jne	LBB0_17
## %bb.13:
	movl	28(%rbx), %r14d
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_pg_type_ownercheck
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	_ACLCHECK_NOT_OWNER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%rbx), %esi
	callq	_aclcheck_error_type
LBB0_15:
	xorl	%eax, %eax
	callq	_GetUserId
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_check_is_member_of_role
	movl	24(%rbx), %edi
	movq	_ACL_CREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_pg_namespace_aclcheck
	movq	%rax, %r13
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_17
## %bb.16:
	movq	_OBJECT_SCHEMA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	24(%rbx), %edi
	callq	_get_namespace_name
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_17:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_AlterTypeOwner_oid
LBB0_18:
	movq	_TypeRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_ObjectAddressSet
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_table_close                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TypeRelationId,4,2             ## @TypeRelationId
	.comm	_RowExclusiveLock,4,2           ## @RowExclusiveLock
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_UNDEFINED_OBJECT,4,2   ## @ERRCODE_UNDEFINED_OBJECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"type \"%s\" does not exist"

	.comm	_OBJECT_DOMAIN,8,3              ## @OBJECT_DOMAIN
	.comm	_TYPTYPE_DOMAIN,8,3             ## @TYPTYPE_DOMAIN
	.comm	_ERRCODE_WRONG_OBJECT_TYPE,4,2  ## @ERRCODE_WRONG_OBJECT_TYPE
L_.str.1:                               ## @.str.1
	.asciz	"%s is not a domain"

	.comm	_TYPTYPE_COMPOSITE,8,3          ## @TYPTYPE_COMPOSITE
	.comm	_RELKIND_COMPOSITE_TYPE,8,3     ## @RELKIND_COMPOSITE_TYPE
L_.str.2:                               ## @.str.2
	.asciz	"%s is a table's row type"

L_.str.3:                               ## @.str.3
	.asciz	"Use ALTER TABLE instead."

L_.str.4:                               ## @.str.4
	.asciz	"cannot alter array type %s"

L_.str.5:                               ## @.str.5
	.asciz	"You can alter type %s, which will alter the array type as well."

	.comm	_ACLCHECK_NOT_OWNER,4,2         ## @ACLCHECK_NOT_OWNER
	.comm	_ACL_CREATE,4,2                 ## @ACL_CREATE
	.comm	_ACLCHECK_OK,8,3                ## @ACLCHECK_OK
	.comm	_OBJECT_SCHEMA,4,2              ## @OBJECT_SCHEMA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AlterTypeOwner                 ; -- Begin function AlterTypeOwner
	.p2align	2
_AlterTypeOwner:                        ; @AlterTypeOwner
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x26, _TypeRelationId@GOTPAGE
Lloh1:
	ldr	x26, [x26, _TypeRelationId@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh2:
	adrp	x25, _RowExclusiveLock@GOTPAGE
Lloh3:
	ldr	x25, [x25, _RowExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_table_open
	mov	x19, x0
	mov	x0, x21
	bl	_makeTypeNameFromNameList
	mov	x21, x0
	mov	x0, #0
	mov	x1, x21
	mov	x2, #0
	mov	w3, #0
	bl	_LookupTypeName
	mov	x22, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w24, [x8]
Lloh7:
	adrp	x8, _ERRCODE_UNDEFINED_OBJECT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERRCODE_UNDEFINED_OBJECT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x21
	bl	_TypeNameToString
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
LBB0_2:
	mov	x0, x22
	bl	_typeTypeId
	mov	x21, x0
	mov	x0, x22
	bl	_heap_copytuple
	mov	x24, x0
	mov	x0, x22
	bl	_ReleaseSysCache
	mov	x0, x24
	bl	_GETSTRUCT
	mov	x22, x0
Lloh12:
	adrp	x8, _OBJECT_DOMAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OBJECT_DOMAIN@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x22]
Lloh15:
	adrp	x9, _TYPTYPE_DOMAIN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TYPTYPE_DOMAIN@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
Lloh21:
	adrp	x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x21
	bl	_format_type_be
	mov	x1, x0
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_5:
	ldr	x8, [x22]
Lloh26:
	adrp	x9, _TYPTYPE_COMPOSITE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TYPTYPE_COMPOSITE@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	w0, [x22, #32]
	bl	_get_rel_relkind
Lloh29:
	adrp	x8, _RELKIND_COMPOSITE_TYPE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _RELKIND_COMPOSITE_TYPE@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
Lloh32:
	adrp	x8, _ERROR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh34:
	ldr	w23, [x8]
Lloh35:
	adrp	x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x21
	bl	_format_type_be
	mov	x1, x0
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
Lloh40:
	adrp	x0, l_.str.3@PAGE
Lloh41:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_8:
	ldr	x0, [x22, #8]
	bl	_OidIsValid
	cbz	x0, LBB0_11
; %bb.9:
	ldr	x0, [x22, #8]
	bl	_get_array_type
	cmp	x0, x21
	b.ne	LBB0_11
; %bb.10:
Lloh42:
	adrp	x8, _ERROR@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh44:
	ldr	w23, [x8]
Lloh45:
	adrp	x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x21
	bl	_format_type_be
	mov	x1, x0
Lloh48:
	adrp	x0, l_.str.4@PAGE
Lloh49:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_errmsg
	ldr	x0, [x22, #8]
	bl	_format_type_be
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh50:
	adrp	x0, l_.str.5@PAGE
Lloh51:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_11:
	ldr	x8, [x22, #16]
	cmp	x8, x20
	b.eq	LBB0_18
; %bb.12:
	bl	_superuser
	cbnz	w0, LBB0_17
; %bb.13:
	ldr	w23, [x22, #28]
	bl	_GetUserId
	mov	x1, x0
	mov	x0, x23
	bl	_pg_type_ownercheck
	cbnz	w0, LBB0_15
; %bb.14:
Lloh52:
	adrp	x8, _ACLCHECK_NOT_OWNER@GOTPAGE
Lloh53:
	ldr	x8, [x8, _ACLCHECK_NOT_OWNER@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	ldr	w1, [x22, #28]
	bl	_aclcheck_error_type
LBB0_15:
	bl	_GetUserId
	mov	x1, x20
	bl	_check_is_member_of_role
	ldr	w0, [x22, #24]
Lloh55:
	adrp	x8, _ACL_CREATE@GOTPAGE
Lloh56:
	ldr	x8, [x8, _ACL_CREATE@GOTPAGEOFF]
Lloh57:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_pg_namespace_aclcheck
Lloh58:
	adrp	x8, _ACLCHECK_OK@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ACLCHECK_OK@GOTPAGEOFF]
Lloh60:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.16:
	mov	x23, x0
Lloh61:
	adrp	x8, _OBJECT_SCHEMA@GOTPAGE
Lloh62:
	ldr	x8, [x8, _OBJECT_SCHEMA@GOTPAGEOFF]
Lloh63:
	ldr	w24, [x8]
	ldr	w0, [x22, #24]
	bl	_get_namespace_name
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_aclcheck_error
LBB0_17:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_AlterTypeOwner_oid
LBB0_18:
	ldr	w1, [x26]
	mov	x2, x21
	bl	_ObjectAddressSet
	ldr	w1, [x25]
	mov	x0, x19
	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
	add	sp, sp, #96
	b	_table_close
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_TypeRelationId,4,2             ; @TypeRelationId
	.comm	_RowExclusiveLock,4,2           ; @RowExclusiveLock
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_UNDEFINED_OBJECT,4,2   ; @ERRCODE_UNDEFINED_OBJECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"type \"%s\" does not exist"

	.comm	_OBJECT_DOMAIN,8,3              ; @OBJECT_DOMAIN
	.comm	_TYPTYPE_DOMAIN,8,3             ; @TYPTYPE_DOMAIN
	.comm	_ERRCODE_WRONG_OBJECT_TYPE,4,2  ; @ERRCODE_WRONG_OBJECT_TYPE
l_.str.1:                               ; @.str.1
	.asciz	"%s is not a domain"

	.comm	_TYPTYPE_COMPOSITE,8,3          ; @TYPTYPE_COMPOSITE
	.comm	_RELKIND_COMPOSITE_TYPE,8,3     ; @RELKIND_COMPOSITE_TYPE
l_.str.2:                               ; @.str.2
	.asciz	"%s is a table's row type"

l_.str.3:                               ; @.str.3
	.asciz	"Use ALTER TABLE instead."

l_.str.4:                               ; @.str.4
	.asciz	"cannot alter array type %s"

l_.str.5:                               ; @.str.5
	.asciz	"You can alter type %s, which will alter the array type as well."

	.comm	_ACLCHECK_NOT_OWNER,4,2         ; @ACLCHECK_NOT_OWNER
	.comm	_ACL_CREATE,4,2                 ; @ACL_CREATE
	.comm	_ACLCHECK_OK,8,3                ; @ACLCHECK_OK
	.comm	_OBJECT_SCHEMA,4,2              ; @OBJECT_SCHEMA
.subsections_via_symbols
