	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grow_array                     ## -- Begin function grow_array
	.p2align	4, 0x90
_grow_array:                            ## @grow_array
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%esi
	cmpl	%ecx, %eax
	jg	LBB0_2
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movl	$1, %edi
	callq	_exit_program
LBB0_2:
	cmpl	%ebx, (%r14)
	jge	LBB0_6
## %bb.3:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_av_realloc_array
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movl	$1, %edi
	callq	_exit_program
LBB0_5:
	movl	(%r14), %eax
	movl	%ebx, %edx
	subl	%eax, %edx
	imull	%r12d, %eax
	movslq	%eax, %rdi
	addq	%r15, %rdi
	imull	%r12d, %edx
	xorl	%esi, %esi
	callq	_memset
	movl	%ebx, (%r14)
LBB0_6:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Array too big.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not alloc buffer.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grow_array                     ; -- Begin function grow_array
	.p2align	2
_grow_array:                            ; @grow_array
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w8, w8, w1
	cmp	w8, w3
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
	mov	w0, #1
	bl	_exit_program
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, w19
	b.ge	LBB0_6
; %bb.3:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_av_realloc_array
	mov	x21, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
	mov	w0, #1
	bl	_exit_program
LBB0_5:
	ldr	w8, [x20]
	mul	w9, w8, w22
	add	x0, x21, w9, sxtw
	sub	w8, w19, w8
	mul	w2, w8, w22
	mov	w1, #0
	bl	_memset
	str	w19, [x20]
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Array too big.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not alloc buffer.\n"

.subsections_via_symbols
