#include "gvars_lib.h"
#include <string.h>
int lib_counter = 100; const char lib_message[] = "LIB_MESSAGE"; char lib_bss[512]; GlobalState LIB_STATE = {"LIB", 1, {123, 4.5}, {9,8,7,6}}; unsigned char lib_pattern[300];
static int lib_internal_counter; static const char lib_internal_const[] = "LIB_INTERNAL";
void lib_tick(void) {
lib_counter += 3;
lib_internal_counter += 5;
if (LIB_STATE.counter < 0) {
LIB_STATE.counter = 0;
}
LIB_STATE.counter += 2;
LIB_STATE.inner.x += 11;
LIB_STATE.inner.y += 1.25;
for (int i = 0; i < 4; i++) {
LIB_STATE.array[i] += 1;
}
(void)lib_message;
(void)lib_internal_const;
lib_bss[0] = (char)(lib_bss[0] + 1);
}
int* lib_get_internal_counter_ptr(void) {
return &lib_internal_counter;
}
#if defined(__GNUC__)
__attribute__((constructor))
#endif
static void init_lib_pattern(void) {
for (int i = 0; i < 300; i++) {
lib_pattern[i] = (unsigned char)(i & 0xFF);
}
}