kernels_main = r"""
"""
from main_auto import *
kernels = kernels_aux + kernels_main
import os
try: # CuPy when a CUDA device answers, otherwise numpy under the same name (SPIRAL_CUDA=0 forces numpy).
    if os.environ.get('SPIRAL_CUDA', '1') == '0': raise ImportError('SPIRAL_CUDA=0')
    import cupy as cp
    if cp.cuda.runtime.getDeviceCount() < 1: raise RuntimeError('no CUDA device')
    cuda = True
except Exception:
    import numpy as cp
    cuda = False
from dataclasses import dataclass
from typing import NamedTuple, Union, Callable, Tuple
i8 = int; i16 = int; i32 = int; i64 = int; u8 = int; u16 = int; u32 = int; u64 = int; f32 = float; f64 = float; char = str; string = str
import sys
sys.setrecursionlimit(1 << 30)

def spiral_array_index(array, index):
    value = array[index]
    return value.item() if isinstance(array, cp.ndarray) and array.dtype.kind != 'O' else value
class Heap0(NamedTuple):
    v0 : i32
    v1 : string
@dataclass
class Mut0:
    v0 : Heap0
    v1 : Heap0
    v2 : Heap0
def main():
    v0 = 1
    v1 = "no"
    v2 = Heap0(v0, v1)
    del v0, v1
    v3 = 2
    v4 = "zz"
    v5 = Heap0(v3, v4)
    del v3, v4
    v6 = 3
    v7 = "aa"
    v8 = Heap0(v6, v7)
    del v6, v7
    v9 = Mut0(v2, v5, v8)
    del v2, v5, v8
    v10 = __import__('numpy').empty(1,dtype=object)
    v10[0] = v9
    del v9
    v11 = 7
    v12 = "hi"
    v13 = Heap0(v11, v12)
    del v11, v12
    v14 = 4
    v15 = "yo"
    v16 = Heap0(v14, v15)
    del v14, v15
    v17 = 9
    v18 = "ok"
    v19 = Heap0(v17, v18)
    del v17, v18
    v20 = spiral_array_index(v10, 0)
    del v10
    v20.v0 = v13
    v20.v1 = v16
    v20.v2 = v19
    del v13, v16, v19
    v21, v22, v23 = v20.v0, v20.v1, v20.v2
    del v20
    v24, v25 = v21.v0, v21.v1
    del v21
    v26, v27 = v22.v0, v22.v1
    del v22
    v28, v29 = v23.v0, v23.v1
    del v23
    v30 = v24 == 7
    del v24
    if v30:
        v31 = v25 == "hi"
        v32 = v31
    else:
        v32 = False
    del v25, v30
    if v32:
        v33 = v26 == 4
        v34 = v33
    else:
        v34 = False
    del v26, v32
    if v34:
        v35 = v27 == "yo"
        v36 = v35
    else:
        v36 = False
    del v27, v34
    if v36:
        v37 = v28 == 9
        v38 = v37
    else:
        v38 = False
    del v28, v36
    if v38:
        v39 = v29 == "ok"
        v40 = v39
    else:
        v40 = False
    del v29, v38
    if v40:
        del v40
        return 0
    else:
        del v40
        return 1

if __name__ == '__main__': sys.exit(main())
