nwaku/nimcache/release/start_network/@m..@s..@s..@svendor@snim-secp256k1@ssecp256k1.nim.c

281 lines
18 KiB
C

/* Generated by Nim Compiler v1.2.6 */
/* (c) 2020 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -pthread -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace/install/usr/include -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1/src -DHAVE_CONFIG_H -DHAVE_BUILTIN_EXPECT -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/src -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/inc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/tools -DBR_USE_UNIX_TIME=1 -DBR_USE_URANDOM=1 -DBR_LE_UNALIGNED=1 -DBR_64=1 -DBR_amd64=1 -DBR_INT128=1 -march=native -g3 -Og -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib -I/home/runner/work/nim-waku/nim-waku/waku/v1/node -o nimcache/release/start_network/@m..@s..@s..@svendor@snim-secp256k1@ssecp256k1.nim.c.o nimcache/release/start_network/@m..@s..@s..@svendor@snim-secp256k1@ssecp256k1.nim.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#include <stdlib.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
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A;
typedef struct tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ;
typedef struct tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA;
typedef struct tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ;
struct tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A {tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* context;
};
typedef NU8 tyArray__vEOa9c5qaE9ajWxR5R4zwfQg[32];
struct tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w {tyArray__vEOa9c5qaE9ajWxR5R4zwfQg data;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NU8* data_0, NI data_0Len_0, void* ClE_0);
void* ClE_0;
} tyProc__2eQPaS8XIidfzb11dDC4nw;
typedef N_CLOSURE_PTR(void, TM__Vf3HUZLUfnMxxqD8A7j0JA_2) (NU8* data_0, NI data_0Len_0);
struct TGenericSeq {NI len;
NI reserved;
};
struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 tyArray__w5VB8h5K8DB3oWrO5U2wqg[64];
struct tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ {tyArray__w5VB8h5K8DB3oWrO5U2wqg data;
};
struct tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA {tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ data;
};
struct tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ {char dummy;
};
typedef N_CDECL_PTR(void, tyProc__aYhtua0pUdy77mJUJg19ceg) (NCSTRING message, void* data_0);
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
typedef NU8 tyArray__DqM3b17bbm0d9bCZr9c2fLDQ[65];
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_CDECL(int, secp256k1_ec_seckey_verify)(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* ctx, unsigned char* seckey);
N_LIB_PRIVATE N_NOINLINE(void, chckNil)(void* p);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseAssert__gpGJG5CoQzE64skFd9bPG7A)(NimStringDesc* msg) __attribute__((noreturn));
N_CDECL(int, secp256k1_ec_pubkey_create)(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* ctx, tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ* pubkey, unsigned char* seckey);
N_LIB_PRIVATE N_NIMCALL(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ*, getContext__DnBbOJLwooKySk8h6Wtl4A)(void);
N_LIB_PRIVATE N_NIMCALL(tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A, init__LPyUJJkeYePP8BW010musQ)(void);
N_CDECL(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ*, secp256k1_context_create)(unsigned int flags_0);
N_CDECL(void, secp256k1_context_set_illegal_callback)(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* ctx, tyProc__aYhtua0pUdy77mJUJg19ceg fun, void* data_0);
N_LIB_PRIVATE N_CDECL(void, illegalCallback__vqcdLT2OUpjzQXAWYFzlPQ)(NCSTRING message, void* data_0);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getStackTrace__wZiNbtaUL82bHwwHPZjV9cQ)(void);
N_CDECL(void, secp256k1_context_set_error_callback)(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* ctx, tyProc__aYhtua0pUdy77mJUJg19ceg fun, void* data_0);
N_LIB_PRIVATE N_CDECL(void, errorCallback__vqcdLT2OUpjzQXAWYFzlPQ_2)(NCSTRING message, void* data_0);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
N_CDECL(int, secp256k1_ec_pubkey_serialize)(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* ctx, unsigned char* output, size_t* outputlen, tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ* pubkey, unsigned int flags_0);
STRING_LITERAL(TM__Vf3HUZLUfnMxxqD8A7j0JA_4, "RNG not giving random enough bytes, can\'t create valid key", 58);
STRING_LITERAL(TM__Vf3HUZLUfnMxxqD8A7j0JA_5, "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp25"
"6k1.nim(255, 12) `res == 1` Valid private keys should always hav"
"e a corresponding pub", 148);
STRING_LITERAL(TM__Vf3HUZLUfnMxxqD8A7j0JA_6, "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp25"
"6k1.nim(292, 12) `res == 1` Can\'t fail, per documentation", 120);
N_LIB_PRIVATE NIM_THREADVAR tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A secpContext__T39b9cmVSHCO632lALSOJ29aw;
extern tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* secp256k1_context_no_precomp;
#line 22 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) { void* T1_;
#line 24 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
#line 24 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
T1_ = (void*)0; T1_ = memset(a, v, ((size_t) (size)));}
#line 33 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
#line 34 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
#line 34 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
}
#line 11 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) { void* T1_;
#line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
#line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
T1_ = (void*)0; T1_ = memcpy(dest, source, ((size_t) (size)));}
#line 204 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w, random__0zyuItkuaHgarDWONXkbnQ)(tyProc__2eQPaS8XIidfzb11dDC4nw rng_0) { tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w result; tyArray__vEOa9c5qaE9ajWxR5R4zwfQg data_1;{ nimZeroMem((void*)(&result), sizeof(tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w)); { NI _; NI res; _ = (NI)0;
#line 77 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim"
res = ((NI) 0); {
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim"
while (1) { NI TM__Vf3HUZLUfnMxxqD8A7j0JA_3;
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim"
if (!(res <= ((NI) 1000000))) goto LA3;
#line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
_ = res;
#line 220 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
rng_0.ClE_0? rng_0.ClP_0(data_1, 32, rng_0.ClE_0):((TM__Vf3HUZLUfnMxxqD8A7j0JA_2)(rng_0.ClP_0))(data_1, 32);
#line 221 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
{ int T6_;
#line 221 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 221 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 221 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
T6_ = (int)0; T6_ = secp256k1_ec_seckey_verify(secp256k1_context_no_precomp, ((unsigned char*) ((&data_1[(((NI) 0))- 0])))); if (!(T6_ == ((NI32) 1))) goto LA7_;
#line 222 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 222 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w)); nimCopyMem((void*)result.data, (NIM_CONST void*)data_1, sizeof(tyArray__vEOa9c5qaE9ajWxR5R4zwfQg)); goto BeforeRet_;
}
LA7_: ;
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim"
if (nimAddInt(res, ((NI) 1), &TM__Vf3HUZLUfnMxxqD8A7j0JA_3)) { raiseOverflow(); }; res = (NI)(TM__Vf3HUZLUfnMxxqD8A7j0JA_3); } LA3: ;
}
}
#line 224 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w));
#line 224 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
chckNil((void*)result.data); nimZeroMem((void*)result.data, sizeof(tyArray__vEOa9c5qaE9ajWxR5R4zwfQg));
#line 226 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 226 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
raiseAssert__gpGJG5CoQzE64skFd9bPG7A(((NimStringDesc*) &TM__Vf3HUZLUfnMxxqD8A7j0JA_4));
}BeforeRet_: ;
return result;}
#line 116 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_CDECL(void, illegalCallback__vqcdLT2OUpjzQXAWYFzlPQ)(NCSTRING message, void* data_0) { tyArray__nHXaesL0DJZHyVS07ARPRA T1_; tyArray__nHXaesL0DJZHyVS07ARPRA T2_;
#line 119 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
#line 119 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
T1_[0] = cstrToNimstr(message); echoBinSafe(T1_, 1);
#line 120 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
nimZeroMem((void*)T2_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
#line 120 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 120 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
T2_[0] = getStackTrace__wZiNbtaUL82bHwwHPZjV9cQ(); echoBinSafe(T2_, 1);
#line 121 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 121 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
exit(((NI) 1));
}
#line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_CDECL(void, errorCallback__vqcdLT2OUpjzQXAWYFzlPQ_2)(NCSTRING message, void* data_0) { tyArray__nHXaesL0DJZHyVS07ARPRA T1_; tyArray__nHXaesL0DJZHyVS07ARPRA T2_;
#line 125 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
#line 125 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
T1_[0] = cstrToNimstr(message); echoBinSafe(T1_, 1);
#line 126 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
nimZeroMem((void*)T2_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
#line 126 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 126 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
T2_[0] = getStackTrace__wZiNbtaUL82bHwwHPZjV9cQ(); echoBinSafe(T2_, 1);
#line 127 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 127 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
exit(((NI) 1));
}
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A, init__LPyUJJkeYePP8BW010musQ)(void) { tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A result; unsigned int flags_1; nimZeroMem((void*)(&result), sizeof(tyObject_SkContext__g9c9bUdtZF9bfUAdx1W2ZZz0A));
#line 150 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
flags_1 = ((unsigned int) 769);
#line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
result.context = secp256k1_context_create(flags_1);
#line 152 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 152 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
secp256k1_context_set_illegal_callback(result.context, illegalCallback__vqcdLT2OUpjzQXAWYFzlPQ, NIM_NIL);
#line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
secp256k1_context_set_error_callback(result.context, errorCallback__vqcdLT2OUpjzQXAWYFzlPQ_2, NIM_NIL);
return result;}
#line 157 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ*, getContext__DnBbOJLwooKySk8h6Wtl4A)(void) { tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* result; result = (tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ*)0;
#line 158 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 166 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
{
#line 166 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
if (!(secpContext__T39b9cmVSHCO632lALSOJ29aw.context == 0)) goto LA3_;
#line 167 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 167 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
secpContext__T39b9cmVSHCO632lALSOJ29aw = init__LPyUJJkeYePP8BW010musQ(); }
LA3_: ;
result = secpContext__T39b9cmVSHCO632lALSOJ29aw.context; return result;}
#line 250 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA, toPublicKey__dZX6pG1PJuze9ctWTRA1ENw)(tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w* key_0) { tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA result; tyObject_secp256k1_pubkey__GYc9aFo1e2qOLdmAqUvIikQ pubkey; int res; tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ* T1_; nimZeroMem((void*)(&result), sizeof(tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA));
#line 251 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 253 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 254 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 254 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
T1_ = (tyObject_secp256k1_context__POjLS06vi9b462f9boSHL5vQ*)0; T1_ = getContext__DnBbOJLwooKySk8h6Wtl4A();
#line 253 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
res = secp256k1_ec_pubkey_create(T1_, (&pubkey), ((unsigned char*) ((&(*key_0).data[(((NI) 0))- 0]))));
#line 255 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
{
#line 255 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 255 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
if (!!((res == ((NI32) 1)))) goto LA4_;
#line 255 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 255 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__Vf3HUZLUfnMxxqD8A7j0JA_5));
}
LA4_: ;
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA)); result.data = pubkey; return result;}
#line 243 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_NIMCALL(void, toRaw__QU8um79aWTK6cAEMtJp8d7g)(tyObject_SkSecretKey__aKiBFtqo69b60sWLnM5A9c3w* seckey, tyArray__vEOa9c5qaE9ajWxR5R4zwfQg Result) {
#line 244 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
nimCopyMem((void*)Result, (NIM_CONST void*)(*seckey).data, sizeof(tyArray__vEOa9c5qaE9ajWxR5R4zwfQg));}
#line 286 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
N_LIB_PRIVATE N_NIMCALL(void, toRaw__bCgy0bI8LIRIvVpAjgBPMg)(tyObject_SkPublicKey__YxxaGK7KOKaWCOaZ44rHMA* pubkey, tyArray__DqM3b17bbm0d9bCZr9c2fLDQ Result) { size_t length; int res; chckNil((void*)Result); nimZeroMem((void*)Result, sizeof(tyArray__DqM3b17bbm0d9bCZr9c2fLDQ));
#line 288 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
length = ((size_t) 65);
#line 289 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 289 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
res = secp256k1_ec_pubkey_serialize(secp256k1_context_no_precomp, ((unsigned char*) ((&Result[(((NI) 0))- 0]))), (&length), (&(*pubkey).data), ((unsigned int) 2));
#line 292 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
{
#line 292 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 292 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
if (!!((res == ((NI32) 1)))) goto LA3_;
#line 292 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
#line 292 "/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__Vf3HUZLUfnMxxqD8A7j0JA_6));
}
LA3_: ;
}