/* Generated by Nim Compiler v2.2.10 */
/* Compiled for: MacOSX, arm64, clang */
/* Command for C compiler:
   clang -c  -w -ferror-limit=3 -fno-strict-aliasing -pthread -isysroot /Applications/Xcode_16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -target arm64-apple-darwin24.2.0 -O3   -I/Users/runner/work/nightlies/nightlies/nim-2.2.10/lib -I/Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/src -o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@pstd@sformatfloat.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@pstd@sformatfloat.nim.c */
#define NIM_INTBITS 64
#define NIM_EmulateOverflowChecks

#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 NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA;
typedef struct tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA;
typedef struct tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q;
typedef struct tyObject_MulCmp__aUKFtFSCxNidPQvbARBNBg tyObject_MulCmp__aUKFtFSCxNidPQvbARBNBg;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
typedef NIM_CHAR tyArray__Dfv57DbDwULo55p3cZvdLQ[65];
struct tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA {
	NU64 bits;
};
struct tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA {
	NU64 significand;
	NI32 exponent;
};
struct tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q {
	NU64 hi;
	NU64 lo;
};
typedef tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q tyArray__Rt3n9cZJP08WdzDSs9aAtCog[619];
struct tyObject_MulCmp__aUKFtFSCxNidPQvbARBNBg {
	NU64 mul;
	NU64 cmp;
};
typedef tyObject_MulCmp__aUKFtFSCxNidPQvbARBNBg tyArray__6H7EDP5JpB9bCk9aW8SIDQDA[25];
typedef NIM_CHAR tyArray__wibmvjQ1EeuLKBPCOArWYQ[200];
typedef NI8 tyArray__XOZrHQUSCUwLl7PTrQGETw[100];
typedef NIM_CHAR tyArray__IYRuaDhIR1JRO1rvV8bcFg[16];
N_LIB_PRIVATE N_NIMCALL(NI, writeFloatToBufferRoundtrip__stdZformatfloat_u10)(NIM_CHAR* buf_p0, NF value_p1);
static N_INLINE(NI, toChars__stdZprivateZdragonbox_u679)(NIM_CHAR* buffer_p0, NI buffer_p0Len_0, NF v_p1, NIM_BOOL forceTrailingDotZero_p2);
N_LIB_PRIVATE N_NIMCALL(NU64, physicalSignificand__stdZprivateZdragonbox_u53)(tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA this_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA, constructDouble__stdZprivateZdragonbox_u50)(NF value_p0);
N_LIB_PRIVATE N_NIMCALL(NU64, physicalExponent__stdZprivateZdragonbox_u56)(tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA this_p0);
N_LIB_PRIVATE N_NIMCALL(NI, signBit__stdZprivateZdragonbox_u75)(tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA this_p0);
static N_INLINE(tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA, toDecimal64__stdZprivateZdragonbox_u431)(NU64 ieeeSignificand_p0, NU64 ieeeExponent_p1);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__system_u2188)(void* a_p0, int v_p1, NI size_p2);
static N_INLINE(NIM_BOOL, multipleOfPow2__stdZprivateZdragonbox_u189)(NU64 value_p0, NI32 e2_p1);
static N_INLINE(tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA, toDecimal64AsymmetricInterval__stdZprivateZdragonbox_u276)(NI32 e2_p0);
static N_INLINE(NI32, floorLog10ThreeQuartersPow2__stdZprivateZdragonbox_u107)(NI32 e_p0);
static N_INLINE(NI32, floorDivPow2__stdZprivateZdragonbox_u81)(NI32 x_p0, NI32 n_p1);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(NI32, floorLog2Pow10__stdZprivateZdragonbox_u89)(NI32 e_p0);
static N_INLINE(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q, computePow10__stdZprivateZdragonbox_u119)(NI32 k_p0);
static N_INLINE(NI32, floorLog10Pow2__stdZprivateZdragonbox_u98)(NI32 e_p0);
static N_INLINE(NU32, computeDelta__stdZprivateZdragonbox_u345)(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q pow10_p0, NI32 betaMinus1_p1);
static N_INLINE(NU64, mulShift__stdZprivateZdragonbox_u385)(NU64 x_p0, tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q y_p1);
static N_INLINE(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q, mul128__stdZprivateZdragonbox_u369)(NU64 a_p0, NU64 b_p1);
static N_INLINE(NU32, lo32__stdZprivateZdragonbox_u359)(NU64 x_p0);
static N_INLINE(NU32, hi32__stdZprivateZdragonbox_u362)(NU64 x_p0);
static N_INLINE(NIM_BOOL, isIntegralEndpoint__stdZprivateZdragonbox_u421)(NU64 twoF_p0, NI32 e2_p1, NI32 minusK_p2);
static N_INLINE(NIM_BOOL, multipleOfPow5__stdZprivateZdragonbox_u200)(NU64 value_p0, NI32 e5_p1);
static N_INLINE(NIM_BOOL, mulParity__stdZprivateZdragonbox_u403)(NU64 twoF_p0, tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q pow10_p1, NI32 betaMinus1_p2);
static N_INLINE(NIM_BOOL, isIntegralMidpoint__stdZprivateZdragonbox_u426)(NU64 twoF_p0, NI32 e2_p1, NI32 minusK_p2);
static N_INLINE(NI, formatDigits__stdZprivateZdragonbox_u693)(NIM_CHAR* buffer_p0, NI buffer_p0Len_0, NI pos_p1, NU64 digits_p2, NI decimalExponent_p3, NIM_BOOL forceTrailingDotZero_p4);
static N_INLINE(NI, decimalLength__stdZprivateZdragonbox_u640)(NU64 v_p0);
static N_INLINE(NI, printDecimalDigitsBackwards__stdZprivateZdragonbox_u515)(NIM_CHAR* buf_p0, NI buf_p0Len_0, NI pos_p1, NU64 output64_p2);
static N_INLINE(NI, utoa8DigitsSkipTrailingZeros__stdZprivateZdragonbox_u498)(NIM_CHAR* buf_p0, NI buf_p0Len_0, NI pos_p1, NU32 digits_p2);
static N_INLINE(void, utoa2Digits__stdZprivateZdigitsutils_u3)(NIM_CHAR* buf_p0, NI buf_p0Len_0, NI pos_p1, NU32 digits_p2);
static N_INLINE(NI, trailingZeros2Digits__stdZprivateZdigitsutils_u26)(NU32 digits_p0);
N_LIB_PRIVATE N_NIMCALL(void, addCstringN__stdZformatfloat_u2)(NimStringV2* result_p0, NCSTRING buf_p1, NI buflen_p2);
N_LIB_PRIVATE N_NIMCALL(void, setLengthStrV2)(NimStringV2* s_p0, NI newLen_p1);
extern NIM_CONST tyArray__Rt3n9cZJP08WdzDSs9aAtCog pow10__stdZprivateZdragonbox_u124;
extern NIM_CONST tyArray__6H7EDP5JpB9bCk9aW8SIDQDA mod5__stdZprivateZdragonbox_u207;
extern NIM_CONST tyArray__wibmvjQ1EeuLKBPCOArWYQ digits100__stdZprivateZdigitsutils_u2;
extern NIM_CONST tyArray__XOZrHQUSCUwLl7PTrQGETw trailingZeros100__stdZprivateZdigitsutils_u1;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4198;
static N_INLINE(void, nimSetMem__system_u2188)(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_u2188(p_p0, ((int)0), size_p1);
}
static N_INLINE(NIM_BOOL, multipleOfPow2__stdZprivateZdragonbox_u189)(NU64 value_p0, NI32 e2_p1) {
	NIM_BOOL result;
	NIM_BOOL T1_;
{	T1_ = (NIM_BOOL)0;
	T1_ = (e2_p1 < ((NI32)64));
	if (!(T1_)) goto LA2_;
	T1_ = ((NU64)(value_p0 & (NU64)((NU64)((NU64)((NU64)(1ULL) << (NU64)(e2_p1 & (64 - 1)))) - (NU64)(1ULL))) == 0ULL);
LA2_: ;
	result = T1_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI32, floorDivPow2__stdZprivateZdragonbox_u81)(NI32 x_p0, NI32 n_p1) {
	NI32 result;
{	result = (NI32)((NI32)(x_p0) >> (NU32)(n_p1 & (32 - 1)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4198);
	return result;
}
static N_INLINE(NI32, floorLog10ThreeQuartersPow2__stdZprivateZdragonbox_u107)(NI32 e_p0) {
	NI32 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI32)0;
	result = floorDivPow2__stdZprivateZdragonbox_u81((NI32)((NI32)(e_p0 * ((NI32)1262611)) - ((NI32)524031)), ((NI32)22));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI32, floorLog2Pow10__stdZprivateZdragonbox_u89)(NI32 e_p0) {
	NI32 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI32)0;
	result = floorDivPow2__stdZprivateZdragonbox_u81((NI32)(e_p0 * ((NI32)1741647)), ((NI32)19));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q, computePow10__stdZprivateZdragonbox_u119)(NI32 k_p0) {
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q result;
{	nimZeroMem((void*)(&result), sizeof(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q));
	result = pow10__stdZprivateZdragonbox_u124[((NI32)(k_p0 - ((NI32)-292)))- 0];
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA, toDecimal64AsymmetricInterval__stdZprivateZdragonbox_u276)(NI32 e2_p0) {
	tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA result;
	NI32 minusK_1;
	NI32 betaMinus1_1;
	NI32 T1_;
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q pow10_1;
	NU64 lowerEndpoint_1;
	NU64 upperEndpoint_1;
	NIM_BOOL lowerEndpointIsInteger_1;
	NIM_BOOL T2_;
	NU64 xi_1;
	NU64 zi_1;
	NU64 q_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&result), sizeof(tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA));
	minusK_1 = floorLog10ThreeQuartersPow2__stdZprivateZdragonbox_u107(e2_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T1_ = (NI32)0;
	T1_ = floorLog2Pow10__stdZprivateZdragonbox_u89(((NI32)-(minusK_1)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	betaMinus1_1 = (NI32)(e2_p0 + T1_);
	pow10_1 = computePow10__stdZprivateZdragonbox_u119(((NI32)-(minusK_1)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	lowerEndpoint_1 = (NU64)((NU64)((NU64)((NU64)(pow10_1.hi) - (NU64)((NU64)((NU64)(pow10_1.hi) >> (NU64)(((NI32)54) & (64 - 1)))))) >> (NU64)((NI32)(((NI32)11) - betaMinus1_1) & (64 - 1)));
	upperEndpoint_1 = (NU64)((NU64)((NU64)((NU64)(pow10_1.hi) + (NU64)((NU64)((NU64)(pow10_1.hi) >> (NU64)(((NI32)53) & (64 - 1)))))) >> (NU64)((NI32)(((NI32)11) - betaMinus1_1) & (64 - 1)));
	T2_ = (NIM_BOOL)0;
	T2_ = (((NI32)2) <= e2_p0);
	if (!(T2_)) goto LA3_;
	T2_ = (e2_p0 <= ((NI32)3));
LA3_: ;
	lowerEndpointIsInteger_1 = T2_;
	xi_1 = (NU64)((NU64)(lowerEndpoint_1) + (NU64)(((NU64) (!(lowerEndpointIsInteger_1)))));
	zi_1 = upperEndpoint_1;
	q_1 = (NU64)((NU64)(zi_1) / (NU64)(10ULL));
	{
		if (!((NU64)(xi_1) <= (NU64)((NU64)((NU64)(q_1) * (NU64)(10ULL))))) goto LA6_;
		result.significand = q_1;
		result.exponent = (NI32)(minusK_1 + ((NI32)1));
		goto BeforeRet_;
	}
LA6_: ;
	q_1 = (NU64)((NU64)((NU64)((NU64)((NU64)((NU64)(pow10_1.hi) >> (NU64)((NI32)(((NI32)10) - betaMinus1_1) & (64 - 1)))) + (NU64)(1ULL))) / (NU64)(2ULL));
	{
		if (!(e2_p0 == ((NI32)-77))) goto LA10_;
		q_1 -= !(((NU64)((NU64)(q_1) % (NU64)(2ULL)) == 0ULL));
	}
	goto LA8_;
LA10_: ;
	{
		q_1 += ((NU64)(q_1) < (NU64)(xi_1));
	}
LA8_: ;
	result.significand = q_1;
	result.exponent = minusK_1;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI32, floorLog10Pow2__stdZprivateZdragonbox_u98)(NI32 e_p0) {
	NI32 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI32)0;
	result = floorDivPow2__stdZprivateZdragonbox_u81((NI32)(e_p0 * ((NI32)1262611)), ((NI32)22));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NU32, computeDelta__stdZprivateZdragonbox_u345)(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q pow10_p0, NI32 betaMinus1_p1) {
	NU32 result;
{	result = (NU32)0;
	result = ((NU32) ((NU64)((NU64)(pow10_p0.hi) >> (NU64)((NI32)(((NI32)63) - betaMinus1_p1) & (64 - 1)))));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NU32, lo32__stdZprivateZdragonbox_u359)(NU64 x_p0) {
	NU32 result;
{	result = ((NU32) (x_p0));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NU32, hi32__stdZprivateZdragonbox_u362)(NU64 x_p0) {
	NU32 result;
{	result = ((NU32) ((NU64)((NU64)(x_p0) >> (NU64)(((NI)32) & (64 - 1)))));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q, mul128__stdZprivateZdragonbox_u369)(NU64 a_p0, NU64 b_p1) {
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q result;
	NU64 b00_1;
	NU32 T1_;
	NU32 T2_;
	NU64 b01_1;
	NU32 T3_;
	NU32 T4_;
	NU64 b10_1;
	NU32 T5_;
	NU32 T6_;
	NU64 b11_1;
	NU32 T7_;
	NU32 T8_;
	NU64 mid1_1;
	NU32 T9_;
	NU64 mid2_1;
	NU32 T10_;
	NU64 hi_1;
	NU32 T11_;
	NU32 T12_;
	NU64 lo_1;
	NU32 T13_;
	NU32 T14_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&result), sizeof(tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q));
	T1_ = (NU32)0;
	T1_ = lo32__stdZprivateZdragonbox_u359(a_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T2_ = (NU32)0;
	T2_ = lo32__stdZprivateZdragonbox_u359(b_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	b00_1 = (NU64)((NU64)(((NU64) (T1_))) * (NU64)(((NU64) (T2_))));
	T3_ = (NU32)0;
	T3_ = lo32__stdZprivateZdragonbox_u359(a_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T4_ = (NU32)0;
	T4_ = hi32__stdZprivateZdragonbox_u362(b_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	b01_1 = (NU64)((NU64)(((NU64) (T3_))) * (NU64)(((NU64) (T4_))));
	T5_ = (NU32)0;
	T5_ = hi32__stdZprivateZdragonbox_u362(a_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T6_ = (NU32)0;
	T6_ = lo32__stdZprivateZdragonbox_u359(b_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	b10_1 = (NU64)((NU64)(((NU64) (T5_))) * (NU64)(((NU64) (T6_))));
	T7_ = (NU32)0;
	T7_ = hi32__stdZprivateZdragonbox_u362(a_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T8_ = (NU32)0;
	T8_ = hi32__stdZprivateZdragonbox_u362(b_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	b11_1 = (NU64)((NU64)(((NU64) (T7_))) * (NU64)(((NU64) (T8_))));
	T9_ = (NU32)0;
	T9_ = hi32__stdZprivateZdragonbox_u362(b00_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	mid1_1 = (NU64)((NU64)(b10_1) + (NU64)(((NU64) (T9_))));
	T10_ = (NU32)0;
	T10_ = lo32__stdZprivateZdragonbox_u359(mid1_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	mid2_1 = (NU64)((NU64)(b01_1) + (NU64)(((NU64) (T10_))));
	T11_ = (NU32)0;
	T11_ = hi32__stdZprivateZdragonbox_u362(mid1_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T12_ = (NU32)0;
	T12_ = hi32__stdZprivateZdragonbox_u362(mid2_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	hi_1 = (NU64)((NU64)((NU64)((NU64)(b11_1) + (NU64)(((NU64) (T11_))))) + (NU64)(((NU64) (T12_))));
	T13_ = (NU32)0;
	T13_ = lo32__stdZprivateZdragonbox_u359(b00_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T14_ = (NU32)0;
	T14_ = lo32__stdZprivateZdragonbox_u359(mid2_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	lo_1 = (NU64)(((NU64) (T13_)) | (NU64)((NU64)(((NU64) (T14_))) << (NU64)(((NI)32) & (64 - 1))));
	result.hi = hi_1;
	result.lo = lo_1;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NU64, mulShift__stdZprivateZdragonbox_u385)(NU64 x_p0, tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q y_p1) {
	NU64 result;
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q p1_1;
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q p0_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NU64)0;
	p1_1 = mul128__stdZprivateZdragonbox_u369(x_p0, y_p1.hi);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	p0_1 = mul128__stdZprivateZdragonbox_u369(x_p0, y_p1.lo);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	p1_1.lo += p0_1.hi;
	p1_1.hi += ((NU64)(p1_1.lo) < (NU64)(p0_1.hi));
	result = p1_1.hi;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, multipleOfPow5__stdZprivateZdragonbox_u200)(NU64 value_p0, NI32 e5_p1) {
	NIM_BOOL result;
	tyObject_MulCmp__aUKFtFSCxNidPQvbARBNBg m5_1;
{	m5_1 = mod5__stdZprivateZdragonbox_u207[(e5_p1)- 0];
	result = ((NU64)((NU64)((NU64)(value_p0) * (NU64)(m5_1.mul))) <= (NU64)(m5_1.cmp));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, isIntegralEndpoint__stdZprivateZdragonbox_u421)(NU64 twoF_p0, NI32 e2_p1, NI32 minusK_p2) {
	NIM_BOOL result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	{
		if (!(e2_p1 < ((NI32)-2))) goto LA3_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
LA3_: ;
	{
		if (!(e2_p1 <= ((NI32)9))) goto LA7_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
LA7_: ;
	{
		if (!(e2_p1 <= ((NI32)86))) goto LA11_;
		result = multipleOfPow5__stdZprivateZdragonbox_u200(twoF_p0, minusK_p2);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		goto BeforeRet_;
	}
LA11_: ;
	result = NIM_FALSE;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, mulParity__stdZprivateZdragonbox_u403)(NU64 twoF_p0, tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q pow10_p1, NI32 betaMinus1_p2) {
	NIM_BOOL result;
	NU64 p01_1;
	NU64 p10_1;
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q T1_;
	NU64 mid_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	p01_1 = (NU64)((NU64)(twoF_p0) * (NU64)(pow10_p1.hi));
	T1_ = mul128__stdZprivateZdragonbox_u369(twoF_p0, pow10_p1.lo);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	p10_1 = T1_.hi;
	mid_1 = (NU64)((NU64)(p01_1) + (NU64)(p10_1));
	result = !(((NU64)(mid_1 & (NU64)((NU64)(1ULL) << (NU64)((NI32)(((NI32)64) - betaMinus1_p2) & (64 - 1)))) == 0ULL));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, isIntegralMidpoint__stdZprivateZdragonbox_u426)(NU64 twoF_p0, NI32 e2_p1, NI32 minusK_p2) {
	NIM_BOOL result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	{
		if (!(e2_p1 < ((NI32)-4))) goto LA3_;
		result = multipleOfPow2__stdZprivateZdragonbox_u189(twoF_p0, (NI32)((NI32)(minusK_p2 - e2_p1) + ((NI32)1)));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		goto BeforeRet_;
	}
LA3_: ;
	{
		if (!(e2_p1 <= ((NI32)9))) goto LA7_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
LA7_: ;
	{
		if (!(e2_p1 <= ((NI32)86))) goto LA11_;
		result = multipleOfPow5__stdZprivateZdragonbox_u200(twoF_p0, minusK_p2);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		goto BeforeRet_;
	}
LA11_: ;
	result = NIM_FALSE;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA, toDecimal64__stdZprivateZdragonbox_u431)(NU64 ieeeSignificand_p0, NU64 ieeeExponent_p1) {
	tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA result;
	NU64 m2_1;
	NI32 e2_1;
	NIM_BOOL isEven_1;
	NIM_BOOL acceptLower_1;
	NIM_BOOL acceptUpper_1;
	NI32 minusK_1;
	NI32 T20_;
	NI32 betaMinus1_1;
	NI32 T21_;
	tyObject_uint64x2__v6RkEcLjGqWNagDoet9aI2Q pow10_1;
	NU32 delta_1;
	NU64 twoFl_1;
	NU64 twoFc_1;
	NU64 twoFr_1;
	NU64 zi_1;
	NU64 q_1;
	NU32 r_1;
	NU32 dist_1;
	NU32 distQ_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&result), sizeof(tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA));
	m2_1 = (NU64)0;
	e2_1 = (NI32)0;
	{
		if (!!((ieeeExponent_p1 == 0ULL))) goto LA3_;
		m2_1 = (NU64)(4503599627370496ULL | ieeeSignificand_p0);
		e2_1 = (NI32)(((NI32) (ieeeExponent_p1)) - ((NI32)1075));
		{
			NIM_BOOL T7_;
			NIM_BOOL T8_;
			T7_ = (NIM_BOOL)0;
			T8_ = (NIM_BOOL)0;
			T8_ = (((NI32)0) <= ((NI32)-(e2_1)));
			if (!(T8_)) goto LA9_;
			T8_ = (((NI32)-(e2_1)) < ((NI32)53));
LA9_: ;
			T7_ = T8_;
			if (!(T7_)) goto LA10_;
			T7_ = multipleOfPow2__stdZprivateZdragonbox_u189(m2_1, ((NI32)-(e2_1)));
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
LA10_: ;
			if (!T7_) goto LA11_;
			result.significand = (NU64)((NU64)(m2_1) >> (NU64)(((NI32)-(e2_1)) & (64 - 1)));
			result.exponent = ((NI32)0);
			goto BeforeRet_;
		}
LA11_: ;
		{
			NIM_BOOL T15_;
			T15_ = (NIM_BOOL)0;
			T15_ = (ieeeSignificand_p0 == 0ULL);
			if (!(T15_)) goto LA16_;
			T15_ = ((NU64)(1ULL) < (NU64)(ieeeExponent_p1));
LA16_: ;
			if (!T15_) goto LA17_;
			result = toDecimal64AsymmetricInterval__stdZprivateZdragonbox_u276(e2_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			goto BeforeRet_;
		}
LA17_: ;
	}
	goto LA1_;
LA3_: ;
	{
		m2_1 = ieeeSignificand_p0;
		e2_1 = ((NI32)-1074);
	}
LA1_: ;
	isEven_1 = ((NU64)((NU64)(m2_1) % (NU64)(2ULL)) == 0ULL);
	acceptLower_1 = isEven_1;
	acceptUpper_1 = isEven_1;
	T20_ = (NI32)0;
	T20_ = floorLog10Pow2__stdZprivateZdragonbox_u98(e2_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	minusK_1 = (NI32)(T20_ - ((NI32)2));
	T21_ = (NI32)0;
	T21_ = floorLog2Pow10__stdZprivateZdragonbox_u89(((NI32)-(minusK_1)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	betaMinus1_1 = (NI32)(e2_1 + T21_);
	pow10_1 = computePow10__stdZprivateZdragonbox_u119(((NI32)-(minusK_1)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	delta_1 = computeDelta__stdZprivateZdragonbox_u345(pow10_1, betaMinus1_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	twoFl_1 = (NU64)((NU64)((NU64)((NU64)(2ULL) * (NU64)(m2_1))) - (NU64)(1ULL));
	twoFc_1 = (NU64)((NU64)(2ULL) * (NU64)(m2_1));
	twoFr_1 = (NU64)((NU64)((NU64)((NU64)(2ULL) * (NU64)(m2_1))) + (NU64)(1ULL));
	zi_1 = mulShift__stdZprivateZdragonbox_u385((NU64)((NU64)(twoFr_1) << (NU64)(betaMinus1_1 & (64 - 1))), pow10_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	q_1 = (NU64)((NU64)(zi_1) / (NU64)(1000ULL));
	r_1 = (NU32)((NU32)(((NU32) (zi_1))) - (NU32)((NU32)((NU32)(((NU32)1000)) * (NU32)(((NU32) (q_1))))));
	{
		if (!((NU32)(r_1) < (NU32)(delta_1))) goto LA24_;
		{
			NIM_BOOL T28_;
			NIM_BOOL T29_;
			NIM_BOOL T32_;
			T28_ = (NIM_BOOL)0;
			T29_ = (NIM_BOOL)0;
			T29_ = !((r_1 == ((NU32)0)));
			if (T29_) goto LA30_;
			T29_ = acceptUpper_1;
LA30_: ;
			T28_ = T29_;
			if (T28_) goto LA31_;
			T32_ = (NIM_BOOL)0;
			T32_ = isIntegralEndpoint__stdZprivateZdragonbox_u421(twoFr_1, e2_1, minusK_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			T28_ = !(T32_);
LA31_: ;
			if (!T28_) goto LA33_;
			result.significand = q_1;
			result.exponent = (NI32)((NI32)(minusK_1 + ((NI32)2)) + ((NI32)1));
			goto BeforeRet_;
		}
LA33_: ;
		q_1 -= ((NI)1);
		r_1 = ((NU32)1000);
	}
	goto LA22_;
LA24_: ;
	{
		if (!(r_1 == delta_1)) goto LA36_;
		{
			NIM_BOOL T40_;
			NIM_BOOL T41_;
			T40_ = (NIM_BOOL)0;
			T41_ = (NIM_BOOL)0;
			T41_ = acceptLower_1;
			if (!(T41_)) goto LA42_;
			T41_ = isIntegralEndpoint__stdZprivateZdragonbox_u421(twoFl_1, e2_1, minusK_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
LA42_: ;
			T40_ = T41_;
			if (T40_) goto LA43_;
			T40_ = mulParity__stdZprivateZdragonbox_u403(twoFl_1, pow10_1, betaMinus1_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
LA43_: ;
			if (!T40_) goto LA44_;
			result.significand = q_1;
			result.exponent = (NI32)((NI32)(minusK_1 + ((NI32)2)) + ((NI32)1));
			goto BeforeRet_;
		}
LA44_: ;
	}
	goto LA22_;
LA36_: ;
	{
	}
LA22_: ;
	q_1 = (NU64)((NU64)(q_1) * (NU64)(10ULL));
	dist_1 = (NU32)((NU32)((NU32)((NU32)(r_1) - (NU32)((NU32)((NU32)(delta_1) / (NU32)(((NU32)2)))))) + (NU32)(((NU32)50)));
	distQ_1 = (NU32)((NU32)(dist_1) / (NU32)(((NU32)100)));
	q_1 += ((NU64) (distQ_1));
	{
		NIM_BOOL approxYParity_1;
		if (!(dist_1 == (NU32)((NU32)(distQ_1) * (NU32)(((NU32)100))))) goto LA49_;
		approxYParity_1 = !(((NU32)(dist_1 & ((NU32)1)) == ((NU32)0)));
		{
			NIM_BOOL T53_;
			T53_ = (NIM_BOOL)0;
			T53_ = mulParity__stdZprivateZdragonbox_u403(twoFc_1, pow10_1, betaMinus1_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!!((T53_ == approxYParity_1))) goto LA54_;
			q_1 -= ((NI)1);
		}
		goto LA51_;
LA54_: ;
		{
			NIM_BOOL T57_;
			T57_ = (NIM_BOOL)0;
			T57_ = !(((NU64)((NU64)(q_1) % (NU64)(2ULL)) == 0ULL));
			if (!(T57_)) goto LA58_;
			T57_ = isIntegralMidpoint__stdZprivateZdragonbox_u426(twoFc_1, e2_1, minusK_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
LA58_: ;
			if (!T57_) goto LA59_;
			q_1 -= ((NI)1);
		}
		goto LA51_;
LA59_: ;
LA51_: ;
	}
LA49_: ;
	result.significand = q_1;
	result.exponent = (NI32)(minusK_1 + ((NI32)2));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, decimalLength__stdZprivateZdragonbox_u640)(NU64 v_p0) {
	NI result;
	NU32 v32_1;
{	{
		if (!!((((NU32) ((NU64)((NU64)(v_p0) >> (NU64)(((NI)32) & (64 - 1))))) == ((NU32)0)))) goto LA3_;
		{
			if (!((NU64)(10000000000000000ULL) <= (NU64)(v_p0))) goto LA7_;
			result = ((NI)17);
			goto BeforeRet_;
		}
LA7_: ;
		{
			if (!((NU64)(1000000000000000ULL) <= (NU64)(v_p0))) goto LA11_;
			result = ((NI)16);
			goto BeforeRet_;
		}
LA11_: ;
		{
			if (!((NU64)(100000000000000ULL) <= (NU64)(v_p0))) goto LA15_;
			result = ((NI)15);
			goto BeforeRet_;
		}
LA15_: ;
		{
			if (!((NU64)(10000000000000ULL) <= (NU64)(v_p0))) goto LA19_;
			result = ((NI)14);
			goto BeforeRet_;
		}
LA19_: ;
		{
			if (!((NU64)(1000000000000ULL) <= (NU64)(v_p0))) goto LA23_;
			result = ((NI)13);
			goto BeforeRet_;
		}
LA23_: ;
		{
			if (!((NU64)(100000000000ULL) <= (NU64)(v_p0))) goto LA27_;
			result = ((NI)12);
			goto BeforeRet_;
		}
LA27_: ;
		{
			if (!((NU64)(10000000000ULL) <= (NU64)(v_p0))) goto LA31_;
			result = ((NI)11);
			goto BeforeRet_;
		}
LA31_: ;
		result = ((NI)10);
		goto BeforeRet_;
	}
LA3_: ;
	v32_1 = ((NU32) (v_p0));
	{
		if (!((NU32)(((NU32)1000000000)) <= (NU32)(v32_1))) goto LA35_;
		result = ((NI)10);
		goto BeforeRet_;
	}
LA35_: ;
	{
		if (!((NU32)(((NU32)100000000)) <= (NU32)(v32_1))) goto LA39_;
		result = ((NI)9);
		goto BeforeRet_;
	}
LA39_: ;
	{
		if (!((NU32)(((NU32)10000000)) <= (NU32)(v32_1))) goto LA43_;
		result = ((NI)8);
		goto BeforeRet_;
	}
LA43_: ;
	{
		if (!((NU32)(((NU32)1000000)) <= (NU32)(v32_1))) goto LA47_;
		result = ((NI)7);
		goto BeforeRet_;
	}
LA47_: ;
	{
		if (!((NU32)(((NU32)100000)) <= (NU32)(v32_1))) goto LA51_;
		result = ((NI)6);
		goto BeforeRet_;
	}
LA51_: ;
	{
		if (!((NU32)(((NU32)10000)) <= (NU32)(v32_1))) goto LA55_;
		result = ((NI)5);
		goto BeforeRet_;
	}
LA55_: ;
	{
		if (!((NU32)(((NU32)1000)) <= (NU32)(v32_1))) goto LA59_;
		result = ((NI)4);
		goto BeforeRet_;
	}
LA59_: ;
	{
		if (!((NU32)(((NU32)100)) <= (NU32)(v32_1))) goto LA63_;
		result = ((NI)3);
		goto BeforeRet_;
	}
LA63_: ;
	{
		if (!((NU32)(((NU32)10)) <= (NU32)(v32_1))) goto LA67_;
		result = ((NI)2);
		goto BeforeRet_;
	}
LA67_: ;
	result = ((NI)1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, utoa2Digits__stdZprivateZdigitsutils_u3)(NIM_CHAR* buf_p0, NI buf_p0Len_0, NI pos_p1, NU32 digits_p2) {
	buf_p0[pos_p1] = digits100__stdZprivateZdigitsutils_u2[((NU32)((NU32)(((NU32)2)) * (NU32)(digits_p2)))- 0];
	buf_p0[(NI)(pos_p1 + ((NI)1))] = digits100__stdZprivateZdigitsutils_u2[((NU32)((NU32)((NU32)((NU32)(((NU32)2)) * (NU32)(digits_p2))) + (NU32)(((NU32)1))))- 0];
}
static N_INLINE(NI, trailingZeros2Digits__stdZprivateZdigitsutils_u26)(NU32 digits_p0) {
	NI result;
	result = ((NI) (trailingZeros100__stdZprivateZdigitsutils_u1[(digits_p0)- 0]));
	return result;
}
static N_INLINE(NI, utoa8DigitsSkipTrailingZeros__stdZprivateZdragonbox_u498)(NIM_CHAR* buf_p0, NI buf_p0Len_0, NI pos_p1, NU32 digits_p2) {
	NI result;
	NU32 q_1;
	NU32 r_1;
	NU32 qH_1;
	NU32 qL_1;
{	result = (NI)0;
	q_1 = (NU32)((NU32)(digits_p2) / (NU32)(((NU32)10000)));
	r_1 = (NU32)((NU32)(digits_p2) % (NU32)(((NU32)10000)));
	qH_1 = (NU32)((NU32)(q_1) / (NU32)(((NU32)100)));
	qL_1 = (NU32)((NU32)(q_1) % (NU32)(((NU32)100)));
	utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, pos_p1, qH_1);
	utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, (NI)(pos_p1 + ((NI)2)), qL_1);
	{
		NU32 colontmpD_;
		NU32 colontmpD__2;
		NI colontmpD__3;
		NI colontmpD__4;
		NU32 T5_;
		NI T11_;
		NI T12_;
		if (!(r_1 == ((NU32)0))) goto LA3_;
		colontmpD_ = (NU32)0;
		colontmpD__2 = (NU32)0;
		colontmpD__3 = (NI)0;
		colontmpD__4 = (NI)0;
		T5_ = (NU32)0;
		{
			if (!(qL_1 == ((NU32)0))) goto LA8_;
			colontmpD_ = qH_1;
			T5_ = colontmpD_;
		}
		goto LA6_;
LA8_: ;
		{
			colontmpD__2 = qL_1;
			T5_ = colontmpD__2;
		}
LA6_: ;
		T11_ = (NI)0;
		T11_ = trailingZeros2Digits__stdZprivateZdigitsutils_u26(T5_);
		T12_ = (NI)0;
		{
			if (!(qL_1 == ((NU32)0))) goto LA15_;
			colontmpD__3 = ((NI)6);
			T12_ = colontmpD__3;
		}
		goto LA13_;
LA15_: ;
		{
			colontmpD__4 = ((NI)4);
			T12_ = colontmpD__4;
		}
LA13_: ;
		result = (NI)(T11_ + T12_);
		goto BeforeRet_;
	}
	goto LA1_;
LA3_: ;
	{
		NU32 colontmpD__5;
		NU32 colontmpD__6;
		NI colontmpD__7;
		NI colontmpD__8;
		NU32 rH_1;
		NU32 rL_1;
		NU32 T19_;
		NI T25_;
		NI T26_;
		colontmpD__5 = (NU32)0;
		colontmpD__6 = (NU32)0;
		colontmpD__7 = (NI)0;
		colontmpD__8 = (NI)0;
		rH_1 = (NU32)((NU32)(r_1) / (NU32)(((NU32)100)));
		rL_1 = (NU32)((NU32)(r_1) % (NU32)(((NU32)100)));
		utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, (NI)(pos_p1 + ((NI)4)), rH_1);
		utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, (NI)(pos_p1 + ((NI)6)), rL_1);
		T19_ = (NU32)0;
		{
			if (!(rL_1 == ((NU32)0))) goto LA22_;
			colontmpD__5 = rH_1;
			T19_ = colontmpD__5;
		}
		goto LA20_;
LA22_: ;
		{
			colontmpD__6 = rL_1;
			T19_ = colontmpD__6;
		}
LA20_: ;
		T25_ = (NI)0;
		T25_ = trailingZeros2Digits__stdZprivateZdigitsutils_u26(T19_);
		T26_ = (NI)0;
		{
			if (!(rL_1 == ((NU32)0))) goto LA29_;
			colontmpD__7 = ((NI)2);
			T26_ = colontmpD__7;
		}
		goto LA27_;
LA29_: ;
		{
			colontmpD__8 = ((NI)0);
			T26_ = colontmpD__8;
		}
LA27_: ;
		result = (NI)(T25_ + T26_);
		goto BeforeRet_;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, printDecimalDigitsBackwards__stdZprivateZdragonbox_u515)(NIM_CHAR* buf_p0, NI buf_p0Len_0, NI pos_p1, NU64 output64_p2) {
	NI result;
	NI pos_2;
	NU64 output64_2;
	NI tz_1;
	NI nd_1;
	NU32 output_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	pos_2 = pos_p1;
	output64_2 = output64_p2;
	tz_1 = ((NI)0);
	nd_1 = ((NI)0);
	{
		NU64 q_1;
		NU32 r_1;
		if (!((NU64)(100000000ULL) <= (NU64)(output64_2))) goto LA3_;
		q_1 = (NU64)((NU64)(output64_2) / (NU64)(100000000ULL));
		r_1 = ((NU32) ((NU64)((NU64)(output64_2) % (NU64)(100000000ULL))));
		output64_2 = q_1;
		pos_2 -= ((NI)8);
		{
			if (!!((r_1 == ((NU32)0)))) goto LA7_;
			tz_1 = utoa8DigitsSkipTrailingZeros__stdZprivateZdragonbox_u498(buf_p0, buf_p0Len_0, pos_2, r_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		goto LA5_;
LA7_: ;
		{
			tz_1 = ((NI)8);
		}
LA5_: ;
		nd_1 = ((NI)8);
	}
LA3_: ;
	output_1 = ((NU32) (output64_2));
	{
		NU32 q_2;
		NU32 r_2;
		if (!((NU32)(((NU32)10000)) <= (NU32)(output_1))) goto LA12_;
		q_2 = (NU32)((NU32)(output_1) / (NU32)(((NU32)10000)));
		r_2 = (NU32)((NU32)(output_1) % (NU32)(((NU32)10000)));
		output_1 = q_2;
		pos_2 -= ((NI)4);
		{
			NU32 rH_1;
			NU32 rL_1;
			if (!!((r_2 == ((NU32)0)))) goto LA16_;
			rH_1 = (NU32)((NU32)(r_2) / (NU32)(((NU32)100)));
			rL_1 = (NU32)((NU32)(r_2) % (NU32)(((NU32)100)));
			utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, pos_2, rH_1);
			utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, (NI)(pos_2 + ((NI)2)), rL_1);
			{
				NU32 colontmpD_;
				NU32 colontmpD__2;
				NI colontmpD__3;
				NI colontmpD__4;
				NU32 T22_;
				NI T28_;
				NI T29_;
				if (!(tz_1 == nd_1)) goto LA20_;
				colontmpD_ = (NU32)0;
				colontmpD__2 = (NU32)0;
				colontmpD__3 = (NI)0;
				colontmpD__4 = (NI)0;
				T22_ = (NU32)0;
				{
					if (!(rL_1 == ((NU32)0))) goto LA25_;
					colontmpD_ = rH_1;
					T22_ = colontmpD_;
				}
				goto LA23_;
LA25_: ;
				{
					colontmpD__2 = rL_1;
					T22_ = colontmpD__2;
				}
LA23_: ;
				T28_ = (NI)0;
				T28_ = trailingZeros2Digits__stdZprivateZdigitsutils_u26(T22_);
				T29_ = (NI)0;
				{
					if (!(rL_1 == ((NU32)0))) goto LA32_;
					colontmpD__3 = ((NI)2);
					T29_ = colontmpD__3;
				}
				goto LA30_;
LA32_: ;
				{
					colontmpD__4 = ((NI)0);
					T29_ = colontmpD__4;
				}
LA30_: ;
				tz_1 += (NI)(T28_ + T29_);
			}
LA20_: ;
		}
		goto LA14_;
LA16_: ;
		{
			{
				if (!(tz_1 == nd_1)) goto LA38_;
				tz_1 += ((NI)4);
			}
			goto LA36_;
LA38_: ;
			{
				{
					NI i_1;
					NI res_1;
					i_1 = (NI)0;
					res_1 = ((NI)0);
					{
						while (1) {
							if (!(res_1 <= ((NI)3))) goto LA43;
							i_1 = ((NI) (res_1));
							buf_p0[(NI)(pos_2 + i_1)] = 48;
							res_1 += ((NI)1);
						} LA43: ;
					}
				}
			}
LA36_: ;
		}
LA14_: ;
		nd_1 += ((NI)4);
	}
LA12_: ;
	{
		NU32 q_3;
		NU32 r_3;
		if (!((NU32)(((NU32)100)) <= (NU32)(output_1))) goto LA46_;
		q_3 = (NU32)((NU32)(output_1) / (NU32)(((NU32)100)));
		r_3 = (NU32)((NU32)(output_1) % (NU32)(((NU32)100)));
		output_1 = q_3;
		pos_2 -= ((NI)2);
		utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, pos_2, r_3);
		{
			NI T52_;
			if (!(tz_1 == nd_1)) goto LA50_;
			T52_ = (NI)0;
			T52_ = trailingZeros2Digits__stdZprivateZdigitsutils_u26(r_3);
			tz_1 += T52_;
		}
LA50_: ;
		nd_1 += ((NI)2);
		{
			NU32 q2_1;
			NU32 r2_1;
			if (!((NU32)(((NU32)100)) <= (NU32)(output_1))) goto LA55_;
			q2_1 = (NU32)((NU32)(output_1) / (NU32)(((NU32)100)));
			r2_1 = (NU32)((NU32)(output_1) % (NU32)(((NU32)100)));
			output_1 = q2_1;
			pos_2 -= ((NI)2);
			utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, pos_2, r2_1);
			{
				NI T61_;
				if (!(tz_1 == nd_1)) goto LA59_;
				T61_ = (NI)0;
				T61_ = trailingZeros2Digits__stdZprivateZdigitsutils_u26(r2_1);
				tz_1 += T61_;
			}
LA59_: ;
			nd_1 += ((NI)2);
		}
LA55_: ;
	}
LA46_: ;
	{
		NU32 q_4;
		if (!((NU32)(((NU32)10)) <= (NU32)(output_1))) goto LA64_;
		q_4 = output_1;
		pos_2 -= ((NI)2);
		utoa2Digits__stdZprivateZdigitsutils_u3(buf_p0, buf_p0Len_0, pos_2, q_4);
		{
			NI T70_;
			if (!(tz_1 == nd_1)) goto LA68_;
			T70_ = (NI)0;
			T70_ = trailingZeros2Digits__stdZprivateZdigitsutils_u26(q_4);
			tz_1 += T70_;
		}
LA68_: ;
	}
	goto LA62_;
LA64_: ;
	{
		NU32 q_5;
		q_5 = output_1;
		pos_2 -= ((NI)1);
		buf_p0[pos_2] = ((NIM_CHAR) (((NI) ((NU32)((NU32)(((NU32)48)) + (NU32)(q_5))))));
	}
LA62_: ;
	result = tz_1;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, formatDigits__stdZprivateZdragonbox_u693)(NIM_CHAR* buffer_p0, NI buffer_p0Len_0, NI pos_p1, NU64 digits_p2, NI decimalExponent_p3, NIM_BOOL forceTrailingDotZero_p4) {
	NI result;
	NI pos_2;
	NI numDigits_1;
	NI decimalPoint_1;
	NIM_BOOL useFixed_1;
	NIM_BOOL T1_;
	NI decimalDigitsPosition_1;
	NI digitsEnd_1;
	NI tz_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	pos_2 = pos_p1;
	numDigits_1 = decimalLength__stdZprivateZdragonbox_u640(digits_p2);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	decimalPoint_1 = (NI)(numDigits_1 + decimalExponent_p3);
	T1_ = (NIM_BOOL)0;
	T1_ = (((NI)-6) <= decimalPoint_1);
	if (!(T1_)) goto LA2_;
	T1_ = (decimalPoint_1 <= ((NI)17));
LA2_: ;
	useFixed_1 = T1_;
	{
		NI i_1;
		NI i_2;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				if (!(i_2 < ((NI)32))) goto LA5;
				i_1 = i_2;
				buffer_p0[(NI)(pos_2 + i_1)] = 48;
				i_2 += ((NI)1);
			} LA5: ;
		}
	}
	decimalDigitsPosition_1 = (NI)0;
	{
		if (!useFixed_1) goto LA8_;
		{
			if (!(decimalPoint_1 <= ((NI)0))) goto LA12_;
			decimalDigitsPosition_1 = (NI)(((NI)2) - decimalPoint_1);
		}
		goto LA10_;
LA12_: ;
		{
			decimalDigitsPosition_1 = ((NI)0);
		}
LA10_: ;
	}
	goto LA6_;
LA8_: ;
	{
		decimalDigitsPosition_1 = ((NI)1);
	}
LA6_: ;
	digitsEnd_1 = (NI)(pos_2 + (NI)(decimalDigitsPosition_1 + numDigits_1));
	tz_1 = printDecimalDigitsBackwards__stdZprivateZdragonbox_u515(buffer_p0, buffer_p0Len_0, digitsEnd_1, digits_p2);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	digitsEnd_1 -= tz_1;
	numDigits_1 -= tz_1;
	{
		if (!useFixed_1) goto LA18_;
		{
			if (!(decimalPoint_1 <= ((NI)0))) goto LA22_;
			buffer_p0[(NI)(pos_2 + ((NI)1))] = 46;
			pos_2 = digitsEnd_1;
		}
		goto LA20_;
LA22_: ;
		{
			tyArray__IYRuaDhIR1JRO1rvV8bcFg tmp_1;
			if (!(decimalPoint_1 < numDigits_1)) goto LA25_;
			nimZeroMem((void*)tmp_1, sizeof(tyArray__IYRuaDhIR1JRO1rvV8bcFg));
			nimZeroMem((void*)tmp_1, sizeof(tyArray__IYRuaDhIR1JRO1rvV8bcFg));
			{
				NI i_3;
				NI i_4;
				i_3 = (NI)0;
				i_4 = ((NI)0);
				{
					while (1) {
						if (!(i_4 < ((NI)16))) goto LA29;
						i_3 = i_4;
						tmp_1[(i_3)- 0] = buffer_p0[(NI)((NI)(i_3 + pos_2) + decimalPoint_1)];
						i_4 += ((NI)1);
					} LA29: ;
				}
			}
			{
				NI i_5;
				NI i_6;
				i_5 = (NI)0;
				i_6 = ((NI)0);
				{
					while (1) {
						if (!(i_6 < ((NI)16))) goto LA32;
						i_5 = i_6;
						buffer_p0[(NI)((NI)((NI)(i_5 + pos_2) + decimalPoint_1) + ((NI)1))] = tmp_1[(i_5)- 0];
						i_6 += ((NI)1);
					} LA32: ;
				}
			}
			buffer_p0[(NI)(pos_2 + decimalPoint_1)] = 46;
			pos_2 = (NI)(digitsEnd_1 + ((NI)1));
		}
		goto LA20_;
LA25_: ;
		{
			pos_2 += decimalPoint_1;
			{
				if (!forceTrailingDotZero_p4) goto LA36_;
				buffer_p0[pos_2] = 46;
				buffer_p0[(NI)(pos_2 + ((NI)1))] = 48;
				pos_2 += ((NI)2);
			}
LA36_: ;
		}
LA20_: ;
	}
	goto LA16_;
LA18_: ;
	{
		NI colontmpD_;
		NI colontmpD__2;
		NI scientificExponent_1;
		NIM_CHAR T44_;
		NU32 k_1;
		NI T50_;
		colontmpD_ = (NI)0;
		colontmpD__2 = (NI)0;
		buffer_p0[pos_2] = buffer_p0[(NI)(pos_2 + ((NI)1))];
		{
			if (!(numDigits_1 == ((NI)1))) goto LA41_;
			pos_2 += ((NI)1);
		}
		goto LA39_;
LA41_: ;
		{
			buffer_p0[(NI)(pos_2 + ((NI)1))] = 46;
			pos_2 = digitsEnd_1;
		}
LA39_: ;
		scientificExponent_1 = (NI)(decimalPoint_1 - ((NI)1));
		buffer_p0[pos_2] = 101;
		T44_ = (NIM_CHAR)0;
		{
			if (!(scientificExponent_1 < ((NI)0))) goto LA47_;
			buffer_p0[(NI)(pos_2 + ((NI)1))] = 45;
		}
		goto LA45_;
LA47_: ;
		{
			buffer_p0[(NI)(pos_2 + ((NI)1))] = 43;
		}
LA45_: ;
		pos_2 += ((NI)2);
		T50_ = (NI)0;
		{
			if (!(scientificExponent_1 < ((NI)0))) goto LA53_;
			colontmpD_ = ((NI64)-(scientificExponent_1));
			T50_ = colontmpD_;
		}
		goto LA51_;
LA53_: ;
		{
			colontmpD__2 = scientificExponent_1;
			T50_ = colontmpD__2;
		}
LA51_: ;
		k_1 = ((NU32) (T50_));
		{
			if (!((NU32)(k_1) < (NU32)(((NU32)10)))) goto LA58_;
			buffer_p0[pos_2] = ((NIM_CHAR) (((NI) ((NU32)((NU32)(((NU32)48)) + (NU32)(k_1))))));
			pos_2 += ((NI)1);
		}
		goto LA56_;
LA58_: ;
		{
			if (!((NU32)(k_1) < (NU32)(((NU32)100)))) goto LA61_;
			utoa2Digits__stdZprivateZdigitsutils_u3(buffer_p0, buffer_p0Len_0, pos_2, k_1);
			pos_2 += ((NI)2);
		}
		goto LA56_;
LA61_: ;
		{
			NU32 q_1;
			NU32 r_1;
			q_1 = (NU32)((NU32)(k_1) / (NU32)(((NU32)100)));
			r_1 = (NU32)((NU32)(k_1) % (NU32)(((NU32)100)));
			buffer_p0[pos_2] = ((NIM_CHAR) (((NI) ((NU32)((NU32)(((NU32)48)) + (NU32)(q_1))))));
			pos_2 += ((NI)1);
			utoa2Digits__stdZprivateZdigitsutils_u3(buffer_p0, buffer_p0Len_0, pos_2, r_1);
			pos_2 += ((NI)2);
		}
LA56_: ;
	}
LA16_: ;
	result = pos_2;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, toChars__stdZprivateZdragonbox_u679)(NIM_CHAR* buffer_p0, NI buffer_p0Len_0, NF v_p1, NIM_BOOL forceTrailingDotZero_p2) {
	NI result;
	NI pos_1;
	NU64 significand_1;
	tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA T1_;
	NU64 exponent_1;
	tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA T2_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	pos_1 = ((NI)0);
	T1_ = constructDouble__stdZprivateZdragonbox_u50(v_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	significand_1 = physicalSignificand__stdZprivateZdragonbox_u53(T1_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T2_ = constructDouble__stdZprivateZdragonbox_u50(v_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	exponent_1 = physicalExponent__stdZprivateZdragonbox_u56(T2_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA T7_;
		NI T8_;
		if (!!((exponent_1 == 2047ULL))) goto LA5_;
		buffer_p0[pos_1] = 45;
		T7_ = constructDouble__stdZprivateZdragonbox_u50(v_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T8_ = (NI)0;
		T8_ = signBit__stdZprivateZdragonbox_u75(T7_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		pos_1 += T8_;
		{
			NIM_BOOL T11_;
			tyObject_FloatingDecimal64__vuk1UVp9bIo8BDny6wGuHnA dec_1;
			T11_ = (NIM_BOOL)0;
			T11_ = !((exponent_1 == 0ULL));
			if (T11_) goto LA12_;
			T11_ = !((significand_1 == 0ULL));
LA12_: ;
			if (!T11_) goto LA13_;
			dec_1 = toDecimal64__stdZprivateZdragonbox_u431(significand_1, exponent_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			result = formatDigits__stdZprivateZdragonbox_u693(buffer_p0, buffer_p0Len_0, pos_1, dec_1.significand, ((NI) (dec_1.exponent)), forceTrailingDotZero_p2);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			goto BeforeRet_;
		}
		goto LA9_;
LA13_: ;
		{
			NI colontmpD_;
			NI colontmpD__2;
			NI T16_;
			colontmpD_ = (NI)0;
			colontmpD__2 = (NI)0;
			buffer_p0[pos_1] = 48;
			buffer_p0[(NI)(pos_1 + ((NI)1))] = 46;
			buffer_p0[(NI)(pos_1 + ((NI)2))] = 48;
			buffer_p0[(NI)(pos_1 + ((NI)3))] = 32;
			T16_ = (NI)0;
			{
				if (!forceTrailingDotZero_p2) goto LA19_;
				colontmpD_ = ((NI)3);
				T16_ = colontmpD_;
			}
			goto LA17_;
LA19_: ;
			{
				colontmpD__2 = ((NI)1);
				T16_ = colontmpD__2;
			}
LA17_: ;
			pos_1 += T16_;
			result = pos_1;
			goto BeforeRet_;
		}
LA9_: ;
	}
LA5_: ;
	{
		tyObject_Double__EJaxPQ9bjLD9ccgbBVrbWoiA T26_;
		NI T27_;
		if (!(significand_1 == 0ULL)) goto LA24_;
		buffer_p0[pos_1] = 45;
		T26_ = constructDouble__stdZprivateZdragonbox_u50(v_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T27_ = (NI)0;
		T27_ = signBit__stdZprivateZdragonbox_u75(T26_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		pos_1 += T27_;
		buffer_p0[pos_1] = 105;
		buffer_p0[(NI)(pos_1 + ((NI)1))] = 110;
		buffer_p0[(NI)(pos_1 + ((NI)2))] = 102;
		buffer_p0[(NI)(pos_1 + ((NI)3))] = 32;
		result = (NI)(pos_1 + ((NI)3));
		goto BeforeRet_;
	}
	goto LA22_;
LA24_: ;
	{
		buffer_p0[pos_1] = 110;
		buffer_p0[(NI)(pos_1 + ((NI)1))] = 97;
		buffer_p0[(NI)(pos_1 + ((NI)2))] = 110;
		buffer_p0[(NI)(pos_1 + ((NI)3))] = 32;
		result = (NI)(pos_1 + ((NI)3));
		goto BeforeRet_;
	}
LA22_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, writeFloatToBufferRoundtrip__stdZformatfloat_u10)(NIM_CHAR* buf_p0, NF value_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = toChars__stdZprivateZdragonbox_u679(buf_p0, 65, value_p1, NIM_TRUE);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	buf_p0[(result)- 0] = 0;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, addCstringN__stdZformatfloat_u2)(NimStringV2* result_p0, NCSTRING buf_p1, NI buflen_p2) {
	NI oldLen_1;
	NI newLen_1;
	void* T1_;
	oldLen_1 = (*result_p0).len;
	newLen_1 = (NI)(oldLen_1 + buflen_p2);
	setLengthStrV2((&(*result_p0)), (newLen_1));
	T1_ = (void*)0;
	T1_ = memcpy(((void*) ((&(*result_p0).p->data[oldLen_1]))), ((void*) (buf_p1)), ((size_t) (buflen_p2)));
}
N_LIB_PRIVATE N_NIMCALL(void, addFloatRoundtrip__system_u4789)(NimStringV2* result_p0, NF x_p1) {
	tyArray__Dfv57DbDwULo55p3cZvdLQ buffer_1;
	NI n_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	n_1 = writeFloatToBufferRoundtrip__stdZformatfloat_u10(buffer_1, x_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	addCstringN__stdZformatfloat_u2(result_p0, ((NCSTRING) ((&buffer_1[(((NI)0))- 0]))), n_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
