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

#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 NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw;
typedef struct tyObject_Defect__WFlDaIWu7hFOKoGSG7uH7g tyObject_Defect__WFlDaIWu7hFOKoGSG7uH7g;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ tySequence__S89cE01OvNjsN9c71FKsSrqQ;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content;
typedef struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct TNimTypeV2 {
	void* destructor;
	NI size;
	NI16 align;
	NI16 depth;
	NU32* display;
	void* traceImpl;
	void* typeInfoV1;
	NI flags;
	void* vTable[SEQ_DECL_SIZE];
};
struct RootObj {
	TNimTypeV2* m_type;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ {
  NI len; tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content* p;
};
struct Exception {
	RootObj Sup;
	Exception* parent;
	NCSTRING name;
	NimStringV2 message;
	tySequence__S89cE01OvNjsN9c71FKsSrqQ trace;
	Exception* up;
};
struct tyObject_Defect__WFlDaIWu7hFOKoGSG7uH7g {
	Exception Sup;
};
struct tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw {
	tyObject_Defect__WFlDaIWu7hFOKoGSG7uH7g Sup;
};
struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA {
	NCSTRING procname;
	NI line;
	NCSTRING filename;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content { NI cap; tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NOINLINE(void, raiseAssert__stdZassertions_u15)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, eqdup___system_u2697)(NimStringV2 src_p0);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
extern TNimTypeV2 NTIv2__AkhcRKr9ccpuvEuYF9cPAvsw_;
extern NIM_BOOL nimInErrorMode__system_u4138;
N_LIB_PRIVATE N_NOINLINE(void, raiseAssert__stdZassertions_u15)(NimStringV2 msg_p0) {
	NimStringV2 colontmpD_;
	tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw* T1_;
{	T1_ = NIM_NIL;
	T1_ = (tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw*) nimNewObj(sizeof(tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw), NIM_ALIGNOF(tyObject_AssertionDefect__AkhcRKr9ccpuvEuYF9cPAvsw));
	(*T1_).Sup.Sup.Sup.m_type = (&NTIv2__AkhcRKr9ccpuvEuYF9cPAvsw_);
	(*T1_).Sup.Sup.name = "AssertionDefect";
	colontmpD_ = eqdup___system_u2697(msg_p0);
	(*T1_).Sup.Sup.message = colontmpD_;
	(*T1_).Sup.Sup.parent = ((Exception*) NIM_NIL);
	raiseExceptionEx((Exception*)T1_, "AssertionDefect", "raiseAssert", "assertions.nim", 38);
goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4138);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u79)(NimStringV2 msg_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	raiseAssert__stdZassertions_u15(msg_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
