Problem 402

Last 9 digits of sum_{k=2..K} S(F_k), K=1234567890123.

Answer356019862
Output356019862
StatusPASS
Native helperno
Runtime0 ms
Peak memory1216 KB
Time complexityO(n^3) (estimated)
Space complexityO(n^2) (estimated)

Performance comparison

MetricOur solutionBest known
Time complexityO(n^3)O(n)
Space complexityO(n^2)O(n)
ApproachFlow solutionBig-integer arithmetic
VerdictSuboptimal

Flow source

# Project Euler 402
# Last 9 digits of sum_{k=2..K} S(F_k), K=1234567890123.

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

function mat_mul(a: ptr<i64>, b: ptr<i64>, out: ptr<i64>, n: i64, mod: i64) -> void {
    let mut i: i64 = 0
    while i < n {
        let mut j: i64 = 0
        while j < n {
            let mut total: i128 = 0
            let mut k: i64 = 0
            while k < n {
                total = total + (a[i * n + k] as i128) * (b[k * n + j] as i128)
                k = k + 1
            }
            out[i * n + j] = (total % (mod as i128)) as i64
            j = j + 1
        }
        i = i + 1
    }
}

function mat_vec(a: ptr<i64>, v: ptr<i64>, out: ptr<i64>, n: i64, mod: i64) -> void {
    let mut i: i64 = 0
    while i < n {
        let mut total: i128 = 0
        let mut j: i64 = 0
        while j < n {
            total = total + (a[i * n + j] as i128) * (v[j] as i128)
            j = j + 1
        }
        out[i] = (total % (mod as i128)) as i64
        i = i + 1
    }
}

function compute_S(n: i64) -> i64 {
    if n <= 0 { return 0 }
    let divs: ptr<i64> = calloc(8, 8)
    divs[0]=1; divs[1]=2; divs[2]=3; divs[3]=4; divs[4]=6; divs[5]=8; divs[6]=12; divs[7]=24
    let A: ptr<i64> = calloc(8, 8)
    let Bv: ptr<i64> = calloc(8, 8)
    let mut mi: i64 = 0
    while mi < 8 {
        let mm: i64 = divs[mi]
        let q: i64 = n / mm
        let rem: i64 = n % mm
        let counts: ptr<i64> = calloc(mm, 8)
        let mut r: i64 = 0
        while r < mm { counts[r] = q; r = r + 1 }
        r = 1
        while r <= rem { counts[r] = counts[r] + 1; r = r + 1 }
        let mut total: i64 = 0
        let mut a: i64 = 0
        while a < mm {
            let mut b: i64 = 0
            while b < mm {
                let mut c: i64 = 0
                while c < mm {
                    let p1: i64 = (1 + a + b + c) % mm
                    let p2: i64 = (16 + 8 * a + 4 * b + 2 * c) % mm
                    let p3: i64 = (81 + 27 * a + 9 * b + 3 * c) % mm
                    let p4: i64 = (256 + 64 * a + 16 * b + 4 * c) % mm
                    if p1 == 0 && p2 == 0 && p3 == 0 && p4 == 0 {
                        total = total + counts[a] * counts[b] * counts[c]
                    }
                    c = c + 1
                }
                b = b + 1
            }
            a = a + 1
        }
        A[mi] = total
        free(counts)
        mi = mi + 1
    }
    # B from large to small
    mi = 7
    while mi >= 0 {
        let mm: i64 = divs[mi]
        let mut total: i64 = A[mi]
        let mut ki: i64 = 0
        while ki < 8 {
            let kk: i64 = divs[ki]
            if kk > mm && kk % mm == 0 {
                total = total - Bv[ki]
            }
            ki = ki + 1
        }
        Bv[mi] = total
        mi = mi - 1
    }
    let mut ans: i64 = 0
    mi = 0
    while mi < 8 {
        ans = ans + divs[mi] * Bv[mi]
        mi = mi + 1
    }
    free(Bv)
    free(A)
    free(divs)
    return ans
}

function main() -> i32 {
    let MOD: i64 = 1000000000
    let KMAX: i64 = 1234567890123
    let mod_big: i64 = 24 * 24 * 24 * 6 * MOD

    # coeffs[r] = (d0,d1,d2,d3) for S(r+24t)
    let coeffs: ptr<i64> = calloc(24 * 4, 8)
    let mut r: i64 = 0
    while r < 24 {
        let mut t: i64 = 0
        let ys: ptr<i64> = calloc(4, 8)
        while t < 4 {
            ys[t] = compute_S(r + 24 * t)
            t = t + 1
        }
        let y0: i64 = ys[0]
        let y1: i64 = ys[1]
        let y2: i64 = ys[2]
        let y3: i64 = ys[3]
        coeffs[r * 4 + 0] = y0
        coeffs[r * 4 + 1] = y1 - y0
        coeffs[r * 4 + 2] = y2 - 2 * y1 + y0
        coeffs[r * 4 + 3] = y3 - 3 * y2 + 3 * y1 - y0
        free(ys)
        r = r + 1
    }

    let fib_big: ptr<i64> = calloc(50, 8)
    fib_big[0] = 0
    fib_big[1] = 1
    let mut i: i64 = 2
    while i < 50 {
        fib_big[i] = (fib_big[i - 1] + fib_big[i - 2]) % mod_big
        i = i + 1
    }
    let a: i64 = fib_big[25] % mod_big
    let b: i64 = fib_big[24] % mod_big
    let c: i64 = fib_big[24] % mod_big
    let d: i64 = fib_big[23] % mod_big

    # Build 14x14 aug matrix
    let N: i64 = 14
    let mono: ptr<i64> = calloc(10 * 10, 8)
    # fill mono as in python
    mono[0*10+0] = 1
    mono[1*10+1] = a
    mono[1*10+2] = b
    mono[2*10+1] = c
    mono[2*10+2] = d
    mono[3*10+3] = (a * a) % mod_big
    mono[3*10+4] = (2 * a * b) % mod_big
    mono[3*10+5] = (b * b) % mod_big
    mono[4*10+3] = (a * c) % mod_big
    mono[4*10+4] = (a * d + b * c) % mod_big
    mono[4*10+5] = (b * d) % mod_big
    mono[5*10+3] = (c * c) % mod_big
    mono[5*10+4] = (2 * c * d) % mod_big
    mono[5*10+5] = (d * d) % mod_big
    mono[6*10+6] = (a * a % mod_big * a) % mod_big
    mono[6*10+7] = (3 * a % mod_big * a % mod_big * b) % mod_big
    mono[6*10+8] = (3 * a % mod_big * b % mod_big * b) % mod_big
    mono[6*10+9] = (b * b % mod_big * b) % mod_big
    mono[7*10+6] = (a * a % mod_big * c) % mod_big
    mono[7*10+7] = (a * a % mod_big * d + 2 * a % mod_big * b % mod_big * c) % mod_big
    mono[7*10+8] = (2 * a % mod_big * b % mod_big * d + b * b % mod_big * c) % mod_big
    mono[7*10+9] = (b * b % mod_big * d) % mod_big
    mono[8*10+6] = (a * c % mod_big * c) % mod_big
    mono[8*10+7] = (2 * a % mod_big * c % mod_big * d + b * c % mod_big * c) % mod_big
    mono[8*10+8] = (a * d % mod_big * d + 2 * b % mod_big * c % mod_big * d) % mod_big
    mono[8*10+9] = (b * d % mod_big * d) % mod_big
    mono[9*10+6] = (c * c % mod_big * c) % mod_big
    mono[9*10+7] = (3 * c % mod_big * c % mod_big * d) % mod_big
    mono[9*10+8] = (3 * c % mod_big * d % mod_big * d) % mod_big
    mono[9*10+9] = (d * d % mod_big * d) % mod_big

    let aug: ptr<i64> = calloc(N * N, 8)
    let mut ii: i64 = 0
    let mut jj: i64 = 0
    while ii < 10 {
        jj = 0
        while jj < 10 {
            aug[ii * N + jj] = mono[ii * 10 + jj]
            jj = jj + 1
        }
        ii = ii + 1
    }
    aug[10 * N + 0] = 1
    aug[10 * N + 10] = 1
    jj = 0
    while jj < 10 {
        aug[11 * N + jj] = mono[2 * 10 + jj]
        aug[12 * N + jj] = mono[5 * 10 + jj]
        aug[13 * N + jj] = mono[9 * 10 + jj]
        jj = jj + 1
    }
    aug[11 * N + 11] = 1
    aug[12 * N + 12] = 1
    aug[13 * N + 13] = 1

    let max_bits: i64 = 50
    let powers: ptr<i64> = calloc(max_bits * N * N, 8)
    ii = 0
    while ii < N * N {
        powers[ii] = aug[ii]
        ii = ii + 1
    }
    let mut bit: i64 = 1
    let tmp: ptr<i64> = calloc(N * N, 8)
    while bit < max_bits {
        let mut src: i64 = (bit - 1) * N * N
        # copy blocks into temps
        let pa: ptr<i64> = calloc(N * N, 8)
        let pb: ptr<i64> = calloc(N * N, 8)
        ii = 0
        while ii < N * N {
            pa[ii] = powers[src + ii]
            pb[ii] = powers[src + ii]
            ii = ii + 1
        }
        mat_mul(pa, pb, tmp, N, mod_big)
        free(pa)
        free(pb)
        ii = 0
        while ii < N * N {
            powers[bit * N * N + ii] = tmp[ii]
            ii = ii + 1
        }
        bit = bit + 1
    }

    let fib_mod24: ptr<i64> = calloc(24, 8)
    fib_mod24[0] = 0
    fib_mod24[1] = 1
    i = 2
    while i < 24 {
        fib_mod24[i] = (fib_mod24[i - 1] + fib_mod24[i - 2]) % 24
        i = i + 1
    }

    let mod6: i64 = 6 * MOD
    let mod1: i64 = 24 * mod6
    let mod2: i64 = 24 * 24 * mod6
    let mod3: i64 = 24 * 24 * 24 * mod6

    let mut total: i64 = 0
    let mut s: i64 = 0
    let v: ptr<i64> = calloc(N, 8)
    let v2: ptr<i64> = calloc(N, 8)
    while s < 24 {
        let mut k0: i64 = s
        if k0 < 2 { k0 = s + 24 }
        if k0 <= KMAX {
            let n_terms: i64 = 1 + (KMAX - k0) / 24
            # subseq_sums
            let x: i64 = fib_big[k0 + 1]
            let y: i64 = fib_big[k0]
            let mut vi: i64 = 0
            while vi < N { v[vi] = 0; vi = vi + 1 }
            v[0] = 1
            v[1] = x
            v[2] = y
            v[3] = (x * x) % mod_big
            v[4] = (x * y) % mod_big
            v[5] = (y * y) % mod_big
            v[6] = (v[3] * x) % mod_big
            v[7] = (v[3] * y) % mod_big
            v[8] = (v[5] * x) % mod_big
            v[9] = (v[5] * y) % mod_big
            v[10] = 1
            v[11] = y
            v[12] = v[5]
            v[13] = v[9]
            let mut steps: i64 = n_terms - 1
            bit = 0
            while steps > 0 {
                if (steps & 1) == 1 {
                    let mut src2: i64 = bit * N * N
                    let pm: ptr<i64> = calloc(N * N, 8)
                    vi = 0
                    while vi < N * N {
                        pm[vi] = powers[src2 + vi]
                        vi = vi + 1
                    }
                    mat_vec(pm, v, v2, N, mod_big)
                    free(pm)
                    vi = 0
                    while vi < N { v[vi] = v2[vi]; vi = vi + 1 }
                }
                steps = steps >> 1
                bit = bit + 1
            }
            let sum0: i64 = v[10]
            let sum1: i64 = v[11]
            let sum2: i64 = v[12]
            let sum3: i64 = v[13]
            let rr: i64 = fib_mod24[s]

            let mut num1: i64 = (sum1 % mod1 - rr * (n_terms % mod1)) % mod1
            if num1 < 0 { num1 = num1 + mod1 }
            let sum_t: i64 = (num1 / 24) % mod6

            let sum1_m2: i64 = sum1 % mod2
            let mut num2: i64 = (sum2 % mod2 - 2 * rr * sum1_m2 + (rr * rr) * (n_terms % mod2)) % mod2
            if num2 < 0 { num2 = num2 + mod2 }
            let sum_t2: i64 = (num2 / (24 * 24)) % mod6

            let sum1_m3: i64 = sum1 % mod3
            let sum2_m3: i64 = sum2 % mod3
            let mut num3: i64 = (sum3 % mod3 - 3 * rr * sum2_m3 + 3 * rr * rr * sum1_m3 - rr * rr * rr * (n_terms % mod3)) % mod3
            if num3 < 0 { num3 = num3 + mod3 }
            let sum_t3: i64 = (num3 / (24 * 24 * 24)) % mod6

            let mut diff2: i64 = (sum_t2 - sum_t) % (2 * MOD)
            if diff2 < 0 { diff2 = diff2 + 2 * MOD }
            let sum_c2: i64 = (diff2 / 2) % MOD

            let mut diff3: i64 = (sum_t3 - 3 * sum_t2 + 2 * sum_t) % (6 * MOD)
            if diff3 < 0 { diff3 = diff3 + 6 * MOD }
            let sum_c3: i64 = (diff3 / 6) % MOD

            let d0: i64 = coeffs[rr * 4 + 0]
            let d1: i64 = coeffs[rr * 4 + 1]
            let d2: i64 = coeffs[rr * 4 + 2]
            let d3: i64 = coeffs[rr * 4 + 3]
            total = (total + (d0 % MOD) * (n_terms % MOD) + (d1 % MOD) * (sum_t % MOD) + (d2 % MOD) * sum_c2 + (d3 % MOD) * sum_c3) % MOD
            if total < 0 { total = total + MOD }
        }
        s = s + 1
    }
    printf("%09lld\n", total)
    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; }

void mat_mul_ptr_i64_ptr_i64_ptr_i64_i64_i64(int64_t* a, int64_t* b, int64_t* out, int64_t n, int64_t mod);
void mat_vec_ptr_i64_ptr_i64_ptr_i64_i64_i64(int64_t* a, int64_t* v, int64_t* out, int64_t n, int64_t mod);
int64_t compute_S_i64(int64_t n);
int32_t main(void);



void mat_mul_ptr_i64_ptr_i64_ptr_i64_i64_i64(int64_t* a, int64_t* b, int64_t* out, int64_t n, int64_t mod) {
    int64_t i = 0;
    while (i < n) {
        int64_t j = 0;
        while (j < n) {
            __int128 total = 0;
            int64_t k = 0;
            while (k < n) {
                total = (total + (((__int128)(a[((i * n) + k)])) * ((__int128)(b[((k * n) + j)]))));
                k = (k + 1);
            }
            out[((i * n) + j)] = ((int64_t)(FLOW_CHECKED_MOD((total), (((__int128)(mod))))));
            j = (j + 1);
        }
        i = (i + 1);
    }
}

void mat_vec_ptr_i64_ptr_i64_ptr_i64_i64_i64(int64_t* a, int64_t* v, int64_t* out, int64_t n, int64_t mod) {
    int64_t i = 0;
    while (i < n) {
        __int128 total = 0;
        int64_t j = 0;
        while (j < n) {
            total = (total + (((__int128)(a[((i * n) + j)])) * ((__int128)(v[j]))));
            j = (j + 1);
        }
        out[i] = ((int64_t)(FLOW_CHECKED_MOD((total), (((__int128)(mod))))));
        i = (i + 1);
    }
}

int64_t compute_S_i64(int64_t n) {
    if (n <= 0) {
        return 0;
    }
    int64_t* divs = (int64_t*)(calloc(8, 8));
    divs[0] = 1;
    divs[1] = 2;
    divs[2] = 3;
    divs[3] = 4;
    divs[4] = 6;
    divs[5] = 8;
    divs[6] = 12;
    divs[7] = 24;
    int64_t* A = (int64_t*)(calloc(8, 8));
    int64_t* Bv = (int64_t*)(calloc(8, 8));
    int64_t mi = 0;
    while (mi < 8) {
        int64_t mm = divs[mi];
        int64_t q = FLOW_CHECKED_DIV((n), (mm));
        int64_t rem = FLOW_CHECKED_MOD((n), (mm));
        int64_t* counts = (int64_t*)(calloc(mm, 8));
        int64_t r = 0;
        while (r < mm) {
            counts[r] = q;
            r = (r + 1);
        }
        r = 1;
        while (r <= rem) {
            counts[r] = (counts[r] + 1);
            r = (r + 1);
        }
        int64_t total = 0;
        int64_t a = 0;
        while (a < mm) {
            int64_t b = 0;
            while (b < mm) {
                int64_t c = 0;
                while (c < mm) {
                    int64_t p1 = FLOW_CHECKED_MOD(((((1 + a) + b) + c)), (mm));
                    int64_t p2 = FLOW_CHECKED_MOD(((((16 + (8 * a)) + (4 * b)) + (2 * c))), (mm));
                    int64_t p3 = FLOW_CHECKED_MOD(((((81 + (27 * a)) + (9 * b)) + (3 * c))), (mm));
                    int64_t p4 = FLOW_CHECKED_MOD(((((256 + (64 * a)) + (16 * b)) + (4 * c))), (mm));
                    if ((((p1 == 0 && p2 == 0) && p3 == 0) && p4 == 0)) {
                        total = (total + ((counts[a] * counts[b]) * counts[c]));
                    }
                    c = (c + 1);
                }
                b = (b + 1);
            }
            a = (a + 1);
        }
        A[mi] = total;
        free(counts);
        mi = (mi + 1);
    }
    mi = 7;
    while (mi >= 0) {
        int64_t mm = divs[mi];
        int64_t total = A[mi];
        int64_t ki = 0;
        while (ki < 8) {
            int64_t kk = divs[ki];
            if ((kk > mm && FLOW_CHECKED_MOD((kk), (mm)) == 0)) {
                total = (total - Bv[ki]);
            }
            ki = (ki + 1);
        }
        Bv[mi] = total;
        mi = (mi - 1);
    }
    int64_t ans = 0;
    mi = 0;
    while (mi < 8) {
        ans = (ans + (divs[mi] * Bv[mi]));
        mi = (mi + 1);
    }
    free(Bv);
    free(A);
    free(divs);
    return ans;
}

