	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reserveAllocatedDesc
_reserveAllocatedDesc:                  ## @reserveAllocatedDesc
	.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	_numAllocatedDescs@GOTPCREL(%rip), %rcx
	movq	_maxAllocatedDescs@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	$1, %ebx
	cmpl	%eax, (%rcx)
	jl	LBB0_7
## %bb.1:
	movq	_allocatedDescs@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.4:
	movq	_max_safe_fds@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %r13d
	shrl	$31, %r13d
	addl	%ecx, %r13d
	sarl	%r13d
	xorl	%ebx, %ebx
	cmpl	%eax, %r13d
	jle	LBB0_7
## %bb.5:
	leal	(,%r13,4), %esi
	callq	_realloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_7
LBB0_2:
	movq	_FD_MINFREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
	leal	(,%r13,4), %edi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_6:
	movq	%r14, (%r12)
	movl	%r13d, (%r15)
	movl	$1, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numAllocatedDescs,4,2          ## @numAllocatedDescs
	.comm	_maxAllocatedDescs,4,2          ## @maxAllocatedDescs
	.comm	_allocatedDescs,8,3             ## @allocatedDescs
	.comm	_FD_MINFREE,4,2                 ## @FD_MINFREE
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ## @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

	.comm	_max_safe_fds,4,2               ## @max_safe_fds
	.no_dead_strip	_reserveAllocatedDesc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reserveAllocatedDesc
_reserveAllocatedDesc:                  ; @reserveAllocatedDesc
	.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
Lloh0:
	adrp	x8, _numAllocatedDescs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numAllocatedDescs@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x21, _maxAllocatedDescs@GOTPAGE
Lloh4:
	ldr	x21, [x21, _maxAllocatedDescs@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w9, w8
	b.lt	LBB0_8
; %bb.1:
Lloh5:
	adrp	x22, _allocatedDescs@GOTPAGE
Lloh6:
	ldr	x22, [x22, _allocatedDescs@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x0, LBB0_5
; %bb.2:
Lloh7:
	adrp	x9, _max_safe_fds@GOTPAGE
Lloh8:
	ldr	x9, [x9, _max_safe_fds@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w23, w9, #1
	cmp	w23, w8
	b.le	LBB0_10
; %bb.3:
	lsl	w1, w23, #2
	bl	_realloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x19, x0
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _FD_MINFREE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FD_MINFREE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w23, w8, #1
	lsl	w0, w23, #2
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
Lloh16:
	adrp	x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_errcode
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_7:
	str	x19, [x22]
	str	w23, [x21]
LBB0_8:
	mov	w0, #1
LBB0_9:
	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
LBB0_10:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_numAllocatedDescs,4,2          ; @numAllocatedDescs
	.comm	_maxAllocatedDescs,4,2          ; @maxAllocatedDescs
	.comm	_allocatedDescs,8,3             ; @allocatedDescs
	.comm	_FD_MINFREE,4,2                 ; @FD_MINFREE
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ; @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

	.comm	_max_safe_fds,4,2               ; @max_safe_fds
	.no_dead_strip	_reserveAllocatedDesc
.subsections_via_symbols
