Problem 683

The Chase II: G(500) in scientific notation, 9 significant digits. In a round with j players the distance between the two dice performs a lazy walk on Z_j with steps -2..2 and probabilities (1,2,3,2,1)/9, absorbed at 0 (checked at turn starts). The eliminated player pays s^2 after s turns, so the pot is sum over rounds j = 2..n of the mean of E[s^2 | start distance d] over d uniform in 0..j-1. First and second moments come from two linear solves with the same matrix I - P (restricted to d = 1..j-1): h1 = 1 + P h1, h2 = 1 + 2 P h1 + P h2. The matrix is pentadiagonal except for two wrap entries (1, j-1) and (j-1, 1); it is an M-matrix, so a banded LU without pivoting is stable, and the two corners are restored with a rank-2 Woodbury correction.

Answer2.38955315e11
Output2.38955315e11
StatusPASS
Native helperno
Runtime10 ms
Peak memory1104 KB
Time complexityO(n^3) (estimated)
Space complexityO(n^2) (estimated)

Performance comparison

MetricOur solutionBest known
Time complexityO(n^3)O(n * s^2)
Space complexityO(n^2)O(s^2)
ApproachFlow solutionMarkov chain or DP over states
VerdictUnknown

Flow source

# Project Euler 683
# The Chase II: G(500) in scientific notation, 9 significant digits.
#
# In a round with j players the distance between the two dice performs a
# lazy walk on Z_j with steps -2..2 and probabilities (1,2,3,2,1)/9,
# absorbed at 0 (checked at turn starts).  The eliminated player pays s^2
# after s turns, so the pot is sum over rounds j = 2..n of the mean of
# E[s^2 | start distance d] over d uniform in 0..j-1.
# First and second moments come from two linear solves with the same
# matrix I - P (restricted to d = 1..j-1): h1 = 1 + P h1,
# h2 = 1 + 2 P h1 + P h2.  The matrix is pentadiagonal except for two
# wrap entries (1, j-1) and (j-1, 1); it is an M-matrix, so a banded LU
# without pivoting is stable, and the two corners are restored with a
# rank-2 Woodbury correction.

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

const JMAX: i64 = 500

# band storage: B[(c - r + 2) * (JMAX + 2) + r] for |c - r| <= 2, rows 1..m
# after lu(), sub-diagonals hold multipliers, diagonal holds pivots

function lu_band(B: ptr<f64>, m: i64) -> void {
    let S: i64 = JMAX + 2
    let mut k: i64 = 1
    while k <= m {
        let piv: f64 = B[2 * S + k]
        let mut r: i64 = k + 1
        while r <= k + 2 && r <= m {
            let dd: i64 = k - r + 2
            let f: f64 = B[dd * S + r] / piv
            B[dd * S + r] = f
            let mut c: i64 = k + 1
            while c <= k + 2 && c <= m {
                if c - r >= 0 - 2 && c - r <= 2 {
                    B[(c - r + 2) * S + r] = B[(c - r + 2) * S + r] - f * B[(c - k + 2) * S + k]
                }
                c = c + 1
            }
            r = r + 1
        }
        k = k + 1
    }
}

function solve_band(B: ptr<f64>, m: i64, rhs: ptr<f64>, x: ptr<f64>) -> void {
    let S: i64 = JMAX + 2
    # forward
    let mut r: i64 = 1
    while r <= m {
        let mut v: f64 = rhs[r]
        let mut k: i64 = r - 2
        while k <= r - 1 {
            if k >= 1 {
                v = v - B[(k - r + 2) * S + r] * x[k]
            }
            k = k + 1
        }
        x[r] = v
        r = r + 1
    }
    # back
    r = m
    while r >= 1 {
        let mut v: f64 = x[r]
        let mut c: i64 = r + 1
        while c <= r + 2 && c <= m {
            v = v - B[(c - r + 2) * S + r] * x[c]
            c = c + 1
        }
        x[r] = v / B[2 * S + r]
        r = r - 1
    }
}

