#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#include <stdlib.h>
unsigned int crc32a(uint8_t *message, unsigned int size);
-char __malloc_start[512];
+unsigned int fib(unsigned int n)
+{
+ if (n == 0) {
+ return 0;
+ }
+
+ unsigned int a = 0;
+ unsigned int b = 1;
+
+ for (unsigned int i = 1; i < n; i++) {
+ unsigned int next = a + b;
+ a = b;
+ b = next;
+ }
+
+ return b;
+}
void rot13(char *buf)
{
return len;
}
-// TODO: These should be local to main, but if I make them global then gdb can
-// find them.
-static volatile int i;
-static int j;
+extern void *__malloc_freelist;
+
int main()
{
- i = 0;
- j = 0;
+ __malloc_freelist = 0;
+
+ volatile int i = 0;
+ int j = 0;
char *fox = "The quick brown fox jumps of the lazy dog.";
unsigned int checksum = 0;