int32_t main(void) {
    int64_t MOD = 1000000000;
    int64_t KMAX = 1234567890123;
    int64_t mod_big = ((((24 * 24) * 24) * 6) * MOD);
    int64_t* coeffs = (int64_t*)(calloc((24 * 4), 8));
    int64_t r = 0;
    while (r < 24) {
        int64_t t = 0;
        int64_t* ys = (int64_t*)(calloc(4, 8));
        while (t < 4) {
            ys[t] = compute_S_i64((r + (24 * t)));
            t = (t + 1);
        }
        int64_t y0 = ys[0];
        int64_t y1 = ys[1];
        int64_t y2 = ys[2];
        int64_t y3 = ys[3];
        coeffs[((r * 4) + 0)] = y0;
        coeffs[((r * 4) + 1)] = (y1 - y0);
        coeffs[((r * 4) + 2)] = ((y2 - (2 * y1)) + y0);
        coeffs[((r * 4) + 3)] = (((y3 - (3 * y2)) + (3 * y1)) - y0);
        free(ys);
        r = (r + 1);
    }
    int64_t* fib_big = (int64_t*)(calloc(50, 8));
    fib_big[0] = 0;
    fib_big[1] = 1;
    int64_t i = 2;
    while (i < 50) {
        fib_big[i] = FLOW_CHECKED_MOD(((fib_big[(i - 1)] + fib_big[(i - 2)])), (mod_big));
        i = (i + 1);
    }
    int64_t a = FLOW_CHECKED_MOD((fib_big[25]), (mod_big));
    int64_t b = FLOW_CHECKED_MOD((fib_big[24]), (mod_big));
    int64_t c = FLOW_CHECKED_MOD((fib_big[24]), (mod_big));
    int64_t d = FLOW_CHECKED_MOD((fib_big[23]), (mod_big));
    int64_t N = 14;
    int64_t* mono = (int64_t*)(calloc((10 * 10), 8));
    mono[((0 * 10) + 0)] = 1;
    mono[((1 * 10) + 1)] = a;
    mono[((1 * 10) + 2)] = b;
    mono[((2 * 10) + 1)] = c;
    mono[((2 * 10) + 2)] = d;
    mono[((3 * 10) + 3)] = FLOW_CHECKED_MOD(((a * a)), (mod_big));
    mono[((3 * 10) + 4)] = FLOW_CHECKED_MOD((((2 * a) * b)), (mod_big));
    mono[((3 * 10) + 5)] = FLOW_CHECKED_MOD(((b * b)), (mod_big));
    mono[((4 * 10) + 3)] = FLOW_CHECKED_MOD(((a * c)), (mod_big));
    mono[((4 * 10) + 4)] = FLOW_CHECKED_MOD((((a * d) + (b * c))), (mod_big));
    mono[((4 * 10) + 5)] = FLOW_CHECKED_MOD(((b * d)), (mod_big));
    mono[((5 * 10) + 3)] = FLOW_CHECKED_MOD(((c * c)), (mod_big));
    mono[((5 * 10) + 4)] = FLOW_CHECKED_MOD((((2 * c) * d)), (mod_big));
    mono[((5 * 10) + 5)] = FLOW_CHECKED_MOD(((d * d)), (mod_big));
    mono[((6 * 10) + 6)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((a * a)), (mod_big)) * a)), (mod_big));
    mono[((6 * 10) + 7)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((3 * a)), (mod_big)) * a)), (mod_big)) * b)), (mod_big));
    mono[((6 * 10) + 8)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((3 * a)), (mod_big)) * b)), (mod_big)) * b)), (mod_big));
    mono[((6 * 10) + 9)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((b * b)), (mod_big)) * b)), (mod_big));
    mono[((7 * 10) + 6)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((a * a)), (mod_big)) * c)), (mod_big));
    mono[((7 * 10) + 7)] = FLOW_CHECKED_MOD((((FLOW_CHECKED_MOD(((a * a)), (mod_big)) * d) + (FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((2 * a)), (mod_big)) * b)), (mod_big)) * c))), (mod_big));
    mono[((7 * 10) + 8)] = FLOW_CHECKED_MOD((((FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((2 * a)), (mod_big)) * b)), (mod_big)) * d) + (FLOW_CHECKED_MOD(((b * b)), (mod_big)) * c))), (mod_big));
    mono[((7 * 10) + 9)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((b * b)), (mod_big)) * d)), (mod_big));
    mono[((8 * 10) + 6)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((a * c)), (mod_big)) * c)), (mod_big));
    mono[((8 * 10) + 7)] = FLOW_CHECKED_MOD((((FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((2 * a)), (mod_big)) * c)), (mod_big)) * d) + (FLOW_CHECKED_MOD(((b * c)), (mod_big)) * c))), (mod_big));
    mono[((8 * 10) + 8)] = FLOW_CHECKED_MOD((((FLOW_CHECKED_MOD(((a * d)), (mod_big)) * d) + (FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((2 * b)), (mod_big)) * c)), (mod_big)) * d))), (mod_big));
    mono[((8 * 10) + 9)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((b * d)), (mod_big)) * d)), (mod_big));
    mono[((9 * 10) + 6)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((c * c)), (mod_big)) * c)), (mod_big));
    mono[((9 * 10) + 7)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((3 * c)), (mod_big)) * c)), (mod_big)) * d)), (mod_big));
    mono[((9 * 10) + 8)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((3 * c)), (mod_big)) * d)), (mod_big)) * d)), (mod_big));
    mono[((9 * 10) + 9)] = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD(((d * d)), (mod_big)) * d)), (mod_big));
    int64_t* aug = (int64_t*)(calloc((N * N), 8));
    int64_t ii = 0;
    int64_t jj = 0;
    while (ii < 10) {
        jj = 0;
        while (jj < 10) {
            aug[((ii * N) + jj)] = mono[((ii * 10) + jj)];
            jj = (jj + 1);
        }
        ii = (ii + 1);
    }
    aug[((10 * N) + 0)] = 1;
    aug[((10 * N) + 10)] = 1;
    jj = 0;
    while (jj < 10) {
        aug[((11 * N) + jj)] = mono[((2 * 10) + jj)];
        aug[((12 * N) + jj)] = mono[((5 * 10) + jj)];
        aug[((13 * N) + jj)] = mono[((9 * 10) + jj)];
        jj = (jj + 1);
    }
    aug[((11 * N) + 11)] = 1;
    aug[((12 * N) + 12)] = 1;
    aug[((13 * N) + 13)] = 1;
    int64_t max_bits = 50;
    int64_t* powers = (int64_t*)(calloc(((max_bits * N) * N), 8));
    ii = 0;
    while (ii < (N * N)) {
        powers[ii] = aug[ii];
        ii = (ii + 1);
    }
    int64_t bit = 1;
    int64_t* tmp = (int64_t*)(calloc((N * N), 8));
    while (bit < max_bits) {
        int64_t src = (((bit - 1) * N) * N);
        int64_t* pa = (int64_t*)(calloc((N * N), 8));
        int64_t* pb = (int64_t*)(calloc((N * N), 8));
        ii = 0;
        while (ii < (N * N)) {
            pa[ii] = powers[(src + ii)];
            pb[ii] = powers[(src + ii)];
            ii = (ii + 1);
        }
        mat_mul_ptr_i64_ptr_i64_ptr_i64_i64_i64(pa, pb, tmp, N, mod_big);
        free(pa);
        free(pb);
        ii = 0;
        while (ii < (N * N)) {
            powers[(((bit * N) * N) + ii)] = tmp[ii];
            ii = (ii + 1);
        }
        bit = (bit + 1);
    }
    int64_t* fib_mod24 = (int64_t*)(calloc(24, 8));
    fib_mod24[0] = 0;
    fib_mod24[1] = 1;
    i = 2;
    while (i < 24) {
        fib_mod24[i] = FLOW_CHECKED_MOD(((fib_mod24[(i - 1)] + fib_mod24[(i - 2)])), (24));
        i = (i + 1);
    }
    int64_t mod6 = (6 * MOD);
    int64_t mod1 = (24 * mod6);
    int64_t mod2 = ((24 * 24) * mod6);
    int64_t mod3 = (((24 * 24) * 24) * mod6);
    int64_t total = 0;
    int64_t s = 0;
    int64_t* v = (int64_t*)(calloc(N, 8));
    int64_t* v2 = (int64_t*)(calloc(N, 8));
    while (s < 24) {
        int64_t k0 = s;
        if (k0 < 2) {
            k0 = (s + 24);
        }
        if (k0 <= KMAX) {
            int64_t n_terms = (1 + FLOW_CHECKED_DIV(((KMAX - k0)), (24)));
            int64_t x = fib_big[(k0 + 1)];
            int64_t y = fib_big[k0];
            int64_t vi = 0;
            while (vi < N) {
                v[vi] = 0;
                vi = (vi + 1);
            }
            v[0] = 1;
            v[1] = x;
            v[2] = y;
            v[3] = FLOW_CHECKED_MOD(((x * x)), (mod_big));
            v[4] = FLOW_CHECKED_MOD(((x * y)), (mod_big));
            v[5] = FLOW_CHECKED_MOD(((y * y)), (mod_big));
            v[6] = FLOW_CHECKED_MOD(((v[3] * x)), (mod_big));
            v[7] = FLOW_CHECKED_MOD(((v[3] * y)), (mod_big));
            v[8] = FLOW_CHECKED_MOD(((v[5] * x)), (mod_big));
            v[9] = FLOW_CHECKED_MOD(((v[5] * y)), (mod_big));
            v[10] = 1;
            v[11] = y;
            v[12] = v[5];
            v[13] = v[9];
            int64_t steps = (n_terms - 1);
            bit = 0;
            while (steps > 0) {
                if ((steps & 1) == 1) {
                    int64_t src2 = ((bit * N) * N);
                    int64_t* pm = (int64_t*)(calloc((N * N), 8));
                    vi = 0;
                    while (vi < (N * N)) {
                        pm[vi] = powers[(src2 + vi)];
                        vi = (vi + 1);
                    }
                    mat_vec_ptr_i64_ptr_i64_ptr_i64_i64_i64(pm, v, v2, N, mod_big);
                    free(pm);
                    vi = 0;
                    while (vi < N) {
                        v[vi] = v2[vi];
                        vi = (vi + 1);
                    }
                }
                steps = FLOW_CHECKED_SHR((steps), (1));
                bit = (bit + 1);
            }
            int64_t sum0 = v[10];
            int64_t sum1 = v[11];
            int64_t sum2 = v[12];
            int64_t sum3 = v[13];
            int64_t rr = fib_mod24[s];
            int64_t num1 = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD((sum1), (mod1)) - (rr * FLOW_CHECKED_MOD((n_terms), (mod1))))), (mod1));
            if (num1 < 0) {
                num1 = (num1 + mod1);
            }
            int64_t sum_t = FLOW_CHECKED_MOD((FLOW_CHECKED_DIV((num1), (24))), (mod6));
            int64_t sum1_m2 = FLOW_CHECKED_MOD((sum1), (mod2));
            int64_t num2 = FLOW_CHECKED_MOD((((FLOW_CHECKED_MOD((sum2), (mod2)) - ((2 * rr) * sum1_m2)) + ((rr * rr) * FLOW_CHECKED_MOD((n_terms), (mod2))))), (mod2));
            if (num2 < 0) {
                num2 = (num2 + mod2);
            }
            int64_t sum_t2 = FLOW_CHECKED_MOD((FLOW_CHECKED_DIV((num2), ((24 * 24)))), (mod6));
            int64_t sum1_m3 = FLOW_CHECKED_MOD((sum1), (mod3));
            int64_t sum2_m3 = FLOW_CHECKED_MOD((sum2), (mod3));
            int64_t num3 = FLOW_CHECKED_MOD(((((FLOW_CHECKED_MOD((sum3), (mod3)) - ((3 * rr) * sum2_m3)) + (((3 * rr) * rr) * sum1_m3)) - (((rr * rr) * rr) * FLOW_CHECKED_MOD((n_terms), (mod3))))), (mod3));
            if (num3 < 0) {
                num3 = (num3 + mod3);
            }
            int64_t sum_t3 = FLOW_CHECKED_MOD((FLOW_CHECKED_DIV((num3), (((24 * 24) * 24)))), (mod6));
            int64_t diff2 = FLOW_CHECKED_MOD(((sum_t2 - sum_t)), ((2 * MOD)));
            if (diff2 < 0) {
                diff2 = (diff2 + (2 * MOD));
            }
            int64_t sum_c2 = FLOW_CHECKED_MOD((FLOW_CHECKED_DIV((diff2), (2))), (MOD));
            int64_t diff3 = FLOW_CHECKED_MOD((((sum_t3 - (3 * sum_t2)) + (2 * sum_t))), ((6 * MOD)));
            if (diff3 < 0) {
                diff3 = (diff3 + (6 * MOD));
            }
            int64_t sum_c3 = FLOW_CHECKED_MOD((FLOW_CHECKED_DIV((diff3), (6))), (MOD));
            int64_t d0 = coeffs[((rr * 4) + 0)];
            int64_t d1 = coeffs[((rr * 4) + 1)];
            int64_t d2 = coeffs[((rr * 4) + 2)];
            int64_t d3 = coeffs[((rr * 4) + 3)];
            total = FLOW_CHECKED_MOD((((((total + (FLOW_CHECKED_MOD((d0), (MOD)) * FLOW_CHECKED_MOD((n_terms), (MOD)))) + (FLOW_CHECKED_MOD((d1), (MOD)) * FLOW_CHECKED_MOD((sum_t), (MOD)))) + (FLOW_CHECKED_MOD((d2), (MOD)) * sum_c2)) + (FLOW_CHECKED_MOD((d3), (MOD)) * sum_c3))), (MOD));
            if (total < 0) {
                total = (total + MOD);
            }
        }
        s = (s + 1);
    }
    printf("%09lld\n", total);
    return 0;
}

Generated MLIR

