Problem 993

Banana game BB(n) with eventual periodicity.

Answer1661971830985915304
Output1661971830985915304
StatusPASS
Native helperno
Runtime0 ms
Peak memory1120 KB
Time complexityO(n^2) (estimated)
Space complexityO(n) (estimated)

Performance comparison

MetricOur solutionBest known
Time complexityO(n^2)?
Space complexityO(n)?
ApproachFlow solutionNot curated
VerdictUnknown

Flow source

# Project Euler 993
# Banana game BB(n) with eventual periodicity.

extern {
    function calloc(n: i64, size: i64) -> ptr<void>
    function free(p: ptr<void>) -> void
    function memset(p: ptr<void>, c: i32, n: i64) -> ptr<void>
}

const PERIOD_START: i64 = 514
const PERIOD: i64 = 71
const OFFSET: i64 = 60000
const ARR_SIZE: i64 = 120001

function main() -> i32 {
    let bananas: ptr<i8> = calloc(ARR_SIZE, 1)
    memset(bananas, 0, ARR_SIZE)

    let limit: i64 = PERIOD_START + PERIOD
    let bb: ptr<i64> = calloc(586, 8)
    bb[0] = 0
    let mut pos: i64 = 0
    let mut carry: i64 = 0

    let mut n: i64 = 1
    while n <= limit {
        carry = carry + 1
        let mut stepped: bool = true
        while stepped {
            stepped = false
            let p: i64 = pos
            let hx: i8 = bananas[p + OFFSET]
            let hx1: i8 = bananas[p + 1 + OFFSET]

            if hx != 0 && hx1 != 0 {
                bananas[p + 1 + OFFSET] = 0
                pos = p - 1
                carry = carry + 1
                stepped = true
            } else {
                if hx != 0 && hx1 == 0 {
                    bananas[p + OFFSET] = 0
                    pos = p + 2
                    carry = carry + 1
                    stepped = true
                } else {
                    if hx == 0 && hx1 != 0 {
                        bananas[p + 1 + OFFSET] = 0
                        bananas[p + OFFSET] = 1
                        pos = p + 2
                        stepped = true
                    } else {
                        if carry >= 3 {
                            bananas[p - 1 + OFFSET] = 1
                            bananas[p + OFFSET] = 1
                            bananas[p + 1 + OFFSET] = 1
                            pos = p - 2
                            carry = carry - 3
                            stepped = true
                        }
                    }
                }
            }
        }
        bb[n] = pos
        n = n + 1
    }

    let big_n: i64 = 1000000000000000000
    let mut result: i64 = 0
    if big_n <= PERIOD_START {
        result = bb[big_n]
    } else {
        let remaining: i64 = big_n - PERIOD_START
        let whole_periods: i64 = remaining / PERIOD
        let tail: i64 = remaining % PERIOD

        let delta: array<i32, 71> = [
            17, -2, -8, -2, -2, -14, -2, -2, -17, -8, -5, -8, -5, -2, -2, -5, -8,
            50, -8, 23, -13, -2, 67, -5, -2, -2, -5, -8, -5, 21, 29, -11, -2, -2,
            6, -11, 31, -2, -11, 17, -2, -8, -2, -2, -14, -2, -2, -17, -8, -5, -8,
            -8, 8, -13, -5, -2, -2, -5, -2, -11, -8, -8, -5, -2, -11, -8, -8, -5,
            -2, -11, 216
        ]

        let mut pattern_sum: i64 = 0
        let mut i: i64 = 0
        while i < PERIOD {
            pattern_sum = pattern_sum + (delta[i] as i64)
            i = i + 1
        }

        let mut tail_sum: i64 = 0
        i = 0
        while i < tail {
            tail_sum = tail_sum + (delta[i] as i64)
            i = i + 1
        }

        result = bb[PERIOD_START] + whole_periods * pattern_sum + tail_sum
    }

    printf("%lld\n", result)
    free(bananas)
    free(bb)
    return 0
}

Generated C

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Flow runtime helpers */
typedef struct flow_temp_node { struct flow_temp_node* next; } flow_temp_node;
static flow_temp_node* flow_temp_head = NULL;
static int flow_temp_atexit_set = 0;
__attribute__((unused)) static void flow_temp_free_all(void) {
    while (flow_temp_head) {
        flow_temp_node* n = flow_temp_head;
        flow_temp_head = n->next;
        free(n);
    }
}
__attribute__((unused)) static void* flow_temp_alloc(size_t nbytes) {
    flow_temp_node* node = (flow_temp_node*)malloc(sizeof(flow_temp_node) + nbytes);
    if (!node) return NULL;
    node->next = flow_temp_head;
    flow_temp_head = node;
    if (!flow_temp_atexit_set) {
        flow_temp_atexit_set = 1;
        atexit(flow_temp_free_all);
    }
    return (void*)(node + 1);
}
#ifndef FLOW_DIAG
#define FLOW_DIAG(msg) fprintf(stderr, "%s", (msg))
#endif
#ifndef FLOW_LOG
#define FLOW_LOG(fmt, ...) printf(fmt, __VA_ARGS__)
#endif
#ifndef FLOW_LOG_EMPTY
#define FLOW_LOG_EMPTY(fmt) printf(fmt)
#endif
static char* flow_strcat(const char* a, const char* b) {
    size_t la = strlen(a ? a : ""), lb = strlen(b ? b : "");
    char* r = (char*)flow_temp_alloc(la + lb + 1);
    if (!r) return NULL;
    if (la) memcpy(r, a, la);
    if (lb) memcpy(r + la, b, lb);
    r[la + lb] = '\0';
    return r;
}

#define __flow_in_arr(arr, val) __extension__ ({ \
    int _found = 0; \
    size_t _n = sizeof(arr)/sizeof((arr)[0]); \
    for (size_t _i = 0; _i < _n; _i++) { \
        if ((arr)[_i] == (val)) { _found = 1; break; } \
    } _found; })

/* Unified fault handler (MISRA #279) — override with -DFLOW_FAULT_HANDLER=fn */
#ifndef FLOW_FAULT_HANDLER
__attribute__((unused)) static inline void flow_fault_handler(const char* msg) {
    fprintf(stderr, "flow: %s\n", msg ? msg : "fault");
    abort();
#if defined(__GNUC__) || defined(__clang__)
    __builtin_unreachable();
#endif
}
#else
#define flow_fault_handler FLOW_FAULT_HANDLER
#endif
#define flow_div_by_zero_handler() flow_fault_handler("division by zero")
#define flow_shift_ub_handler() flow_fault_handler("invalid shift (amount out of range or left-shift of negative)")

