/* Generated by Nim Compiler v2.2.10 */
#define NIM_INTBITS 64

#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct tySequence__yUWoZehF86MIc40opFgacw tySequence__yUWoZehF86MIc40opFgacw;
typedef struct tySequence__yUWoZehF86MIc40opFgacw_Content tySequence__yUWoZehF86MIc40opFgacw_Content;
typedef struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg tySequence__d8ZV4IMgHt9biik9cS9a0hrmg;
typedef struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content;
typedef struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg;
typedef struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content;
typedef struct tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA;
typedef struct tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ;
typedef struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA tySequence__ZeWVlH6DqG79b1pTDhrrUYA;
typedef struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content;
typedef struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA tySequence__ZCZaCk14bTmSb6LMW9aWPVA;
typedef struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content;
typedef struct tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw;
typedef struct tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA;
typedef struct tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA;
typedef struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A;
typedef struct tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg;
typedef struct tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg;
struct tySequence__yUWoZehF86MIc40opFgacw {
  NI len; tySequence__yUWoZehF86MIc40opFgacw_Content* p;
};
struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg {
  NI len; tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content* p;
};
struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg {
  NI len; tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content* p;
};
struct tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA {
	NU16 line;
	NI16 col;
};
struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA {
  NI len; tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content* p;
};
struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA {
  NI len; tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content* p;
};
typedef NI tyArray__k7D0lwfLmYccbQxUd49bbcQ[34];
struct tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA {
	NI elems;
	NI counter;
	NI max;
	tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* head;
	tySequence__ZeWVlH6DqG79b1pTDhrrUYA data;
	tyArray__k7D0lwfLmYccbQxUd49bbcQ a;
};
struct tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw {
	tyObject_PackedSet__uMCH0vzAEgrsmOKwCWxFrA s;
	NI len;
};
struct tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ {
	tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg lineInfo;
	tySequence__ZCZaCk14bTmSb6LMW9aWPVA sym;
	tySequence__yUWoZehF86MIc40opFgacw caughtExceptions;
	tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw caughtExceptionsSet;
	tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw isDecl;
	tyObject_PackedBoolArray__1pk9boftqWMNDE1oh5HcIhw isGenericInstance;
	NI32 fileIndex;
	NIM_BOOL trackCaughtExceptions;
	NIM_BOOL isSorted;
};
struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A {
	NI rc;
	NI rootIdx;
};
typedef NU tyArray__KznKlIbW0OmA9ckg0NfmHVQ[8];
struct tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA {
	tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* next;
	NI key;
	tyArray__KznKlIbW0OmA9ckg0NfmHVQ bits;
};
struct tySequence__yUWoZehF86MIc40opFgacw_Content { NI cap; tySequence__d8ZV4IMgHt9biik9cS9a0hrmg data[SEQ_DECL_SIZE]; };
struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content { NI cap; tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* data[SEQ_DECL_SIZE]; };
struct tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg_Content { NI cap; tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA data[SEQ_DECL_SIZE]; };
struct tySequence__ZeWVlH6DqG79b1pTDhrrUYA_Content { NI cap; tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* data[SEQ_DECL_SIZE]; };
struct tySequence__ZCZaCk14bTmSb6LMW9aWPVA_Content { NI cap; tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___ast_u3311)(tySequence__d8ZV4IMgHt9biik9cS9a0hrmg dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_u100)(tySequence__ZeWVlH6DqG79b1pTDhrrUYA dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, unregisterCycle__system_u3127)(tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_u66)(tyObject_TrunkcolonObjectType___lmbdIZwAo9agPlTE1wBREkA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u858)(tySequence__yUWoZehF86MIc40opFgacw dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___ast_u4848)(tySequence__ZCZaCk14bTmSb6LMW9aWPVA dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u735)(tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg dest_p0);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__system_u2172)(void* a_p0, int v_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u858)(tySequence__yUWoZehF86MIc40opFgacw dest_p0) {
	NI colontmp_;
	colontmp_ = ((NI)0);
	{
		while (1) {
			NI T3_;
			T3_ = dest_p0.len;
			if (!(colontmp_ < T3_)) goto LA2;
			eqdestroy___ast_u3311(dest_p0.p->data[colontmp_]);
			colontmp_ += ((NI)1);
		} LA2: ;
	}
	if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
 alignedDealloc(dest_p0.p, NIM_ALIGNOF(tySequence__d8ZV4IMgHt9biik9cS9a0hrmg));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u735)(tySequence__9aCujOg9b8Xgx9aYJJEMRHVwg dest_p0) {
	if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
 alignedDealloc(dest_p0.p, NIM_ALIGNOF(tyObject_TinyLineInfo__qW2GTIPjeOQ42q9c2MPWLLA));
}
}
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastDyn)(void* p_p0) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u805(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
		cell_1 = ((tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A*) (T5_));
		{
			if (!((NI)((*cell_1).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u805((*cell_1).rc, ((NI)16));
		}
LA6_: ;
		{
			if (!result) goto LA13_;
			{
				if (!(((NI)0) < (*cell_1).rootIdx)) goto LA17_;
				unregisterCycle__system_u3127(cell_1);
			}
LA17_: ;
		}
LA13_: ;
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___suggestsymdb_u1099)(tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ* dest_p0) {
	eqdestroy___pureZcollectionsZintsets_u100((*dest_p0).isGenericInstance.s.data);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastDyn((*dest_p0).isGenericInstance.s.head);
		if (!T3_) goto LA4_;
		eqdestroy___pureZcollectionsZintsets_u66((&(*(*dest_p0).isGenericInstance.s.head)));
		nimRawDispose((*dest_p0).isGenericInstance.s.head, ((NI)8));
	}
LA4_: ;
	eqdestroy___pureZcollectionsZintsets_u100((*dest_p0).isDecl.s.data);
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastDyn((*dest_p0).isDecl.s.head);
		if (!T8_) goto LA9_;
		eqdestroy___pureZcollectionsZintsets_u66((&(*(*dest_p0).isDecl.s.head)));
		nimRawDispose((*dest_p0).isDecl.s.head, ((NI)8));
	}
LA9_: ;
	eqdestroy___pureZcollectionsZintsets_u100((*dest_p0).caughtExceptionsSet.s.data);
	{
		NIM_BOOL T13_;
		T13_ = (NIM_BOOL)0;
		T13_ = nimDecRefIsLastDyn((*dest_p0).caughtExceptionsSet.s.head);
		if (!T13_) goto LA14_;
		eqdestroy___pureZcollectionsZintsets_u66((&(*(*dest_p0).caughtExceptionsSet.s.head)));
		nimRawDispose((*dest_p0).caughtExceptionsSet.s.head, ((NI)8));
	}
LA14_: ;
	eqdestroy___suggestsymdb_u858((*dest_p0).caughtExceptions);
	eqdestroy___ast_u4848((*dest_p0).sym);
	eqdestroy___suggestsymdb_u735((*dest_p0).lineInfo);
}
static N_INLINE(void, nimSetMem__system_u2172)(void* a_p0, int v_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a_p0, v_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
	nimSetMem__system_u2172(p_p0, ((int)0), size_p1);
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___suggestsymdb_u1096)(tyObject_SuggestFileSymbolDatabase__o0ahEzaLn5a7TdNqH4OVqQ* dest_p0) {
	(*dest_p0).lineInfo.len = 0; (*dest_p0).lineInfo.p = NIM_NIL;
	(*dest_p0).sym.len = 0; (*dest_p0).sym.p = NIM_NIL;
	(*dest_p0).caughtExceptions.len = 0; (*dest_p0).caughtExceptions.p = NIM_NIL;
	(*dest_p0).caughtExceptionsSet.s.elems = 0;
	(*dest_p0).caughtExceptionsSet.s.counter = 0;
	(*dest_p0).caughtExceptionsSet.s.max = 0;
	(*dest_p0).caughtExceptionsSet.s.head = 0;
	(*dest_p0).caughtExceptionsSet.s.data.len = 0; (*dest_p0).caughtExceptionsSet.s.data.p = NIM_NIL;
	nimZeroMem((void*)(*dest_p0).caughtExceptionsSet.s.a, sizeof(tyArray__k7D0lwfLmYccbQxUd49bbcQ));
	(*dest_p0).caughtExceptionsSet.len = 0;
	(*dest_p0).isDecl.s.elems = 0;
	(*dest_p0).isDecl.s.counter = 0;
	(*dest_p0).isDecl.s.max = 0;
	(*dest_p0).isDecl.s.head = 0;
	(*dest_p0).isDecl.s.data.len = 0; (*dest_p0).isDecl.s.data.p = NIM_NIL;
	nimZeroMem((void*)(*dest_p0).isDecl.s.a, sizeof(tyArray__k7D0lwfLmYccbQxUd49bbcQ));
	(*dest_p0).isDecl.len = 0;
	(*dest_p0).isGenericInstance.s.elems = 0;
	(*dest_p0).isGenericInstance.s.counter = 0;
	(*dest_p0).isGenericInstance.s.max = 0;
	(*dest_p0).isGenericInstance.s.head = 0;
	(*dest_p0).isGenericInstance.s.data.len = 0; (*dest_p0).isGenericInstance.s.data.p = NIM_NIL;
	nimZeroMem((void*)(*dest_p0).isGenericInstance.s.a, sizeof(tyArray__k7D0lwfLmYccbQxUd49bbcQ));
	(*dest_p0).isGenericInstance.len = 0;
	(*dest_p0).fileIndex = 0;
	(*dest_p0).trackCaughtExceptions = 0;
	(*dest_p0).isSorted = 0;
}
