summaryrefslogtreecommitdiff
path: root/out.c
blob: cc44ba0dcafa31160b353e1951663a53e92fc864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <stdint.h>
#include <stdlib.h>
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef float f32;
typedef double f64;
typedef unsigned char bool;
typedef struct { void *data; u64 n; } slice_;
#define false ((bool)0)
#define true ((bool)1)


/* declarations */
void puti(i64 x);
i64 foo(i64 x);
void main__(void);
/* code */
int main() {
	main__();
	return 0;
}

void puti(i64 x) {

	printf("%ld\n", (long)x);
}


i64 foo(i64 x) {

	slice_ C; {
	slice_ expr__; slice_ a0_; a0_.data = calloc(x, sizeof(i64)); a0_.n = x;expr__ = a0_;C = expr__;}
	i64 i; {
	i64 expr__; expr__ = 0;i = expr__;}
	while ((i<x)) {
		(((i64(*))(C.data))[i]) = i;;
		i = (i+1);;
	};
	i64 total; {
	i64 expr__; expr__ = 0;total = expr__;}
	while ((i<x)) {
		total = (total+(((i64(*))(C.data))[i]));;
		i = (i+1);;
	};
	return total;
}


void main__(void) {

	i64( A[0]) = {0}; 
	i64( B[0]) = {0}; 
}