Advertisement
hjalfi

maybe-test.cow

Feb 8th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 16.18 KB | None | 0 0
  1. /* BEGIN cowbel runtime library
  2.  *
  3.  * Written in 2012 by David Given.
  4.  *
  5.  * To the extent possible under law, the author of the cowbel runtime
  6.  * library (of which this code, up to the string 'END cowbel runtime library',
  7.  * is part), has dedicated all copyright and related and neighboring rights
  8.  * to this software to the public domain worldwide. This software is
  9.  * distributed without any warranty.
  10.  *
  11.  * Please see the file COPYING.CC0 in the distribution package for more
  12.  * information.
  13.  */
  14.  
  15. #include <stdlib.h>
  16. #include <stdio.h>
  17. #include <stdint.h>
  18. #include <stddef.h>
  19. #include <stdarg.h>
  20. #include <string.h>
  21.  
  22. typedef int s_boolean_t;
  23. typedef int s_int_t;
  24.  
  25. typedef struct s_string s_string_t;
  26. struct s_string
  27. {
  28.     s_string_t* prev;
  29.     s_string_t* next;
  30.     const char* data;
  31.     unsigned seglength;
  32.     unsigned totallength;
  33.     const char* cdata;
  34. };
  35.  
  36. typedef void s_string_traverse_cb(s_string_t* s, void* user);
  37.  
  38. static void s_string_traverse(s_string_t* s, s_string_traverse_cb* cb, void* user)
  39. {
  40.         if (s->prev)
  41.                 s_string_traverse(s->prev, cb, user);
  42.         cb(s, user);
  43.         if (s->next)
  44.                 s_string_traverse(s->next, cb, user);
  45. }
  46.  
  47. typedef struct s_array s_array_t;
  48. struct s_array
  49. {
  50.     unsigned length;
  51.     unsigned allocedlength;
  52.     unsigned itemsize;
  53.     char* data;
  54. };
  55.  
  56. #define S_ALLOC_CONSTRUCTOR(type) \
  57.     ((sizeof(type) > 0) ? ((type*) calloc(1, sizeof(type))) : NULL)
  58.  
  59. #define S_CONSTRUCT_CONSTANT_STRING(data) \
  60.     ((s_string_t
  61.  
  62. static void s_throw(const char* message)
  63. {
  64.     fflush(stdout);
  65.     fprintf(stderr, "Runtime error: %s\n", message);
  66.     exit(1);
  67. }
  68.  
  69. /* Boolean methods */
  70.  
  71. #define S_METHOD_BOOLEAN__NOT(b, z) (*z) = !(b)
  72. #define S_METHOD_BOOLEAN__OR(a, b, z) (*z) = (a) | (b)
  73.  
  74. /* Integer methods */
  75.  
  76. #define S_METHOD_INTEGER__ADD(a, b, z) (*z) = (a) + (b)
  77. #define S_METHOD_INTEGER__SUB(a, b, z) (*z) = (a) - (b)
  78. #define S_METHOD_INTEGER__EQUALS(a, b, z) (*z) = (a) == (b)
  79. #define S_METHOD_INTEGER__NOTEQUALS(a, b, z) (*z) = (a) != (b)
  80. #define S_METHOD_INTEGER__GT(a, b, z) (*z) = (a) > (b)
  81. #define S_METHOD_INTEGER__LT(a, b, z) (*z) = (a) < (b)
  82.  
  83. static void S_METHOD_INTEGER_TOSTRING(int value, s_string_t** result)
  84. {
  85.     s_string_t* s = (s_string_t*) malloc(sizeof(s_string_t));
  86.     s->prev = s->next = NULL;
  87.  
  88.     char* buffer = (char*) malloc(32);
  89.     sprintf(buffer, "%d", value);
  90.  
  91.     s->data = s->cdata = buffer;
  92.     s->seglength = s->totallength = strlen(buffer);
  93.     *result = s;
  94. }
  95.  
  96. /* String methods */
  97.  
  98. static void s_method_string_print_cb(s_string_t* s, void* user)
  99. {
  100.     fwrite(s->data, 1, s->seglength, stdout);
  101. }
  102.  
  103. static void S_METHOD_STRING_PRINT(s_string_t* s)
  104. {
  105.     s_string_traverse(s, s_method_string_print_cb, NULL);
  106.     putchar('\n');
  107. }
  108.  
  109. static void S_METHOD_STRING__ADD(s_string_t* left, s_string_t* right,
  110.         s_string_t** result)
  111. {
  112.     s_string_t* newstring = (s_string_t*) malloc(sizeof(s_string_t));
  113.     newstring->prev = left;
  114.     newstring->next = right;
  115.     newstring->seglength = 0;
  116.     newstring->totallength = left->totallength + right->totallength;
  117.     newstring->data = newstring->cdata = NULL;
  118.     *result = newstring;
  119. }
  120.  
  121. static void S_METHOD_STRING__EQUALS(s_string_t* left, s_string_t* right,
  122.         s_boolean_t* result)
  123. {
  124.     int count;
  125.     const char* pleft = NULL;
  126.     int lseg = 0;
  127.     const char* pright = NULL;
  128.     int rseg = 0;
  129.  
  130.     if (left == right)
  131.         goto success;
  132.  
  133.     if (left->totallength != right->totallength)
  134.         goto fail;
  135.  
  136.     count = left->totallength;
  137.  
  138.     lseg = left->seglength;
  139.     pleft = left->data;
  140.  
  141.     rseg = right->seglength;
  142.     pright = right->data;
  143.  
  144.     while (count--)
  145.     {
  146.         while (lseg == 0)
  147.         {
  148.             left = left->next;
  149.             lseg = left->seglength;
  150.             pleft = left->data;
  151.         }
  152.  
  153.         while (rseg == 0)
  154.         {
  155.             right = right->next;
  156.             rseg = right->seglength;
  157.             pright = right->data;
  158.         }
  159.  
  160.         if (*pleft++ != *pright++)
  161.             goto fail;
  162.  
  163.         lseg--;
  164.         rseg--;
  165.     }
  166.  
  167. success:
  168.     *result = 1;
  169.     return;
  170.  
  171. fail:
  172.     *result = 0;
  173.     return;
  174. }
  175.  
  176. /* END cowbel runtime library */
  177. struct C0__main_;
  178. struct C1__main_;
  179. struct C2_Maybe;
  180. struct C3_Maybe;
  181. struct C4_valid;
  182. struct C5_get;
  183. struct C6_get;
  184. struct C7_next;
  185. struct C8_isEmpty;
  186. struct C9_push;
  187. struct C10_pop;
  188. struct C11_Maybe;
  189. struct C12_Maybe;
  190. struct C13_valid;
  191. struct C14_get;
  192. struct C15_Queue;
  193. struct C16_Queue;
  194. struct C17_Queue;
  195. struct C18_Node;
  196. struct C19_Node;
  197. struct I0_8_interface8;
  198. struct I1_12_T;
  199. struct I2_13_interface13;
  200.  
  201. static void cowbel_main();
  202. static void f0_Maybe(void* vc0__main_, struct I1_12_T* s0_value, struct I2_13_interface13** s1__return_5);
  203. static void f2_valid(void* vc3_Maybe, s_boolean_t* s2__return_6);
  204. static void f3_get(void* vc3_Maybe, struct I1_12_T** s3__return_7);
  205. static void f4_get(void* vc19_Node, s_int_t* s4__return_14);
  206. static void f5_next(void* vc19_Node, struct I2_13_interface13** s5__return_15);
  207. static void f6_isEmpty(void* vc17_Queue, s_boolean_t* s6__return_16);
  208. static void f7_push(void* vc17_Queue, s_int_t s7_value);
  209. static void f8_pop(void* vc17_Queue, s_int_t* s8__return_17);
  210. static void f9_Maybe(void* vc0__main_, struct I2_13_interface13** s9__return_2);
  211. static void f10_valid(void* vc12_Maybe, s_boolean_t* s10__return_3);
  212. static void f11_get(void* vc12_Maybe, struct I1_12_T** s11__return_4);
  213. static void f12_Queue(void* vc0__main_, struct I0_8_interface8** s12__return_10);
  214. static void f13_Node(void* vc16_Queue, s_int_t s13_value, struct I2_13_interface13* s14_next, struct I1_12_T** s15__return_13);
  215.  
  216.  
  217. struct I0_8_interface8
  218. {
  219.     void* o;
  220.     void (*m0_1)(void*, s_boolean_t*);
  221.     void (*m1_0)(void*, s_int_t);
  222.     void (*m2_21)(void*, s_int_t*);
  223. };
  224.  
  225. struct I1_12_T
  226. {
  227.     void* o;
  228.     void (*m3_27)(void*, s_int_t*);
  229.     void (*m4_28)(void*, struct I2_13_interface13**);
  230. };
  231.  
  232. struct I2_13_interface13
  233. {
  234.     void* o;
  235.     void (*m5_25)(void*, s_boolean_t*);
  236.     void (*m6_26)(void*, struct I1_12_T**);
  237. };
  238.  
  239. struct C0__main_
  240. {
  241. };
  242.  
  243. struct C1__main_
  244. {
  245.     struct C0__main_* c0__main_;
  246. };
  247.  
  248. struct C2_Maybe
  249. {
  250.     struct I1_12_T* s0_value;
  251. };
  252.  
  253. struct C3_Maybe
  254. {
  255.     struct C2_Maybe* c2_Maybe;
  256.     struct I2_13_interface13 i3_13_interface13;
  257. };
  258.  
  259. struct C4_valid
  260. {
  261. };
  262.  
  263. struct C5_get
  264. {
  265.     struct C2_Maybe* c2_Maybe;
  266.     struct C3_Maybe* c3_Maybe;
  267. };
  268.  
  269. struct C6_get
  270. {
  271.     struct C18_Node* c18_Node;
  272.     struct C19_Node* c19_Node;
  273. };
  274.  
  275. struct C7_next
  276. {
  277.     struct C18_Node* c18_Node;
  278.     struct C19_Node* c19_Node;
  279. };
  280.  
  281. struct C8_isEmpty
  282. {
  283.     struct C16_Queue* c16_Queue;
  284.     struct C17_Queue* c17_Queue;
  285. };
  286.  
  287. struct C9_push
  288. {
  289.     struct C0__main_* c0__main_;
  290.     struct C15_Queue* c15_Queue;
  291.     struct C16_Queue* c16_Queue;
  292.     struct C17_Queue* c17_Queue;
  293. };
  294.  
  295. struct C10_pop
  296. {
  297.     struct C16_Queue* c16_Queue;
  298.     struct C17_Queue* c17_Queue;
  299. };
  300.  
  301. struct C11_Maybe
  302. {
  303. };
  304.  
  305. struct C12_Maybe
  306. {
  307.     struct I2_13_interface13 i3_13_interface13;
  308. };
  309.  
  310. struct C13_valid
  311. {
  312. };
  313.  
  314. struct C14_get
  315. {
  316. };
  317.  
  318. struct C15_Queue
  319. {
  320.     struct C0__main_* c0__main_;
  321. };
  322.  
  323. struct C16_Queue
  324. {
  325.     struct I2_13_interface13* s16_head;
  326.     struct C0__main_* c0__main_;
  327.     struct C15_Queue* c15_Queue;
  328. };
  329.  
  330. struct C17_Queue
  331. {
  332.     struct C0__main_* c0__main_;
  333.     struct C15_Queue* c15_Queue;
  334.     struct C16_Queue* c16_Queue;
  335.     struct I0_8_interface8 i3_8_interface8;
  336. };
  337.  
  338. struct C18_Node
  339. {
  340.     s_int_t s13_value;
  341.     struct I2_13_interface13* s14_next;
  342. };
  343.  
  344. struct C19_Node
  345. {
  346.     struct C18_Node* c18_Node;
  347.     struct I1_12_T i3_12_T;
  348. };
  349.  
  350. static void cowbel_main()
  351. {
  352. B0__main_:;
  353.     struct C0__main_* c0__main_ = S_ALLOC_CONSTRUCTOR(struct C0__main_);
  354.     struct I0_8_interface8* s17_q;
  355.     struct I0_8_interface8* s18__temp_18;
  356.     s_int_t s19__temp_19;
  357.     s_int_t s20__temp_20;
  358.     s_int_t s21__temp_21;
  359.     s_int_t s22__temp_22;
  360.     s_boolean_t s23__temp_23;
  361.     s_boolean_t s24__temp_24;
  362.     f12_Queue(c0__main_, &s18__temp_18);
  363.     s17_q = s18__temp_18;
  364.     s19__temp_19 = 1;
  365.     s17_q->m1_0(s17_q->o, s19__temp_19);
  366.     s20__temp_20 = 2;
  367.     s17_q->m1_0(s17_q->o, s20__temp_20);
  368.     s21__temp_21 = 3;
  369.     s17_q->m1_0(s17_q->o, s21__temp_21);
  370.     s22__temp_22 = 4;
  371.     s17_q->m1_0(s17_q->o, s22__temp_22);
  372.     goto B1__main_;
  373. B1__main_:;
  374.     s17_q->m0_1(s17_q->o, &s23__temp_23);
  375.     S_METHOD_BOOLEAN__NOT(s23__temp_23, &s24__temp_24);
  376.     if (s24__temp_24) goto B2__main_; else goto B3__main_;
  377. B3__main_:;
  378.     goto B4__main_;
  379. B4__main_:;
  380.     return;
  381. B2__main_:;
  382.     struct C1__main_ f0_storage;
  383.     struct C1__main_* c1__main_ =  &f0_storage;
  384.     c1__main_->c0__main_ = c0__main_;
  385.     s_int_t s25_i;
  386.     s_int_t s26__temp_25;
  387.     s_string_t* s27__temp_26;
  388.     s17_q->m2_21(s17_q->o, &s26__temp_25);
  389.     s25_i = s26__temp_25;
  390.     S_METHOD_INTEGER_TOSTRING(s25_i, &s27__temp_26);
  391.     S_METHOD_STRING_PRINT(s27__temp_26);
  392.     goto B1__main_;
  393. }
  394.  
  395. static void f0_Maybe(void* vc0__main_, struct I1_12_T* s0_value, struct I2_13_interface13** s1__return_5)
  396. {
  397.     struct C0__main_* c0__main_ = vc0__main_;
  398. B5_Maybe:;
  399.     struct C2_Maybe* c2_Maybe = S_ALLOC_CONSTRUCTOR(struct C2_Maybe);
  400.     struct C3_Maybe* s28__temp_27;
  401.     struct I2_13_interface13* s29__temp_28;
  402.     c2_Maybe->s0_value = s0_value;
  403.     struct C3_Maybe* c3_Maybe = S_ALLOC_CONSTRUCTOR(struct C3_Maybe);
  404.     c3_Maybe->c2_Maybe = c2_Maybe;
  405.     c3_Maybe->i3_13_interface13.o = c3_Maybe;
  406.     c3_Maybe->i3_13_interface13.m5_25 = f2_valid;
  407.     c3_Maybe->i3_13_interface13.m6_26 = f3_get;
  408.     s28__temp_27 = c3_Maybe;
  409.     s29__temp_28 = &s28__temp_27->i3_13_interface13;
  410.     *s1__return_5 = s29__temp_28;
  411.     goto B6_Maybe;
  412. B6_Maybe:;
  413.     return;
  414. }
  415.  
  416. static void f2_valid(void* vc3_Maybe, s_boolean_t* s2__return_6)
  417. {
  418.     struct C3_Maybe* c3_Maybe = vc3_Maybe;
  419. B7_valid:;
  420.     struct C4_valid f0_storage;
  421.     struct C4_valid* c4_valid =  &f0_storage;
  422.     s_boolean_t s30__temp_29;
  423.     s30__temp_29 = 1;
  424.     *s2__return_6 = s30__temp_29;
  425.     goto B8_valid;
  426. B8_valid:;
  427.     return;
  428. }
  429.  
  430. static void f3_get(void* vc3_Maybe, struct I1_12_T** s3__return_7)
  431. {
  432.     struct C3_Maybe* c3_Maybe = vc3_Maybe;
  433. B9_get:;
  434.     struct C5_get f0_storage;
  435.     struct C5_get* c5_get =  &f0_storage;
  436.     c5_get->c2_Maybe = c3_Maybe->c2_Maybe;
  437.     c5_get->c3_Maybe = c3_Maybe;
  438.     *s3__return_7 = c5_get->c2_Maybe->s0_value;
  439.     goto B10_get;
  440. B10_get:;
  441.     return;
  442. }
  443.  
  444. static void f4_get(void* vc19_Node, s_int_t* s4__return_14)
  445. {
  446.     struct C19_Node* c19_Node = vc19_Node;
  447. B11_get:;
  448.     struct C6_get f0_storage;
  449.     struct C6_get* c6_get =  &f0_storage;
  450.     c6_get->c18_Node = c19_Node->c18_Node;
  451.     c6_get->c19_Node = c19_Node;
  452.     *s4__return_14 = c6_get->c18_Node->s13_value;
  453.     goto B12_get;
  454. B12_get:;
  455.     return;
  456. }
  457.  
  458. static void f5_next(void* vc19_Node, struct I2_13_interface13** s5__return_15)
  459. {
  460.     struct C19_Node* c19_Node = vc19_Node;
  461. B13_next:;
  462.     struct C7_next f0_storage;
  463.     struct C7_next* c7_next =  &f0_storage;
  464.     c7_next->c18_Node = c19_Node->c18_Node;
  465.     c7_next->c19_Node = c19_Node;
  466.     *s5__return_15 = c7_next->c18_Node->s14_next;
  467.     goto B14_next;
  468. B14_next:;
  469.     return;
  470. }
  471.  
  472. static void f6_isEmpty(void* vc17_Queue, s_boolean_t* s6__return_16)
  473. {
  474.     struct C17_Queue* c17_Queue = vc17_Queue;
  475. B15_isEmpty:;
  476.     struct C8_isEmpty f0_storage;
  477.     struct C8_isEmpty* c8_isEmpty =  &f0_storage;
  478.     c8_isEmpty->c16_Queue = c17_Queue->c16_Queue;
  479.     c8_isEmpty->c17_Queue = c17_Queue;
  480.     s_boolean_t s31__temp_30;
  481.     s_boolean_t s32__temp_31;
  482.     c8_isEmpty->c16_Queue->s16_head->m5_25(c8_isEmpty->c16_Queue->s16_head->o, &s31__temp_30);
  483.     S_METHOD_BOOLEAN__NOT(s31__temp_30, &s32__temp_31);
  484.     *s6__return_16 = s32__temp_31;
  485.     goto B16_isEmpty;
  486. B16_isEmpty:;
  487.     return;
  488. }
  489.  
  490. static void f7_push(void* vc17_Queue, s_int_t s7_value)
  491. {
  492.     struct C17_Queue* c17_Queue = vc17_Queue;
  493. B17_push:;
  494.     struct C9_push f0_storage;
  495.     struct C9_push* c9_push =  &f0_storage;
  496.     c9_push->c0__main_ = c17_Queue->c0__main_;
  497.     c9_push->c15_Queue = c17_Queue->c15_Queue;
  498.     c9_push->c16_Queue = c17_Queue->c16_Queue;
  499.     c9_push->c17_Queue = c17_Queue;
  500.     struct I1_12_T* s33_node;
  501.     struct I1_12_T* s34__temp_32;
  502.     struct I2_13_interface13* s35__temp_33;
  503.     f13_Node(c9_push->c16_Queue, s7_value, c9_push->c16_Queue->s16_head, &s34__temp_32);
  504.     s33_node = s34__temp_32;
  505.     f0_Maybe(c9_push->c0__main_, s33_node, &s35__temp_33);
  506.     c9_push->c16_Queue->s16_head = s35__temp_33;
  507.     goto B18_push;
  508. B18_push:;
  509.     return;
  510. }
  511.  
  512. static void f8_pop(void* vc17_Queue, s_int_t* s8__return_17)
  513. {
  514.     struct C17_Queue* c17_Queue = vc17_Queue;
  515. B19_pop:;
  516.     struct C10_pop f0_storage;
  517.     struct C10_pop* c10_pop =  &f0_storage;
  518.     c10_pop->c16_Queue = c17_Queue->c16_Queue;
  519.     c10_pop->c17_Queue = c17_Queue;
  520.     struct I1_12_T* s36_node;
  521.     s_int_t s37_value;
  522.     struct I1_12_T* s38__temp_34;
  523.     s_int_t s39__temp_35;
  524.     struct I2_13_interface13* s40__temp_36;
  525.     c10_pop->c16_Queue->s16_head->m6_26(c10_pop->c16_Queue->s16_head->o, &s38__temp_34);
  526.     s36_node = s38__temp_34;
  527.     s36_node->m3_27(s36_node->o, &s39__temp_35);
  528.     s37_value = s39__temp_35;
  529.     s36_node->m4_28(s36_node->o, &s40__temp_36);
  530.     c10_pop->c16_Queue->s16_head = s40__temp_36;
  531.     *s8__return_17 = s37_value;
  532.     goto B20_pop;
  533. B20_pop:;
  534.     return;
  535. }
  536.  
  537. static void f9_Maybe(void* vc0__main_, struct I2_13_interface13** s9__return_2)
  538. {
  539.     struct C0__main_* c0__main_ = vc0__main_;
  540. B21_Maybe:;
  541.     struct C11_Maybe f0_storage;
  542.     struct C11_Maybe* c11_Maybe =  &f0_storage;
  543.     struct C12_Maybe* s41__temp_37;
  544.     struct I2_13_interface13* s42__temp_38;
  545.     struct C12_Maybe* c12_Maybe = S_ALLOC_CONSTRUCTOR(struct C12_Maybe);
  546.     c12_Maybe->i3_13_interface13.o = c12_Maybe;
  547.     c12_Maybe->i3_13_interface13.m5_25 = f10_valid;
  548.     c12_Maybe->i3_13_interface13.m6_26 = f11_get;
  549.     s41__temp_37 = c12_Maybe;
  550.     s42__temp_38 = &s41__temp_37->i3_13_interface13;
  551.     *s9__return_2 = s42__temp_38;
  552.     goto B22_Maybe;
  553. B22_Maybe:;
  554.     return;
  555. }
  556.  
  557. static void f10_valid(void* vc12_Maybe, s_boolean_t* s10__return_3)
  558. {
  559.     struct C12_Maybe* c12_Maybe = vc12_Maybe;
  560. B23_valid:;
  561.     struct C13_valid f0_storage;
  562.     struct C13_valid* c13_valid =  &f0_storage;
  563.     s_boolean_t s43__temp_39;
  564.     s43__temp_39 = 0;
  565.     *s10__return_3 = s43__temp_39;
  566.     goto B24_valid;
  567. B24_valid:;
  568.     return;
  569. }
  570.  
  571. static void f11_get(void* vc12_Maybe, struct I1_12_T** s11__return_4)
  572. {
  573.     struct C12_Maybe* c12_Maybe = vc12_Maybe;
  574. B25_get:;
  575.     struct C14_get f0_storage;
  576.     struct C14_get* c14_get =  &f0_storage;
  577.     goto B26_get;
  578. B26_get:;
  579.     return;
  580. }
  581.  
  582. static void f12_Queue(void* vc0__main_, struct I0_8_interface8** s12__return_10)
  583. {
  584.     struct C0__main_* c0__main_ = vc0__main_;
  585. B27_Queue:;
  586.     struct C15_Queue* c15_Queue = S_ALLOC_CONSTRUCTOR(struct C15_Queue);
  587.     c15_Queue->c0__main_ = c0__main_;
  588.     struct C16_Queue* c16_Queue = S_ALLOC_CONSTRUCTOR(struct C16_Queue);
  589.     c16_Queue->c0__main_ = c15_Queue->c0__main_;
  590.     c16_Queue->c15_Queue = c15_Queue;
  591.     struct I2_13_interface13* s44__temp_40;
  592.     struct C17_Queue* s45__temp_41;
  593.     struct I0_8_interface8* s46__temp_42;
  594.     f9_Maybe(c16_Queue->c0__main_, &s44__temp_40);
  595.     c16_Queue->s16_head = s44__temp_40;
  596.     struct C17_Queue* c17_Queue = S_ALLOC_CONSTRUCTOR(struct C17_Queue);
  597.     c17_Queue->c0__main_ = c16_Queue->c0__main_;
  598.     c17_Queue->c15_Queue = c15_Queue;
  599.     c17_Queue->c16_Queue = c16_Queue;
  600.     c17_Queue->i3_8_interface8.o = c17_Queue;
  601.     c17_Queue->i3_8_interface8.m0_1 = f6_isEmpty;
  602.     c17_Queue->i3_8_interface8.m1_0 = f7_push;
  603.     c17_Queue->i3_8_interface8.m2_21 = f8_pop;
  604.     s45__temp_41 = c17_Queue;
  605.     s46__temp_42 = &s45__temp_41->i3_8_interface8;
  606.     *s12__return_10 = s46__temp_42;
  607.     goto B28_Queue;
  608. B28_Queue:;
  609.     return;
  610. }
  611.  
  612. static void f13_Node(void* vc16_Queue, s_int_t s13_value, struct I2_13_interface13* s14_next, struct I1_12_T** s15__return_13)
  613. {
  614.     struct C16_Queue* c16_Queue = vc16_Queue;
  615. B29_Node:;
  616.     struct C18_Node* c18_Node = S_ALLOC_CONSTRUCTOR(struct C18_Node);
  617.     struct C19_Node* s47__temp_43;
  618.     struct I1_12_T* s48__temp_44;
  619.     c18_Node->s13_value = s13_value;
  620.     c18_Node->s14_next = s14_next;
  621.     struct C19_Node* c19_Node = S_ALLOC_CONSTRUCTOR(struct C19_Node);
  622.     c19_Node->c18_Node = c18_Node;
  623.     c19_Node->i3_12_T.o = c19_Node;
  624.     c19_Node->i3_12_T.m3_27 = f4_get;
  625.     c19_Node->i3_12_T.m4_28 = f5_next;
  626.     s47__temp_43 = c19_Node;
  627.     s48__temp_44 = &s47__temp_43->i3_12_T;
  628.     *s15__return_13 = s48__temp_44;
  629.     goto B30_Node;
  630. B30_Node:;
  631.     return;
  632. }
  633.  
  634. /* BEGIN cowbel runtime library
  635.  *
  636.  * Written in 2012 by David Given.
  637.  *
  638.  * To the extent possible under law, the author of the cowbel runtime
  639.  * library (of which this code, up to the string 'END cowbel runtime library',
  640.  * is part), has dedicated all copyright and related and neighboring rights
  641.  * to this software to the public domain worldwide. This software is
  642.  * distributed without any warranty.
  643.  *
  644.  * Please see the file COPYING.CC0 in the distribution package for more
  645.  * information.
  646.  */
  647.  
  648. int main(int argc, const char* argv[])
  649. {
  650.     cowbel_main();
  651.     return 0;
  652. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement