	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_and_check_filename
_convert_and_check_filename:            ## @convert_and_check_filename
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_text_to_cstring
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_canonicalize_path
	xorl	%eax, %eax
	callq	_GetUserId
	movq	_DEFAULT_ROLE_READ_SERVER_FILES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_is_member_of_role
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	callq	_is_absolute_path
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	callq	_path_contains_parent_reference
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_4:
	movq	_DataDir@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_path_is_prefix_of_path
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	_Log_directory@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_is_absolute_path
	leaq	L_.str.1(%rip), %r14
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_path_is_prefix_of_path
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_9
LBB0_7:
	callq	_path_is_relative_and_below_cwd
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	leaq	L_.str.2(%rip), %r14
LBB0_9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	%r14, %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_ROLE_READ_SERVER_FILES,4,2 ## @DEFAULT_ROLE_READ_SERVER_FILES
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ## @ERRCODE_INSUFFICIENT_PRIVILEGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reference to parent directory (\"..\") not allowed"

	.comm	_DataDir,8,3                    ## @DataDir
	.comm	_Log_directory,8,3              ## @Log_directory
L_.str.1:                               ## @.str.1
	.asciz	"absolute path not allowed"

L_.str.2:                               ## @.str.2
	.asciz	"path must be in or below the current directory"

	.no_dead_strip	_convert_and_check_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_and_check_filename
_convert_and_check_filename:            ; @convert_and_check_filename
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_text_to_cstring
	mov	x19, x0
	bl	_canonicalize_path
	bl	_GetUserId
Lloh0:
	adrp	x8, _DEFAULT_ROLE_READ_SERVER_FILES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_ROLE_READ_SERVER_FILES@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_is_member_of_role
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	bl	_is_absolute_path
	cbz	x0, LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_path_contains_parent_reference
	cbz	x0, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_errcode
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_5:
Lloh11:
	adrp	x8, _DataDir@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DataDir@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	mov	x1, x19
	bl	_path_is_prefix_of_path
	cbnz	w0, LBB0_1
; %bb.6:
Lloh14:
	adrp	x20, _Log_directory@GOTPAGE
Lloh15:
	ldr	x20, [x20, _Log_directory@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_is_absolute_path
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x0, [x20]
	mov	x1, x19
	bl	_path_is_prefix_of_path
	cbnz	w0, LBB0_1
LBB0_8:
Lloh16:
	adrp	x20, l_.str.1@PAGE
Lloh17:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_path_is_relative_and_below_cwd
	cbnz	w0, LBB0_1
; %bb.10:
Lloh18:
	adrp	x20, l_.str.2@PAGE
Lloh19:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_11:
Lloh20:
	adrp	x8, _ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
Lloh23:
	adrp	x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_errcode
	mov	x0, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_ROLE_READ_SERVER_FILES,4,2 ; @DEFAULT_ROLE_READ_SERVER_FILES
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ; @ERRCODE_INSUFFICIENT_PRIVILEGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reference to parent directory (\"..\") not allowed"

	.comm	_DataDir,8,3                    ; @DataDir
	.comm	_Log_directory,8,3              ; @Log_directory
l_.str.1:                               ; @.str.1
	.asciz	"absolute path not allowed"

l_.str.2:                               ; @.str.2
	.asciz	"path must be in or below the current directory"

	.no_dead_strip	_convert_and_check_filename
.subsections_via_symbols
