	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmap_resize
_mmap_resize:                           ## @mmap_resize
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_chunksize
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_is_small
	testq	%rax, %rax
	je	LBB0_2
LBB0_10:
	xorl	%r13d, %r13d
LBB0_11:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_SIZE_T_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rbx, %rax
	cmpq	%rax, %r15
	jb	LBB0_4
## %bb.3:
	movq	%r15, %rax
	subq	%rbx, %rax
	movq	_mparams@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_11
LBB0_4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_IS_MMAPPED_BIT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	notq	%r14
	andq	(%r13), %r14
	addq	%r14, %r15
	movq	_MMAP_FOOT_PAD@GOTPCREL(%rip), %r12
	addq	(%r12), %r15
	movq	_SIX_SIZE_T_SIZES@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	_CHUNK_ALIGN_MASK@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mmap_align
	movq	%rax, %rbx
	subq	%r14, %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	movl	$1, %ecx
	callq	_CALL_MREMAP
	movq	_CMFAIL@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_10
## %bb.5:
	leaq	(%rax,%r14), %r13
	movq	(%r12), %rcx
	addq	%r14, %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r12
	subq	%rcx, %r12
	movq	_CINUSE_BIT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	%r12, %rcx
	movq	%rcx, 8(%rax,%r14)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_mark_inuse_foot
	movq	_FENCEPOST_HEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_chunk_plus_offset
	movl	%r14d, (%rax)
	movq	_SIZE_T_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_chunk_plus_offset
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, (%rax)
	cmpq	%rcx, (%rbx)
	jbe	LBB0_7
## %bb.6:
	movq	%rcx, (%rbx)
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subq	%r15, %rax
	addq	8(%rbx), %rax
	movq	%rax, 8(%rbx)
	cmpq	16(%rbx), %rax
	jbe	LBB0_9
## %bb.8:
	movq	%rax, 16(%rbx)
LBB0_9:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_check_mmapped_chunk
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_T_SIZE,8,3                ## @SIZE_T_SIZE
	.comm	_mparams,4,2                    ## @mparams
	.comm	_IS_MMAPPED_BIT,8,3             ## @IS_MMAPPED_BIT
	.comm	_MMAP_FOOT_PAD,8,3              ## @MMAP_FOOT_PAD
	.comm	_SIX_SIZE_T_SIZES,8,3           ## @SIX_SIZE_T_SIZES
	.comm	_CHUNK_ALIGN_MASK,8,3           ## @CHUNK_ALIGN_MASK
	.comm	_CMFAIL,8,3                     ## @CMFAIL
	.comm	_CINUSE_BIT,8,3                 ## @CINUSE_BIT
	.comm	_FENCEPOST_HEAD,4,2             ## @FENCEPOST_HEAD
	.no_dead_strip	_mmap_resize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmap_resize
_mmap_resize:                           ; @mmap_resize
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_chunksize
	mov	x21, x0
	mov	x0, x22
	bl	_is_small
	cbz	x0, LBB0_3
LBB0_1:
	mov	x20, #0
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh0:
	adrp	x25, _SIZE_T_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SIZE_T_SIZE@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x8, x8, x22
	cmp	x21, x8
	b.lo	LBB0_5
; %bb.4:
	sub	x8, x21, x22
Lloh2:
	adrp	x9, _mparams@GOTPAGE
Lloh3:
	ldr	x9, [x9, _mparams@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	lsl	w9, w9, #1
	cmp	x8, w9, sxtw
	b.ls	LBB0_2
LBB0_5:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _IS_MMAPPED_BIT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IS_MMAPPED_BIT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x26, _MMAP_FOOT_PAD@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MMAP_FOOT_PAD@GOTPAGEOFF]
	bic	x24, x8, x9
	ldr	x8, [x26]
	add	x9, x24, x21
	add	x21, x9, x8
Lloh10:
	adrp	x8, _SIX_SIZE_T_SIZES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SIX_SIZE_T_SIZES@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _CHUNK_ALIGN_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CHUNK_ALIGN_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x8, x8, x22
	add	x0, x8, x9
	bl	_mmap_align
	mov	x22, x0
	sub	x0, x20, x24
	mov	x1, x21
	mov	x2, x22
	mov	w3, #1
	bl	_CALL_MREMAP
Lloh16:
	adrp	x8, _CMFAIL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CMFAIL@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_1
; %bb.6:
	mov	x23, x0
	add	x20, x0, x24
	ldr	x8, [x26]
	add	x8, x24, x8
	sub	x24, x22, x8
Lloh19:
	adrp	x8, _CINUSE_BIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CINUSE_BIT@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	orr	x8, x24, x8
	str	x8, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	bl	_mark_inuse_foot
Lloh22:
	adrp	x8, _FENCEPOST_HEAD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FENCEPOST_HEAD@GOTPAGEOFF]
Lloh24:
	ldr	w26, [x8]
	mov	x0, x20
	mov	x1, x24
	bl	_chunk_plus_offset
	str	w26, [x0]
	ldr	x8, [x25]
	add	x1, x8, x24
	mov	x0, x20
	bl	_chunk_plus_offset
	str	wzr, [x0]
	ldr	x8, [x19]
	cmp	x8, x23
	b.ls	LBB0_8
; %bb.7:
	str	x23, [x19]
LBB0_8:
	ldp	x8, x9, [x19, #8]
	sub	x10, x22, x21
	add	x8, x8, x10
	str	x8, [x19, #8]
	cmp	x8, x9
	b.ls	LBB0_10
; %bb.9:
	str	x8, [x19, #16]
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	bl	_check_mmapped_chunk
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_T_SIZE,8,3                ; @SIZE_T_SIZE
	.comm	_mparams,4,2                    ; @mparams
	.comm	_IS_MMAPPED_BIT,8,3             ; @IS_MMAPPED_BIT
	.comm	_MMAP_FOOT_PAD,8,3              ; @MMAP_FOOT_PAD
	.comm	_SIX_SIZE_T_SIZES,8,3           ; @SIX_SIZE_T_SIZES
	.comm	_CHUNK_ALIGN_MASK,8,3           ; @CHUNK_ALIGN_MASK
	.comm	_CMFAIL,8,3                     ; @CMFAIL
	.comm	_CINUSE_BIT,8,3                 ; @CINUSE_BIT
	.comm	_FENCEPOST_HEAD,4,2             ; @FENCEPOST_HEAD
	.no_dead_strip	_mmap_resize
.subsections_via_symbols
