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

#include "nimbase.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 tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ;
typedef struct tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg;
typedef struct tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg;
typedef struct tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA;
typedef struct tySequence__9ahcSjIErJohSBBFLwuF56Q tySequence__9ahcSjIErJohSBBFLwuF56Q;
typedef struct tySequence__9ahcSjIErJohSBBFLwuF56Q_Content tySequence__9ahcSjIErJohSBBFLwuF56Q_Content;
typedef struct tyObject_ItemId__N3z7uIvKCrk0S9cej5ew0nA tyObject_ItemId__N3z7uIvKCrk0S9cej5ew0nA;
typedef struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg tySequence__d8ZV4IMgHt9biik9cS9a0hrmg;
typedef struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content;
typedef struct tyObject_TLoc__KvQVlvKb6mbV567NQ0hMOw tyObject_TLoc__KvQVlvKb6mbV567NQ0hMOw;
typedef struct tyObject_TLib__sVuuRvQkiYNOUiPRZhmZig tyObject_TLib__sVuuRvQkiYNOUiPRZhmZig;
struct tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA {
	NU16 line;
	NI16 col;
	NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag__3UjGgL9bLM4RXBnoZJs9cviw;
typedef NU8 tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tySequence__9ahcSjIErJohSBBFLwuF56Q {
  NI len; tySequence__9ahcSjIErJohSBBFLwuF56Q_Content* p;
};
struct tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ {
	tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* typField;
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info;
	tySet_tyEnum_TNodeFlag__3UjGgL9bLM4RXBnoZJs9cviw flags;
	tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw kind;
union{
	struct {
	NI64 intVal;
} _kind_1;
	struct {
	NF floatVal;
} _kind_2;
	struct {
	NimStringV2 strVal;
} _kind_3;
	struct {
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* sym;
} _kind_4;
	struct {
	tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA* ident;
} _kind_5;
	struct {
	tySequence__9ahcSjIErJohSBBFLwuF56Q sons;
} _kind_6;
};
};
struct tyObject_ItemId__N3z7uIvKCrk0S9cej5ew0nA {
	NI32 module;
	NI32 item;
};
typedef NU8 tyEnum_TTypeKind__DYVdhzQ9cMfgoirdzGDwSCg;
typedef NU8 tyEnum_TCallingConvention__MvGn9cvx9bNYQKo7Hhd5GM9cQ;
typedef NU64 tySet_tyEnum_TTypeFlag__HJaExo9c84N85e9br9anJmV1A;
struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg {
  NI len; tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content* p;
};
typedef NU8 tyEnum_TLocKind__4f5UmCRM8alrCgj32FqIRQ;
typedef NU8 tyEnum_TStorageLoc__f19b6ZkRyh7BNPxlyjRbEGg;
typedef NU16 tySet_tyEnum_TLocFlag__Df76pxukl21zlyRFq9aa0Bg;
struct tyObject_TLoc__KvQVlvKb6mbV567NQ0hMOw {
	tyEnum_TLocKind__4f5UmCRM8alrCgj32FqIRQ k;
	tyEnum_TStorageLoc__f19b6ZkRyh7BNPxlyjRbEGg storage;
	tySet_tyEnum_TLocFlag__Df76pxukl21zlyRFq9aa0Bg flags;
	tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* lode;
	NimStringV2 snippet;
};
struct tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg {
	tyObject_ItemId__N3z7uIvKCrk0S9cej5ew0nA itemId;
	tyEnum_TTypeKind__DYVdhzQ9cMfgoirdzGDwSCg kind;
	tyEnum_TCallingConvention__MvGn9cvx9bNYQKo7Hhd5GM9cQ callConv;
	tySet_tyEnum_TTypeFlag__HJaExo9c84N85e9br9anJmV1A flags;
	tySequence__d8ZV4IMgHt9biik9cS9a0hrmg sons;
	tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n;
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* ownerField;
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* sym;
	NI64 size;
	NI16 align;
	NI16 paddingAtEnd;
	tyObject_TLoc__KvQVlvKb6mbV567NQ0hMOw loc;
	tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* typeInst;
	tyObject_ItemId__N3z7uIvKCrk0S9cej5ew0nA uniqueId;
};
typedef NU8 tyEnum_ViewTypeKind__29b0TWM75qypjUa6azRUxIw;
typedef NU16 tyEnum_TMagic__I3BbtzbLAKAfOym58MkGAg;
typedef NU8 tyEnum_TSymKind__9a75lHd9cV25XwN4jXXBmM0Q;
typedef NU64 tySet_tyEnum_TSymFlag__Ii9cPbwXR8ePKVRFOdTKpDg;
typedef NU32 tySet_tyEnum_TOption__LEwWf0yAgZkZx5Got2wGSQ;
struct tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg {
	tyObject_ItemId__N3z7uIvKCrk0S9cej5ew0nA itemId;
	tyEnum_TSymKind__9a75lHd9cV25XwN4jXXBmM0Q kind;
union{
	struct {
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* gcUnsafetyReason;
	tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* transformedBody;
} _kind_1;
	struct {
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* guard;
	NI bitsize;
	NI alignment;
} _kind_2;
};
	tyEnum_TMagic__I3BbtzbLAKAfOym58MkGAg magic;
	tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* typ;
	tyObject_TIdent__LG4CHFyohryWo9bzZeyjDjA* name;
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info;
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* ownerField;
	tySet_tyEnum_TSymFlag__Ii9cPbwXR8ePKVRFOdTKpDg flags;
	tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* ast;
	tySet_tyEnum_TOption__LEwWf0yAgZkZx5Got2wGSQ options;
	NI position;
	NI32 offset;
	NI32 disamb;
	tyObject_TLoc__KvQVlvKb6mbV567NQ0hMOw loc;
	tyObject_TLib__sVuuRvQkiYNOUiPRZhmZig* annex;
	tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* constraint;
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* instantiatedFrom;
};
struct tySequence__9ahcSjIErJohSBBFLwuF56Q_Content { NI cap; tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* data[SEQ_DECL_SIZE]; };
struct tySequence__d8ZV4IMgHt9biik9cS9a0hrmg_Content { NI cap; tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___ast_u3255)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ** dest_p0, tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* src_p1);
static N_INLINE(NI, len__ast_u3190)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p0);
N_LIB_PRIVATE N_NIMCALL(tyEnum_ViewTypeKind__29b0TWM75qypjUa6azRUxIw, classifyViewType__typeallowed_u552)(tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg* t_p0);
N_LIB_PRIVATE N_NIMCALL(tyEnum_TMagic__I3BbtzbLAKAfOym58MkGAg, getMagic__trees_u122)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* op_p0);
static N_INLINE(tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg*, owner__ast_u6254)(tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___ast_u4577)(tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg** dest_p0, tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* src_p1);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___ast_u4574)(tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___ast_u3252)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* dest_p0);
extern NIM_BOOL nimInErrorMode__system_u4143;
static N_INLINE(NI, len__ast_u3190)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p0) {
	NI result;
	NI T1_;
	T1_ = (*n_p0)._kind_6.sons.len;
	result = T1_;
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4143);
	return result;
}
static N_INLINE(tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg*, owner__ast_u6254)(tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* s_p0) {
	tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	eqcopy___ast_u4577(&result, (*s_p0).ownerField);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isDangerousLocation__semstrictfuncs_u6)(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p0, tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* owner_p1) {
	NIM_BOOL result;
	tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_2;
	NIM_BOOL hasDeref_1;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	n_2 = NIM_NIL;
	eqcopy___ast_u3255(&n_2, n_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	hasDeref_1 = NIM_FALSE;
	{
		while (1) {
			switch ((*n_2).kind) {
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)47):
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)65):
			{
				{
					if (!!(((*(*(*n_2)._kind_6.sons.p->data[((NI)0)]).typField).kind == ((tyEnum_TTypeKind__DYVdhzQ9cMfgoirdzGDwSCg)23)))) goto LA7_;
					hasDeref_1 = NIM_TRUE;
				}
LA7_: ;
				eqcopy___ast_u3255(&n_2, (*n_2)._kind_6.sons.p->data[((NI)0)]);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			}
			break;
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)42):
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)45) ... ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)46):
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)63) ... ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)64):
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)66) ... ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)67):
			{
				eqcopy___ast_u3255(&n_2, (*n_2)._kind_6.sons.p->data[((NI)0)]);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			}
			break;
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)58) ... ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)59):
			{
				eqcopy___ast_u3255(&n_2, (*n_2)._kind_6.sons.p->data[((NI)1)]);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			}
			break;
			case ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)26) ... ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)32):
			{
				{
					NI T14_;
					T14_ = (NI)0;
					T14_ = len__ast_u3190(n_2);
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					if (!(((NI)1) < T14_)) goto LA15_;
					{
						NIM_BOOL T19_;
						NIM_BOOL T20_;
						tyEnum_ViewTypeKind__29b0TWM75qypjUa6azRUxIw T22_;
						tyEnum_TMagic__I3BbtzbLAKAfOym58MkGAg T24_;
						T19_ = (NIM_BOOL)0;
						T20_ = (NIM_BOOL)0;
						T20_ = !(((*n_2).typField == ((tyObject_TType__8qAQZfpTDk89aeclTNn4d9cg*) NIM_NIL)));
						if (!(T20_)) goto LA21_;
						T22_ = (tyEnum_ViewTypeKind__29b0TWM75qypjUa6azRUxIw)0;
						T22_ = classifyViewType__typeallowed_u552((*n_2).typField);
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
						T20_ = !((T22_ == ((tyEnum_ViewTypeKind__29b0TWM75qypjUa6azRUxIw)0)));
LA21_: ;
						T19_ = T20_;
						if (T19_) goto LA23_;
						T24_ = (tyEnum_TMagic__I3BbtzbLAKAfOym58MkGAg)0;
						T24_ = getMagic__trees_u122(n_2);
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
						T19_ = (T24_ == ((tyEnum_TMagic__I3BbtzbLAKAfOym58MkGAg)124));
LA23_: ;
						if (!T19_) goto LA25_;
						eqcopy___ast_u3255(&n_2, (*n_2)._kind_6.sons.p->data[((NI)1)]);
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					}
					goto LA17_;
LA25_: ;
					{
						goto LA2;
					}
LA17_: ;
				}
				goto LA12_;
LA15_: ;
				{
					goto LA2;
				}
LA12_: ;
			}
			break;
			default:
			{
				goto LA2;
			}
			break;
			}
		}
	} LA2: ;
	{
		tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* colontmpD_;
		NIM_BOOL T34_;
		if (!((*n_2).kind == ((tyEnum_TNodeKind__eZrq5BxQzEyOryCcwdj4Kw)3))) goto LA32_;
		colontmpD_ = NIM_NIL;
		T34_ = (NIM_BOOL)0;
		T34_ = hasDeref_1;
		if (T34_) goto LA35_;
		colontmpD_ = owner__ast_u6254((*n_2)._kind_4.sym);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		T34_ = !((colontmpD_ == owner_p1));
LA35_: ;
		result = T34_;
		eqdestroy___ast_u4574(colontmpD_);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA30_;
LA32_: ;
	{
		result = hasDeref_1;
	}
LA30_: ;
	{
		LA1_:;
	}
	{
		oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
		eqdestroy___ast_u3252(n_2);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		*nimErr_ = oldNimErrFin1_;
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
