/* 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/@pmath.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@pmath.nim.c */
#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
N_LIB_PRIVATE N_NIMCALL(NI, nextPowerOfTwo__pureZmath_u258)(NI x_p0) {
	NI result;
	result = (NI)0;
	result = (NI)(x_p0 - ((NI)1));
	result = (NI)(result | (NI)((NI64)(result) >> (NU64)(((NI)32) & (64 - 1))));
	result = (NI)(result | (NI)((NI64)(result) >> (NU64)(((NI)16) & (64 - 1))));
	result = (NI)(result | (NI)((NI64)(result) >> (NU64)(((NI)8) & (64 - 1))));
	result = (NI)(result | (NI)((NI64)(result) >> (NU64)(((NI)4) & (64 - 1))));
	result = (NI)(result | (NI)((NI64)(result) >> (NU64)(((NI)2) & (64 - 1))));
	result = (NI)(result | (NI)((NI64)(result) >> (NU64)(((NI)1) & (64 - 1))));
	result += (NI)(((NI)1) + (x_p0 <= ((NI)0)));
	return result;
}
