// Generated by Bux C Backend v2 #include #include #include #include #include typedef const char* String; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long long uint64; typedef signed char int8; typedef short int16; typedef long long int64; typedef float float32; typedef double float64; typedef char char8; void* bux_alloc(unsigned int size); void bux_free(void* ptr); int Apply(int x, int (*op)(int)); int Double(int x); int __closure_2(int a, int b); int __closure_3(int x); int main(); void PrintInt(int x); void PrintLine(String msg); int Apply(int x, int (*op)(int)) { return op(x); } int Double(int x) { return x * 2; } int __closure_2(int a, int b) { return a + b; } int __closure_3(int x) { return x * 3; } int main() { int (*add)(int, int) = &__closure_2; int sum = add(3, 4); PrintInt(sum); PrintLine(""); int result = Apply(5, &__closure_3); PrintInt(result); PrintLine(""); int (*d)(int) = &Double; PrintInt(d(7)); PrintLine(""); return 0; }