	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grow_memtuples
_grow_memtuples:                        ## @grow_memtuples
	.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
	xorl	%r14d, %r14d
	cmpl	$0, 24(%rdi)
	je	LBB0_13
## %bb.1:
	movq	%rdi, %r15
	movl	(%rdi), %ecx
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rax
	movq	%rdx, %rsi
	subq	%rax, %rsi
	cmpq	%rax, %rsi
	jle	LBB0_2
## %bb.4:
	cvtsi2sd	%rdx, %xmm0
	cvtsi2sd	%rsi, %xmm1
	divsd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ecx, %xmm1
	mulsd	%xmm0, %xmm1
	movq	_INT_MAX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%edx, %xmm0
	ucomisd	%xmm1, %xmm0
	cvttsd2si	%xmm1, %ebx
	cmovbel	%edx, %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_INT_MAX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	shrl	$31, %edx
	addl	%ebx, %edx
	sarl	%edx
	cmpl	%edx, %ecx
	jge	LBB0_5
## %bb.3:
	leal	(%rcx,%rcx), %ebx
	cmpl	%ecx, %ebx
	jg	LBB0_7
	jmp	LBB0_12
LBB0_5:
	movl	$0, 24(%r15)
	cmpl	%ecx, %ebx
	jle	LBB0_12
LBB0_7:
	movslq	%ebx, %rsi
	movq	_MaxAllocHugeSize@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	movq	%rdx, %rdi
	shrq	$3, %rdi
	cmpq	%rsi, %rdi
	ja	LBB0_9
## %bb.8:
	sarl	$3, %edx
	movl	$0, 24(%r15)
	movl	%edx, %ebx
LBB0_9:
	movl	%ebx, %edx
	subl	%ecx, %edx
	movslq	%edx, %rcx
	shlq	$3, %rcx
	cmpq	%rcx, %rax
	jge	LBB0_10
LBB0_12:
	movl	$0, 24(%r15)
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	32(%r15), %rdi
	callq	_GetMemoryChunkSpace
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_FREEMEM
	movl	%ebx, (%r15)
	movq	32(%r15), %rdi
	shll	$3, %ebx
	movl	%ebx, %esi
	callq	_repalloc_huge
	movq	%rax, 32(%r15)
	movq	%rax, %rdi
	callq	_GetMemoryChunkSpace
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_USEMEM
	movq	%r15, %rdi
	callq	_LACKMEM
	movl	$1, %r14d
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_MaxAllocHugeSize,4,2           ## @MaxAllocHugeSize
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected out-of-memory situation in tuplestore"

	.no_dead_strip	_grow_memtuples
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grow_memtuples
_grow_memtuples:                        ; @grow_memtuples
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	ldp	x10, x9, [x0, #8]
	sub	x11, x10, x9
	cmp	x11, x9
	b.le	LBB0_4
; %bb.2:
	scvtf	d0, x10
	scvtf	d1, x11
	scvtf	d2, w8
	fdiv	d0, d0, d1
Lloh0:
	adrp	x10, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	scvtf	d1, w10
	fmul	d0, d0, d2
	fcvtzs	w11, d0
	fcmp	d0, d1
	csel	w20, w11, w10, mi
	b	LBB0_6
LBB0_3:
	mov	w0, #0
	b	LBB0_14
LBB0_4:
Lloh3:
	adrp	x10, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _INT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x10]
	cmp	w20, #0
	cinc	w10, w20, lt
	cmp	w8, w10, asr #1
	b.ge	LBB0_6
; %bb.5:
	lsl	w20, w8, #1
	cmp	w20, w8
	b.le	LBB0_10
	b	LBB0_7
LBB0_6:
	str	wzr, [x19, #24]
	cmp	w20, w8
	b.le	LBB0_10
LBB0_7:
	sxtw	x11, w20
Lloh6:
	adrp	x10, _MaxAllocHugeSize@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MaxAllocHugeSize@GOTPAGEOFF]
Lloh8:
	ldrsw	x10, [x10]
	cmp	x11, x10, lsr #3
	b.lo	LBB0_9
; %bb.8:
	asr	w20, w10, #3
	str	wzr, [x19, #24]
LBB0_9:
	sub	w8, w20, w8
	cmp	x9, w8, sxtw #3
	b.ge	LBB0_11
LBB0_10:
	mov	w0, #0
	str	wzr, [x19, #24]
	b	LBB0_14
LBB0_11:
	ldr	x0, [x19, #32]
	bl	_GetMemoryChunkSpace
	mov	x1, x0
	mov	x0, x19
	bl	_FREEMEM
	str	w20, [x19]
	ldr	x0, [x19, #32]
	lsl	w1, w20, #3
	bl	_repalloc_huge
	str	x0, [x19, #32]
	bl	_GetMemoryChunkSpace
	mov	x1, x0
	mov	x0, x19
	bl	_USEMEM
	mov	x0, x19
	bl	_LACKMEM
	cbz	x0, LBB0_13
; %bb.12:
Lloh9:
	adrp	x8, _ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_13:
	mov	w0, #1
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_MaxAllocHugeSize,4,2           ; @MaxAllocHugeSize
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected out-of-memory situation in tuplestore"

	.no_dead_strip	_grow_memtuples
.subsections_via_symbols