module {
  llvm.func @printf(!llvm.ptr, ...) -> i32
  llvm.mlir.global internal constant @str_0("%09lld\n\00") {addr_space = 0 : i32} : !llvm.array<8 x i8>
  func.func private @calloc(i64, i64) -> !llvm.ptr
  func.func private @free(!llvm.ptr) -> ()
  func.func @mat_mul(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64) -> () {
    %0 = arith.constant 0 : i32
    %1 = arith.extsi %0 : i32 to i64
    %2 = llvm.mlir.constant(1 : i64) : i64
    %3 = llvm.alloca %2 x i64 : (i64) -> !llvm.ptr
    llvm.store %1, %3 : i64, !llvm.ptr
    cf.br ^bb0
    ^bb0:
    %4 = llvm.load %3 : !llvm.ptr -> i64
    %5 = arith.cmpi slt, %4, %arg3 : i64
    cf.cond_br %5, ^bb1, ^bb2
    ^bb1:
      %6 = arith.constant 0 : i32
      %7 = arith.extsi %6 : i32 to i64
      %8 = llvm.mlir.constant(1 : i64) : i64
      %9 = llvm.alloca %8 x i64 : (i64) -> !llvm.ptr
      llvm.store %7, %9 : i64, !llvm.ptr
      cf.br ^bb3
      ^bb3:
      %10 = llvm.load %9 : !llvm.ptr -> i64
      %11 = arith.cmpi slt, %10, %arg3 : i64
      cf.cond_br %11, ^bb4, ^bb5
      ^bb4:
        %12 = arith.constant 0 : i32
        %13 = arith.extsi %12 : i32 to i128
        %14 = llvm.mlir.constant(1 : i64) : i64
        %15 = llvm.alloca %14 x i128 : (i64) -> !llvm.ptr
        llvm.store %13, %15 : i128, !llvm.ptr
        %16 = arith.constant 0 : i32
        %17 = arith.extsi %16 : i32 to i64
        %18 = llvm.mlir.constant(1 : i64) : i64
        %19 = llvm.alloca %18 x i64 : (i64) -> !llvm.ptr
        llvm.store %17, %19 : i64, !llvm.ptr
        cf.br ^bb6
        ^bb6:
        %20 = llvm.load %19 : !llvm.ptr -> i64
        %21 = arith.cmpi slt, %20, %arg3 : i64
        cf.cond_br %21, ^bb7, ^bb8
        ^bb7:
          %22 = llvm.load %15 : !llvm.ptr -> i128
          %24 = llvm.load %3 : !llvm.ptr -> i64
          %25 = arith.muli %24, %arg3 : i64
          %26 = llvm.load %19 : !llvm.ptr -> i64
          %27 = arith.addi %25, %26 : i64
          %28 = llvm.getelementptr %arg0[%27] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %23 = llvm.load %28 : !llvm.ptr -> i64
          %29 = arith.extsi %23 : i64 to i128
          %31 = llvm.load %19 : !llvm.ptr -> i64
          %32 = arith.muli %31, %arg3 : i64
          %33 = llvm.load %9 : !llvm.ptr -> i64
          %34 = arith.addi %32, %33 : i64
          %35 = llvm.getelementptr %arg1[%34] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %30 = llvm.load %35 : !llvm.ptr -> i64
          %36 = arith.extsi %30 : i64 to i128
          %38 = arith.trunci %29 : i128 to i64
          %39 = arith.trunci %36 : i128 to i64
          %37 = arith.muli %38, %39 : i64
          %41 = arith.trunci %22 : i128 to i64
          %40 = arith.addi %41, %37 : i64
          %42 = arith.extsi %40 : i64 to i128
          llvm.store %42, %15 : i128, !llvm.ptr
          %43 = llvm.load %19 : !llvm.ptr -> i64
          %44 = arith.constant 1 : i32
          %46 = arith.extsi %44 : i32 to i64
          %45 = arith.addi %43, %46 : i64
          llvm.store %45, %19 : i64, !llvm.ptr
          cf.br ^bb6
        ^bb8:
        %47 = llvm.load %15 : !llvm.ptr -> i128
        %48 = arith.extsi %arg4 : i64 to i128
        %50 = arith.trunci %47 : i128 to i64
        %51 = arith.trunci %48 : i128 to i64
        %49 = arith.remsi %50, %51 : i64
        %52 = llvm.load %3 : !llvm.ptr -> i64
        %53 = arith.muli %52, %arg3 : i64
        %54 = llvm.load %9 : !llvm.ptr -> i64
        %55 = arith.addi %53, %54 : i64
        %56 = llvm.getelementptr %arg2[%55] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %49, %56 : i64, !llvm.ptr
        %57 = llvm.load %9 : !llvm.ptr -> i64
        %58 = arith.constant 1 : i32
        %60 = arith.extsi %58 : i32 to i64
        %59 = arith.addi %57, %60 : i64
        llvm.store %59, %9 : i64, !llvm.ptr
        cf.br ^bb3
      ^bb5:
      %61 = llvm.load %3 : !llvm.ptr -> i64
      %62 = arith.constant 1 : i32
      %64 = arith.extsi %62 : i32 to i64
      %63 = arith.addi %61, %64 : i64
      llvm.store %63, %3 : i64, !llvm.ptr
      cf.br ^bb0
    ^bb2:
    func.return
  }
  func.func @mat_vec(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64) -> () {
    %65 = arith.constant 0 : i32
    %66 = arith.extsi %65 : i32 to i64
    %67 = llvm.mlir.constant(1 : i64) : i64
    %68 = llvm.alloca %67 x i64 : (i64) -> !llvm.ptr
    llvm.store %66, %68 : i64, !llvm.ptr
    cf.br ^bb9
    ^bb9:
    %69 = llvm.load %68 : !llvm.ptr -> i64
    %70 = arith.cmpi slt, %69, %arg3 : i64
    cf.cond_br %70, ^bb10, ^bb11
    ^bb10:
      %71 = arith.constant 0 : i32
      %72 = arith.extsi %71 : i32 to i128
      %73 = llvm.mlir.constant(1 : i64) : i64
      %74 = llvm.alloca %73 x i128 : (i64) -> !llvm.ptr
      llvm.store %72, %74 : i128, !llvm.ptr
      %75 = arith.constant 0 : i32
      %76 = arith.extsi %75 : i32 to i64
      %77 = llvm.mlir.constant(1 : i64) : i64
      %78 = llvm.alloca %77 x i64 : (i64) -> !llvm.ptr
      llvm.store %76, %78 : i64, !llvm.ptr
      cf.br ^bb12
      ^bb12:
      %79 = llvm.load %78 : !llvm.ptr -> i64
      %80 = arith.cmpi slt, %79, %arg3 : i64
      cf.cond_br %80, ^bb13, ^bb14
      ^bb13:
        %81 = llvm.load %74 : !llvm.ptr -> i128
        %83 = llvm.load %68 : !llvm.ptr -> i64
        %84 = arith.muli %83, %arg3 : i64
        %85 = llvm.load %78 : !llvm.ptr -> i64
        %86 = arith.addi %84, %85 : i64
        %87 = llvm.getelementptr %arg0[%86] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %82 = llvm.load %87 : !llvm.ptr -> i64
        %88 = arith.extsi %82 : i64 to i128
        %90 = llvm.load %78 : !llvm.ptr -> i64
        %91 = llvm.getelementptr %arg1[%90] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %89 = llvm.load %91 : !llvm.ptr -> i64
        %92 = arith.extsi %89 : i64 to i128
        %94 = arith.trunci %88 : i128 to i64
        %95 = arith.trunci %92 : i128 to i64
        %93 = arith.muli %94, %95 : i64
        %97 = arith.trunci %81 : i128 to i64
        %96 = arith.addi %97, %93 : i64
        %98 = arith.extsi %96 : i64 to i128
        llvm.store %98, %74 : i128, !llvm.ptr
        %99 = llvm.load %78 : !llvm.ptr -> i64
        %100 = arith.constant 1 : i32
        %102 = arith.extsi %100 : i32 to i64
        %101 = arith.addi %99, %102 : i64
        llvm.store %101, %78 : i64, !llvm.ptr
        cf.br ^bb12
      ^bb14:
      %103 = llvm.load %74 : !llvm.ptr -> i128
      %104 = arith.extsi %arg4 : i64 to i128
      %106 = arith.trunci %103 : i128 to i64
      %107 = arith.trunci %104 : i128 to i64
      %105 = arith.remsi %106, %107 : i64
      %108 = llvm.load %68 : !llvm.ptr -> i64
      %109 = llvm.getelementptr %arg2[%108] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %105, %109 : i64, !llvm.ptr
      %110 = llvm.load %68 : !llvm.ptr -> i64
      %111 = arith.constant 1 : i32
      %113 = arith.extsi %111 : i32 to i64
      %112 = arith.addi %110, %113 : i64
      llvm.store %112, %68 : i64, !llvm.ptr
      cf.br ^bb9
    ^bb11:
    func.return
  }
  func.func @compute_S(%arg0: i64) -> i64 {
    %114 = arith.constant 0 : i32
    %116 = arith.extsi %114 : i32 to i64
    %115 = arith.cmpi sle, %arg0, %116 : i64
    cf.cond_br %115, ^bb15, ^bb16
    ^bb15:
      %117 = arith.constant 0 : i32
      %118 = arith.extsi %117 : i32 to i64
      func.return %118 : i64
    ^bb16:
      cf.br ^bb17
    ^bb17:
    %120 = arith.constant 8 : i32
    %121 = arith.constant 8 : i32
    %122 = arith.extsi %120 : i32 to i64
    %123 = arith.extsi %121 : i32 to i64
    %119 = func.call @calloc(%122, %123) : (i64, i64) -> !llvm.ptr
    %124 = arith.constant 1 : i32
    %125 = arith.constant 0 : i32
    %126 = arith.extsi %124 : i32 to i64
    %127 = arith.extsi %125 : i32 to i64
    %128 = llvm.getelementptr %119[%127] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %126, %128 : i64, !llvm.ptr
    %129 = arith.constant 2 : i32
    %130 = arith.constant 1 : i32
    %131 = arith.extsi %129 : i32 to i64
    %132 = arith.extsi %130 : i32 to i64
    %133 = llvm.getelementptr %119[%132] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %131, %133 : i64, !llvm.ptr
    %134 = arith.constant 3 : i32
    %135 = arith.constant 2 : i32
    %136 = arith.extsi %134 : i32 to i64
    %137 = arith.extsi %135 : i32 to i64
    %138 = llvm.getelementptr %119[%137] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %136, %138 : i64, !llvm.ptr
    %139 = arith.constant 4 : i32
    %140 = arith.constant 3 : i32
    %141 = arith.extsi %139 : i32 to i64
    %142 = arith.extsi %140 : i32 to i64
    %143 = llvm.getelementptr %119[%142] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %141, %143 : i64, !llvm.ptr
    %144 = arith.constant 6 : i32
    %145 = arith.constant 4 : i32
    %146 = arith.extsi %144 : i32 to i64
    %147 = arith.extsi %145 : i32 to i64
    %148 = llvm.getelementptr %119[%147] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %146, %148 : i64, !llvm.ptr
    %149 = arith.constant 8 : i32
    %150 = arith.constant 5 : i32
    %151 = arith.extsi %149 : i32 to i64
    %152 = arith.extsi %150 : i32 to i64
    %153 = llvm.getelementptr %119[%152] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %151, %153 : i64, !llvm.ptr
    %154 = arith.constant 12 : i32
    %155 = arith.constant 6 : i32
    %156 = arith.extsi %154 : i32 to i64
    %157 = arith.extsi %155 : i32 to i64
    %158 = llvm.getelementptr %119[%157] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %156, %158 : i64, !llvm.ptr
    %159 = arith.constant 24 : i32
    %160 = arith.constant 7 : i32
    %161 = arith.extsi %159 : i32 to i64
    %162 = arith.extsi %160 : i32 to i64
    %163 = llvm.getelementptr %119[%162] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %161, %163 : i64, !llvm.ptr
    %165 = arith.constant 8 : i32
    %166 = arith.constant 8 : i32
    %167 = arith.extsi %165 : i32 to i64
    %168 = arith.extsi %166 : i32 to i64
    %164 = func.call @calloc(%167, %168) : (i64, i64) -> !llvm.ptr
    %170 = arith.constant 8 : i32
    %171 = arith.constant 8 : i32
    %172 = arith.extsi %170 : i32 to i64
    %173 = arith.extsi %171 : i32 to i64
    %169 = func.call @calloc(%172, %173) : (i64, i64) -> !llvm.ptr
    %174 = arith.constant 0 : i32
    %175 = arith.extsi %174 : i32 to i64
    %176 = llvm.mlir.constant(1 : i64) : i64
    %177 = llvm.alloca %176 x i64 : (i64) -> !llvm.ptr
    llvm.store %175, %177 : i64, !llvm.ptr
    cf.br ^bb18
    ^bb18:
    %178 = llvm.load %177 : !llvm.ptr -> i64
    %179 = arith.constant 8 : i32
    %181 = arith.extsi %179 : i32 to i64
    %180 = arith.cmpi slt, %178, %181 : i64
    cf.cond_br %180, ^bb19, ^bb20
    ^bb19:
      %183 = llvm.load %177 : !llvm.ptr -> i64
      %184 = llvm.getelementptr %119[%183] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %182 = llvm.load %184 : !llvm.ptr -> i64
      %185 = arith.divsi %arg0, %182 : i64
      %186 = arith.remsi %arg0, %182 : i64
      %188 = arith.constant 8 : i32
      %189 = arith.extsi %188 : i32 to i64
      %187 = func.call @calloc(%182, %189) : (i64, i64) -> !llvm.ptr
      %190 = arith.constant 0 : i32
      %191 = arith.extsi %190 : i32 to i64
      %192 = llvm.mlir.constant(1 : i64) : i64
      %193 = llvm.alloca %192 x i64 : (i64) -> !llvm.ptr
      llvm.store %191, %193 : i64, !llvm.ptr
      cf.br ^bb21
      ^bb21:
      %194 = llvm.load %193 : !llvm.ptr -> i64
      %195 = arith.cmpi slt, %194, %182 : i64
      cf.cond_br %195, ^bb22, ^bb23
      ^bb22:
        %196 = llvm.load %193 : !llvm.ptr -> i64
        %197 = llvm.getelementptr %187[%196] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %185, %197 : i64, !llvm.ptr
        %198 = llvm.load %193 : !llvm.ptr -> i64
        %199 = arith.constant 1 : i32
        %201 = arith.extsi %199 : i32 to i64
        %200 = arith.addi %198, %201 : i64
        llvm.store %200, %193 : i64, !llvm.ptr
        cf.br ^bb21
      ^bb23:
      %202 = arith.constant 1 : i32
      %203 = arith.extsi %202 : i32 to i64
      llvm.store %203, %193 : i64, !llvm.ptr
      cf.br ^bb24
      ^bb24:
      %204 = llvm.load %193 : !llvm.ptr -> i64
      %205 = arith.cmpi sle, %204, %186 : i64
      cf.cond_br %205, ^bb25, ^bb26
      ^bb25:
        %207 = llvm.load %193 : !llvm.ptr -> i64
        %208 = llvm.getelementptr %187[%207] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %206 = llvm.load %208 : !llvm.ptr -> i64
        %209 = arith.constant 1 : i32
        %211 = arith.extsi %209 : i32 to i64
        %210 = arith.addi %206, %211 : i64
        %212 = llvm.load %193 : !llvm.ptr -> i64
        %213 = llvm.getelementptr %187[%212] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %210, %213 : i64, !llvm.ptr
        %214 = llvm.load %193 : !llvm.ptr -> i64
        %215 = arith.constant 1 : i32
        %217 = arith.extsi %215 : i32 to i64
        %216 = arith.addi %214, %217 : i64
        llvm.store %216, %193 : i64, !llvm.ptr
        cf.br ^bb24
      ^bb26:
      %218 = arith.constant 0 : i32
      %219 = arith.extsi %218 : i32 to i64
      %220 = llvm.mlir.constant(1 : i64) : i64
      %221 = llvm.alloca %220 x i64 : (i64) -> !llvm.ptr
      llvm.store %219, %221 : i64, !llvm.ptr
      %222 = arith.constant 0 : i32
      %223 = arith.extsi %222 : i32 to i64
      %224 = llvm.mlir.constant(1 : i64) : i64
      %225 = llvm.alloca %224 x i64 : (i64) -> !llvm.ptr
      llvm.store %223, %225 : i64, !llvm.ptr
      cf.br ^bb27
      ^bb27:
      %226 = llvm.load %225 : !llvm.ptr -> i64
      %227 = arith.cmpi slt, %226, %182 : i64
      cf.cond_br %227, ^bb28, ^bb29
      ^bb28:
        %228 = arith.constant 0 : i32
        %229 = arith.extsi %228 : i32 to i64
        %230 = llvm.mlir.constant(1 : i64) : i64
        %231 = llvm.alloca %230 x i64 : (i64) -> !llvm.ptr
        llvm.store %229, %231 : i64, !llvm.ptr
        cf.br ^bb30
        ^bb30:
        %232 = llvm.load %231 : !llvm.ptr -> i64
        %233 = arith.cmpi slt, %232, %182 : i64
        cf.cond_br %233, ^bb31, ^bb32
        ^bb31:
          %234 = arith.constant 0 : i32
          %235 = arith.extsi %234 : i32 to i64
          %236 = llvm.mlir.constant(1 : i64) : i64
          %237 = llvm.alloca %236 x i64 : (i64) -> !llvm.ptr
          llvm.store %235, %237 : i64, !llvm.ptr
          cf.br ^bb33
          ^bb33:
          %238 = llvm.load %237 : !llvm.ptr -> i64
          %239 = arith.cmpi slt, %238, %182 : i64
          cf.cond_br %239, ^bb34, ^bb35
          ^bb34:
            %240 = arith.constant 1 : i32
            %241 = llvm.load %225 : !llvm.ptr -> i64
            %243 = arith.extsi %240 : i32 to i64
            %242 = arith.addi %243, %241 : i64
            %244 = llvm.load %231 : !llvm.ptr -> i64
            %245 = arith.addi %242, %244 : i64
            %246 = llvm.load %237 : !llvm.ptr -> i64
            %247 = arith.addi %245, %246 : i64
            %248 = arith.remsi %247, %182 : i64
            %249 = arith.constant 16 : i32
            %250 = arith.constant 8 : i32
            %251 = llvm.load %225 : !llvm.ptr -> i64
            %253 = arith.extsi %250 : i32 to i64
            %252 = arith.muli %253, %251 : i64
            %255 = arith.extsi %249 : i32 to i64
            %254 = arith.addi %255, %252 : i64
            %256 = arith.constant 4 : i32
            %257 = llvm.load %231 : !llvm.ptr -> i64
            %259 = arith.extsi %256 : i32 to i64
            %258 = arith.muli %259, %257 : i64
            %260 = arith.addi %254, %258 : i64
            %261 = arith.constant 2 : i32
            %262 = llvm.load %237 : !llvm.ptr -> i64
            %264 = arith.extsi %261 : i32 to i64
            %263 = arith.muli %264, %262 : i64
            %265 = arith.addi %260, %263 : i64
            %266 = arith.remsi %265, %182 : i64
            %267 = arith.constant 81 : i32
            %268 = arith.constant 27 : i32
            %269 = llvm.load %225 : !llvm.ptr -> i64
            %271 = arith.extsi %268 : i32 to i64
            %270 = arith.muli %271, %269 : i64
            %273 = arith.extsi %267 : i32 to i64
            %272 = arith.addi %273, %270 : i64
            %274 = arith.constant 9 : i32
            %275 = llvm.load %231 : !llvm.ptr -> i64
            %277 = arith.extsi %274 : i32 to i64
            %276 = arith.muli %277, %275 : i64
            %278 = arith.addi %272, %276 : i64
            %279 = arith.constant 3 : i32
            %280 = llvm.load %237 : !llvm.ptr -> i64
            %282 = arith.extsi %279 : i32 to i64
            %281 = arith.muli %282, %280 : i64
            %283 = arith.addi %278, %281 : i64
            %284 = arith.remsi %283, %182 : i64
            %285 = arith.constant 256 : i32
            %286 = arith.constant 64 : i32
            %287 = llvm.load %225 : !llvm.ptr -> i64
            %289 = arith.extsi %286 : i32 to i64
            %288 = arith.muli %289, %287 : i64
            %291 = arith.extsi %285 : i32 to i64
            %290 = arith.addi %291, %288 : i64
            %292 = arith.constant 16 : i32
            %293 = llvm.load %231 : !llvm.ptr -> i64
            %295 = arith.extsi %292 : i32 to i64
            %294 = arith.muli %295, %293 : i64
            %296 = arith.addi %290, %294 : i64
            %297 = arith.constant 4 : i32
            %298 = llvm.load %237 : !llvm.ptr -> i64
            %300 = arith.extsi %297 : i32 to i64
            %299 = arith.muli %300, %298 : i64
            %301 = arith.addi %296, %299 : i64
            %302 = arith.remsi %301, %182 : i64
            %303 = arith.constant 0 : i32
            %305 = arith.extsi %303 : i32 to i64
            %304 = arith.cmpi eq, %248, %305 : i64
            %306 = scf.if %304 -> (i1) {
              %307 = arith.constant 0 : i32
              %309 = arith.extsi %307 : i32 to i64
              %308 = arith.cmpi eq, %266, %309 : i64
              scf.yield %308 : i1
            } else {
              %310 = arith.constant false
              scf.yield %310 : i1
            }
            %311 = scf.if %306 -> (i1) {
              %312 = arith.constant 0 : i32
              %314 = arith.extsi %312 : i32 to i64
              %313 = arith.cmpi eq, %284, %314 : i64
              scf.yield %313 : i1
            } else {
              %315 = arith.constant false
              scf.yield %315 : i1
            }
            %316 = scf.if %311 -> (i1) {
              %317 = arith.constant 0 : i32
              %319 = arith.extsi %317 : i32 to i64
              %318 = arith.cmpi eq, %302, %319 : i64
              scf.yield %318 : i1
            } else {
              %320 = arith.constant false
              scf.yield %320 : i1
            }
            cf.cond_br %316, ^bb36, ^bb37
            ^bb36:
              %321 = llvm.load %221 : !llvm.ptr -> i64
              %323 = llvm.load %225 : !llvm.ptr -> i64
              %324 = llvm.getelementptr %187[%323] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %322 = llvm.load %324 : !llvm.ptr -> i64
              %326 = llvm.load %231 : !llvm.ptr -> i64
              %327 = llvm.getelementptr %187[%326] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %325 = llvm.load %327 : !llvm.ptr -> i64
              %328 = arith.muli %322, %325 : i64
              %330 = llvm.load %237 : !llvm.ptr -> i64
              %331 = llvm.getelementptr %187[%330] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %329 = llvm.load %331 : !llvm.ptr -> i64
              %332 = arith.muli %328, %329 : i64
              %333 = arith.addi %321, %332 : i64
              llvm.store %333, %221 : i64, !llvm.ptr
              cf.br ^bb38
            ^bb37:
              cf.br ^bb38
            ^bb38:
            %334 = llvm.load %237 : !llvm.ptr -> i64
            %335 = arith.constant 1 : i32
            %337 = arith.extsi %335 : i32 to i64
            %336 = arith.addi %334, %337 : i64
            llvm.store %336, %237 : i64, !llvm.ptr
            cf.br ^bb33
          ^bb35:
          %338 = llvm.load %231 : !llvm.ptr -> i64
          %339 = arith.constant 1 : i32
          %341 = arith.extsi %339 : i32 to i64
          %340 = arith.addi %338, %341 : i64
          llvm.store %340, %231 : i64, !llvm.ptr
          cf.br ^bb30
        ^bb32:
        %342 = llvm.load %225 : !llvm.ptr -> i64
        %343 = arith.constant 1 : i32
        %345 = arith.extsi %343 : i32 to i64
        %344 = arith.addi %342, %345 : i64
        llvm.store %344, %225 : i64, !llvm.ptr
        cf.br ^bb27
      ^bb29:
      %346 = llvm.load %221 : !llvm.ptr -> i64
      %347 = llvm.load %177 : !llvm.ptr -> i64
      %348 = llvm.getelementptr %164[%347] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %346, %348 : i64, !llvm.ptr
      func.call @free(%187) : (!llvm.ptr) -> ()
      %350 = llvm.load %177 : !llvm.ptr -> i64
      %351 = arith.constant 1 : i32
      %353 = arith.extsi %351 : i32 to i64
      %352 = arith.addi %350, %353 : i64
      llvm.store %352, %177 : i64, !llvm.ptr
      cf.br ^bb18
    ^bb20:
    %354 = arith.constant 7 : i32
    %355 = arith.extsi %354 : i32 to i64
    llvm.store %355, %177 : i64, !llvm.ptr
    cf.br ^bb39
    ^bb39:
    %356 = llvm.load %177 : !llvm.ptr -> i64
    %357 = arith.constant 0 : i32
    %359 = arith.extsi %357 : i32 to i64
    %358 = arith.cmpi sge, %356, %359 : i64
    cf.cond_br %358, ^bb40, ^bb41
    ^bb40:
      %361 = llvm.load %177 : !llvm.ptr -> i64
      %362 = llvm.getelementptr %119[%361] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %360 = llvm.load %362 : !llvm.ptr -> i64
      %364 = llvm.load %177 : !llvm.ptr -> i64
      %365 = llvm.getelementptr %164[%364] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %363 = llvm.load %365 : !llvm.ptr -> i64
      %366 = llvm.mlir.constant(1 : i64) : i64
      %367 = llvm.alloca %366 x i64 : (i64) -> !llvm.ptr
      llvm.store %363, %367 : i64, !llvm.ptr
      %368 = arith.constant 0 : i32
      %369 = arith.extsi %368 : i32 to i64
      %370 = llvm.mlir.constant(1 : i64) : i64
      %371 = llvm.alloca %370 x i64 : (i64) -> !llvm.ptr
      llvm.store %369, %371 : i64, !llvm.ptr
      cf.br ^bb42
      ^bb42:
      %372 = llvm.load %371 : !llvm.ptr -> i64
      %373 = arith.constant 8 : i32
      %375 = arith.extsi %373 : i32 to i64
      %374 = arith.cmpi slt, %372, %375 : i64
      cf.cond_br %374, ^bb43, ^bb44
      ^bb43:
        %377 = llvm.load %371 : !llvm.ptr -> i64
        %378 = llvm.getelementptr %119[%377] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %376 = llvm.load %378 : !llvm.ptr -> i64
        %379 = arith.cmpi sgt, %376, %360 : i64
        %380 = scf.if %379 -> (i1) {
          %381 = arith.remsi %376, %360 : i64
          %382 = arith.constant 0 : i32
          %384 = arith.extsi %382 : i32 to i64
          %383 = arith.cmpi eq, %381, %384 : i64
          scf.yield %383 : i1
        } else {
          %385 = arith.constant false
          scf.yield %385 : i1
        }
        cf.cond_br %380, ^bb45, ^bb46
        ^bb45:
          %386 = llvm.load %367 : !llvm.ptr -> i64
          %388 = llvm.load %371 : !llvm.ptr -> i64
          %389 = llvm.getelementptr %169[%388] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %387 = llvm.load %389 : !llvm.ptr -> i64
          %390 = arith.subi %386, %387 : i64
          llvm.store %390, %367 : i64, !llvm.ptr
          cf.br ^bb47
        ^bb46:
          cf.br ^bb47
        ^bb47:
        %391 = llvm.load %371 : !llvm.ptr -> i64
        %392 = arith.constant 1 : i32
        %394 = arith.extsi %392 : i32 to i64
        %393 = arith.addi %391, %394 : i64
        llvm.store %393, %371 : i64, !llvm.ptr
        cf.br ^bb42
      ^bb44:
      %395 = llvm.load %367 : !llvm.ptr -> i64
      %396 = llvm.load %177 : !llvm.ptr -> i64
      %397 = llvm.getelementptr %169[%396] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %395, %397 : i64, !llvm.ptr
      %398 = llvm.load %177 : !llvm.ptr -> i64
      %399 = arith.constant 1 : i32
      %401 = arith.extsi %399 : i32 to i64
      %400 = arith.subi %398, %401 : i64
      llvm.store %400, %177 : i64, !llvm.ptr
      cf.br ^bb39
    ^bb41:
    %402 = arith.constant 0 : i32
    %403 = arith.extsi %402 : i32 to i64
    %404 = llvm.mlir.constant(1 : i64) : i64
    %405 = llvm.alloca %404 x i64 : (i64) -> !llvm.ptr
    llvm.store %403, %405 : i64, !llvm.ptr
    %406 = arith.constant 0 : i32
    %407 = arith.extsi %406 : i32 to i64
    llvm.store %407, %177 : i64, !llvm.ptr
    cf.br ^bb48
    ^bb48:
    %408 = llvm.load %177 : !llvm.ptr -> i64
    %409 = arith.constant 8 : i32
    %411 = arith.extsi %409 : i32 to i64
    %410 = arith.cmpi slt, %408, %411 : i64
    cf.cond_br %410, ^bb49, ^bb50
    ^bb49:
      %412 = llvm.load %405 : !llvm.ptr -> i64
      %414 = llvm.load %177 : !llvm.ptr -> i64
      %415 = llvm.getelementptr %119[%414] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %413 = llvm.load %415 : !llvm.ptr -> i64
      %417 = llvm.load %177 : !llvm.ptr -> i64
      %418 = llvm.getelementptr %169[%417] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %416 = llvm.load %418 : !llvm.ptr -> i64
      %419 = arith.muli %413, %416 : i64
      %420 = arith.addi %412, %419 : i64
      llvm.store %420, %405 : i64, !llvm.ptr
      %421 = llvm.load %177 : !llvm.ptr -> i64
      %422 = arith.constant 1 : i32
      %424 = arith.extsi %422 : i32 to i64
      %423 = arith.addi %421, %424 : i64
      llvm.store %423, %177 : i64, !llvm.ptr
      cf.br ^bb48
    ^bb50:
    func.call @free(%169) : (!llvm.ptr) -> ()
    func.call @free(%164) : (!llvm.ptr) -> ()
    func.call @free(%119) : (!llvm.ptr) -> ()
    %428 = llvm.load %405 : !llvm.ptr -> i64
    func.return %428 : i64
  }
  func.func @main() -> i32 {
    %429 = arith.constant 1000000000 : i32
    %430 = arith.extsi %429 : i32 to i64
    %431 = arith.constant 1230272922827 : i32
    %432 = arith.extsi %431 : i32 to i64
    %433 = arith.constant 24 : i32
    %434 = arith.constant 24 : i32
    %435 = arith.muli %433, %434 : i32
    %436 = arith.constant 24 : i32
    %437 = arith.muli %435, %436 : i32
    %438 = arith.constant 6 : i32
    %439 = arith.muli %437, %438 : i32
    %441 = arith.extsi %439 : i32 to i64
    %440 = arith.muli %441, %430 : i64
    %443 = arith.constant 24 : i32
    %444 = arith.constant 4 : i32
    %445 = arith.muli %443, %444 : i32
    %446 = arith.constant 8 : i32
    %447 = arith.extsi %445 : i32 to i64
    %448 = arith.extsi %446 : i32 to i64
    %442 = func.call @calloc(%447, %448) : (i64, i64) -> !llvm.ptr
    %449 = arith.constant 0 : i32
    %450 = arith.extsi %449 : i32 to i64
    %451 = llvm.mlir.constant(1 : i64) : i64
    %452 = llvm.alloca %451 x i64 : (i64) -> !llvm.ptr
    llvm.store %450, %452 : i64, !llvm.ptr
    cf.br ^bb51
    ^bb51:
    %453 = llvm.load %452 : !llvm.ptr -> i64
    %454 = arith.constant 24 : i32
    %456 = arith.extsi %454 : i32 to i64
    %455 = arith.cmpi slt, %453, %456 : i64
    cf.cond_br %455, ^bb52, ^bb53
    ^bb52:
      %457 = arith.constant 0 : i32
      %458 = arith.extsi %457 : i32 to i64
      %459 = llvm.mlir.constant(1 : i64) : i64
      %460 = llvm.alloca %459 x i64 : (i64) -> !llvm.ptr
      llvm.store %458, %460 : i64, !llvm.ptr
      %462 = arith.constant 4 : i32
      %463 = arith.constant 8 : i32
      %464 = arith.extsi %462 : i32 to i64
      %465 = arith.extsi %463 : i32 to i64
      %461 = func.call @calloc(%464, %465) : (i64, i64) -> !llvm.ptr
      cf.br ^bb54
      ^bb54:
      %466 = llvm.load %460 : !llvm.ptr -> i64
      %467 = arith.constant 4 : i32
      %469 = arith.extsi %467 : i32 to i64
      %468 = arith.cmpi slt, %466, %469 : i64
      cf.cond_br %468, ^bb55, ^bb56
      ^bb55:
        %471 = llvm.load %452 : !llvm.ptr -> i64
        %472 = arith.constant 24 : i32
        %473 = llvm.load %460 : !llvm.ptr -> i64
        %475 = arith.extsi %472 : i32 to i64
        %474 = arith.muli %475, %473 : i64
        %476 = arith.addi %471, %474 : i64
        %470 = func.call @compute_S(%476) : (i64) -> i64
        %477 = llvm.load %460 : !llvm.ptr -> i64
        %478 = llvm.getelementptr %461[%477] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %470, %478 : i64, !llvm.ptr
        %479 = llvm.load %460 : !llvm.ptr -> i64
        %480 = arith.constant 1 : i32
        %482 = arith.extsi %480 : i32 to i64
        %481 = arith.addi %479, %482 : i64
        llvm.store %481, %460 : i64, !llvm.ptr
        cf.br ^bb54
      ^bb56:
      %484 = arith.constant 0 : i32
      %485 = arith.extsi %484 : i32 to i64
      %486 = llvm.getelementptr %461[%485] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %483 = llvm.load %486 : !llvm.ptr -> i64
      %488 = arith.constant 1 : i32
      %489 = arith.extsi %488 : i32 to i64
      %490 = llvm.getelementptr %461[%489] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %487 = llvm.load %490 : !llvm.ptr -> i64
      %492 = arith.constant 2 : i32
      %493 = arith.extsi %492 : i32 to i64
      %494 = llvm.getelementptr %461[%493] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %491 = llvm.load %494 : !llvm.ptr -> i64
      %496 = arith.constant 3 : i32
      %497 = arith.extsi %496 : i32 to i64
      %498 = llvm.getelementptr %461[%497] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %495 = llvm.load %498 : !llvm.ptr -> i64
      %499 = llvm.load %452 : !llvm.ptr -> i64
      %500 = arith.constant 4 : i32
      %502 = arith.extsi %500 : i32 to i64
      %501 = arith.muli %499, %502 : i64
      %503 = arith.constant 0 : i32
      %505 = arith.extsi %503 : i32 to i64
      %504 = arith.addi %501, %505 : i64
      %506 = llvm.getelementptr %442[%504] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %483, %506 : i64, !llvm.ptr
      %507 = arith.subi %487, %483 : i64
      %508 = llvm.load %452 : !llvm.ptr -> i64
      %509 = arith.constant 4 : i32
      %511 = arith.extsi %509 : i32 to i64
      %510 = arith.muli %508, %511 : i64
      %512 = arith.constant 1 : i32
      %514 = arith.extsi %512 : i32 to i64
      %513 = arith.addi %510, %514 : i64
      %515 = llvm.getelementptr %442[%513] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %507, %515 : i64, !llvm.ptr
      %516 = arith.constant 2 : i32
      %518 = arith.extsi %516 : i32 to i64
      %517 = arith.muli %518, %487 : i64
      %519 = arith.subi %491, %517 : i64
      %520 = arith.addi %519, %483 : i64
      %521 = llvm.load %452 : !llvm.ptr -> i64
      %522 = arith.constant 4 : i32
      %524 = arith.extsi %522 : i32 to i64
      %523 = arith.muli %521, %524 : i64
      %525 = arith.constant 2 : i32
      %527 = arith.extsi %525 : i32 to i64
      %526 = arith.addi %523, %527 : i64
      %528 = llvm.getelementptr %442[%526] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %520, %528 : i64, !llvm.ptr
      %529 = arith.constant 3 : i32
      %531 = arith.extsi %529 : i32 to i64
      %530 = arith.muli %531, %491 : i64
      %532 = arith.subi %495, %530 : i64
      %533 = arith.constant 3 : i32
      %535 = arith.extsi %533 : i32 to i64
      %534 = arith.muli %535, %487 : i64
      %536 = arith.addi %532, %534 : i64
      %537 = arith.subi %536, %483 : i64
      %538 = llvm.load %452 : !llvm.ptr -> i64
      %539 = arith.constant 4 : i32
      %541 = arith.extsi %539 : i32 to i64
      %540 = arith.muli %538, %541 : i64
      %542 = arith.constant 3 : i32
      %544 = arith.extsi %542 : i32 to i64
      %543 = arith.addi %540, %544 : i64
      %545 = llvm.getelementptr %442[%543] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %537, %545 : i64, !llvm.ptr
      func.call @free(%461) : (!llvm.ptr) -> ()
      %547 = llvm.load %452 : !llvm.ptr -> i64
      %548 = arith.constant 1 : i32
      %550 = arith.extsi %548 : i32 to i64
      %549 = arith.addi %547, %550 : i64
      llvm.store %549, %452 : i64, !llvm.ptr
      cf.br ^bb51
    ^bb53:
    %552 = arith.constant 50 : i32
    %553 = arith.constant 8 : i32
    %554 = arith.extsi %552 : i32 to i64
    %555 = arith.extsi %553 : i32 to i64
    %551 = func.call @calloc(%554, %555) : (i64, i64) -> !llvm.ptr
    %556 = arith.constant 0 : i32
    %557 = arith.constant 0 : i32
    %558 = arith.extsi %556 : i32 to i64
    %559 = arith.extsi %557 : i32 to i64
    %560 = llvm.getelementptr %551[%559] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %558, %560 : i64, !llvm.ptr
    %561 = arith.constant 1 : i32
    %562 = arith.constant 1 : i32
    %563 = arith.extsi %561 : i32 to i64
    %564 = arith.extsi %562 : i32 to i64
    %565 = llvm.getelementptr %551[%564] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %563, %565 : i64, !llvm.ptr
    %566 = arith.constant 2 : i32
    %567 = arith.extsi %566 : i32 to i64
    %568 = llvm.mlir.constant(1 : i64) : i64
    %569 = llvm.alloca %568 x i64 : (i64) -> !llvm.ptr
    llvm.store %567, %569 : i64, !llvm.ptr
    cf.br ^bb57
    ^bb57:
    %570 = llvm.load %569 : !llvm.ptr -> i64
    %571 = arith.constant 50 : i32
    %573 = arith.extsi %571 : i32 to i64
    %572 = arith.cmpi slt, %570, %573 : i64
    cf.cond_br %572, ^bb58, ^bb59
    ^bb58:
      %575 = llvm.load %569 : !llvm.ptr -> i64
      %576 = arith.constant 1 : i32
      %578 = arith.extsi %576 : i32 to i64
      %577 = arith.subi %575, %578 : i64
      %579 = llvm.getelementptr %551[%577] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %574 = llvm.load %579 : !llvm.ptr -> i64
      %581 = llvm.load %569 : !llvm.ptr -> i64
      %582 = arith.constant 2 : i32
      %584 = arith.extsi %582 : i32 to i64
      %583 = arith.subi %581, %584 : i64
      %585 = llvm.getelementptr %551[%583] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %580 = llvm.load %585 : !llvm.ptr -> i64
      %586 = arith.addi %574, %580 : i64
      %587 = arith.remsi %586, %440 : i64
      %588 = llvm.load %569 : !llvm.ptr -> i64
      %589 = llvm.getelementptr %551[%588] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %587, %589 : i64, !llvm.ptr
      %590 = llvm.load %569 : !llvm.ptr -> i64
      %591 = arith.constant 1 : i32
      %593 = arith.extsi %591 : i32 to i64
      %592 = arith.addi %590, %593 : i64
      llvm.store %592, %569 : i64, !llvm.ptr
      cf.br ^bb57
    ^bb59:
    %595 = arith.constant 25 : i32
    %596 = arith.extsi %595 : i32 to i64
    %597 = llvm.getelementptr %551[%596] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    %594 = llvm.load %597 : !llvm.ptr -> i64
    %598 = arith.remsi %594, %440 : i64
    %600 = arith.constant 24 : i32
    %601 = arith.extsi %600 : i32 to i64
    %602 = llvm.getelementptr %551[%601] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    %599 = llvm.load %602 : !llvm.ptr -> i64
    %603 = arith.remsi %599, %440 : i64
    %605 = arith.constant 24 : i32
    %606 = arith.extsi %605 : i32 to i64
    %607 = llvm.getelementptr %551[%606] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    %604 = llvm.load %607 : !llvm.ptr -> i64
    %608 = arith.remsi %604, %440 : i64
    %610 = arith.constant 23 : i32
    %611 = arith.extsi %610 : i32 to i64
    %612 = llvm.getelementptr %551[%611] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    %609 = llvm.load %612 : !llvm.ptr -> i64
    %613 = arith.remsi %609, %440 : i64
    %614 = arith.constant 14 : i32
    %615 = arith.extsi %614 : i32 to i64
    %617 = arith.constant 10 : i32
    %618 = arith.constant 10 : i32
    %619 = arith.muli %617, %618 : i32
    %620 = arith.constant 8 : i32
    %621 = arith.extsi %619 : i32 to i64
    %622 = arith.extsi %620 : i32 to i64
    %616 = func.call @calloc(%621, %622) : (i64, i64) -> !llvm.ptr
    %623 = arith.constant 1 : i32
    %624 = arith.constant 0 : i32
    %625 = arith.constant 10 : i32
    %626 = arith.muli %624, %625 : i32
    %627 = arith.constant 0 : i32
    %628 = arith.addi %626, %627 : i32
    %629 = arith.extsi %623 : i32 to i64
    %630 = arith.extsi %628 : i32 to i64
    %631 = llvm.getelementptr %616[%630] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %629, %631 : i64, !llvm.ptr
    %632 = arith.constant 1 : i32
    %633 = arith.constant 10 : i32
    %634 = arith.muli %632, %633 : i32
    %635 = arith.constant 1 : i32
    %636 = arith.addi %634, %635 : i32
    %637 = arith.extsi %636 : i32 to i64
    %638 = llvm.getelementptr %616[%637] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %598, %638 : i64, !llvm.ptr
    %639 = arith.constant 1 : i32
    %640 = arith.constant 10 : i32
    %641 = arith.muli %639, %640 : i32
    %642 = arith.constant 2 : i32
    %643 = arith.addi %641, %642 : i32
    %644 = arith.extsi %643 : i32 to i64
    %645 = llvm.getelementptr %616[%644] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %603, %645 : i64, !llvm.ptr
    %646 = arith.constant 2 : i32
    %647 = arith.constant 10 : i32
    %648 = arith.muli %646, %647 : i32
    %649 = arith.constant 1 : i32
    %650 = arith.addi %648, %649 : i32
    %651 = arith.extsi %650 : i32 to i64
    %652 = llvm.getelementptr %616[%651] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %608, %652 : i64, !llvm.ptr
    %653 = arith.constant 2 : i32
    %654 = arith.constant 10 : i32
    %655 = arith.muli %653, %654 : i32
    %656 = arith.constant 2 : i32
    %657 = arith.addi %655, %656 : i32
    %658 = arith.extsi %657 : i32 to i64
    %659 = llvm.getelementptr %616[%658] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %613, %659 : i64, !llvm.ptr
    %660 = arith.muli %598, %598 : i64
    %661 = arith.remsi %660, %440 : i64
    %662 = arith.constant 3 : i32
    %663 = arith.constant 10 : i32
    %664 = arith.muli %662, %663 : i32
    %665 = arith.constant 3 : i32
    %666 = arith.addi %664, %665 : i32
    %667 = arith.extsi %666 : i32 to i64
    %668 = llvm.getelementptr %616[%667] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %661, %668 : i64, !llvm.ptr
    %669 = arith.constant 2 : i32
    %671 = arith.extsi %669 : i32 to i64
    %670 = arith.muli %671, %598 : i64
    %672 = arith.muli %670, %603 : i64
    %673 = arith.remsi %672, %440 : i64
    %674 = arith.constant 3 : i32
    %675 = arith.constant 10 : i32
    %676 = arith.muli %674, %675 : i32
    %677 = arith.constant 4 : i32
    %678 = arith.addi %676, %677 : i32
    %679 = arith.extsi %678 : i32 to i64
    %680 = llvm.getelementptr %616[%679] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %673, %680 : i64, !llvm.ptr
    %681 = arith.muli %603, %603 : i64
    %682 = arith.remsi %681, %440 : i64
    %683 = arith.constant 3 : i32
    %684 = arith.constant 10 : i32
    %685 = arith.muli %683, %684 : i32
    %686 = arith.constant 5 : i32
    %687 = arith.addi %685, %686 : i32
    %688 = arith.extsi %687 : i32 to i64
    %689 = llvm.getelementptr %616[%688] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %682, %689 : i64, !llvm.ptr
    %690 = arith.muli %598, %608 : i64
    %691 = arith.remsi %690, %440 : i64
    %692 = arith.constant 4 : i32
    %693 = arith.constant 10 : i32
    %694 = arith.muli %692, %693 : i32
    %695 = arith.constant 3 : i32
    %696 = arith.addi %694, %695 : i32
    %697 = arith.extsi %696 : i32 to i64
    %698 = llvm.getelementptr %616[%697] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %691, %698 : i64, !llvm.ptr
    %699 = arith.muli %598, %613 : i64
    %700 = arith.muli %603, %608 : i64
    %701 = arith.addi %699, %700 : i64
    %702 = arith.remsi %701, %440 : i64
    %703 = arith.constant 4 : i32
    %704 = arith.constant 10 : i32
    %705 = arith.muli %703, %704 : i32
    %706 = arith.constant 4 : i32
    %707 = arith.addi %705, %706 : i32
    %708 = arith.extsi %707 : i32 to i64
    %709 = llvm.getelementptr %616[%708] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %702, %709 : i64, !llvm.ptr
    %710 = arith.muli %603, %613 : i64
    %711 = arith.remsi %710, %440 : i64
    %712 = arith.constant 4 : i32
    %713 = arith.constant 10 : i32
    %714 = arith.muli %712, %713 : i32
    %715 = arith.constant 5 : i32
    %716 = arith.addi %714, %715 : i32
    %717 = arith.extsi %716 : i32 to i64
    %718 = llvm.getelementptr %616[%717] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %711, %718 : i64, !llvm.ptr
    %719 = arith.muli %608, %608 : i64
    %720 = arith.remsi %719, %440 : i64
    %721 = arith.constant 5 : i32
    %722 = arith.constant 10 : i32
    %723 = arith.muli %721, %722 : i32
    %724 = arith.constant 3 : i32
    %725 = arith.addi %723, %724 : i32
    %726 = arith.extsi %725 : i32 to i64
    %727 = llvm.getelementptr %616[%726] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %720, %727 : i64, !llvm.ptr
    %728 = arith.constant 2 : i32
    %730 = arith.extsi %728 : i32 to i64
    %729 = arith.muli %730, %608 : i64
    %731 = arith.muli %729, %613 : i64
    %732 = arith.remsi %731, %440 : i64
    %733 = arith.constant 5 : i32
    %734 = arith.constant 10 : i32
    %735 = arith.muli %733, %734 : i32
    %736 = arith.constant 4 : i32
    %737 = arith.addi %735, %736 : i32
    %738 = arith.extsi %737 : i32 to i64
    %739 = llvm.getelementptr %616[%738] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %732, %739 : i64, !llvm.ptr
    %740 = arith.muli %613, %613 : i64
    %741 = arith.remsi %740, %440 : i64
    %742 = arith.constant 5 : i32
    %743 = arith.constant 10 : i32
    %744 = arith.muli %742, %743 : i32
    %745 = arith.constant 5 : i32
    %746 = arith.addi %744, %745 : i32
    %747 = arith.extsi %746 : i32 to i64
    %748 = llvm.getelementptr %616[%747] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %741, %748 : i64, !llvm.ptr
    %749 = arith.muli %598, %598 : i64
    %750 = arith.remsi %749, %440 : i64
    %751 = arith.muli %750, %598 : i64
    %752 = arith.remsi %751, %440 : i64
    %753 = arith.constant 6 : i32
    %754 = arith.constant 10 : i32
    %755 = arith.muli %753, %754 : i32
    %756 = arith.constant 6 : i32
    %757 = arith.addi %755, %756 : i32
    %758 = arith.extsi %757 : i32 to i64
    %759 = llvm.getelementptr %616[%758] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %752, %759 : i64, !llvm.ptr
    %760 = arith.constant 3 : i32
    %762 = arith.extsi %760 : i32 to i64
    %761 = arith.muli %762, %598 : i64
    %763 = arith.remsi %761, %440 : i64
    %764 = arith.muli %763, %598 : i64
    %765 = arith.remsi %764, %440 : i64
    %766 = arith.muli %765, %603 : i64
    %767 = arith.remsi %766, %440 : i64
    %768 = arith.constant 6 : i32
    %769 = arith.constant 10 : i32
    %770 = arith.muli %768, %769 : i32
    %771 = arith.constant 7 : i32
    %772 = arith.addi %770, %771 : i32
    %773 = arith.extsi %772 : i32 to i64
    %774 = llvm.getelementptr %616[%773] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %767, %774 : i64, !llvm.ptr
    %775 = arith.constant 3 : i32
    %777 = arith.extsi %775 : i32 to i64
    %776 = arith.muli %777, %598 : i64
    %778 = arith.remsi %776, %440 : i64
    %779 = arith.muli %778, %603 : i64
    %780 = arith.remsi %779, %440 : i64
    %781 = arith.muli %780, %603 : i64
    %782 = arith.remsi %781, %440 : i64
    %783 = arith.constant 6 : i32
    %784 = arith.constant 10 : i32
    %785 = arith.muli %783, %784 : i32
    %786 = arith.constant 8 : i32
    %787 = arith.addi %785, %786 : i32
    %788 = arith.extsi %787 : i32 to i64
    %789 = llvm.getelementptr %616[%788] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %782, %789 : i64, !llvm.ptr
    %790 = arith.muli %603, %603 : i64
    %791 = arith.remsi %790, %440 : i64
    %792 = arith.muli %791, %603 : i64
    %793 = arith.remsi %792, %440 : i64
    %794 = arith.constant 6 : i32
    %795 = arith.constant 10 : i32
    %796 = arith.muli %794, %795 : i32
    %797 = arith.constant 9 : i32
    %798 = arith.addi %796, %797 : i32
    %799 = arith.extsi %798 : i32 to i64
    %800 = llvm.getelementptr %616[%799] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %793, %800 : i64, !llvm.ptr
    %801 = arith.muli %598, %598 : i64
    %802 = arith.remsi %801, %440 : i64
    %803 = arith.muli %802, %608 : i64
    %804 = arith.remsi %803, %440 : i64
    %805 = arith.constant 7 : i32
    %806 = arith.constant 10 : i32
    %807 = arith.muli %805, %806 : i32
    %808 = arith.constant 6 : i32
    %809 = arith.addi %807, %808 : i32
    %810 = arith.extsi %809 : i32 to i64
    %811 = llvm.getelementptr %616[%810] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %804, %811 : i64, !llvm.ptr
    %812 = arith.muli %598, %598 : i64
    %813 = arith.remsi %812, %440 : i64
    %814 = arith.muli %813, %613 : i64
    %815 = arith.constant 2 : i32
    %817 = arith.extsi %815 : i32 to i64
    %816 = arith.muli %817, %598 : i64
    %818 = arith.remsi %816, %440 : i64
    %819 = arith.muli %818, %603 : i64
    %820 = arith.remsi %819, %440 : i64
    %821 = arith.muli %820, %608 : i64
    %822 = arith.addi %814, %821 : i64
    %823 = arith.remsi %822, %440 : i64
    %824 = arith.constant 7 : i32
    %825 = arith.constant 10 : i32
    %826 = arith.muli %824, %825 : i32
    %827 = arith.constant 7 : i32
    %828 = arith.addi %826, %827 : i32
    %829 = arith.extsi %828 : i32 to i64
    %830 = llvm.getelementptr %616[%829] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %823, %830 : i64, !llvm.ptr
    %831 = arith.constant 2 : i32
    %833 = arith.extsi %831 : i32 to i64
    %832 = arith.muli %833, %598 : i64
    %834 = arith.remsi %832, %440 : i64
    %835 = arith.muli %834, %603 : i64
    %836 = arith.remsi %835, %440 : i64
    %837 = arith.muli %836, %613 : i64
    %838 = arith.muli %603, %603 : i64
    %839 = arith.remsi %838, %440 : i64
    %840 = arith.muli %839, %608 : i64
    %841 = arith.addi %837, %840 : i64
    %842 = arith.remsi %841, %440 : i64
    %843 = arith.constant 7 : i32
    %844 = arith.constant 10 : i32
    %845 = arith.muli %843, %844 : i32
    %846 = arith.constant 8 : i32
    %847 = arith.addi %845, %846 : i32
    %848 = arith.extsi %847 : i32 to i64
    %849 = llvm.getelementptr %616[%848] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %842, %849 : i64, !llvm.ptr
    %850 = arith.muli %603, %603 : i64
    %851 = arith.remsi %850, %440 : i64
    %852 = arith.muli %851, %613 : i64
    %853 = arith.remsi %852, %440 : i64
    %854 = arith.constant 7 : i32
    %855 = arith.constant 10 : i32
    %856 = arith.muli %854, %855 : i32
    %857 = arith.constant 9 : i32
    %858 = arith.addi %856, %857 : i32
    %859 = arith.extsi %858 : i32 to i64
    %860 = llvm.getelementptr %616[%859] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %853, %860 : i64, !llvm.ptr
    %861 = arith.muli %598, %608 : i64
    %862 = arith.remsi %861, %440 : i64
    %863 = arith.muli %862, %608 : i64
    %864 = arith.remsi %863, %440 : i64
    %865 = arith.constant 8 : i32
    %866 = arith.constant 10 : i32
    %867 = arith.muli %865, %866 : i32
    %868 = arith.constant 6 : i32
    %869 = arith.addi %867, %868 : i32
    %870 = arith.extsi %869 : i32 to i64
    %871 = llvm.getelementptr %616[%870] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %864, %871 : i64, !llvm.ptr
    %872 = arith.constant 2 : i32
    %874 = arith.extsi %872 : i32 to i64
    %873 = arith.muli %874, %598 : i64
    %875 = arith.remsi %873, %440 : i64
    %876 = arith.muli %875, %608 : i64
    %877 = arith.remsi %876, %440 : i64
    %878 = arith.muli %877, %613 : i64
    %879 = arith.muli %603, %608 : i64
    %880 = arith.remsi %879, %440 : i64
    %881 = arith.muli %880, %608 : i64
    %882 = arith.addi %878, %881 : i64
    %883 = arith.remsi %882, %440 : i64
    %884 = arith.constant 8 : i32
    %885 = arith.constant 10 : i32
    %886 = arith.muli %884, %885 : i32
    %887 = arith.constant 7 : i32
    %888 = arith.addi %886, %887 : i32
    %889 = arith.extsi %888 : i32 to i64
    %890 = llvm.getelementptr %616[%889] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %883, %890 : i64, !llvm.ptr
    %891 = arith.muli %598, %613 : i64
    %892 = arith.remsi %891, %440 : i64
    %893 = arith.muli %892, %613 : i64
    %894 = arith.constant 2 : i32
    %896 = arith.extsi %894 : i32 to i64
    %895 = arith.muli %896, %603 : i64
    %897 = arith.remsi %895, %440 : i64
    %898 = arith.muli %897, %608 : i64
    %899 = arith.remsi %898, %440 : i64
    %900 = arith.muli %899, %613 : i64
    %901 = arith.addi %893, %900 : i64
    %902 = arith.remsi %901, %440 : i64
    %903 = arith.constant 8 : i32
    %904 = arith.constant 10 : i32
    %905 = arith.muli %903, %904 : i32
    %906 = arith.constant 8 : i32
    %907 = arith.addi %905, %906 : i32
    %908 = arith.extsi %907 : i32 to i64
    %909 = llvm.getelementptr %616[%908] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %902, %909 : i64, !llvm.ptr
    %910 = arith.muli %603, %613 : i64
    %911 = arith.remsi %910, %440 : i64
    %912 = arith.muli %911, %613 : i64
    %913 = arith.remsi %912, %440 : i64
    %914 = arith.constant 8 : i32
    %915 = arith.constant 10 : i32
    %916 = arith.muli %914, %915 : i32
    %917 = arith.constant 9 : i32
    %918 = arith.addi %916, %917 : i32
    %919 = arith.extsi %918 : i32 to i64
    %920 = llvm.getelementptr %616[%919] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %913, %920 : i64, !llvm.ptr
    %921 = arith.muli %608, %608 : i64
    %922 = arith.remsi %921, %440 : i64
    %923 = arith.muli %922, %608 : i64
    %924 = arith.remsi %923, %440 : i64
    %925 = arith.constant 9 : i32
    %926 = arith.constant 10 : i32
    %927 = arith.muli %925, %926 : i32
    %928 = arith.constant 6 : i32
    %929 = arith.addi %927, %928 : i32
    %930 = arith.extsi %929 : i32 to i64
    %931 = llvm.getelementptr %616[%930] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %924, %931 : i64, !llvm.ptr
    %932 = arith.constant 3 : i32
    %934 = arith.extsi %932 : i32 to i64
    %933 = arith.muli %934, %608 : i64
    %935 = arith.remsi %933, %440 : i64
    %936 = arith.muli %935, %608 : i64
    %937 = arith.remsi %936, %440 : i64
    %938 = arith.muli %937, %613 : i64
    %939 = arith.remsi %938, %440 : i64
    %940 = arith.constant 9 : i32
    %941 = arith.constant 10 : i32
    %942 = arith.muli %940, %941 : i32
    %943 = arith.constant 7 : i32
    %944 = arith.addi %942, %943 : i32
    %945 = arith.extsi %944 : i32 to i64
    %946 = llvm.getelementptr %616[%945] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %939, %946 : i64, !llvm.ptr
    %947 = arith.constant 3 : i32
    %949 = arith.extsi %947 : i32 to i64
    %948 = arith.muli %949, %608 : i64
    %950 = arith.remsi %948, %440 : i64
    %951 = arith.muli %950, %613 : i64
    %952 = arith.remsi %951, %440 : i64
    %953 = arith.muli %952, %613 : i64
    %954 = arith.remsi %953, %440 : i64
    %955 = arith.constant 9 : i32
    %956 = arith.constant 10 : i32
    %957 = arith.muli %955, %956 : i32
    %958 = arith.constant 8 : i32
    %959 = arith.addi %957, %958 : i32
    %960 = arith.extsi %959 : i32 to i64
    %961 = llvm.getelementptr %616[%960] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %954, %961 : i64, !llvm.ptr
    %962 = arith.muli %613, %613 : i64
    %963 = arith.remsi %962, %440 : i64
    %964 = arith.muli %963, %613 : i64
    %965 = arith.remsi %964, %440 : i64
    %966 = arith.constant 9 : i32
    %967 = arith.constant 10 : i32
    %968 = arith.muli %966, %967 : i32
    %969 = arith.constant 9 : i32
    %970 = arith.addi %968, %969 : i32
    %971 = arith.extsi %970 : i32 to i64
    %972 = llvm.getelementptr %616[%971] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %965, %972 : i64, !llvm.ptr
    %974 = arith.muli %615, %615 : i64
    %975 = arith.constant 8 : i32
    %976 = arith.extsi %975 : i32 to i64
    %973 = func.call @calloc(%974, %976) : (i64, i64) -> !llvm.ptr
    %977 = arith.constant 0 : i32
    %978 = arith.extsi %977 : i32 to i64
    %979 = llvm.mlir.constant(1 : i64) : i64
    %980 = llvm.alloca %979 x i64 : (i64) -> !llvm.ptr
    llvm.store %978, %980 : i64, !llvm.ptr
    %981 = arith.constant 0 : i32
    %982 = arith.extsi %981 : i32 to i64
    %983 = llvm.mlir.constant(1 : i64) : i64
    %984 = llvm.alloca %983 x i64 : (i64) -> !llvm.ptr
    llvm.store %982, %984 : i64, !llvm.ptr
    cf.br ^bb60
    ^bb60:
    %985 = llvm.load %980 : !llvm.ptr -> i64
    %986 = arith.constant 10 : i32
    %988 = arith.extsi %986 : i32 to i64
    %987 = arith.cmpi slt, %985, %988 : i64
    cf.cond_br %987, ^bb61, ^bb62
    ^bb61:
      %989 = arith.constant 0 : i32
      %990 = arith.extsi %989 : i32 to i64
      llvm.store %990, %984 : i64, !llvm.ptr
      cf.br ^bb63
      ^bb63:
      %991 = llvm.load %984 : !llvm.ptr -> i64
      %992 = arith.constant 10 : i32
      %994 = arith.extsi %992 : i32 to i64
      %993 = arith.cmpi slt, %991, %994 : i64
      cf.cond_br %993, ^bb64, ^bb65
      ^bb64:
        %996 = llvm.load %980 : !llvm.ptr -> i64
        %997 = arith.constant 10 : i32
        %999 = arith.extsi %997 : i32 to i64
        %998 = arith.muli %996, %999 : i64
        %1000 = llvm.load %984 : !llvm.ptr -> i64
        %1001 = arith.addi %998, %1000 : i64
        %1002 = llvm.getelementptr %616[%1001] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %995 = llvm.load %1002 : !llvm.ptr -> i64
        %1003 = llvm.load %980 : !llvm.ptr -> i64
        %1004 = arith.muli %1003, %615 : i64
        %1005 = llvm.load %984 : !llvm.ptr -> i64
        %1006 = arith.addi %1004, %1005 : i64
        %1007 = llvm.getelementptr %973[%1006] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %995, %1007 : i64, !llvm.ptr
        %1008 = llvm.load %984 : !llvm.ptr -> i64
        %1009 = arith.constant 1 : i32
        %1011 = arith.extsi %1009 : i32 to i64
        %1010 = arith.addi %1008, %1011 : i64
        llvm.store %1010, %984 : i64, !llvm.ptr
        cf.br ^bb63
      ^bb65:
      %1012 = llvm.load %980 : !llvm.ptr -> i64
      %1013 = arith.constant 1 : i32
      %1015 = arith.extsi %1013 : i32 to i64
      %1014 = arith.addi %1012, %1015 : i64
      llvm.store %1014, %980 : i64, !llvm.ptr
      cf.br ^bb60
    ^bb62:
    %1016 = arith.constant 1 : i32
    %1017 = arith.constant 10 : i32
    %1019 = arith.extsi %1017 : i32 to i64
    %1018 = arith.muli %1019, %615 : i64
    %1020 = arith.constant 0 : i32
    %1022 = arith.extsi %1020 : i32 to i64
    %1021 = arith.addi %1018, %1022 : i64
    %1023 = arith.extsi %1016 : i32 to i64
    %1024 = llvm.getelementptr %973[%1021] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1023, %1024 : i64, !llvm.ptr
    %1025 = arith.constant 1 : i32
    %1026 = arith.constant 10 : i32
    %1028 = arith.extsi %1026 : i32 to i64
    %1027 = arith.muli %1028, %615 : i64
    %1029 = arith.constant 10 : i32
    %1031 = arith.extsi %1029 : i32 to i64
    %1030 = arith.addi %1027, %1031 : i64
    %1032 = arith.extsi %1025 : i32 to i64
    %1033 = llvm.getelementptr %973[%1030] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1032, %1033 : i64, !llvm.ptr
    %1034 = arith.constant 0 : i32
    %1035 = arith.extsi %1034 : i32 to i64
    llvm.store %1035, %984 : i64, !llvm.ptr
    cf.br ^bb66
    ^bb66:
    %1036 = llvm.load %984 : !llvm.ptr -> i64
    %1037 = arith.constant 10 : i32
    %1039 = arith.extsi %1037 : i32 to i64
    %1038 = arith.cmpi slt, %1036, %1039 : i64
    cf.cond_br %1038, ^bb67, ^bb68
    ^bb67:
      %1041 = arith.constant 2 : i32
      %1042 = arith.constant 10 : i32
      %1043 = arith.muli %1041, %1042 : i32
      %1044 = llvm.load %984 : !llvm.ptr -> i64
      %1046 = arith.extsi %1043 : i32 to i64
      %1045 = arith.addi %1046, %1044 : i64
      %1047 = llvm.getelementptr %616[%1045] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1040 = llvm.load %1047 : !llvm.ptr -> i64
      %1048 = arith.constant 11 : i32
      %1050 = arith.extsi %1048 : i32 to i64
      %1049 = arith.muli %1050, %615 : i64
      %1051 = llvm.load %984 : !llvm.ptr -> i64
      %1052 = arith.addi %1049, %1051 : i64
      %1053 = llvm.getelementptr %973[%1052] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1040, %1053 : i64, !llvm.ptr
      %1055 = arith.constant 5 : i32
      %1056 = arith.constant 10 : i32
      %1057 = arith.muli %1055, %1056 : i32
      %1058 = llvm.load %984 : !llvm.ptr -> i64
      %1060 = arith.extsi %1057 : i32 to i64
      %1059 = arith.addi %1060, %1058 : i64
      %1061 = llvm.getelementptr %616[%1059] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1054 = llvm.load %1061 : !llvm.ptr -> i64
      %1062 = arith.constant 12 : i32
      %1064 = arith.extsi %1062 : i32 to i64
      %1063 = arith.muli %1064, %615 : i64
      %1065 = llvm.load %984 : !llvm.ptr -> i64
      %1066 = arith.addi %1063, %1065 : i64
      %1067 = llvm.getelementptr %973[%1066] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1054, %1067 : i64, !llvm.ptr
      %1069 = arith.constant 9 : i32
      %1070 = arith.constant 10 : i32
      %1071 = arith.muli %1069, %1070 : i32
      %1072 = llvm.load %984 : !llvm.ptr -> i64
      %1074 = arith.extsi %1071 : i32 to i64
      %1073 = arith.addi %1074, %1072 : i64
      %1075 = llvm.getelementptr %616[%1073] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1068 = llvm.load %1075 : !llvm.ptr -> i64
      %1076 = arith.constant 13 : i32
      %1078 = arith.extsi %1076 : i32 to i64
      %1077 = arith.muli %1078, %615 : i64
      %1079 = llvm.load %984 : !llvm.ptr -> i64
      %1080 = arith.addi %1077, %1079 : i64
      %1081 = llvm.getelementptr %973[%1080] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1068, %1081 : i64, !llvm.ptr
      %1082 = llvm.load %984 : !llvm.ptr -> i64
      %1083 = arith.constant 1 : i32
      %1085 = arith.extsi %1083 : i32 to i64
      %1084 = arith.addi %1082, %1085 : i64
      llvm.store %1084, %984 : i64, !llvm.ptr
      cf.br ^bb66
    ^bb68:
    %1086 = arith.constant 1 : i32
    %1087 = arith.constant 11 : i32
    %1089 = arith.extsi %1087 : i32 to i64
    %1088 = arith.muli %1089, %615 : i64
    %1090 = arith.constant 11 : i32
    %1092 = arith.extsi %1090 : i32 to i64
    %1091 = arith.addi %1088, %1092 : i64
    %1093 = arith.extsi %1086 : i32 to i64
    %1094 = llvm.getelementptr %973[%1091] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1093, %1094 : i64, !llvm.ptr
    %1095 = arith.constant 1 : i32
    %1096 = arith.constant 12 : i32
    %1098 = arith.extsi %1096 : i32 to i64
    %1097 = arith.muli %1098, %615 : i64
    %1099 = arith.constant 12 : i32
    %1101 = arith.extsi %1099 : i32 to i64
    %1100 = arith.addi %1097, %1101 : i64
    %1102 = arith.extsi %1095 : i32 to i64
    %1103 = llvm.getelementptr %973[%1100] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1102, %1103 : i64, !llvm.ptr
    %1104 = arith.constant 1 : i32
    %1105 = arith.constant 13 : i32
    %1107 = arith.extsi %1105 : i32 to i64
    %1106 = arith.muli %1107, %615 : i64
    %1108 = arith.constant 13 : i32
    %1110 = arith.extsi %1108 : i32 to i64
    %1109 = arith.addi %1106, %1110 : i64
    %1111 = arith.extsi %1104 : i32 to i64
    %1112 = llvm.getelementptr %973[%1109] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1111, %1112 : i64, !llvm.ptr
    %1113 = arith.constant 50 : i32
    %1114 = arith.extsi %1113 : i32 to i64
    %1116 = arith.muli %1114, %615 : i64
    %1117 = arith.muli %1116, %615 : i64
    %1118 = arith.constant 8 : i32
    %1119 = arith.extsi %1118 : i32 to i64
    %1115 = func.call @calloc(%1117, %1119) : (i64, i64) -> !llvm.ptr
    %1120 = arith.constant 0 : i32
    %1121 = arith.extsi %1120 : i32 to i64
    llvm.store %1121, %980 : i64, !llvm.ptr
    cf.br ^bb69
    ^bb69:
    %1122 = llvm.load %980 : !llvm.ptr -> i64
    %1123 = arith.muli %615, %615 : i64
    %1124 = arith.cmpi slt, %1122, %1123 : i64
    cf.cond_br %1124, ^bb70, ^bb71
    ^bb70:
      %1126 = llvm.load %980 : !llvm.ptr -> i64
      %1127 = llvm.getelementptr %973[%1126] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1125 = llvm.load %1127 : !llvm.ptr -> i64
      %1128 = llvm.load %980 : !llvm.ptr -> i64
      %1129 = llvm.getelementptr %1115[%1128] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1125, %1129 : i64, !llvm.ptr
      %1130 = llvm.load %980 : !llvm.ptr -> i64
      %1131 = arith.constant 1 : i32
      %1133 = arith.extsi %1131 : i32 to i64
      %1132 = arith.addi %1130, %1133 : i64
      llvm.store %1132, %980 : i64, !llvm.ptr
      cf.br ^bb69
    ^bb71:
    %1134 = arith.constant 1 : i32
    %1135 = arith.extsi %1134 : i32 to i64
    %1136 = llvm.mlir.constant(1 : i64) : i64
    %1137 = llvm.alloca %1136 x i64 : (i64) -> !llvm.ptr
    llvm.store %1135, %1137 : i64, !llvm.ptr
    %1139 = arith.muli %615, %615 : i64
    %1140 = arith.constant 8 : i32
    %1141 = arith.extsi %1140 : i32 to i64
    %1138 = func.call @calloc(%1139, %1141) : (i64, i64) -> !llvm.ptr
    cf.br ^bb72
    ^bb72:
    %1142 = llvm.load %1137 : !llvm.ptr -> i64
    %1143 = arith.cmpi slt, %1142, %1114 : i64
    cf.cond_br %1143, ^bb73, ^bb74
    ^bb73:
      %1144 = llvm.load %1137 : !llvm.ptr -> i64
      %1145 = arith.constant 1 : i32
      %1147 = arith.extsi %1145 : i32 to i64
      %1146 = arith.subi %1144, %1147 : i64
      %1148 = arith.muli %1146, %615 : i64
      %1149 = arith.muli %1148, %615 : i64
      %1150 = llvm.mlir.constant(1 : i64) : i64
      %1151 = llvm.alloca %1150 x i64 : (i64) -> !llvm.ptr
      llvm.store %1149, %1151 : i64, !llvm.ptr
      %1153 = arith.muli %615, %615 : i64
      %1154 = arith.constant 8 : i32
      %1155 = arith.extsi %1154 : i32 to i64
      %1152 = func.call @calloc(%1153, %1155) : (i64, i64) -> !llvm.ptr
      %1157 = arith.muli %615, %615 : i64
      %1158 = arith.constant 8 : i32
      %1159 = arith.extsi %1158 : i32 to i64
      %1156 = func.call @calloc(%1157, %1159) : (i64, i64) -> !llvm.ptr
      %1160 = arith.constant 0 : i32
      %1161 = arith.extsi %1160 : i32 to i64
      llvm.store %1161, %980 : i64, !llvm.ptr
      cf.br ^bb75
      ^bb75:
      %1162 = llvm.load %980 : !llvm.ptr -> i64
      %1163 = arith.muli %615, %615 : i64
      %1164 = arith.cmpi slt, %1162, %1163 : i64
      cf.cond_br %1164, ^bb76, ^bb77
      ^bb76:
        %1166 = llvm.load %1151 : !llvm.ptr -> i64
        %1167 = llvm.load %980 : !llvm.ptr -> i64
        %1168 = arith.addi %1166, %1167 : i64
        %1169 = llvm.getelementptr %1115[%1168] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1165 = llvm.load %1169 : !llvm.ptr -> i64
        %1170 = llvm.load %980 : !llvm.ptr -> i64
        %1171 = llvm.getelementptr %1152[%1170] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1165, %1171 : i64, !llvm.ptr
        %1173 = llvm.load %1151 : !llvm.ptr -> i64
        %1174 = llvm.load %980 : !llvm.ptr -> i64
        %1175 = arith.addi %1173, %1174 : i64
        %1176 = llvm.getelementptr %1115[%1175] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1172 = llvm.load %1176 : !llvm.ptr -> i64
        %1177 = llvm.load %980 : !llvm.ptr -> i64
        %1178 = llvm.getelementptr %1156[%1177] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1172, %1178 : i64, !llvm.ptr
        %1179 = llvm.load %980 : !llvm.ptr -> i64
        %1180 = arith.constant 1 : i32
        %1182 = arith.extsi %1180 : i32 to i64
        %1181 = arith.addi %1179, %1182 : i64
        llvm.store %1181, %980 : i64, !llvm.ptr
        cf.br ^bb75
      ^bb77:
      func.call @mat_mul(%1152, %1156, %1138, %615, %440) : (!llvm.ptr, !llvm.ptr, !llvm.ptr, i64, i64) -> ()
      func.call @free(%1152) : (!llvm.ptr) -> ()
      func.call @free(%1156) : (!llvm.ptr) -> ()
      %1186 = arith.constant 0 : i32
      %1187 = arith.extsi %1186 : i32 to i64
      llvm.store %1187, %980 : i64, !llvm.ptr
      cf.br ^bb78
      ^bb78:
      %1188 = llvm.load %980 : !llvm.ptr -> i64
      %1189 = arith.muli %615, %615 : i64
      %1190 = arith.cmpi slt, %1188, %1189 : i64
      cf.cond_br %1190, ^bb79, ^bb80
      ^bb79:
        %1192 = llvm.load %980 : !llvm.ptr -> i64
        %1193 = llvm.getelementptr %1138[%1192] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1191 = llvm.load %1193 : !llvm.ptr -> i64
        %1194 = llvm.load %1137 : !llvm.ptr -> i64
        %1195 = arith.muli %1194, %615 : i64
        %1196 = arith.muli %1195, %615 : i64
        %1197 = llvm.load %980 : !llvm.ptr -> i64
        %1198 = arith.addi %1196, %1197 : i64
        %1199 = llvm.getelementptr %1115[%1198] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1191, %1199 : i64, !llvm.ptr
        %1200 = llvm.load %980 : !llvm.ptr -> i64
        %1201 = arith.constant 1 : i32
        %1203 = arith.extsi %1201 : i32 to i64
        %1202 = arith.addi %1200, %1203 : i64
        llvm.store %1202, %980 : i64, !llvm.ptr
        cf.br ^bb78
      ^bb80:
      %1204 = llvm.load %1137 : !llvm.ptr -> i64
      %1205 = arith.constant 1 : i32
      %1207 = arith.extsi %1205 : i32 to i64
      %1206 = arith.addi %1204, %1207 : i64
      llvm.store %1206, %1137 : i64, !llvm.ptr
      cf.br ^bb72
    ^bb74:
    %1209 = arith.constant 24 : i32
    %1210 = arith.constant 8 : i32
    %1211 = arith.extsi %1209 : i32 to i64
    %1212 = arith.extsi %1210 : i32 to i64
    %1208 = func.call @calloc(%1211, %1212) : (i64, i64) -> !llvm.ptr
    %1213 = arith.constant 0 : i32
    %1214 = arith.constant 0 : i32
    %1215 = arith.extsi %1213 : i32 to i64
    %1216 = arith.extsi %1214 : i32 to i64
    %1217 = llvm.getelementptr %1208[%1216] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1215, %1217 : i64, !llvm.ptr
    %1218 = arith.constant 1 : i32
    %1219 = arith.constant 1 : i32
    %1220 = arith.extsi %1218 : i32 to i64
    %1221 = arith.extsi %1219 : i32 to i64
    %1222 = llvm.getelementptr %1208[%1221] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1220, %1222 : i64, !llvm.ptr
    %1223 = arith.constant 2 : i32
    %1224 = arith.extsi %1223 : i32 to i64
    llvm.store %1224, %569 : i64, !llvm.ptr
    cf.br ^bb81
    ^bb81:
    %1225 = llvm.load %569 : !llvm.ptr -> i64
    %1226 = arith.constant 24 : i32
    %1228 = arith.extsi %1226 : i32 to i64
    %1227 = arith.cmpi slt, %1225, %1228 : i64
    cf.cond_br %1227, ^bb82, ^bb83
    ^bb82:
      %1230 = llvm.load %569 : !llvm.ptr -> i64
      %1231 = arith.constant 1 : i32
      %1233 = arith.extsi %1231 : i32 to i64
      %1232 = arith.subi %1230, %1233 : i64
      %1234 = llvm.getelementptr %1208[%1232] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1229 = llvm.load %1234 : !llvm.ptr -> i64
      %1236 = llvm.load %569 : !llvm.ptr -> i64
      %1237 = arith.constant 2 : i32
      %1239 = arith.extsi %1237 : i32 to i64
      %1238 = arith.subi %1236, %1239 : i64
      %1240 = llvm.getelementptr %1208[%1238] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1235 = llvm.load %1240 : !llvm.ptr -> i64
      %1241 = arith.addi %1229, %1235 : i64
      %1242 = arith.constant 24 : i32
      %1244 = arith.extsi %1242 : i32 to i64
      %1243 = arith.remsi %1241, %1244 : i64
      %1245 = llvm.load %569 : !llvm.ptr -> i64
      %1246 = llvm.getelementptr %1208[%1245] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1243, %1246 : i64, !llvm.ptr
      %1247 = llvm.load %569 : !llvm.ptr -> i64
      %1248 = arith.constant 1 : i32
      %1250 = arith.extsi %1248 : i32 to i64
      %1249 = arith.addi %1247, %1250 : i64
      llvm.store %1249, %569 : i64, !llvm.ptr
      cf.br ^bb81
    ^bb83:
    %1251 = arith.constant 6 : i32
    %1253 = arith.extsi %1251 : i32 to i64
    %1252 = arith.muli %1253, %430 : i64
    %1254 = arith.constant 24 : i32
    %1256 = arith.extsi %1254 : i32 to i64
    %1255 = arith.muli %1256, %1252 : i64
    %1257 = arith.constant 24 : i32
    %1258 = arith.constant 24 : i32
    %1259 = arith.muli %1257, %1258 : i32
    %1261 = arith.extsi %1259 : i32 to i64
    %1260 = arith.muli %1261, %1252 : i64
    %1262 = arith.constant 24 : i32
    %1263 = arith.constant 24 : i32
    %1264 = arith.muli %1262, %1263 : i32
    %1265 = arith.constant 24 : i32
    %1266 = arith.muli %1264, %1265 : i32
    %1268 = arith.extsi %1266 : i32 to i64
    %1267 = arith.muli %1268, %1252 : i64
    %1269 = arith.constant 0 : i32
    %1270 = arith.extsi %1269 : i32 to i64
    %1271 = llvm.mlir.constant(1 : i64) : i64
    %1272 = llvm.alloca %1271 x i64 : (i64) -> !llvm.ptr
    llvm.store %1270, %1272 : i64, !llvm.ptr
    %1273 = arith.constant 0 : i32
    %1274 = arith.extsi %1273 : i32 to i64
    %1275 = llvm.mlir.constant(1 : i64) : i64
    %1276 = llvm.alloca %1275 x i64 : (i64) -> !llvm.ptr
    llvm.store %1274, %1276 : i64, !llvm.ptr
    %1278 = arith.constant 8 : i32
    %1279 = arith.extsi %1278 : i32 to i64
    %1277 = func.call @calloc(%615, %1279) : (i64, i64) -> !llvm.ptr
    %1281 = arith.constant 8 : i32
    %1282 = arith.extsi %1281 : i32 to i64
    %1280 = func.call @calloc(%615, %1282) : (i64, i64) -> !llvm.ptr
    cf.br ^bb84
    ^bb84:
    %1283 = llvm.load %1276 : !llvm.ptr -> i64
    %1284 = arith.constant 24 : i32
    %1286 = arith.extsi %1284 : i32 to i64
    %1285 = arith.cmpi slt, %1283, %1286 : i64
    cf.cond_br %1285, ^bb85, ^bb86
    ^bb85:
      %1287 = llvm.load %1276 : !llvm.ptr -> i64
      %1288 = llvm.mlir.constant(1 : i64) : i64
      %1289 = llvm.alloca %1288 x i64 : (i64) -> !llvm.ptr
      llvm.store %1287, %1289 : i64, !llvm.ptr
      %1290 = llvm.load %1289 : !llvm.ptr -> i64
      %1291 = arith.constant 2 : i32
      %1293 = arith.extsi %1291 : i32 to i64
      %1292 = arith.cmpi slt, %1290, %1293 : i64
      cf.cond_br %1292, ^bb87, ^bb88
      ^bb87:
        %1294 = llvm.load %1276 : !llvm.ptr -> i64
        %1295 = arith.constant 24 : i32
        %1297 = arith.extsi %1295 : i32 to i64
        %1296 = arith.addi %1294, %1297 : i64
        llvm.store %1296, %1289 : i64, !llvm.ptr
        cf.br ^bb89
      ^bb88:
        cf.br ^bb89
      ^bb89:
      %1298 = llvm.load %1289 : !llvm.ptr -> i64
      %1299 = arith.cmpi sle, %1298, %432 : i64
      cf.cond_br %1299, ^bb90, ^bb91
      ^bb90:
        %1300 = arith.constant 1 : i32
        %1301 = llvm.load %1289 : !llvm.ptr -> i64
        %1302 = arith.subi %432, %1301 : i64
        %1303 = arith.constant 24 : i32
        %1305 = arith.extsi %1303 : i32 to i64
        %1304 = arith.divsi %1302, %1305 : i64
        %1307 = arith.extsi %1300 : i32 to i64
        %1306 = arith.addi %1307, %1304 : i64
        %1309 = llvm.load %1289 : !llvm.ptr -> i64
        %1310 = arith.constant 1 : i32
        %1312 = arith.extsi %1310 : i32 to i64
        %1311 = arith.addi %1309, %1312 : i64
        %1313 = llvm.getelementptr %551[%1311] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1308 = llvm.load %1313 : !llvm.ptr -> i64
        %1315 = llvm.load %1289 : !llvm.ptr -> i64
        %1316 = llvm.getelementptr %551[%1315] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1314 = llvm.load %1316 : !llvm.ptr -> i64
        %1317 = arith.constant 0 : i32
        %1318 = arith.extsi %1317 : i32 to i64
        %1319 = llvm.mlir.constant(1 : i64) : i64
        %1320 = llvm.alloca %1319 x i64 : (i64) -> !llvm.ptr
        llvm.store %1318, %1320 : i64, !llvm.ptr
        cf.br ^bb93
        ^bb93:
        %1321 = llvm.load %1320 : !llvm.ptr -> i64
        %1322 = arith.cmpi slt, %1321, %615 : i64
        cf.cond_br %1322, ^bb94, ^bb95
        ^bb94:
          %1323 = arith.constant 0 : i32
          %1324 = llvm.load %1320 : !llvm.ptr -> i64
          %1325 = arith.extsi %1323 : i32 to i64
          %1326 = llvm.getelementptr %1277[%1324] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1325, %1326 : i64, !llvm.ptr
          %1327 = llvm.load %1320 : !llvm.ptr -> i64
          %1328 = arith.constant 1 : i32
          %1330 = arith.extsi %1328 : i32 to i64
          %1329 = arith.addi %1327, %1330 : i64
          llvm.store %1329, %1320 : i64, !llvm.ptr
          cf.br ^bb93
        ^bb95:
        %1331 = arith.constant 1 : i32
        %1332 = arith.constant 0 : i32
        %1333 = arith.extsi %1331 : i32 to i64
        %1334 = arith.extsi %1332 : i32 to i64
        %1335 = llvm.getelementptr %1277[%1334] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1333, %1335 : i64, !llvm.ptr
        %1336 = arith.constant 1 : i32
        %1337 = arith.extsi %1336 : i32 to i64
        %1338 = llvm.getelementptr %1277[%1337] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1308, %1338 : i64, !llvm.ptr
        %1339 = arith.constant 2 : i32
        %1340 = arith.extsi %1339 : i32 to i64
        %1341 = llvm.getelementptr %1277[%1340] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1314, %1341 : i64, !llvm.ptr
        %1342 = arith.muli %1308, %1308 : i64
        %1343 = arith.remsi %1342, %440 : i64
        %1344 = arith.constant 3 : i32
        %1345 = arith.extsi %1344 : i32 to i64
        %1346 = llvm.getelementptr %1277[%1345] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1343, %1346 : i64, !llvm.ptr
        %1347 = arith.muli %1308, %1314 : i64
        %1348 = arith.remsi %1347, %440 : i64
        %1349 = arith.constant 4 : i32
        %1350 = arith.extsi %1349 : i32 to i64
        %1351 = llvm.getelementptr %1277[%1350] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1348, %1351 : i64, !llvm.ptr
        %1352 = arith.muli %1314, %1314 : i64
        %1353 = arith.remsi %1352, %440 : i64
        %1354 = arith.constant 5 : i32
        %1355 = arith.extsi %1354 : i32 to i64
        %1356 = llvm.getelementptr %1277[%1355] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1353, %1356 : i64, !llvm.ptr
        %1358 = arith.constant 3 : i32
        %1359 = arith.extsi %1358 : i32 to i64
        %1360 = llvm.getelementptr %1277[%1359] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1357 = llvm.load %1360 : !llvm.ptr -> i64
        %1361 = arith.muli %1357, %1308 : i64
        %1362 = arith.remsi %1361, %440 : i64
        %1363 = arith.constant 6 : i32
        %1364 = arith.extsi %1363 : i32 to i64
        %1365 = llvm.getelementptr %1277[%1364] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1362, %1365 : i64, !llvm.ptr
        %1367 = arith.constant 3 : i32
        %1368 = arith.extsi %1367 : i32 to i64
        %1369 = llvm.getelementptr %1277[%1368] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1366 = llvm.load %1369 : !llvm.ptr -> i64
        %1370 = arith.muli %1366, %1314 : i64
        %1371 = arith.remsi %1370, %440 : i64
        %1372 = arith.constant 7 : i32
        %1373 = arith.extsi %1372 : i32 to i64
        %1374 = llvm.getelementptr %1277[%1373] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1371, %1374 : i64, !llvm.ptr
        %1376 = arith.constant 5 : i32
        %1377 = arith.extsi %1376 : i32 to i64
        %1378 = llvm.getelementptr %1277[%1377] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1375 = llvm.load %1378 : !llvm.ptr -> i64
        %1379 = arith.muli %1375, %1308 : i64
        %1380 = arith.remsi %1379, %440 : i64
        %1381 = arith.constant 8 : i32
        %1382 = arith.extsi %1381 : i32 to i64
        %1383 = llvm.getelementptr %1277[%1382] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1380, %1383 : i64, !llvm.ptr
        %1385 = arith.constant 5 : i32
        %1386 = arith.extsi %1385 : i32 to i64
        %1387 = llvm.getelementptr %1277[%1386] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1384 = llvm.load %1387 : !llvm.ptr -> i64
        %1388 = arith.muli %1384, %1314 : i64
        %1389 = arith.remsi %1388, %440 : i64
        %1390 = arith.constant 9 : i32
        %1391 = arith.extsi %1390 : i32 to i64
        %1392 = llvm.getelementptr %1277[%1391] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1389, %1392 : i64, !llvm.ptr
        %1393 = arith.constant 1 : i32
        %1394 = arith.constant 10 : i32
        %1395 = arith.extsi %1393 : i32 to i64
        %1396 = arith.extsi %1394 : i32 to i64
        %1397 = llvm.getelementptr %1277[%1396] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1395, %1397 : i64, !llvm.ptr
        %1398 = arith.constant 11 : i32
        %1399 = arith.extsi %1398 : i32 to i64
        %1400 = llvm.getelementptr %1277[%1399] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1314, %1400 : i64, !llvm.ptr
        %1402 = arith.constant 5 : i32
        %1403 = arith.extsi %1402 : i32 to i64
        %1404 = llvm.getelementptr %1277[%1403] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1401 = llvm.load %1404 : !llvm.ptr -> i64
        %1405 = arith.constant 12 : i32
        %1406 = arith.extsi %1405 : i32 to i64
        %1407 = llvm.getelementptr %1277[%1406] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1401, %1407 : i64, !llvm.ptr
        %1409 = arith.constant 9 : i32
        %1410 = arith.extsi %1409 : i32 to i64
        %1411 = llvm.getelementptr %1277[%1410] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1408 = llvm.load %1411 : !llvm.ptr -> i64
        %1412 = arith.constant 13 : i32
        %1413 = arith.extsi %1412 : i32 to i64
        %1414 = llvm.getelementptr %1277[%1413] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1408, %1414 : i64, !llvm.ptr
        %1415 = arith.constant 1 : i32
        %1417 = arith.extsi %1415 : i32 to i64
        %1416 = arith.subi %1306, %1417 : i64
        %1418 = llvm.mlir.constant(1 : i64) : i64
        %1419 = llvm.alloca %1418 x i64 : (i64) -> !llvm.ptr
        llvm.store %1416, %1419 : i64, !llvm.ptr
        %1420 = arith.constant 0 : i32
        %1421 = arith.extsi %1420 : i32 to i64
        llvm.store %1421, %1137 : i64, !llvm.ptr
        cf.br ^bb96
        ^bb96:
        %1422 = llvm.load %1419 : !llvm.ptr -> i64
        %1423 = arith.constant 0 : i32
        %1425 = arith.extsi %1423 : i32 to i64
        %1424 = arith.cmpi sgt, %1422, %1425 : i64
        cf.cond_br %1424, ^bb97, ^bb98
        ^bb97:
          %1426 = llvm.load %1419 : !llvm.ptr -> i64
          %1427 = arith.constant 1 : i32
          %1429 = arith.extsi %1427 : i32 to i64
          %1428 = arith.andi %1426, %1429 : i64
          %1430 = arith.constant 1 : i32
          %1432 = arith.extsi %1430 : i32 to i64
          %1431 = arith.cmpi eq, %1428, %1432 : i64
          cf.cond_br %1431, ^bb99, ^bb100
          ^bb99:
            %1433 = llvm.load %1137 : !llvm.ptr -> i64
            %1434 = arith.muli %1433, %615 : i64
            %1435 = arith.muli %1434, %615 : i64
            %1436 = llvm.mlir.constant(1 : i64) : i64
            %1437 = llvm.alloca %1436 x i64 : (i64) -> !llvm.ptr
            llvm.store %1435, %1437 : i64, !llvm.ptr
            %1439 = arith.muli %615, %615 : i64
            %1440 = arith.constant 8 : i32
            %1441 = arith.extsi %1440 : i32 to i64
            %1438 = func.call @calloc(%1439, %1441) : (i64, i64) -> !llvm.ptr
            %1442 = arith.constant 0 : i32
            %1443 = arith.extsi %1442 : i32 to i64
            llvm.store %1443, %1320 : i64, !llvm.ptr
            cf.br ^bb102
            ^bb102:
            %1444 = llvm.load %1320 : !llvm.ptr -> i64
            %1445 = arith.muli %615, %615 : i64
            %1446 = arith.cmpi slt, %1444, %1445 : i64
            cf.cond_br %1446, ^bb103, ^bb104
            ^bb103:
              %1448 = llvm.load %1437 : !llvm.ptr -> i64
              %1449 = llvm.load %1320 : !llvm.ptr -> i64
              %1450 = arith.addi %1448, %1449 : i64
              %1451 = llvm.getelementptr %1115[%1450] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %1447 = llvm.load %1451 : !llvm.ptr -> i64
              %1452 = llvm.load %1320 : !llvm.ptr -> i64
              %1453 = llvm.getelementptr %1438[%1452] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              llvm.store %1447, %1453 : i64, !llvm.ptr
              %1454 = llvm.load %1320 : !llvm.ptr -> i64
              %1455 = arith.constant 1 : i32
              %1457 = arith.extsi %1455 : i32 to i64
              %1456 = arith.addi %1454, %1457 : i64
              llvm.store %1456, %1320 : i64, !llvm.ptr
              cf.br ^bb102
            ^bb104:
            func.call @mat_vec(%1438, %1277, %1280, %615, %440) : (!llvm.ptr, !llvm.ptr, !llvm.ptr, i64, i64) -> ()
            func.call @free(%1438) : (!llvm.ptr) -> ()
            %1460 = arith.constant 0 : i32
            %1461 = arith.extsi %1460 : i32 to i64
            llvm.store %1461, %1320 : i64, !llvm.ptr
            cf.br ^bb105
            ^bb105:
            %1462 = llvm.load %1320 : !llvm.ptr -> i64
            %1463 = arith.cmpi slt, %1462, %615 : i64
            cf.cond_br %1463, ^bb106, ^bb107
            ^bb106:
              %1465 = llvm.load %1320 : !llvm.ptr -> i64
              %1466 = llvm.getelementptr %1280[%1465] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %1464 = llvm.load %1466 : !llvm.ptr -> i64
              %1467 = llvm.load %1320 : !llvm.ptr -> i64
              %1468 = llvm.getelementptr %1277[%1467] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              llvm.store %1464, %1468 : i64, !llvm.ptr
              %1469 = llvm.load %1320 : !llvm.ptr -> i64
              %1470 = arith.constant 1 : i32
              %1472 = arith.extsi %1470 : i32 to i64
              %1471 = arith.addi %1469, %1472 : i64
              llvm.store %1471, %1320 : i64, !llvm.ptr
              cf.br ^bb105
            ^bb107:
            cf.br ^bb101
          ^bb100:
            cf.br ^bb101
          ^bb101:
          %1473 = llvm.load %1419 : !llvm.ptr -> i64
          %1474 = arith.constant 1 : i32
          %1476 = arith.extsi %1474 : i32 to i64
          %1475 = arith.shrsi %1473, %1476 : i64
          llvm.store %1475, %1419 : i64, !llvm.ptr
          %1477 = llvm.load %1137 : !llvm.ptr -> i64
          %1478 = arith.constant 1 : i32
          %1480 = arith.extsi %1478 : i32 to i64
          %1479 = arith.addi %1477, %1480 : i64
          llvm.store %1479, %1137 : i64, !llvm.ptr
          cf.br ^bb96
        ^bb98:
        %1482 = arith.constant 10 : i32
        %1483 = arith.extsi %1482 : i32 to i64
        %1484 = llvm.getelementptr %1277[%1483] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1481 = llvm.load %1484 : !llvm.ptr -> i64
        %1486 = arith.constant 11 : i32
        %1487 = arith.extsi %1486 : i32 to i64
        %1488 = llvm.getelementptr %1277[%1487] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1485 = llvm.load %1488 : !llvm.ptr -> i64
        %1490 = arith.constant 12 : i32
        %1491 = arith.extsi %1490 : i32 to i64
        %1492 = llvm.getelementptr %1277[%1491] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1489 = llvm.load %1492 : !llvm.ptr -> i64
        %1494 = arith.constant 13 : i32
        %1495 = arith.extsi %1494 : i32 to i64
        %1496 = llvm.getelementptr %1277[%1495] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1493 = llvm.load %1496 : !llvm.ptr -> i64
        %1498 = llvm.load %1276 : !llvm.ptr -> i64
        %1499 = llvm.getelementptr %1208[%1498] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1497 = llvm.load %1499 : !llvm.ptr -> i64
        %1500 = arith.remsi %1485, %1255 : i64
        %1501 = arith.remsi %1306, %1255 : i64
        %1502 = arith.muli %1497, %1501 : i64
        %1503 = arith.subi %1500, %1502 : i64
        %1504 = arith.remsi %1503, %1255 : i64
        %1505 = llvm.mlir.constant(1 : i64) : i64
        %1506 = llvm.alloca %1505 x i64 : (i64) -> !llvm.ptr
        llvm.store %1504, %1506 : i64, !llvm.ptr
        %1507 = llvm.load %1506 : !llvm.ptr -> i64
        %1508 = arith.constant 0 : i32
        %1510 = arith.extsi %1508 : i32 to i64
        %1509 = arith.cmpi slt, %1507, %1510 : i64
        cf.cond_br %1509, ^bb108, ^bb109
        ^bb108:
          %1511 = llvm.load %1506 : !llvm.ptr -> i64
          %1512 = arith.addi %1511, %1255 : i64
          llvm.store %1512, %1506 : i64, !llvm.ptr
          cf.br ^bb110
        ^bb109:
          cf.br ^bb110
        ^bb110:
        %1513 = llvm.load %1506 : !llvm.ptr -> i64
        %1514 = arith.constant 24 : i32
        %1516 = arith.extsi %1514 : i32 to i64
        %1515 = arith.divsi %1513, %1516 : i64
        %1517 = arith.remsi %1515, %1252 : i64
        %1518 = arith.remsi %1485, %1260 : i64
        %1519 = arith.remsi %1489, %1260 : i64
        %1520 = arith.constant 2 : i32
        %1522 = arith.extsi %1520 : i32 to i64
        %1521 = arith.muli %1522, %1497 : i64
        %1523 = arith.muli %1521, %1518 : i64
        %1524 = arith.subi %1519, %1523 : i64
        %1525 = arith.muli %1497, %1497 : i64
        %1526 = arith.remsi %1306, %1260 : i64
        %1527 = arith.muli %1525, %1526 : i64
        %1528 = arith.addi %1524, %1527 : i64
        %1529 = arith.remsi %1528, %1260 : i64
        %1530 = llvm.mlir.constant(1 : i64) : i64
        %1531 = llvm.alloca %1530 x i64 : (i64) -> !llvm.ptr
        llvm.store %1529, %1531 : i64, !llvm.ptr
        %1532 = llvm.load %1531 : !llvm.ptr -> i64
        %1533 = arith.constant 0 : i32
        %1535 = arith.extsi %1533 : i32 to i64
        %1534 = arith.cmpi slt, %1532, %1535 : i64
        cf.cond_br %1534, ^bb111, ^bb112
        ^bb111:
          %1536 = llvm.load %1531 : !llvm.ptr -> i64
          %1537 = arith.addi %1536, %1260 : i64
          llvm.store %1537, %1531 : i64, !llvm.ptr
          cf.br ^bb113
        ^bb112:
          cf.br ^bb113
        ^bb113:
        %1538 = llvm.load %1531 : !llvm.ptr -> i64
        %1539 = arith.constant 24 : i32
        %1540 = arith.constant 24 : i32
        %1541 = arith.muli %1539, %1540 : i32
        %1543 = arith.extsi %1541 : i32 to i64
        %1542 = arith.divsi %1538, %1543 : i64
        %1544 = arith.remsi %1542, %1252 : i64
        %1545 = arith.remsi %1485, %1267 : i64
        %1546 = arith.remsi %1489, %1267 : i64
        %1547 = arith.remsi %1493, %1267 : i64
        %1548 = arith.constant 3 : i32
        %1550 = arith.extsi %1548 : i32 to i64
        %1549 = arith.muli %1550, %1497 : i64
        %1551 = arith.muli %1549, %1546 : i64
        %1552 = arith.subi %1547, %1551 : i64
        %1553 = arith.constant 3 : i32
        %1555 = arith.extsi %1553 : i32 to i64
        %1554 = arith.muli %1555, %1497 : i64
        %1556 = arith.muli %1554, %1497 : i64
        %1557 = arith.muli %1556, %1545 : i64
        %1558 = arith.addi %1552, %1557 : i64
        %1559 = arith.muli %1497, %1497 : i64
        %1560 = arith.muli %1559, %1497 : i64
        %1561 = arith.remsi %1306, %1267 : i64
        %1562 = arith.muli %1560, %1561 : i64
        %1563 = arith.subi %1558, %1562 : i64
        %1564 = arith.remsi %1563, %1267 : i64
        %1565 = llvm.mlir.constant(1 : i64) : i64
        %1566 = llvm.alloca %1565 x i64 : (i64) -> !llvm.ptr
        llvm.store %1564, %1566 : i64, !llvm.ptr
        %1567 = llvm.load %1566 : !llvm.ptr -> i64
        %1568 = arith.constant 0 : i32
        %1570 = arith.extsi %1568 : i32 to i64
        %1569 = arith.cmpi slt, %1567, %1570 : i64
        cf.cond_br %1569, ^bb114, ^bb115
        ^bb114:
          %1571 = llvm.load %1566 : !llvm.ptr -> i64
          %1572 = arith.addi %1571, %1267 : i64
          llvm.store %1572, %1566 : i64, !llvm.ptr
          cf.br ^bb116
        ^bb115:
          cf.br ^bb116
        ^bb116:
        %1573 = llvm.load %1566 : !llvm.ptr -> i64
        %1574 = arith.constant 24 : i32
        %1575 = arith.constant 24 : i32
        %1576 = arith.muli %1574, %1575 : i32
        %1577 = arith.constant 24 : i32
        %1578 = arith.muli %1576, %1577 : i32
        %1580 = arith.extsi %1578 : i32 to i64
        %1579 = arith.divsi %1573, %1580 : i64
        %1581 = arith.remsi %1579, %1252 : i64
        %1582 = arith.subi %1544, %1517 : i64
        %1583 = arith.constant 2 : i32
        %1585 = arith.extsi %1583 : i32 to i64
        %1584 = arith.muli %1585, %430 : i64
        %1586 = arith.remsi %1582, %1584 : i64
        %1587 = llvm.mlir.constant(1 : i64) : i64
        %1588 = llvm.alloca %1587 x i64 : (i64) -> !llvm.ptr
        llvm.store %1586, %1588 : i64, !llvm.ptr
        %1589 = llvm.load %1588 : !llvm.ptr -> i64
        %1590 = arith.constant 0 : i32
        %1592 = arith.extsi %1590 : i32 to i64
        %1591 = arith.cmpi slt, %1589, %1592 : i64
        cf.cond_br %1591, ^bb117, ^bb118
        ^bb117:
          %1593 = llvm.load %1588 : !llvm.ptr -> i64
          %1594 = arith.constant 2 : i32
          %1596 = arith.extsi %1594 : i32 to i64
          %1595 = arith.muli %1596, %430 : i64
          %1597 = arith.addi %1593, %1595 : i64
          llvm.store %1597, %1588 : i64, !llvm.ptr
          cf.br ^bb119
        ^bb118:
          cf.br ^bb119
        ^bb119:
        %1598 = llvm.load %1588 : !llvm.ptr -> i64
        %1599 = arith.constant 2 : i32
        %1601 = arith.extsi %1599 : i32 to i64
        %1600 = arith.divsi %1598, %1601 : i64
        %1602 = arith.remsi %1600, %430 : i64
        %1603 = arith.constant 3 : i32
        %1605 = arith.extsi %1603 : i32 to i64
        %1604 = arith.muli %1605, %1544 : i64
        %1606 = arith.subi %1581, %1604 : i64
        %1607 = arith.constant 2 : i32
        %1609 = arith.extsi %1607 : i32 to i64
        %1608 = arith.muli %1609, %1517 : i64
        %1610 = arith.addi %1606, %1608 : i64
        %1611 = arith.constant 6 : i32
        %1613 = arith.extsi %1611 : i32 to i64
        %1612 = arith.muli %1613, %430 : i64
        %1614 = arith.remsi %1610, %1612 : i64
        %1615 = llvm.mlir.constant(1 : i64) : i64
        %1616 = llvm.alloca %1615 x i64 : (i64) -> !llvm.ptr
        llvm.store %1614, %1616 : i64, !llvm.ptr
        %1617 = llvm.load %1616 : !llvm.ptr -> i64
        %1618 = arith.constant 0 : i32
        %1620 = arith.extsi %1618 : i32 to i64
        %1619 = arith.cmpi slt, %1617, %1620 : i64
        cf.cond_br %1619, ^bb120, ^bb121
        ^bb120:
          %1621 = llvm.load %1616 : !llvm.ptr -> i64
          %1622 = arith.constant 6 : i32
          %1624 = arith.extsi %1622 : i32 to i64
          %1623 = arith.muli %1624, %430 : i64
          %1625 = arith.addi %1621, %1623 : i64
          llvm.store %1625, %1616 : i64, !llvm.ptr
          cf.br ^bb122
        ^bb121:
          cf.br ^bb122
        ^bb122:
        %1626 = llvm.load %1616 : !llvm.ptr -> i64
        %1627 = arith.constant 6 : i32
        %1629 = arith.extsi %1627 : i32 to i64
        %1628 = arith.divsi %1626, %1629 : i64
        %1630 = arith.remsi %1628, %430 : i64
        %1632 = arith.constant 4 : i32
        %1634 = arith.extsi %1632 : i32 to i64
        %1633 = arith.muli %1497, %1634 : i64
        %1635 = arith.constant 0 : i32
        %1637 = arith.extsi %1635 : i32 to i64
        %1636 = arith.addi %1633, %1637 : i64
        %1638 = llvm.getelementptr %442[%1636] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1631 = llvm.load %1638 : !llvm.ptr -> i64
        %1640 = arith.constant 4 : i32
        %1642 = arith.extsi %1640 : i32 to i64
        %1641 = arith.muli %1497, %1642 : i64
        %1643 = arith.constant 1 : i32
        %1645 = arith.extsi %1643 : i32 to i64
        %1644 = arith.addi %1641, %1645 : i64
        %1646 = llvm.getelementptr %442[%1644] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1639 = llvm.load %1646 : !llvm.ptr -> i64
        %1648 = arith.constant 4 : i32
        %1650 = arith.extsi %1648 : i32 to i64
        %1649 = arith.muli %1497, %1650 : i64
        %1651 = arith.constant 2 : i32
        %1653 = arith.extsi %1651 : i32 to i64
        %1652 = arith.addi %1649, %1653 : i64
        %1654 = llvm.getelementptr %442[%1652] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1647 = llvm.load %1654 : !llvm.ptr -> i64
        %1656 = arith.constant 4 : i32
        %1658 = arith.extsi %1656 : i32 to i64
        %1657 = arith.muli %1497, %1658 : i64
        %1659 = arith.constant 3 : i32
        %1661 = arith.extsi %1659 : i32 to i64
        %1660 = arith.addi %1657, %1661 : i64
        %1662 = llvm.getelementptr %442[%1660] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1655 = llvm.load %1662 : !llvm.ptr -> i64
        %1663 = llvm.load %1272 : !llvm.ptr -> i64
        %1664 = arith.remsi %1631, %430 : i64
        %1665 = arith.remsi %1306, %430 : i64
        %1666 = arith.muli %1664, %1665 : i64
        %1667 = arith.addi %1663, %1666 : i64
        %1668 = arith.remsi %1639, %430 : i64
        %1669 = arith.remsi %1517, %430 : i64
        %1670 = arith.muli %1668, %1669 : i64
        %1671 = arith.addi %1667, %1670 : i64
        %1672 = arith.remsi %1647, %430 : i64
        %1673 = arith.muli %1672, %1602 : i64
        %1674 = arith.addi %1671, %1673 : i64
        %1675 = arith.remsi %1655, %430 : i64
        %1676 = arith.muli %1675, %1630 : i64
        %1677 = arith.addi %1674, %1676 : i64
        %1678 = arith.remsi %1677, %430 : i64
        llvm.store %1678, %1272 : i64, !llvm.ptr
        %1679 = llvm.load %1272 : !llvm.ptr -> i64
        %1680 = arith.constant 0 : i32
        %1682 = arith.extsi %1680 : i32 to i64
        %1681 = arith.cmpi slt, %1679, %1682 : i64
        cf.cond_br %1681, ^bb123, ^bb124
        ^bb123:
          %1683 = llvm.load %1272 : !llvm.ptr -> i64
          %1684 = arith.addi %1683, %430 : i64
          llvm.store %1684, %1272 : i64, !llvm.ptr
          cf.br ^bb125
        ^bb124:
          cf.br ^bb125
        ^bb125:
        cf.br ^bb92
      ^bb91:
        cf.br ^bb92
      ^bb92:
      %1685 = llvm.load %1276 : !llvm.ptr -> i64
      %1686 = arith.constant 1 : i32
      %1688 = arith.extsi %1686 : i32 to i64
      %1687 = arith.addi %1685, %1688 : i64
      llvm.store %1687, %1276 : i64, !llvm.ptr
      cf.br ^bb84
    ^bb86:
    %1689 = llvm.mlir.addressof @str_0 : !llvm.ptr
    %1690 = llvm.load %1272 : !llvm.ptr -> i64
    %1691 = llvm.call @printf(%1689, %1690) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i64) -> i32
    %1692 = arith.constant 0 : i32
    func.return %1692 : i32
  }
}