	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function needpos
_needpos:                               ## @needpos
	.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
	movq	_needpos.npos(%rip), %r14
	cmpq	%rdi, %r14
	jae	LBB0_8
## %bb.1:
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rbx, %rbx
	cmpq	%rdi, %rbx
	jb	LBB0_4
	jmp	LBB0_5
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdi, %rbx
LBB0_5:
	movq	%rbx, _needpos.npos(%rip)
	movq	_positions@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_realloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
	movq	(%r15), %rax
	movq	_needpos.npos(%rip), %rbx
LBB0_7:
	addq	%r14, %rax
	subq	%r14, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_needpos.npos,8,3 ## @needpos.npos
	.comm	_positions,8,3                  ## @positions
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"realloc"

	.no_dead_strip	_needpos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function needpos
_needpos:                               ; @needpos
	.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
	adrp	x21, _needpos.npos@PAGE
	ldr	x20, [x21, _needpos.npos@PAGEOFF]
	cmp	x20, x0
	b.hs	LBB0_4
; %bb.1:
	cbz	x20, LBB0_5
; %bb.2:
	mov	x19, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x19, x19, #1
	cmp	x19, x0
	b.lo	LBB0_3
	b	LBB0_6
LBB0_4:
	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
LBB0_5:
	mov	x19, x0
LBB0_6:
	str	x19, [x21, _needpos.npos@PAGEOFF]
Lloh0:
	adrp	x22, _positions@GOTPAGE
Lloh1:
	ldr	x22, [x22, _positions@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	x1, x19
	bl	_realloc
	str	x0, [x22]
	cbnz	x0, LBB0_8
; %bb.7:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x0, [x22]
	ldr	x19, [x21, _needpos.npos@PAGEOFF]
LBB0_8:
	add	x0, x0, x20
	sub	x2, x19, x20
	mov	w1, #0
	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
	b	_memset
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_needpos.npos,8,3 ; @needpos.npos
	.comm	_positions,8,3                  ; @positions
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"realloc"

	.no_dead_strip	_needpos
.subsections_via_symbols
