	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenTransientFilePerm          ## -- Begin function OpenTransientFilePerm
	.p2align	4, 0x90
_OpenTransientFilePerm:                 ## @OpenTransientFilePerm
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_numAllocatedDescs@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rcx
	callq	_elog
	movl	%eax, %edi
	callq	_DO_DB
	xorl	%eax, %eax
	callq	_reserveAllocatedDesc
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ERRCODE_INSUFFICIENT_RESOURCES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	_maxAllocatedDescs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rdx
	callq	_errmsg
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	xorl	%eax, %eax
	callq	_ReleaseLruFiles
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_BasicOpenFilePerm
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	_allocatedDescs@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	(%r13), %rax
	movq	_AllocateDescRawFD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rax,2), %r15
	movl	%ecx, 8(%r14,%r15,4)
	movl	%ebx, 4(%r14,%r15,4)
	xorl	%eax, %eax
	callq	_GetCurrentSubTransactionId
	movl	%eax, (%r14,%r15,4)
	incq	(%r13)
	jmp	LBB0_5
LBB0_3:
	movl	$-1, %ebx
LBB0_5:
	movl	%ebx, %eax
	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	"OpenTransientFile: Allocated %d (%s)"

	.comm	_numAllocatedDescs,8,3          ## @numAllocatedDescs
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INSUFFICIENT_RESOURCES,4,2 ## @ERRCODE_INSUFFICIENT_RESOURCES
L_.str.1:                               ## @.str.1
	.asciz	"exceeded maxAllocatedDescs (%d) while trying to open file \"%s\""

	.comm	_maxAllocatedDescs,4,2          ## @maxAllocatedDescs
	.comm	_allocatedDescs,8,3             ## @allocatedDescs
	.comm	_AllocateDescRawFD,4,2          ## @AllocateDescRawFD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenTransientFilePerm          ; -- Begin function OpenTransientFilePerm
	.p2align	2
_OpenTransientFilePerm:                 ; @OpenTransientFilePerm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _LOG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x23, _numAllocatedDescs@GOTPAGE
Lloh4:
	ldr	x23, [x23, _numAllocatedDescs@GOTPAGEOFF]
	ldr	x2, [x23]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_elog
	bl	_DO_DB
	bl	_reserveAllocatedDesc
	cbnz	w0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w22, [x8]
Lloh10:
	adrp	x8, _ERRCODE_INSUFFICIENT_RESOURCES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_RESOURCES@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_errcode
Lloh13:
	adrp	x8, _maxAllocatedDescs@GOTPAGE
Lloh14:
	ldr	x8, [x8, _maxAllocatedDescs@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_2:
	bl	_ReleaseLruFiles
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_BasicOpenFilePerm
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	x19, x0
Lloh18:
	adrp	x8, _allocatedDescs@GOTPAGE
Lloh19:
	ldr	x8, [x8, _allocatedDescs@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _AllocateDescRawFD@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AllocateDescRawFD@GOTPAGEOFF]
	ldr	x10, [x23]
Lloh23:
	ldr	w9, [x9]
	mov	w11, #12
	madd	x20, x10, x11, x8
	stp	w0, w9, [x20, #4]
	bl	_GetCurrentSubTransactionId
	str	w0, [x20]
	ldr	x8, [x23]
	add	x8, x8, #1
	str	x8, [x23]
	b	LBB0_5
LBB0_4:
	mov	w19, #-1
LBB0_5:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpenTransientFile: Allocated %d (%s)"

	.comm	_numAllocatedDescs,8,3          ; @numAllocatedDescs
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INSUFFICIENT_RESOURCES,4,2 ; @ERRCODE_INSUFFICIENT_RESOURCES
l_.str.1:                               ; @.str.1
	.asciz	"exceeded maxAllocatedDescs (%d) while trying to open file \"%s\""

	.comm	_maxAllocatedDescs,4,2          ; @maxAllocatedDescs
	.comm	_allocatedDescs,8,3             ; @allocatedDescs
	.comm	_AllocateDescRawFD,4,2          ; @AllocateDescRawFD
.subsections_via_symbols