function main() -> i32 {
    let S: i64 = JMAX + 2
    let B: ptr<f64> = calloc(5 * S, 8)
    let rhs: ptr<f64> = calloc(S, 8)
    let h1: ptr<f64> = calloc(S, 8)
    let h2: ptr<f64> = calloc(S, 8)
    let w1: ptr<f64> = calloc(S, 8)
    let w2: ptr<f64> = calloc(S, 8)
    let pstep: ptr<f64> = calloc(5, 8)
    pstep[0] = 1.0 / 9.0
    pstep[1] = 2.0 / 9.0
    pstep[2] = 3.0 / 9.0
    pstep[3] = 2.0 / 9.0
    pstep[4] = 1.0 / 9.0

    let mut G: f64 = 0.0
    let mut j: i64 = 2
    while j <= JMAX {
        let m: i64 = j - 1
        # build band (and note corners for j >= 5)
        let mut i: i64 = 0
        while i < 5 * S {
            B[i] = 0.0
            i = i + 1
        }
        let mut d: i64 = 1
        while d <= m {
            B[2 * S + d] = 1.0
            let mut sidx: i64 = 0
            while sidx < 5 {
                let t: i64 = ((d + sidx - 2) % j + j) % j
                if t != 0 {
                    let off: i64 = t - d
                    if off >= 0 - 2 && off <= 2 {
                        B[(off + 2) * S + d] = B[(off + 2) * S + d] - pstep[sidx]
                    }
                    # else: wrap corner, handled by Woodbury below
                }
                sidx = sidx + 1
            }
            d = d + 1
        }
        lu_band(B, m)

        # h1: rhs = 1
        d = 1
        while d <= m {
            rhs[d] = 1.0
            d = d + 1
        }
        solve_band(B, m, rhs, h1)

        if j >= 5 {
            # Woodbury for corners A[1][m] = A[m][1] = -1/9
            d = 1
            while d <= m {
                rhs[d] = 0.0
                d = d + 1
            }
            rhs[1] = 1.0
            solve_band(B, m, rhs, w1)
            rhs[1] = 0.0
            rhs[m] = 1.0
            solve_band(B, m, rhs, w2)

            # K = [[1 - w1[m]/9, -w2[m]/9], [-w1[1]/9, 1 - w2[1]/9]]
            let k11: f64 = 1.0 - w1[m] / 9.0
            let k12: f64 = 0.0 - w2[m] / 9.0
            let k21: f64 = 0.0 - w1[1] / 9.0
            let k22: f64 = 1.0 - w2[1] / 9.0
            let det: f64 = k11 * k22 - k12 * k21

            # correct h1: t = (-h1[m]/9, -h1[1]/9); h1 -= [w1 w2] K^-1 t
            let t1: f64 = 0.0 - h1[m] / 9.0
            let t2: f64 = 0.0 - h1[1] / 9.0
            let c1: f64 = (k22 * t1 - k12 * t2) / det
            let c2: f64 = (k11 * t2 - k21 * t1) / det
            d = 1
            while d <= m {
                h1[d] = h1[d] - w1[d] * c1 - w2[d] * c2
                d = d + 1
            }

            # h2 rhs = 1 + 2 * P h1 (full wrap, h1[0] = 0)
            d = 1
            while d <= m {
                let mut acc: f64 = 0.0
                let mut s2: i64 = 0
                while s2 < 5 {
                    let t: i64 = ((d + s2 - 2) % j + j) % j
                    if t != 0 {
                        acc = acc + pstep[s2] * h1[t]
                    }
                    s2 = s2 + 1
                }
                rhs[d] = 1.0 + 2.0 * acc
                d = d + 1
            }
            solve_band(B, m, rhs, h2)
            let u1: f64 = 0.0 - h2[m] / 9.0
            let u2: f64 = 0.0 - h2[1] / 9.0
            let e1: f64 = (k22 * u1 - k12 * u2) / det
            let e2: f64 = (k11 * u2 - k21 * u1) / det
            d = 1
            while d <= m {
                h2[d] = h2[d] - w1[d] * e1 - w2[d] * e2
                d = d + 1
            }
        } else {
            # j <= 4: wraps landed inside the band already; h1 is final
            d = 1
            while d <= m {
                let mut acc: f64 = 0.0
                let mut s2: i64 = 0
                while s2 < 5 {
                    let t: i64 = ((d + s2 - 2) % j + j) % j
                    if t != 0 {
                        acc = acc + pstep[s2] * h1[t]
                    }
                    s2 = s2 + 1
                }
                rhs[d] = 1.0 + 2.0 * acc
                d = d + 1
            }
            solve_band(B, m, rhs, h2)
        }

        let mut tot: f64 = 0.0
        d = 1
        while d <= m {
            tot = tot + h2[d]
            d = d + 1
        }
        G = G + tot / (j as f64)
        j = j + 1
    }

    # scientific notation, 9 significant digits
    let mut mant: f64 = G
    let mut ex: i64 = 0
    while mant >= 10.0 {
        mant = mant / 10.0
        ex = ex + 1
    }
    printf("%.8fe%lld\n", mant, ex)

    free(B)
    free(rhs)
    free(h1)
    free(h2)
    free(w1)
    free(w2)
    free(pstep)
    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 lu_band_ptr_f64_i64(double* B, int64_t m);
void solve_band_ptr_f64_i64_ptr_f64_ptr_f64(double* B, int64_t m, double* rhs, double* x);
int32_t main(void);

static const int64_t JMAX = 500;



void lu_band_ptr_f64_i64(double* B, int64_t m) {
    int64_t S = (JMAX + 2);
    int64_t k = 1;
    while (k <= m) {
        double piv = B[((2 * S) + k)];
        int64_t r = (k + 1);
        while ((r <= (k + 2) && r <= m)) {
            int64_t dd = ((k - r) + 2);
            double f = (B[((dd * S) + r)] / piv);
            B[((dd * S) + r)] = f;
            int64_t c = (k + 1);
            while ((c <= (k + 2) && c <= m)) {
                if (((c - r) >= (0 - 2) && (c - r) <= 2)) {
                    B[((((c - r) + 2) * S) + r)] = (B[((((c - r) + 2) * S) + r)] - (f * B[((((c - k) + 2) * S) + k)]));
                }
                c = (c + 1);
            }
            r = (r + 1);
        }
        k = (k + 1);
    }
}

void solve_band_ptr_f64_i64_ptr_f64_ptr_f64(double* B, int64_t m, double* rhs, double* x) {
    int64_t S = (JMAX + 2);
    int64_t r = 1;
    while (r <= m) {
        double v = rhs[r];
        int64_t k = (r - 2);
        while (k <= (r - 1)) {
            if (k >= 1) {
                v = (v - (B[((((k - r) + 2) * S) + r)] * x[k]));
            }
            k = (k + 1);
        }
        x[r] = v;
        r = (r + 1);
    }
    r = m;
    while (r >= 1) {
        double v = x[r];
        int64_t c = (r + 1);
        while ((c <= (r + 2) && c <= m)) {
            v = (v - (B[((((c - r) + 2) * S) + r)] * x[c]));
            c = (c + 1);
        }
        x[r] = (v / B[((2 * S) + r)]);
        r = (r - 1);
    }
}

int32_t main(void) {
    int64_t S = (JMAX + 2);
    double* B = (double*)(calloc((5 * S), 8));
    double* rhs = (double*)(calloc(S, 8));
    double* h1 = (double*)(calloc(S, 8));
    double* h2 = (double*)(calloc(S, 8));
    double* w1 = (double*)(calloc(S, 8));
    double* w2 = (double*)(calloc(S, 8));
    double* pstep = (double*)(calloc(5, 8));
    pstep[0] = (1.0 / 9.0);
    pstep[1] = (2.0 / 9.0);
    pstep[2] = (3.0 / 9.0);
    pstep[3] = (2.0 / 9.0);
    pstep[4] = (1.0 / 9.0);
    double G = 0.0;
    int64_t j = 2;
    while (j <= JMAX) {
        int64_t m = (j - 1);
        int64_t i = 0;
        while (i < (5 * S)) {
            B[i] = 0.0;
            i = (i + 1);
        }
        int64_t d = 1;
        while (d <= m) {
            B[((2 * S) + d)] = 1.0;
            int64_t sidx = 0;
            while (sidx < 5) {
                int64_t t = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD((((d + sidx) - 2)), (j)) + j)), (j));
                if (t != 0) {
                    int64_t off = (t - d);
                    if ((off >= (0 - 2) && off <= 2)) {
                        B[(((off + 2) * S) + d)] = (B[(((off + 2) * S) + d)] - pstep[sidx]);
                    }
                }
                sidx = (sidx + 1);
            }
            d = (d + 1);
        }
        lu_band_ptr_f64_i64(B, m);
        d = 1;
        while (d <= m) {
            rhs[d] = 1.0;
            d = (d + 1);
        }
        solve_band_ptr_f64_i64_ptr_f64_ptr_f64(B, m, rhs, h1);
        if (j >= 5) {
            d = 1;
            while (d <= m) {
                rhs[d] = 0.0;
                d = (d + 1);
            }
            rhs[1] = 1.0;
            solve_band_ptr_f64_i64_ptr_f64_ptr_f64(B, m, rhs, w1);
            rhs[1] = 0.0;
            rhs[m] = 1.0;
            solve_band_ptr_f64_i64_ptr_f64_ptr_f64(B, m, rhs, w2);
            double k11 = (1.0 - (w1[m] / 9.0));
            double k12 = (0.0 - (w2[m] / 9.0));
            double k21 = (0.0 - (w1[1] / 9.0));
            double k22 = (1.0 - (w2[1] / 9.0));
            double det = ((k11 * k22) - (k12 * k21));
            double t1 = (0.0 - (h1[m] / 9.0));
            double t2 = (0.0 - (h1[1] / 9.0));
            double c1 = (((k22 * t1) - (k12 * t2)) / det);
            double c2 = (((k11 * t2) - (k21 * t1)) / det);
            d = 1;
            while (d <= m) {
                h1[d] = ((h1[d] - (w1[d] * c1)) - (w2[d] * c2));
                d = (d + 1);
            }
            d = 1;
            while (d <= m) {
                double acc = 0.0;
                int64_t s2 = 0;
                while (s2 < 5) {
                    int64_t t = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD((((d + s2) - 2)), (j)) + j)), (j));
                    if (t != 0) {
                        acc = (acc + (pstep[s2] * h1[t]));
                    }
                    s2 = (s2 + 1);
                }
                rhs[d] = (1.0 + (2.0 * acc));
                d = (d + 1);
            }
            solve_band_ptr_f64_i64_ptr_f64_ptr_f64(B, m, rhs, h2);
            double u1 = (0.0 - (h2[m] / 9.0));
            double u2 = (0.0 - (h2[1] / 9.0));
            double e1 = (((k22 * u1) - (k12 * u2)) / det);
            double e2 = (((k11 * u2) - (k21 * u1)) / det);
            d = 1;
            while (d <= m) {
                h2[d] = ((h2[d] - (w1[d] * e1)) - (w2[d] * e2));
                d = (d + 1);
            }
        } else {
            d = 1;
            while (d <= m) {
                double acc = 0.0;
                int64_t s2 = 0;
                while (s2 < 5) {
                    int64_t t = FLOW_CHECKED_MOD(((FLOW_CHECKED_MOD((((d + s2) - 2)), (j)) + j)), (j));
                    if (t != 0) {
                        acc = (acc + (pstep[s2] * h1[t]));
                    }
                    s2 = (s2 + 1);
                }
                rhs[d] = (1.0 + (2.0 * acc));
                d = (d + 1);
            }
            solve_band_ptr_f64_i64_ptr_f64_ptr_f64(B, m, rhs, h2);
        }
        double tot = 0.0;
        d = 1;
        while (d <= m) {
            tot = (tot + h2[d]);
            d = (d + 1);
        }
        G = (G + (tot / ((double)(j))));
        j = (j + 1);
    }
    double mant = G;
    int64_t ex = 0;
    while (mant >= 10.0) {
        mant = (mant / 10.0);
        ex = (ex + 1);
    }
    printf("%.8fe%lld\n", mant, ex);
    free(B);
    free(rhs);
    free(h1);
    free(h2);
    free(w1);
    free(w2);
    free(pstep);
    return 0;
}

Generated MLIR

