Files
uw8-wasm3/platform.c

4243 lines
128 KiB
C

/* Automatically generated by wasm2c */
#include <assert.h>
#include <math.h>
#include <stddef.h>
#include <string.h>
#if defined(_MSC_VER)
#include <intrin.h>
#include <malloc.h>
#define alloca _alloca
#else
#include <alloca.h>
#endif
#include "platform.h"
#define TRAP(x) (wasm_rt_trap(WASM_RT_TRAP_##x), 0)
#if WASM_RT_USE_STACK_DEPTH_COUNT
#define FUNC_PROLOGUE \
if (++wasm_rt_call_stack_depth > WASM_RT_MAX_CALL_STACK_DEPTH) \
TRAP(EXHAUSTION);
#define FUNC_EPILOGUE --wasm_rt_call_stack_depth
#else
#define FUNC_PROLOGUE
#define FUNC_EPILOGUE
#endif
#define UNREACHABLE TRAP(UNREACHABLE)
#define CALL_INDIRECT(table, t, ft, x, ...) \
(LIKELY((x) < table.size && table.data[x].func && \
table.data[x].func_type == func_types[ft]) || \
TRAP(CALL_INDIRECT), \
((t)table.data[x].func)(__VA_ARGS__))
#define RANGE_CHECK(mem, offset, len) \
if (UNLIKELY(offset + (uint64_t)len > mem->size)) \
TRAP(OOB);
#if WASM_RT_MEMCHECK_SIGNAL_HANDLER
#define MEMCHECK(mem, a, t)
#else
#define MEMCHECK(mem, a, t) RANGE_CHECK(mem, a, sizeof(t))
#endif
#ifdef __GNUC__
#define wasm_asm __asm__
#else
#define wasm_asm(X)
#endif
#if WABT_BIG_ENDIAN
static inline void load_data(void* dest, const void* src, size_t n) {
size_t i = 0;
u8* dest_chars = dest;
memcpy(dest, src, n);
for (i = 0; i < (n >> 1); i++) {
u8 cursor = dest_chars[i];
dest_chars[i] = dest_chars[n - i - 1];
dest_chars[n - i - 1] = cursor;
}
}
#define LOAD_DATA(m, o, i, s) \
do { \
RANGE_CHECK((&m), m.size - o - s, s); \
load_data(&(m.data[m.size - o - s]), i, s); \
} while (0)
#define DEFINE_LOAD(name, t1, t2, t3) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[mem->size - addr - sizeof(t1)], \
sizeof(t1)); \
wasm_asm("" ::"r"(result)); \
return (t3)(t2)result; \
}
#define DEFINE_STORE(name, t1, t2) \
static inline void name(wasm_rt_memory_t* mem, u64 addr, t2 value) { \
MEMCHECK(mem, addr, t1); \
t1 wrapped = (t1)value; \
wasm_rt_memcpy(&mem->data[mem->size - addr - sizeof(t1)], &wrapped, \
sizeof(t1)); \
}
#else
static inline void load_data(void* dest, const void* src, size_t n) {
memcpy(dest, src, n);
}
#define LOAD_DATA(m, o, i, s) \
do { \
RANGE_CHECK((&m), o, s); \
load_data(&(m.data[o]), i, s); \
} while (0)
#define DEFINE_LOAD(name, t1, t2, t3) \
static inline t3 name(wasm_rt_memory_t* mem, u64 addr) { \
MEMCHECK(mem, addr, t1); \
t1 result; \
wasm_rt_memcpy(&result, &mem->data[addr], sizeof(t1)); \
wasm_asm("" ::"r"(result)); \
return (t3)(t2)result; \
}
#define DEFINE_STORE(name, t1, t2) \
static inline void name(wasm_rt_memory_t* mem, u64 addr, t2 value) { \
MEMCHECK(mem, addr, t1); \
t1 wrapped = (t1)value; \
wasm_rt_memcpy(&mem->data[addr], &wrapped, sizeof(t1)); \
}
#endif
DEFINE_LOAD(i32_load, u32, u32, u32)
DEFINE_LOAD(i64_load, u64, u64, u64)
DEFINE_LOAD(f32_load, f32, f32, f32)
DEFINE_LOAD(f64_load, f64, f64, f64)
DEFINE_LOAD(i32_load8_s, s8, s32, u32)
DEFINE_LOAD(i64_load8_s, s8, s64, u64)
DEFINE_LOAD(i32_load8_u, u8, u32, u32)
DEFINE_LOAD(i64_load8_u, u8, u64, u64)
DEFINE_LOAD(i32_load16_s, s16, s32, u32)
DEFINE_LOAD(i64_load16_s, s16, s64, u64)
DEFINE_LOAD(i32_load16_u, u16, u32, u32)
DEFINE_LOAD(i64_load16_u, u16, u64, u64)
DEFINE_LOAD(i64_load32_s, s32, s64, u64)
DEFINE_LOAD(i64_load32_u, u32, u64, u64)
DEFINE_STORE(i32_store, u32, u32)
DEFINE_STORE(i64_store, u64, u64)
DEFINE_STORE(f32_store, f32, f32)
DEFINE_STORE(f64_store, f64, f64)
DEFINE_STORE(i32_store8, u8, u32)
DEFINE_STORE(i32_store16, u16, u32)
DEFINE_STORE(i64_store8, u8, u64)
DEFINE_STORE(i64_store16, u16, u64)
DEFINE_STORE(i64_store32, u32, u64)
#if defined(_MSC_VER)
// Adapted from
// https://github.com/nemequ/portable-snippets/blob/master/builtin/builtin.h
static inline int I64_CLZ(unsigned long long v) {
unsigned long r = 0;
#if defined(_M_AMD64) || defined(_M_ARM)
if (_BitScanReverse64(&r, v)) {
return 63 - r;
}
#else
if (_BitScanReverse(&r, (unsigned long)(v >> 32))) {
return 31 - r;
} else if (_BitScanReverse(&r, (unsigned long)v)) {
return 63 - r;
}
#endif
return 64;
}
static inline int I32_CLZ(unsigned long v) {
unsigned long r = 0;
if (_BitScanReverse(&r, v)) {
return 31 - r;
}
return 32;
}
static inline int I64_CTZ(unsigned long long v) {
if (!v) {
return 64;
}
unsigned long r = 0;
#if defined(_M_AMD64) || defined(_M_ARM)
_BitScanForward64(&r, v);
return (int)r;
#else
if (_BitScanForward(&r, (unsigned int)(v))) {
return (int)(r);
}
_BitScanForward(&r, (unsigned int)(v >> 32));
return (int)(r + 32);
#endif
}
static inline int I32_CTZ(unsigned long v) {
if (!v) {
return 32;
}
unsigned long r = 0;
_BitScanForward(&r, v);
return (int)r;
}
#define POPCOUNT_DEFINE_PORTABLE(f_n, T) \
static inline u32 f_n(T x) { \
x = x - ((x >> 1) & (T) ~(T)0 / 3); \
x = (x & (T) ~(T)0 / 15 * 3) + ((x >> 2) & (T) ~(T)0 / 15 * 3); \
x = (x + (x >> 4)) & (T) ~(T)0 / 255 * 15; \
return (T)(x * ((T) ~(T)0 / 255)) >> (sizeof(T) - 1) * 8; \
}
POPCOUNT_DEFINE_PORTABLE(I32_POPCNT, u32)
POPCOUNT_DEFINE_PORTABLE(I64_POPCNT, u64)
#undef POPCOUNT_DEFINE_PORTABLE
#else
#define I32_CLZ(x) ((x) ? __builtin_clz(x) : 32)
#define I64_CLZ(x) ((x) ? __builtin_clzll(x) : 64)
#define I32_CTZ(x) ((x) ? __builtin_ctz(x) : 32)
#define I64_CTZ(x) ((x) ? __builtin_ctzll(x) : 64)
#define I32_POPCNT(x) (__builtin_popcount(x))
#define I64_POPCNT(x) (__builtin_popcountll(x))
#endif
#define DIV_S(ut, min, x, y) \
((UNLIKELY((y) == 0)) \
? TRAP(DIV_BY_ZERO) \
: (UNLIKELY((x) == min && (y) == -1)) ? TRAP(INT_OVERFLOW) \
: (ut)((x) / (y)))
#define REM_S(ut, min, x, y) \
((UNLIKELY((y) == 0)) \
? TRAP(DIV_BY_ZERO) \
: (UNLIKELY((x) == min && (y) == -1)) ? 0 : (ut)((x) % (y)))
#define I32_DIV_S(x, y) DIV_S(u32, INT32_MIN, (s32)x, (s32)y)
#define I64_DIV_S(x, y) DIV_S(u64, INT64_MIN, (s64)x, (s64)y)
#define I32_REM_S(x, y) REM_S(u32, INT32_MIN, (s32)x, (s32)y)
#define I64_REM_S(x, y) REM_S(u64, INT64_MIN, (s64)x, (s64)y)
#define DIVREM_U(op, x, y) \
((UNLIKELY((y) == 0)) ? TRAP(DIV_BY_ZERO) : ((x)op(y)))
#define DIV_U(x, y) DIVREM_U(/, x, y)
#define REM_U(x, y) DIVREM_U(%, x, y)
#define ROTL(x, y, mask) \
(((x) << ((y) & (mask))) | ((x) >> (((mask) - (y) + 1) & (mask))))
#define ROTR(x, y, mask) \
(((x) >> ((y) & (mask))) | ((x) << (((mask) - (y) + 1) & (mask))))
#define I32_ROTL(x, y) ROTL(x, y, 31)
#define I64_ROTL(x, y) ROTL(x, y, 63)
#define I32_ROTR(x, y) ROTR(x, y, 31)
#define I64_ROTR(x, y) ROTR(x, y, 63)
#define FMIN(x, y) \
((UNLIKELY((x) != (x))) \
? NAN \
: (UNLIKELY((y) != (y))) \
? NAN \
: (UNLIKELY((x) == 0 && (y) == 0)) ? (signbit(x) ? x : y) \
: (x < y) ? x : y)
#define FMAX(x, y) \
((UNLIKELY((x) != (x))) \
? NAN \
: (UNLIKELY((y) != (y))) \
? NAN \
: (UNLIKELY((x) == 0 && (y) == 0)) ? (signbit(x) ? y : x) \
: (x > y) ? x : y)
#define TRUNC_S(ut, st, ft, min, minop, max, x) \
((UNLIKELY((x) != (x))) \
? TRAP(INVALID_CONVERSION) \
: (UNLIKELY(!((x)minop(min) && (x) < (max)))) ? TRAP(INT_OVERFLOW) \
: (ut)(st)(x))
#define I32_TRUNC_S_F32(x) \
TRUNC_S(u32, s32, f32, (f32)INT32_MIN, >=, 2147483648.f, x)
#define I64_TRUNC_S_F32(x) \
TRUNC_S(u64, s64, f32, (f32)INT64_MIN, >=, (f32)INT64_MAX, x)
#define I32_TRUNC_S_F64(x) \
TRUNC_S(u32, s32, f64, -2147483649., >, 2147483648., x)
#define I64_TRUNC_S_F64(x) \
TRUNC_S(u64, s64, f64, (f64)INT64_MIN, >=, (f64)INT64_MAX, x)
#define TRUNC_U(ut, ft, max, x) \
((UNLIKELY((x) != (x))) \
? TRAP(INVALID_CONVERSION) \
: (UNLIKELY(!((x) > (ft)-1 && (x) < (max)))) ? TRAP(INT_OVERFLOW) \
: (ut)(x))
#define I32_TRUNC_U_F32(x) TRUNC_U(u32, f32, 4294967296.f, x)
#define I64_TRUNC_U_F32(x) TRUNC_U(u64, f32, (f32)UINT64_MAX, x)
#define I32_TRUNC_U_F64(x) TRUNC_U(u32, f64, 4294967296., x)
#define I64_TRUNC_U_F64(x) TRUNC_U(u64, f64, (f64)UINT64_MAX, x)
#define TRUNC_SAT_S(ut, st, ft, min, smin, minop, max, smax, x) \
((UNLIKELY((x) != (x))) \
? 0 \
: (UNLIKELY(!((x)minop(min)))) \
? smin \
: (UNLIKELY(!((x) < (max)))) ? smax : (ut)(st)(x))
#define I32_TRUNC_SAT_S_F32(x) \
TRUNC_SAT_S(u32, s32, f32, (f32)INT32_MIN, INT32_MIN, >=, 2147483648.f, \
INT32_MAX, x)
#define I64_TRUNC_SAT_S_F32(x) \
TRUNC_SAT_S(u64, s64, f32, (f32)INT64_MIN, INT64_MIN, >=, (f32)INT64_MAX, \
INT64_MAX, x)
#define I32_TRUNC_SAT_S_F64(x) \
TRUNC_SAT_S(u32, s32, f64, -2147483649., INT32_MIN, >, 2147483648., \
INT32_MAX, x)
#define I64_TRUNC_SAT_S_F64(x) \
TRUNC_SAT_S(u64, s64, f64, (f64)INT64_MIN, INT64_MIN, >=, (f64)INT64_MAX, \
INT64_MAX, x)
#define TRUNC_SAT_U(ut, ft, max, smax, x) \
((UNLIKELY((x) != (x))) ? 0 \
: (UNLIKELY(!((x) > (ft)-1))) \
? 0 \
: (UNLIKELY(!((x) < (max)))) ? smax : (ut)(x))
#define I32_TRUNC_SAT_U_F32(x) \
TRUNC_SAT_U(u32, f32, 4294967296.f, UINT32_MAX, x)
#define I64_TRUNC_SAT_U_F32(x) \
TRUNC_SAT_U(u64, f32, (f32)UINT64_MAX, UINT64_MAX, x)
#define I32_TRUNC_SAT_U_F64(x) TRUNC_SAT_U(u32, f64, 4294967296., UINT32_MAX, x)
#define I64_TRUNC_SAT_U_F64(x) \
TRUNC_SAT_U(u64, f64, (f64)UINT64_MAX, UINT64_MAX, x)
#define DEFINE_REINTERPRET(name, t1, t2) \
static inline t2 name(t1 x) { \
t2 result; \
memcpy(&result, &x, sizeof(result)); \
return result; \
}
DEFINE_REINTERPRET(f32_reinterpret_i32, u32, f32)
DEFINE_REINTERPRET(i32_reinterpret_f32, f32, u32)
DEFINE_REINTERPRET(f64_reinterpret_i64, u64, f64)
DEFINE_REINTERPRET(i64_reinterpret_f64, f64, u64)
static float quiet_nanf(float x) {
uint32_t tmp;
memcpy(&tmp, &x, 4);
tmp |= 0x7fc00000lu;
memcpy(&x, &tmp, 4);
return x;
}
static double quiet_nan(double x) {
uint64_t tmp;
memcpy(&tmp, &x, 8);
tmp |= 0x7ff8000000000000llu;
memcpy(&x, &tmp, 8);
return x;
}
static double wasm_quiet(double x) {
if (UNLIKELY(isnan(x))) {
return quiet_nan(x);
}
return x;
}
static float wasm_quietf(float x) {
if (UNLIKELY(isnan(x))) {
return quiet_nanf(x);
}
return x;
}
static double wasm_floor(double x) {
if (UNLIKELY(isnan(x))) {
return quiet_nan(x);
}
return floor(x);
}
static float wasm_floorf(float x) {
if (UNLIKELY(isnan(x))) {
return quiet_nanf(x);
}
return floorf(x);
}
static double wasm_ceil(double x) {
if (UNLIKELY(isnan(x))) {
return quiet_nan(x);
}
return ceil(x);
}
static float wasm_ceilf(float x) {
if (UNLIKELY(isnan(x))) {
return quiet_nanf(x);
}
return ceilf(x);
}
static double wasm_trunc(double x) {
if (UNLIKELY(isnan(x))) {
return quiet_nan(x);
}
return trunc(x);
}
static float wasm_truncf(float x) {
if (UNLIKELY(isnan(x))) {
return quiet_nanf(x);
}
return truncf(x);
}
static float wasm_nearbyintf(float x) {
if (UNLIKELY(isnan(x))) {
return quiet_nanf(x);
}
return nearbyintf(x);
}
static double wasm_nearbyint(double x) {
if (UNLIKELY(isnan(x))) {
return quiet_nan(x);
}
return nearbyint(x);
}
static float wasm_fabsf(float x) {
if (UNLIKELY(isnan(x))) {
uint32_t tmp;
memcpy(&tmp, &x, 4);
tmp = tmp & ~(1 << 31);
memcpy(&x, &tmp, 4);
return x;
}
return fabsf(x);
}
static double wasm_fabs(double x) {
if (UNLIKELY(isnan(x))) {
uint64_t tmp;
memcpy(&tmp, &x, 8);
tmp = tmp & ~(1ll << 63);
memcpy(&x, &tmp, 8);
return x;
}
return fabs(x);
}
static double wasm_sqrt(double x) {
if (UNLIKELY(isnan(x))) {
return quiet_nan(x);
}
return sqrt(x);
}
static float wasm_sqrtf(float x) {
if (UNLIKELY(isnan(x))) {
return quiet_nanf(x);
}
return sqrtf(x);
}
static inline void memory_fill(wasm_rt_memory_t* mem, u32 d, u32 val, u32 n) {
RANGE_CHECK(mem, d, n);
memset(mem->data + d, val, n);
}
static inline void memory_copy(wasm_rt_memory_t* dest,
const wasm_rt_memory_t* src,
u32 dest_addr,
u32 src_addr,
u32 n) {
RANGE_CHECK(dest, dest_addr, n);
RANGE_CHECK(src, src_addr, n);
memmove(dest->data + dest_addr, src->data + src_addr, n);
}
static inline void memory_init(wasm_rt_memory_t* dest,
const u8* src,
u32 src_size,
u32 dest_addr,
u32 src_addr,
u32 n) {
if (UNLIKELY(src_addr + (uint64_t)n > src_size))
TRAP(OOB);
LOAD_DATA((*dest), dest_addr, src + src_addr, n);
}
typedef struct {
uint32_t func_type_index;
wasm_rt_function_ptr_t func;
size_t module_offset;
} wasm_elem_segment_expr_t;
static inline void funcref_table_init(wasm_rt_funcref_table_t* dest,
const wasm_elem_segment_expr_t* src,
u32 src_size,
u32 dest_addr,
u32 src_addr,
u32 n,
void* module_instance,
const u32* func_types) {
if (UNLIKELY(src_addr + (uint64_t)n > src_size))
TRAP(OOB);
if (UNLIKELY(dest_addr + (uint64_t)n > dest->size))
TRAP(OOB);
for (u32 i = 0; i < n; i++) {
const wasm_elem_segment_expr_t* src_expr = &src[src_addr + i];
dest->data[dest_addr + i] = (wasm_rt_funcref_t){
func_types[src_expr->func_type_index], src_expr->func,
(char*)module_instance + src_expr->module_offset};
}
}
// Currently we only support initializing externref tables with ref.null.
static inline void externref_table_init(wasm_rt_externref_table_t* dest,
const wasm_rt_externref_t* src,
u32 src_size,
u32 dest_addr,
u32 src_addr,
u32 n) {
if (UNLIKELY(src_addr + (uint64_t)n > src_size))
TRAP(OOB);
if (UNLIKELY(dest_addr + (uint64_t)n > dest->size))
TRAP(OOB);
for (u32 i = 0; i < n; i++) {
const wasm_rt_externref_t* src_expr = &src[src_addr + i];
dest->data[dest_addr + i] = *src_expr;
}
}
#define DEFINE_TABLE_COPY(type) \
static inline void type##_table_copy(wasm_rt_##type##_table_t* dest, \
const wasm_rt_##type##_table_t* src, \
u32 dest_addr, u32 src_addr, u32 n) { \
if (UNLIKELY(dest_addr + (uint64_t)n > dest->size)) \
TRAP(OOB); \
if (UNLIKELY(src_addr + (uint64_t)n > src->size)) \
TRAP(OOB); \
\
memmove(dest->data + dest_addr, src->data + src_addr, \
n * sizeof(wasm_rt_##type##_t)); \
}
DEFINE_TABLE_COPY(funcref)
DEFINE_TABLE_COPY(externref)
#define DEFINE_TABLE_GET(type) \
static inline wasm_rt_##type##_t type##_table_get( \
const wasm_rt_##type##_table_t* table, u32 i) { \
if (UNLIKELY(i >= table->size)) \
TRAP(OOB); \
return table->data[i]; \
}
DEFINE_TABLE_GET(funcref)
DEFINE_TABLE_GET(externref)
#define DEFINE_TABLE_SET(type) \
static inline void type##_table_set(const wasm_rt_##type##_table_t* table, \
u32 i, const wasm_rt_##type##_t val) { \
if (UNLIKELY(i >= table->size)) \
TRAP(OOB); \
table->data[i] = val; \
}
DEFINE_TABLE_SET(funcref)
DEFINE_TABLE_SET(externref)
#define DEFINE_TABLE_FILL(type) \
static inline void type##_table_fill(const wasm_rt_##type##_table_t* table, \
u32 d, const wasm_rt_##type##_t val, \
u32 n) { \
if (UNLIKELY((uint64_t)d + n > table->size)) \
TRAP(OOB); \
for (uint32_t i = d; i < d + n; i++) { \
table->data[i] = val; \
} \
}
DEFINE_TABLE_FILL(funcref)
DEFINE_TABLE_FILL(externref)
static bool s_module_initialized = false;
static u32 func_types[18];
static void init_func_types(void) {
func_types[0] = wasm_rt_register_func_type(1, 1, WASM_RT_F32, WASM_RT_F32);
func_types[1] = wasm_rt_register_func_type(2, 1, WASM_RT_F32, WASM_RT_F32, WASM_RT_F32);
func_types[2] = wasm_rt_register_func_type(1, 0, WASM_RT_I32);
func_types[3] = wasm_rt_register_func_type(0, 1, WASM_RT_F32);
func_types[4] = wasm_rt_register_func_type(1, 1, WASM_RT_I32, WASM_RT_I32);
func_types[5] = wasm_rt_register_func_type(0, 1, WASM_RT_I32);
func_types[6] = wasm_rt_register_func_type(0, 1, WASM_RT_I64);
func_types[7] = wasm_rt_register_func_type(3, 0, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32);
func_types[8] = wasm_rt_register_func_type(2, 1, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32);
func_types[9] = wasm_rt_register_func_type(3, 1, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32);
func_types[10] = wasm_rt_register_func_type(4, 0, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32);
func_types[11] = wasm_rt_register_func_type(5, 0, WASM_RT_F32, WASM_RT_F32, WASM_RT_F32, WASM_RT_F32, WASM_RT_I32);
func_types[12] = wasm_rt_register_func_type(4, 0, WASM_RT_F32, WASM_RT_F32, WASM_RT_F32, WASM_RT_I32);
func_types[13] = wasm_rt_register_func_type(5, 0, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32, WASM_RT_I32);
func_types[14] = wasm_rt_register_func_type(2, 0, WASM_RT_I32, WASM_RT_I32);
func_types[15] = wasm_rt_register_func_type(0, 0);
func_types[16] = wasm_rt_register_func_type(1, 1, WASM_RT_I32, WASM_RT_F32);
func_types[17] = wasm_rt_register_func_type(3, 1, WASM_RT_I32, WASM_RT_F32, WASM_RT_I32, WASM_RT_I32);
}
static f32 w2c_time(Z_platform_instance_t*);
static u32 w2c_isButtonPressed(Z_platform_instance_t*, u32);
static u32 w2c_isButtonTriggered(Z_platform_instance_t*, u32);
static u32 w2c_random(Z_platform_instance_t*);
static u64 w2c_random64(Z_platform_instance_t*);
static f32 w2c_randomf(Z_platform_instance_t*);
static void w2c_randomSeed(Z_platform_instance_t*, u32);
static f32 w2c_fmod(Z_platform_instance_t*, f32, f32);
static void w2c_cls(Z_platform_instance_t*, u32);
static void w2c_setPixel(Z_platform_instance_t*, u32, u32, u32);
static u32 w2c_getPixel(Z_platform_instance_t*, u32, u32);
static void w2c_hline(Z_platform_instance_t*, u32, u32, u32, u32);
static void w2c_rectangle(Z_platform_instance_t*, f32, f32, f32, f32, u32);
static void w2c_rectangleOutline(Z_platform_instance_t*, f32, f32, f32, f32, u32);
static void w2c_circle(Z_platform_instance_t*, f32, f32, f32, u32);
static void w2c_circleOutline(Z_platform_instance_t*, f32, f32, f32, u32);
static void w2c_line(Z_platform_instance_t*, f32, f32, f32, f32, u32);
static void w2c_blitSprite(Z_platform_instance_t*, u32, u32, u32, u32, u32);
static void w2c_grabSprite(Z_platform_instance_t*, u32, u32, u32, u32, u32);
static void w2c_printChar(Z_platform_instance_t*, u32);
static void w2c_printString(Z_platform_instance_t*, u32);
static void w2c_printInt(Z_platform_instance_t*, u32);
static void w2c_setTextColor(Z_platform_instance_t*, u32);
static void w2c_setBackgroundColor(Z_platform_instance_t*, u32);
static void w2c_setCursorPosition(Z_platform_instance_t*, u32, u32);
static void w2c_playNote(Z_platform_instance_t*, u32, u32);
static void w2c_endFrame(Z_platform_instance_t*);
static f32 w2c_sndGes(Z_platform_instance_t*, u32);
static u32 w2c_f33(Z_platform_instance_t*, u32, u32, u32);
static void w2c_f34(Z_platform_instance_t*, u32);
static void w2c_f35(Z_platform_instance_t*, u32);
static void w2c_f36(Z_platform_instance_t*);
static u32 w2c_f37(Z_platform_instance_t*, u32, f32, u32);
static void init_globals(Z_platform_instance_t* instance) {
instance->w2c_g0 = 37ull;
instance->w2c_g1 = 0u;
instance->w2c_g2 = 0u;
instance->w2c_g3 = 15u;
instance->w2c_g4 = 0u;
instance->w2c_g5 = 0u;
instance->w2c_g6 = 0u;
}
static const u8 data_segment_data_w2c_d0[] = {
0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03,
};
static const u8 data_segment_data_w2c_d1[] = {
0x80, 0xc0, 0x00, 0x51, 0xa0, 0x50, 0xc4, 0x00, 0x00, 0x45, 0x60, 0x40,
0x44, 0xb0, 0x00, 0x45, 0x90, 0x43, 0x04, 0xf0, 0x00, 0x45, 0xa4, 0x44,
0xff, 0xff, 0x01, 0x01, 0x00, 0x64, 0x00, 0x64,
};
static const u8 data_segment_data_w2c_d2[] = {
0x50, 0x00, 0x00, 0x00,
};
static const u8 data_segment_data_w2c_d3[] = {
0x1a, 0x1c, 0x2c, 0x00, 0x5d, 0x27, 0x5d, 0x00, 0xb1, 0x3e, 0x53, 0x00,
0xef, 0x7d, 0x57, 0x00, 0xff, 0xcd, 0x75, 0x00, 0xa7, 0xf0, 0x70, 0x00,
0x38, 0xb7, 0x64, 0x00, 0x25, 0x71, 0x79, 0x00, 0x29, 0x36, 0x6f, 0x00,
0x3b, 0x5d, 0xc9, 0x00, 0x41, 0xa6, 0xf6, 0x00, 0x73, 0xef, 0xf7, 0x00,
0xf4, 0xf4, 0xf4, 0x00, 0x94, 0xb0, 0xc2, 0x00, 0x56, 0x6c, 0x86, 0x00,
0x33, 0x3c, 0x57, 0x00,
};
static const u8 data_segment_data_w2c_d4[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x38, 0x38, 0x38, 0x38, 0x38, 0x00, 0x38, 0x00, 0x6c, 0x6c, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xfe, 0x74, 0xfe, 0x74, 0x00, 0x00,
0x38, 0x7c, 0xb8, 0x7c, 0x3a, 0x7c, 0x38, 0x00, 0x00, 0x8e, 0x1c, 0x38,
0x70, 0xe2, 0x00, 0x00, 0x78, 0xe4, 0xe4, 0x70, 0xea, 0xe4, 0x7a, 0x00,
0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0x70, 0x70,
0x70, 0x38, 0x1c, 0x00, 0x70, 0x38, 0x1c, 0x1c, 0x1c, 0x38, 0x70, 0x00,
0x00, 0x38, 0xfe, 0x7c, 0xfe, 0x38, 0x00, 0x00, 0x00, 0x30, 0x30, 0xfc,
0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x70,
0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0x00,
0x38, 0x74, 0xe2, 0xea, 0xe2, 0x74, 0x38, 0x00, 0x1c, 0x3c, 0x5c, 0x1c,
0x1c, 0x1c, 0x3e, 0x00, 0x7c, 0x8e, 0x0e, 0x1c, 0x38, 0x70, 0xfe, 0x00,
0x7c, 0x8e, 0x0e, 0x3c, 0x0e, 0x8e, 0x7c, 0x00, 0x1c, 0x3c, 0x5c, 0x9c,
0xfe, 0x1c, 0x1c, 0x00, 0xfe, 0xe0, 0xe0, 0xfc, 0x02, 0xe2, 0x7c, 0x00,
0x7c, 0xe2, 0xe0, 0xfc, 0xe2, 0xe2, 0x7c, 0x00, 0xfe, 0x0e, 0x1c, 0x38,
0x38, 0x38, 0x38, 0x00, 0x7c, 0xe2, 0xe2, 0x7c, 0xe2, 0xe2, 0x7c, 0x00,
0x7c, 0x8e, 0x8e, 0x7e, 0x0e, 0x8e, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x38,
0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x38, 0x38, 0x70,
0x1c, 0x38, 0x70, 0xe0, 0x70, 0x38, 0x1c, 0x00, 0x00, 0x00, 0x7c, 0x00,
0x7c, 0x00, 0x00, 0x00, 0xe0, 0x70, 0x38, 0x1c, 0x38, 0x70, 0xe0, 0x00,
0x7c, 0x8e, 0x0e, 0x1c, 0x38, 0x00, 0x38, 0x00, 0x00, 0x7c, 0xe2, 0xea,
0xec, 0xe0, 0x7c, 0x00, 0x38, 0x74, 0xe2, 0xe2, 0xfe, 0xe2, 0xe2, 0x00,
0xfc, 0xe2, 0xe2, 0xfc, 0xe2, 0xe2, 0xfc, 0x00, 0x3c, 0x72, 0xe0, 0xe0,
0xe0, 0x72, 0x3c, 0x00, 0xf8, 0xe4, 0xe2, 0xe2, 0xe2, 0xe4, 0xf8, 0x00,
0xfe, 0xe0, 0xe0, 0xf8, 0xe0, 0xe0, 0xfe, 0x00, 0xfe, 0xe0, 0xe0, 0xf8,
0xe0, 0xe0, 0xe0, 0x00, 0x7c, 0xe2, 0xe0, 0xee, 0xe2, 0xe6, 0x7a, 0x00,
0xe2, 0xe2, 0xe2, 0xfe, 0xe2, 0xe2, 0xe2, 0x00, 0x7c, 0x38, 0x38, 0x38,
0x38, 0x38, 0x7c, 0x00, 0x3e, 0x1c, 0x1c, 0x1c, 0x1c, 0x9c, 0x78, 0x00,
0xe2, 0xe4, 0xe8, 0xf0, 0xe8, 0xe4, 0xe2, 0x00, 0xe0, 0xe0, 0xe0, 0xe0,
0xe0, 0xe0, 0xfe, 0x00, 0xf6, 0xea, 0xea, 0xea, 0xe2, 0xe2, 0xe2, 0x00,
0xe2, 0xf2, 0xfa, 0xee, 0xe6, 0xe2, 0xe2, 0x00, 0x7c, 0xe2, 0xe2, 0xe2,
0xe2, 0xe2, 0x7c, 0x00, 0xfc, 0xe2, 0xe2, 0xe2, 0xfc, 0xe0, 0xe0, 0x00,
0x7c, 0xe2, 0xe2, 0xe2, 0xea, 0xe4, 0x7a, 0x00, 0xfc, 0xe2, 0xe2, 0xfc,
0xe8, 0xe4, 0xe2, 0x00, 0x7c, 0xe2, 0xe0, 0x7c, 0x02, 0xe2, 0x7c, 0x00,
0xfe, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x00, 0xe2, 0xe2, 0xe2, 0xe2,
0xe2, 0xe2, 0x7c, 0x00, 0xe2, 0xe2, 0xe2, 0xe2, 0x74, 0x74, 0x38, 0x00,
0xe2, 0xe2, 0xe2, 0xea, 0xea, 0xea, 0x74, 0x00, 0x8e, 0x8e, 0x5c, 0x38,
0x74, 0xe2, 0xe2, 0x00, 0xe2, 0xe2, 0x74, 0x38, 0x38, 0x38, 0x38, 0x00,
0xfe, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xfe, 0x00, 0xfc, 0xe0, 0xe0, 0xe0,
0xe0, 0xe0, 0xfc, 0x00, 0x00, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x00, 0x00,
0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x00, 0x18, 0x3c, 0x72, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x0e,
0x7e, 0x8e, 0x7e, 0x00, 0xe0, 0xe0, 0xfc, 0xe2, 0xe2, 0xe2, 0xfc, 0x00,
0x00, 0x00, 0x7c, 0xe2, 0xe0, 0xe2, 0x7c, 0x00, 0x0e, 0x0e, 0x7e, 0x8e,
0x8e, 0x8e, 0x7e, 0x00, 0x00, 0x00, 0x7c, 0xe2, 0xfe, 0xe0, 0x7c, 0x00,
0x3c, 0x72, 0x70, 0xf8, 0x70, 0x70, 0x70, 0x00, 0x00, 0x00, 0x7e, 0xe2,
0xe2, 0x7e, 0x02, 0x7c, 0xe0, 0xe0, 0xfc, 0xe2, 0xe2, 0xe2, 0xe2, 0x00,
0x38, 0x00, 0x78, 0x38, 0x38, 0x38, 0x7c, 0x00, 0x0e, 0x00, 0x0e, 0x0e,
0x0e, 0x0e, 0x8e, 0x7c, 0xe0, 0xe0, 0xe4, 0xe8, 0xf0, 0xe8, 0xe6, 0x00,
0x78, 0x38, 0x38, 0x38, 0x38, 0x38, 0x7c, 0x00, 0x00, 0x00, 0xf4, 0xea,
0xea, 0xe2, 0xe2, 0x00, 0x00, 0x00, 0xfc, 0xe2, 0xe2, 0xe2, 0xe2, 0x00,
0x00, 0x00, 0x7c, 0xe2, 0xe2, 0xe2, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0xe2,
0xe2, 0xfc, 0xe0, 0xe0, 0x00, 0x00, 0x7e, 0x8e, 0x8e, 0x7e, 0x0e, 0x0e,
0x00, 0x00, 0xee, 0xf0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x7c, 0xe0,
0x7c, 0x02, 0x7c, 0x00, 0x70, 0x70, 0xf8, 0x70, 0x70, 0x72, 0x3c, 0x00,
0x00, 0x00, 0xe2, 0xe2, 0xe2, 0xe2, 0x7c, 0x00, 0x00, 0x00, 0xe2, 0xe2,
0xe2, 0x74, 0x38, 0x00, 0x00, 0x00, 0xe2, 0xe2, 0xea, 0xea, 0x74, 0x00,
0x00, 0x00, 0x8e, 0x5c, 0x38, 0x74, 0xe2, 0x00, 0x00, 0x00, 0xe2, 0xe2,
0xe2, 0x7e, 0x02, 0x7c, 0x00, 0x00, 0xfe, 0x1c, 0x38, 0x70, 0xfe, 0x00,
0x3c, 0x70, 0x70, 0xe0, 0x70, 0x70, 0x3c, 0x00, 0x38, 0x38, 0x38, 0x38,
0x38, 0x38, 0x38, 0x00, 0xf0, 0x38, 0x38, 0x1c, 0x38, 0x38, 0xf0, 0x00,
0x22, 0x74, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00,
0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c,
0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c,
0x00, 0x00, 0xf8, 0xfc, 0xfc, 0xf8, 0x00, 0x00, 0x3c, 0x3c, 0xfc, 0xfc,
0xfc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xfc, 0xfc, 0x3c, 0x3c,
0x38, 0x38, 0xf8, 0xf8, 0xf8, 0xf8, 0x38, 0x38, 0x00, 0x00, 0x1f, 0x3f,
0x3f, 0x1f, 0x00, 0x00, 0x3c, 0x3c, 0x3f, 0x3f, 0x3f, 0x1f, 0x00, 0x00,
0x00, 0x00, 0x1f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3c, 0x3c, 0x3c, 0x3f, 0x3f,
0x3f, 0x3f, 0x3c, 0x3c, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0x3c, 0x3c, 0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x3c,
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x70, 0x38,
0x18, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0e, 0x1c, 0x18, 0x00, 0x00, 0x00,
0xc3, 0xe7, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x1c, 0x0e, 0x07, 0x03, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x07, 0x03,
0x03, 0x07, 0x0e, 0x1c, 0x1c, 0x0e, 0x07, 0x03, 0xc3, 0xe7, 0x7e, 0x3c,
0x1c, 0x0e, 0x07, 0x03, 0x00, 0x00, 0x00, 0x18, 0x38, 0x70, 0xe0, 0xc0,
0xc0, 0xe0, 0x70, 0x38, 0x38, 0x70, 0xe0, 0xc0, 0x03, 0x07, 0x0e, 0x1c,
0x38, 0x70, 0xe0, 0xc0, 0xc3, 0xe7, 0x7e, 0x3c, 0x38, 0x70, 0xe0, 0xc0,
0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xe7, 0xc3, 0xc0, 0xe0, 0x70, 0x38,
0x3c, 0x7e, 0xe7, 0xc3, 0x03, 0x07, 0x0e, 0x1c, 0x3c, 0x7e, 0xe7, 0xc3,
0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa, 0x00,
0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xff, 0xaa, 0xff, 0xaa,
0xff, 0xaa, 0xff, 0xaa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xf0, 0xf0, 0xf0, 0xf0,
0x0f, 0x0f, 0x0f, 0x0f, 0xcc, 0x33, 0xcc, 0x33, 0xcc, 0x33, 0xcc, 0x33,
0xf0, 0xf0, 0x0f, 0x0f, 0xf0, 0xf0, 0x0f, 0x0f, 0xcc, 0x66, 0x33, 0x99,
0xcc, 0x66, 0x33, 0x99, 0x33, 0x66, 0xcc, 0x99, 0x33, 0x66, 0xcc, 0x99,
0x00, 0x22, 0x55, 0x88, 0x00, 0x22, 0x55, 0x88, 0x44, 0xee, 0x44, 0x00,
0x11, 0xbb, 0x11, 0x00, 0x70, 0xf8, 0x70, 0x22, 0x07, 0x8f, 0x07, 0x22,
0x7e, 0x3c, 0x99, 0xc3, 0xe7, 0xc3, 0x99, 0x3c, 0xee, 0x33, 0x11, 0x99,
0xee, 0x33, 0x11, 0x99, 0xe0, 0xf0, 0xf8, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0,
0x1f, 0x0f, 0x07, 0x03, 0x03, 0x07, 0x0f, 0x1f, 0xf8, 0xf0, 0xe0, 0xc0,
0xc0, 0xe0, 0xf0, 0xf8, 0x07, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x07,
0xfc, 0xfc, 0xf8, 0xf8, 0xf0, 0xf0, 0xe0, 0xe0, 0x03, 0x03, 0x07, 0x07,
0x0f, 0x0f, 0x1f, 0x1f, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8,
0x3f, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0xff, 0xff, 0xff, 0x7e,
0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xc3, 0xe7, 0xff, 0xff,
0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3,
0x81, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0xc0,
0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x03, 0x00, 0x00,
0x00, 0x10, 0x38, 0x38, 0x10, 0x38, 0x7c, 0x7c, 0x00, 0x5a, 0x5a, 0x7e,
0x7e, 0x3c, 0x3c, 0x7e, 0x20, 0x38, 0x74, 0x3e, 0x32, 0x38, 0x7c, 0x7c,
0x10, 0x38, 0x28, 0x44, 0x28, 0x38, 0x92, 0x7c, 0x00, 0x28, 0xaa, 0xba,
0x7c, 0x7c, 0x7c, 0x38, 0x10, 0x38, 0x10, 0x6c, 0xfe, 0xd6, 0x6c, 0x38,
0x18, 0x24, 0x42, 0x81, 0x7e, 0x52, 0x5e, 0x7e, 0x00, 0x00, 0x38, 0x44,
0x92, 0x44, 0x38, 0x00, 0x00, 0x70, 0x88, 0x68, 0xa8, 0x50, 0x60, 0x00,
0x38, 0x44, 0x9a, 0xa2, 0x9a, 0x44, 0x38, 0x00, 0x70, 0x88, 0x1c, 0xbe,
0x3a, 0x36, 0x1c, 0x00, 0x3c, 0x24, 0xe7, 0x99, 0x99, 0xe7, 0x24, 0x3c,
0x38, 0x6c, 0xd6, 0xc6, 0xd6, 0x54, 0x38, 0x00, 0x38, 0x4c, 0xd6, 0xce,
0xd6, 0x4c, 0x38, 0x00, 0x38, 0x54, 0xd6, 0xee, 0xd6, 0x54, 0x38, 0x00,
0x38, 0x54, 0xd6, 0xc6, 0xee, 0x6c, 0x38, 0x00, 0x18, 0x3c, 0x24, 0x66,
0x66, 0xff, 0xe7, 0xff, 0x30, 0x78, 0x7a, 0x7a, 0x7e, 0x7e, 0x7c, 0x38,
0xfc, 0x92, 0x92, 0x82, 0x92, 0x82, 0xfe, 0x00, 0x3c, 0x22, 0xf2, 0x8a,
0x8a, 0x8e, 0x88, 0xf8, 0x40, 0xa2, 0x54, 0x08, 0x54, 0xa2, 0x40, 0x00,
0x6c, 0x92, 0x82, 0x44, 0x82, 0x92, 0x6c, 0x00, 0x62, 0x72, 0x62, 0x52,
0x62, 0x72, 0x62, 0x52, 0x0f, 0x30, 0x6a, 0xf0, 0xe8, 0xf4, 0xff, 0x7f,
0xff, 0x00, 0x02, 0x00, 0x20, 0x00, 0xff, 0xff, 0xf0, 0x0c, 0x02, 0x01,
0x21, 0x01, 0xff, 0xfe, 0xe6, 0x9a, 0x82, 0x82, 0xe6, 0x98, 0x80, 0x80,
0x5a, 0x7e, 0x5a, 0x18, 0xbd, 0xff, 0x99, 0x3c, 0x00, 0x60, 0x70, 0xd6,
0xed, 0xff, 0xff, 0x00, 0x00, 0xff, 0x42, 0x7e, 0x5a, 0xff, 0x66, 0x00,
0x10, 0x38, 0x28, 0x44, 0x54, 0xfe, 0xc6, 0x82, 0x42, 0x24, 0x7e, 0xdb,
0xff, 0xff, 0x81, 0x66, 0x10, 0x38, 0x7c, 0xfe, 0x38, 0x38, 0x38, 0x38,
0x38, 0x38, 0x38, 0x38, 0xfe, 0x7c, 0x38, 0x10, 0x10, 0x30, 0x7f, 0xff,
0x7f, 0x30, 0x10, 0x00, 0x08, 0x0c, 0xfe, 0xff, 0xfe, 0x0c, 0x08, 0x00,
0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7c,
0x38, 0x10, 0x00, 0x00, 0x04, 0x0c, 0x1c, 0x3c, 0x1c, 0x0c, 0x04, 0x00,
0x20, 0x30, 0x38, 0x3c, 0x38, 0x30, 0x20, 0x00, 0x10, 0x38, 0x7c, 0x10,
0x7c, 0x38, 0x10, 0x00, 0x00, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x00, 0x00,
0x00, 0xe0, 0x97, 0x92, 0xff, 0xff, 0x66, 0x00, 0x00, 0x00, 0x38, 0x44,
0xff, 0xff, 0x66, 0x00, 0x00, 0x10, 0xfe, 0xfe, 0x10, 0x38, 0x10, 0x00,
0x00, 0x10, 0x38, 0x7c, 0x10, 0xfe, 0x7c, 0x38, 0x3c, 0x7e, 0xdb, 0xdb,
0xff, 0xdb, 0x66, 0x3c, 0x3c, 0x7e, 0xdb, 0xdb, 0xff, 0xe7, 0x5a, 0x3c,
0x38, 0x44, 0x92, 0x8a, 0x82, 0x44, 0x38, 0x00, 0x38, 0x74, 0xfa, 0xfe,
0xfe, 0x7c, 0x38, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00,
0x6c, 0xf2, 0xfa, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x10, 0x38, 0x7c, 0xfe,
0x6c, 0x10, 0x38, 0x00, 0x38, 0x38, 0xfe, 0xfe, 0xfe, 0x10, 0x38, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0x90, 0x60, 0x00, 0x10, 0x10, 0x10, 0x10,
0x70, 0x90, 0x60, 0x00, 0x10, 0x10, 0x10, 0x10, 0x70, 0xf0, 0x60, 0x00,
0x18, 0x14, 0x14, 0x10, 0x70, 0xf0, 0x60, 0x00, 0x38, 0x38, 0x92, 0x7c,
0x10, 0x28, 0x28, 0x28, 0x38, 0x38, 0x10, 0xfe, 0x10, 0x28, 0x44, 0x82,
0x38, 0x38, 0x90, 0x7c, 0x12, 0x28, 0x24, 0x22, 0x38, 0x38, 0x12, 0x7c,
0x90, 0x28, 0x48, 0x88, 0x99, 0x5a, 0x24, 0xc3, 0xc3, 0x24, 0x5a, 0x99,
0x00, 0x3c, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00,
};
static void init_memories(Z_platform_instance_t* instance) {
LOAD_DATA((*instance->Z_envZ_memory), 77056u, data_segment_data_w2c_d0, 32);
LOAD_DATA((*instance->Z_envZ_memory), 80u, data_segment_data_w2c_d1, 32);
LOAD_DATA((*instance->Z_envZ_memory), 76920u, data_segment_data_w2c_d2, 4);
LOAD_DATA((*instance->Z_envZ_memory), 78592u, data_segment_data_w2c_d3, 64);
LOAD_DATA((*instance->Z_envZ_memory), 78848u, data_segment_data_w2c_d4, 2048);
}
static void init_data_instances(Z_platform_instance_t *instance) {
}
static f32 w2c_time(Z_platform_instance_t* instance) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1;
f32 w2c_f0, w2c_f1;
w2c_i0 = 0u;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 64u);
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = 1000u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f0 /= w2c_f1;
FUNC_EPILOGUE;
return w2c_f0;
}
static u32 w2c_isButtonPressed(Z_platform_instance_t* instance, u32 w2c_p0) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1;
w2c_i0 = 68u;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0));
w2c_i1 = w2c_p0;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 1u;
w2c_i0 &= w2c_i1;
FUNC_EPILOGUE;
return w2c_i0;
}
static u32 w2c_isButtonTriggered(Z_platform_instance_t* instance, u32 w2c_p0) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
w2c_i0 = 68u;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0));
w2c_i1 = 4294967295u;
w2c_i2 = 68u;
w2c_i2 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i2) + 4u);
w2c_i1 -= w2c_i2;
w2c_i0 &= w2c_i1;
w2c_i1 = w2c_p0;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 1u;
w2c_i0 &= w2c_i1;
FUNC_EPILOGUE;
return w2c_i0;
}
static u32 w2c_random(Z_platform_instance_t* instance) {
FUNC_PROLOGUE;
u32 w2c_i0;
u64 w2c_j0, w2c_j1;
w2c_j0 = w2c_random64(instance);
w2c_j1 = 32ull;
w2c_j0 = (u64)((s64)w2c_j0 >> (w2c_j1 & 63));
w2c_i0 = (u32)(w2c_j0);
FUNC_EPILOGUE;
return w2c_i0;
}
static u64 w2c_random64(Z_platform_instance_t* instance) {
u64 w2c_l0 = 0;
FUNC_PROLOGUE;
u64 w2c_j0, w2c_j1, w2c_j2;
w2c_j0 = instance->w2c_g0;
w2c_j1 = instance->w2c_g0;
w2c_j2 = 12ull;
w2c_j1 >>= (w2c_j2 & 63);
w2c_j0 ^= w2c_j1;
w2c_l0 = w2c_j0;
w2c_j1 = w2c_l0;
w2c_j2 = 25ull;
w2c_j1 <<= (w2c_j2 & 63);
w2c_j0 ^= w2c_j1;
w2c_l0 = w2c_j0;
w2c_j1 = w2c_l0;
w2c_j2 = 27ull;
w2c_j1 >>= (w2c_j2 & 63);
w2c_j0 ^= w2c_j1;
instance->w2c_g0 = w2c_j0;
w2c_j0 = instance->w2c_g0;
w2c_j1 = 2685821657736338717ull;
w2c_j0 *= w2c_j1;
FUNC_EPILOGUE;
return w2c_j0;
}
static f32 w2c_randomf(Z_platform_instance_t* instance) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
f32 w2c_f0, w2c_f1;
w2c_i0 = 1065353216u;
w2c_i1 = w2c_random(instance);
w2c_i2 = 9u;
w2c_i1 >>= (w2c_i2 & 31);
w2c_i0 |= w2c_i1;
w2c_f0 = f32_reinterpret_i32(w2c_i0);
w2c_i1 = 1u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f0 -= w2c_f1;
FUNC_EPILOGUE;
return w2c_f0;
}
static void w2c_randomSeed(Z_platform_instance_t* instance, u32 w2c_p0) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
u64 w2c_j0, w2c_j1;
w2c_i0 = w2c_p0;
w2c_j0 = (u64)(s64)(s32)(w2c_i0);
w2c_j1 = 32ull;
w2c_j0 <<= (w2c_j1 & 63);
w2c_i1 = 63u;
w2c_i2 = w2c_p0;
w2c_i1 -= w2c_i2;
w2c_j1 = (u64)(s64)(s32)(w2c_i1);
w2c_j0 ^= w2c_j1;
instance->w2c_g0 = w2c_j0;
w2c_j0 = w2c_random64(instance);
instance->w2c_g0 = w2c_j0;
w2c_j0 = w2c_random64(instance);
instance->w2c_g0 = w2c_j0;
FUNC_EPILOGUE;
}
static f32 w2c_fmod(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1) {
FUNC_PROLOGUE;
f32 w2c_f0, w2c_f1, w2c_f2;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_p0;
w2c_f2 = w2c_p1;
w2c_f1 /= w2c_f2;
w2c_f1 = wasm_floorf(w2c_f1);
w2c_f2 = w2c_p1;
w2c_f1 *= w2c_f2;
w2c_f0 -= w2c_f1;
FUNC_EPILOGUE;
return w2c_f0;
}
static void w2c_cls(Z_platform_instance_t* instance, u32 w2c_p0) {
u32 w2c_l1 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
w2c_i0 = 0u;
instance->w2c_g1 = w2c_i0;
w2c_i0 = 0u;
instance->w2c_g2 = w2c_i0;
w2c_i0 = 0u;
instance->w2c_g5 = w2c_i0;
w2c_i0 = 120u;
w2c_i1 = w2c_p0;
w2c_i2 = 76800u;
memory_fill(instance->Z_envZ_memory, w2c_i0, w2c_i1, w2c_i2);
FUNC_EPILOGUE;
}
static void w2c_setPixel(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
w2c_i0 = w2c_p0;
w2c_i1 = 320u;
w2c_i0 = w2c_i0 < w2c_i1;
w2c_i1 = w2c_p1;
w2c_i2 = 240u;
w2c_i1 = w2c_i1 < w2c_i2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = w2c_p1;
w2c_i2 = 320u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_p2;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
}
FUNC_EPILOGUE;
}
static u32 w2c_getPixel(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
w2c_i0 = w2c_p0;
w2c_i1 = 320u;
w2c_i0 = w2c_i0 < w2c_i1;
w2c_i1 = w2c_p1;
w2c_i2 = 240u;
w2c_i1 = w2c_i1 < w2c_i2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = w2c_p1;
w2c_i2 = 320u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 120u);
} else {
w2c_i0 = 0u;
}
FUNC_EPILOGUE;
return w2c_i0;
}
static void w2c_hline(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2, u32 w2c_p3) {
u32 w2c_l4 = 0, w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0, w2c_l9 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
w2c_i0 = w2c_p0;
w2c_i1 = 0u;
w2c_i2 = 320u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_p0 = w2c_i0;
w2c_i0 = w2c_p1;
w2c_i1 = 0u;
w2c_i2 = 320u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_p1 = w2c_i0;
w2c_i0 = w2c_p2;
w2c_i1 = 240u;
w2c_i0 = w2c_i0 >= w2c_i1;
if (w2c_i0) {
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 3u;
w2c_i0 += w2c_i1;
w2c_i1 = 4294967292u;
w2c_i0 &= w2c_i1;
w2c_l4 = w2c_i0;
w2c_i0 = w2c_p1;
w2c_i1 = 4294967292u;
w2c_i0 &= w2c_i1;
w2c_l5 = w2c_i0;
w2c_i0 = w2c_l5;
w2c_i1 = w2c_l4;
w2c_i0 = (u32)((s32)w2c_i0 > (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_p3;
w2c_i1 = 255u;
w2c_i0 &= w2c_i1;
w2c_i1 = 16843009u;
w2c_i0 *= w2c_i1;
w2c_p3 = w2c_i0;
w2c_i0 = w2c_p2;
w2c_i1 = 320u;
w2c_i0 *= w2c_i1;
w2c_i1 = w2c_p0;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l4;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_p0;
w2c_i0 -= w2c_i1;
w2c_l7 = w2c_i0;
w2c_i0 = w2c_l6;
w2c_i1 = 2u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 121, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = 2u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
}
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
}
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l5;
w2c_i2 = w2c_l4;
w2c_i1 -= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l7 = w2c_i0;
w2c_L4:
w2c_i0 = w2c_l6;
w2c_i1 = 16u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 124, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 128, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 132, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = 16u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
goto w2c_L4;
}
w2c_i0 = w2c_l6;
w2c_i1 = 8u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 124, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = 8u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
}
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
}
w2c_i0 = w2c_l7;
w2c_i1 = w2c_p1;
w2c_i2 = w2c_l5;
w2c_i1 -= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l7 = w2c_i0;
w2c_i0 = w2c_l6;
w2c_i1 = 2u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 121, w2c_i1);
w2c_i0 = w2c_l6;
w2c_i1 = 2u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
}
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l7;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
}
} else {
w2c_i0 = w2c_p2;
w2c_i1 = 320u;
w2c_i0 *= w2c_i1;
w2c_i1 = w2c_p0;
w2c_i0 += w2c_i1;
w2c_l8 = w2c_i0;
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p1;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_p0;
w2c_i0 -= w2c_i1;
w2c_l9 = w2c_i0;
w2c_i0 = w2c_l8;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l9;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 121, w2c_i1);
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 122, w2c_i1);
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 123, w2c_i1);
w2c_i0 = w2c_l8;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l8 = w2c_i0;
}
w2c_i0 = w2c_l8;
w2c_i1 = 2u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l9;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 121, w2c_i1);
w2c_i0 = w2c_l8;
w2c_i1 = 2u;
w2c_i0 += w2c_i1;
w2c_l8 = w2c_i0;
}
w2c_i0 = w2c_l8;
w2c_i1 = w2c_l9;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l8;
w2c_i1 = w2c_p3;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
}
}
w2c_Bfunc:;
FUNC_EPILOGUE;
}
static void w2c_rectangle(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, f32 w2c_p3, u32 w2c_p4) {
u32 w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
f32 w2c_f0, w2c_f1, w2c_f2;
w2c_f0 = w2c_p2;
w2c_f0 = wasm_fabsf(w2c_f0);
w2c_f1 = w2c_p2;
w2c_i0 = w2c_f0 == w2c_f1;
w2c_f1 = w2c_p3;
w2c_f1 = wasm_fabsf(w2c_f1);
w2c_f2 = w2c_p3;
w2c_i1 = w2c_f1 == w2c_f2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l5 = w2c_i0;
w2c_f0 = w2c_p1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_i1 = 0u;
w2c_i2 = 240u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_l6 = w2c_i0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_p2;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l7 = w2c_i0;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p3;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_i1 = 0u;
w2c_i2 = 240u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_l8 = w2c_i0;
w2c_L2:
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 >= (s32)w2c_i1);
if (w2c_i0) {goto w2c_B1;}
w2c_i0 = w2c_l5;
w2c_i1 = w2c_l7;
w2c_i2 = w2c_l6;
w2c_i3 = w2c_p4;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
w2c_i0 = w2c_l6;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l6 = w2c_i0;
goto w2c_L2;
w2c_B1:;
}
FUNC_EPILOGUE;
}
static void w2c_rectangleOutline(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, f32 w2c_p3, u32 w2c_p4) {
u32 w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
f32 w2c_f0, w2c_f1;
w2c_f0 = w2c_p0;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l5 = w2c_i0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_p2;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l6 = w2c_i0;
w2c_f0 = w2c_p1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l7 = w2c_i0;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p3;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l8 = w2c_i0;
w2c_i0 = w2c_l5;
w2c_i1 = w2c_l6;
w2c_i2 = w2c_l7;
w2c_i3 = w2c_p4;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l5;
w2c_i1 = w2c_l6;
w2c_i2 = w2c_l8;
w2c_i3 = 1u;
w2c_i2 -= w2c_i3;
w2c_i3 = w2c_p4;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
w2c_L1:
w2c_i0 = w2c_l5;
w2c_i1 = w2c_l7;
w2c_i2 = w2c_p4;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_i0 = w2c_l5;
w2c_i1 = w2c_l6;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_l7;
w2c_i2 = w2c_p4;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
}
w2c_i0 = w2c_l7;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l7 = w2c_i0;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L1;}
}
FUNC_EPILOGUE;
}
static void w2c_circle(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, u32 w2c_p3) {
u32 w2c_l4 = 0, w2c_l5 = 0;
f32 w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
f32 w2c_f0, w2c_f1, w2c_f2;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p2;
w2c_f0 -= w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_i1 = 0u;
w2c_i2 = 240u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_l4 = w2c_i0;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p2;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_i1 = 0u;
w2c_i2 = 240u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_l5 = w2c_i0;
w2c_L1:
w2c_i0 = w2c_l4;
w2c_i1 = w2c_l5;
w2c_i0 = (u32)((s32)w2c_i0 >= (s32)w2c_i1);
if (w2c_i0) {goto w2c_B0;}
w2c_f0 = w2c_p2;
w2c_f1 = w2c_p2;
w2c_f0 *= w2c_f1;
w2c_i1 = w2c_l4;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f2 = w2c_p1;
w2c_f1 -= w2c_f2;
w2c_f2 = 0.5;
w2c_f1 += w2c_f2;
w2c_l6 = w2c_f1;
w2c_f2 = w2c_l6;
w2c_f1 *= w2c_f2;
w2c_f0 -= w2c_f1;
w2c_l7 = w2c_f0;
w2c_f0 = wasm_fabsf(w2c_f0);
w2c_f1 = w2c_l7;
w2c_i0 = w2c_f0 == w2c_f1;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l7;
w2c_f1 = wasm_sqrtf(w2c_f1);
w2c_l8 = w2c_f1;
w2c_f0 -= w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_f1 = w2c_p0;
w2c_f2 = w2c_l8;
w2c_f1 += w2c_f2;
w2c_f1 = wasm_nearbyintf(w2c_f1);
w2c_i1 = I32_TRUNC_S_F32(w2c_f1);
w2c_i2 = w2c_l4;
w2c_i3 = w2c_p3;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
}
w2c_i0 = w2c_l4;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l4 = w2c_i0;
goto w2c_L1;
w2c_B0:;
FUNC_EPILOGUE;
}
static void w2c_circleOutline(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, u32 w2c_p3) {
u32 w2c_l4 = 0, w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0, w2c_l9 = 0;
f32 w2c_l10 = 0, w2c_l11 = 0, w2c_l12 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
f32 w2c_f0, w2c_f1, w2c_f2, w2c_f3;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p2;
w2c_f0 -= w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_i1 = 4294967295u;
w2c_i2 = 241u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_l4 = w2c_i0;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p2;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_i1 = 4294967295u;
w2c_i2 = 241u;
w2c_i0 = w2c_f33(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_l5 = w2c_i0;
w2c_L0:
w2c_i0 = 0u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_f1 = w2c_p2;
w2c_f2 = w2c_p2;
w2c_f1 *= w2c_f2;
w2c_i2 = w2c_l4;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f3 = w2c_p1;
w2c_f2 -= w2c_f3;
w2c_f3 = 0.5;
w2c_f2 += w2c_f3;
w2c_l11 = w2c_f2;
w2c_f3 = w2c_l11;
w2c_f2 *= w2c_f3;
w2c_f1 -= w2c_f2;
w2c_f0 = FMAX(w2c_f0, w2c_f1);
w2c_f0 = wasm_sqrtf(w2c_f0);
w2c_l12 = w2c_f0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l10;
w2c_f0 -= w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l6 = w2c_i0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l12;
w2c_f0 -= w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l7 = w2c_i0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l10;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l8 = w2c_i0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l12;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_nearbyintf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l9 = w2c_i0;
w2c_f0 = w2c_l12;
w2c_f1 = w2c_l10;
w2c_i0 = w2c_f0 >= w2c_f1;
if (w2c_i0) {
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l6;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l6;
w2c_i2 = w2c_l4;
w2c_i3 = w2c_p3;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
} else {
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l9;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l4;
w2c_i2 = w2c_p3;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
}
}
w2c_i0 = w2c_l9;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 > (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l8;
w2c_i1 = w2c_l9;
w2c_i2 = w2c_l4;
w2c_i3 = w2c_p3;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
} else {
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l9;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l9;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_l4;
w2c_i2 = w2c_p3;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
}
}
} else {
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l6;
w2c_i0 = (u32)((s32)w2c_i0 > (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l7;
w2c_i2 = w2c_l4;
w2c_i3 = 1u;
w2c_i2 -= w2c_i3;
w2c_i3 = w2c_p3;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
} else {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l4;
w2c_i2 = 1u;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_p3;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
}
}
w2c_i0 = w2c_l9;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l9;
w2c_i1 = w2c_l8;
w2c_i2 = w2c_l4;
w2c_i3 = 1u;
w2c_i2 -= w2c_i3;
w2c_i3 = w2c_p3;
w2c_hline(instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
} else {
w2c_i0 = w2c_l6;
w2c_i1 = w2c_l8;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l8;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_l4;
w2c_i2 = 1u;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_p3;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
}
}
}
w2c_i0 = w2c_l4;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l4 = w2c_i0;
w2c_f0 = w2c_l12;
w2c_l10 = w2c_f0;
w2c_i0 = w2c_l4;
w2c_i1 = w2c_l5;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
if (w2c_i0) {goto w2c_L0;}
FUNC_EPILOGUE;
}
static void w2c_line(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, f32 w2c_p3, u32 w2c_p4) {
u32 w2c_l5 = 0;
f32 w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0, w2c_l9 = 0, w2c_l10 = 0, w2c_l11 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2;
f32 w2c_f0, w2c_f1, w2c_f2, w2c_f3;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_p2;
w2c_i0 = w2c_f0 > w2c_f1;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_l6 = w2c_f0;
w2c_f0 = w2c_p2;
w2c_p0 = w2c_f0;
w2c_f0 = w2c_l6;
w2c_p2 = w2c_f0;
w2c_f0 = w2c_p1;
w2c_l6 = w2c_f0;
w2c_f0 = w2c_p3;
w2c_p1 = w2c_f0;
w2c_f0 = w2c_l6;
w2c_p3 = w2c_f0;
}
w2c_f0 = w2c_p0;
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i0 = w2c_f0 < w2c_f1;
w2c_f1 = w2c_p2;
w2c_i2 = 0u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i1 = w2c_f1 >= w2c_f2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p3;
w2c_f2 = w2c_p1;
w2c_f1 -= w2c_f2;
w2c_f2 = w2c_p0;
w2c_f2 = -(w2c_f2);
w2c_f1 *= w2c_f2;
w2c_f2 = w2c_p2;
w2c_f3 = w2c_p0;
w2c_f2 -= w2c_f3;
w2c_f1 /= w2c_f2;
w2c_f0 += w2c_f1;
w2c_p1 = w2c_f0;
w2c_i0 = 0u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_p0 = w2c_f0;
}
w2c_f0 = w2c_p0;
w2c_i1 = 320u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i0 = w2c_f0 < w2c_f1;
w2c_f1 = w2c_p2;
w2c_i2 = 320u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i1 = w2c_f1 >= w2c_f2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_f0 = w2c_p3;
w2c_f1 = w2c_p3;
w2c_f2 = w2c_p1;
w2c_f1 -= w2c_f2;
w2c_i2 = 320u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f3 = w2c_p2;
w2c_f2 -= w2c_f3;
w2c_f1 *= w2c_f2;
w2c_f2 = w2c_p2;
w2c_f3 = w2c_p0;
w2c_f2 -= w2c_f3;
w2c_f1 /= w2c_f2;
w2c_f0 += w2c_f1;
w2c_p3 = w2c_f0;
w2c_i0 = 320u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_p2 = w2c_f0;
}
w2c_f0 = w2c_p1;
w2c_f1 = w2c_p3;
w2c_i0 = w2c_f0 > w2c_f1;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_l6 = w2c_f0;
w2c_f0 = w2c_p2;
w2c_p0 = w2c_f0;
w2c_f0 = w2c_l6;
w2c_p2 = w2c_f0;
w2c_f0 = w2c_p1;
w2c_l6 = w2c_f0;
w2c_f0 = w2c_p3;
w2c_p1 = w2c_f0;
w2c_f0 = w2c_l6;
w2c_p3 = w2c_f0;
}
w2c_f0 = w2c_p1;
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i0 = w2c_f0 < w2c_f1;
w2c_f1 = w2c_p3;
w2c_i2 = 0u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i1 = w2c_f1 >= w2c_f2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_f1 = w2c_p2;
w2c_f2 = w2c_p0;
w2c_f1 -= w2c_f2;
w2c_f2 = w2c_p1;
w2c_f2 = -(w2c_f2);
w2c_f1 *= w2c_f2;
w2c_f2 = w2c_p3;
w2c_f3 = w2c_p1;
w2c_f2 -= w2c_f3;
w2c_f1 /= w2c_f2;
w2c_f0 += w2c_f1;
w2c_p0 = w2c_f0;
w2c_i0 = 0u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_p1 = w2c_f0;
}
w2c_f0 = w2c_p1;
w2c_i1 = 240u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i0 = w2c_f0 < w2c_f1;
w2c_f1 = w2c_p3;
w2c_i2 = 240u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i1 = w2c_f1 >= w2c_f2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_f0 = w2c_p2;
w2c_f1 = w2c_p2;
w2c_f2 = w2c_p0;
w2c_f1 -= w2c_f2;
w2c_i2 = 240u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f3 = w2c_p3;
w2c_f2 -= w2c_f3;
w2c_f1 *= w2c_f2;
w2c_f2 = w2c_p3;
w2c_f3 = w2c_p1;
w2c_f2 -= w2c_f3;
w2c_f1 /= w2c_f2;
w2c_f0 += w2c_f1;
w2c_p2 = w2c_f0;
w2c_i0 = 240u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_p3 = w2c_f0;
}
w2c_f0 = w2c_p2;
w2c_f1 = w2c_p0;
w2c_f0 -= w2c_f1;
w2c_l7 = w2c_f0;
w2c_f0 = wasm_fabsf(w2c_f0);
w2c_f1 = w2c_p3;
w2c_f2 = w2c_p1;
w2c_f1 -= w2c_f2;
w2c_l8 = w2c_f1;
w2c_i0 = w2c_f0 >= w2c_f1;
if (w2c_i0) {
w2c_f0 = w2c_l7;
w2c_l9 = w2c_f0;
w2c_f0 = w2c_p0;
w2c_l10 = w2c_f0;
} else {
w2c_f0 = w2c_l8;
w2c_l9 = w2c_f0;
w2c_f0 = w2c_p1;
w2c_l10 = w2c_f0;
}
w2c_f0 = w2c_l9;
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i0 = w2c_f0 == w2c_f1;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_f1 = w2c_p1;
w2c_i1 = I32_TRUNC_S_F32(w2c_f1);
w2c_i2 = w2c_p4;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
goto w2c_Bfunc;
}
w2c_f0 = w2c_l10;
w2c_f1 = w2c_l9;
w2c_f0 += w2c_f1;
w2c_f0 = wasm_floorf(w2c_f0);
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_f1 = w2c_l10;
w2c_f1 = wasm_floorf(w2c_f1);
w2c_i1 = I32_TRUNC_S_F32(w2c_f1);
w2c_i0 -= w2c_i1;
w2c_l5 = w2c_i0;
w2c_f0 = w2c_l10;
w2c_f0 = wasm_floorf(w2c_f0);
w2c_f1 = 0.5;
w2c_f0 += w2c_f1;
w2c_f1 = w2c_l10;
w2c_f0 -= w2c_f1;
w2c_l10 = w2c_f0;
w2c_f0 = w2c_l9;
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i0 = w2c_f0 < w2c_f1;
if (w2c_i0) {
w2c_i0 = 0u;
w2c_i1 = w2c_l5;
w2c_i0 -= w2c_i1;
w2c_l5 = w2c_i0;
w2c_f0 = w2c_l10;
w2c_f0 = -(w2c_f0);
w2c_l10 = w2c_f0;
w2c_f0 = w2c_l9;
w2c_f0 = -(w2c_f0);
w2c_l9 = w2c_f0;
}
w2c_f0 = w2c_l7;
w2c_f1 = w2c_l9;
w2c_f0 /= w2c_f1;
w2c_l7 = w2c_f0;
w2c_f0 = w2c_l8;
w2c_f1 = w2c_l9;
w2c_f0 /= w2c_f1;
w2c_l8 = w2c_f0;
w2c_f0 = w2c_l9;
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f2 = w2c_l10;
w2c_f1 = FMAX(w2c_f1, w2c_f2);
w2c_f0 = FMIN(w2c_f0, w2c_f1);
w2c_l11 = w2c_f0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l11;
w2c_f2 = w2c_l7;
w2c_f1 *= w2c_f2;
w2c_f0 += w2c_f1;
w2c_i0 = I32_TRUNC_SAT_S_F32(w2c_f0);
w2c_f1 = w2c_p1;
w2c_f2 = w2c_l11;
w2c_f3 = w2c_l8;
w2c_f2 *= w2c_f3;
w2c_f1 += w2c_f2;
w2c_i1 = I32_TRUNC_SAT_S_F32(w2c_f1);
w2c_i2 = w2c_p4;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_i0 = w2c_l5;
w2c_i0 = !(w2c_i0);
if (w2c_i0) {
goto w2c_Bfunc;
}
w2c_f0 = w2c_p0;
w2c_i1 = 1u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f2 = w2c_l10;
w2c_f1 += w2c_f2;
w2c_f2 = w2c_l7;
w2c_f1 *= w2c_f2;
w2c_f0 += w2c_f1;
w2c_p0 = w2c_f0;
w2c_f0 = w2c_p1;
w2c_i1 = 1u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f2 = w2c_l10;
w2c_f1 += w2c_f2;
w2c_f2 = w2c_l8;
w2c_f1 *= w2c_f2;
w2c_f0 += w2c_f1;
w2c_p1 = w2c_f0;
w2c_f0 = w2c_l10;
w2c_i1 = w2c_l5;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f0 += w2c_f1;
w2c_l10 = w2c_f0;
w2c_L10:
w2c_i0 = w2c_l5;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_l5 = w2c_i0;
if (w2c_i0) {
w2c_f0 = w2c_p0;
w2c_i0 = I32_TRUNC_SAT_S_F32(w2c_f0);
w2c_f1 = w2c_p1;
w2c_i1 = I32_TRUNC_SAT_S_F32(w2c_f1);
w2c_i2 = w2c_p4;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l7;
w2c_f0 += w2c_f1;
w2c_p0 = w2c_f0;
w2c_f0 = w2c_p1;
w2c_f1 = w2c_l8;
w2c_f0 += w2c_f1;
w2c_p1 = w2c_f0;
goto w2c_L10;
}
w2c_f0 = w2c_l9;
w2c_f1 = w2c_l10;
w2c_f0 = FMIN(w2c_f0, w2c_f1);
w2c_f1 = w2c_l10;
w2c_f0 -= w2c_f1;
w2c_l11 = w2c_f0;
w2c_f0 = w2c_p0;
w2c_f1 = w2c_l11;
w2c_f2 = w2c_l7;
w2c_f1 *= w2c_f2;
w2c_f0 += w2c_f1;
w2c_i0 = I32_TRUNC_SAT_S_F32(w2c_f0);
w2c_f1 = w2c_p1;
w2c_f2 = w2c_l11;
w2c_f3 = w2c_l8;
w2c_f2 *= w2c_f3;
w2c_f1 += w2c_f2;
w2c_i1 = I32_TRUNC_SAT_S_F32(w2c_f1);
w2c_i2 = w2c_p4;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_Bfunc:;
FUNC_EPILOGUE;
}
static void w2c_blitSprite(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2, u32 w2c_p3, u32 w2c_p4) {
u32 w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0, w2c_l9 = 0, w2c_l10 = 0, w2c_l11 = 0, w2c_l12 = 0,
w2c_l13 = 0, w2c_l14 = 0, w2c_l15 = 0, w2c_l16 = 0, w2c_l17 = 0, w2c_l18 = 0, w2c_l19 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4, w2c_i5;
w2c_i0 = 240u;
w2c_i1 = w2c_p3;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_p1;
w2c_i2 = 16u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = w2c_p1;
w2c_i3 = 65535u;
w2c_i2 &= w2c_i3;
w2c_l5 = w2c_i2;
w2c_i3 = w2c_p1;
w2c_i4 = 16u;
w2c_i3 = (u32)((s32)w2c_i3 >> (w2c_i4 & 31));
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l6 = w2c_i1;
w2c_i2 = w2c_p3;
w2c_i3 = w2c_l6;
w2c_i2 += w2c_i3;
w2c_i3 = 240u;
w2c_i2 = (u32)((s32)w2c_i2 > (s32)w2c_i3);
w2c_i0 = w2c_i2 ? w2c_i0 : w2c_i1;
w2c_l10 = w2c_i0;
w2c_i1 = 0u;
w2c_i2 = w2c_p3;
w2c_i1 -= w2c_i2;
w2c_i2 = 0u;
w2c_i3 = w2c_p3;
w2c_i4 = 0u;
w2c_i3 = (u32)((s32)w2c_i3 < (s32)w2c_i4);
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l9 = w2c_i1;
w2c_i0 -= w2c_i1;
w2c_l11 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
w2c_i1 = 320u;
w2c_i2 = w2c_p2;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i3 = w2c_p2;
w2c_i4 = w2c_l5;
w2c_i3 += w2c_i4;
w2c_i4 = 320u;
w2c_i3 = (u32)((s32)w2c_i3 > (s32)w2c_i4);
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l8 = w2c_i1;
w2c_i2 = 0u;
w2c_i3 = w2c_p2;
w2c_i2 -= w2c_i3;
w2c_i3 = 0u;
w2c_i4 = w2c_p2;
w2c_i5 = 0u;
w2c_i4 = (u32)((s32)w2c_i4 < (s32)w2c_i5);
w2c_i2 = w2c_i4 ? w2c_i2 : w2c_i3;
w2c_l7 = w2c_i2;
w2c_i1 -= w2c_i2;
w2c_l12 = w2c_i1;
w2c_i2 = 0u;
w2c_i1 = (u32)((s32)w2c_i1 <= (s32)w2c_i2);
w2c_i0 |= w2c_i1;
if (w2c_i0) {
goto w2c_Bfunc;
}
w2c_i0 = w2c_p4;
w2c_i1 = 511u;
w2c_i0 &= w2c_i1;
w2c_i1 = 256u;
w2c_i0 -= w2c_i1;
w2c_l13 = w2c_i0;
w2c_i0 = 1u;
w2c_i1 = w2c_p4;
w2c_i2 = 8u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = 2u;
w2c_i1 &= w2c_i2;
w2c_i0 -= w2c_i1;
w2c_l14 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = w2c_l5;
w2c_i2 = 1u;
w2c_i1 -= w2c_i2;
w2c_i0 += w2c_i1;
w2c_p0 = w2c_i0;
}
w2c_i0 = 1u;
w2c_i1 = w2c_p4;
w2c_i2 = 9u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = 2u;
w2c_i1 &= w2c_i2;
w2c_i0 -= w2c_i1;
w2c_l15 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = w2c_l6;
w2c_i2 = 1u;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_p0 = w2c_i0;
}
w2c_i0 = w2c_p0;
w2c_i1 = w2c_l7;
w2c_i2 = w2c_l14;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l9;
w2c_i2 = w2c_l15;
w2c_i1 *= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l16 = w2c_i0;
w2c_i0 = w2c_p2;
w2c_i1 = w2c_l7;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_p3;
w2c_i2 = w2c_l9;
w2c_i1 += w2c_i2;
w2c_i2 = 320u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l17 = w2c_i0;
w2c_L3:
w2c_i0 = 0u;
w2c_l18 = w2c_i0;
w2c_L4:
w2c_i0 = w2c_l16;
w2c_i1 = w2c_l18;
w2c_i2 = w2c_l14;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0));
w2c_l19 = w2c_i0;
w2c_i1 = w2c_l13;
w2c_i0 = w2c_i0 != w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_l17;
w2c_i1 = w2c_l18;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l19;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
}
w2c_i0 = w2c_l18;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l18 = w2c_i0;
w2c_i1 = w2c_l12;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L4;}
w2c_i0 = w2c_l16;
w2c_i1 = w2c_l5;
w2c_i2 = w2c_l15;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l16 = w2c_i0;
w2c_i0 = w2c_l17;
w2c_i1 = 320u;
w2c_i0 += w2c_i1;
w2c_l17 = w2c_i0;
w2c_i0 = w2c_l11;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_l11 = w2c_i0;
if (w2c_i0) {goto w2c_L3;}
w2c_Bfunc:;
FUNC_EPILOGUE;
}
static void w2c_grabSprite(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2, u32 w2c_p3, u32 w2c_p4) {
u32 w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0, w2c_l9 = 0, w2c_l10 = 0, w2c_l11 = 0, w2c_l12 = 0,
w2c_l13 = 0, w2c_l14 = 0, w2c_l15 = 0, w2c_l16 = 0, w2c_l17 = 0, w2c_l18 = 0, w2c_l19 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4, w2c_i5;
w2c_i0 = 240u;
w2c_i1 = w2c_p3;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_p1;
w2c_i2 = 16u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = w2c_p1;
w2c_i3 = 65535u;
w2c_i2 &= w2c_i3;
w2c_l5 = w2c_i2;
w2c_i3 = w2c_p1;
w2c_i4 = 16u;
w2c_i3 = (u32)((s32)w2c_i3 >> (w2c_i4 & 31));
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l6 = w2c_i1;
w2c_i2 = w2c_p3;
w2c_i3 = w2c_l6;
w2c_i2 += w2c_i3;
w2c_i3 = 240u;
w2c_i2 = (u32)((s32)w2c_i2 > (s32)w2c_i3);
w2c_i0 = w2c_i2 ? w2c_i0 : w2c_i1;
w2c_l10 = w2c_i0;
w2c_i1 = 0u;
w2c_i2 = w2c_p3;
w2c_i1 -= w2c_i2;
w2c_i2 = 0u;
w2c_i3 = w2c_p3;
w2c_i4 = 0u;
w2c_i3 = (u32)((s32)w2c_i3 < (s32)w2c_i4);
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l9 = w2c_i1;
w2c_i0 -= w2c_i1;
w2c_l11 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 <= (s32)w2c_i1);
w2c_i1 = 320u;
w2c_i2 = w2c_p2;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i3 = w2c_p2;
w2c_i4 = w2c_l5;
w2c_i3 += w2c_i4;
w2c_i4 = 320u;
w2c_i3 = (u32)((s32)w2c_i3 > (s32)w2c_i4);
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l8 = w2c_i1;
w2c_i2 = 0u;
w2c_i3 = w2c_p2;
w2c_i2 -= w2c_i3;
w2c_i3 = 0u;
w2c_i4 = w2c_p2;
w2c_i5 = 0u;
w2c_i4 = (u32)((s32)w2c_i4 < (s32)w2c_i5);
w2c_i2 = w2c_i4 ? w2c_i2 : w2c_i3;
w2c_l7 = w2c_i2;
w2c_i1 -= w2c_i2;
w2c_l12 = w2c_i1;
w2c_i2 = 0u;
w2c_i1 = (u32)((s32)w2c_i1 <= (s32)w2c_i2);
w2c_i0 |= w2c_i1;
if (w2c_i0) {
goto w2c_Bfunc;
}
w2c_i0 = w2c_p4;
w2c_i1 = 511u;
w2c_i0 &= w2c_i1;
w2c_i1 = 256u;
w2c_i0 -= w2c_i1;
w2c_l13 = w2c_i0;
w2c_i0 = 1u;
w2c_i1 = w2c_p4;
w2c_i2 = 8u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = 2u;
w2c_i1 &= w2c_i2;
w2c_i0 -= w2c_i1;
w2c_l14 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = w2c_l5;
w2c_i2 = 1u;
w2c_i1 -= w2c_i2;
w2c_i0 += w2c_i1;
w2c_p0 = w2c_i0;
}
w2c_i0 = 1u;
w2c_i1 = w2c_p4;
w2c_i2 = 9u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = 2u;
w2c_i1 &= w2c_i2;
w2c_i0 -= w2c_i1;
w2c_l15 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = w2c_l6;
w2c_i2 = 1u;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_p0 = w2c_i0;
}
w2c_i0 = w2c_p0;
w2c_i1 = w2c_l7;
w2c_i2 = w2c_l14;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l9;
w2c_i2 = w2c_l15;
w2c_i1 *= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l16 = w2c_i0;
w2c_i0 = w2c_p2;
w2c_i1 = w2c_l7;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_p3;
w2c_i2 = w2c_l9;
w2c_i1 += w2c_i2;
w2c_i2 = 320u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l17 = w2c_i0;
w2c_L3:
w2c_i0 = 0u;
w2c_l18 = w2c_i0;
w2c_L4:
w2c_i0 = w2c_l17;
w2c_i1 = w2c_l18;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 120u);
w2c_l19 = w2c_i0;
w2c_i1 = w2c_l13;
w2c_i0 = w2c_i0 != w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_l16;
w2c_i1 = w2c_l18;
w2c_i2 = w2c_l14;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l19;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0), w2c_i1);
}
w2c_i0 = w2c_l18;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l18 = w2c_i0;
w2c_i1 = w2c_l12;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L4;}
w2c_i0 = w2c_l16;
w2c_i1 = w2c_l5;
w2c_i2 = w2c_l15;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l16 = w2c_i0;
w2c_i0 = w2c_l17;
w2c_i1 = 320u;
w2c_i0 += w2c_i1;
w2c_l17 = w2c_i0;
w2c_i0 = w2c_l11;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_l11 = w2c_i0;
if (w2c_i0) {goto w2c_L3;}
w2c_Bfunc:;
FUNC_EPILOGUE;
}
static void w2c_printChar(Z_platform_instance_t* instance, u32 w2c_p0) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1;
w2c_L0:
w2c_i0 = w2c_p0;
w2c_i1 = 255u;
w2c_i0 &= w2c_i1;
w2c_f34(instance, w2c_i0);
w2c_i0 = w2c_p0;
w2c_i1 = 8u;
w2c_i0 >>= (w2c_i1 & 31);
w2c_p0 = w2c_i0;
if (w2c_i0) {goto w2c_L0;}
FUNC_EPILOGUE;
}
static void w2c_printString(Z_platform_instance_t* instance, u32 w2c_p0) {
u32 w2c_l1 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1;
w2c_L0:
w2c_i0 = w2c_p0;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0));
w2c_l1 = w2c_i0;
if (w2c_i0) {
w2c_i0 = w2c_l1;
w2c_printChar(instance, w2c_i0);
w2c_i0 = w2c_p0;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_p0 = w2c_i0;
goto w2c_L0;
}
FUNC_EPILOGUE;
}
static void w2c_printInt(Z_platform_instance_t* instance, u32 w2c_p0) {
u32 w2c_l1 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
w2c_i0 = 77823u;
w2c_l1 = w2c_i0;
w2c_i1 = 0u;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0), w2c_i1);
w2c_i0 = w2c_p0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = 45u;
w2c_printChar(instance, w2c_i0);
w2c_i0 = 0u;
w2c_i1 = w2c_p0;
w2c_i0 -= w2c_i1;
w2c_p0 = w2c_i0;
}
w2c_L1:
w2c_i0 = w2c_l1;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_l1 = w2c_i0;
w2c_i1 = 48u;
w2c_i2 = w2c_p0;
w2c_i3 = 10u;
w2c_i2 = REM_U(w2c_i2, w2c_i3);
w2c_i1 += w2c_i2;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0), w2c_i1);
w2c_i0 = w2c_p0;
w2c_i1 = 10u;
w2c_i0 = DIV_U(w2c_i0, w2c_i1);
w2c_p0 = w2c_i0;
if (w2c_i0) {goto w2c_L1;}
w2c_i0 = w2c_l1;
w2c_printString(instance, w2c_i0);
FUNC_EPILOGUE;
}
static void w2c_setTextColor(Z_platform_instance_t* instance, u32 w2c_p0) {
FUNC_PROLOGUE;
u32 w2c_i0;
w2c_i0 = w2c_p0;
instance->w2c_g3 = w2c_i0;
FUNC_EPILOGUE;
}
static void w2c_setBackgroundColor(Z_platform_instance_t* instance, u32 w2c_p0) {
FUNC_PROLOGUE;
u32 w2c_i0;
w2c_i0 = w2c_p0;
instance->w2c_g4 = w2c_i0;
FUNC_EPILOGUE;
}
static void w2c_setCursorPosition(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
u32 w2c_l2 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
w2c_i0 = w2c_p0;
w2c_i1 = 1u;
w2c_i2 = 8u;
w2c_i3 = instance->w2c_g5;
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_l2 = w2c_i1;
w2c_i0 *= w2c_i1;
instance->w2c_g1 = w2c_i0;
w2c_i0 = w2c_p1;
w2c_i1 = w2c_l2;
w2c_i0 *= w2c_i1;
instance->w2c_g2 = w2c_i0;
FUNC_EPILOGUE;
}
static void w2c_playNote(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4;
w2c_i0 = w2c_p0;
w2c_i1 = 6u;
w2c_i0 *= w2c_i1;
w2c_i1 = w2c_p0;
w2c_i2 = 6u;
w2c_i1 *= w2c_i2;
w2c_i1 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i1) + 80u);
w2c_i2 = 254u;
w2c_i1 &= w2c_i2;
w2c_i2 = w2c_p1;
if (w2c_i2) {
w2c_i2 = w2c_p0;
w2c_i3 = 6u;
w2c_i2 *= w2c_i3;
w2c_i3 = w2c_p1;
w2c_i4 = 127u;
w2c_i3 &= w2c_i4;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i2) + 83, w2c_i3);
w2c_i2 = 2u;
w2c_i3 = w2c_p1;
w2c_i4 = 7u;
w2c_i3 = (u32)((s32)w2c_i3 >> (w2c_i4 & 31));
w2c_i3 = !(w2c_i3);
w2c_i2 |= w2c_i3;
} else {
w2c_i2 = 0u;
}
w2c_i1 ^= w2c_i2;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 80, w2c_i1);
FUNC_EPILOGUE;
}
static void w2c_endFrame(Z_platform_instance_t* instance) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1;
w2c_i0 = 68u;
w2c_i1 = 68u;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1));
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 4, w2c_i1);
FUNC_EPILOGUE;
}
static f32 w2c_sndGes(Z_platform_instance_t* instance, u32 w2c_p0) {
u32 w2c_l1 = 0, w2c_l2 = 0, w2c_l3 = 0, w2c_l4 = 0, w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0,
w2c_l9 = 0, w2c_l10 = 0, w2c_l11 = 0, w2c_l12 = 0, w2c_l13 = 0, w2c_l14 = 0, w2c_l15 = 0, w2c_l16 = 0,
w2c_l17 = 0, w2c_l18 = 0, w2c_l19 = 0, w2c_l20 = 0, w2c_l21 = 0, w2c_l22 = 0, w2c_l23 = 0, w2c_l24 = 0,
w2c_l25 = 0, w2c_l26 = 0, w2c_l27 = 0, w2c_l28 = 0, w2c_l29 = 0, w2c_l30 = 0, w2c_l31 = 0, w2c_l32 = 0,
w2c_l33 = 0, w2c_l34 = 0, w2c_l35 = 0, w2c_l36 = 0, w2c_l37 = 0, w2c_l38 = 0, w2c_l39 = 0, w2c_l40 = 0,
w2c_l41 = 0, w2c_l42 = 0, w2c_l43 = 0, w2c_l44 = 0, w2c_l45 = 0, w2c_l46 = 0, w2c_l47 = 0, w2c_l48 = 0,
w2c_l49 = 0;
f32 w2c_l50 = 0, w2c_l51 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4, w2c_i5, w2c_i6;
f32 w2c_f0, w2c_f1, w2c_f2, w2c_f3, w2c_f4, w2c_f5;
w2c_i0 = 0u;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 76920u);
w2c_l1 = w2c_i0;
w2c_i0 = w2c_p0;
w2c_i1 = 127u;
w2c_i0 &= w2c_i1;
w2c_i0 = !(w2c_i0);
if (w2c_i0) {
w2c_L1:
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i1 = 0u;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 96, w2c_i1);
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 512u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L1;}
w2c_L2:
w2c_i0 = w2c_l1;
w2c_i1 = 32u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l4 = w2c_i0;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
w2c_l6 = w2c_i0;
w2c_i0 = w2c_l4;
w2c_i0 = i32_load16_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 2u);
w2c_l7 = w2c_i0;
w2c_i0 = w2c_l4;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0));
w2c_l8 = w2c_i0;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l3;
w2c_i3 = 6u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_l5 = w2c_i1;
w2c_i1 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i1));
w2c_l9 = w2c_i1;
w2c_i0 ^= w2c_i1;
w2c_i1 = w2c_l9;
w2c_i2 = 2u;
w2c_i1 |= w2c_i2;
w2c_i0 &= w2c_i1;
w2c_i1 = 3u;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 1u;
w2c_l6 = w2c_i0;
w2c_i0 = 0u;
w2c_l7 = w2c_i0;
}
w2c_i0 = w2c_l4;
w2c_i1 = w2c_l9;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0), w2c_i1);
w2c_i0 = w2c_l6;
if (w2c_i0) {
w2c_i0 = w2c_l7;
w2c_i1 = 12u;
w2c_f2 = 1.67499995;
w2c_i3 = 15u;
w2c_i4 = w2c_l5;
w2c_i4 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i4) + 4u);
w2c_i5 = 15u;
w2c_i4 &= w2c_i5;
w2c_l10 = w2c_i4;
w2c_i3 -= w2c_i4;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_f2 = (*Z_envZ_pow)(instance->Z_env_instance, w2c_f2, w2c_f3);
w2c_i2 = I32_TRUNC_S_F32(w2c_f2);
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l7 = w2c_i0;
w2c_i0 = w2c_l7;
w2c_i1 = 65535u;
w2c_i0 = (u32)((s32)w2c_i0 >= (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = 65535u;
w2c_l7 = w2c_i0;
w2c_i0 = 0u;
w2c_l6 = w2c_i0;
}
} else {
w2c_i0 = w2c_l7;
w2c_i1 = 8u;
w2c_f2 = 1.5625;
w2c_i3 = 15u;
w2c_i4 = w2c_l5;
w2c_i5 = w2c_l9;
w2c_i6 = 1u;
w2c_i5 &= w2c_i6;
w2c_i4 -= w2c_i5;
w2c_i4 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i4) + 5u);
w2c_i5 = 4u;
w2c_i4 = (u32)((s32)w2c_i4 >> (w2c_i5 & 31));
w2c_i3 -= w2c_i4;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_f2 = (*Z_envZ_pow)(instance->Z_env_instance, w2c_f2, w2c_f3);
w2c_i2 = I32_TRUNC_S_F32(w2c_f2);
w2c_i1 *= w2c_i2;
w2c_i2 = w2c_l7;
w2c_i3 = 8192u;
w2c_i2 += w2c_i3;
w2c_i1 *= w2c_i2;
w2c_i2 = 16u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 -= w2c_i1;
w2c_l7 = w2c_i0;
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l9;
w2c_i2 = 1u;
w2c_i1 &= w2c_i2;
w2c_i2 = w2c_l5;
w2c_i2 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i2) + 5u);
w2c_i3 = 15u;
w2c_i2 &= w2c_i3;
w2c_i3 = 12u;
w2c_i2 <<= (w2c_i3 & 31);
w2c_i1 *= w2c_i2;
w2c_l11 = w2c_i1;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l11;
w2c_l7 = w2c_i0;
}
}
w2c_i0 = w2c_l4;
w2c_i1 = w2c_l6;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 1, w2c_i1);
w2c_i0 = w2c_l4;
w2c_i1 = w2c_l7;
i32_store16(instance->Z_envZ_memory, (u64)(w2c_i0) + 2, w2c_i1);
w2c_i0 = 440u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_f1 = 2;
w2c_i2 = w2c_l5;
w2c_i2 = i32_load16_u(instance->Z_envZ_memory, (u64)(w2c_i2) + 2u);
w2c_i3 = 17664u;
w2c_i2 -= w2c_i3;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i3 = 3072u;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_f2 /= w2c_f3;
w2c_f1 = (*Z_envZ_pow)(instance->Z_env_instance, w2c_f1, w2c_f2);
w2c_f0 *= w2c_f1;
w2c_l50 = w2c_f0;
w2c_f1 = 1.48607707;
w2c_f0 *= w2c_f1;
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l12 = w2c_i0;
w2c_i0 = w2c_l4;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 4u);
w2c_l13 = w2c_i0;
w2c_i0 = w2c_l5;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
w2c_i1 = 128u;
w2c_i0 -= w2c_i1;
w2c_i1 = 255u;
w2c_i0 *= w2c_i1;
w2c_l14 = w2c_i0;
w2c_i0 = 1u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = w2c_l12;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f0 /= w2c_f1;
w2c_l51 = w2c_f0;
w2c_i0 = 0u;
w2c_l2 = w2c_i0;
w2c_i0 = w2c_l9;
w2c_i1 = 6u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_l15 = w2c_i0;
w2c_i0 = w2c_l15;
w2c_i1 = 2u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l15;
if (w2c_i0) {
w2c_i0 = w2c_l5;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
w2c_i1 = 23u;
w2c_i0 <<= (w2c_i1 & 31);
w2c_l16 = w2c_i0;
w2c_i0 = 511u;
w2c_i1 = w2c_l5;
w2c_i1 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i1) + 1u);
w2c_i0 -= w2c_i1;
w2c_i1 = 23u;
w2c_i0 <<= (w2c_i1 & 31);
w2c_l17 = w2c_i0;
w2c_L9:
w2c_i0 = w2c_l13;
w2c_i1 = 32768u;
w2c_i0 ^= w2c_i1;
w2c_i1 = 16u;
w2c_i0 <<= (w2c_i1 & 31);
w2c_l18 = w2c_i0;
w2c_i0 = w2c_l18;
w2c_i1 = 16u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = w2c_l13;
w2c_f2 = w2c_l51;
w2c_i3 = 4294934529u;
w2c_i1 = w2c_f37(instance, w2c_i1, w2c_f2, w2c_i3);
w2c_i0 -= w2c_i1;
w2c_l19 = w2c_i0;
w2c_i0 = 0u;
w2c_i1 = w2c_l19;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_l19;
w2c_i2 = w2c_l18;
w2c_i3 = w2c_l16;
w2c_i2 = w2c_i2 >= w2c_i3;
w2c_i3 = w2c_l18;
w2c_i4 = w2c_l17;
w2c_i3 = w2c_i3 < w2c_i4;
w2c_i2 &= w2c_i3;
w2c_i0 = w2c_i2 ? w2c_i0 : w2c_i1;
w2c_l20 = w2c_i0;
w2c_i0 = w2c_l20;
w2c_i1 = w2c_l18;
w2c_i2 = w2c_l16;
w2c_i1 -= w2c_i2;
w2c_i2 = 16u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_f2 = w2c_l51;
w2c_i3 = 0u;
w2c_i4 = w2c_l19;
w2c_i3 -= w2c_i4;
w2c_i1 = w2c_f37(instance, w2c_i1, w2c_f2, w2c_i3);
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_l18;
w2c_i2 = w2c_l17;
w2c_i1 -= w2c_i2;
w2c_i2 = 16u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_f2 = w2c_l51;
w2c_i3 = w2c_l19;
w2c_i1 = w2c_f37(instance, w2c_i1, w2c_f2, w2c_i3);
w2c_i0 -= w2c_i1;
w2c_l20 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l20;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 608, w2c_i1);
w2c_i0 = w2c_l13;
w2c_i1 = w2c_l12;
w2c_i0 += w2c_i1;
w2c_l13 = w2c_i0;
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L9;}
} else {
w2c_i0 = 32768u;
w2c_i1 = w2c_l5;
w2c_i1 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i1) + 1u);
w2c_i2 = 128u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l21 = w2c_i0;
w2c_L10:
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i1 = 4294934528u;
w2c_i2 = 32767u;
w2c_i3 = w2c_l13;
w2c_i4 = 65535u;
w2c_i3 &= w2c_i4;
w2c_i4 = w2c_l21;
w2c_i3 = (u32)((s32)w2c_i3 < (s32)w2c_i4);
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_i2 = w2c_l13;
w2c_f3 = w2c_l51;
w2c_i4 = 4294934529u;
w2c_i2 = w2c_f37(instance, w2c_i2, w2c_f3, w2c_i4);
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_l13;
w2c_i3 = w2c_l21;
w2c_i2 -= w2c_i3;
w2c_f3 = w2c_l51;
w2c_i4 = 32767u;
w2c_i2 = w2c_f37(instance, w2c_i2, w2c_f3, w2c_i4);
w2c_i1 -= w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 608, w2c_i1);
w2c_i0 = w2c_l13;
w2c_i1 = w2c_l12;
w2c_i0 += w2c_i1;
w2c_l13 = w2c_i0;
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L10;}
}
} else {
w2c_i0 = w2c_l15;
w2c_i1 = 2u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_l5;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
w2c_i1 = 256u;
w2c_i0 += w2c_i1;
w2c_l22 = w2c_i0;
w2c_L12:
w2c_i0 = w2c_l13;
w2c_i1 = 16u;
w2c_i0 <<= (w2c_i1 & 31);
w2c_l23 = w2c_i0;
w2c_i0 = w2c_l23;
w2c_i1 = w2c_l23;
w2c_i2 = 31u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 ^= w2c_i1;
w2c_l23 = w2c_i0;
w2c_i0 = w2c_l23;
w2c_i1 = 8u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = w2c_l22;
w2c_i0 *= w2c_i1;
w2c_l23 = w2c_i0;
w2c_i0 = w2c_l23;
w2c_i1 = w2c_l23;
w2c_i2 = 31u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 ^= w2c_i1;
w2c_l23 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l23;
w2c_i2 = 15u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = 32768u;
w2c_i1 -= w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 608, w2c_i1);
w2c_i0 = w2c_l13;
w2c_i1 = w2c_l12;
w2c_i0 += w2c_i1;
w2c_l13 = w2c_i0;
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L12;}
} else {
w2c_L13:
w2c_i0 = w2c_l13;
w2c_i1 = 12u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_l24 = w2c_i0;
w2c_i0 = w2c_l24;
w2c_i1 = 1732688499u;
w2c_i0 *= w2c_i1;
w2c_l24 = w2c_i0;
w2c_i0 = w2c_l24;
w2c_i1 = w2c_l24;
w2c_i2 = 15u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = w2c_l13;
w2c_i3 = 8u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i3 = 255u;
w2c_i2 &= w2c_i3;
w2c_i3 = w2c_l5;
w2c_i3 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i3) + 1u);
w2c_i2 = (u32)((s32)w2c_i2 >= (s32)w2c_i3);
w2c_i1 *= w2c_i2;
w2c_i0 ^= w2c_i1;
w2c_l24 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l24;
w2c_i2 = 2203547335u;
w2c_i1 *= w2c_i2;
w2c_i2 = 16u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 608, w2c_i1);
w2c_i0 = w2c_l13;
w2c_i1 = w2c_l12;
w2c_i0 += w2c_i1;
w2c_l13 = w2c_i0;
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L13;}
}
}
w2c_i0 = w2c_l4;
w2c_i1 = w2c_l13;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 4, w2c_i1);
w2c_i0 = w2c_l9;
w2c_i1 = 32u;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 440u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_f1 = 2;
w2c_i2 = w2c_l1;
w2c_i3 = w2c_l3;
w2c_i4 = 1u;
w2c_i3 -= w2c_i4;
w2c_i4 = 3u;
w2c_i3 &= w2c_i4;
w2c_l25 = w2c_i3;
w2c_i4 = 6u;
w2c_i3 *= w2c_i4;
w2c_i2 += w2c_i3;
w2c_i2 = i32_load16_u(instance->Z_envZ_memory, (u64)(w2c_i2) + 2u);
w2c_i3 = 17664u;
w2c_i2 -= w2c_i3;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i3 = 3072u;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_f2 /= w2c_f3;
w2c_f1 = (*Z_envZ_pow)(instance->Z_env_instance, w2c_f1, w2c_f2);
w2c_f0 *= w2c_f1;
w2c_f1 = 1.48607707;
w2c_f0 *= w2c_f1;
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l26 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = 32u;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l25;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 4u);
w2c_l27 = w2c_i0;
w2c_i0 = w2c_l25;
w2c_i1 = w2c_l3;
w2c_i0 = (u32)((s32)w2c_i0 > (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l27;
w2c_i1 = w2c_l26;
w2c_i2 = 6u;
w2c_i1 <<= (w2c_i2 & 31);
w2c_i0 -= w2c_i1;
w2c_l27 = w2c_i0;
}
w2c_i0 = 0u;
w2c_l2 = w2c_i0;
w2c_L16:
w2c_i0 = w2c_l27;
w2c_i1 = 16u;
w2c_i0 <<= (w2c_i1 & 31);
w2c_l28 = w2c_i0;
w2c_i0 = w2c_l28;
w2c_i1 = w2c_l28;
w2c_i2 = 31u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 ^= w2c_i1;
w2c_l28 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 608u);
w2c_i2 = w2c_l28;
w2c_i3 = 15u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i3 = 32768u;
w2c_i2 -= w2c_i3;
w2c_i1 *= w2c_i2;
w2c_i2 = 15u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 608, w2c_i1);
w2c_i0 = w2c_l27;
w2c_i1 = w2c_l26;
w2c_i0 += w2c_i1;
w2c_l27 = w2c_i0;
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L16;}
}
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 1u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 += w2c_i1;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 24u);
w2c_i1 = w2c_l3;
w2c_i2 = 1u;
w2c_i1 &= w2c_i2;
w2c_i2 = 4u;
w2c_i1 *= w2c_i2;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 15u;
w2c_i0 &= w2c_i1;
w2c_l29 = w2c_i0;
w2c_i0 = w2c_l7;
w2c_i1 = w2c_l29;
w2c_i0 *= w2c_i1;
w2c_i1 = 15u;
w2c_i0 = I32_DIV_S(w2c_i0, w2c_i1);
w2c_l7 = w2c_i0;
w2c_i0 = 15707u;
w2c_i1 = 27257u;
w2c_i2 = w2c_l9;
w2c_i3 = 16u;
w2c_i2 &= w2c_i3;
w2c_i0 = w2c_i2 ? w2c_i0 : w2c_i1;
w2c_i1 = w2c_l3;
w2c_i2 = 4u;
w2c_i1 *= w2c_i2;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 15u;
w2c_i0 &= w2c_i1;
w2c_l30 = w2c_i0;
w2c_i0 = 16u;
w2c_i1 = w2c_l30;
w2c_i0 -= w2c_i1;
w2c_l31 = w2c_i0;
w2c_i0 = 0u;
w2c_l2 = w2c_i0;
w2c_i0 = w2c_l9;
w2c_i1 = 2u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 3u;
w2c_i0 &= w2c_i1;
w2c_l32 = w2c_i0;
w2c_i1 = 2u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l32;
if (w2c_i0) {
w2c_i0 = 4096u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = 4096u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i2 = 4096u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f3 = w2c_l50;
w2c_f4 = -0.000569795899;
w2c_f3 *= w2c_f4;
w2c_f3 = (*Z_envZ_exp)(instance->Z_env_instance, w2c_f3);
w2c_f2 *= w2c_f3;
w2c_f1 = FMIN(w2c_f1, w2c_f2);
w2c_f0 -= w2c_f1;
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l33 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 64u);
w2c_l34 = w2c_i0;
w2c_L19:
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 608u);
w2c_i1 = w2c_l7;
w2c_i0 *= w2c_i1;
w2c_i1 = 18u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_l35 = w2c_i0;
w2c_i0 = w2c_l34;
w2c_i1 = w2c_l35;
w2c_i2 = w2c_l34;
w2c_i1 -= w2c_i2;
w2c_i2 = w2c_l33;
w2c_i1 *= w2c_i2;
w2c_i2 = 12u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 += w2c_i1;
w2c_l34 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 96u);
w2c_i2 = w2c_l34;
w2c_i3 = w2c_l30;
w2c_i2 *= w2c_i3;
w2c_i3 = 4u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i1 += w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 96, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 100u);
w2c_i2 = w2c_l34;
w2c_i3 = w2c_l31;
w2c_i2 *= w2c_i3;
w2c_i3 = 4u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i1 += w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 100, w2c_i1);
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L19;}
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l34;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 64, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = 0u;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 68, w2c_i1);
} else {
w2c_L20:
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 608u);
w2c_i1 = w2c_l7;
w2c_i0 *= w2c_i1;
w2c_i1 = 18u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_l36 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 96u);
w2c_i2 = w2c_l36;
w2c_i3 = w2c_l30;
w2c_i2 *= w2c_i3;
w2c_i3 = 4u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i1 += w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 96, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 100u);
w2c_i2 = w2c_l36;
w2c_i3 = w2c_l31;
w2c_i2 *= w2c_i3;
w2c_i3 = 4u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i1 += w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 100, w2c_i1);
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L20;}
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l36;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 64, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = 0u;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 68, w2c_i1);
}
} else {
w2c_i0 = w2c_l32;
w2c_i1 = 2u;
w2c_i0 -= w2c_i1;
w2c_l32 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l32;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 26u);
w2c_l37 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l32;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load16_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 28u);
w2c_l38 = w2c_i0;
w2c_i0 = 8192u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_f1 = 0.25;
w2c_i2 = 440u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f3 = 2;
w2c_i4 = w2c_l38;
w2c_i5 = 17664u;
w2c_i4 -= w2c_i5;
w2c_f4 = (f32)(s32)(w2c_i4);
w2c_i5 = 3072u;
w2c_f5 = (f32)(s32)(w2c_i5);
w2c_f4 /= w2c_f5;
w2c_f3 = (*Z_envZ_pow)(instance->Z_env_instance, w2c_f3, w2c_f4);
w2c_f2 *= w2c_f3;
w2c_i3 = 44100u;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_f2 /= w2c_f3;
w2c_f1 = FMIN(w2c_f1, w2c_f2);
w2c_f2 = 3.1415;
w2c_f1 *= w2c_f2;
w2c_f1 = (*Z_envZ_sin)(instance->Z_env_instance, w2c_f1);
w2c_f0 *= w2c_f1;
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
w2c_l39 = w2c_i0;
w2c_i0 = 8192u;
w2c_i1 = w2c_l37;
w2c_i2 = 4u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i2 = 466u;
w2c_i1 *= w2c_i2;
w2c_i0 -= w2c_i1;
w2c_l40 = w2c_i0;
w2c_i0 = 33554432u;
w2c_i1 = w2c_l39;
w2c_i0 = I32_DIV_S(w2c_i0, w2c_i1);
w2c_i1 = w2c_l39;
w2c_i2 = 2u;
w2c_i1 = I32_DIV_S(w2c_i1, w2c_i2);
w2c_i0 -= w2c_i1;
w2c_i1 = 3u;
w2c_i0 *= w2c_i1;
w2c_i1 = 4u;
w2c_i0 = I32_DIV_S(w2c_i0, w2c_i1);
w2c_l41 = w2c_i0;
w2c_i0 = w2c_l40;
w2c_i1 = w2c_l41;
w2c_i0 = (u32)((s32)w2c_i0 > (s32)w2c_i1);
if (w2c_i0) {
w2c_i0 = w2c_l41;
w2c_l40 = w2c_i0;
}
w2c_i0 = w2c_l37;
w2c_i1 = 1u;
w2c_i0 &= w2c_i1;
w2c_l42 = w2c_i0;
w2c_i0 = w2c_l37;
w2c_i1 = 1u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 1u;
w2c_i0 &= w2c_i1;
w2c_l43 = w2c_i0;
w2c_i0 = w2c_l37;
w2c_i1 = 2u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_i1 = 1u;
w2c_i0 &= w2c_i1;
w2c_l44 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 64u);
w2c_l45 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 68u);
w2c_l46 = w2c_i0;
w2c_L22:
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 608u);
w2c_i1 = w2c_l7;
w2c_i0 *= w2c_i1;
w2c_i1 = 18u;
w2c_i0 = (u32)((s32)w2c_i0 >> (w2c_i1 & 31));
w2c_l47 = w2c_i0;
w2c_i0 = w2c_l47;
w2c_i1 = w2c_l45;
w2c_i0 -= w2c_i1;
w2c_i1 = w2c_l46;
w2c_i2 = w2c_l40;
w2c_i1 *= w2c_i2;
w2c_i2 = 12u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 -= w2c_i1;
w2c_l48 = w2c_i0;
w2c_i0 = w2c_l46;
w2c_i1 = w2c_l39;
w2c_i2 = w2c_l48;
w2c_i1 *= w2c_i2;
w2c_i2 = 12u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 += w2c_i1;
w2c_l46 = w2c_i0;
w2c_i0 = w2c_l45;
w2c_i1 = w2c_l39;
w2c_i2 = w2c_l46;
w2c_i1 *= w2c_i2;
w2c_i2 = 12u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_i0 += w2c_i1;
w2c_l45 = w2c_i0;
w2c_i0 = w2c_l45;
w2c_i1 = w2c_l42;
w2c_i0 *= w2c_i1;
w2c_i1 = w2c_l48;
w2c_i2 = w2c_l43;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l46;
w2c_i2 = w2c_l44;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_l49 = w2c_i0;
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 96u);
w2c_i2 = w2c_l49;
w2c_i3 = w2c_l30;
w2c_i2 *= w2c_i3;
w2c_i3 = 4u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i1 += w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 96, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l2;
w2c_i2 = 2u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l1;
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 100u);
w2c_i2 = w2c_l49;
w2c_i3 = w2c_l31;
w2c_i2 *= w2c_i3;
w2c_i3 = 4u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_i1 += w2c_i2;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 100, w2c_i1);
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L22;}
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l45;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 64, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l3;
w2c_i2 = 8u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = w2c_l46;
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 68, w2c_i1);
}
w2c_i0 = w2c_l3;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l3 = w2c_i0;
w2c_i1 = 4u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L2;}
}
w2c_i0 = w2c_l1;
w2c_i1 = w2c_p0;
w2c_i2 = 127u;
w2c_i1 &= w2c_i2;
w2c_i2 = 4u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i0) + 96u);
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = 32768u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f0 /= w2c_f1;
FUNC_EPILOGUE;
return w2c_f0;
}
static u32 w2c_f33(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4;
w2c_i0 = w2c_p1;
w2c_i1 = w2c_p2;
w2c_i2 = w2c_p0;
w2c_i3 = w2c_p0;
w2c_i4 = w2c_p2;
w2c_i3 = (u32)((s32)w2c_i3 > (s32)w2c_i4);
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_i2 = w2c_p0;
w2c_i3 = w2c_p1;
w2c_i2 = (u32)((s32)w2c_i2 < (s32)w2c_i3);
w2c_i0 = w2c_i2 ? w2c_i0 : w2c_i1;
FUNC_EPILOGUE;
return w2c_i0;
}
static void w2c_f34(Z_platform_instance_t* instance, u32 w2c_p0) {
u32 w2c_l1 = 0, w2c_l2 = 0, w2c_l3 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4;
f32 w2c_f0, w2c_f1, w2c_f2, w2c_f3;
w2c_i0 = instance->w2c_g5;
w2c_i1 = 2u;
w2c_i0 = (u32)((s32)w2c_i0 >= (s32)w2c_i1);
w2c_i1 = w2c_p0;
w2c_i2 = 4u;
w2c_i1 = (u32)((s32)w2c_i1 < (s32)w2c_i2);
w2c_i2 = w2c_p0;
w2c_i3 = 6u;
w2c_i2 = (u32)((s32)w2c_i2 > (s32)w2c_i3);
w2c_i1 |= w2c_i2;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_p0;
(*Z_envZ_logChar)(instance->Z_env_instance, w2c_i0);
goto w2c_Bfunc;
}
w2c_i0 = instance->w2c_g6;
w2c_i1 = w2c_p0;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 77088, w2c_i1);
w2c_i0 = instance->w2c_g6;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
instance->w2c_g6 = w2c_i0;
w2c_i0 = 77088u;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0));
w2c_p0 = w2c_i0;
w2c_i0 = w2c_p0;
w2c_i1 = 32u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
w2c_i1 = instance->w2c_g6;
w2c_i2 = w2c_p0;
w2c_i2 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i2) + 77056u);
w2c_i1 = (u32)((s32)w2c_i1 < (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
goto w2c_Bfunc;
}
w2c_i0 = 0u;
instance->w2c_g6 = w2c_i0;
w2c_i0 = w2c_p0;
w2c_i1 = 1u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = 77088u;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
w2c_f35(instance, w2c_i0);
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 4u;
w2c_i0 = (u32)((s32)w2c_i0 >= (s32)w2c_i1);
w2c_i1 = w2c_p0;
w2c_i2 = 6u;
w2c_i1 = (u32)((s32)w2c_i1 <= (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = w2c_p0;
w2c_i1 = 4u;
w2c_i0 -= w2c_i1;
instance->w2c_g5 = w2c_i0;
w2c_i0 = instance->w2c_g5;
w2c_i0 = !(w2c_i0);
if (w2c_i0) {
w2c_i0 = 0u;
instance->w2c_g1 = w2c_i0;
w2c_i0 = 0u;
instance->w2c_g2 = w2c_i0;
}
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 7u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = 80u;
w2c_i1 = 80u;
w2c_i1 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i1));
w2c_i2 = 2u;
w2c_i1 ^= w2c_i2;
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0), w2c_i1);
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 8u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g1;
w2c_i1 = 8u;
w2c_i0 -= w2c_i1;
instance->w2c_g1 = w2c_i0;
w2c_i0 = instance->w2c_g5;
w2c_i0 = !(w2c_i0);
w2c_i1 = instance->w2c_g1;
w2c_i2 = 0u;
w2c_i1 = (u32)((s32)w2c_i1 < (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 312u;
instance->w2c_g1 = w2c_i0;
w2c_i0 = 11u;
w2c_f34(instance, w2c_i0);
}
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 9u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g5;
w2c_i0 = !(w2c_i0);
w2c_i1 = instance->w2c_g1;
w2c_i2 = 320u;
w2c_i1 = (u32)((s32)w2c_i1 >= (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 3338u;
w2c_printChar(instance, w2c_i0);
}
w2c_i0 = instance->w2c_g1;
w2c_i1 = 8u;
w2c_i0 += w2c_i1;
instance->w2c_g1 = w2c_i0;
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 10u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g2;
w2c_i1 = 8u;
w2c_i0 += w2c_i1;
instance->w2c_g2 = w2c_i0;
w2c_i0 = instance->w2c_g5;
w2c_i0 = !(w2c_i0);
w2c_i1 = instance->w2c_g2;
w2c_i2 = 240u;
w2c_i1 = (u32)((s32)w2c_i1 >= (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 232u;
instance->w2c_g2 = w2c_i0;
w2c_L12:
w2c_i0 = w2c_l1;
w2c_i1 = w2c_l1;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 2680u);
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 120, w2c_i1);
w2c_i0 = w2c_l1;
w2c_i1 = 4u;
w2c_i0 += w2c_i1;
w2c_l1 = w2c_i0;
w2c_i1 = 74240u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L12;}
w2c_i0 = 0u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = 232u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i2 = 320u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i3 = 8u;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_i4 = instance->w2c_g4;
w2c_rectangle(instance, w2c_f0, w2c_f1, w2c_f2, w2c_f3, w2c_i4);
}
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 11u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g2;
w2c_i1 = 8u;
w2c_i0 -= w2c_i1;
instance->w2c_g2 = w2c_i0;
w2c_i0 = instance->w2c_g5;
w2c_i0 = !(w2c_i0);
w2c_i1 = instance->w2c_g2;
w2c_i2 = 0u;
w2c_i1 = (u32)((s32)w2c_i1 < (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 0u;
instance->w2c_g2 = w2c_i0;
w2c_i0 = 74240u;
w2c_l2 = w2c_i0;
w2c_L15:
w2c_i0 = w2c_l2;
w2c_i1 = w2c_l2;
w2c_i1 = i32_load(instance->Z_envZ_memory, (u64)(w2c_i1) + 116u);
i32_store(instance->Z_envZ_memory, (u64)(w2c_i0) + 2676, w2c_i1);
w2c_i0 = w2c_l2;
w2c_i1 = 4u;
w2c_i0 -= w2c_i1;
w2c_l2 = w2c_i0;
if (w2c_i0) {goto w2c_L15;}
w2c_i0 = 0u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i2 = 320u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_i3 = 8u;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_i4 = instance->w2c_g4;
w2c_rectangle(instance, w2c_f0, w2c_f1, w2c_f2, w2c_f3, w2c_i4);
}
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 12u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g4;
w2c_cls(instance, w2c_i0);
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 13u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = 0u;
instance->w2c_g1 = w2c_i0;
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 14u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = 77088u;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
instance->w2c_g4 = w2c_i0;
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 15u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = 77088u;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
instance->w2c_g3 = w2c_i0;
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 24u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g3;
w2c_l3 = w2c_i0;
w2c_i0 = instance->w2c_g4;
instance->w2c_g3 = w2c_i0;
w2c_i0 = w2c_l3;
instance->w2c_g4 = w2c_i0;
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 31u;
w2c_i0 = w2c_i0 == w2c_i1;
if (w2c_i0) {
w2c_i0 = 77088u;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 1u);
w2c_i1 = 8u;
w2c_i2 = instance->w2c_g5;
w2c_i3 = 6u;
w2c_i2 *= w2c_i3;
w2c_i1 -= w2c_i2;
w2c_i0 *= w2c_i1;
instance->w2c_g1 = w2c_i0;
w2c_i0 = 77088u;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 2u);
w2c_i1 = 8u;
w2c_i2 = instance->w2c_g5;
w2c_i3 = 7u;
w2c_i2 *= w2c_i3;
w2c_i1 -= w2c_i2;
w2c_i0 *= w2c_i1;
instance->w2c_g2 = w2c_i0;
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_i1 = 31u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {
goto w2c_Bfunc;
}
w2c_i0 = w2c_p0;
w2c_f35(instance, w2c_i0);
w2c_Bfunc:;
FUNC_EPILOGUE;
}
static void w2c_f35(Z_platform_instance_t* instance, u32 w2c_p0) {
u32 w2c_l1 = 0, w2c_l2 = 0, w2c_l3 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4, w2c_i5;
w2c_i0 = instance->w2c_g5;
w2c_i0 = !(w2c_i0);
w2c_i1 = instance->w2c_g1;
w2c_i2 = 320u;
w2c_i1 = (u32)((s32)w2c_i1 >= (s32)w2c_i2);
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = 3338u;
w2c_printChar(instance, w2c_i0);
}
w2c_L1:
w2c_i0 = w2c_p0;
w2c_i1 = 8u;
w2c_i0 *= w2c_i1;
w2c_i1 = w2c_l1;
w2c_i0 += w2c_i1;
w2c_i0 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i0) + 78848u);
w2c_l2 = w2c_i0;
w2c_i0 = 0u;
w2c_l3 = w2c_i0;
w2c_i0 = instance->w2c_g5;
if (w2c_i0) {
w2c_L3:
w2c_i0 = w2c_l2;
w2c_i1 = 1u;
w2c_i0 <<= (w2c_i1 & 31);
w2c_l2 = w2c_i0;
w2c_i1 = 256u;
w2c_i0 &= w2c_i1;
if (w2c_i0) {
w2c_i0 = instance->w2c_g1;
w2c_i1 = w2c_l3;
w2c_i0 += w2c_i1;
w2c_i1 = instance->w2c_g2;
w2c_i2 = w2c_l1;
w2c_i1 += w2c_i2;
w2c_i2 = instance->w2c_g3;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
}
w2c_i0 = w2c_l3;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l3 = w2c_i0;
w2c_i1 = 8u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L3;}
} else {
w2c_L5:
w2c_i0 = instance->w2c_g1;
w2c_i1 = w2c_l3;
w2c_i0 += w2c_i1;
w2c_i1 = instance->w2c_g2;
w2c_i2 = w2c_l1;
w2c_i1 += w2c_i2;
w2c_i2 = instance->w2c_g3;
w2c_i3 = instance->w2c_g4;
w2c_i4 = w2c_l2;
w2c_i5 = 1u;
w2c_i4 <<= (w2c_i5 & 31);
w2c_l2 = w2c_i4;
w2c_i5 = 256u;
w2c_i4 &= w2c_i5;
w2c_i2 = w2c_i4 ? w2c_i2 : w2c_i3;
w2c_setPixel(instance, w2c_i0, w2c_i1, w2c_i2);
w2c_i0 = w2c_l3;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l3 = w2c_i0;
w2c_i1 = 8u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L5;}
}
w2c_i0 = w2c_l1;
w2c_i1 = 1u;
w2c_i0 += w2c_i1;
w2c_l1 = w2c_i0;
w2c_i1 = 8u;
w2c_i0 = (u32)((s32)w2c_i0 < (s32)w2c_i1);
if (w2c_i0) {goto w2c_L1;}
w2c_i0 = instance->w2c_g1;
w2c_i1 = 8u;
w2c_i0 += w2c_i1;
instance->w2c_g1 = w2c_i0;
FUNC_EPILOGUE;
}
static void w2c_f36(Z_platform_instance_t* instance) {
u32 w2c_l0 = 0, w2c_l1 = 0, w2c_l2 = 0, w2c_l3 = 0;
f32 w2c_l4 = 0, w2c_l5 = 0, w2c_l6 = 0, w2c_l7 = 0, w2c_l8 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4, w2c_i5;
f32 w2c_f0, w2c_f1, w2c_f2, w2c_f3, w2c_f4, w2c_f5, w2c_f6;
w2c_i0 = 575u;
w2c_l0 = w2c_i0;
w2c_L0:
w2c_i0 = w2c_l0;
w2c_i1 = 3u;
w2c_i0 = I32_REM_S(w2c_i0, w2c_i1);
w2c_i1 = w2c_l0;
w2c_i2 = 3u;
w2c_i1 = I32_DIV_S(w2c_i1, w2c_i2);
w2c_i2 = 4u;
w2c_i1 *= w2c_i2;
w2c_i0 += w2c_i1;
w2c_i1 = 0u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f2 = w2c_l4;
w2c_f3 = 0.800000012;
w2c_f2 -= w2c_f3;
w2c_f3 = w2c_l4;
w2c_f4 = 0.800000012;
w2c_f3 += w2c_f4;
w2c_f4 = 0.400000006;
w2c_i5 = w2c_l0;
w2c_f5 = (f32)(s32)(w2c_i5);
w2c_f6 = 2.08249998;
w2c_f5 *= w2c_f6;
w2c_f5 = (*Z_envZ_cos)(instance->Z_env_instance, w2c_f5);
w2c_f4 -= w2c_f5;
w2c_l6 = w2c_f4;
w2c_f3 = FMIN(w2c_f3, w2c_f4);
w2c_f2 = FMAX(w2c_f2, w2c_f3);
w2c_i3 = w2c_l0;
w2c_i4 = 48u;
w2c_i3 = I32_REM_S(w2c_i3, w2c_i4);
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_i4 = 48u;
w2c_f4 = (f32)(s32)(w2c_i4);
w2c_f3 /= w2c_f4;
w2c_l5 = w2c_f3;
w2c_f4 = 0.0500000007;
w2c_f3 += w2c_f4;
w2c_f2 *= w2c_f3;
w2c_l7 = w2c_f2;
w2c_f3 = w2c_l5;
w2c_f4 = w2c_l5;
w2c_f3 *= w2c_f4;
w2c_f4 = 0.800000012;
w2c_f3 *= w2c_f4;
w2c_l8 = w2c_f3;
w2c_f2 += w2c_f3;
w2c_f3 = w2c_l7;
w2c_f4 = w2c_l8;
w2c_f3 *= w2c_f4;
w2c_f2 -= w2c_f3;
w2c_i3 = 1u;
w2c_f3 = (f32)(s32)(w2c_i3);
w2c_f2 = FMIN(w2c_f2, w2c_f3);
w2c_f1 = FMAX(w2c_f1, w2c_f2);
w2c_f2 = w2c_l5;
w2c_i3 = w2c_l0;
w2c_i4 = 528u;
w2c_i3 = (u32)((s32)w2c_i3 < (s32)w2c_i4);
w2c_f1 = w2c_i3 ? w2c_f1 : w2c_f2;
w2c_i2 = 255u;
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f1 *= w2c_f2;
w2c_i1 = I32_TRUNC_S_F32(w2c_f1);
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 77824, w2c_i1);
w2c_f0 = w2c_l4;
w2c_f1 = w2c_l6;
w2c_f0 += w2c_f1;
w2c_f1 = 0.5;
w2c_f0 *= w2c_f1;
w2c_l4 = w2c_f0;
w2c_i0 = w2c_l0;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_l0 = w2c_i0;
if (w2c_i0) {goto w2c_L0;}
w2c_i0 = 255u;
w2c_l0 = w2c_i0;
w2c_L1:
w2c_i0 = w2c_l0;
w2c_i1 = w2c_l0;
w2c_i2 = 2u;
w2c_i1 = (u32)((s32)w2c_i1 >> (w2c_i2 & 31));
w2c_l2 = w2c_i1;
w2c_i2 = 32u;
w2c_i1 = I32_REM_S(w2c_i1, w2c_i2);
w2c_i2 = 2u;
w2c_i1 = I32_DIV_S(w2c_i1, w2c_i2);
w2c_i2 = w2c_l2;
w2c_i3 = 2u;
w2c_i2 *= w2c_i3;
w2c_i3 = w2c_l2;
w2c_i4 = 32u;
w2c_i3 = (u32)((s32)w2c_i3 >= (s32)w2c_i4);
w2c_l3 = w2c_i3;
w2c_i1 = w2c_i3 ? w2c_i1 : w2c_i2;
w2c_i2 = 4u;
w2c_i1 *= w2c_i2;
w2c_i2 = w2c_l0;
w2c_i3 = 3u;
w2c_i2 &= w2c_i3;
w2c_l1 = w2c_i2;
w2c_i1 += w2c_i2;
w2c_i1 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i1) + 78592u);
w2c_i2 = w2c_l2;
w2c_i3 = 1u;
w2c_i2 += w2c_i3;
w2c_i3 = 32u;
w2c_i2 = I32_REM_S(w2c_i2, w2c_i3);
w2c_i3 = 2u;
w2c_i2 = I32_DIV_S(w2c_i2, w2c_i3);
w2c_i3 = w2c_l2;
w2c_i4 = 2u;
w2c_i3 *= w2c_i4;
w2c_i4 = 1u;
w2c_i3 += w2c_i4;
w2c_i4 = w2c_l3;
w2c_i2 = w2c_i4 ? w2c_i2 : w2c_i3;
w2c_i3 = 4u;
w2c_i2 *= w2c_i3;
w2c_i3 = w2c_l1;
w2c_i2 += w2c_i3;
w2c_i2 = i32_load8_u(instance->Z_envZ_memory, (u64)(w2c_i2) + 78592u);
w2c_i1 += w2c_i2;
w2c_i2 = 3u;
w2c_i3 = w2c_l3;
w2c_i2 += w2c_i3;
w2c_i1 *= w2c_i2;
w2c_i2 = 8u;
w2c_i1 = I32_DIV_S(w2c_i1, w2c_i2);
i32_store8(instance->Z_envZ_memory, (u64)(w2c_i0) + 78592, w2c_i1);
w2c_i0 = w2c_l0;
w2c_i1 = 1u;
w2c_i0 -= w2c_i1;
w2c_l0 = w2c_i0;
w2c_i1 = 0u;
w2c_i0 = (u32)((s32)w2c_i0 >= (s32)w2c_i1);
if (w2c_i0) {goto w2c_L1;}
w2c_i0 = 0u;
w2c_i1 = 0u;
w2c_i2 = 64u;
memory_fill(instance->Z_envZ_memory, w2c_i0, w2c_i1, w2c_i2);
w2c_i0 = 112u;
w2c_i1 = 0u;
w2c_i2 = 8u;
memory_fill(instance->Z_envZ_memory, w2c_i0, w2c_i1, w2c_i2);
w2c_i0 = 81920u;
w2c_i1 = 0u;
w2c_i2 = 180224u;
memory_fill(instance->Z_envZ_memory, w2c_i0, w2c_i1, w2c_i2);
w2c_i0 = 0u;
w2c_cls(instance, w2c_i0);
w2c_i0 = w2c_random(instance);
w2c_randomSeed(instance, w2c_i0);
FUNC_EPILOGUE;
}
static u32 w2c_f37(Z_platform_instance_t* instance, u32 w2c_p0, f32 w2c_p1, u32 w2c_p2) {
f32 w2c_l3 = 0, w2c_l4 = 0;
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3;
f32 w2c_f0, w2c_f1, w2c_f2, w2c_f3;
w2c_i0 = 0u;
w2c_f0 = (f32)(s32)(w2c_i0);
w2c_i1 = 1u;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_i2 = w2c_p0;
w2c_i3 = 16u;
w2c_i2 <<= (w2c_i3 & 31);
w2c_i3 = 16u;
w2c_i2 = (u32)((s32)w2c_i2 >> (w2c_i3 & 31));
w2c_f2 = (f32)(s32)(w2c_i2);
w2c_f3 = w2c_p1;
w2c_f2 *= w2c_f3;
w2c_l3 = w2c_f2;
w2c_f2 = wasm_fabsf(w2c_f2);
w2c_f1 -= w2c_f2;
w2c_f0 = FMAX(w2c_f0, w2c_f1);
w2c_l4 = w2c_f0;
w2c_f1 = w2c_l4;
w2c_f0 *= w2c_f1;
w2c_f1 = w2c_l3;
w2c_f0 = copysignf(w2c_f0, w2c_f1);
w2c_i1 = w2c_p2;
w2c_f1 = (f32)(s32)(w2c_i1);
w2c_f0 *= w2c_f1;
w2c_i0 = I32_TRUNC_S_F32(w2c_f0);
FUNC_EPILOGUE;
return w2c_i0;
}
/* export: 'time' */
f32 Z_platformZ_time(Z_platform_instance_t* instance) {
return w2c_time(instance);
}
/* export: 'isButtonPressed' */
u32 Z_platformZ_isButtonPressed(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_isButtonPressed(instance, w2c_p0);
}
/* export: 'isButtonTriggered' */
u32 Z_platformZ_isButtonTriggered(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_isButtonTriggered(instance, w2c_p0);
}
/* export: 'random' */
u32 Z_platformZ_random(Z_platform_instance_t* instance) {
return w2c_random(instance);
}
/* export: 'random64' */
u64 Z_platformZ_random64(Z_platform_instance_t* instance) {
return w2c_random64(instance);
}
/* export: 'randomf' */
f32 Z_platformZ_randomf(Z_platform_instance_t* instance) {
return w2c_randomf(instance);
}
/* export: 'randomSeed' */
void Z_platformZ_randomSeed(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_randomSeed(instance, w2c_p0);
}
/* export: 'fmod' */
f32 Z_platformZ_fmod(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1) {
return w2c_fmod(instance, w2c_p0, w2c_p1);
}
/* export: 'cls' */
void Z_platformZ_cls(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_cls(instance, w2c_p0);
}
/* export: 'setPixel' */
void Z_platformZ_setPixel(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2) {
return w2c_setPixel(instance, w2c_p0, w2c_p1, w2c_p2);
}
/* export: 'getPixel' */
u32 Z_platformZ_getPixel(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
return w2c_getPixel(instance, w2c_p0, w2c_p1);
}
/* export: 'hline' */
void Z_platformZ_hline(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2, u32 w2c_p3) {
return w2c_hline(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3);
}
/* export: 'rectangle' */
void Z_platformZ_rectangle(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, f32 w2c_p3, u32 w2c_p4) {
return w2c_rectangle(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3, w2c_p4);
}
/* export: 'rectangleOutline' */
void Z_platformZ_rectangleOutline(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, f32 w2c_p3, u32 w2c_p4) {
return w2c_rectangleOutline(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3, w2c_p4);
}
/* export: 'circle' */
void Z_platformZ_circle(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, u32 w2c_p3) {
return w2c_circle(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3);
}
/* export: 'circleOutline' */
void Z_platformZ_circleOutline(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, u32 w2c_p3) {
return w2c_circleOutline(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3);
}
/* export: 'line' */
void Z_platformZ_line(Z_platform_instance_t* instance, f32 w2c_p0, f32 w2c_p1, f32 w2c_p2, f32 w2c_p3, u32 w2c_p4) {
return w2c_line(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3, w2c_p4);
}
/* export: 'blitSprite' */
void Z_platformZ_blitSprite(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2, u32 w2c_p3, u32 w2c_p4) {
return w2c_blitSprite(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3, w2c_p4);
}
/* export: 'grabSprite' */
void Z_platformZ_grabSprite(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1, u32 w2c_p2, u32 w2c_p3, u32 w2c_p4) {
return w2c_grabSprite(instance, w2c_p0, w2c_p1, w2c_p2, w2c_p3, w2c_p4);
}
/* export: 'printChar' */
void Z_platformZ_printChar(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_printChar(instance, w2c_p0);
}
/* export: 'printString' */
void Z_platformZ_printString(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_printString(instance, w2c_p0);
}
/* export: 'printInt' */
void Z_platformZ_printInt(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_printInt(instance, w2c_p0);
}
/* export: 'setTextColor' */
void Z_platformZ_setTextColor(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_setTextColor(instance, w2c_p0);
}
/* export: 'setBackgroundColor' */
void Z_platformZ_setBackgroundColor(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_setBackgroundColor(instance, w2c_p0);
}
/* export: 'setCursorPosition' */
void Z_platformZ_setCursorPosition(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
return w2c_setCursorPosition(instance, w2c_p0, w2c_p1);
}
/* export: 'playNote' */
void Z_platformZ_playNote(Z_platform_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
return w2c_playNote(instance, w2c_p0, w2c_p1);
}
/* export: 'endFrame' */
void Z_platformZ_endFrame(Z_platform_instance_t* instance) {
return w2c_endFrame(instance);
}
/* export: 'sndGes' */
f32 Z_platformZ_sndGes(Z_platform_instance_t* instance, u32 w2c_p0) {
return w2c_sndGes(instance, w2c_p0);
}
static void init_instance_import(Z_platform_instance_t* instance, struct Z_env_instance_t* Z_env_instance){
instance->Z_env_instance = Z_env_instance;
instance->Z_envZ_memory = Z_envZ_memory(Z_env_instance);
}
void Z_platform_init_module(void) {
assert(wasm_rt_is_initialized());
s_module_initialized = true;
init_func_types();
}
void Z_platform_instantiate(Z_platform_instance_t* instance, struct Z_env_instance_t* Z_env_instance) {
assert(wasm_rt_is_initialized());
assert(s_module_initialized);
init_instance_import(instance, Z_env_instance);
init_globals(instance);
init_memories(instance);
init_data_instances(instance);
w2c_f36(instance);
}
void Z_platform_free(Z_platform_instance_t* instance) {
}