	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sepgsql_relation_relabel       ## -- Begin function sepgsql_relation_relabel
	.p2align	4, 0x90
_sepgsql_relation_relabel:              ## @sepgsql_relation_relabel
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	callq	_get_rel_relkind
	movq	_RELKIND_RELATION@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	je	LBB0_2
## %bb.1:
	movq	_RELKIND_PARTITIONED_TABLE@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	je	LBB0_2
## %bb.3:
	movq	_RELKIND_SEQUENCE@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_5
## %bb.4:
	movq	_SEPG_CLASS_DB_SEQUENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_8
LBB0_2:
	movq	_SEPG_CLASS_DB_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_8
LBB0_5:
	movq	_RELKIND_VIEW@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_7
## %bb.6:
	movq	_SEPG_CLASS_DB_VIEW@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_8
LBB0_7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_WRONG_OBJECT_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	xorl	%r12d, %r12d
LBB0_8:
	movq	_RelationRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	%r15d, -40(%rbp)
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	callq	_getObjectIdentity
	movq	%rax, %rbx
	movq	_SEPG_DB_TABLE__SETATTR@GOTPCREL(%rip), %rax
	movq	_SEPG_DB_TABLE__RELABELFROM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rcx
	movl	$1, %r8d
	callq	_sepgsql_avc_check_perms
	movq	_SEPG_DB_TABLE__RELABELTO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rcx
	movl	$1, %r8d
	callq	_sepgsql_avc_check_perms_label
	movq	%rbx, %rdi
	callq	_pfree
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RELKIND_RELATION,1,0           ## @RELKIND_RELATION
	.comm	_RELKIND_PARTITIONED_TABLE,1,0  ## @RELKIND_PARTITIONED_TABLE
	.comm	_SEPG_CLASS_DB_TABLE,4,2        ## @SEPG_CLASS_DB_TABLE
	.comm	_RELKIND_SEQUENCE,1,0           ## @RELKIND_SEQUENCE
	.comm	_SEPG_CLASS_DB_SEQUENCE,4,2     ## @SEPG_CLASS_DB_SEQUENCE
	.comm	_RELKIND_VIEW,1,0               ## @RELKIND_VIEW
	.comm	_SEPG_CLASS_DB_VIEW,4,2         ## @SEPG_CLASS_DB_VIEW
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_WRONG_OBJECT_TYPE,4,2  ## @ERRCODE_WRONG_OBJECT_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot set security labels on relations except for tables, sequences or views"

	.comm	_RelationRelationId,4,2         ## @RelationRelationId
	.comm	_SEPG_DB_TABLE__SETATTR,4,2     ## @SEPG_DB_TABLE__SETATTR
	.comm	_SEPG_DB_TABLE__RELABELFROM,4,2 ## @SEPG_DB_TABLE__RELABELFROM
	.comm	_SEPG_DB_TABLE__RELABELTO,4,2   ## @SEPG_DB_TABLE__RELABELTO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sepgsql_relation_relabel       ; -- Begin function sepgsql_relation_relabel
	.p2align	2
_sepgsql_relation_relabel:              ; @sepgsql_relation_relabel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_get_rel_relkind
Lloh0:
	adrp	x8, _RELKIND_RELATION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RELKIND_RELATION@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w0, uxtb
	b.eq	LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _RELKIND_PARTITIONED_TABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RELKIND_PARTITIONED_TABLE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w0, uxtb
	b.eq	LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _RELKIND_SEQUENCE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RELKIND_SEQUENCE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w0, uxtb
	b.ne	LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _SEPG_CLASS_DB_SEQUENCE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEPG_CLASS_DB_SEQUENCE@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x8, _SEPG_CLASS_DB_TABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEPG_CLASS_DB_TABLE@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _RELKIND_VIEW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RELKIND_VIEW@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w0, uxtb
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _SEPG_CLASS_DB_VIEW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SEPG_CLASS_DB_VIEW@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
Lloh20:
	adrp	x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERRCODE_WRONG_OBJECT_TYPE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_errcode
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
	mov	w21, #0
LBB0_8:
Lloh25:
	adrp	x8, _RelationRelationId@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RelationRelationId@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	stp	w20, w8, [sp, #8]
	str	xzr, [sp]
	mov	x0, sp
	bl	_getObjectIdentity
	mov	x20, x0
Lloh28:
	adrp	x8, _SEPG_DB_TABLE__SETATTR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SEPG_DB_TABLE__SETATTR@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _SEPG_DB_TABLE__RELABELFROM@GOTPAGE
Lloh32:
	ldr	x9, [x9, _SEPG_DB_TABLE__RELABELFROM@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, sp
	mov	x1, x21
	mov	x3, x20
	mov	w4, #1
	bl	_sepgsql_avc_check_perms
Lloh34:
	adrp	x8, _SEPG_DB_TABLE__RELABELTO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SEPG_DB_TABLE__RELABELTO@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	mov	w4, #1
	bl	_sepgsql_avc_check_perms_label
	mov	x0, x20
	bl	_pfree
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RELKIND_RELATION,1,0           ; @RELKIND_RELATION
	.comm	_RELKIND_PARTITIONED_TABLE,1,0  ; @RELKIND_PARTITIONED_TABLE
	.comm	_SEPG_CLASS_DB_TABLE,4,2        ; @SEPG_CLASS_DB_TABLE
	.comm	_RELKIND_SEQUENCE,1,0           ; @RELKIND_SEQUENCE
	.comm	_SEPG_CLASS_DB_SEQUENCE,4,2     ; @SEPG_CLASS_DB_SEQUENCE
	.comm	_RELKIND_VIEW,1,0               ; @RELKIND_VIEW
	.comm	_SEPG_CLASS_DB_VIEW,4,2         ; @SEPG_CLASS_DB_VIEW
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_WRONG_OBJECT_TYPE,4,2  ; @ERRCODE_WRONG_OBJECT_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot set security labels on relations except for tables, sequences or views"

	.comm	_RelationRelationId,4,2         ; @RelationRelationId
	.comm	_SEPG_DB_TABLE__SETATTR,4,2     ; @SEPG_DB_TABLE__SETATTR
	.comm	_SEPG_DB_TABLE__RELABELFROM,4,2 ; @SEPG_DB_TABLE__RELABELFROM
	.comm	_SEPG_DB_TABLE__RELABELTO,4,2   ; @SEPG_DB_TABLE__RELABELTO
.subsections_via_symbols
