Guest User

Untitled

a guest
Dec 4th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define NIM_INTBITS 64
  2. #include "nimbase.h"
  3.  
  4. #include <stdio.h>
  5. typedef struct NimStringDesc NimStringDesc;
  6. typedef struct TGenericSeq TGenericSeq;
  7. struct TGenericSeq {
  8. NI len;
  9. NI reserved;
  10. };
  11. typedef NIM_CHAR TY611[100000001];
  12. struct NimStringDesc {
  13. TGenericSeq Sup;
  14. TY611 data;
  15. };
  16. N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
  17. static N_INLINE(NI, addInt)(NI a, NI b);
  18. N_NOINLINE(void, raiseOverflow)(void);
  19. static N_INLINE(void, initStackBottom)(void);
  20. N_NOINLINE(void, setStackBottom)(void* thestackbottom);
  21. static N_INLINE(void, nimFrame)(TFrame* s);
  22. static N_INLINE(void, popFrame)(void);
  23. N_NOINLINE(void, systemInit)(void);
  24. N_NOINLINE(void, systemDatInit)(void);
  25. N_NOINLINE(void, fileInit)(void);
  26. N_NOINLINE(void, fileDatInit)(void);
  27. NI i_77011;
  28. extern TFrame* frameptr_11825;
  29.  
  30. static N_INLINE(NI, addInt)(NI a, NI b) {
  31. NI result;
  32. result = 0;
  33. result = (NI)((NU64)(a) + (NU64)(b));
  34. {
  35. NIM_BOOL LOC3;
  36. LOC3 = 0;
  37. LOC3 = (0 <= (NI)(result ^ a));
  38. if (LOC3) goto LA4;
  39. LOC3 = (0 <= (NI)(result ^ b));
  40. LA4: ;
  41. if (!LOC3) goto LA5;
  42. goto BeforeRet;
  43. } LA5: ;
  44. raiseOverflow(); BeforeRet: ; return result;
  45. }
  46. static N_INLINE(void, initStackBottom)(void) {
  47. void* volatile locals;
  48. locals = 0;
  49. locals = ((void*) (&locals));
  50. setStackBottom(locals);}int cmdCount;
  51. char** cmdLine;
  52. char** gEnv;
  53. N_CDECL(void, NimMain)(void) {
  54. systemDatInit();
  55. fileDatInit();
  56. initStackBottom();
  57. systemInit();
  58. fileInit();
  59. }
  60. int main(int argc, char** args, char** env) {
  61. cmdLine = args;
  62. cmdCount = argc;
  63. gEnv = env;
  64. NimMain();
  65. return nim_program_result;
  66. }
  67.  
  68. static N_INLINE(void, nimFrame)(TFrame* s) {
  69. (*s).prev = frameptr_11825;
  70. frameptr_11825 = s;
  71. }
  72. static N_INLINE(void, popFrame)(void) {
  73. frameptr_11825 = (*frameptr_11825).prev;
  74. }N_NOINLINE(void, fileInit)(void) {
  75. NI res_77013;
  76. nimfr("file", "file.nim")
  77. nimln(1304, "system.nim");
  78. res_77013 = 1;
  79. nimln(1305, "system.nim");
  80. while (1) {
  81. NimStringDesc* LOC2;
  82. nimln(1305, "system.nim");
  83. if (!(res_77013 <= 10)) goto LA1;
  84. nimln(1304, "system.nim");
  85. i_77011 = res_77013;
  86. nimln(2, "file.nim");
  87. nimln(2, "file.nim");
  88. LOC2 = 0;
  89. LOC2 = nimIntToStr(i_77011);
  90. printf("%s\012", (LOC2)->data);
  91. nimln(1307, "system.nim");
  92. res_77013 = addInt(res_77013, 1);
  93. } LA1: ;
  94. popFrame();
  95. }
  96.  
  97. N_NOINLINE(void, fileDatInit)(void) {
  98. }
Add Comment
Please, Sign In to add comment