	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PathNameOpenFilePerm           ## -- Begin function PathNameOpenFilePerm
	.p2align	4, 0x90
_PathNameOpenFilePerm:                  ## @PathNameOpenFilePerm
	.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, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_elog
	movl	%eax, %edi
	callq	_DO_DB
	movq	%r13, %rdi
	callq	_strdup
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	%ebx, %r14d
	movl	(%rax), %ebx
	movq	_ERRCODE_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%r14d, %ebx
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	xorl	%eax, %eax
	callq	_AllocateVfd
	movq	%rax, %r15
	movq	_VfdCache@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%eax, %eax
	callq	_ReleaseLruFiles
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_BasicOpenFilePerm
	movl	%ebx, %r13d
	leaq	(%r15,%r15,4), %rbx
	movl	%eax, 36(%r14,%rbx,8)
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_nfile@GOTPCREL(%rip), %rax
	incl	(%rax)
	leaq	(%r14,%rbx,8), %rax
	addq	$36, %rax
	movq	_LOG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movslq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	movl	%eax, %edi
	callq	_DO_DB
	movq	%r15, %rdi
	callq	_Insert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14,%rbx,8)
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%r12d, %ecx
	movl	%ecx, 8(%r14,%rbx,8)
	movl	%r13d, 32(%r14,%rbx,8)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 12(%r14,%rbx,8)
	movl	$0, 28(%r14,%rbx,8)
	jmp	LBB0_5
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%r15, %rdi
	callq	_FreeVfd
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movl	%ebx, (%r14)
	movq	$-1, %r15
LBB0_5:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PathNameOpenFilePerm: %s %x %o"

	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ## @ERRCODE_OUT_OF_MEMORY
L_.str.1:                               ## @.str.1
	.asciz	"out of memory"

	.comm	_VfdCache,8,3                   ## @VfdCache
	.comm	_errno,4,2                      ## @errno
	.comm	_nfile,4,2                      ## @nfile
L_.str.2:                               ## @.str.2
	.asciz	"PathNameOpenFile: success %d"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_EXCL,4,2                     ## @O_EXCL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PathNameOpenFilePerm           ; -- Begin function PathNameOpenFilePerm
	.p2align	2
_PathNameOpenFilePerm:                  ; @PathNameOpenFilePerm
	.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	x19, x2
	mov	x20, x1
	mov	x23, x0
Lloh0:
	adrp	x24, _LOG@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LOG@GOTPAGEOFF]
	ldr	w0, [x24]
	stp	x20, x19, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_elog
	bl	_DO_DB
	mov	x0, x23
	bl	_strdup
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
Lloh7:
	adrp	x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_errcode
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_2:
	bl	_AllocateVfd
	mov	x22, x0
Lloh12:
	adrp	x8, _VfdCache@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VfdCache@GOTPAGEOFF]
Lloh14:
	ldr	x25, [x8]
	bl	_ReleaseLruFiles
	mov	x0, x23
	mov	x1, x20
	mov	x2, x19
	bl	_BasicOpenFilePerm
	mov	w8, #40
	madd	x8, x22, x8, x25
	str	w0, [x8, #36]!
	tbnz	w0, #31, LBB0_4
; %bb.3:
Lloh15:
	adrp	x9, _nfile@GOTPAGE
Lloh16:
	ldr	x9, [x9, _nfile@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w10, w10, #1
	str	w10, [x9]
	ldr	w0, [x24]
	ldrsw	x2, [x8]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elog
	bl	_DO_DB
	mov	x0, x22
	bl	_Insert
	mov	w8, #40
	madd	x8, x22, x8, x25
	str	x21, [x8]
Lloh19:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _O_TRUNC@GOTPAGE
Lloh23:
	ldr	x10, [x10, _O_TRUNC@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh25:
	adrp	x10, _O_EXCL@GOTPAGE
Lloh26:
	ldr	x10, [x10, _O_EXCL@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w9, w20, w9
	str	w9, [x8, #8]
	stp	wzr, w19, [x8, #28]
	stur	xzr, [x8, #12]
	stur	xzr, [x8, #20]
	b	LBB0_5
LBB0_4:
Lloh28:
	adrp	x19, _errno@GOTPAGE
Lloh29:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w20, [x19]
	mov	x0, x22
	bl	_FreeVfd
	mov	x0, x21
	bl	_free
	str	w20, [x19]
	mov	x22, #-1
LBB0_5:
	mov	x0, x22
	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
	ret
	.loh AdrpAdd	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	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PathNameOpenFilePerm: %s %x %o"

	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ; @ERRCODE_OUT_OF_MEMORY
l_.str.1:                               ; @.str.1
	.asciz	"out of memory"

	.comm	_VfdCache,8,3                   ; @VfdCache
	.comm	_errno,4,2                      ; @errno
	.comm	_nfile,4,2                      ; @nfile
l_.str.2:                               ; @.str.2
	.asciz	"PathNameOpenFile: success %d"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_EXCL,4,2                     ; @O_EXCL
.subsections_via_symbols