#ifndef FLOW_CHECKED_DIV
#define FLOW_CHECKED_DIV(L, R) (((R) != 0) ? ((L) / (R)) : (flow_div_by_zero_handler(), (L) * 0))
#endif
#ifndef FLOW_CHECKED_MOD
#define FLOW_CHECKED_MOD(L, R) (((R) != 0) ? ((L) % (R)) : (flow_div_by_zero_handler(), (L) * 0))
#endif
#ifndef FLOW_CHECKED_SHL
#define FLOW_CHECKED_SHL(L, R) ((((R) >= 0) && ((unsigned long long)(R) < (sizeof(L) * 8ull)) && ((L) >= 0)) ? ((L) << (R)) : (flow_shift_ub_handler(), (L) * 0))
#endif
#ifndef FLOW_CHECKED_SHR
#define FLOW_CHECKED_SHR(L, R) ((((R) >= 0) && ((unsigned long long)(R) < (sizeof(L) * 8ull))) ? ((L) >> (R)) : (flow_shift_ub_handler(), (L) * 0))
#endif

#include <math.h>

void* _ui_state = NULL;

static inline float i32_to_f32(int32_t v) { return (float)v; }

/* Host stub for @gpu kernels (device codegen replaces this). */
static inline int32_t gpu_thread_id(void) { return 0; }

int32_t main(void);

static const int64_t PERIOD_START = 514;
static const int64_t PERIOD = 71;
static const int64_t OFFSET = 60000;
static const int64_t ARR_SIZE = 120001;




int32_t main(void) {
    int8_t* bananas = (int8_t*)(calloc(ARR_SIZE, 1));
    memset(bananas, 0, ARR_SIZE);
    int64_t limit = (PERIOD_START + PERIOD);
    int64_t* bb = (int64_t*)(calloc(586, 8));
    bb[0] = 0;
    int64_t pos = 0;
    int64_t carry = 0;
    int64_t n = 1;
    while (n <= limit) {
        carry = (carry + 1);
        bool stepped = 1;
        while (stepped) {
            stepped = 0;
            int64_t p = pos;
            int8_t hx = bananas[(p + OFFSET)];
            int8_t hx1 = bananas[((p + 1) + OFFSET)];
            if ((hx != 0 && hx1 != 0)) {
                bananas[((p + 1) + OFFSET)] = 0;
                pos = (p - 1);
                carry = (carry + 1);
                stepped = 1;
            } else {
                if ((hx != 0 && hx1 == 0)) {
                    bananas[(p + OFFSET)] = 0;
                    pos = (p + 2);
                    carry = (carry + 1);
                    stepped = 1;
                } else {
                    if ((hx == 0 && hx1 != 0)) {
                        bananas[((p + 1) + OFFSET)] = 0;
                        bananas[(p + OFFSET)] = 1;
                        pos = (p + 2);
                        stepped = 1;
                    } else {
                        if (carry >= 3) {
                            bananas[((p - 1) + OFFSET)] = 1;
                            bananas[(p + OFFSET)] = 1;
                            bananas[((p + 1) + OFFSET)] = 1;
                            pos = (p - 2);
                            carry = (carry - 3);
                            stepped = 1;
                        }
                    }
                }
            }
        }
        bb[n] = pos;
        n = (n + 1);
    }
    int64_t big_n = 1000000000000000000;
    int64_t result = 0;
    if (big_n <= PERIOD_START) {
        result = bb[big_n];
    } else {
        int64_t remaining = (big_n - PERIOD_START);
        int64_t whole_periods = FLOW_CHECKED_DIV((remaining), (PERIOD));
        int64_t tail = FLOW_CHECKED_MOD((remaining), (PERIOD));
        int32_t delta[71] = { 17, (-2), (-8), (-2), (-2), (-14), (-2), (-2), (-17), (-8), (-5), (-8), (-5), (-2), (-2), (-5), (-8), 50, (-8), 23, (-13), (-2), 67, (-5), (-2), (-2), (-5), (-8), (-5), 21, 29, (-11), (-2), (-2), 6, (-11), 31, (-2), (-11), 17, (-2), (-8), (-2), (-2), (-14), (-2), (-2), (-17), (-8), (-5), (-8), (-8), 8, (-13), (-5), (-2), (-2), (-5), (-2), (-11), (-8), (-8), (-5), (-2), (-11), (-8), (-8), (-5), (-2), (-11), 216 };
        int64_t pattern_sum = 0;
        int64_t i = 0;
        while (i < PERIOD) {
            pattern_sum = (pattern_sum + ((int64_t)((((unsigned)(i) < 71) ? delta[i] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(i), 71), flow_fault_handler("array index out of bounds"), delta[0])))));
            i = (i + 1);
        }
        int64_t tail_sum = 0;
        i = 0;
        while (i < tail) {
            tail_sum = (tail_sum + ((int64_t)((((unsigned)(i) < 71) ? delta[i] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(i), 71), flow_fault_handler("array index out of bounds"), delta[0])))));
            i = (i + 1);
        }
        result = ((bb[PERIOD_START] + (whole_periods * pattern_sum)) + tail_sum);
    }
    printf("%lld\n", result);
    free(bananas);
    free(bb);
    return 0;
}

Generated MLIR

