	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function capacity_resize
_capacity_resize:                       ## @capacity_resize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_min_capacity@GOTPCREL(%rip), %rax
	movq	_secsz@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	-1(%rcx), %esi
	movl	(%rax), %eax
	addl	%esi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r8d
	movq	_max_capacity@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movl	%esi, %eax
	cltd
	idivl	%ecx
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpl	%edi, %eax
	jge	LBB0_3
## %bb.2:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	cmpl	%edi, %r8d
	jle	LBB0_4
## %bb.5:
	movl	%r8d, %edi
	popq	%rbp
	jmp	_image_set_size                 ## TAILCALL
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_min_capacity,4,2               ## @min_capacity
	.comm	_secsz,4,2                      ## @secsz
	.comm	_max_capacity,4,2               ## @max_capacity
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_capacity_resize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function capacity_resize
_capacity_resize:                       ; @capacity_resize
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _secsz@GOTPAGE
Lloh1:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x10, _max_capacity@GOTPAGE
Lloh4:
	ldr	x10, [x10, _max_capacity@GOTPAGEOFF]
	sub	w9, w8, #1
Lloh5:
	ldr	w10, [x10]
	add	w10, w9, w10
	sdiv	w10, w10, w8
	cmp	w10, #0
	ccmp	w10, w0, #0, ne
	b.lt	LBB0_3
; %bb.1:
Lloh6:
	adrp	x10, _min_capacity@GOTPAGE
Lloh7:
	ldr	x10, [x10, _min_capacity@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	add	w9, w9, w10
	sdiv	w8, w9, w8
	cmp	w8, w0
	b.le	LBB0_4
; %bb.2:
	mov	x0, x8
	b	_image_set_size
LBB0_3:
Lloh9:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
LBB0_4:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_min_capacity,4,2               ; @min_capacity
	.comm	_secsz,4,2                      ; @secsz
	.comm	_max_capacity,4,2               ; @max_capacity
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_capacity_resize
.subsections_via_symbols
