(module
  (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
  (import "wasi_snapshot_preview1" "proc_exit" (func $proc_exit (param i32)))
  (data (i32.const 48) "\04\00\00\00true")
  (data (i32.const 56) "\05\00\00\00false")
  (data (i32.const 64) "\01\00\00\00-")
  (memory (export "memory") 2)
  (global $hp (mut i32) (i32.const 72))
  (func $spiralMain (result i32)
    (local $v0 i32)
    (local $v1 i32)
    (local $v2 i32)
    (local $v3 f32)
    (local $v4 f32)
    (local $v5 f32)
    (local $v6 i32)
    (local $v7 i32)
    (local $v8 i32)
    (local $v9 f32)
    (local $v10 i32)
    (local $v11 i32)
    (local $v12 i32)
    (local $v13 i32)
    (local $v14 i32)
    (local $v15 i32)
    (local $v16 i32)
    (local $v17 i32)
    (local $v18 i32)
    (local $v19 i32)
    (local $v20 i32)
    (local $v21 i32)
    (local $v23 i32)
    (local $v22 i32)
    (local $v26 i32)
    (local $v24 i32)
    (local $v25 i32)
    (local $v27 i32)
    (local $v29 i32)
    (local $v28 i32)
    (local $v31 i32)
    (local $v30 i32)
    (local $v33 i32)
    (local $v32 i32)
    (local $v34 i32)
    (local $v36 i32)
    (local $v35 i32)
    (local $v37 i32)
    (local $v39 i32)
    (local $v38 i32)
    (local $v41 i32)
    (local $v40 i32)
    (local $v42 i32)
    (local $v44 i32)
    (local $v43 i32)
    (local.set $v0 (i32.const -2147483648))
    (local.set $v1 (i32.const 4294967295))
    (local.set $v2 (i32.const -1))
    (local.set $v3 (f32.const 0))
    (local.set $v4 (f32.const 1.9))
    (local.set $v5 (f32.const 2.9))
    (local.set $v6 (i32.const 4294967294))
    (local.set $v7 (i32.const 5))
    (local.set $v8 (i32.const 0))
    (local.set $v9 (f32.sub (local.get $v3) (local.get $v4)))
    (local.set $v10 (local.get $v0))
    (local.set $v11 (local.get $v10))
    (local.set $v12 (local.get $v1))
    (local.set $v13 (local.get $v2))
    (local.set $v14 (i32.trunc_sat_f32_s (local.get $v9)))
    (local.set $v15 (i32.trunc_sat_f32_s (local.get $v5)))
    (local.set $v16 (i32.div_u (local.get $v10) (i32.const 2)))
    (local.set $v17 (i32.div_u (local.get $v6) (i32.const 2)))
    (local.set $v18 (i32.rem_u (local.get $v7) (i32.const 3)))
    (local.set $v19 (i32.xor (local.get $v8) (i32.const -1)))
    (local.set $v20 (i32.shr_u (local.get $v1) (i32.const 31)))
    (local.set $v21 (i32.lt_s (local.get $v0) (i32.const -1)))
    (if (local.get $v21)
        (then
            (local.set $v22 (i32.le_s (local.get $v0) (local.get $v0)))
            (local.set $v23 (local.get $v22))
        )
        (else
            (local.set $v23 (i32.const 0))
        ))
    (if (local.get $v23)
        (then
            (local.set $v24 (i32.gt_s (local.get $v0) (i32.const 0)))
            (local.set $v25 (i32.eq (local.get $v24) (i32.const 0)))
            (local.set $v26 (local.get $v25))
        )
        (else
            (local.set $v26 (i32.const 0))
        ))
    (if (local.get $v26)
        (then
            (local.set $v27 (i32.gt_u (local.get $v10) (i32.const 1)))
            (if (local.get $v27)
                (then
                    (local.set $v28 (i32.eq (local.get $v11) (local.get $v0)))
                    (local.set $v29 (local.get $v28))
                )
                (else
                    (local.set $v29 (i32.const 0))
                ))
            (if (local.get $v29)
                (then
                    (local.set $v30 (i32.eq (local.get $v12) (local.get $v2)))
                    (local.set $v31 (local.get $v30))
                )
                (else
                    (local.set $v31 (i32.const 0))
                ))
            (if (local.get $v31)
                (then
                    (local.set $v32 (i32.eq (local.get $v13) (local.get $v1)))
                    (local.set $v33 (local.get $v32))
                )
                (else
                    (local.set $v33 (i32.const 0))
                ))
            (if (local.get $v33)
                (then
                    (local.set $v34 (i32.eq (local.get $v14) (local.get $v2)))
                    (if (local.get $v34)
                        (then
                            (local.set $v35 (i32.eq (local.get $v15) (i32.const 2)))
                            (local.set $v36 (local.get $v35))
                        )
                        (else
                            (local.set $v36 (i32.const 0))
                        ))
                    (if (local.get $v36)
                        (then
                            (local.set $v37 (i32.eq (local.get $v16) (i32.const 1073741824)))
                            (if (local.get $v37)
                                (then
                                    (local.set $v38 (i32.eq (local.get $v17) (i32.const 2147483647)))
                                    (local.set $v39 (local.get $v38))
                                )
                                (else
                                    (local.set $v39 (i32.const 0))
                                ))
                            (if (local.get $v39)
                                (then
                                    (local.set $v40 (i32.eq (local.get $v18) (i32.const 2)))
                                    (local.set $v41 (local.get $v40))
                                )
                                (else
                                    (local.set $v41 (i32.const 0))
                                ))
                            (if (local.get $v41)
                                (then
                                    (local.set $v42 (i32.eq (local.get $v19) (local.get $v1)))
                                    (if (local.get $v42)
                                        (then
                                            (local.set $v43 (i32.eq (local.get $v20) (i32.const 1)))
                                            (local.set $v44 (local.get $v43))
                                        )
                                        (else
                                            (local.set $v44 (i32.const 0))
                                        ))
                                    (if (local.get $v44)
                                        (then
                                            (return (i32.const 0))
                                        )
                                        (else
                                            (return (i32.const 5))
                                        ))
                                )
                                (else
                                    (return (i32.const 4))
                                ))
                        )
                        (else
                            (return (i32.const 3))
                        ))
                )
                (else
                    (return (i32.const 2))
                ))
        )
        (else
            (return (i32.const 1))
        ))
    (unreachable)
  )
  (func $_start (export "_start")
    (call $proc_exit (call $spiralMain)))
)