module {
  llvm.func @printf(!llvm.ptr, ...) -> i32
  llvm.mlir.global internal constant @str_0("%lld\n\00") {addr_space = 0 : i32} : !llvm.array<6 x i8>
  func.func private @calloc(i64, i64) -> !llvm.ptr
  func.func private @free(!llvm.ptr) -> ()
  func.func private @memset(!llvm.ptr, i32, i64) -> !llvm.ptr
  // Constant: PERIOD_START
  llvm.mlir.global internal constant @PERIOD_START(514 : i64) : i64
  // Constant: PERIOD
  llvm.mlir.global internal constant @PERIOD(71 : i64) : i64
  // Constant: OFFSET
  llvm.mlir.global internal constant @OFFSET(60000 : i64) : i64
  // Constant: ARR_SIZE
  llvm.mlir.global internal constant @ARR_SIZE(120001 : i64) : i64
  func.func @main() -> i32 {
    %1 = llvm.mlir.addressof @ARR_SIZE : !llvm.ptr
    %2 = llvm.load %1 : !llvm.ptr -> i64
    %3 = arith.constant 1 : i32
    %4 = arith.extsi %3 : i32 to i64
    %0 = func.call @calloc(%2, %4) : (i64, i64) -> !llvm.ptr
    %6 = arith.constant 0 : i32
    %7 = llvm.mlir.addressof @ARR_SIZE : !llvm.ptr
    %8 = llvm.load %7 : !llvm.ptr -> i64
    %5 = func.call @memset(%0, %6, %8) : (!llvm.ptr, i32, i64) -> !llvm.ptr
    %9 = llvm.mlir.addressof @PERIOD_START : !llvm.ptr
    %10 = llvm.load %9 : !llvm.ptr -> i64
    %11 = llvm.mlir.addressof @PERIOD : !llvm.ptr
    %12 = llvm.load %11 : !llvm.ptr -> i64
    %13 = arith.addi %10, %12 : i64
    %15 = arith.constant 586 : i32
    %16 = arith.constant 8 : i32
    %17 = arith.extsi %15 : i32 to i64
    %18 = arith.extsi %16 : i32 to i64
    %14 = func.call @calloc(%17, %18) : (i64, i64) -> !llvm.ptr
    %19 = arith.constant 0 : i32
    %20 = arith.constant 0 : i32
    %21 = arith.extsi %19 : i32 to i64
    %22 = arith.extsi %20 : i32 to i64
    %23 = llvm.getelementptr %14[%22] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %21, %23 : i64, !llvm.ptr
    %24 = arith.constant 0 : i32
    %25 = arith.extsi %24 : i32 to i64
    %26 = llvm.mlir.constant(1 : i64) : i64
    %27 = llvm.alloca %26 x i64 : (i64) -> !llvm.ptr
    llvm.store %25, %27 : i64, !llvm.ptr
    %28 = arith.constant 0 : i32
    %29 = arith.extsi %28 : i32 to i64
    %30 = llvm.mlir.constant(1 : i64) : i64
    %31 = llvm.alloca %30 x i64 : (i64) -> !llvm.ptr
    llvm.store %29, %31 : i64, !llvm.ptr
    %32 = arith.constant 1 : i32
    %33 = arith.extsi %32 : i32 to i64
    %34 = llvm.mlir.constant(1 : i64) : i64
    %35 = llvm.alloca %34 x i64 : (i64) -> !llvm.ptr
    llvm.store %33, %35 : i64, !llvm.ptr
    cf.br ^bb0
    ^bb0:
    %36 = llvm.load %35 : !llvm.ptr -> i64
    %37 = arith.cmpi sle, %36, %13 : i64
    cf.cond_br %37, ^bb1, ^bb2
    ^bb1:
      %38 = llvm.load %31 : !llvm.ptr -> i64
      %39 = arith.constant 1 : i32
      %41 = arith.extsi %39 : i32 to i64
      %40 = arith.addi %38, %41 : i64
      llvm.store %40, %31 : i64, !llvm.ptr
      %42 = arith.constant 1 : i1
      %43 = llvm.mlir.constant(1 : i64) : i64
      %44 = llvm.alloca %43 x i1 : (i64) -> !llvm.ptr
      llvm.store %42, %44 : i1, !llvm.ptr
      cf.br ^bb3
      ^bb3:
      %45 = llvm.load %44 : !llvm.ptr -> i1
      cf.cond_br %45, ^bb4, ^bb5
      ^bb4:
        %46 = arith.constant 0 : i1
        llvm.store %46, %44 : i1, !llvm.ptr
        %47 = llvm.load %27 : !llvm.ptr -> i64
        %49 = llvm.mlir.addressof @OFFSET : !llvm.ptr
        %50 = llvm.load %49 : !llvm.ptr -> i64
        %51 = arith.addi %47, %50 : i64
        %52 = llvm.getelementptr %0[%51] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        %48 = llvm.load %52 : !llvm.ptr -> i8
        %54 = arith.constant 1 : i32
        %56 = arith.extsi %54 : i32 to i64
        %55 = arith.addi %47, %56 : i64
        %57 = llvm.mlir.addressof @OFFSET : !llvm.ptr
        %58 = llvm.load %57 : !llvm.ptr -> i64
        %59 = arith.addi %55, %58 : i64
        %60 = llvm.getelementptr %0[%59] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        %53 = llvm.load %60 : !llvm.ptr -> i8
        %61 = arith.constant 0 : i32
        %63 = arith.extsi %48 : i8 to i32
        %62 = arith.cmpi ne, %63, %61 : i32
        %64 = scf.if %62 -> (i1) {
          %65 = arith.constant 0 : i32
          %67 = arith.extsi %53 : i8 to i32
          %66 = arith.cmpi ne, %67, %65 : i32
          scf.yield %66 : i1
        } else {
          %68 = arith.constant false
          scf.yield %68 : i1
        }
        cf.cond_br %64, ^bb6, ^bb7
        ^bb6:
          %69 = arith.constant 0 : i32
          %70 = arith.constant 1 : i32
          %72 = arith.extsi %70 : i32 to i64
          %71 = arith.addi %47, %72 : i64
          %73 = llvm.mlir.addressof @OFFSET : !llvm.ptr
          %74 = llvm.load %73 : !llvm.ptr -> i64
          %75 = arith.addi %71, %74 : i64
          %76 = arith.trunci %69 : i32 to i8
          %77 = llvm.getelementptr %0[%75] : (!llvm.ptr, i64) -> !llvm.ptr, i8
          llvm.store %76, %77 : i8, !llvm.ptr
          %78 = arith.constant 1 : i32
          %80 = arith.extsi %78 : i32 to i64
          %79 = arith.subi %47, %80 : i64
          llvm.store %79, %27 : i64, !llvm.ptr
          %81 = llvm.load %31 : !llvm.ptr -> i64
          %82 = arith.constant 1 : i32
          %84 = arith.extsi %82 : i32 to i64
          %83 = arith.addi %81, %84 : i64
          llvm.store %83, %31 : i64, !llvm.ptr
          %85 = arith.constant 1 : i1
          llvm.store %85, %44 : i1, !llvm.ptr
          cf.br ^bb8
        ^bb7:
          %86 = arith.constant 0 : i32
          %88 = arith.extsi %48 : i8 to i32
          %87 = arith.cmpi ne, %88, %86 : i32
          %89 = scf.if %87 -> (i1) {
            %90 = arith.constant 0 : i32
            %92 = arith.extsi %53 : i8 to i32
            %91 = arith.cmpi eq, %92, %90 : i32
            scf.yield %91 : i1
          } else {
            %93 = arith.constant false
            scf.yield %93 : i1
          }
          cf.cond_br %89, ^bb9, ^bb10
          ^bb9:
            %94 = arith.constant 0 : i32
            %95 = llvm.mlir.addressof @OFFSET : !llvm.ptr
            %96 = llvm.load %95 : !llvm.ptr -> i64
            %97 = arith.addi %47, %96 : i64
            %98 = arith.trunci %94 : i32 to i8
            %99 = llvm.getelementptr %0[%97] : (!llvm.ptr, i64) -> !llvm.ptr, i8
            llvm.store %98, %99 : i8, !llvm.ptr
            %100 = arith.constant 2 : i32
            %102 = arith.extsi %100 : i32 to i64
            %101 = arith.addi %47, %102 : i64
            llvm.store %101, %27 : i64, !llvm.ptr
            %103 = llvm.load %31 : !llvm.ptr -> i64
            %104 = arith.constant 1 : i32
            %106 = arith.extsi %104 : i32 to i64
            %105 = arith.addi %103, %106 : i64
            llvm.store %105, %31 : i64, !llvm.ptr
            %107 = arith.constant 1 : i1
            llvm.store %107, %44 : i1, !llvm.ptr
            cf.br ^bb11
          ^bb10:
            %108 = arith.constant 0 : i32
            %110 = arith.extsi %48 : i8 to i32
            %109 = arith.cmpi eq, %110, %108 : i32
            %111 = scf.if %109 -> (i1) {
              %112 = arith.constant 0 : i32
              %114 = arith.extsi %53 : i8 to i32
              %113 = arith.cmpi ne, %114, %112 : i32
              scf.yield %113 : i1
            } else {
              %115 = arith.constant false
              scf.yield %115 : i1
            }
            cf.cond_br %111, ^bb12, ^bb13
            ^bb12:
              %116 = arith.constant 0 : i32
              %117 = arith.constant 1 : i32
              %119 = arith.extsi %117 : i32 to i64
              %118 = arith.addi %47, %119 : i64
              %120 = llvm.mlir.addressof @OFFSET : !llvm.ptr
              %121 = llvm.load %120 : !llvm.ptr -> i64
              %122 = arith.addi %118, %121 : i64
              %123 = arith.trunci %116 : i32 to i8
              %124 = llvm.getelementptr %0[%122] : (!llvm.ptr, i64) -> !llvm.ptr, i8
              llvm.store %123, %124 : i8, !llvm.ptr
              %125 = arith.constant 1 : i32
              %126 = llvm.mlir.addressof @OFFSET : !llvm.ptr
              %127 = llvm.load %126 : !llvm.ptr -> i64
              %128 = arith.addi %47, %127 : i64
              %129 = arith.trunci %125 : i32 to i8
              %130 = llvm.getelementptr %0[%128] : (!llvm.ptr, i64) -> !llvm.ptr, i8
              llvm.store %129, %130 : i8, !llvm.ptr
              %131 = arith.constant 2 : i32
              %133 = arith.extsi %131 : i32 to i64
              %132 = arith.addi %47, %133 : i64
              llvm.store %132, %27 : i64, !llvm.ptr
              %134 = arith.constant 1 : i1
              llvm.store %134, %44 : i1, !llvm.ptr
              cf.br ^bb14
            ^bb13:
              %135 = llvm.load %31 : !llvm.ptr -> i64
              %136 = arith.constant 3 : i32
              %138 = arith.extsi %136 : i32 to i64
              %137 = arith.cmpi sge, %135, %138 : i64
              cf.cond_br %137, ^bb15, ^bb16
              ^bb15:
                %139 = arith.constant 1 : i32
                %140 = arith.constant 1 : i32
                %142 = arith.extsi %140 : i32 to i64
                %141 = arith.subi %47, %142 : i64
                %143 = llvm.mlir.addressof @OFFSET : !llvm.ptr
                %144 = llvm.load %143 : !llvm.ptr -> i64
                %145 = arith.addi %141, %144 : i64
                %146 = arith.trunci %139 : i32 to i8
                %147 = llvm.getelementptr %0[%145] : (!llvm.ptr, i64) -> !llvm.ptr, i8
                llvm.store %146, %147 : i8, !llvm.ptr
                %148 = arith.constant 1 : i32
                %149 = llvm.mlir.addressof @OFFSET : !llvm.ptr
                %150 = llvm.load %149 : !llvm.ptr -> i64
                %151 = arith.addi %47, %150 : i64
                %152 = arith.trunci %148 : i32 to i8
                %153 = llvm.getelementptr %0[%151] : (!llvm.ptr, i64) -> !llvm.ptr, i8
                llvm.store %152, %153 : i8, !llvm.ptr
                %154 = arith.constant 1 : i32
                %155 = arith.constant 1 : i32
                %157 = arith.extsi %155 : i32 to i64
                %156 = arith.addi %47, %157 : i64
                %158 = llvm.mlir.addressof @OFFSET : !llvm.ptr
                %159 = llvm.load %158 : !llvm.ptr -> i64
                %160 = arith.addi %156, %159 : i64
                %161 = arith.trunci %154 : i32 to i8
                %162 = llvm.getelementptr %0[%160] : (!llvm.ptr, i64) -> !llvm.ptr, i8
                llvm.store %161, %162 : i8, !llvm.ptr
                %163 = arith.constant 2 : i32
                %165 = arith.extsi %163 : i32 to i64
                %164 = arith.subi %47, %165 : i64
                llvm.store %164, %27 : i64, !llvm.ptr
                %166 = llvm.load %31 : !llvm.ptr -> i64
                %167 = arith.constant 3 : i32
                %169 = arith.extsi %167 : i32 to i64
                %168 = arith.subi %166, %169 : i64
                llvm.store %168, %31 : i64, !llvm.ptr
                %170 = arith.constant 1 : i1
                llvm.store %170, %44 : i1, !llvm.ptr
                cf.br ^bb17
              ^bb16:
                cf.br ^bb17
              ^bb17:
              cf.br ^bb14
            ^bb14:
            cf.br ^bb11
          ^bb11:
          cf.br ^bb8
        ^bb8:
        cf.br ^bb3
      ^bb5:
      %171 = llvm.load %27 : !llvm.ptr -> i64
      %172 = llvm.load %35 : !llvm.ptr -> i64
      %173 = llvm.getelementptr %14[%172] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %171, %173 : i64, !llvm.ptr
      %174 = llvm.load %35 : !llvm.ptr -> i64
      %175 = arith.constant 1 : i32
      %177 = arith.extsi %175 : i32 to i64
      %176 = arith.addi %174, %177 : i64
      llvm.store %176, %35 : i64, !llvm.ptr
      cf.br ^bb0
    ^bb2:
    %178 = arith.constant 999999995705032704 : i32
    %179 = arith.extsi %178 : i32 to i64
    %180 = arith.constant 0 : i32
    %181 = arith.extsi %180 : i32 to i64
    %182 = llvm.mlir.constant(1 : i64) : i64
    %183 = llvm.alloca %182 x i64 : (i64) -> !llvm.ptr
    llvm.store %181, %183 : i64, !llvm.ptr
    %184 = llvm.mlir.addressof @PERIOD_START : !llvm.ptr
    %185 = llvm.load %184 : !llvm.ptr -> i64
    %186 = arith.cmpi sle, %179, %185 : i64
    cf.cond_br %186, ^bb18, ^bb19
    ^bb18:
      %188 = llvm.getelementptr %14[%179] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %187 = llvm.load %188 : !llvm.ptr -> i64
      llvm.store %187, %183 : i64, !llvm.ptr
      cf.br ^bb20
    ^bb19:
      %189 = llvm.mlir.addressof @PERIOD_START : !llvm.ptr
      %190 = llvm.load %189 : !llvm.ptr -> i64
      %191 = arith.subi %179, %190 : i64
      %192 = llvm.mlir.addressof @PERIOD : !llvm.ptr
      %193 = llvm.load %192 : !llvm.ptr -> i64
      %194 = arith.divsi %191, %193 : i64
      %195 = llvm.mlir.addressof @PERIOD : !llvm.ptr
      %196 = llvm.load %195 : !llvm.ptr -> i64
      %197 = arith.remsi %191, %196 : i64
      %199 = arith.constant 17 : i32
      %200 = arith.constant 2 : i32
      %202 = arith.constant 0 : i32
      %201 = arith.subi %202, %200 : i32
      %203 = arith.constant 8 : i32
      %205 = arith.constant 0 : i32
      %204 = arith.subi %205, %203 : i32
      %206 = arith.constant 2 : i32
      %208 = arith.constant 0 : i32
      %207 = arith.subi %208, %206 : i32
      %209 = arith.constant 2 : i32
      %211 = arith.constant 0 : i32
      %210 = arith.subi %211, %209 : i32
      %212 = arith.constant 14 : i32
      %214 = arith.constant 0 : i32
      %213 = arith.subi %214, %212 : i32
      %215 = arith.constant 2 : i32
      %217 = arith.constant 0 : i32
      %216 = arith.subi %217, %215 : i32
      %218 = arith.constant 2 : i32
      %220 = arith.constant 0 : i32
      %219 = arith.subi %220, %218 : i32
      %221 = arith.constant 17 : i32
      %223 = arith.constant 0 : i32
      %222 = arith.subi %223, %221 : i32
      %224 = arith.constant 8 : i32
      %226 = arith.constant 0 : i32
      %225 = arith.subi %226, %224 : i32
      %227 = arith.constant 5 : i32
      %229 = arith.constant 0 : i32
      %228 = arith.subi %229, %227 : i32
      %230 = arith.constant 8 : i32
      %232 = arith.constant 0 : i32
      %231 = arith.subi %232, %230 : i32
      %233 = arith.constant 5 : i32
      %235 = arith.constant 0 : i32
      %234 = arith.subi %235, %233 : i32
      %236 = arith.constant 2 : i32
      %238 = arith.constant 0 : i32
      %237 = arith.subi %238, %236 : i32
      %239 = arith.constant 2 : i32
      %241 = arith.constant 0 : i32
      %240 = arith.subi %241, %239 : i32
      %242 = arith.constant 5 : i32
      %244 = arith.constant 0 : i32
      %243 = arith.subi %244, %242 : i32
      %245 = arith.constant 8 : i32
      %247 = arith.constant 0 : i32
      %246 = arith.subi %247, %245 : i32
      %248 = arith.constant 50 : i32
      %249 = arith.constant 8 : i32
      %251 = arith.constant 0 : i32
      %250 = arith.subi %251, %249 : i32
      %252 = arith.constant 23 : i32
      %253 = arith.constant 13 : i32
      %255 = arith.constant 0 : i32
      %254 = arith.subi %255, %253 : i32
      %256 = arith.constant 2 : i32
      %258 = arith.constant 0 : i32
      %257 = arith.subi %258, %256 : i32
      %259 = arith.constant 67 : i32
      %260 = arith.constant 5 : i32
      %262 = arith.constant 0 : i32
      %261 = arith.subi %262, %260 : i32
      %263 = arith.constant 2 : i32
      %265 = arith.constant 0 : i32
      %264 = arith.subi %265, %263 : i32
      %266 = arith.constant 2 : i32
      %268 = arith.constant 0 : i32
      %267 = arith.subi %268, %266 : i32
      %269 = arith.constant 5 : i32
      %271 = arith.constant 0 : i32
      %270 = arith.subi %271, %269 : i32
      %272 = arith.constant 8 : i32
      %274 = arith.constant 0 : i32
      %273 = arith.subi %274, %272 : i32
      %275 = arith.constant 5 : i32
      %277 = arith.constant 0 : i32
      %276 = arith.subi %277, %275 : i32
      %278 = arith.constant 21 : i32
      %279 = arith.constant 29 : i32
      %280 = arith.constant 11 : i32
      %282 = arith.constant 0 : i32
      %281 = arith.subi %282, %280 : i32
      %283 = arith.constant 2 : i32
      %285 = arith.constant 0 : i32
      %284 = arith.subi %285, %283 : i32
      %286 = arith.constant 2 : i32
      %288 = arith.constant 0 : i32
      %287 = arith.subi %288, %286 : i32
      %289 = arith.constant 6 : i32
      %290 = arith.constant 11 : i32
      %292 = arith.constant 0 : i32
      %291 = arith.subi %292, %290 : i32
      %293 = arith.constant 31 : i32
      %294 = arith.constant 2 : i32
      %296 = arith.constant 0 : i32
      %295 = arith.subi %296, %294 : i32
      %297 = arith.constant 11 : i32
      %299 = arith.constant 0 : i32
      %298 = arith.subi %299, %297 : i32
      %300 = arith.constant 17 : i32
      %301 = arith.constant 2 : i32
      %303 = arith.constant 0 : i32
      %302 = arith.subi %303, %301 : i32
      %304 = arith.constant 8 : i32
      %306 = arith.constant 0 : i32
      %305 = arith.subi %306, %304 : i32
      %307 = arith.constant 2 : i32
      %309 = arith.constant 0 : i32
      %308 = arith.subi %309, %307 : i32
      %310 = arith.constant 2 : i32
      %312 = arith.constant 0 : i32
      %311 = arith.subi %312, %310 : i32
      %313 = arith.constant 14 : i32
      %315 = arith.constant 0 : i32
      %314 = arith.subi %315, %313 : i32
      %316 = arith.constant 2 : i32
      %318 = arith.constant 0 : i32
      %317 = arith.subi %318, %316 : i32
      %319 = arith.constant 2 : i32
      %321 = arith.constant 0 : i32
      %320 = arith.subi %321, %319 : i32
      %322 = arith.constant 17 : i32
      %324 = arith.constant 0 : i32
      %323 = arith.subi %324, %322 : i32
      %325 = arith.constant 8 : i32
      %327 = arith.constant 0 : i32
      %326 = arith.subi %327, %325 : i32
      %328 = arith.constant 5 : i32
      %330 = arith.constant 0 : i32
      %329 = arith.subi %330, %328 : i32
      %331 = arith.constant 8 : i32
      %333 = arith.constant 0 : i32
      %332 = arith.subi %333, %331 : i32
      %334 = arith.constant 8 : i32
      %336 = arith.constant 0 : i32
      %335 = arith.subi %336, %334 : i32
      %337 = arith.constant 8 : i32
      %338 = arith.constant 13 : i32
      %340 = arith.constant 0 : i32
      %339 = arith.subi %340, %338 : i32
      %341 = arith.constant 5 : i32
      %343 = arith.constant 0 : i32
      %342 = arith.subi %343, %341 : i32
      %344 = arith.constant 2 : i32
      %346 = arith.constant 0 : i32
      %345 = arith.subi %346, %344 : i32
      %347 = arith.constant 2 : i32
      %349 = arith.constant 0 : i32
      %348 = arith.subi %349, %347 : i32
      %350 = arith.constant 5 : i32
      %352 = arith.constant 0 : i32
      %351 = arith.subi %352, %350 : i32
      %353 = arith.constant 2 : i32
      %355 = arith.constant 0 : i32
      %354 = arith.subi %355, %353 : i32
      %356 = arith.constant 11 : i32
      %358 = arith.constant 0 : i32
      %357 = arith.subi %358, %356 : i32
      %359 = arith.constant 8 : i32
      %361 = arith.constant 0 : i32
      %360 = arith.subi %361, %359 : i32
      %362 = arith.constant 8 : i32
      %364 = arith.constant 0 : i32
      %363 = arith.subi %364, %362 : i32
      %365 = arith.constant 5 : i32
      %367 = arith.constant 0 : i32
      %366 = arith.subi %367, %365 : i32
      %368 = arith.constant 2 : i32
      %370 = arith.constant 0 : i32
      %369 = arith.subi %370, %368 : i32
      %371 = arith.constant 11 : i32
      %373 = arith.constant 0 : i32
      %372 = arith.subi %373, %371 : i32
      %374 = arith.constant 8 : i32
      %376 = arith.constant 0 : i32
      %375 = arith.subi %376, %374 : i32
      %377 = arith.constant 8 : i32
      %379 = arith.constant 0 : i32
      %378 = arith.subi %379, %377 : i32
      %380 = arith.constant 5 : i32
      %382 = arith.constant 0 : i32
      %381 = arith.subi %382, %380 : i32
      %383 = arith.constant 2 : i32
      %385 = arith.constant 0 : i32
      %384 = arith.subi %385, %383 : i32
      %386 = arith.constant 11 : i32
      %388 = arith.constant 0 : i32
      %387 = arith.subi %388, %386 : i32
      %389 = arith.constant 216 : i32
      %390 = llvm.mlir.constant(1 : i64) : i64
      %391 = llvm.alloca %390 x !llvm.array<71 x i32> : (i64) -> !llvm.ptr
      %392 = llvm.mlir.zero : !llvm.array<71 x i32>
      llvm.store %392, %391 : !llvm.array<71 x i32>, !llvm.ptr
      %393 = llvm.mlir.constant(0 : i64) : i64
      %394 = llvm.getelementptr %391[0, %393] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %199, %394 : i32, !llvm.ptr
      %395 = llvm.mlir.constant(1 : i64) : i64
      %396 = llvm.getelementptr %391[0, %395] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %201, %396 : i32, !llvm.ptr
      %397 = llvm.mlir.constant(2 : i64) : i64
      %398 = llvm.getelementptr %391[0, %397] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %204, %398 : i32, !llvm.ptr
      %399 = llvm.mlir.constant(3 : i64) : i64
      %400 = llvm.getelementptr %391[0, %399] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %207, %400 : i32, !llvm.ptr
      %401 = llvm.mlir.constant(4 : i64) : i64
      %402 = llvm.getelementptr %391[0, %401] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %210, %402 : i32, !llvm.ptr
      %403 = llvm.mlir.constant(5 : i64) : i64
      %404 = llvm.getelementptr %391[0, %403] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %213, %404 : i32, !llvm.ptr
      %405 = llvm.mlir.constant(6 : i64) : i64
      %406 = llvm.getelementptr %391[0, %405] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %216, %406 : i32, !llvm.ptr
      %407 = llvm.mlir.constant(7 : i64) : i64
      %408 = llvm.getelementptr %391[0, %407] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %219, %408 : i32, !llvm.ptr
      %409 = llvm.mlir.constant(8 : i64) : i64
      %410 = llvm.getelementptr %391[0, %409] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %222, %410 : i32, !llvm.ptr
      %411 = llvm.mlir.constant(9 : i64) : i64
      %412 = llvm.getelementptr %391[0, %411] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %225, %412 : i32, !llvm.ptr
      %413 = llvm.mlir.constant(10 : i64) : i64
      %414 = llvm.getelementptr %391[0, %413] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %228, %414 : i32, !llvm.ptr
      %415 = llvm.mlir.constant(11 : i64) : i64
      %416 = llvm.getelementptr %391[0, %415] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %231, %416 : i32, !llvm.ptr
      %417 = llvm.mlir.constant(12 : i64) : i64
      %418 = llvm.getelementptr %391[0, %417] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %234, %418 : i32, !llvm.ptr
      %419 = llvm.mlir.constant(13 : i64) : i64
      %420 = llvm.getelementptr %391[0, %419] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %237, %420 : i32, !llvm.ptr
      %421 = llvm.mlir.constant(14 : i64) : i64
      %422 = llvm.getelementptr %391[0, %421] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %240, %422 : i32, !llvm.ptr
      %423 = llvm.mlir.constant(15 : i64) : i64
      %424 = llvm.getelementptr %391[0, %423] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %243, %424 : i32, !llvm.ptr
      %425 = llvm.mlir.constant(16 : i64) : i64
      %426 = llvm.getelementptr %391[0, %425] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %246, %426 : i32, !llvm.ptr
      %427 = llvm.mlir.constant(17 : i64) : i64
      %428 = llvm.getelementptr %391[0, %427] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %248, %428 : i32, !llvm.ptr
      %429 = llvm.mlir.constant(18 : i64) : i64
      %430 = llvm.getelementptr %391[0, %429] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %250, %430 : i32, !llvm.ptr
      %431 = llvm.mlir.constant(19 : i64) : i64
      %432 = llvm.getelementptr %391[0, %431] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %252, %432 : i32, !llvm.ptr
      %433 = llvm.mlir.constant(20 : i64) : i64
      %434 = llvm.getelementptr %391[0, %433] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %254, %434 : i32, !llvm.ptr
      %435 = llvm.mlir.constant(21 : i64) : i64
      %436 = llvm.getelementptr %391[0, %435] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %257, %436 : i32, !llvm.ptr
      %437 = llvm.mlir.constant(22 : i64) : i64
      %438 = llvm.getelementptr %391[0, %437] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %259, %438 : i32, !llvm.ptr
      %439 = llvm.mlir.constant(23 : i64) : i64
      %440 = llvm.getelementptr %391[0, %439] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %261, %440 : i32, !llvm.ptr
      %441 = llvm.mlir.constant(24 : i64) : i64
      %442 = llvm.getelementptr %391[0, %441] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %264, %442 : i32, !llvm.ptr
      %443 = llvm.mlir.constant(25 : i64) : i64
      %444 = llvm.getelementptr %391[0, %443] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %267, %444 : i32, !llvm.ptr
      %445 = llvm.mlir.constant(26 : i64) : i64
      %446 = llvm.getelementptr %391[0, %445] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %270, %446 : i32, !llvm.ptr
      %447 = llvm.mlir.constant(27 : i64) : i64
      %448 = llvm.getelementptr %391[0, %447] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %273, %448 : i32, !llvm.ptr
      %449 = llvm.mlir.constant(28 : i64) : i64
      %450 = llvm.getelementptr %391[0, %449] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %276, %450 : i32, !llvm.ptr
      %451 = llvm.mlir.constant(29 : i64) : i64
      %452 = llvm.getelementptr %391[0, %451] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %278, %452 : i32, !llvm.ptr
      %453 = llvm.mlir.constant(30 : i64) : i64
      %454 = llvm.getelementptr %391[0, %453] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %279, %454 : i32, !llvm.ptr
      %455 = llvm.mlir.constant(31 : i64) : i64
      %456 = llvm.getelementptr %391[0, %455] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %281, %456 : i32, !llvm.ptr
      %457 = llvm.mlir.constant(32 : i64) : i64
      %458 = llvm.getelementptr %391[0, %457] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %284, %458 : i32, !llvm.ptr
      %459 = llvm.mlir.constant(33 : i64) : i64
      %460 = llvm.getelementptr %391[0, %459] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %287, %460 : i32, !llvm.ptr
      %461 = llvm.mlir.constant(34 : i64) : i64
      %462 = llvm.getelementptr %391[0, %461] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %289, %462 : i32, !llvm.ptr
      %463 = llvm.mlir.constant(35 : i64) : i64
      %464 = llvm.getelementptr %391[0, %463] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %291, %464 : i32, !llvm.ptr
      %465 = llvm.mlir.constant(36 : i64) : i64
      %466 = llvm.getelementptr %391[0, %465] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %293, %466 : i32, !llvm.ptr
      %467 = llvm.mlir.constant(37 : i64) : i64
      %468 = llvm.getelementptr %391[0, %467] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %295, %468 : i32, !llvm.ptr
      %469 = llvm.mlir.constant(38 : i64) : i64
      %470 = llvm.getelementptr %391[0, %469] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %298, %470 : i32, !llvm.ptr
      %471 = llvm.mlir.constant(39 : i64) : i64
      %472 = llvm.getelementptr %391[0, %471] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %300, %472 : i32, !llvm.ptr
      %473 = llvm.mlir.constant(40 : i64) : i64
      %474 = llvm.getelementptr %391[0, %473] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %302, %474 : i32, !llvm.ptr
      %475 = llvm.mlir.constant(41 : i64) : i64
      %476 = llvm.getelementptr %391[0, %475] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %305, %476 : i32, !llvm.ptr
      %477 = llvm.mlir.constant(42 : i64) : i64
      %478 = llvm.getelementptr %391[0, %477] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %308, %478 : i32, !llvm.ptr
      %479 = llvm.mlir.constant(43 : i64) : i64
      %480 = llvm.getelementptr %391[0, %479] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %311, %480 : i32, !llvm.ptr
      %481 = llvm.mlir.constant(44 : i64) : i64
      %482 = llvm.getelementptr %391[0, %481] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %314, %482 : i32, !llvm.ptr
      %483 = llvm.mlir.constant(45 : i64) : i64
      %484 = llvm.getelementptr %391[0, %483] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %317, %484 : i32, !llvm.ptr
      %485 = llvm.mlir.constant(46 : i64) : i64
      %486 = llvm.getelementptr %391[0, %485] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %320, %486 : i32, !llvm.ptr
      %487 = llvm.mlir.constant(47 : i64) : i64
      %488 = llvm.getelementptr %391[0, %487] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %323, %488 : i32, !llvm.ptr
      %489 = llvm.mlir.constant(48 : i64) : i64
      %490 = llvm.getelementptr %391[0, %489] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %326, %490 : i32, !llvm.ptr
      %491 = llvm.mlir.constant(49 : i64) : i64
      %492 = llvm.getelementptr %391[0, %491] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %329, %492 : i32, !llvm.ptr
      %493 = llvm.mlir.constant(50 : i64) : i64
      %494 = llvm.getelementptr %391[0, %493] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %332, %494 : i32, !llvm.ptr
      %495 = llvm.mlir.constant(51 : i64) : i64
      %496 = llvm.getelementptr %391[0, %495] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %335, %496 : i32, !llvm.ptr
      %497 = llvm.mlir.constant(52 : i64) : i64
      %498 = llvm.getelementptr %391[0, %497] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %337, %498 : i32, !llvm.ptr
      %499 = llvm.mlir.constant(53 : i64) : i64
      %500 = llvm.getelementptr %391[0, %499] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %339, %500 : i32, !llvm.ptr
      %501 = llvm.mlir.constant(54 : i64) : i64
      %502 = llvm.getelementptr %391[0, %501] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %342, %502 : i32, !llvm.ptr
      %503 = llvm.mlir.constant(55 : i64) : i64
      %504 = llvm.getelementptr %391[0, %503] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %345, %504 : i32, !llvm.ptr
      %505 = llvm.mlir.constant(56 : i64) : i64
      %506 = llvm.getelementptr %391[0, %505] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %348, %506 : i32, !llvm.ptr
      %507 = llvm.mlir.constant(57 : i64) : i64
      %508 = llvm.getelementptr %391[0, %507] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %351, %508 : i32, !llvm.ptr
      %509 = llvm.mlir.constant(58 : i64) : i64
      %510 = llvm.getelementptr %391[0, %509] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %354, %510 : i32, !llvm.ptr
      %511 = llvm.mlir.constant(59 : i64) : i64
      %512 = llvm.getelementptr %391[0, %511] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %357, %512 : i32, !llvm.ptr
      %513 = llvm.mlir.constant(60 : i64) : i64
      %514 = llvm.getelementptr %391[0, %513] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %360, %514 : i32, !llvm.ptr
      %515 = llvm.mlir.constant(61 : i64) : i64
      %516 = llvm.getelementptr %391[0, %515] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %363, %516 : i32, !llvm.ptr
      %517 = llvm.mlir.constant(62 : i64) : i64
      %518 = llvm.getelementptr %391[0, %517] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %366, %518 : i32, !llvm.ptr
      %519 = llvm.mlir.constant(63 : i64) : i64
      %520 = llvm.getelementptr %391[0, %519] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %369, %520 : i32, !llvm.ptr
      %521 = llvm.mlir.constant(64 : i64) : i64
      %522 = llvm.getelementptr %391[0, %521] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %372, %522 : i32, !llvm.ptr
      %523 = llvm.mlir.constant(65 : i64) : i64
      %524 = llvm.getelementptr %391[0, %523] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %375, %524 : i32, !llvm.ptr
      %525 = llvm.mlir.constant(66 : i64) : i64
      %526 = llvm.getelementptr %391[0, %525] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %378, %526 : i32, !llvm.ptr
      %527 = llvm.mlir.constant(67 : i64) : i64
      %528 = llvm.getelementptr %391[0, %527] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %381, %528 : i32, !llvm.ptr
      %529 = llvm.mlir.constant(68 : i64) : i64
      %530 = llvm.getelementptr %391[0, %529] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %384, %530 : i32, !llvm.ptr
      %531 = llvm.mlir.constant(69 : i64) : i64
      %532 = llvm.getelementptr %391[0, %531] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %387, %532 : i32, !llvm.ptr
      %533 = llvm.mlir.constant(70 : i64) : i64
      %534 = llvm.getelementptr %391[0, %533] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
      llvm.store %389, %534 : i32, !llvm.ptr
      %535 = arith.constant 0 : i32
      %536 = arith.extsi %535 : i32 to i64
      %537 = llvm.mlir.constant(1 : i64) : i64
      %538 = llvm.alloca %537 x i64 : (i64) -> !llvm.ptr
      llvm.store %536, %538 : i64, !llvm.ptr
      %539 = arith.constant 0 : i32
      %540 = arith.extsi %539 : i32 to i64
      %541 = llvm.mlir.constant(1 : i64) : i64
      %542 = llvm.alloca %541 x i64 : (i64) -> !llvm.ptr
      llvm.store %540, %542 : i64, !llvm.ptr
      cf.br ^bb21
      ^bb21:
      %543 = llvm.load %542 : !llvm.ptr -> i64
      %544 = llvm.mlir.addressof @PERIOD : !llvm.ptr
      %545 = llvm.load %544 : !llvm.ptr -> i64
      %546 = arith.cmpi slt, %543, %545 : i64
      cf.cond_br %546, ^bb22, ^bb23
      ^bb22:
        %547 = llvm.load %538 : !llvm.ptr -> i64
        %549 = llvm.load %542 : !llvm.ptr -> i64
        %550 = llvm.getelementptr %391[0, %549] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
        %548 = llvm.load %550 : !llvm.ptr -> i32
        %551 = arith.extsi %548 : i32 to i64
        %552 = arith.addi %547, %551 : i64
        llvm.store %552, %538 : i64, !llvm.ptr
        %553 = llvm.load %542 : !llvm.ptr -> i64
        %554 = arith.constant 1 : i32
        %556 = arith.extsi %554 : i32 to i64
        %555 = arith.addi %553, %556 : i64
        llvm.store %555, %542 : i64, !llvm.ptr
        cf.br ^bb21
      ^bb23:
      %557 = arith.constant 0 : i32
      %558 = arith.extsi %557 : i32 to i64
      %559 = llvm.mlir.constant(1 : i64) : i64
      %560 = llvm.alloca %559 x i64 : (i64) -> !llvm.ptr
      llvm.store %558, %560 : i64, !llvm.ptr
      %561 = arith.constant 0 : i32
      %562 = arith.extsi %561 : i32 to i64
      llvm.store %562, %542 : i64, !llvm.ptr
      cf.br ^bb24
      ^bb24:
      %563 = llvm.load %542 : !llvm.ptr -> i64
      %564 = arith.cmpi slt, %563, %197 : i64
      cf.cond_br %564, ^bb25, ^bb26
      ^bb25:
        %565 = llvm.load %560 : !llvm.ptr -> i64
        %567 = llvm.load %542 : !llvm.ptr -> i64
        %568 = llvm.getelementptr %391[0, %567] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<71 x i32>
        %566 = llvm.load %568 : !llvm.ptr -> i32
        %569 = arith.extsi %566 : i32 to i64
        %570 = arith.addi %565, %569 : i64
        llvm.store %570, %560 : i64, !llvm.ptr
        %571 = llvm.load %542 : !llvm.ptr -> i64
        %572 = arith.constant 1 : i32
        %574 = arith.extsi %572 : i32 to i64
        %573 = arith.addi %571, %574 : i64
        llvm.store %573, %542 : i64, !llvm.ptr
        cf.br ^bb24
      ^bb26:
      %576 = llvm.mlir.addressof @PERIOD_START : !llvm.ptr
      %577 = llvm.load %576 : !llvm.ptr -> i64
      %578 = llvm.getelementptr %14[%577] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %575 = llvm.load %578 : !llvm.ptr -> i64
      %579 = llvm.load %538 : !llvm.ptr -> i64
      %580 = arith.muli %194, %579 : i64
      %581 = arith.addi %575, %580 : i64
      %582 = llvm.load %560 : !llvm.ptr -> i64
      %583 = arith.addi %581, %582 : i64
      llvm.store %583, %183 : i64, !llvm.ptr
      cf.br ^bb20
    ^bb20:
    %584 = llvm.mlir.addressof @str_0 : !llvm.ptr
    %585 = llvm.load %183 : !llvm.ptr -> i64
    %586 = llvm.call @printf(%584, %585) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i64) -> i32
    func.call @free(%0) : (!llvm.ptr) -> ()
    func.call @free(%14) : (!llvm.ptr) -> ()
    %589 = arith.constant 0 : i32
    func.return %589 : i32
  }
}