module {
  llvm.func @printf(!llvm.ptr, ...) -> i32
  llvm.mlir.global internal constant @str_0("%.8fe%lld\n\00") {addr_space = 0 : i32} : !llvm.array<11 x i8>
  func.func private @calloc(i64, i64) -> !llvm.ptr
  func.func private @free(!llvm.ptr) -> ()
  // Constant: JMAX
  llvm.mlir.global internal constant @JMAX(500 : i64) : i64
  func.func @lu_band(%arg0: !llvm.ptr, %arg1: i64) -> () {
    %0 = llvm.mlir.addressof @JMAX : !llvm.ptr
    %1 = llvm.load %0 : !llvm.ptr -> i64
    %2 = arith.constant 2 : i32
    %4 = arith.extsi %2 : i32 to i64
    %3 = arith.addi %1, %4 : i64
    %5 = arith.constant 1 : i32
    %6 = arith.extsi %5 : i32 to i64
    %7 = llvm.mlir.constant(1 : i64) : i64
    %8 = llvm.alloca %7 x i64 : (i64) -> !llvm.ptr
    llvm.store %6, %8 : i64, !llvm.ptr
    cf.br ^bb0
    ^bb0:
    %9 = llvm.load %8 : !llvm.ptr -> i64
    %10 = arith.cmpi sle, %9, %arg1 : i64
    cf.cond_br %10, ^bb1, ^bb2
    ^bb1:
      %12 = arith.constant 2 : i32
      %14 = arith.extsi %12 : i32 to i64
      %13 = arith.muli %14, %3 : i64
      %15 = llvm.load %8 : !llvm.ptr -> i64
      %16 = arith.addi %13, %15 : i64
      %17 = llvm.getelementptr %arg0[%16] : (!llvm.ptr, i64) -> !llvm.ptr, f64
      %11 = llvm.load %17 : !llvm.ptr -> f64
      %18 = llvm.load %8 : !llvm.ptr -> i64
      %19 = arith.constant 1 : i32
      %21 = arith.extsi %19 : i32 to i64
      %20 = arith.addi %18, %21 : i64
      %22 = llvm.mlir.constant(1 : i64) : i64
      %23 = llvm.alloca %22 x i64 : (i64) -> !llvm.ptr
      llvm.store %20, %23 : i64, !llvm.ptr
      cf.br ^bb3
      ^bb3:
      %24 = llvm.load %23 : !llvm.ptr -> i64
      %25 = llvm.load %8 : !llvm.ptr -> i64
      %26 = arith.constant 2 : i32
      %28 = arith.extsi %26 : i32 to i64
      %27 = arith.addi %25, %28 : i64
      %29 = arith.cmpi sle, %24, %27 : i64
      %30 = scf.if %29 -> (i1) {
        %31 = llvm.load %23 : !llvm.ptr -> i64
        %32 = arith.cmpi sle, %31, %arg1 : i64
        scf.yield %32 : i1
      } else {
        %33 = arith.constant false
        scf.yield %33 : i1
      }
      cf.cond_br %30, ^bb4, ^bb5
      ^bb4:
        %34 = llvm.load %8 : !llvm.ptr -> i64
        %35 = llvm.load %23 : !llvm.ptr -> i64
        %36 = arith.subi %34, %35 : i64
        %37 = arith.constant 2 : i32
        %39 = arith.extsi %37 : i32 to i64
        %38 = arith.addi %36, %39 : i64
        %41 = arith.muli %38, %3 : i64
        %42 = llvm.load %23 : !llvm.ptr -> i64
        %43 = arith.addi %41, %42 : i64
        %44 = llvm.getelementptr %arg0[%43] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %40 = llvm.load %44 : !llvm.ptr -> f64
        %45 = arith.divf %40, %11 : f64
        %46 = arith.muli %38, %3 : i64
        %47 = llvm.load %23 : !llvm.ptr -> i64
        %48 = arith.addi %46, %47 : i64
        %49 = llvm.getelementptr %arg0[%48] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %45, %49 : f64, !llvm.ptr
        %50 = llvm.load %8 : !llvm.ptr -> i64
        %51 = arith.constant 1 : i32
        %53 = arith.extsi %51 : i32 to i64
        %52 = arith.addi %50, %53 : i64
        %54 = llvm.mlir.constant(1 : i64) : i64
        %55 = llvm.alloca %54 x i64 : (i64) -> !llvm.ptr
        llvm.store %52, %55 : i64, !llvm.ptr
        cf.br ^bb6
        ^bb6:
        %56 = llvm.load %55 : !llvm.ptr -> i64
        %57 = llvm.load %8 : !llvm.ptr -> i64
        %58 = arith.constant 2 : i32
        %60 = arith.extsi %58 : i32 to i64
        %59 = arith.addi %57, %60 : i64
        %61 = arith.cmpi sle, %56, %59 : i64
        %62 = scf.if %61 -> (i1) {
          %63 = llvm.load %55 : !llvm.ptr -> i64
          %64 = arith.cmpi sle, %63, %arg1 : i64
          scf.yield %64 : i1
        } else {
          %65 = arith.constant false
          scf.yield %65 : i1
        }
        cf.cond_br %62, ^bb7, ^bb8
        ^bb7:
          %66 = llvm.load %55 : !llvm.ptr -> i64
          %67 = llvm.load %23 : !llvm.ptr -> i64
          %68 = arith.subi %66, %67 : i64
          %69 = arith.constant 0 : i32
          %70 = arith.constant 2 : i32
          %71 = arith.subi %69, %70 : i32
          %73 = arith.extsi %71 : i32 to i64
          %72 = arith.cmpi sge, %68, %73 : i64
          %74 = scf.if %72 -> (i1) {
            %75 = llvm.load %55 : !llvm.ptr -> i64
            %76 = llvm.load %23 : !llvm.ptr -> i64
            %77 = arith.subi %75, %76 : i64
            %78 = arith.constant 2 : i32
            %80 = arith.extsi %78 : i32 to i64
            %79 = arith.cmpi sle, %77, %80 : i64
            scf.yield %79 : i1
          } else {
            %81 = arith.constant false
            scf.yield %81 : i1
          }
          cf.cond_br %74, ^bb9, ^bb10
          ^bb9:
            %83 = llvm.load %55 : !llvm.ptr -> i64
            %84 = llvm.load %23 : !llvm.ptr -> i64
            %85 = arith.subi %83, %84 : i64
            %86 = arith.constant 2 : i32
            %88 = arith.extsi %86 : i32 to i64
            %87 = arith.addi %85, %88 : i64
            %89 = arith.muli %87, %3 : i64
            %90 = llvm.load %23 : !llvm.ptr -> i64
            %91 = arith.addi %89, %90 : i64
            %92 = llvm.getelementptr %arg0[%91] : (!llvm.ptr, i64) -> !llvm.ptr, f64
            %82 = llvm.load %92 : !llvm.ptr -> f64
            %94 = llvm.load %55 : !llvm.ptr -> i64
            %95 = llvm.load %8 : !llvm.ptr -> i64
            %96 = arith.subi %94, %95 : i64
            %97 = arith.constant 2 : i32
            %99 = arith.extsi %97 : i32 to i64
            %98 = arith.addi %96, %99 : i64
            %100 = arith.muli %98, %3 : i64
            %101 = llvm.load %8 : !llvm.ptr -> i64
            %102 = arith.addi %100, %101 : i64
            %103 = llvm.getelementptr %arg0[%102] : (!llvm.ptr, i64) -> !llvm.ptr, f64
            %93 = llvm.load %103 : !llvm.ptr -> f64
            %104 = arith.mulf %45, %93 : f64
            %105 = arith.subf %82, %104 : f64
            %106 = llvm.load %55 : !llvm.ptr -> i64
            %107 = llvm.load %23 : !llvm.ptr -> i64
            %108 = arith.subi %106, %107 : i64
            %109 = arith.constant 2 : i32
            %111 = arith.extsi %109 : i32 to i64
            %110 = arith.addi %108, %111 : i64
            %112 = arith.muli %110, %3 : i64
            %113 = llvm.load %23 : !llvm.ptr -> i64
            %114 = arith.addi %112, %113 : i64
            %115 = llvm.getelementptr %arg0[%114] : (!llvm.ptr, i64) -> !llvm.ptr, f64
            llvm.store %105, %115 : f64, !llvm.ptr
            cf.br ^bb11
          ^bb10:
            cf.br ^bb11
          ^bb11:
          %116 = llvm.load %55 : !llvm.ptr -> i64
          %117 = arith.constant 1 : i32
          %119 = arith.extsi %117 : i32 to i64
          %118 = arith.addi %116, %119 : i64
          llvm.store %118, %55 : i64, !llvm.ptr
          cf.br ^bb6
        ^bb8:
        %120 = llvm.load %23 : !llvm.ptr -> i64
        %121 = arith.constant 1 : i32
        %123 = arith.extsi %121 : i32 to i64
        %122 = arith.addi %120, %123 : i64
        llvm.store %122, %23 : i64, !llvm.ptr
        cf.br ^bb3
      ^bb5:
      %124 = llvm.load %8 : !llvm.ptr -> i64
      %125 = arith.constant 1 : i32
      %127 = arith.extsi %125 : i32 to i64
      %126 = arith.addi %124, %127 : i64
      llvm.store %126, %8 : i64, !llvm.ptr
      cf.br ^bb0
    ^bb2:
    func.return
  }
  func.func @solve_band(%arg0: !llvm.ptr, %arg1: i64, %arg2: !llvm.ptr, %arg3: !llvm.ptr) -> () {
    %128 = llvm.mlir.addressof @JMAX : !llvm.ptr
    %129 = llvm.load %128 : !llvm.ptr -> i64
    %130 = arith.constant 2 : i32
    %132 = arith.extsi %130 : i32 to i64
    %131 = arith.addi %129, %132 : i64
    %133 = arith.constant 1 : i32
    %134 = arith.extsi %133 : i32 to i64
    %135 = llvm.mlir.constant(1 : i64) : i64
    %136 = llvm.alloca %135 x i64 : (i64) -> !llvm.ptr
    llvm.store %134, %136 : i64, !llvm.ptr
    cf.br ^bb12
    ^bb12:
    %137 = llvm.load %136 : !llvm.ptr -> i64
    %138 = arith.cmpi sle, %137, %arg1 : i64
    cf.cond_br %138, ^bb13, ^bb14
    ^bb13:
      %140 = llvm.load %136 : !llvm.ptr -> i64
      %141 = llvm.getelementptr %arg2[%140] : (!llvm.ptr, i64) -> !llvm.ptr, f64
      %139 = llvm.load %141 : !llvm.ptr -> f64
      %142 = llvm.mlir.constant(1 : i64) : i64
      %143 = llvm.alloca %142 x f64 : (i64) -> !llvm.ptr
      llvm.store %139, %143 : f64, !llvm.ptr
      %144 = llvm.load %136 : !llvm.ptr -> i64
      %145 = arith.constant 2 : i32
      %147 = arith.extsi %145 : i32 to i64
      %146 = arith.subi %144, %147 : i64
      %148 = llvm.mlir.constant(1 : i64) : i64
      %149 = llvm.alloca %148 x i64 : (i64) -> !llvm.ptr
      llvm.store %146, %149 : i64, !llvm.ptr
      cf.br ^bb15
      ^bb15:
      %150 = llvm.load %149 : !llvm.ptr -> i64
      %151 = llvm.load %136 : !llvm.ptr -> i64
      %152 = arith.constant 1 : i32
      %154 = arith.extsi %152 : i32 to i64
      %153 = arith.subi %151, %154 : i64
      %155 = arith.cmpi sle, %150, %153 : i64
      cf.cond_br %155, ^bb16, ^bb17
      ^bb16:
        %156 = llvm.load %149 : !llvm.ptr -> i64
        %157 = arith.constant 1 : i32
        %159 = arith.extsi %157 : i32 to i64
        %158 = arith.cmpi sge, %156, %159 : i64
        cf.cond_br %158, ^bb18, ^bb19
        ^bb18:
          %160 = llvm.load %143 : !llvm.ptr -> f64
          %162 = llvm.load %149 : !llvm.ptr -> i64
          %163 = llvm.load %136 : !llvm.ptr -> i64
          %164 = arith.subi %162, %163 : i64
          %165 = arith.constant 2 : i32
          %167 = arith.extsi %165 : i32 to i64
          %166 = arith.addi %164, %167 : i64
          %168 = arith.muli %166, %131 : i64
          %169 = llvm.load %136 : !llvm.ptr -> i64
          %170 = arith.addi %168, %169 : i64
          %171 = llvm.getelementptr %arg0[%170] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %161 = llvm.load %171 : !llvm.ptr -> f64
          %173 = llvm.load %149 : !llvm.ptr -> i64
          %174 = llvm.getelementptr %arg3[%173] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %172 = llvm.load %174 : !llvm.ptr -> f64
          %175 = arith.mulf %161, %172 : f64
          %176 = arith.subf %160, %175 : f64
          llvm.store %176, %143 : f64, !llvm.ptr
          cf.br ^bb20
        ^bb19:
          cf.br ^bb20
        ^bb20:
        %177 = llvm.load %149 : !llvm.ptr -> i64
        %178 = arith.constant 1 : i32
        %180 = arith.extsi %178 : i32 to i64
        %179 = arith.addi %177, %180 : i64
        llvm.store %179, %149 : i64, !llvm.ptr
        cf.br ^bb15
      ^bb17:
      %181 = llvm.load %143 : !llvm.ptr -> f64
      %182 = llvm.load %136 : !llvm.ptr -> i64
      %183 = llvm.getelementptr %arg3[%182] : (!llvm.ptr, i64) -> !llvm.ptr, f64
      llvm.store %181, %183 : f64, !llvm.ptr
      %184 = llvm.load %136 : !llvm.ptr -> i64
      %185 = arith.constant 1 : i32
      %187 = arith.extsi %185 : i32 to i64
      %186 = arith.addi %184, %187 : i64
      llvm.store %186, %136 : i64, !llvm.ptr
      cf.br ^bb12
    ^bb14:
    llvm.store %arg1, %136 : i64, !llvm.ptr
    cf.br ^bb21
    ^bb21:
    %188 = llvm.load %136 : !llvm.ptr -> i64
    %189 = arith.constant 1 : i32
    %191 = arith.extsi %189 : i32 to i64
    %190 = arith.cmpi sge, %188, %191 : i64
    cf.cond_br %190, ^bb22, ^bb23
    ^bb22:
      %193 = llvm.load %136 : !llvm.ptr -> i64
      %194 = llvm.getelementptr %arg3[%193] : (!llvm.ptr, i64) -> !llvm.ptr, f64
      %192 = llvm.load %194 : !llvm.ptr -> f64
      %195 = llvm.mlir.constant(1 : i64) : i64
      %196 = llvm.alloca %195 x f64 : (i64) -> !llvm.ptr
      llvm.store %192, %196 : f64, !llvm.ptr
      %197 = llvm.load %136 : !llvm.ptr -> i64
      %198 = arith.constant 1 : i32
      %200 = arith.extsi %198 : i32 to i64
      %199 = arith.addi %197, %200 : i64
      %201 = llvm.mlir.constant(1 : i64) : i64
      %202 = llvm.alloca %201 x i64 : (i64) -> !llvm.ptr
      llvm.store %199, %202 : i64, !llvm.ptr
      cf.br ^bb24
      ^bb24:
      %203 = llvm.load %202 : !llvm.ptr -> i64
      %204 = llvm.load %136 : !llvm.ptr -> i64
      %205 = arith.constant 2 : i32
      %207 = arith.extsi %205 : i32 to i64
      %206 = arith.addi %204, %207 : i64
      %208 = arith.cmpi sle, %203, %206 : i64
      %209 = scf.if %208 -> (i1) {
        %210 = llvm.load %202 : !llvm.ptr -> i64
        %211 = arith.cmpi sle, %210, %arg1 : i64
        scf.yield %211 : i1
      } else {
        %212 = arith.constant false
        scf.yield %212 : i1
      }
      cf.cond_br %209, ^bb25, ^bb26
      ^bb25:
        %213 = llvm.load %196 : !llvm.ptr -> f64
        %215 = llvm.load %202 : !llvm.ptr -> i64
        %216 = llvm.load %136 : !llvm.ptr -> i64
        %217 = arith.subi %215, %216 : i64
        %218 = arith.constant 2 : i32
        %220 = arith.extsi %218 : i32 to i64
        %219 = arith.addi %217, %220 : i64
        %221 = arith.muli %219, %131 : i64
        %222 = llvm.load %136 : !llvm.ptr -> i64
        %223 = arith.addi %221, %222 : i64
        %224 = llvm.getelementptr %arg0[%223] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %214 = llvm.load %224 : !llvm.ptr -> f64
        %226 = llvm.load %202 : !llvm.ptr -> i64
        %227 = llvm.getelementptr %arg3[%226] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %225 = llvm.load %227 : !llvm.ptr -> f64
        %228 = arith.mulf %214, %225 : f64
        %229 = arith.subf %213, %228 : f64
        llvm.store %229, %196 : f64, !llvm.ptr
        %230 = llvm.load %202 : !llvm.ptr -> i64
        %231 = arith.constant 1 : i32
        %233 = arith.extsi %231 : i32 to i64
        %232 = arith.addi %230, %233 : i64
        llvm.store %232, %202 : i64, !llvm.ptr
        cf.br ^bb24
      ^bb26:
      %234 = llvm.load %196 : !llvm.ptr -> f64
      %236 = arith.constant 2 : i32
      %238 = arith.extsi %236 : i32 to i64
      %237 = arith.muli %238, %131 : i64
      %239 = llvm.load %136 : !llvm.ptr -> i64
      %240 = arith.addi %237, %239 : i64
      %241 = llvm.getelementptr %arg0[%240] : (!llvm.ptr, i64) -> !llvm.ptr, f64
      %235 = llvm.load %241 : !llvm.ptr -> f64
      %242 = arith.divf %234, %235 : f64
      %243 = llvm.load %136 : !llvm.ptr -> i64
      %244 = llvm.getelementptr %arg3[%243] : (!llvm.ptr, i64) -> !llvm.ptr, f64
      llvm.store %242, %244 : f64, !llvm.ptr
      %245 = llvm.load %136 : !llvm.ptr -> i64
      %246 = arith.constant 1 : i32
      %248 = arith.extsi %246 : i32 to i64
      %247 = arith.subi %245, %248 : i64
      llvm.store %247, %136 : i64, !llvm.ptr
      cf.br ^bb21
    ^bb23:
    func.return
  }
  func.func @main() -> i32 {
    %249 = llvm.mlir.addressof @JMAX : !llvm.ptr
    %250 = llvm.load %249 : !llvm.ptr -> i64
    %251 = arith.constant 2 : i32
    %253 = arith.extsi %251 : i32 to i64
    %252 = arith.addi %250, %253 : i64
    %255 = arith.constant 5 : i32
    %257 = arith.extsi %255 : i32 to i64
    %256 = arith.muli %257, %252 : i64
    %258 = arith.constant 8 : i32
    %259 = arith.extsi %258 : i32 to i64
    %254 = func.call @calloc(%256, %259) : (i64, i64) -> !llvm.ptr
    %261 = arith.constant 8 : i32
    %262 = arith.extsi %261 : i32 to i64
    %260 = func.call @calloc(%252, %262) : (i64, i64) -> !llvm.ptr
    %264 = arith.constant 8 : i32
    %265 = arith.extsi %264 : i32 to i64
    %263 = func.call @calloc(%252, %265) : (i64, i64) -> !llvm.ptr
    %267 = arith.constant 8 : i32
    %268 = arith.extsi %267 : i32 to i64
    %266 = func.call @calloc(%252, %268) : (i64, i64) -> !llvm.ptr
    %270 = arith.constant 8 : i32
    %271 = arith.extsi %270 : i32 to i64
    %269 = func.call @calloc(%252, %271) : (i64, i64) -> !llvm.ptr
    %273 = arith.constant 8 : i32
    %274 = arith.extsi %273 : i32 to i64
    %272 = func.call @calloc(%252, %274) : (i64, i64) -> !llvm.ptr
    %276 = arith.constant 5 : i32
    %277 = arith.constant 8 : i32
    %278 = arith.extsi %276 : i32 to i64
    %279 = arith.extsi %277 : i32 to i64
    %275 = func.call @calloc(%278, %279) : (i64, i64) -> !llvm.ptr
    %280 = arith.constant 1.0 : f32
    %281 = arith.constant 9.0 : f32
    %282 = arith.divf %280, %281 : f32
    %283 = arith.constant 0 : i32
    %284 = arith.extf %282 : f32 to f64
    %285 = arith.extsi %283 : i32 to i64
    %286 = llvm.getelementptr %275[%285] : (!llvm.ptr, i64) -> !llvm.ptr, f64
    llvm.store %284, %286 : f64, !llvm.ptr
    %287 = arith.constant 2.0 : f32
    %288 = arith.constant 9.0 : f32
    %289 = arith.divf %287, %288 : f32
    %290 = arith.constant 1 : i32
    %291 = arith.extf %289 : f32 to f64
    %292 = arith.extsi %290 : i32 to i64
    %293 = llvm.getelementptr %275[%292] : (!llvm.ptr, i64) -> !llvm.ptr, f64
    llvm.store %291, %293 : f64, !llvm.ptr
    %294 = arith.constant 3.0 : f32
    %295 = arith.constant 9.0 : f32
    %296 = arith.divf %294, %295 : f32
    %297 = arith.constant 2 : i32
    %298 = arith.extf %296 : f32 to f64
    %299 = arith.extsi %297 : i32 to i64
    %300 = llvm.getelementptr %275[%299] : (!llvm.ptr, i64) -> !llvm.ptr, f64
    llvm.store %298, %300 : f64, !llvm.ptr
    %301 = arith.constant 2.0 : f32
    %302 = arith.constant 9.0 : f32
    %303 = arith.divf %301, %302 : f32
    %304 = arith.constant 3 : i32
    %305 = arith.extf %303 : f32 to f64
    %306 = arith.extsi %304 : i32 to i64
    %307 = llvm.getelementptr %275[%306] : (!llvm.ptr, i64) -> !llvm.ptr, f64
    llvm.store %305, %307 : f64, !llvm.ptr
    %308 = arith.constant 1.0 : f32
    %309 = arith.constant 9.0 : f32
    %310 = arith.divf %308, %309 : f32
    %311 = arith.constant 4 : i32
    %312 = arith.extf %310 : f32 to f64
    %313 = arith.extsi %311 : i32 to i64
    %314 = llvm.getelementptr %275[%313] : (!llvm.ptr, i64) -> !llvm.ptr, f64
    llvm.store %312, %314 : f64, !llvm.ptr
    %315 = arith.constant 0.0 : f32
    %316 = arith.extf %315 : f32 to f64
    %317 = llvm.mlir.constant(1 : i64) : i64
    %318 = llvm.alloca %317 x f64 : (i64) -> !llvm.ptr
    llvm.store %316, %318 : f64, !llvm.ptr
    %319 = arith.constant 2 : i32
    %320 = arith.extsi %319 : i32 to i64
    %321 = llvm.mlir.constant(1 : i64) : i64
    %322 = llvm.alloca %321 x i64 : (i64) -> !llvm.ptr
    llvm.store %320, %322 : i64, !llvm.ptr
    cf.br ^bb27
    ^bb27:
    %323 = llvm.load %322 : !llvm.ptr -> i64
    %324 = llvm.mlir.addressof @JMAX : !llvm.ptr
    %325 = llvm.load %324 : !llvm.ptr -> i64
    %326 = arith.cmpi sle, %323, %325 : i64
    cf.cond_br %326, ^bb28, ^bb29
    ^bb28:
      %327 = llvm.load %322 : !llvm.ptr -> i64
      %328 = arith.constant 1 : i32
      %330 = arith.extsi %328 : i32 to i64
      %329 = arith.subi %327, %330 : i64
      %331 = arith.constant 0 : i32
      %332 = arith.extsi %331 : i32 to i64
      %333 = llvm.mlir.constant(1 : i64) : i64
      %334 = llvm.alloca %333 x i64 : (i64) -> !llvm.ptr
      llvm.store %332, %334 : i64, !llvm.ptr
      cf.br ^bb30
      ^bb30:
      %335 = llvm.load %334 : !llvm.ptr -> i64
      %336 = arith.constant 5 : i32
      %338 = arith.extsi %336 : i32 to i64
      %337 = arith.muli %338, %252 : i64
      %339 = arith.cmpi slt, %335, %337 : i64
      cf.cond_br %339, ^bb31, ^bb32
      ^bb31:
        %340 = arith.constant 0.0 : f32
        %341 = llvm.load %334 : !llvm.ptr -> i64
        %342 = arith.extf %340 : f32 to f64
        %343 = llvm.getelementptr %254[%341] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %342, %343 : f64, !llvm.ptr
        %344 = llvm.load %334 : !llvm.ptr -> i64
        %345 = arith.constant 1 : i32
        %347 = arith.extsi %345 : i32 to i64
        %346 = arith.addi %344, %347 : i64
        llvm.store %346, %334 : i64, !llvm.ptr
        cf.br ^bb30
      ^bb32:
      %348 = arith.constant 1 : i32
      %349 = arith.extsi %348 : i32 to i64
      %350 = llvm.mlir.constant(1 : i64) : i64
      %351 = llvm.alloca %350 x i64 : (i64) -> !llvm.ptr
      llvm.store %349, %351 : i64, !llvm.ptr
      cf.br ^bb33
      ^bb33:
      %352 = llvm.load %351 : !llvm.ptr -> i64
      %353 = arith.cmpi sle, %352, %329 : i64
      cf.cond_br %353, ^bb34, ^bb35
      ^bb34:
        %354 = arith.constant 1.0 : f32
        %355 = arith.constant 2 : i32
        %357 = arith.extsi %355 : i32 to i64
        %356 = arith.muli %357, %252 : i64
        %358 = llvm.load %351 : !llvm.ptr -> i64
        %359 = arith.addi %356, %358 : i64
        %360 = arith.extf %354 : f32 to f64
        %361 = llvm.getelementptr %254[%359] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %360, %361 : f64, !llvm.ptr
        %362 = arith.constant 0 : i32
        %363 = arith.extsi %362 : i32 to i64
        %364 = llvm.mlir.constant(1 : i64) : i64
        %365 = llvm.alloca %364 x i64 : (i64) -> !llvm.ptr
        llvm.store %363, %365 : i64, !llvm.ptr
        cf.br ^bb36
        ^bb36:
        %366 = llvm.load %365 : !llvm.ptr -> i64
        %367 = arith.constant 5 : i32
        %369 = arith.extsi %367 : i32 to i64
        %368 = arith.cmpi slt, %366, %369 : i64
        cf.cond_br %368, ^bb37, ^bb38
        ^bb37:
          %370 = llvm.load %351 : !llvm.ptr -> i64
          %371 = llvm.load %365 : !llvm.ptr -> i64
          %372 = arith.addi %370, %371 : i64
          %373 = arith.constant 2 : i32
          %375 = arith.extsi %373 : i32 to i64
          %374 = arith.subi %372, %375 : i64
          %376 = llvm.load %322 : !llvm.ptr -> i64
          %377 = arith.remsi %374, %376 : i64
          %378 = llvm.load %322 : !llvm.ptr -> i64
          %379 = arith.addi %377, %378 : i64
          %380 = llvm.load %322 : !llvm.ptr -> i64
          %381 = arith.remsi %379, %380 : i64
          %382 = arith.constant 0 : i32
          %384 = arith.extsi %382 : i32 to i64
          %383 = arith.cmpi ne, %381, %384 : i64
          cf.cond_br %383, ^bb39, ^bb40
          ^bb39:
            %385 = llvm.load %351 : !llvm.ptr -> i64
            %386 = arith.subi %381, %385 : i64
            %387 = arith.constant 0 : i32
            %388 = arith.constant 2 : i32
            %389 = arith.subi %387, %388 : i32
            %391 = arith.extsi %389 : i32 to i64
            %390 = arith.cmpi sge, %386, %391 : i64
            %392 = scf.if %390 -> (i1) {
              %393 = arith.constant 2 : i32
              %395 = arith.extsi %393 : i32 to i64
              %394 = arith.cmpi sle, %386, %395 : i64
              scf.yield %394 : i1
            } else {
              %396 = arith.constant false
              scf.yield %396 : i1
            }
            cf.cond_br %392, ^bb42, ^bb43
            ^bb42:
              %398 = arith.constant 2 : i32
              %400 = arith.extsi %398 : i32 to i64
              %399 = arith.addi %386, %400 : i64
              %401 = arith.muli %399, %252 : i64
              %402 = llvm.load %351 : !llvm.ptr -> i64
              %403 = arith.addi %401, %402 : i64
              %404 = llvm.getelementptr %254[%403] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              %397 = llvm.load %404 : !llvm.ptr -> f64
              %406 = llvm.load %365 : !llvm.ptr -> i64
              %407 = llvm.getelementptr %275[%406] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              %405 = llvm.load %407 : !llvm.ptr -> f64
              %408 = arith.subf %397, %405 : f64
              %409 = arith.constant 2 : i32
              %411 = arith.extsi %409 : i32 to i64
              %410 = arith.addi %386, %411 : i64
              %412 = arith.muli %410, %252 : i64
              %413 = llvm.load %351 : !llvm.ptr -> i64
              %414 = arith.addi %412, %413 : i64
              %415 = llvm.getelementptr %254[%414] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              llvm.store %408, %415 : f64, !llvm.ptr
              cf.br ^bb44
            ^bb43:
              cf.br ^bb44
            ^bb44:
            cf.br ^bb41
          ^bb40:
            cf.br ^bb41
          ^bb41:
          %416 = llvm.load %365 : !llvm.ptr -> i64
          %417 = arith.constant 1 : i32
          %419 = arith.extsi %417 : i32 to i64
          %418 = arith.addi %416, %419 : i64
          llvm.store %418, %365 : i64, !llvm.ptr
          cf.br ^bb36
        ^bb38:
        %420 = llvm.load %351 : !llvm.ptr -> i64
        %421 = arith.constant 1 : i32
        %423 = arith.extsi %421 : i32 to i64
        %422 = arith.addi %420, %423 : i64
        llvm.store %422, %351 : i64, !llvm.ptr
        cf.br ^bb33
      ^bb35:
      func.call @lu_band(%254, %329) : (!llvm.ptr, i64) -> ()
      %425 = arith.constant 1 : i32
      %426 = arith.extsi %425 : i32 to i64
      llvm.store %426, %351 : i64, !llvm.ptr
      cf.br ^bb45
      ^bb45:
      %427 = llvm.load %351 : !llvm.ptr -> i64
      %428 = arith.cmpi sle, %427, %329 : i64
      cf.cond_br %428, ^bb46, ^bb47
      ^bb46:
        %429 = arith.constant 1.0 : f32
        %430 = llvm.load %351 : !llvm.ptr -> i64
        %431 = arith.extf %429 : f32 to f64
        %432 = llvm.getelementptr %260[%430] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %431, %432 : f64, !llvm.ptr
        %433 = llvm.load %351 : !llvm.ptr -> i64
        %434 = arith.constant 1 : i32
        %436 = arith.extsi %434 : i32 to i64
        %435 = arith.addi %433, %436 : i64
        llvm.store %435, %351 : i64, !llvm.ptr
        cf.br ^bb45
      ^bb47:
      func.call @solve_band(%254, %329, %260, %263) : (!llvm.ptr, i64, !llvm.ptr, !llvm.ptr) -> ()
      %438 = llvm.load %322 : !llvm.ptr -> i64
      %439 = arith.constant 5 : i32
      %441 = arith.extsi %439 : i32 to i64
      %440 = arith.cmpi sge, %438, %441 : i64
      cf.cond_br %440, ^bb48, ^bb49
      ^bb48:
        %442 = arith.constant 1 : i32
        %443 = arith.extsi %442 : i32 to i64
        llvm.store %443, %351 : i64, !llvm.ptr
        cf.br ^bb51
        ^bb51:
        %444 = llvm.load %351 : !llvm.ptr -> i64
        %445 = arith.cmpi sle, %444, %329 : i64
        cf.cond_br %445, ^bb52, ^bb53
        ^bb52:
          %446 = arith.constant 0.0 : f32
          %447 = llvm.load %351 : !llvm.ptr -> i64
          %448 = arith.extf %446 : f32 to f64
          %449 = llvm.getelementptr %260[%447] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          llvm.store %448, %449 : f64, !llvm.ptr
          %450 = llvm.load %351 : !llvm.ptr -> i64
          %451 = arith.constant 1 : i32
          %453 = arith.extsi %451 : i32 to i64
          %452 = arith.addi %450, %453 : i64
          llvm.store %452, %351 : i64, !llvm.ptr
          cf.br ^bb51
        ^bb53:
        %454 = arith.constant 1.0 : f32
        %455 = arith.constant 1 : i32
        %456 = arith.extf %454 : f32 to f64
        %457 = arith.extsi %455 : i32 to i64
        %458 = llvm.getelementptr %260[%457] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %456, %458 : f64, !llvm.ptr
        func.call @solve_band(%254, %329, %260, %269) : (!llvm.ptr, i64, !llvm.ptr, !llvm.ptr) -> ()
        %460 = arith.constant 0.0 : f32
        %461 = arith.constant 1 : i32
        %462 = arith.extf %460 : f32 to f64
        %463 = arith.extsi %461 : i32 to i64
        %464 = llvm.getelementptr %260[%463] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %462, %464 : f64, !llvm.ptr
        %465 = arith.constant 1.0 : f32
        %466 = arith.extf %465 : f32 to f64
        %467 = llvm.getelementptr %260[%329] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        llvm.store %466, %467 : f64, !llvm.ptr
        func.call @solve_band(%254, %329, %260, %272) : (!llvm.ptr, i64, !llvm.ptr, !llvm.ptr) -> ()
        %469 = arith.constant 1.0 : f32
        %471 = llvm.getelementptr %269[%329] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %470 = llvm.load %471 : !llvm.ptr -> f64
        %472 = arith.constant 9.0 : f32
        %474 = arith.extf %472 : f32 to f64
        %473 = arith.divf %470, %474 : f64
        %476 = arith.extf %469 : f32 to f64
        %475 = arith.subf %476, %473 : f64
        %477 = arith.constant 0.0 : f32
        %479 = llvm.getelementptr %272[%329] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %478 = llvm.load %479 : !llvm.ptr -> f64
        %480 = arith.constant 9.0 : f32
        %482 = arith.extf %480 : f32 to f64
        %481 = arith.divf %478, %482 : f64
        %484 = arith.extf %477 : f32 to f64
        %483 = arith.subf %484, %481 : f64
        %485 = arith.constant 0.0 : f32
        %487 = arith.constant 1 : i32
        %488 = arith.extsi %487 : i32 to i64
        %489 = llvm.getelementptr %269[%488] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %486 = llvm.load %489 : !llvm.ptr -> f64
        %490 = arith.constant 9.0 : f32
        %492 = arith.extf %490 : f32 to f64
        %491 = arith.divf %486, %492 : f64
        %494 = arith.extf %485 : f32 to f64
        %493 = arith.subf %494, %491 : f64
        %495 = arith.constant 1.0 : f32
        %497 = arith.constant 1 : i32
        %498 = arith.extsi %497 : i32 to i64
        %499 = llvm.getelementptr %272[%498] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %496 = llvm.load %499 : !llvm.ptr -> f64
        %500 = arith.constant 9.0 : f32
        %502 = arith.extf %500 : f32 to f64
        %501 = arith.divf %496, %502 : f64
        %504 = arith.extf %495 : f32 to f64
        %503 = arith.subf %504, %501 : f64
        %505 = arith.mulf %475, %503 : f64
        %506 = arith.mulf %483, %493 : f64
        %507 = arith.subf %505, %506 : f64
        %508 = arith.constant 0.0 : f32
        %510 = llvm.getelementptr %263[%329] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %509 = llvm.load %510 : !llvm.ptr -> f64
        %511 = arith.constant 9.0 : f32
        %513 = arith.extf %511 : f32 to f64
        %512 = arith.divf %509, %513 : f64
        %515 = arith.extf %508 : f32 to f64
        %514 = arith.subf %515, %512 : f64
        %516 = arith.constant 0.0 : f32
        %518 = arith.constant 1 : i32
        %519 = arith.extsi %518 : i32 to i64
        %520 = llvm.getelementptr %263[%519] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %517 = llvm.load %520 : !llvm.ptr -> f64
        %521 = arith.constant 9.0 : f32
        %523 = arith.extf %521 : f32 to f64
        %522 = arith.divf %517, %523 : f64
        %525 = arith.extf %516 : f32 to f64
        %524 = arith.subf %525, %522 : f64
        %526 = arith.mulf %503, %514 : f64
        %527 = arith.mulf %483, %524 : f64
        %528 = arith.subf %526, %527 : f64
        %529 = arith.divf %528, %507 : f64
        %530 = arith.mulf %475, %524 : f64
        %531 = arith.mulf %493, %514 : f64
        %532 = arith.subf %530, %531 : f64
        %533 = arith.divf %532, %507 : f64
        %534 = arith.constant 1 : i32
        %535 = arith.extsi %534 : i32 to i64
        llvm.store %535, %351 : i64, !llvm.ptr
        cf.br ^bb54
        ^bb54:
        %536 = llvm.load %351 : !llvm.ptr -> i64
        %537 = arith.cmpi sle, %536, %329 : i64
        cf.cond_br %537, ^bb55, ^bb56
        ^bb55:
          %539 = llvm.load %351 : !llvm.ptr -> i64
          %540 = llvm.getelementptr %263[%539] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %538 = llvm.load %540 : !llvm.ptr -> f64
          %542 = llvm.load %351 : !llvm.ptr -> i64
          %543 = llvm.getelementptr %269[%542] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %541 = llvm.load %543 : !llvm.ptr -> f64
          %544 = arith.mulf %541, %529 : f64
          %545 = arith.subf %538, %544 : f64
          %547 = llvm.load %351 : !llvm.ptr -> i64
          %548 = llvm.getelementptr %272[%547] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %546 = llvm.load %548 : !llvm.ptr -> f64
          %549 = arith.mulf %546, %533 : f64
          %550 = arith.subf %545, %549 : f64
          %551 = llvm.load %351 : !llvm.ptr -> i64
          %552 = llvm.getelementptr %263[%551] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          llvm.store %550, %552 : f64, !llvm.ptr
          %553 = llvm.load %351 : !llvm.ptr -> i64
          %554 = arith.constant 1 : i32
          %556 = arith.extsi %554 : i32 to i64
          %555 = arith.addi %553, %556 : i64
          llvm.store %555, %351 : i64, !llvm.ptr
          cf.br ^bb54
        ^bb56:
        %557 = arith.constant 1 : i32
        %558 = arith.extsi %557 : i32 to i64
        llvm.store %558, %351 : i64, !llvm.ptr
        cf.br ^bb57
        ^bb57:
        %559 = llvm.load %351 : !llvm.ptr -> i64
        %560 = arith.cmpi sle, %559, %329 : i64
        cf.cond_br %560, ^bb58, ^bb59
        ^bb58:
          %561 = arith.constant 0.0 : f32
          %562 = arith.extf %561 : f32 to f64
          %563 = llvm.mlir.constant(1 : i64) : i64
          %564 = llvm.alloca %563 x f64 : (i64) -> !llvm.ptr
          llvm.store %562, %564 : f64, !llvm.ptr
          %565 = arith.constant 0 : i32
          %566 = arith.extsi %565 : i32 to i64
          %567 = llvm.mlir.constant(1 : i64) : i64
          %568 = llvm.alloca %567 x i64 : (i64) -> !llvm.ptr
          llvm.store %566, %568 : i64, !llvm.ptr
          cf.br ^bb60
          ^bb60:
          %569 = llvm.load %568 : !llvm.ptr -> i64
          %570 = arith.constant 5 : i32
          %572 = arith.extsi %570 : i32 to i64
          %571 = arith.cmpi slt, %569, %572 : i64
          cf.cond_br %571, ^bb61, ^bb62
          ^bb61:
            %573 = llvm.load %351 : !llvm.ptr -> i64
            %574 = llvm.load %568 : !llvm.ptr -> i64
            %575 = arith.addi %573, %574 : i64
            %576 = arith.constant 2 : i32
            %578 = arith.extsi %576 : i32 to i64
            %577 = arith.subi %575, %578 : i64
            %579 = llvm.load %322 : !llvm.ptr -> i64
            %580 = arith.remsi %577, %579 : i64
            %581 = llvm.load %322 : !llvm.ptr -> i64
            %582 = arith.addi %580, %581 : i64
            %583 = llvm.load %322 : !llvm.ptr -> i64
            %584 = arith.remsi %582, %583 : i64
            %585 = arith.constant 0 : i32
            %587 = arith.extsi %585 : i32 to i64
            %586 = arith.cmpi ne, %584, %587 : i64
            cf.cond_br %586, ^bb63, ^bb64
            ^bb63:
              %588 = llvm.load %564 : !llvm.ptr -> f64
              %590 = llvm.load %568 : !llvm.ptr -> i64
              %591 = llvm.getelementptr %275[%590] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              %589 = llvm.load %591 : !llvm.ptr -> f64
              %593 = llvm.getelementptr %263[%584] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              %592 = llvm.load %593 : !llvm.ptr -> f64
              %594 = arith.mulf %589, %592 : f64
              %595 = arith.addf %588, %594 : f64
              llvm.store %595, %564 : f64, !llvm.ptr
              cf.br ^bb65
            ^bb64:
              cf.br ^bb65
            ^bb65:
            %596 = llvm.load %568 : !llvm.ptr -> i64
            %597 = arith.constant 1 : i32
            %599 = arith.extsi %597 : i32 to i64
            %598 = arith.addi %596, %599 : i64
            llvm.store %598, %568 : i64, !llvm.ptr
            cf.br ^bb60
          ^bb62:
          %600 = arith.constant 1.0 : f32
          %601 = arith.constant 2.0 : f32
          %602 = llvm.load %564 : !llvm.ptr -> f64
          %604 = arith.extf %601 : f32 to f64
          %603 = arith.mulf %604, %602 : f64
          %606 = arith.extf %600 : f32 to f64
          %605 = arith.addf %606, %603 : f64
          %607 = llvm.load %351 : !llvm.ptr -> i64
          %608 = llvm.getelementptr %260[%607] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          llvm.store %605, %608 : f64, !llvm.ptr
          %609 = llvm.load %351 : !llvm.ptr -> i64
          %610 = arith.constant 1 : i32
          %612 = arith.extsi %610 : i32 to i64
          %611 = arith.addi %609, %612 : i64
          llvm.store %611, %351 : i64, !llvm.ptr
          cf.br ^bb57
        ^bb59:
        func.call @solve_band(%254, %329, %260, %266) : (!llvm.ptr, i64, !llvm.ptr, !llvm.ptr) -> ()
        %614 = arith.constant 0.0 : f32
        %616 = llvm.getelementptr %266[%329] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %615 = llvm.load %616 : !llvm.ptr -> f64
        %617 = arith.constant 9.0 : f32
        %619 = arith.extf %617 : f32 to f64
        %618 = arith.divf %615, %619 : f64
        %621 = arith.extf %614 : f32 to f64
        %620 = arith.subf %621, %618 : f64
        %622 = arith.constant 0.0 : f32
        %624 = arith.constant 1 : i32
        %625 = arith.extsi %624 : i32 to i64
        %626 = llvm.getelementptr %266[%625] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %623 = llvm.load %626 : !llvm.ptr -> f64
        %627 = arith.constant 9.0 : f32
        %629 = arith.extf %627 : f32 to f64
        %628 = arith.divf %623, %629 : f64
        %631 = arith.extf %622 : f32 to f64
        %630 = arith.subf %631, %628 : f64
        %632 = arith.mulf %503, %620 : f64
        %633 = arith.mulf %483, %630 : f64
        %634 = arith.subf %632, %633 : f64
        %635 = arith.divf %634, %507 : f64
        %636 = arith.mulf %475, %630 : f64
        %637 = arith.mulf %493, %620 : f64
        %638 = arith.subf %636, %637 : f64
        %639 = arith.divf %638, %507 : f64
        %640 = arith.constant 1 : i32
        %641 = arith.extsi %640 : i32 to i64
        llvm.store %641, %351 : i64, !llvm.ptr
        cf.br ^bb66
        ^bb66:
        %642 = llvm.load %351 : !llvm.ptr -> i64
        %643 = arith.cmpi sle, %642, %329 : i64
        cf.cond_br %643, ^bb67, ^bb68
        ^bb67:
          %645 = llvm.load %351 : !llvm.ptr -> i64
          %646 = llvm.getelementptr %266[%645] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %644 = llvm.load %646 : !llvm.ptr -> f64
          %648 = llvm.load %351 : !llvm.ptr -> i64
          %649 = llvm.getelementptr %269[%648] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %647 = llvm.load %649 : !llvm.ptr -> f64
          %650 = arith.mulf %647, %635 : f64
          %651 = arith.subf %644, %650 : f64
          %653 = llvm.load %351 : !llvm.ptr -> i64
          %654 = llvm.getelementptr %272[%653] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          %652 = llvm.load %654 : !llvm.ptr -> f64
          %655 = arith.mulf %652, %639 : f64
          %656 = arith.subf %651, %655 : f64
          %657 = llvm.load %351 : !llvm.ptr -> i64
          %658 = llvm.getelementptr %266[%657] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          llvm.store %656, %658 : f64, !llvm.ptr
          %659 = llvm.load %351 : !llvm.ptr -> i64
          %660 = arith.constant 1 : i32
          %662 = arith.extsi %660 : i32 to i64
          %661 = arith.addi %659, %662 : i64
          llvm.store %661, %351 : i64, !llvm.ptr
          cf.br ^bb66
        ^bb68:
        cf.br ^bb50
      ^bb49:
        %663 = arith.constant 1 : i32
        %664 = arith.extsi %663 : i32 to i64
        llvm.store %664, %351 : i64, !llvm.ptr
        cf.br ^bb69
        ^bb69:
        %665 = llvm.load %351 : !llvm.ptr -> i64
        %666 = arith.cmpi sle, %665, %329 : i64
        cf.cond_br %666, ^bb70, ^bb71
        ^bb70:
          %667 = arith.constant 0.0 : f32
          %668 = arith.extf %667 : f32 to f64
          %669 = llvm.mlir.constant(1 : i64) : i64
          %670 = llvm.alloca %669 x f64 : (i64) -> !llvm.ptr
          llvm.store %668, %670 : f64, !llvm.ptr
          %671 = arith.constant 0 : i32
          %672 = arith.extsi %671 : i32 to i64
          %673 = llvm.mlir.constant(1 : i64) : i64
          %674 = llvm.alloca %673 x i64 : (i64) -> !llvm.ptr
          llvm.store %672, %674 : i64, !llvm.ptr
          cf.br ^bb72
          ^bb72:
          %675 = llvm.load %674 : !llvm.ptr -> i64
          %676 = arith.constant 5 : i32
          %678 = arith.extsi %676 : i32 to i64
          %677 = arith.cmpi slt, %675, %678 : i64
          cf.cond_br %677, ^bb73, ^bb74
          ^bb73:
            %679 = llvm.load %351 : !llvm.ptr -> i64
            %680 = llvm.load %674 : !llvm.ptr -> i64
            %681 = arith.addi %679, %680 : i64
            %682 = arith.constant 2 : i32
            %684 = arith.extsi %682 : i32 to i64
            %683 = arith.subi %681, %684 : i64
            %685 = llvm.load %322 : !llvm.ptr -> i64
            %686 = arith.remsi %683, %685 : i64
            %687 = llvm.load %322 : !llvm.ptr -> i64
            %688 = arith.addi %686, %687 : i64
            %689 = llvm.load %322 : !llvm.ptr -> i64
            %690 = arith.remsi %688, %689 : i64
            %691 = arith.constant 0 : i32
            %693 = arith.extsi %691 : i32 to i64
            %692 = arith.cmpi ne, %690, %693 : i64
            cf.cond_br %692, ^bb75, ^bb76
            ^bb75:
              %694 = llvm.load %670 : !llvm.ptr -> f64
              %696 = llvm.load %674 : !llvm.ptr -> i64
              %697 = llvm.getelementptr %275[%696] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              %695 = llvm.load %697 : !llvm.ptr -> f64
              %699 = llvm.getelementptr %263[%690] : (!llvm.ptr, i64) -> !llvm.ptr, f64
              %698 = llvm.load %699 : !llvm.ptr -> f64
              %700 = arith.mulf %695, %698 : f64
              %701 = arith.addf %694, %700 : f64
              llvm.store %701, %670 : f64, !llvm.ptr
              cf.br ^bb77
            ^bb76:
              cf.br ^bb77
            ^bb77:
            %702 = llvm.load %674 : !llvm.ptr -> i64
            %703 = arith.constant 1 : i32
            %705 = arith.extsi %703 : i32 to i64
            %704 = arith.addi %702, %705 : i64
            llvm.store %704, %674 : i64, !llvm.ptr
            cf.br ^bb72
          ^bb74:
          %706 = arith.constant 1.0 : f32
          %707 = arith.constant 2.0 : f32
          %708 = llvm.load %670 : !llvm.ptr -> f64
          %710 = arith.extf %707 : f32 to f64
          %709 = arith.mulf %710, %708 : f64
          %712 = arith.extf %706 : f32 to f64
          %711 = arith.addf %712, %709 : f64
          %713 = llvm.load %351 : !llvm.ptr -> i64
          %714 = llvm.getelementptr %260[%713] : (!llvm.ptr, i64) -> !llvm.ptr, f64
          llvm.store %711, %714 : f64, !llvm.ptr
          %715 = llvm.load %351 : !llvm.ptr -> i64
          %716 = arith.constant 1 : i32
          %718 = arith.extsi %716 : i32 to i64
          %717 = arith.addi %715, %718 : i64
          llvm.store %717, %351 : i64, !llvm.ptr
          cf.br ^bb69
        ^bb71:
        func.call @solve_band(%254, %329, %260, %266) : (!llvm.ptr, i64, !llvm.ptr, !llvm.ptr) -> ()
        cf.br ^bb50
      ^bb50:
      %720 = arith.constant 0.0 : f32
      %721 = arith.extf %720 : f32 to f64
      %722 = llvm.mlir.constant(1 : i64) : i64
      %723 = llvm.alloca %722 x f64 : (i64) -> !llvm.ptr
      llvm.store %721, %723 : f64, !llvm.ptr
      %724 = arith.constant 1 : i32
      %725 = arith.extsi %724 : i32 to i64
      llvm.store %725, %351 : i64, !llvm.ptr
      cf.br ^bb78
      ^bb78:
      %726 = llvm.load %351 : !llvm.ptr -> i64
      %727 = arith.cmpi sle, %726, %329 : i64
      cf.cond_br %727, ^bb79, ^bb80
      ^bb79:
        %728 = llvm.load %723 : !llvm.ptr -> f64
        %730 = llvm.load %351 : !llvm.ptr -> i64
        %731 = llvm.getelementptr %266[%730] : (!llvm.ptr, i64) -> !llvm.ptr, f64
        %729 = llvm.load %731 : !llvm.ptr -> f64
        %732 = arith.addf %728, %729 : f64
        llvm.store %732, %723 : f64, !llvm.ptr
        %733 = llvm.load %351 : !llvm.ptr -> i64
        %734 = arith.constant 1 : i32
        %736 = arith.extsi %734 : i32 to i64
        %735 = arith.addi %733, %736 : i64
        llvm.store %735, %351 : i64, !llvm.ptr
        cf.br ^bb78
      ^bb80:
      %737 = llvm.load %318 : !llvm.ptr -> f64
      %738 = llvm.load %723 : !llvm.ptr -> f64
      %739 = llvm.load %322 : !llvm.ptr -> i64
      %740 = arith.sitofp %739 : i64 to f64
      %741 = arith.divf %738, %740 : f64
      %742 = arith.addf %737, %741 : f64
      llvm.store %742, %318 : f64, !llvm.ptr
      %743 = llvm.load %322 : !llvm.ptr -> i64
      %744 = arith.constant 1 : i32
      %746 = arith.extsi %744 : i32 to i64
      %745 = arith.addi %743, %746 : i64
      llvm.store %745, %322 : i64, !llvm.ptr
      cf.br ^bb27
    ^bb29:
    %747 = llvm.load %318 : !llvm.ptr -> f64
    %748 = llvm.mlir.constant(1 : i64) : i64
    %749 = llvm.alloca %748 x f64 : (i64) -> !llvm.ptr
    llvm.store %747, %749 : f64, !llvm.ptr
    %750 = arith.constant 0 : i32
    %751 = arith.extsi %750 : i32 to i64
    %752 = llvm.mlir.constant(1 : i64) : i64
    %753 = llvm.alloca %752 x i64 : (i64) -> !llvm.ptr
    llvm.store %751, %753 : i64, !llvm.ptr
    cf.br ^bb81
    ^bb81:
    %754 = llvm.load %749 : !llvm.ptr -> f64
    %755 = arith.constant 10.0 : f32
    %757 = arith.extf %755 : f32 to f64
    %756 = arith.cmpf oge, %754, %757 : f64
    cf.cond_br %756, ^bb82, ^bb83
    ^bb82:
      %758 = llvm.load %749 : !llvm.ptr -> f64
      %759 = arith.constant 10.0 : f32
      %761 = arith.extf %759 : f32 to f64
      %760 = arith.divf %758, %761 : f64
      llvm.store %760, %749 : f64, !llvm.ptr
      %762 = llvm.load %753 : !llvm.ptr -> i64
      %763 = arith.constant 1 : i32
      %765 = arith.extsi %763 : i32 to i64
      %764 = arith.addi %762, %765 : i64
      llvm.store %764, %753 : i64, !llvm.ptr
      cf.br ^bb81
    ^bb83:
    %766 = llvm.mlir.addressof @str_0 : !llvm.ptr
    %767 = llvm.load %749 : !llvm.ptr -> f64
    %768 = llvm.load %753 : !llvm.ptr -> i64
    %769 = llvm.call @printf(%766, %767, %768) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, f64, i64) -> i32
    func.call @free(%254) : (!llvm.ptr) -> ()
    func.call @free(%260) : (!llvm.ptr) -> ()
    func.call @free(%263) : (!llvm.ptr) -> ()
    func.call @free(%266) : (!llvm.ptr) -> ()
    func.call @free(%269) : (!llvm.ptr) -> ()
    func.call @free(%272) : (!llvm.ptr) -> ()
    func.call @free(%275) : (!llvm.ptr) -> ()
    %777 = arith.constant 0 : i32
    func.return %777 : i32
  }
}