diff options
Diffstat (limited to 'out.c')
-rw-r--r-- | out.c | 29 |
1 files changed, 8 insertions, 21 deletions
@@ -18,7 +18,6 @@ typedef struct { void *data; u64 n; } slice_; /* declarations */ void puti(i64 x); -i64 factorial(i64 x); void main__(void); /* code */ int main() { @@ -34,32 +33,20 @@ void puti(i64 x) { } -i64 factorial(i64 x) { +void main__(void) { + i64 N; { + i64 expr__; expr__ = 10;N = expr__;} slice_ numbers; { - slice_ expr__; slice_ a0_; a0_.data = calloc(x, sizeof(i64)); a0_.n = x;expr__ = a0_;numbers = expr__;} + slice_ expr__; slice_ a0_; a0_.data = calloc(N, sizeof(i64)); a0_.n = N;expr__ = a0_;numbers = expr__;} i64 i; { i64 expr__; expr__ = 0;i = expr__;} - while ((i<x)) { - (((i64(*))(numbers.data))[i]) = (i+1);; - i = (i+1);; - }; - i64 product; { - i64 expr__; expr__ = 1;product = expr__;} - i = 0;; - while ((i<x)) { - product = (product*(((i64(*))(numbers.data))[i]));; + while ((i<N)) { + (((i64(*))(numbers.data))[i]) = i;; i = (i+1);; }; - free(numbers.data); - return product; -} - - -void main__(void) { - - i64( a342[120]) = {0}; - (puti((factorial(10)))); + u64 a3_ = 0; slice_ a2_; a2_.data = (i64(*))(numbers.data) + a3_; a2_.n = 8 - a3_; + (puti((((i64(*))(a2_.data))[0]))); } |