Problem 566

G(53) = sum of F(a,b,c) for 9 <= a < b < c <= 53. Ported from C++ using i128 field arithmetic, partition building, CRT.

Answer329569369413585
Output(timeout)
StatusSKIP
Native helperno
Runtimen/a
Peak memoryn/a
Time complexityO(n^3) (estimated)
Space complexityO(n^2) (estimated)

Performance comparison

MetricOur solutionBest known
Time complexityO(n^3)O(n * m)
Space complexityO(n^2)O(n)
ApproachFlow solutionDynamic programming or generating function
VerdictUnknown

Flow source

# Project Euler 566
# G(53) = sum of F(a,b,c) for 9 <= a < b < c <= 53.
# Ported from C++ using i128 field arithmetic, partition building, CRT.

extern {
    function calloc(n: i64, size: i64) -> ptr<void>
    function free(p: ptr<void>) -> void
    function memset(p: ptr<void>, v: i32, n: i64) -> ptr<void>
    function floor(x: f64) -> f64
    function sqrt(x: f64) -> f64
    function llround(x: f64) -> i64
}

struct Point { P: i64, Q: i64 }
struct FC { a: i32, b: i32, c: i32, ab: i64, sqrtc: f64 }
struct CRTResult { a: i64, m: i64, valid: i32 }

function llgcd(a0: i64, b0: i64) -> i64 {
    let mut a: i64 = a0
    let mut b: i64 = b0
    if a < 0 { a = 0 - a }
    if b < 0 { b = 0 - b }
    while b != 0 {
        let t: i64 = a % b
        a = b
        b = t
    }
    return a
}

function lllcm(a: i64, b: i64) -> i64 {
    return a / llgcd(a, b) * b
}

function sign_AB_sqrtc(A: i128, B: i128, c: i32) -> i32 {
    let zero: i128 = 0 as i128
    if B == zero {
        if A == zero { return 0 }
        if A > zero { return 1 }
        return -1
    }
    if A == zero {
        if B > zero { return 1 }
        return -1
    }
    if (A > zero && B > zero) || (A < zero && B < zero) {
        if A > zero { return 1 }
        return -1
    }
    let A2: i128 = A * A
    let B2c: i128 = B * B * (c as i128)
    if A < zero && B > zero {
        if B2c == A2 { return 0 }
        if B2c > A2 { return 1 }
        return -1
    }
    if B2c == A2 { return 0 }
    if B2c > A2 { return -1 }
    return 1
}

function cmpPoints(aP: i64, aQ: i64, bP: i64, bQ: i64, ab: i64, c: i32) -> i32 {
    let dP: i64 = aP - bP
    let dQ: i64 = aQ - bQ
    let A: i128 = (dP as i128) * (c as i128)
    let B: i128 = (dQ as i128) * (ab as i128)
    return sign_AB_sqrtc(A, B, c)
}

function canonical01(P0: i64, Q0: i64, ctx: FC) -> Point {
    let mut P: i64 = P0
    let Q: i64 = Q0
    let approx: f64 = (P as f64) / (ctx.ab as f64) + (Q as f64) * ctx.sqrtc / (ctx.c as f64)
    let n: i64 = floor(approx) as i64
    P = P - n * ctx.ab
    while sign_AB_sqrtc((P as i128) * (ctx.c as i128), (Q as i128) * (ctx.ab as i128), ctx.c) < 0 {
        P = P + ctx.ab
    }
    while sign_AB_sqrtc(((P - ctx.ab) as i128) * (ctx.c as i128), (Q as i128) * (ctx.ab as i128), ctx.c) >= 0 {
        P = P - ctx.ab
    }
    return Point { P: P, Q: Q }
}

function addP(xP: i64, xQ: i64, sP: i64, sQ: i64, ctx: FC) -> Point {
    return canonical01(xP + sP, xQ + sQ, ctx)
}

function subP(xP: i64, xQ: i64, sP: i64, sQ: i64, ctx: FC) -> Point {
    return canonical01(xP - sP, xQ - sQ, ctx)
}

function oneMinus(xP: i64, xQ: i64, ctx: FC) -> Point {
    return canonical01(ctx.ab - xP, 0 - xQ, ctx)
}

function sortI64(arr: ptr<i64>, n: i32) -> void {
    if n < 2 { return }
    let stack: ptr<i32> = calloc((n * 2) as i64, 4) as ptr<i32>
    let mut sp: i32 = 0
    stack[sp] = 0
    sp = sp + 1
    stack[sp] = n - 1
    sp = sp + 1
    while sp > 0 {
        sp = sp - 1
        let hi: i32 = stack[sp]
        sp = sp - 1
        let lo: i32 = stack[sp]
        let pivot: i64 = arr[hi]
        let mut i: i32 = lo - 1
        let mut j: i32 = lo
        while j < hi {
            if arr[j] <= pivot {
                i = i + 1
                let tmp: i64 = arr[i]
                arr[i] = arr[j]
                arr[j] = tmp
            }
            j = j + 1
        }
        i = i + 1
        let tmp: i64 = arr[i]
        arr[i] = arr[hi]
        arr[hi] = tmp
        let p: i32 = i
        if p - 1 > lo {
            stack[sp] = lo
            sp = sp + 1
            stack[sp] = p - 1
            sp = sp + 1
        }
        if p + 1 < hi {
            stack[sp] = p + 1
            sp = sp + 1
            stack[sp] = hi
            sp = sp + 1
        }
    }
    free(stack as ptr<void>)
}

function sortPoints(ptsP: ptr<i64>, ptsQ: ptr<i64>, n: i32, ab: i64, c: i32) -> void {
    if n < 2 { return }
    let stack: ptr<i32> = calloc((n * 2) as i64, 4) as ptr<i32>
    let mut sp: i32 = 0
    stack[sp] = 0
    sp = sp + 1
    stack[sp] = n - 1
    sp = sp + 1
    while sp > 0 {
        sp = sp - 1
        let hi: i32 = stack[sp]
        sp = sp - 1
        let lo: i32 = stack[sp]
        let pivotP: i64 = ptsP[hi]
        let pivotQ: i64 = ptsQ[hi]
        let mut i: i32 = lo - 1
        let mut j: i32 = lo
        while j < hi {
            if cmpPoints(ptsP[j], ptsQ[j], pivotP, pivotQ, ab, c) <= 0 {
                i = i + 1
                let tmpP: i64 = ptsP[i]
                let tmpQ: i64 = ptsQ[i]
                ptsP[i] = ptsP[j]
                ptsQ[i] = ptsQ[j]
                ptsP[j] = tmpP
                ptsQ[j] = tmpQ
            }
            j = j + 1
        }
        i = i + 1
        let tmpP: i64 = ptsP[i]
        let tmpQ: i64 = ptsQ[i]
        ptsP[i] = ptsP[hi]
        ptsQ[i] = ptsQ[hi]
        ptsP[hi] = tmpP
        ptsQ[hi] = tmpQ
        let p: i32 = i
        if p - 1 > lo {
            stack[sp] = lo
            sp = sp + 1
            stack[sp] = p - 1
            sp = sp + 1
        }
        if p + 1 < hi {
            stack[sp] = p + 1
            sp = sp + 1
            stack[sp] = hi
            sp = sp + 1
        }
    }
    free(stack as ptr<void>)
}

function kmpPrefix(pat: ptr<i32>, n: i32, pi: ptr<i32>) -> void {
    if n > 0 { pi[0] = 0 }
    let mut i: i32 = 1
    let mut j: i32 = 0
    while i < n {
        while j > 0 && pat[i] != pat[j] {
            j = pi[j - 1]
        }
        if pat[i] == pat[j] {
            j = j + 1
        }
        pi[i] = j
        i = i + 1
    }
}

function findRotations(w: ptr<i32>, e: ptr<i32>, n: i32, shifts: ptr<i32>, shiftCount: ptr<i32>) -> void {
    shiftCount[0] = 0
    let text: ptr<i32> = calloc((2 * n) as i64, 4) as ptr<i32>
    let pi: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
    let mut i: i32 = 0
    while i < n {
        text[i] = w[i]
        text[i + n] = w[i]
        i = i + 1
    }
    kmpPrefix(e, n, pi)
    let mut j: i32 = 0
    i = 0
    while i < 2 * n - 1 {
        while j > 0 && text[i] != e[j] {
            j = pi[j - 1]
        }
        if text[i] == e[j] {
            j = j + 1
        }
        if j == n {
            let pos: i32 = i - n + 1
            if pos < n {
                let shift: i32 = (n - pos) % n
                shifts[shiftCount[0]] = shift
                shiftCount[0] = shiftCount[0] + 1
            }
            j = pi[j - 1]
        }
        i = i + 1
    }
    free(text as ptr<void>)
    free(pi as ptr<void>)
}

function modinv_egcd(a: i64, b: i64) -> i64 {
    let mut old_r: i64 = a
    let mut r: i64 = b
    let mut old_s: i64 = 1
    let mut s: i64 = 0
    while r != 0 {
        let q: i64 = old_r / r
        let nr: i64 = old_r - q * r
        let ns: i64 = old_s - q * s
        old_r = r
        r = nr
        old_s = s
        s = ns
    }
    return old_s
}

function crtPair(a1: i64, m1: i64, a2: i64, m2: i64) -> CRTResult {
    let g: i64 = llgcd(m1, m2)
    let diff: i64 = a2 - a1
    if diff % g != 0 {
        return CRTResult { a: 0, m: 0, valid: 0 }
    }
    let m1g: i64 = m1 / g
    let m2g: i64 = m2 / g
    let mut x: i64 = modinv_egcd(m1g, m2g) % m2g
    if x < 0 { x = x + m2g }
    let mut t: i128 = ((diff / g) as i128) * (x as i128) % (m2g as i128)
    if t < 0 { t = t + (m2g as i128) }
    let l: i128 = (m1 as i128) / (g as i128) * (m2 as i128)
    let res: i128 = (a1 as i128) + (m1 as i128) * t
    let mod: i64 = l as i64
    let mut ans: i64 = (res % l) as i64
    if ans < 0 { ans = ans + mod }
    return CRTResult { a: ans, m: mod, valid: 1 }
}

function mergeCRT(sols: ptr<i64>, solCount: ptr<i32>, M: ptr<i64>, residues: ptr<i64>, resCount: i32, P: i64) -> void {
    let sc: i32 = solCount[0]
    let newM: i64 = lllcm(M[0], P)
    let maxNext: i64 = (sc as i64) * (resCount as i64) + 1
    let next: ptr<i64> = calloc(maxNext, 8) as ptr<i64>
    let mut nextCount: i32 = 0
    let mut i: i32 = 0
    while i < sc {
        let mut j: i32 = 0
        while j < resCount {
            let result: CRTResult = crtPair(sols[i], M[0], residues[j], P)
            if result.valid != 0 {
                next[nextCount] = result.a
                nextCount = nextCount + 1
            }
            j = j + 1
        }
        i = i + 1
    }
    sortI64(next, nextCount)
    let mut dedup: i32 = 0
    let mut k: i32 = 0
    while k < nextCount {
        if dedup == 0 || next[k] != next[dedup - 1] {
            next[dedup] = next[k]
            dedup = dedup + 1
        }
        k = k + 1
    }
    let mut idx: i32 = 0
    while idx < dedup {
        sols[idx] = next[idx]
        idx = idx + 1
    }
    solCount[0] = dedup
    M[0] = newM
    free(next as ptr<void>)
}

function cycleConstraint(f: ptr<i32>, L: i32, outP: ptr<i64>, good: ptr<i64>, goodCount: ptr<i32>) -> void {
    let n: i32 = L / 3
    let mut total_f: i32 = 0
    let mut i: i32 = 0
    while i < L {
        total_f = total_f ^ f[i]
        i = i + 1
    }
    let P: i64 = if total_f == 0 { L as i64 } else { (2 * L) as i64 }
    outP[0] = P

    let a: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
    let b: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
    let cc: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
    i = 0
    while i < n {
        a[i] = f[3 * i]
        b[i] = f[3 * i + 1]
        cc[i] = f[3 * i + 2]
        i = i + 1
    }

    let w: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
    let mut total_w: i32 = 0
    i = 0
    while i < n {
        w[i] = a[i] ^ b[i] ^ cc[i]
        total_w = total_w ^ w[i]
        i = i + 1
    }

    let pref: ptr<i32> = calloc((n + 1) as i64, 4) as ptr<i32>
    pref[0] = 0
    i = 0
    while i < n {
        pref[i + 1] = pref[i] ^ w[i]
        i = i + 1
    }

    goodCount[0] = 0

    let mut R: i32 = 0
    while R < 3 {
        let t: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
        if R == 0 {
            let mut j: i32 = 0
            while j < n {
                t[j] = 0
                j = j + 1
            }
        } else {
            if R == 1 {
                let mut j: i32 = 0
                while j < n {
                    t[j] = a[j]
                    j = j + 1
                }
            } else {
                let mut j: i32 = 0
                while j < n {
                    t[j] = a[j] ^ b[j]
                    j = j + 1
                }
            }
        }

        let dt: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
        let e: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
        let mut j: i32 = 0
        while j < n {
            dt[j] = t[j] ^ t[(j + 1) % n]
            e[j] = w[j] ^ dt[j]
            j = j + 1
        }

        let shifts: ptr<i32> = calloc(n as i64, 4) as ptr<i32>
        let scPtr: ptr<i32> = calloc(1, 4) as ptr<i32>
        findRotations(w, e, n, shifts, scPtr)
        let sc: i32 = scPtr[0]

        let mut si: i32 = 0
        while si < sc {
            let sShift: i32 = shifts[si]
            let mut q: i32 = 0
            while q < 2 {
                let mTrip: i32 = sShift + q * n
                let h0: i32 = pref[sShift] ^ (q * total_w)
                let target: i32 = t[mTrip % n]
                if h0 == target {
                    let Nval: i64 = 3 * (mTrip as i64) + (R as i64)
                    let Nmod: i64 = Nval % P
                    good[goodCount[0]] = Nmod
                    goodCount[0] = goodCount[0] + 1
                }
                q = q + 1
            }
            si = si + 1
        }

        free(t as ptr<void>)
        free(dt as ptr<void>)
        free(e as ptr<void>)
        free(shifts as ptr<void>)
        free(scPtr as ptr<void>)
        R = R + 1
    }

    sortI64(good, goodCount[0])
    let mut dedup: i32 = 0
    let mut k: i32 = 0
    while k < goodCount[0] {
        if dedup == 0 || good[k] != good[dedup - 1] {
            good[dedup] = good[k]
            dedup = dedup + 1
        }
        k = k + 1
    }
    goodCount[0] = dedup

    free(a as ptr<void>)
    free(b as ptr<void>)
    free(cc as ptr<void>)
    free(w as ptr<void>)
    free(pref as ptr<void>)
}

function findIntervalIndex(ptsP: ptr<i64>, ptsQ: ptr<i64>, m: i32, xP: i64, xQ: i64, ab: i64, c: i32) -> i32 {
    let mut lo: i32 = 0
    let mut hi: i32 = m
    while lo + 1 < hi {
        let mid: i32 = (lo + hi) / 2
        if cmpPoints(ptsP[mid], ptsQ[mid], xP, xQ, ab, c) <= 0 {
            lo = mid
        } else {
            hi = mid
        }
    }
    return lo
}

function solvePermutation(nxt: ptr<i32>, flip: ptr<i32>, N: i32, m: i32) -> i64 {
    let vis: ptr<i32> = calloc(N as i64, 4) as ptr<i32>
    let mut i: i32 = 0
    while i < N {
        vis[i] = 0
        i = i + 1
    }

    let constrP: ptr<i64> = calloc(N as i64, 8) as ptr<i64>
    let constrResOff: ptr<i32> = calloc(N as i64, 4) as ptr<i32>
    let constrResCnt: ptr<i32> = calloc(N as i64, 4) as ptr<i32>
    let allRes: ptr<i64> = calloc(((2 * N + 1) as i64), 8) as ptr<i64>
    let mut allResOff: i32 = 0
    let mut constrCnt: i32 = 0

    let mut sIdx: i32 = 0
    while sIdx < N {
        if vis[sIdx] != 0 {
            sIdx = sIdx + 1
            continue
        }

        let cyc: ptr<i32> = calloc(N as i64, 4) as ptr<i32>
        let mut cycLen: i32 = 0
        let mut cur: i32 = sIdx
        while vis[cur] == 0 {
            vis[cur] = 1
            cyc[cycLen] = cur
            cycLen = cycLen + 1
            cur = nxt[cur]
        }

        let mut rot: i32 = 0
        let mut j: i32 = 0
        while j < cycLen {
            if cyc[j] < m {
                rot = j
                break
            }
            j = j + 1
        }

        let f: ptr<i32> = calloc(cycLen as i64, 4) as ptr<i32>
        let mut j2: i32 = 0
        while j2 < cycLen {
            f[j2] = flip[cyc[(rot + j2) % cycLen]]
            j2 = j2 + 1
        }

        let PPtr: ptr<i64> = calloc(1, 8) as ptr<i64>
        let good: ptr<i64> = calloc(((2 * cycLen + 1) as i64), 8) as ptr<i64>
        let goodCnt: ptr<i32> = calloc(1, 4) as ptr<i32>
        cycleConstraint(f, cycLen, PPtr, good, goodCnt)

        constrP[constrCnt] = PPtr[0]
        constrResOff[constrCnt] = allResOff
        constrResCnt[constrCnt] = goodCnt[0]
        let mut g: i32 = 0
        while g < goodCnt[0] {
            allRes[allResOff] = good[g]
            allResOff = allResOff + 1
            g = g + 1
        }
        constrCnt = constrCnt + 1

        free(cyc as ptr<void>)
        free(f as ptr<void>)
        free(PPtr as ptr<void>)
        free(good as ptr<void>)
        free(goodCnt as ptr<void>)

        sIdx = sIdx + 1
    }

    let mut ci: i32 = 1
    while ci < constrCnt {
        let curP: i64 = constrP[ci]
        let curOff: i32 = constrResOff[ci]
        let curCnt: i32 = constrResCnt[ci]
        let mut cj: i32 = ci
        while cj > 0 && constrP[cj - 1] > curP {
            constrP[cj] = constrP[cj - 1]
            constrResOff[cj] = constrResOff[cj - 1]
            constrResCnt[cj] = constrResCnt[cj - 1]
            cj = cj - 1
        }
        constrP[cj] = curP
        constrResOff[cj] = curOff
        constrResCnt[cj] = curCnt
        ci = ci + 1
    }

    let sols: ptr<i64> = calloc(1000000, 8) as ptr<i64>
    sols[0] = 0
    let solCnt: ptr<i32> = calloc(1, 4) as ptr<i32>
    solCnt[0] = 1
    let M: ptr<i64> = calloc(1, 8) as ptr<i64>
    M[0] = 1

    ci = 0
    while ci < constrCnt {
        let rc: i32 = constrResCnt[ci]
        let residues: ptr<i64> = calloc((rc as i64) + 1, 8) as ptr<i64>
        let mut g: i32 = 0
        while g < rc {
            residues[g] = allRes[constrResOff[ci] + g]
            g = g + 1
        }
        mergeCRT(sols, solCnt, M, residues, rc, constrP[ci])
        free(residues as ptr<void>)
        ci = ci + 1
    }

    let mut best: i64 = 9223372036854775807
    let mut ri: i32 = 0
    while ri < solCnt[0] {
        if sols[ri] != 0 && sols[ri] < best {
            best = sols[ri]
        }
        ri = ri + 1
    }
    if best == 9223372036854775807 {
        best = M[0]
    }

    free(vis as ptr<void>)
    free(constrP as ptr<void>)
    free(constrResOff as ptr<void>)
    free(constrResCnt as ptr<void>)
    free(allRes as ptr<void>)
    free(sols as ptr<void>)
    free(solCnt as ptr<void>)
    free(M as ptr<void>)

    return best
}

function isSquare(c: i32) -> bool {
    let r: i32 = llround(sqrt((c as f64))) as i32
    return r * r == c
}

function F_square(a: i32, b: i32, c: i32) -> i64 {
    let k: i32 = llround(sqrt((c as f64))) as i32
    let mut D: i64 = 1
    D = lllcm(D, a as i64)
    D = lllcm(D, b as i64)
    D = lllcm(D, k as i64)

    let S0: i64 = D / (a as i64)
    let S1: i64 = D / (b as i64)
    let S2: i64 = D / (k as i64)
    let m: i32 = D as i32
    let N: i32 = 3 * m

    let nxt: ptr<i32> = calloc(N as i64, 4) as ptr<i32>
    let flip: ptr<i32> = calloc(N as i64, 4) as ptr<i32>

    let Sarr: array<i64, 3> = [S0, S1, S2]
    let mut ph: i32 = 0
    while ph < 3 {
        let Sph: i64 = Sarr[ph]
        let mut j: i32 = 0
        while j < m {
            let mut j2: i32 = 0
            let mut fbit: i32 = 0
            if (j as i64) < Sph {
                j2 = m - 1 - j
                fbit = 1
            } else {
                j2 = ((j as i64) - Sph) as i32
                fbit = 0
            }
            let cur: i32 = ph * m + j
            let nxtph: i32 = (ph + 1) % 3
            nxt[cur] = nxtph * m + j2
            flip[cur] = fbit
            j = j + 1
        }
        ph = ph + 1
    }

    let result: i64 = solvePermutation(nxt, flip, N, m)
    free(nxt as ptr<void>)
    free(flip as ptr<void>)
    return result
}

function F_nonsquare(a: i32, b: i32, c: i32) -> i64 {
    let ctx: FC = FC { a: a, b: b, c: c, ab: (a as i64) * (b as i64), sqrtc: sqrt((c as f64)) }

    let s0: Point = canonical01(ctx.ab / (a as i64), 0, ctx)
    let s1: Point = canonical01(ctx.ab / (b as i64), 0, ctx)
    let s2: Point = canonical01(0, 1, ctx)
    let sP: array<i64, 3> = [s0.P, s1.P, s2.P]
    let sQ: array<i64, 3> = [s0.Q, s1.Q, s2.Q]

    let thr0: Point = oneMinus(s0.P, s0.Q, ctx)
    let thr1: Point = oneMinus(s1.P, s1.Q, ctx)
    let thr2: Point = oneMinus(s2.P, s2.Q, ctx)
    let thrP: array<i64, 3> = [thr0.P, thr1.P, thr2.P]
    let thrQ: array<i64, 3> = [thr0.Q, thr1.Q, thr2.Q]

    let CAP: i32 = 2097152
    let MASK: i32 = CAP - 1

    let hashP0: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let hashP1: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let hashP2: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let hashQ0: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let hashQ1: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let hashQ2: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let occ0: ptr<i32> = calloc(CAP as i64, 4) as ptr<i32>
    let occ1: ptr<i32> = calloc(CAP as i64, 4) as ptr<i32>
    let occ2: ptr<i32> = calloc(CAP as i64, 4) as ptr<i32>
    let hashP: array<ptr<i64>, 3> = [hashP0, hashP1, hashP2]
    let hashQ: array<ptr<i64>, 3> = [hashQ0, hashQ1, hashQ2]
    let occ: array<ptr<i32>, 3> = [occ0, occ1, occ2]

    let stackP0: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let stackP1: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let stackP2: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let stackQ0: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let stackQ1: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let stackQ2: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let stackP: array<ptr<i64>, 3> = [stackP0, stackP1, stackP2]
    let stackQ: array<ptr<i64>, 3> = [stackQ0, stackQ1, stackQ2]
    let mut stackCnt: array<i32, 3> = [0, 0, 0]

    let mut ph: i32 = 0
    while ph < 3 {
        let sp: i64 = sP[ph]
        let sq: i64 = sQ[ph]
        let mut h0: i64 = 0 * 31 + 0
        if h0 < 0 { h0 = 0 - h0 }
        let idx0: i32 = (h0 & (MASK as i64)) as i32
        hashP[ph][idx0] = 0
        hashQ[ph][idx0] = 0
        occ[ph][idx0] = 1
        let mut h1: i64 = sp * 31 + sq
        if h1 < 0 { h1 = 0 - h1 }
        let idx1: i32 = (h1 & (MASK as i64)) as i32
        hashP[ph][idx1] = sp
        hashQ[ph][idx1] = sq
        occ[ph][idx1] = 1
        stackP[ph][0] = 0
        stackQ[ph][0] = 0
        stackP[ph][1] = sp
        stackQ[ph][1] = sq
        stackCnt[ph] = 2
        ph = ph + 1
    }

    let mut progressed: bool = true
    while progressed {
        progressed = false
        ph = 0
        while ph < 3 {
            let prev: i32 = (ph + 2) % 3
            while stackCnt[ph] > 0 {
                progressed = true
                stackCnt[ph] = stackCnt[ph] - 1
                let yP: i64 = stackP[ph][stackCnt[ph]]
                let yQ: i64 = stackQ[ph][stackCnt[ph]]
                let cmp: i32 = cmpPoints(yP, yQ, thrP[prev], thrQ[prev], ctx.ab, ctx.c)
                if cmp < 0 {
                    let x: Point = addP(yP, yQ, sP[prev], sQ[prev], ctx)
                    let mut h: i64 = x.P * 31 + x.Q
                    if h < 0 { h = 0 - h }
                    let idx: i32 = (h & (MASK as i64)) as i32
                    let mut inserted: bool = false
                    let mut probe: i32 = 0
                    while probe < CAP {
                        let pidx: i32 = (idx + probe) & MASK
                        if occ[prev][pidx] == 0 {
                            hashP[prev][pidx] = x.P
                            hashQ[prev][pidx] = x.Q
                            occ[prev][pidx] = 1
                            inserted = true
                            break
                        }
                        if hashP[prev][pidx] == x.P && hashQ[prev][pidx] == x.Q {
                            break
                        }
                        probe = probe + 1
                    }
                    if inserted {
                        stackP[prev][stackCnt[prev]] = x.P
                        stackQ[prev][stackCnt[prev]] = x.Q
                        stackCnt[prev] = stackCnt[prev] + 1
                    }
                }
                if cmp > 0 {
                    let x: Point = oneMinus(yP, yQ, ctx)
                    let mut h: i64 = x.P * 31 + x.Q
                    if h < 0 { h = 0 - h }
                    let idx: i32 = (h & (MASK as i64)) as i32
                    let mut inserted: bool = false
                    let mut probe: i32 = 0
                    while probe < CAP {
                        let pidx: i32 = (idx + probe) & MASK
                        if occ[prev][pidx] == 0 {
                            hashP[prev][pidx] = x.P
                            hashQ[prev][pidx] = x.Q
                            occ[prev][pidx] = 1
                            inserted = true
                            break
                        }
                        if hashP[prev][pidx] == x.P && hashQ[prev][pidx] == x.Q {
                            break
                        }
                        probe = probe + 1
                    }
                    if inserted {
                        stackP[prev][stackCnt[prev]] = x.P
                        stackQ[prev][stackCnt[prev]] = x.Q
                        stackCnt[prev] = stackCnt[prev] + 1
                    }
                }
            }
            ph = ph + 1
        }
    }

    let ptsP0: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let ptsP1: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let ptsP2: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let ptsQ0: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let ptsQ1: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let ptsQ2: ptr<i64> = calloc(CAP as i64, 8) as ptr<i64>
    let ptsP: array<ptr<i64>, 3> = [ptsP0, ptsP1, ptsP2]
    let ptsQ: array<ptr<i64>, 3> = [ptsQ0, ptsQ1, ptsQ2]
    let mut m: i32 = -1
    ph = 0
    while ph < 3 {
        let mut count: i32 = 0
        let mut idx: i32 = 0
        while idx < CAP {
            if occ[ph][idx] != 0 {
                ptsP[ph][count] = hashP[ph][idx]
                ptsQ[ph][count] = hashQ[ph][idx]
                count = count + 1
            }
            idx = idx + 1
        }
        sortPoints(ptsP[ph], ptsQ[ph], count, ctx.ab, ctx.c)
        if m < 0 { m = count }
        if m != count {
            printf("Partition size mismatch for (%d,%d,%d)\n", a, b, c)
            free(hashP0 as ptr<void>)
            free(hashP1 as ptr<void>)
            free(hashP2 as ptr<void>)
            free(hashQ0 as ptr<void>)
            free(hashQ1 as ptr<void>)
            free(hashQ2 as ptr<void>)
            free(occ0 as ptr<void>)
            free(occ1 as ptr<void>)
            free(occ2 as ptr<void>)
            free(stackP0 as ptr<void>)
            free(stackP1 as ptr<void>)
            free(stackP2 as ptr<void>)
            free(stackQ0 as ptr<void>)
            free(stackQ1 as ptr<void>)
            free(stackQ2 as ptr<void>)
            free(ptsP0 as ptr<void>)
            free(ptsP1 as ptr<void>)
            free(ptsP2 as ptr<void>)
            free(ptsQ0 as ptr<void>)
            free(ptsQ1 as ptr<void>)
            free(ptsQ2 as ptr<void>)
            return -1
        }
        ph = ph + 1
    }

    let N: i32 = 3 * m
    let nxt: ptr<i32> = calloc(N as i64, 4) as ptr<i32>
    let flip: ptr<i32> = calloc(N as i64, 4) as ptr<i32>

    ph = 0
    while ph < 3 {
        let mut i: i32 = 0
        while i < m {
            let lP: i64 = ptsP[ph][i]
            let lQ: i64 = ptsQ[ph][i]
            let mut rP: i64 = ctx.ab
            let mut rQ: i64 = 0
            if i + 1 < m {
                rP = ptsP[ph][i + 1]
                rQ = ptsQ[ph][i + 1]
            }
            let inside: bool = cmpPoints(lP, lQ, sP[ph], sQ[ph], ctx.ab, ctx.c) < 0
            let mut yLeftP: i64 = 0
            let mut yLeftQ: i64 = 0
            if inside {
                let yLeft: Point = oneMinus(rP, rQ, ctx)
                yLeftP = yLeft.P
                yLeftQ = yLeft.Q
            } else {
                let yLeft: Point = subP(lP, lQ, sP[ph], sQ[ph], ctx)
                yLeftP = yLeft.P
                yLeftQ = yLeft.Q
            }
            let nxtph: i32 = (ph + 1) % 3
            let j: i32 = findIntervalIndex(ptsP[nxtph], ptsQ[nxtph], m, yLeftP, yLeftQ, ctx.ab, ctx.c)
            let cur: i32 = ph * m + i
            nxt[cur] = nxtph * m + j
            flip[cur] = if inside { 1 } else { 0 }
            i = i + 1
        }
        ph = ph + 1
    }

    let result: i64 = solvePermutation(nxt, flip, N, m)

    free(hashP0 as ptr<void>)
    free(hashP1 as ptr<void>)
    free(hashP2 as ptr<void>)
    free(hashQ0 as ptr<void>)
    free(hashQ1 as ptr<void>)
    free(hashQ2 as ptr<void>)
    free(occ0 as ptr<void>)
    free(occ1 as ptr<void>)
    free(occ2 as ptr<void>)
    free(stackP0 as ptr<void>)
    free(stackP1 as ptr<void>)
    free(stackP2 as ptr<void>)
    free(stackQ0 as ptr<void>)
    free(stackQ1 as ptr<void>)
    free(stackQ2 as ptr<void>)
    free(ptsP0 as ptr<void>)
    free(ptsP1 as ptr<void>)
    free(ptsP2 as ptr<void>)
    free(ptsQ0 as ptr<void>)
    free(ptsQ1 as ptr<void>)
    free(ptsQ2 as ptr<void>)
    free(nxt as ptr<void>)
    free(flip as ptr<void>)

    return result
}

function F(a: i32, b: i32, c: i32) -> i64 {
    let result: i64 = 0
    if isSquare(c) {
        result = F_square(a, b, c)
    } else {
        result = F_nonsquare(a, b, c)
    }
    return result
}

function computeG(n: i32) -> i64 {
    let mut sum: i64 = 0
    let mut a: i32 = 9
    while a <= n - 2 {
        let mut b: i32 = a + 1
        while b <= n - 1 {
            let mut c: i32 = b + 1
            while c <= n {
                sum = sum + F(a, b, c)
                c = c + 1
            }
            b = b + 1
        }
        a = a + 1
    }
    return sum
}

function validate_samples() -> bool {
    if F(9, 10, 11) != 60 { return false }
    if F(10, 14, 16) != 506 { return false }
    if F(15, 16, 17) != 785232 { return false }
    if computeG(11) != 60 { return false }
    if computeG(14) != 58020 { return false }
    if computeG(17) != 1269260 { return false }
    return true
}

function main() -> i32 {
    if !validate_samples() {
        printf("Validation failed.\n")
        return 1
    }
    let result: i64 = computeG(53)
    printf("%lld\n", result)
    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; }

typedef struct CRTResult CRTResult;
typedef struct FC FC;
typedef struct Point Point;

struct CRTResult {
    int64_t a;
    int64_t m;
    int32_t valid;
};

struct FC {
    int32_t a;
    int32_t b;
    int32_t c;
    int64_t ab;
    double sqrtc;
};

struct Point {
    int64_t P;
    int64_t Q;
};

int64_t llround(double x);
int64_t llgcd_i64_i64(int64_t a0, int64_t b0);
int64_t lllcm_i64_i64(int64_t a, int64_t b);
int32_t sign_AB_sqrtc_i128_i128_i32(__int128 A, __int128 B, int32_t c);
int32_t cmpPoints_i64_i64_i64_i64_i64_i32(int64_t aP, int64_t aQ, int64_t bP, int64_t bQ, int64_t ab, int32_t c);
Point canonical01_i64_i64_FC(int64_t P0, int64_t Q0, FC ctx);
Point addP_i64_i64_i64_i64_FC(int64_t xP, int64_t xQ, int64_t sP, int64_t sQ, FC ctx);
Point subP_i64_i64_i64_i64_FC(int64_t xP, int64_t xQ, int64_t sP, int64_t sQ, FC ctx);
Point oneMinus_i64_i64_FC(int64_t xP, int64_t xQ, FC ctx);
void sortI64_ptr_i64_i32(int64_t* arr, int32_t n);
void sortPoints_ptr_i64_ptr_i64_i32_i64_i32(int64_t* ptsP, int64_t* ptsQ, int32_t n, int64_t ab, int32_t c);
void kmpPrefix_ptr_i32_i32_ptr_i32(int32_t* pat, int32_t n, int32_t* pi);
void findRotations_ptr_i32_ptr_i32_i32_ptr_i32_ptr_i32(int32_t* w, int32_t* e, int32_t n, int32_t* shifts, int32_t* shiftCount);
int64_t modinv_egcd_i64_i64(int64_t a, int64_t b);
CRTResult crtPair_i64_i64_i64_i64(int64_t a1, int64_t m1, int64_t a2, int64_t m2);
void mergeCRT_ptr_i64_ptr_i32_ptr_i64_ptr_i64_i32_i64(int64_t* sols, int32_t* solCount, int64_t* M, int64_t* residues, int32_t resCount, int64_t P);
void cycleConstraint_ptr_i32_i32_ptr_i64_ptr_i64_ptr_i32(int32_t* f, int32_t L, int64_t* outP, int64_t* good, int32_t* goodCount);
int32_t findIntervalIndex_ptr_i64_ptr_i64_i32_i64_i64_i64_i32(int64_t* ptsP, int64_t* ptsQ, int32_t m, int64_t xP, int64_t xQ, int64_t ab, int32_t c);
int64_t solvePermutation_ptr_i32_ptr_i32_i32_i32(int32_t* nxt, int32_t* flip, int32_t N, int32_t m);
bool isSquare_i32(int32_t c);
int64_t F_square_i32_i32_i32(int32_t a, int32_t b, int32_t c);
int64_t F_nonsquare_i32_i32_i32(int32_t a, int32_t b, int32_t c);
int64_t F_i32_i32_i32(int32_t a, int32_t b, int32_t c);
int64_t computeG_i32(int32_t n);
bool validate_samples(void);
int32_t main(void);







int64_t llgcd_i64_i64(int64_t a0, int64_t b0) {
    int64_t a = a0;
    int64_t b = b0;
    if (a < 0) {
        a = (0 - a);
    }
    if (b < 0) {
        b = (0 - b);
    }
    while (b != 0) {
        int64_t t = FLOW_CHECKED_MOD((a), (b));
        a = b;
        b = t;
    }
    return a;
}

int64_t lllcm_i64_i64(int64_t a, int64_t b) {
    return (FLOW_CHECKED_DIV((a), (llgcd_i64_i64(a, b))) * b);
}

int32_t sign_AB_sqrtc_i128_i128_i32(__int128 A, __int128 B, int32_t c) {
    __int128 zero = ((__int128)(0));
    if (B == zero) {
        if (A == zero) {
            return 0;
        }
        if (A > zero) {
            return 1;
        }
        return (-1);
    }
    if (A == zero) {
        if (B > zero) {
            return 1;
        }
        return (-1);
    }
    if (((A > zero && B > zero) || (A < zero && B < zero))) {
        if (A > zero) {
            return 1;
        }
        return (-1);
    }
    __int128 A2 = (A * A);
    __int128 B2c = ((B * B) * ((__int128)(c)));
    if ((A < zero && B > zero)) {
        if (B2c == A2) {
            return 0;
        }
        if (B2c > A2) {
            return 1;
        }
        return (-1);
    }
    if (B2c == A2) {
        return 0;
    }
    if (B2c > A2) {
        return (-1);
    }
    return 1;
}

int32_t cmpPoints_i64_i64_i64_i64_i64_i32(int64_t aP, int64_t aQ, int64_t bP, int64_t bQ, int64_t ab, int32_t c) {
    int64_t dP = (aP - bP);
    int64_t dQ = (aQ - bQ);
    __int128 A = (((__int128)(dP)) * ((__int128)(c)));
    __int128 B = (((__int128)(dQ)) * ((__int128)(ab)));
    return sign_AB_sqrtc_i128_i128_i32(A, B, c);
}

Point canonical01_i64_i64_FC(int64_t P0, int64_t Q0, FC ctx) {
    int64_t P = P0;
    int64_t Q = Q0;
    double approx = ((((double)(P)) / ((double)(ctx.ab))) + ((((double)(Q)) * ctx.sqrtc) / ((double)(ctx.c))));
    int64_t n = ((int64_t)(floor(approx)));
    P = (P - (n * ctx.ab));
    while (sign_AB_sqrtc_i128_i128_i32((((__int128)(P)) * ((__int128)(ctx.c))), (((__int128)(Q)) * ((__int128)(ctx.ab))), ctx.c) < 0) {
        P = (P + ctx.ab);
    }
    while (sign_AB_sqrtc_i128_i128_i32((((__int128)((P - ctx.ab))) * ((__int128)(ctx.c))), (((__int128)(Q)) * ((__int128)(ctx.ab))), ctx.c) >= 0) {
        P = (P - ctx.ab);
    }
    return (Point){ .P = P, .Q = Q };
}

Point addP_i64_i64_i64_i64_FC(int64_t xP, int64_t xQ, int64_t sP, int64_t sQ, FC ctx) {
    return canonical01_i64_i64_FC((xP + sP), (xQ + sQ), ctx);
}

Point subP_i64_i64_i64_i64_FC(int64_t xP, int64_t xQ, int64_t sP, int64_t sQ, FC ctx) {
    return canonical01_i64_i64_FC((xP - sP), (xQ - sQ), ctx);
}

Point oneMinus_i64_i64_FC(int64_t xP, int64_t xQ, FC ctx) {
    return canonical01_i64_i64_FC((ctx.ab - xP), (0 - xQ), ctx);
}

void sortI64_ptr_i64_i32(int64_t* arr, int32_t n) {
    if (n < 2) {
        return;
    }
    int32_t* stack = (int32_t*)(((int32_t*)(calloc(((int64_t)((n * 2))), 4))));
    int32_t sp = 0;
    stack[sp] = 0;
    sp = (sp + 1);
    stack[sp] = (n - 1);
    sp = (sp + 1);
    while (sp > 0) {
        sp = (sp - 1);
        int32_t hi = stack[sp];
        sp = (sp - 1);
        int32_t lo = stack[sp];
        int64_t pivot = arr[hi];
        int32_t i = (lo - 1);
        int32_t j = lo;
        while (j < hi) {
            if (arr[j] <= pivot) {
                i = (i + 1);
                int64_t tmp = arr[i];
                arr[i] = arr[j];
                arr[j] = tmp;
            }
            j = (j + 1);
        }
        i = (i + 1);
        int64_t tmp = arr[i];
        arr[i] = arr[hi];
        arr[hi] = tmp;
        int32_t p = i;
        if ((p - 1) > lo) {
            stack[sp] = lo;
            sp = (sp + 1);
            stack[sp] = (p - 1);
            sp = (sp + 1);
        }
        if ((p + 1) < hi) {
            stack[sp] = (p + 1);
            sp = (sp + 1);
            stack[sp] = hi;
            sp = (sp + 1);
        }
    }
    free(((void*)(stack)));
}

void sortPoints_ptr_i64_ptr_i64_i32_i64_i32(int64_t* ptsP, int64_t* ptsQ, int32_t n, int64_t ab, int32_t c) {
    if (n < 2) {
        return;
    }
    int32_t* stack = (int32_t*)(((int32_t*)(calloc(((int64_t)((n * 2))), 4))));
    int32_t sp = 0;
    stack[sp] = 0;
    sp = (sp + 1);
    stack[sp] = (n - 1);
    sp = (sp + 1);
    while (sp > 0) {
        sp = (sp - 1);
        int32_t hi = stack[sp];
        sp = (sp - 1);
        int32_t lo = stack[sp];
        int64_t pivotP = ptsP[hi];
        int64_t pivotQ = ptsQ[hi];
        int32_t i = (lo - 1);
        int32_t j = lo;
        while (j < hi) {
            if (cmpPoints_i64_i64_i64_i64_i64_i32(ptsP[j], ptsQ[j], pivotP, pivotQ, ab, c) <= 0) {
                i = (i + 1);
                int64_t tmpP = ptsP[i];
                int64_t tmpQ = ptsQ[i];
                ptsP[i] = ptsP[j];
                ptsQ[i] = ptsQ[j];
                ptsP[j] = tmpP;
                ptsQ[j] = tmpQ;
            }
            j = (j + 1);
        }
        i = (i + 1);
        int64_t tmpP = ptsP[i];
        int64_t tmpQ = ptsQ[i];
        ptsP[i] = ptsP[hi];
        ptsQ[i] = ptsQ[hi];
        ptsP[hi] = tmpP;
        ptsQ[hi] = tmpQ;
        int32_t p = i;
        if ((p - 1) > lo) {
            stack[sp] = lo;
            sp = (sp + 1);
            stack[sp] = (p - 1);
            sp = (sp + 1);
        }
        if ((p + 1) < hi) {
            stack[sp] = (p + 1);
            sp = (sp + 1);
            stack[sp] = hi;
            sp = (sp + 1);
        }
    }
    free(((void*)(stack)));
}

void kmpPrefix_ptr_i32_i32_ptr_i32(int32_t* pat, int32_t n, int32_t* pi) {
    if (n > 0) {
        pi[0] = 0;
    }
    int32_t i = 1;
    int32_t j = 0;
    while (i < n) {
        while ((j > 0 && pat[i] != pat[j])) {
            j = pi[(j - 1)];
        }
        if (pat[i] == pat[j]) {
            j = (j + 1);
        }
        pi[i] = j;
        i = (i + 1);
    }
}

void findRotations_ptr_i32_ptr_i32_i32_ptr_i32_ptr_i32(int32_t* w, int32_t* e, int32_t n, int32_t* shifts, int32_t* shiftCount) {
    shiftCount[0] = 0;
    int32_t* text = (int32_t*)(((int32_t*)(calloc(((int64_t)((2 * n))), 4))));
    int32_t* pi = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
    int32_t i = 0;
    while (i < n) {
        text[i] = w[i];
        text[(i + n)] = w[i];
        i = (i + 1);
    }
    kmpPrefix_ptr_i32_i32_ptr_i32(e, n, pi);
    int32_t j = 0;
    i = 0;
    while (i < ((2 * n) - 1)) {
        while ((j > 0 && text[i] != e[j])) {
            j = pi[(j - 1)];
        }
        if (text[i] == e[j]) {
            j = (j + 1);
        }
        if (j == n) {
            int32_t pos = ((i - n) + 1);
            if (pos < n) {
                int32_t shift = FLOW_CHECKED_MOD(((n - pos)), (n));
                shifts[shiftCount[0]] = shift;
                shiftCount[0] = (shiftCount[0] + 1);
            }
            j = pi[(j - 1)];
        }
        i = (i + 1);
    }
    free(((void*)(text)));
    free(((void*)(pi)));
}

int64_t modinv_egcd_i64_i64(int64_t a, int64_t b) {
    int64_t old_r = a;
    int64_t r = b;
    int64_t old_s = 1;
    int64_t s = 0;
    while (r != 0) {
        int64_t q = FLOW_CHECKED_DIV((old_r), (r));
        int64_t nr = (old_r - (q * r));
        int64_t ns = (old_s - (q * s));
        old_r = r;
        r = nr;
        old_s = s;
        s = ns;
    }
    return old_s;
}

CRTResult crtPair_i64_i64_i64_i64(int64_t a1, int64_t m1, int64_t a2, int64_t m2) {
    int64_t g = llgcd_i64_i64(m1, m2);
    int64_t diff = (a2 - a1);
    if (FLOW_CHECKED_MOD((diff), (g)) != 0) {
        return (CRTResult){ .a = 0, .m = 0, .valid = 0 };
    }
    int64_t m1g = FLOW_CHECKED_DIV((m1), (g));
    int64_t m2g = FLOW_CHECKED_DIV((m2), (g));
    int64_t x = FLOW_CHECKED_MOD((modinv_egcd_i64_i64(m1g, m2g)), (m2g));
    if (x < 0) {
        x = (x + m2g);
    }
    __int128 t = FLOW_CHECKED_MOD(((((__int128)(FLOW_CHECKED_DIV((diff), (g)))) * ((__int128)(x)))), (((__int128)(m2g))));
    if (t < 0) {
        t = (t + ((__int128)(m2g)));
    }
    __int128 l = (FLOW_CHECKED_DIV((((__int128)(m1))), (((__int128)(g)))) * ((__int128)(m2)));
    __int128 res = (((__int128)(a1)) + (((__int128)(m1)) * t));
    int64_t mod = ((int64_t)(l));
    int64_t ans = ((int64_t)(FLOW_CHECKED_MOD((res), (l))));
    if (ans < 0) {
        ans = (ans + mod);
    }
    return (CRTResult){ .a = ans, .m = mod, .valid = 1 };
}

void mergeCRT_ptr_i64_ptr_i32_ptr_i64_ptr_i64_i32_i64(int64_t* sols, int32_t* solCount, int64_t* M, int64_t* residues, int32_t resCount, int64_t P) {
    int32_t sc = solCount[0];
    int64_t newM = lllcm_i64_i64(M[0], P);
    int64_t maxNext = ((((int64_t)(sc)) * ((int64_t)(resCount))) + 1);
    int64_t* next = (int64_t*)(((int64_t*)(calloc(maxNext, 8))));
    int32_t nextCount = 0;
    int32_t i = 0;
    while (i < sc) {
        int32_t j = 0;
        while (j < resCount) {
            CRTResult result = crtPair_i64_i64_i64_i64(sols[i], M[0], residues[j], P);
            if (result.valid != 0) {
                next[nextCount] = result.a;
                nextCount = (nextCount + 1);
            }
            j = (j + 1);
        }
        i = (i + 1);
    }
    sortI64_ptr_i64_i32(next, nextCount);
    int32_t dedup = 0;
    int32_t k = 0;
    while (k < nextCount) {
        if ((dedup == 0 || next[k] != next[(dedup - 1)])) {
            next[dedup] = next[k];
            dedup = (dedup + 1);
        }
        k = (k + 1);
    }
    int32_t idx = 0;
    while (idx < dedup) {
        sols[idx] = next[idx];
        idx = (idx + 1);
    }
    solCount[0] = dedup;
    M[0] = newM;
    free(((void*)(next)));
}

void cycleConstraint_ptr_i32_i32_ptr_i64_ptr_i64_ptr_i32(int32_t* f, int32_t L, int64_t* outP, int64_t* good, int32_t* goodCount) {
    int32_t n = FLOW_CHECKED_DIV((L), (3));
    int32_t total_f = 0;
    int32_t i = 0;
    while (i < L) {
        total_f = (total_f ^ f[i]);
        i = (i + 1);
    }
    int64_t P = ((total_f == 0) ? (((int64_t)(L))) : (((int64_t)((2 * L)))));
    outP[0] = P;
    int32_t* a = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
    int32_t* b = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
    int32_t* cc = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
    i = 0;
    while (i < n) {
        a[i] = f[(3 * i)];
        b[i] = f[((3 * i) + 1)];
        cc[i] = f[((3 * i) + 2)];
        i = (i + 1);
    }
    int32_t* w = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
    int32_t total_w = 0;
    i = 0;
    while (i < n) {
        w[i] = ((a[i] ^ b[i]) ^ cc[i]);
        total_w = (total_w ^ w[i]);
        i = (i + 1);
    }
    int32_t* pref = (int32_t*)(((int32_t*)(calloc(((int64_t)((n + 1))), 4))));
    pref[0] = 0;
    i = 0;
    while (i < n) {
        pref[(i + 1)] = (pref[i] ^ w[i]);
        i = (i + 1);
    }
    goodCount[0] = 0;
    int32_t R = 0;
    while (R < 3) {
        int32_t* t = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
        if (R == 0) {
            int32_t j = 0;
            while (j < n) {
                t[j] = 0;
                j = (j + 1);
            }
        } else {
            if (R == 1) {
                int32_t j = 0;
                while (j < n) {
                    t[j] = a[j];
                    j = (j + 1);
                }
            } else {
                int32_t j = 0;
                while (j < n) {
                    t[j] = (a[j] ^ b[j]);
                    j = (j + 1);
                }
            }
        }
        int32_t* dt = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
        int32_t* e = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
        int32_t j = 0;
        while (j < n) {
            dt[j] = (t[j] ^ t[FLOW_CHECKED_MOD(((j + 1)), (n))]);
            e[j] = (w[j] ^ dt[j]);
            j = (j + 1);
        }
        int32_t* shifts = (int32_t*)(((int32_t*)(calloc(((int64_t)(n)), 4))));
        int32_t* scPtr = (int32_t*)(((int32_t*)(calloc(1, 4))));
        findRotations_ptr_i32_ptr_i32_i32_ptr_i32_ptr_i32(w, e, n, shifts, scPtr);
        int32_t sc = scPtr[0];
        int32_t si = 0;
        while (si < sc) {
            int32_t sShift = shifts[si];
            int32_t q = 0;
            while (q < 2) {
                int32_t mTrip = (sShift + (q * n));
                int32_t h0 = (pref[sShift] ^ (q * total_w));
                int32_t target = t[FLOW_CHECKED_MOD((mTrip), (n))];
                if (h0 == target) {
                    int64_t Nval = ((3 * ((int64_t)(mTrip))) + ((int64_t)(R)));
                    int64_t Nmod = FLOW_CHECKED_MOD((Nval), (P));
                    good[goodCount[0]] = Nmod;
                    goodCount[0] = (goodCount[0] + 1);
                }
                q = (q + 1);
            }
            si = (si + 1);
        }
        free(((void*)(t)));
        free(((void*)(dt)));
        free(((void*)(e)));
        free(((void*)(shifts)));
        free(((void*)(scPtr)));
        R = (R + 1);
    }
    sortI64_ptr_i64_i32(good, goodCount[0]);
    int32_t dedup = 0;
    int32_t k = 0;
    while (k < goodCount[0]) {
        if ((dedup == 0 || good[k] != good[(dedup - 1)])) {
            good[dedup] = good[k];
            dedup = (dedup + 1);
        }
        k = (k + 1);
    }
    goodCount[0] = dedup;
    free(((void*)(a)));
    free(((void*)(b)));
    free(((void*)(cc)));
    free(((void*)(w)));
    free(((void*)(pref)));
}

int32_t findIntervalIndex_ptr_i64_ptr_i64_i32_i64_i64_i64_i32(int64_t* ptsP, int64_t* ptsQ, int32_t m, int64_t xP, int64_t xQ, int64_t ab, int32_t c) {
    int32_t lo = 0;
    int32_t hi = m;
    while ((lo + 1) < hi) {
        int32_t mid = FLOW_CHECKED_DIV(((lo + hi)), (2));
        if (cmpPoints_i64_i64_i64_i64_i64_i32(ptsP[mid], ptsQ[mid], xP, xQ, ab, c) <= 0) {
            lo = mid;
        } else {
            hi = mid;
        }
    }
    return lo;
}

int64_t solvePermutation_ptr_i32_ptr_i32_i32_i32(int32_t* nxt, int32_t* flip, int32_t N, int32_t m) {
    int32_t* vis = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    int32_t i = 0;
    while (i < N) {
        vis[i] = 0;
        i = (i + 1);
    }
    int64_t* constrP = (int64_t*)(((int64_t*)(calloc(((int64_t)(N)), 8))));
    int32_t* constrResOff = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    int32_t* constrResCnt = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    int64_t* allRes = (int64_t*)(((int64_t*)(calloc(((int64_t)(((2 * N) + 1))), 8))));
    int32_t allResOff = 0;
    int32_t constrCnt = 0;
    int32_t sIdx = 0;
    while (sIdx < N) {
        if (vis[sIdx] != 0) {
            sIdx = (sIdx + 1);
            continue;
        }
        int32_t* cyc = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
        int32_t cycLen = 0;
        int32_t cur = sIdx;
        while (vis[cur] == 0) {
            vis[cur] = 1;
            cyc[cycLen] = cur;
            cycLen = (cycLen + 1);
            cur = nxt[cur];
        }
        int32_t rot = 0;
        int32_t j = 0;
        while (j < cycLen) {
            if (cyc[j] < m) {
                rot = j;
                break;
            }
            j = (j + 1);
        }
        int32_t* f = (int32_t*)(((int32_t*)(calloc(((int64_t)(cycLen)), 4))));
        int32_t j2 = 0;
        while (j2 < cycLen) {
            f[j2] = flip[cyc[FLOW_CHECKED_MOD(((rot + j2)), (cycLen))]];
            j2 = (j2 + 1);
        }
        int64_t* PPtr = (int64_t*)(((int64_t*)(calloc(1, 8))));
        int64_t* good = (int64_t*)(((int64_t*)(calloc(((int64_t)(((2 * cycLen) + 1))), 8))));
        int32_t* goodCnt = (int32_t*)(((int32_t*)(calloc(1, 4))));
        cycleConstraint_ptr_i32_i32_ptr_i64_ptr_i64_ptr_i32(f, cycLen, PPtr, good, goodCnt);
        constrP[constrCnt] = PPtr[0];
        constrResOff[constrCnt] = allResOff;
        constrResCnt[constrCnt] = goodCnt[0];
        int32_t g = 0;
        while (g < goodCnt[0]) {
            allRes[allResOff] = good[g];
            allResOff = (allResOff + 1);
            g = (g + 1);
        }
        constrCnt = (constrCnt + 1);
        free(((void*)(cyc)));
        free(((void*)(f)));
        free(((void*)(PPtr)));
        free(((void*)(good)));
        free(((void*)(goodCnt)));
        sIdx = (sIdx + 1);
    }
    int32_t ci = 1;
    while (ci < constrCnt) {
        int64_t curP = constrP[ci];
        int32_t curOff = constrResOff[ci];
        int32_t curCnt = constrResCnt[ci];
        int32_t cj = ci;
        while ((cj > 0 && constrP[(cj - 1)] > curP)) {
            constrP[cj] = constrP[(cj - 1)];
            constrResOff[cj] = constrResOff[(cj - 1)];
            constrResCnt[cj] = constrResCnt[(cj - 1)];
            cj = (cj - 1);
        }
        constrP[cj] = curP;
        constrResOff[cj] = curOff;
        constrResCnt[cj] = curCnt;
        ci = (ci + 1);
    }
    int64_t* sols = (int64_t*)(((int64_t*)(calloc(1000000, 8))));
    sols[0] = 0;
    int32_t* solCnt = (int32_t*)(((int32_t*)(calloc(1, 4))));
    solCnt[0] = 1;
    int64_t* M = (int64_t*)(((int64_t*)(calloc(1, 8))));
    M[0] = 1;
    ci = 0;
    while (ci < constrCnt) {
        int32_t rc = constrResCnt[ci];
        int64_t* residues = (int64_t*)(((int64_t*)(calloc((((int64_t)(rc)) + 1), 8))));
        int32_t g = 0;
        while (g < rc) {
            residues[g] = allRes[(constrResOff[ci] + g)];
            g = (g + 1);
        }
        mergeCRT_ptr_i64_ptr_i32_ptr_i64_ptr_i64_i32_i64(sols, solCnt, M, residues, rc, constrP[ci]);
        free(((void*)(residues)));
        ci = (ci + 1);
    }
    int64_t best = 9223372036854775807;
    int32_t ri = 0;
    while (ri < solCnt[0]) {
        if ((sols[ri] != 0 && sols[ri] < best)) {
            best = sols[ri];
        }
        ri = (ri + 1);
    }
    if (best == 9223372036854775807) {
        best = M[0];
    }
    free(((void*)(vis)));
    free(((void*)(constrP)));
    free(((void*)(constrResOff)));
    free(((void*)(constrResCnt)));
    free(((void*)(allRes)));
    free(((void*)(sols)));
    free(((void*)(solCnt)));
    free(((void*)(M)));
    return best;
}

bool isSquare_i32(int32_t c) {
    int32_t r = ((int32_t)(llround(sqrt(((double)(c))))));
    return (r * r) == c;
}

int64_t F_square_i32_i32_i32(int32_t a, int32_t b, int32_t c) {
    int32_t k = ((int32_t)(llround(sqrt(((double)(c))))));
    int64_t D = 1;
    D = lllcm_i64_i64(D, ((int64_t)(a)));
    D = lllcm_i64_i64(D, ((int64_t)(b)));
    D = lllcm_i64_i64(D, ((int64_t)(k)));
    int64_t S0 = FLOW_CHECKED_DIV((D), (((int64_t)(a))));
    int64_t S1 = FLOW_CHECKED_DIV((D), (((int64_t)(b))));
    int64_t S2 = FLOW_CHECKED_DIV((D), (((int64_t)(k))));
    int32_t m = ((int32_t)(D));
    int32_t N = (3 * m);
    int32_t* nxt = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    int32_t* flip = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    int64_t Sarr[3] = { S0, S1, S2 };
    int32_t ph = 0;
    while (ph < 3) {
        int64_t Sph = (((unsigned)(ph) < 3) ? Sarr[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), Sarr[0]));
        int32_t j = 0;
        while (j < m) {
            int32_t j2 = 0;
            int32_t fbit = 0;
            if (((int64_t)(j)) < Sph) {
                j2 = ((m - 1) - j);
                fbit = 1;
            } else {
                j2 = ((int32_t)((((int64_t)(j)) - Sph)));
                fbit = 0;
            }
            int32_t cur = ((ph * m) + j);
            int32_t nxtph = FLOW_CHECKED_MOD(((ph + 1)), (3));
            nxt[cur] = ((nxtph * m) + j2);
            flip[cur] = fbit;
            j = (j + 1);
        }
        ph = (ph + 1);
    }
    int64_t result = solvePermutation_ptr_i32_ptr_i32_i32_i32(nxt, flip, N, m);
    free(((void*)(nxt)));
    free(((void*)(flip)));
    return result;
}

int64_t F_nonsquare_i32_i32_i32(int32_t a, int32_t b, int32_t c) {
    FC ctx = (FC){ .a = a, .b = b, .c = c, .ab = (((int64_t)(a)) * ((int64_t)(b))), .sqrtc = sqrt(((double)(c))) };
    Point s0 = canonical01_i64_i64_FC(FLOW_CHECKED_DIV((ctx.ab), (((int64_t)(a)))), 0, ctx);
    Point s1 = canonical01_i64_i64_FC(FLOW_CHECKED_DIV((ctx.ab), (((int64_t)(b)))), 0, ctx);
    Point s2 = canonical01_i64_i64_FC(0, 1, ctx);
    int64_t sP[3] = { s0.P, s1.P, s2.P };
    int64_t sQ[3] = { s0.Q, s1.Q, s2.Q };
    Point thr0 = oneMinus_i64_i64_FC(s0.P, s0.Q, ctx);
    Point thr1 = oneMinus_i64_i64_FC(s1.P, s1.Q, ctx);
    Point thr2 = oneMinus_i64_i64_FC(s2.P, s2.Q, ctx);
    int64_t thrP[3] = { thr0.P, thr1.P, thr2.P };
    int64_t thrQ[3] = { thr0.Q, thr1.Q, thr2.Q };
    int32_t CAP = 2097152;
    int32_t MASK = (CAP - 1);
    int64_t* hashP0 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* hashP1 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* hashP2 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* hashQ0 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* hashQ1 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* hashQ2 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int32_t* occ0 = (int32_t*)(((int32_t*)(calloc(((int64_t)(CAP)), 4))));
    int32_t* occ1 = (int32_t*)(((int32_t*)(calloc(((int64_t)(CAP)), 4))));
    int32_t* occ2 = (int32_t*)(((int32_t*)(calloc(((int64_t)(CAP)), 4))));
    int64_t* hashP[3] = { hashP0, hashP1, hashP2 };
    int64_t* hashQ[3] = { hashQ0, hashQ1, hashQ2 };
    int32_t* occ[3] = { occ0, occ1, occ2 };
    int64_t* stackP0 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* stackP1 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* stackP2 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* stackQ0 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* stackQ1 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* stackQ2 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* stackP[3] = { stackP0, stackP1, stackP2 };
    int64_t* stackQ[3] = { stackQ0, stackQ1, stackQ2 };
    int32_t stackCnt[3] = { 0, 0, 0 };
    int32_t ph = 0;
    while (ph < 3) {
        int64_t sp = (((unsigned)(ph) < 3) ? sP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), sP[0]));
        int64_t sq = (((unsigned)(ph) < 3) ? sQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), sQ[0]));
        int64_t h0 = ((0 * 31) + 0);
        if (h0 < 0) {
            h0 = (0 - h0);
        }
        int32_t idx0 = ((int32_t)((h0 & ((int64_t)(MASK)))));
        hashP[ph][idx0] = 0;
        hashQ[ph][idx0] = 0;
        occ[ph][idx0] = 1;
        int64_t h1 = ((sp * 31) + sq);
        if (h1 < 0) {
            h1 = (0 - h1);
        }
        int32_t idx1 = ((int32_t)((h1 & ((int64_t)(MASK)))));
        hashP[ph][idx1] = sp;
        hashQ[ph][idx1] = sq;
        occ[ph][idx1] = 1;
        stackP[ph][0] = 0;
        stackQ[ph][0] = 0;
        stackP[ph][1] = sp;
        stackQ[ph][1] = sq;
        stackCnt[ph] = 2;
        ph = (ph + 1);
    }
    bool progressed = 1;
    while (progressed) {
        progressed = 0;
        ph = 0;
        while (ph < 3) {
            int32_t prev = FLOW_CHECKED_MOD(((ph + 2)), (3));
            while ((((unsigned)(ph) < 3) ? stackCnt[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), stackCnt[0])) > 0) {
                progressed = 1;
                stackCnt[ph] = ((((unsigned)(ph) < 3) ? stackCnt[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), stackCnt[0])) - 1);
                int64_t yP = (((unsigned)(ph) < 3) ? stackP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), stackP[0]))[(((unsigned)(ph) < 3) ? stackCnt[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), stackCnt[0]))];
                int64_t yQ = (((unsigned)(ph) < 3) ? stackQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), stackQ[0]))[(((unsigned)(ph) < 3) ? stackCnt[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), stackCnt[0]))];
                int32_t cmp = cmpPoints_i64_i64_i64_i64_i64_i32(yP, yQ, (((unsigned)(prev) < 3) ? thrP[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), thrP[0])), (((unsigned)(prev) < 3) ? thrQ[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), thrQ[0])), ctx.ab, ctx.c);
                if (cmp < 0) {
                    Point x = addP_i64_i64_i64_i64_FC(yP, yQ, (((unsigned)(prev) < 3) ? sP[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), sP[0])), (((unsigned)(prev) < 3) ? sQ[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), sQ[0])), ctx);
                    int64_t h = ((x.P * 31) + x.Q);
                    if (h < 0) {
                        h = (0 - h);
                    }
                    int32_t idx = ((int32_t)((h & ((int64_t)(MASK)))));
                    bool inserted = 0;
                    int32_t probe = 0;
                    while (probe < CAP) {
                        int32_t pidx = ((idx + probe) & MASK);
                        if ((((unsigned)(prev) < 3) ? occ[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), occ[0]))[pidx] == 0) {
                            hashP[prev][pidx] = x.P;
                            hashQ[prev][pidx] = x.Q;
                            occ[prev][pidx] = 1;
                            inserted = 1;
                            break;
                        }
                        if (((((unsigned)(prev) < 3) ? hashP[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), hashP[0]))[pidx] == x.P && (((unsigned)(prev) < 3) ? hashQ[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), hashQ[0]))[pidx] == x.Q)) {
                            break;
                        }
                        probe = (probe + 1);
                    }
                    if (inserted) {
                        stackP[prev][(((unsigned)(prev) < 3) ? stackCnt[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), stackCnt[0]))] = x.P;
                        stackQ[prev][(((unsigned)(prev) < 3) ? stackCnt[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), stackCnt[0]))] = x.Q;
                        stackCnt[prev] = ((((unsigned)(prev) < 3) ? stackCnt[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), stackCnt[0])) + 1);
                    }
                }
                if (cmp > 0) {
                    Point x = oneMinus_i64_i64_FC(yP, yQ, ctx);
                    int64_t h = ((x.P * 31) + x.Q);
                    if (h < 0) {
                        h = (0 - h);
                    }
                    int32_t idx = ((int32_t)((h & ((int64_t)(MASK)))));
                    bool inserted = 0;
                    int32_t probe = 0;
                    while (probe < CAP) {
                        int32_t pidx = ((idx + probe) & MASK);
                        if ((((unsigned)(prev) < 3) ? occ[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), occ[0]))[pidx] == 0) {
                            hashP[prev][pidx] = x.P;
                            hashQ[prev][pidx] = x.Q;
                            occ[prev][pidx] = 1;
                            inserted = 1;
                            break;
                        }
                        if (((((unsigned)(prev) < 3) ? hashP[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), hashP[0]))[pidx] == x.P && (((unsigned)(prev) < 3) ? hashQ[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), hashQ[0]))[pidx] == x.Q)) {
                            break;
                        }
                        probe = (probe + 1);
                    }
                    if (inserted) {
                        stackP[prev][(((unsigned)(prev) < 3) ? stackCnt[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), stackCnt[0]))] = x.P;
                        stackQ[prev][(((unsigned)(prev) < 3) ? stackCnt[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), stackCnt[0]))] = x.Q;
                        stackCnt[prev] = ((((unsigned)(prev) < 3) ? stackCnt[prev] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(prev), 3), flow_fault_handler("array index out of bounds"), stackCnt[0])) + 1);
                    }
                }
            }
            ph = (ph + 1);
        }
    }
    int64_t* ptsP0 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* ptsP1 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* ptsP2 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* ptsQ0 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* ptsQ1 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* ptsQ2 = (int64_t*)(((int64_t*)(calloc(((int64_t)(CAP)), 8))));
    int64_t* ptsP[3] = { ptsP0, ptsP1, ptsP2 };
    int64_t* ptsQ[3] = { ptsQ0, ptsQ1, ptsQ2 };
    int32_t m = (-1);
    ph = 0;
    while (ph < 3) {
        int32_t count = 0;
        int32_t idx = 0;
        while (idx < CAP) {
            if ((((unsigned)(ph) < 3) ? occ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), occ[0]))[idx] != 0) {
                ptsP[ph][count] = (((unsigned)(ph) < 3) ? hashP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), hashP[0]))[idx];
                ptsQ[ph][count] = (((unsigned)(ph) < 3) ? hashQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), hashQ[0]))[idx];
                count = (count + 1);
            }
            idx = (idx + 1);
        }
        sortPoints_ptr_i64_ptr_i64_i32_i64_i32((((unsigned)(ph) < 3) ? ptsP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), ptsP[0])), (((unsigned)(ph) < 3) ? ptsQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), ptsQ[0])), count, ctx.ab, ctx.c);
        if (m < 0) {
            m = count;
        }
        if (m != count) {
            printf("Partition size mismatch for (%d,%d,%d)\n", a, b, c);
            free(((void*)(hashP0)));
            free(((void*)(hashP1)));
            free(((void*)(hashP2)));
            free(((void*)(hashQ0)));
            free(((void*)(hashQ1)));
            free(((void*)(hashQ2)));
            free(((void*)(occ0)));
            free(((void*)(occ1)));
            free(((void*)(occ2)));
            free(((void*)(stackP0)));
            free(((void*)(stackP1)));
            free(((void*)(stackP2)));
            free(((void*)(stackQ0)));
            free(((void*)(stackQ1)));
            free(((void*)(stackQ2)));
            free(((void*)(ptsP0)));
            free(((void*)(ptsP1)));
            free(((void*)(ptsP2)));
            free(((void*)(ptsQ0)));
            free(((void*)(ptsQ1)));
            free(((void*)(ptsQ2)));
            return (-1);
        }
        ph = (ph + 1);
    }
    int32_t N = (3 * m);
    int32_t* nxt = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    int32_t* flip = (int32_t*)(((int32_t*)(calloc(((int64_t)(N)), 4))));
    ph = 0;
    while (ph < 3) {
        int32_t i = 0;
        while (i < m) {
            int64_t lP = (((unsigned)(ph) < 3) ? ptsP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), ptsP[0]))[i];
            int64_t lQ = (((unsigned)(ph) < 3) ? ptsQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), ptsQ[0]))[i];
            int64_t rP = ctx.ab;
            int64_t rQ = 0;
            if ((i + 1) < m) {
                rP = (((unsigned)(ph) < 3) ? ptsP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), ptsP[0]))[(i + 1)];
                rQ = (((unsigned)(ph) < 3) ? ptsQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), ptsQ[0]))[(i + 1)];
            }
            bool inside = cmpPoints_i64_i64_i64_i64_i64_i32(lP, lQ, (((unsigned)(ph) < 3) ? sP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), sP[0])), (((unsigned)(ph) < 3) ? sQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), sQ[0])), ctx.ab, ctx.c) < 0;
            int64_t yLeftP = 0;
            int64_t yLeftQ = 0;
            if (inside) {
                Point yLeft = oneMinus_i64_i64_FC(rP, rQ, ctx);
                yLeftP = yLeft.P;
                yLeftQ = yLeft.Q;
            } else {
                Point yLeft = subP_i64_i64_i64_i64_FC(lP, lQ, (((unsigned)(ph) < 3) ? sP[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), sP[0])), (((unsigned)(ph) < 3) ? sQ[ph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(ph), 3), flow_fault_handler("array index out of bounds"), sQ[0])), ctx);
                yLeftP = yLeft.P;
                yLeftQ = yLeft.Q;
            }
            int32_t nxtph = FLOW_CHECKED_MOD(((ph + 1)), (3));
            int32_t j = findIntervalIndex_ptr_i64_ptr_i64_i32_i64_i64_i64_i32((((unsigned)(nxtph) < 3) ? ptsP[nxtph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(nxtph), 3), flow_fault_handler("array index out of bounds"), ptsP[0])), (((unsigned)(nxtph) < 3) ? ptsQ[nxtph] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(nxtph), 3), flow_fault_handler("array index out of bounds"), ptsQ[0])), m, yLeftP, yLeftQ, ctx.ab, ctx.c);
            int32_t cur = ((ph * m) + i);
            nxt[cur] = ((nxtph * m) + j);
            flip[cur] = ((inside) ? (1) : (0));
            i = (i + 1);
        }
        ph = (ph + 1);
    }
    int64_t result = solvePermutation_ptr_i32_ptr_i32_i32_i32(nxt, flip, N, m);
    free(((void*)(hashP0)));
    free(((void*)(hashP1)));
    free(((void*)(hashP2)));
    free(((void*)(hashQ0)));
    free(((void*)(hashQ1)));
    free(((void*)(hashQ2)));
    free(((void*)(occ0)));
    free(((void*)(occ1)));
    free(((void*)(occ2)));
    free(((void*)(stackP0)));
    free(((void*)(stackP1)));
    free(((void*)(stackP2)));
    free(((void*)(stackQ0)));
    free(((void*)(stackQ1)));
    free(((void*)(stackQ2)));
    free(((void*)(ptsP0)));
    free(((void*)(ptsP1)));
    free(((void*)(ptsP2)));
    free(((void*)(ptsQ0)));
    free(((void*)(ptsQ1)));
    free(((void*)(ptsQ2)));
    free(((void*)(nxt)));
    free(((void*)(flip)));
    return result;
}

int64_t F_i32_i32_i32(int32_t a, int32_t b, int32_t c) {
    int64_t result = 0;
    if (isSquare_i32(c)) {
        result = F_square_i32_i32_i32(a, b, c);
    } else {
        result = F_nonsquare_i32_i32_i32(a, b, c);
    }
    return result;
}

int64_t computeG_i32(int32_t n) {
    int64_t sum = 0;
    int32_t a = 9;
    while (a <= (n - 2)) {
        int32_t b = (a + 1);
        while (b <= (n - 1)) {
            int32_t c = (b + 1);
            while (c <= n) {
                sum = (sum + F_i32_i32_i32(a, b, c));
                c = (c + 1);
            }
            b = (b + 1);
        }
        a = (a + 1);
    }
    return sum;
}

bool validate_samples(void) {
    if (F_i32_i32_i32(9, 10, 11) != 60) {
        return 0;
    }
    if (F_i32_i32_i32(10, 14, 16) != 506) {
        return 0;
    }
    if (F_i32_i32_i32(15, 16, 17) != 785232) {
        return 0;
    }
    if (computeG_i32(11) != 60) {
        return 0;
    }
    if (computeG_i32(14) != 58020) {
        return 0;
    }
    if (computeG_i32(17) != 1269260) {
        return 0;
    }
    return 1;
}

int32_t main(void) {
    if ((!(validate_samples()))) {
        printf("Validation failed.\n");
        return 1;
    }
    int64_t result = computeG_i32(53);
    printf("%lld\n", result);
    return 0;
}

Generated MLIR

module {
  llvm.func @printf(!llvm.ptr, ...) -> i32
  llvm.mlir.global internal constant @str_0("Partition size mismatch for (%d,%d,%d)\n\00") {addr_space = 0 : i32} : !llvm.array<40 x i8>
  llvm.mlir.global internal constant @str_1("Validation failed.\n\00") {addr_space = 0 : i32} : !llvm.array<20 x i8>
  llvm.mlir.global internal constant @str_2("%lld\n\00") {addr_space = 0 : i32} : !llvm.array<6 x i8>
  func.func private @calloc(i64, i64) -> !llvm.ptr
  func.func private @free(!llvm.ptr) -> ()
  func.func private @memset(!llvm.ptr, i32, i64) -> !llvm.ptr
  func.func private @floor(f64) -> f64
  func.func private @sqrt(f64) -> f64
  func.func private @llround(f64) -> i64
  // Struct: Point
  // Fields:
  //   P: i64
  //   Q: i64
  // Struct: FC
  // Fields:
  //   a: i32
  //   b: i32
  //   c: i32
  //   ab: i64
  //   sqrtc: f64
  // Struct: CRTResult
  // Fields:
  //   a: i64
  //   m: i64
  //   valid: i32
  func.func @llgcd(%arg0: i64, %arg1: i64) -> i64 {
    %0 = llvm.mlir.constant(1 : i64) : i64
    %1 = llvm.alloca %0 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg0, %1 : i64, !llvm.ptr
    %2 = llvm.mlir.constant(1 : i64) : i64
    %3 = llvm.alloca %2 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg1, %3 : i64, !llvm.ptr
    %4 = llvm.load %1 : !llvm.ptr -> i64
    %5 = arith.constant 0 : i32
    %7 = arith.extsi %5 : i32 to i64
    %6 = arith.cmpi slt, %4, %7 : i64
    cf.cond_br %6, ^bb0, ^bb1
    ^bb0:
      %8 = arith.constant 0 : i32
      %9 = llvm.load %1 : !llvm.ptr -> i64
      %11 = arith.extsi %8 : i32 to i64
      %10 = arith.subi %11, %9 : i64
      llvm.store %10, %1 : i64, !llvm.ptr
      cf.br ^bb2
    ^bb1:
      cf.br ^bb2
    ^bb2:
    %12 = llvm.load %3 : !llvm.ptr -> i64
    %13 = arith.constant 0 : i32
    %15 = arith.extsi %13 : i32 to i64
    %14 = arith.cmpi slt, %12, %15 : i64
    cf.cond_br %14, ^bb3, ^bb4
    ^bb3:
      %16 = arith.constant 0 : i32
      %17 = llvm.load %3 : !llvm.ptr -> i64
      %19 = arith.extsi %16 : i32 to i64
      %18 = arith.subi %19, %17 : i64
      llvm.store %18, %3 : i64, !llvm.ptr
      cf.br ^bb5
    ^bb4:
      cf.br ^bb5
    ^bb5:
    cf.br ^bb6
    ^bb6:
    %20 = llvm.load %3 : !llvm.ptr -> i64
    %21 = arith.constant 0 : i32
    %23 = arith.extsi %21 : i32 to i64
    %22 = arith.cmpi ne, %20, %23 : i64
    cf.cond_br %22, ^bb7, ^bb8
    ^bb7:
      %24 = llvm.load %1 : !llvm.ptr -> i64
      %25 = llvm.load %3 : !llvm.ptr -> i64
      %26 = arith.remsi %24, %25 : i64
      %27 = llvm.load %3 : !llvm.ptr -> i64
      llvm.store %27, %1 : i64, !llvm.ptr
      llvm.store %26, %3 : i64, !llvm.ptr
      cf.br ^bb6
    ^bb8:
    %28 = llvm.load %1 : !llvm.ptr -> i64
    func.return %28 : i64
  }
  func.func @lllcm(%arg0: i64, %arg1: i64) -> i64 {
    %29 = func.call @llgcd(%arg0, %arg1) : (i64, i64) -> i64
    %30 = arith.divsi %arg0, %29 : i64
    %31 = arith.muli %30, %arg1 : i64
    func.return %31 : i64
  }
  func.func @sign_AB_sqrtc(%arg0: i128, %arg1: i128, %arg2: i32) -> i32 {
    %32 = arith.constant 0 : i32
    %33 = arith.extsi %32 : i32 to i128
    %35 = arith.trunci %arg1 : i128 to i64
    %36 = arith.trunci %33 : i128 to i64
    %34 = arith.cmpi eq, %35, %36 : i64
    cf.cond_br %34, ^bb9, ^bb10
    ^bb9:
      %38 = arith.trunci %arg0 : i128 to i64
      %39 = arith.trunci %33 : i128 to i64
      %37 = arith.cmpi eq, %38, %39 : i64
      cf.cond_br %37, ^bb12, ^bb13
      ^bb12:
        %40 = arith.constant 0 : i32
        func.return %40 : i32
      ^bb13:
        cf.br ^bb14
      ^bb14:
      %42 = arith.trunci %arg0 : i128 to i64
      %43 = arith.trunci %33 : i128 to i64
      %41 = arith.cmpi sgt, %42, %43 : i64
      cf.cond_br %41, ^bb15, ^bb16
      ^bb15:
        %44 = arith.constant 1 : i32
        func.return %44 : i32
      ^bb16:
        cf.br ^bb17
      ^bb17:
      %45 = arith.constant 1 : i32
      %47 = arith.constant 0 : i32
      %46 = arith.subi %47, %45 : i32
      func.return %46 : i32
    ^bb10:
      cf.br ^bb11
    ^bb11:
    %49 = arith.trunci %arg0 : i128 to i64
    %50 = arith.trunci %33 : i128 to i64
    %48 = arith.cmpi eq, %49, %50 : i64
    cf.cond_br %48, ^bb18, ^bb19
    ^bb18:
      %52 = arith.trunci %arg1 : i128 to i64
      %53 = arith.trunci %33 : i128 to i64
      %51 = arith.cmpi sgt, %52, %53 : i64
      cf.cond_br %51, ^bb21, ^bb22
      ^bb21:
        %54 = arith.constant 1 : i32
        func.return %54 : i32
      ^bb22:
        cf.br ^bb23
      ^bb23:
      %55 = arith.constant 1 : i32
      %57 = arith.constant 0 : i32
      %56 = arith.subi %57, %55 : i32
      func.return %56 : i32
    ^bb19:
      cf.br ^bb20
    ^bb20:
    %59 = arith.trunci %arg0 : i128 to i64
    %60 = arith.trunci %33 : i128 to i64
    %58 = arith.cmpi sgt, %59, %60 : i64
    %61 = scf.if %58 -> (i1) {
      %63 = arith.trunci %arg1 : i128 to i64
      %64 = arith.trunci %33 : i128 to i64
      %62 = arith.cmpi sgt, %63, %64 : i64
      scf.yield %62 : i1
    } else {
      %65 = arith.constant false
      scf.yield %65 : i1
    }
    %66 = scf.if %61 -> (i1) {
      %67 = arith.constant true
      scf.yield %67 : i1
    } else {
      %69 = arith.trunci %arg0 : i128 to i64
      %70 = arith.trunci %33 : i128 to i64
      %68 = arith.cmpi slt, %69, %70 : i64
      %71 = scf.if %68 -> (i1) {
        %73 = arith.trunci %arg1 : i128 to i64
        %74 = arith.trunci %33 : i128 to i64
        %72 = arith.cmpi slt, %73, %74 : i64
        scf.yield %72 : i1
      } else {
        %75 = arith.constant false
        scf.yield %75 : i1
      }
      scf.yield %71 : i1
    }
    cf.cond_br %66, ^bb24, ^bb25
    ^bb24:
      %77 = arith.trunci %arg0 : i128 to i64
      %78 = arith.trunci %33 : i128 to i64
      %76 = arith.cmpi sgt, %77, %78 : i64
      cf.cond_br %76, ^bb27, ^bb28
      ^bb27:
        %79 = arith.constant 1 : i32
        func.return %79 : i32
      ^bb28:
        cf.br ^bb29
      ^bb29:
      %80 = arith.constant 1 : i32
      %82 = arith.constant 0 : i32
      %81 = arith.subi %82, %80 : i32
      func.return %81 : i32
    ^bb25:
      cf.br ^bb26
    ^bb26:
    %84 = arith.trunci %arg0 : i128 to i64
    %85 = arith.trunci %arg0 : i128 to i64
    %83 = arith.muli %84, %85 : i64
    %86 = arith.extsi %83 : i64 to i128
    %88 = arith.trunci %arg1 : i128 to i64
    %89 = arith.trunci %arg1 : i128 to i64
    %87 = arith.muli %88, %89 : i64
    %90 = arith.extsi %arg2 : i32 to i128
    %92 = arith.trunci %90 : i128 to i64
    %91 = arith.muli %87, %92 : i64
    %93 = arith.extsi %91 : i64 to i128
    %95 = arith.trunci %arg0 : i128 to i64
    %96 = arith.trunci %33 : i128 to i64
    %94 = arith.cmpi slt, %95, %96 : i64
    %97 = scf.if %94 -> (i1) {
      %99 = arith.trunci %arg1 : i128 to i64
      %100 = arith.trunci %33 : i128 to i64
      %98 = arith.cmpi sgt, %99, %100 : i64
      scf.yield %98 : i1
    } else {
      %101 = arith.constant false
      scf.yield %101 : i1
    }
    cf.cond_br %97, ^bb30, ^bb31
    ^bb30:
      %103 = arith.trunci %93 : i128 to i64
      %104 = arith.trunci %86 : i128 to i64
      %102 = arith.cmpi eq, %103, %104 : i64
      cf.cond_br %102, ^bb33, ^bb34
      ^bb33:
        %105 = arith.constant 0 : i32
        func.return %105 : i32
      ^bb34:
        cf.br ^bb35
      ^bb35:
      %107 = arith.trunci %93 : i128 to i64
      %108 = arith.trunci %86 : i128 to i64
      %106 = arith.cmpi sgt, %107, %108 : i64
      cf.cond_br %106, ^bb36, ^bb37
      ^bb36:
        %109 = arith.constant 1 : i32
        func.return %109 : i32
      ^bb37:
        cf.br ^bb38
      ^bb38:
      %110 = arith.constant 1 : i32
      %112 = arith.constant 0 : i32
      %111 = arith.subi %112, %110 : i32
      func.return %111 : i32
    ^bb31:
      cf.br ^bb32
    ^bb32:
    %114 = arith.trunci %93 : i128 to i64
    %115 = arith.trunci %86 : i128 to i64
    %113 = arith.cmpi eq, %114, %115 : i64
    cf.cond_br %113, ^bb39, ^bb40
    ^bb39:
      %116 = arith.constant 0 : i32
      func.return %116 : i32
    ^bb40:
      cf.br ^bb41
    ^bb41:
    %118 = arith.trunci %93 : i128 to i64
    %119 = arith.trunci %86 : i128 to i64
    %117 = arith.cmpi sgt, %118, %119 : i64
    cf.cond_br %117, ^bb42, ^bb43
    ^bb42:
      %120 = arith.constant 1 : i32
      %122 = arith.constant 0 : i32
      %121 = arith.subi %122, %120 : i32
      func.return %121 : i32
    ^bb43:
      cf.br ^bb44
    ^bb44:
    %123 = arith.constant 1 : i32
    func.return %123 : i32
  }
  func.func @cmpPoints(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i64, %arg4: i64, %arg5: i32) -> i32 {
    %124 = arith.subi %arg0, %arg2 : i64
    %125 = arith.subi %arg1, %arg3 : i64
    %126 = arith.extsi %124 : i64 to i128
    %127 = arith.extsi %arg5 : i32 to i128
    %129 = arith.trunci %126 : i128 to i64
    %130 = arith.trunci %127 : i128 to i64
    %128 = arith.muli %129, %130 : i64
    %131 = arith.extsi %128 : i64 to i128
    %132 = arith.extsi %125 : i64 to i128
    %133 = arith.extsi %arg4 : i64 to i128
    %135 = arith.trunci %132 : i128 to i64
    %136 = arith.trunci %133 : i128 to i64
    %134 = arith.muli %135, %136 : i64
    %137 = arith.extsi %134 : i64 to i128
    %138 = func.call @sign_AB_sqrtc(%131, %137, %arg5) : (i128, i128, i32) -> i32
    func.return %138 : i32
  }
  func.func @canonical01(%arg0: i64, %arg1: i64, %arg2: !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)> {
    %139 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %140 = llvm.extractvalue %arg2[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %141 = llvm.insertvalue %140, %139[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %142 = llvm.extractvalue %arg2[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %143 = llvm.insertvalue %142, %141[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %144 = llvm.extractvalue %arg2[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %145 = llvm.insertvalue %144, %143[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %146 = llvm.extractvalue %arg2[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %147 = llvm.insertvalue %146, %145[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %148 = llvm.extractvalue %arg2[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %149 = llvm.insertvalue %148, %147[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %150 = llvm.mlir.constant(1 : i64) : i64
    %151 = llvm.alloca %150 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %149, %151 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %152 = llvm.mlir.constant(1 : i64) : i64
    %153 = llvm.alloca %152 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg0, %153 : i64, !llvm.ptr
    %154 = llvm.load %153 : !llvm.ptr -> i64
    %155 = arith.sitofp %154 : i64 to f64
    %156 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %157 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %158 = llvm.load %157 : !llvm.ptr -> i64
    %159 = arith.sitofp %158 : i64 to f64
    %160 = arith.divf %155, %159 : f64
    %161 = arith.sitofp %arg1 : i64 to f64
    %162 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %163 = llvm.getelementptr %151[0, 4] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %164 = llvm.load %163 : !llvm.ptr -> f64
    %165 = arith.mulf %161, %164 : f64
    %166 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %167 = llvm.getelementptr %151[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %168 = llvm.load %167 : !llvm.ptr -> i32
    %169 = arith.sitofp %168 : i32 to f64
    %170 = arith.divf %165, %169 : f64
    %171 = arith.addf %160, %170 : f64
    %172 = func.call @floor(%171) : (f64) -> f64
    %173 = arith.fptosi %172 : f64 to i64
    %174 = llvm.load %153 : !llvm.ptr -> i64
    %175 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %176 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %177 = llvm.load %176 : !llvm.ptr -> i64
    %178 = arith.muli %173, %177 : i64
    %179 = arith.subi %174, %178 : i64
    llvm.store %179, %153 : i64, !llvm.ptr
    cf.br ^bb45
    ^bb45:
    %181 = llvm.load %153 : !llvm.ptr -> i64
    %182 = arith.extsi %181 : i64 to i128
    %183 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %184 = llvm.getelementptr %151[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %185 = llvm.load %184 : !llvm.ptr -> i32
    %186 = arith.extsi %185 : i32 to i128
    %188 = arith.trunci %182 : i128 to i64
    %189 = arith.trunci %186 : i128 to i64
    %187 = arith.muli %188, %189 : i64
    %190 = arith.extsi %arg1 : i64 to i128
    %191 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %192 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %193 = llvm.load %192 : !llvm.ptr -> i64
    %194 = arith.extsi %193 : i64 to i128
    %196 = arith.trunci %190 : i128 to i64
    %197 = arith.trunci %194 : i128 to i64
    %195 = arith.muli %196, %197 : i64
    %198 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %199 = llvm.getelementptr %151[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %200 = llvm.load %199 : !llvm.ptr -> i32
    %201 = arith.extsi %187 : i64 to i128
    %202 = arith.extsi %195 : i64 to i128
    %180 = func.call @sign_AB_sqrtc(%201, %202, %200) : (i128, i128, i32) -> i32
    %203 = arith.constant 0 : i32
    %204 = arith.cmpi slt, %180, %203 : i32
    cf.cond_br %204, ^bb46, ^bb47
    ^bb46:
      %205 = llvm.load %153 : !llvm.ptr -> i64
      %206 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
      %207 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
      %208 = llvm.load %207 : !llvm.ptr -> i64
      %209 = arith.addi %205, %208 : i64
      llvm.store %209, %153 : i64, !llvm.ptr
      cf.br ^bb45
    ^bb47:
    cf.br ^bb48
    ^bb48:
    %211 = llvm.load %153 : !llvm.ptr -> i64
    %212 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %213 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %214 = llvm.load %213 : !llvm.ptr -> i64
    %215 = arith.subi %211, %214 : i64
    %216 = arith.extsi %215 : i64 to i128
    %217 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %218 = llvm.getelementptr %151[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %219 = llvm.load %218 : !llvm.ptr -> i32
    %220 = arith.extsi %219 : i32 to i128
    %222 = arith.trunci %216 : i128 to i64
    %223 = arith.trunci %220 : i128 to i64
    %221 = arith.muli %222, %223 : i64
    %224 = arith.extsi %arg1 : i64 to i128
    %225 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %226 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %227 = llvm.load %226 : !llvm.ptr -> i64
    %228 = arith.extsi %227 : i64 to i128
    %230 = arith.trunci %224 : i128 to i64
    %231 = arith.trunci %228 : i128 to i64
    %229 = arith.muli %230, %231 : i64
    %232 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %233 = llvm.getelementptr %151[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %234 = llvm.load %233 : !llvm.ptr -> i32
    %235 = arith.extsi %221 : i64 to i128
    %236 = arith.extsi %229 : i64 to i128
    %210 = func.call @sign_AB_sqrtc(%235, %236, %234) : (i128, i128, i32) -> i32
    %237 = arith.constant 0 : i32
    %238 = arith.cmpi sge, %210, %237 : i32
    cf.cond_br %238, ^bb49, ^bb50
    ^bb49:
      %239 = llvm.load %153 : !llvm.ptr -> i64
      %240 = llvm.load %151 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
      %241 = llvm.getelementptr %151[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
      %242 = llvm.load %241 : !llvm.ptr -> i64
      %243 = arith.subi %239, %242 : i64
      llvm.store %243, %153 : i64, !llvm.ptr
      cf.br ^bb48
    ^bb50:
    %244 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %245 = llvm.load %153 : !llvm.ptr -> i64
    %246 = llvm.insertvalue %245, %244[0] : !llvm.struct<(i64, i64)>
    %247 = llvm.insertvalue %arg1, %246[1] : !llvm.struct<(i64, i64)>
    %248 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %249 = llvm.extractvalue %247[0] : !llvm.struct<(i64, i64)>
    %250 = llvm.insertvalue %249, %248[0] : !llvm.struct<(i64, i64)>
    %251 = llvm.extractvalue %247[1] : !llvm.struct<(i64, i64)>
    %252 = llvm.insertvalue %251, %250[1] : !llvm.struct<(i64, i64)>
    %253 = llvm.mlir.constant(1 : i64) : i64
    %254 = llvm.alloca %253 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %252, %254 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %255 = llvm.load %254 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    func.return %255 : !llvm.struct<(i64, i64)>
  }
  func.func @addP(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i64, %arg4: !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)> {
    %256 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %257 = llvm.extractvalue %arg4[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %258 = llvm.insertvalue %257, %256[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %259 = llvm.extractvalue %arg4[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %260 = llvm.insertvalue %259, %258[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %261 = llvm.extractvalue %arg4[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %262 = llvm.insertvalue %261, %260[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %263 = llvm.extractvalue %arg4[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %264 = llvm.insertvalue %263, %262[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %265 = llvm.extractvalue %arg4[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %266 = llvm.insertvalue %265, %264[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %267 = llvm.mlir.constant(1 : i64) : i64
    %268 = llvm.alloca %267 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %266, %268 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %270 = llvm.load %268 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %271 = arith.addi %arg1, %arg3 : i64
    %272 = arith.addi %arg0, %arg2 : i64
    %273 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %274 = llvm.extractvalue %270[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %275 = llvm.insertvalue %274, %273[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %276 = llvm.extractvalue %270[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %277 = llvm.insertvalue %276, %275[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %278 = llvm.extractvalue %270[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %279 = llvm.insertvalue %278, %277[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %280 = llvm.extractvalue %270[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %281 = llvm.insertvalue %280, %279[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %282 = llvm.extractvalue %270[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %283 = llvm.insertvalue %282, %281[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %269 = func.call @canonical01(%272, %271, %283) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %284 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %285 = llvm.extractvalue %269[0] : !llvm.struct<(i64, i64)>
    %286 = llvm.insertvalue %285, %284[0] : !llvm.struct<(i64, i64)>
    %287 = llvm.extractvalue %269[1] : !llvm.struct<(i64, i64)>
    %288 = llvm.insertvalue %287, %286[1] : !llvm.struct<(i64, i64)>
    %289 = llvm.mlir.constant(1 : i64) : i64
    %290 = llvm.alloca %289 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %288, %290 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %291 = llvm.load %290 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %292 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %293 = llvm.extractvalue %283[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %294 = llvm.insertvalue %293, %292[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %295 = llvm.extractvalue %283[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %296 = llvm.insertvalue %295, %294[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %297 = llvm.extractvalue %283[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %298 = llvm.insertvalue %297, %296[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %299 = llvm.extractvalue %283[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %300 = llvm.insertvalue %299, %298[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %301 = llvm.extractvalue %283[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %302 = llvm.insertvalue %301, %300[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %303 = llvm.mlir.constant(1 : i64) : i64
    %304 = llvm.alloca %303 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %302, %304 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %305 = llvm.load %304 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %305, %268 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %306 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %307 = llvm.extractvalue %291[0] : !llvm.struct<(i64, i64)>
    %308 = llvm.insertvalue %307, %306[0] : !llvm.struct<(i64, i64)>
    %309 = llvm.extractvalue %291[1] : !llvm.struct<(i64, i64)>
    %310 = llvm.insertvalue %309, %308[1] : !llvm.struct<(i64, i64)>
    %311 = llvm.mlir.constant(1 : i64) : i64
    %312 = llvm.alloca %311 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %310, %312 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %313 = llvm.load %312 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    func.return %313 : !llvm.struct<(i64, i64)>
  }
  func.func @subP(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i64, %arg4: !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)> {
    %314 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %315 = llvm.extractvalue %arg4[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %316 = llvm.insertvalue %315, %314[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %317 = llvm.extractvalue %arg4[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %318 = llvm.insertvalue %317, %316[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %319 = llvm.extractvalue %arg4[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %320 = llvm.insertvalue %319, %318[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %321 = llvm.extractvalue %arg4[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %322 = llvm.insertvalue %321, %320[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %323 = llvm.extractvalue %arg4[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %324 = llvm.insertvalue %323, %322[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %325 = llvm.mlir.constant(1 : i64) : i64
    %326 = llvm.alloca %325 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %324, %326 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %328 = llvm.load %326 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %329 = arith.subi %arg1, %arg3 : i64
    %330 = arith.subi %arg0, %arg2 : i64
    %331 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %332 = llvm.extractvalue %328[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %333 = llvm.insertvalue %332, %331[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %334 = llvm.extractvalue %328[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %335 = llvm.insertvalue %334, %333[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %336 = llvm.extractvalue %328[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %337 = llvm.insertvalue %336, %335[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %338 = llvm.extractvalue %328[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %339 = llvm.insertvalue %338, %337[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %340 = llvm.extractvalue %328[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %341 = llvm.insertvalue %340, %339[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %327 = func.call @canonical01(%330, %329, %341) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %342 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %343 = llvm.extractvalue %327[0] : !llvm.struct<(i64, i64)>
    %344 = llvm.insertvalue %343, %342[0] : !llvm.struct<(i64, i64)>
    %345 = llvm.extractvalue %327[1] : !llvm.struct<(i64, i64)>
    %346 = llvm.insertvalue %345, %344[1] : !llvm.struct<(i64, i64)>
    %347 = llvm.mlir.constant(1 : i64) : i64
    %348 = llvm.alloca %347 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %346, %348 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %349 = llvm.load %348 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %350 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %351 = llvm.extractvalue %341[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %352 = llvm.insertvalue %351, %350[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %353 = llvm.extractvalue %341[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %354 = llvm.insertvalue %353, %352[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %355 = llvm.extractvalue %341[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %356 = llvm.insertvalue %355, %354[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %357 = llvm.extractvalue %341[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %358 = llvm.insertvalue %357, %356[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %359 = llvm.extractvalue %341[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %360 = llvm.insertvalue %359, %358[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %361 = llvm.mlir.constant(1 : i64) : i64
    %362 = llvm.alloca %361 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %360, %362 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %363 = llvm.load %362 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %363, %326 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %364 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %365 = llvm.extractvalue %349[0] : !llvm.struct<(i64, i64)>
    %366 = llvm.insertvalue %365, %364[0] : !llvm.struct<(i64, i64)>
    %367 = llvm.extractvalue %349[1] : !llvm.struct<(i64, i64)>
    %368 = llvm.insertvalue %367, %366[1] : !llvm.struct<(i64, i64)>
    %369 = llvm.mlir.constant(1 : i64) : i64
    %370 = llvm.alloca %369 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %368, %370 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %371 = llvm.load %370 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    func.return %371 : !llvm.struct<(i64, i64)>
  }
  func.func @oneMinus(%arg0: i64, %arg1: i64, %arg2: !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)> {
    %372 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %373 = llvm.extractvalue %arg2[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %374 = llvm.insertvalue %373, %372[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %375 = llvm.extractvalue %arg2[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %376 = llvm.insertvalue %375, %374[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %377 = llvm.extractvalue %arg2[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %378 = llvm.insertvalue %377, %376[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %379 = llvm.extractvalue %arg2[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %380 = llvm.insertvalue %379, %378[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %381 = llvm.extractvalue %arg2[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %382 = llvm.insertvalue %381, %380[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %383 = llvm.mlir.constant(1 : i64) : i64
    %384 = llvm.alloca %383 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %382, %384 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %386 = llvm.load %384 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %387 = arith.constant 0 : i32
    %389 = arith.extsi %387 : i32 to i64
    %388 = arith.subi %389, %arg1 : i64
    %390 = llvm.load %384 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %391 = llvm.getelementptr %384[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %392 = llvm.load %391 : !llvm.ptr -> i64
    %393 = arith.subi %392, %arg0 : i64
    %394 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %395 = llvm.extractvalue %386[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %396 = llvm.insertvalue %395, %394[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %397 = llvm.extractvalue %386[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %398 = llvm.insertvalue %397, %396[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %399 = llvm.extractvalue %386[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %400 = llvm.insertvalue %399, %398[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %401 = llvm.extractvalue %386[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %402 = llvm.insertvalue %401, %400[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %403 = llvm.extractvalue %386[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %404 = llvm.insertvalue %403, %402[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %385 = func.call @canonical01(%393, %388, %404) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %405 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %406 = llvm.extractvalue %385[0] : !llvm.struct<(i64, i64)>
    %407 = llvm.insertvalue %406, %405[0] : !llvm.struct<(i64, i64)>
    %408 = llvm.extractvalue %385[1] : !llvm.struct<(i64, i64)>
    %409 = llvm.insertvalue %408, %407[1] : !llvm.struct<(i64, i64)>
    %410 = llvm.mlir.constant(1 : i64) : i64
    %411 = llvm.alloca %410 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %409, %411 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %412 = llvm.load %411 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %413 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %414 = llvm.extractvalue %404[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %415 = llvm.insertvalue %414, %413[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %416 = llvm.extractvalue %404[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %417 = llvm.insertvalue %416, %415[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %418 = llvm.extractvalue %404[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %419 = llvm.insertvalue %418, %417[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %420 = llvm.extractvalue %404[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %421 = llvm.insertvalue %420, %419[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %422 = llvm.extractvalue %404[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %423 = llvm.insertvalue %422, %421[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %424 = llvm.mlir.constant(1 : i64) : i64
    %425 = llvm.alloca %424 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %423, %425 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %426 = llvm.load %425 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %426, %384 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %427 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %428 = llvm.extractvalue %412[0] : !llvm.struct<(i64, i64)>
    %429 = llvm.insertvalue %428, %427[0] : !llvm.struct<(i64, i64)>
    %430 = llvm.extractvalue %412[1] : !llvm.struct<(i64, i64)>
    %431 = llvm.insertvalue %430, %429[1] : !llvm.struct<(i64, i64)>
    %432 = llvm.mlir.constant(1 : i64) : i64
    %433 = llvm.alloca %432 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %431, %433 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %434 = llvm.load %433 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    func.return %434 : !llvm.struct<(i64, i64)>
  }
  func.func @sortI64(%arg0: !llvm.ptr, %arg1: i32) -> () {
    %435 = arith.constant 2 : i32
    %436 = arith.cmpi slt, %arg1, %435 : i32
    cf.cond_br %436, ^bb51, ^bb52
    ^bb51:
      func.return
    ^bb52:
      cf.br ^bb53
    ^bb53:
    %438 = arith.constant 2 : i32
    %439 = arith.muli %arg1, %438 : i32
    %440 = arith.extsi %439 : i32 to i64
    %441 = arith.constant 4 : i32
    %442 = arith.extsi %441 : i32 to i64
    %437 = func.call @calloc(%440, %442) : (i64, i64) -> !llvm.ptr
    %443 = arith.constant 0 : i32
    %444 = llvm.mlir.constant(1 : i64) : i64
    %445 = llvm.alloca %444 x i32 : (i64) -> !llvm.ptr
    llvm.store %443, %445 : i32, !llvm.ptr
    %446 = arith.constant 0 : i32
    %447 = llvm.load %445 : !llvm.ptr -> i32
    %448 = arith.extsi %447 : i32 to i64
    %449 = llvm.getelementptr %437[%448] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %446, %449 : i32, !llvm.ptr
    %450 = llvm.load %445 : !llvm.ptr -> i32
    %451 = arith.constant 1 : i32
    %452 = arith.addi %450, %451 : i32
    llvm.store %452, %445 : i32, !llvm.ptr
    %453 = arith.constant 1 : i32
    %454 = arith.subi %arg1, %453 : i32
    %455 = llvm.load %445 : !llvm.ptr -> i32
    %456 = arith.extsi %455 : i32 to i64
    %457 = llvm.getelementptr %437[%456] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %454, %457 : i32, !llvm.ptr
    %458 = llvm.load %445 : !llvm.ptr -> i32
    %459 = arith.constant 1 : i32
    %460 = arith.addi %458, %459 : i32
    llvm.store %460, %445 : i32, !llvm.ptr
    cf.br ^bb54
    ^bb54:
    %461 = llvm.load %445 : !llvm.ptr -> i32
    %462 = arith.constant 0 : i32
    %463 = arith.cmpi sgt, %461, %462 : i32
    cf.cond_br %463, ^bb55, ^bb56
    ^bb55:
      %464 = llvm.load %445 : !llvm.ptr -> i32
      %465 = arith.constant 1 : i32
      %466 = arith.subi %464, %465 : i32
      llvm.store %466, %445 : i32, !llvm.ptr
      %468 = llvm.load %445 : !llvm.ptr -> i32
      %469 = arith.extsi %468 : i32 to i64
      %470 = llvm.getelementptr %437[%469] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %467 = llvm.load %470 : !llvm.ptr -> i32
      %471 = llvm.load %445 : !llvm.ptr -> i32
      %472 = arith.constant 1 : i32
      %473 = arith.subi %471, %472 : i32
      llvm.store %473, %445 : i32, !llvm.ptr
      %475 = llvm.load %445 : !llvm.ptr -> i32
      %476 = arith.extsi %475 : i32 to i64
      %477 = llvm.getelementptr %437[%476] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %474 = llvm.load %477 : !llvm.ptr -> i32
      %479 = arith.extsi %467 : i32 to i64
      %480 = llvm.getelementptr %arg0[%479] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %478 = llvm.load %480 : !llvm.ptr -> i64
      %481 = arith.constant 1 : i32
      %482 = arith.subi %474, %481 : i32
      %483 = llvm.mlir.constant(1 : i64) : i64
      %484 = llvm.alloca %483 x i32 : (i64) -> !llvm.ptr
      llvm.store %482, %484 : i32, !llvm.ptr
      %485 = llvm.mlir.constant(1 : i64) : i64
      %486 = llvm.alloca %485 x i32 : (i64) -> !llvm.ptr
      llvm.store %474, %486 : i32, !llvm.ptr
      cf.br ^bb57
      ^bb57:
      %487 = llvm.load %486 : !llvm.ptr -> i32
      %488 = arith.cmpi slt, %487, %467 : i32
      cf.cond_br %488, ^bb58, ^bb59
      ^bb58:
        %490 = llvm.load %486 : !llvm.ptr -> i32
        %491 = arith.extsi %490 : i32 to i64
        %492 = llvm.getelementptr %arg0[%491] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %489 = llvm.load %492 : !llvm.ptr -> i64
        %493 = arith.cmpi sle, %489, %478 : i64
        cf.cond_br %493, ^bb60, ^bb61
        ^bb60:
          %494 = llvm.load %484 : !llvm.ptr -> i32
          %495 = arith.constant 1 : i32
          %496 = arith.addi %494, %495 : i32
          llvm.store %496, %484 : i32, !llvm.ptr
          %498 = llvm.load %484 : !llvm.ptr -> i32
          %499 = arith.extsi %498 : i32 to i64
          %500 = llvm.getelementptr %arg0[%499] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %497 = llvm.load %500 : !llvm.ptr -> i64
          %502 = llvm.load %486 : !llvm.ptr -> i32
          %503 = arith.extsi %502 : i32 to i64
          %504 = llvm.getelementptr %arg0[%503] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %501 = llvm.load %504 : !llvm.ptr -> i64
          %505 = llvm.load %484 : !llvm.ptr -> i32
          %506 = arith.extsi %505 : i32 to i64
          %507 = llvm.getelementptr %arg0[%506] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %501, %507 : i64, !llvm.ptr
          %508 = llvm.load %486 : !llvm.ptr -> i32
          %509 = arith.extsi %508 : i32 to i64
          %510 = llvm.getelementptr %arg0[%509] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %497, %510 : i64, !llvm.ptr
          cf.br ^bb62
        ^bb61:
          cf.br ^bb62
        ^bb62:
        %511 = llvm.load %486 : !llvm.ptr -> i32
        %512 = arith.constant 1 : i32
        %513 = arith.addi %511, %512 : i32
        llvm.store %513, %486 : i32, !llvm.ptr
        cf.br ^bb57
      ^bb59:
      %514 = llvm.load %484 : !llvm.ptr -> i32
      %515 = arith.constant 1 : i32
      %516 = arith.addi %514, %515 : i32
      llvm.store %516, %484 : i32, !llvm.ptr
      %518 = llvm.load %484 : !llvm.ptr -> i32
      %519 = arith.extsi %518 : i32 to i64
      %520 = llvm.getelementptr %arg0[%519] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %517 = llvm.load %520 : !llvm.ptr -> i64
      %522 = arith.extsi %467 : i32 to i64
      %523 = llvm.getelementptr %arg0[%522] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %521 = llvm.load %523 : !llvm.ptr -> i64
      %524 = llvm.load %484 : !llvm.ptr -> i32
      %525 = arith.extsi %524 : i32 to i64
      %526 = llvm.getelementptr %arg0[%525] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %521, %526 : i64, !llvm.ptr
      %527 = arith.extsi %467 : i32 to i64
      %528 = llvm.getelementptr %arg0[%527] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %517, %528 : i64, !llvm.ptr
      %529 = llvm.load %484 : !llvm.ptr -> i32
      %530 = arith.constant 1 : i32
      %531 = arith.subi %529, %530 : i32
      %532 = arith.cmpi sgt, %531, %474 : i32
      cf.cond_br %532, ^bb63, ^bb64
      ^bb63:
        %533 = llvm.load %445 : !llvm.ptr -> i32
        %534 = arith.extsi %533 : i32 to i64
        %535 = llvm.getelementptr %437[%534] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %474, %535 : i32, !llvm.ptr
        %536 = llvm.load %445 : !llvm.ptr -> i32
        %537 = arith.constant 1 : i32
        %538 = arith.addi %536, %537 : i32
        llvm.store %538, %445 : i32, !llvm.ptr
        %539 = arith.constant 1 : i32
        %540 = arith.subi %529, %539 : i32
        %541 = llvm.load %445 : !llvm.ptr -> i32
        %542 = arith.extsi %541 : i32 to i64
        %543 = llvm.getelementptr %437[%542] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %540, %543 : i32, !llvm.ptr
        %544 = llvm.load %445 : !llvm.ptr -> i32
        %545 = arith.constant 1 : i32
        %546 = arith.addi %544, %545 : i32
        llvm.store %546, %445 : i32, !llvm.ptr
        cf.br ^bb65
      ^bb64:
        cf.br ^bb65
      ^bb65:
      %547 = arith.constant 1 : i32
      %548 = arith.addi %529, %547 : i32
      %549 = arith.cmpi slt, %548, %467 : i32
      cf.cond_br %549, ^bb66, ^bb67
      ^bb66:
        %550 = arith.constant 1 : i32
        %551 = arith.addi %529, %550 : i32
        %552 = llvm.load %445 : !llvm.ptr -> i32
        %553 = arith.extsi %552 : i32 to i64
        %554 = llvm.getelementptr %437[%553] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %551, %554 : i32, !llvm.ptr
        %555 = llvm.load %445 : !llvm.ptr -> i32
        %556 = arith.constant 1 : i32
        %557 = arith.addi %555, %556 : i32
        llvm.store %557, %445 : i32, !llvm.ptr
        %558 = llvm.load %445 : !llvm.ptr -> i32
        %559 = arith.extsi %558 : i32 to i64
        %560 = llvm.getelementptr %437[%559] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %467, %560 : i32, !llvm.ptr
        %561 = llvm.load %445 : !llvm.ptr -> i32
        %562 = arith.constant 1 : i32
        %563 = arith.addi %561, %562 : i32
        llvm.store %563, %445 : i32, !llvm.ptr
        cf.br ^bb68
      ^bb67:
        cf.br ^bb68
      ^bb68:
      cf.br ^bb54
    ^bb56:
    func.call @free(%437) : (!llvm.ptr) -> ()
    func.return
  }
  func.func @sortPoints(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i32, %arg3: i64, %arg4: i32) -> () {
    %565 = arith.constant 2 : i32
    %566 = arith.cmpi slt, %arg2, %565 : i32
    cf.cond_br %566, ^bb69, ^bb70
    ^bb69:
      func.return
    ^bb70:
      cf.br ^bb71
    ^bb71:
    %568 = arith.constant 2 : i32
    %569 = arith.muli %arg2, %568 : i32
    %570 = arith.extsi %569 : i32 to i64
    %571 = arith.constant 4 : i32
    %572 = arith.extsi %571 : i32 to i64
    %567 = func.call @calloc(%570, %572) : (i64, i64) -> !llvm.ptr
    %573 = arith.constant 0 : i32
    %574 = llvm.mlir.constant(1 : i64) : i64
    %575 = llvm.alloca %574 x i32 : (i64) -> !llvm.ptr
    llvm.store %573, %575 : i32, !llvm.ptr
    %576 = arith.constant 0 : i32
    %577 = llvm.load %575 : !llvm.ptr -> i32
    %578 = arith.extsi %577 : i32 to i64
    %579 = llvm.getelementptr %567[%578] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %576, %579 : i32, !llvm.ptr
    %580 = llvm.load %575 : !llvm.ptr -> i32
    %581 = arith.constant 1 : i32
    %582 = arith.addi %580, %581 : i32
    llvm.store %582, %575 : i32, !llvm.ptr
    %583 = arith.constant 1 : i32
    %584 = arith.subi %arg2, %583 : i32
    %585 = llvm.load %575 : !llvm.ptr -> i32
    %586 = arith.extsi %585 : i32 to i64
    %587 = llvm.getelementptr %567[%586] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %584, %587 : i32, !llvm.ptr
    %588 = llvm.load %575 : !llvm.ptr -> i32
    %589 = arith.constant 1 : i32
    %590 = arith.addi %588, %589 : i32
    llvm.store %590, %575 : i32, !llvm.ptr
    cf.br ^bb72
    ^bb72:
    %591 = llvm.load %575 : !llvm.ptr -> i32
    %592 = arith.constant 0 : i32
    %593 = arith.cmpi sgt, %591, %592 : i32
    cf.cond_br %593, ^bb73, ^bb74
    ^bb73:
      %594 = llvm.load %575 : !llvm.ptr -> i32
      %595 = arith.constant 1 : i32
      %596 = arith.subi %594, %595 : i32
      llvm.store %596, %575 : i32, !llvm.ptr
      %598 = llvm.load %575 : !llvm.ptr -> i32
      %599 = arith.extsi %598 : i32 to i64
      %600 = llvm.getelementptr %567[%599] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %597 = llvm.load %600 : !llvm.ptr -> i32
      %601 = llvm.load %575 : !llvm.ptr -> i32
      %602 = arith.constant 1 : i32
      %603 = arith.subi %601, %602 : i32
      llvm.store %603, %575 : i32, !llvm.ptr
      %605 = llvm.load %575 : !llvm.ptr -> i32
      %606 = arith.extsi %605 : i32 to i64
      %607 = llvm.getelementptr %567[%606] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %604 = llvm.load %607 : !llvm.ptr -> i32
      %609 = arith.extsi %597 : i32 to i64
      %610 = llvm.getelementptr %arg0[%609] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %608 = llvm.load %610 : !llvm.ptr -> i64
      %612 = arith.extsi %597 : i32 to i64
      %613 = llvm.getelementptr %arg1[%612] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %611 = llvm.load %613 : !llvm.ptr -> i64
      %614 = arith.constant 1 : i32
      %615 = arith.subi %604, %614 : i32
      %616 = llvm.mlir.constant(1 : i64) : i64
      %617 = llvm.alloca %616 x i32 : (i64) -> !llvm.ptr
      llvm.store %615, %617 : i32, !llvm.ptr
      %618 = llvm.mlir.constant(1 : i64) : i64
      %619 = llvm.alloca %618 x i32 : (i64) -> !llvm.ptr
      llvm.store %604, %619 : i32, !llvm.ptr
      cf.br ^bb75
      ^bb75:
      %620 = llvm.load %619 : !llvm.ptr -> i32
      %621 = arith.cmpi slt, %620, %597 : i32
      cf.cond_br %621, ^bb76, ^bb77
      ^bb76:
        %624 = llvm.load %619 : !llvm.ptr -> i32
        %625 = arith.extsi %624 : i32 to i64
        %626 = llvm.getelementptr %arg0[%625] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %623 = llvm.load %626 : !llvm.ptr -> i64
        %628 = llvm.load %619 : !llvm.ptr -> i32
        %629 = arith.extsi %628 : i32 to i64
        %630 = llvm.getelementptr %arg1[%629] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %627 = llvm.load %630 : !llvm.ptr -> i64
        %622 = func.call @cmpPoints(%623, %627, %608, %611, %arg3, %arg4) : (i64, i64, i64, i64, i64, i32) -> i32
        %631 = arith.constant 0 : i32
        %632 = arith.cmpi sle, %622, %631 : i32
        cf.cond_br %632, ^bb78, ^bb79
        ^bb78:
          %633 = llvm.load %617 : !llvm.ptr -> i32
          %634 = arith.constant 1 : i32
          %635 = arith.addi %633, %634 : i32
          llvm.store %635, %617 : i32, !llvm.ptr
          %637 = llvm.load %617 : !llvm.ptr -> i32
          %638 = arith.extsi %637 : i32 to i64
          %639 = llvm.getelementptr %arg0[%638] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %636 = llvm.load %639 : !llvm.ptr -> i64
          %641 = llvm.load %617 : !llvm.ptr -> i32
          %642 = arith.extsi %641 : i32 to i64
          %643 = llvm.getelementptr %arg1[%642] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %640 = llvm.load %643 : !llvm.ptr -> i64
          %645 = llvm.load %619 : !llvm.ptr -> i32
          %646 = arith.extsi %645 : i32 to i64
          %647 = llvm.getelementptr %arg0[%646] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %644 = llvm.load %647 : !llvm.ptr -> i64
          %648 = llvm.load %617 : !llvm.ptr -> i32
          %649 = arith.extsi %648 : i32 to i64
          %650 = llvm.getelementptr %arg0[%649] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %644, %650 : i64, !llvm.ptr
          %652 = llvm.load %619 : !llvm.ptr -> i32
          %653 = arith.extsi %652 : i32 to i64
          %654 = llvm.getelementptr %arg1[%653] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %651 = llvm.load %654 : !llvm.ptr -> i64
          %655 = llvm.load %617 : !llvm.ptr -> i32
          %656 = arith.extsi %655 : i32 to i64
          %657 = llvm.getelementptr %arg1[%656] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %651, %657 : i64, !llvm.ptr
          %658 = llvm.load %619 : !llvm.ptr -> i32
          %659 = arith.extsi %658 : i32 to i64
          %660 = llvm.getelementptr %arg0[%659] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %636, %660 : i64, !llvm.ptr
          %661 = llvm.load %619 : !llvm.ptr -> i32
          %662 = arith.extsi %661 : i32 to i64
          %663 = llvm.getelementptr %arg1[%662] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %640, %663 : i64, !llvm.ptr
          cf.br ^bb80
        ^bb79:
          cf.br ^bb80
        ^bb80:
        %664 = llvm.load %619 : !llvm.ptr -> i32
        %665 = arith.constant 1 : i32
        %666 = arith.addi %664, %665 : i32
        llvm.store %666, %619 : i32, !llvm.ptr
        cf.br ^bb75
      ^bb77:
      %667 = llvm.load %617 : !llvm.ptr -> i32
      %668 = arith.constant 1 : i32
      %669 = arith.addi %667, %668 : i32
      llvm.store %669, %617 : i32, !llvm.ptr
      %671 = llvm.load %617 : !llvm.ptr -> i32
      %672 = arith.extsi %671 : i32 to i64
      %673 = llvm.getelementptr %arg0[%672] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %670 = llvm.load %673 : !llvm.ptr -> i64
      %675 = llvm.load %617 : !llvm.ptr -> i32
      %676 = arith.extsi %675 : i32 to i64
      %677 = llvm.getelementptr %arg1[%676] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %674 = llvm.load %677 : !llvm.ptr -> i64
      %679 = arith.extsi %597 : i32 to i64
      %680 = llvm.getelementptr %arg0[%679] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %678 = llvm.load %680 : !llvm.ptr -> i64
      %681 = llvm.load %617 : !llvm.ptr -> i32
      %682 = arith.extsi %681 : i32 to i64
      %683 = llvm.getelementptr %arg0[%682] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %678, %683 : i64, !llvm.ptr
      %685 = arith.extsi %597 : i32 to i64
      %686 = llvm.getelementptr %arg1[%685] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %684 = llvm.load %686 : !llvm.ptr -> i64
      %687 = llvm.load %617 : !llvm.ptr -> i32
      %688 = arith.extsi %687 : i32 to i64
      %689 = llvm.getelementptr %arg1[%688] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %684, %689 : i64, !llvm.ptr
      %690 = arith.extsi %597 : i32 to i64
      %691 = llvm.getelementptr %arg0[%690] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %670, %691 : i64, !llvm.ptr
      %692 = arith.extsi %597 : i32 to i64
      %693 = llvm.getelementptr %arg1[%692] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %674, %693 : i64, !llvm.ptr
      %694 = llvm.load %617 : !llvm.ptr -> i32
      %695 = arith.constant 1 : i32
      %696 = arith.subi %694, %695 : i32
      %697 = arith.cmpi sgt, %696, %604 : i32
      cf.cond_br %697, ^bb81, ^bb82
      ^bb81:
        %698 = llvm.load %575 : !llvm.ptr -> i32
        %699 = arith.extsi %698 : i32 to i64
        %700 = llvm.getelementptr %567[%699] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %604, %700 : i32, !llvm.ptr
        %701 = llvm.load %575 : !llvm.ptr -> i32
        %702 = arith.constant 1 : i32
        %703 = arith.addi %701, %702 : i32
        llvm.store %703, %575 : i32, !llvm.ptr
        %704 = arith.constant 1 : i32
        %705 = arith.subi %694, %704 : i32
        %706 = llvm.load %575 : !llvm.ptr -> i32
        %707 = arith.extsi %706 : i32 to i64
        %708 = llvm.getelementptr %567[%707] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %705, %708 : i32, !llvm.ptr
        %709 = llvm.load %575 : !llvm.ptr -> i32
        %710 = arith.constant 1 : i32
        %711 = arith.addi %709, %710 : i32
        llvm.store %711, %575 : i32, !llvm.ptr
        cf.br ^bb83
      ^bb82:
        cf.br ^bb83
      ^bb83:
      %712 = arith.constant 1 : i32
      %713 = arith.addi %694, %712 : i32
      %714 = arith.cmpi slt, %713, %597 : i32
      cf.cond_br %714, ^bb84, ^bb85
      ^bb84:
        %715 = arith.constant 1 : i32
        %716 = arith.addi %694, %715 : i32
        %717 = llvm.load %575 : !llvm.ptr -> i32
        %718 = arith.extsi %717 : i32 to i64
        %719 = llvm.getelementptr %567[%718] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %716, %719 : i32, !llvm.ptr
        %720 = llvm.load %575 : !llvm.ptr -> i32
        %721 = arith.constant 1 : i32
        %722 = arith.addi %720, %721 : i32
        llvm.store %722, %575 : i32, !llvm.ptr
        %723 = llvm.load %575 : !llvm.ptr -> i32
        %724 = arith.extsi %723 : i32 to i64
        %725 = llvm.getelementptr %567[%724] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %597, %725 : i32, !llvm.ptr
        %726 = llvm.load %575 : !llvm.ptr -> i32
        %727 = arith.constant 1 : i32
        %728 = arith.addi %726, %727 : i32
        llvm.store %728, %575 : i32, !llvm.ptr
        cf.br ^bb86
      ^bb85:
        cf.br ^bb86
      ^bb86:
      cf.br ^bb72
    ^bb74:
    func.call @free(%567) : (!llvm.ptr) -> ()
    func.return
  }
  func.func @kmpPrefix(%arg0: !llvm.ptr, %arg1: i32, %arg2: !llvm.ptr) -> () {
    %730 = arith.constant 0 : i32
    %731 = arith.cmpi sgt, %arg1, %730 : i32
    cf.cond_br %731, ^bb87, ^bb88
    ^bb87:
      %732 = arith.constant 0 : i32
      %733 = arith.constant 0 : i32
      %734 = arith.extsi %733 : i32 to i64
      %735 = llvm.getelementptr %arg2[%734] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %732, %735 : i32, !llvm.ptr
      cf.br ^bb89
    ^bb88:
      cf.br ^bb89
    ^bb89:
    %736 = arith.constant 1 : i32
    %737 = llvm.mlir.constant(1 : i64) : i64
    %738 = llvm.alloca %737 x i32 : (i64) -> !llvm.ptr
    llvm.store %736, %738 : i32, !llvm.ptr
    %739 = arith.constant 0 : i32
    %740 = llvm.mlir.constant(1 : i64) : i64
    %741 = llvm.alloca %740 x i32 : (i64) -> !llvm.ptr
    llvm.store %739, %741 : i32, !llvm.ptr
    cf.br ^bb90
    ^bb90:
    %742 = llvm.load %738 : !llvm.ptr -> i32
    %743 = arith.cmpi slt, %742, %arg1 : i32
    cf.cond_br %743, ^bb91, ^bb92
    ^bb91:
      cf.br ^bb93
      ^bb93:
      %744 = llvm.load %741 : !llvm.ptr -> i32
      %745 = arith.constant 0 : i32
      %746 = arith.cmpi sgt, %744, %745 : i32
      %747 = scf.if %746 -> (i1) {
        %749 = llvm.load %738 : !llvm.ptr -> i32
        %750 = arith.extsi %749 : i32 to i64
        %751 = llvm.getelementptr %arg0[%750] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %748 = llvm.load %751 : !llvm.ptr -> i32
        %753 = llvm.load %741 : !llvm.ptr -> i32
        %754 = arith.extsi %753 : i32 to i64
        %755 = llvm.getelementptr %arg0[%754] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %752 = llvm.load %755 : !llvm.ptr -> i32
        %756 = arith.cmpi ne, %748, %752 : i32
        scf.yield %756 : i1
      } else {
        %757 = arith.constant false
        scf.yield %757 : i1
      }
      cf.cond_br %747, ^bb94, ^bb95
      ^bb94:
        %759 = llvm.load %741 : !llvm.ptr -> i32
        %760 = arith.constant 1 : i32
        %761 = arith.subi %759, %760 : i32
        %762 = arith.extsi %761 : i32 to i64
        %763 = llvm.getelementptr %arg2[%762] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %758 = llvm.load %763 : !llvm.ptr -> i32
        llvm.store %758, %741 : i32, !llvm.ptr
        cf.br ^bb93
      ^bb95:
      %765 = llvm.load %738 : !llvm.ptr -> i32
      %766 = arith.extsi %765 : i32 to i64
      %767 = llvm.getelementptr %arg0[%766] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %764 = llvm.load %767 : !llvm.ptr -> i32
      %769 = llvm.load %741 : !llvm.ptr -> i32
      %770 = arith.extsi %769 : i32 to i64
      %771 = llvm.getelementptr %arg0[%770] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %768 = llvm.load %771 : !llvm.ptr -> i32
      %772 = arith.cmpi eq, %764, %768 : i32
      cf.cond_br %772, ^bb96, ^bb97
      ^bb96:
        %773 = llvm.load %741 : !llvm.ptr -> i32
        %774 = arith.constant 1 : i32
        %775 = arith.addi %773, %774 : i32
        llvm.store %775, %741 : i32, !llvm.ptr
        cf.br ^bb98
      ^bb97:
        cf.br ^bb98
      ^bb98:
      %776 = llvm.load %741 : !llvm.ptr -> i32
      %777 = llvm.load %738 : !llvm.ptr -> i32
      %778 = arith.extsi %777 : i32 to i64
      %779 = llvm.getelementptr %arg2[%778] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %776, %779 : i32, !llvm.ptr
      %780 = llvm.load %738 : !llvm.ptr -> i32
      %781 = arith.constant 1 : i32
      %782 = arith.addi %780, %781 : i32
      llvm.store %782, %738 : i32, !llvm.ptr
      cf.br ^bb90
    ^bb92:
    func.return
  }
  func.func @findRotations(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i32, %arg3: !llvm.ptr, %arg4: !llvm.ptr) -> () {
    %783 = arith.constant 0 : i32
    %784 = arith.constant 0 : i32
    %785 = arith.extsi %784 : i32 to i64
    %786 = llvm.getelementptr %arg4[%785] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %783, %786 : i32, !llvm.ptr
    %788 = arith.constant 2 : i32
    %789 = arith.muli %788, %arg2 : i32
    %790 = arith.extsi %789 : i32 to i64
    %791 = arith.constant 4 : i32
    %792 = arith.extsi %791 : i32 to i64
    %787 = func.call @calloc(%790, %792) : (i64, i64) -> !llvm.ptr
    %794 = arith.extsi %arg2 : i32 to i64
    %795 = arith.constant 4 : i32
    %796 = arith.extsi %795 : i32 to i64
    %793 = func.call @calloc(%794, %796) : (i64, i64) -> !llvm.ptr
    %797 = arith.constant 0 : i32
    %798 = llvm.mlir.constant(1 : i64) : i64
    %799 = llvm.alloca %798 x i32 : (i64) -> !llvm.ptr
    llvm.store %797, %799 : i32, !llvm.ptr
    cf.br ^bb99
    ^bb99:
    %800 = llvm.load %799 : !llvm.ptr -> i32
    %801 = arith.cmpi slt, %800, %arg2 : i32
    cf.cond_br %801, ^bb100, ^bb101
    ^bb100:
      %803 = llvm.load %799 : !llvm.ptr -> i32
      %804 = arith.extsi %803 : i32 to i64
      %805 = llvm.getelementptr %arg0[%804] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %802 = llvm.load %805 : !llvm.ptr -> i32
      %806 = llvm.load %799 : !llvm.ptr -> i32
      %807 = arith.extsi %806 : i32 to i64
      %808 = llvm.getelementptr %787[%807] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %802, %808 : i32, !llvm.ptr
      %810 = llvm.load %799 : !llvm.ptr -> i32
      %811 = arith.extsi %810 : i32 to i64
      %812 = llvm.getelementptr %arg0[%811] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %809 = llvm.load %812 : !llvm.ptr -> i32
      %813 = llvm.load %799 : !llvm.ptr -> i32
      %814 = arith.addi %813, %arg2 : i32
      %815 = arith.extsi %814 : i32 to i64
      %816 = llvm.getelementptr %787[%815] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %809, %816 : i32, !llvm.ptr
      %817 = llvm.load %799 : !llvm.ptr -> i32
      %818 = arith.constant 1 : i32
      %819 = arith.addi %817, %818 : i32
      llvm.store %819, %799 : i32, !llvm.ptr
      cf.br ^bb99
    ^bb101:
    func.call @kmpPrefix(%arg1, %arg2, %793) : (!llvm.ptr, i32, !llvm.ptr) -> ()
    %821 = arith.constant 0 : i32
    %822 = llvm.mlir.constant(1 : i64) : i64
    %823 = llvm.alloca %822 x i32 : (i64) -> !llvm.ptr
    llvm.store %821, %823 : i32, !llvm.ptr
    %824 = arith.constant 0 : i32
    llvm.store %824, %799 : i32, !llvm.ptr
    cf.br ^bb102
    ^bb102:
    %825 = llvm.load %799 : !llvm.ptr -> i32
    %826 = arith.constant 2 : i32
    %827 = arith.muli %826, %arg2 : i32
    %828 = arith.constant 1 : i32
    %829 = arith.subi %827, %828 : i32
    %830 = arith.cmpi slt, %825, %829 : i32
    cf.cond_br %830, ^bb103, ^bb104
    ^bb103:
      cf.br ^bb105
      ^bb105:
      %831 = llvm.load %823 : !llvm.ptr -> i32
      %832 = arith.constant 0 : i32
      %833 = arith.cmpi sgt, %831, %832 : i32
      %834 = scf.if %833 -> (i1) {
        %836 = llvm.load %799 : !llvm.ptr -> i32
        %837 = arith.extsi %836 : i32 to i64
        %838 = llvm.getelementptr %787[%837] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %835 = llvm.load %838 : !llvm.ptr -> i32
        %840 = llvm.load %823 : !llvm.ptr -> i32
        %841 = arith.extsi %840 : i32 to i64
        %842 = llvm.getelementptr %arg1[%841] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %839 = llvm.load %842 : !llvm.ptr -> i32
        %843 = arith.cmpi ne, %835, %839 : i32
        scf.yield %843 : i1
      } else {
        %844 = arith.constant false
        scf.yield %844 : i1
      }
      cf.cond_br %834, ^bb106, ^bb107
      ^bb106:
        %846 = llvm.load %823 : !llvm.ptr -> i32
        %847 = arith.constant 1 : i32
        %848 = arith.subi %846, %847 : i32
        %849 = arith.extsi %848 : i32 to i64
        %850 = llvm.getelementptr %793[%849] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %845 = llvm.load %850 : !llvm.ptr -> i32
        llvm.store %845, %823 : i32, !llvm.ptr
        cf.br ^bb105
      ^bb107:
      %852 = llvm.load %799 : !llvm.ptr -> i32
      %853 = arith.extsi %852 : i32 to i64
      %854 = llvm.getelementptr %787[%853] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %851 = llvm.load %854 : !llvm.ptr -> i32
      %856 = llvm.load %823 : !llvm.ptr -> i32
      %857 = arith.extsi %856 : i32 to i64
      %858 = llvm.getelementptr %arg1[%857] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %855 = llvm.load %858 : !llvm.ptr -> i32
      %859 = arith.cmpi eq, %851, %855 : i32
      cf.cond_br %859, ^bb108, ^bb109
      ^bb108:
        %860 = llvm.load %823 : !llvm.ptr -> i32
        %861 = arith.constant 1 : i32
        %862 = arith.addi %860, %861 : i32
        llvm.store %862, %823 : i32, !llvm.ptr
        cf.br ^bb110
      ^bb109:
        cf.br ^bb110
      ^bb110:
      %863 = llvm.load %823 : !llvm.ptr -> i32
      %864 = arith.cmpi eq, %863, %arg2 : i32
      cf.cond_br %864, ^bb111, ^bb112
      ^bb111:
        %865 = llvm.load %799 : !llvm.ptr -> i32
        %866 = arith.subi %865, %arg2 : i32
        %867 = arith.constant 1 : i32
        %868 = arith.addi %866, %867 : i32
        %869 = arith.cmpi slt, %868, %arg2 : i32
        cf.cond_br %869, ^bb114, ^bb115
        ^bb114:
          %870 = arith.subi %arg2, %868 : i32
          %871 = arith.remsi %870, %arg2 : i32
          %873 = arith.constant 0 : i32
          %874 = arith.extsi %873 : i32 to i64
          %875 = llvm.getelementptr %arg4[%874] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          %872 = llvm.load %875 : !llvm.ptr -> i32
          %876 = arith.extsi %872 : i32 to i64
          %877 = llvm.getelementptr %arg3[%876] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          llvm.store %871, %877 : i32, !llvm.ptr
          %879 = arith.constant 0 : i32
          %880 = arith.extsi %879 : i32 to i64
          %881 = llvm.getelementptr %arg4[%880] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          %878 = llvm.load %881 : !llvm.ptr -> i32
          %882 = arith.constant 1 : i32
          %883 = arith.addi %878, %882 : i32
          %884 = arith.constant 0 : i32
          %885 = arith.extsi %884 : i32 to i64
          %886 = llvm.getelementptr %arg4[%885] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          llvm.store %883, %886 : i32, !llvm.ptr
          cf.br ^bb116
        ^bb115:
          cf.br ^bb116
        ^bb116:
        %888 = llvm.load %823 : !llvm.ptr -> i32
        %889 = arith.constant 1 : i32
        %890 = arith.subi %888, %889 : i32
        %891 = arith.extsi %890 : i32 to i64
        %892 = llvm.getelementptr %793[%891] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %887 = llvm.load %892 : !llvm.ptr -> i32
        llvm.store %887, %823 : i32, !llvm.ptr
        cf.br ^bb113
      ^bb112:
        cf.br ^bb113
      ^bb113:
      %893 = llvm.load %799 : !llvm.ptr -> i32
      %894 = arith.constant 1 : i32
      %895 = arith.addi %893, %894 : i32
      llvm.store %895, %799 : i32, !llvm.ptr
      cf.br ^bb102
    ^bb104:
    func.call @free(%787) : (!llvm.ptr) -> ()
    func.call @free(%793) : (!llvm.ptr) -> ()
    func.return
  }
  func.func @modinv_egcd(%arg0: i64, %arg1: i64) -> i64 {
    %898 = llvm.mlir.constant(1 : i64) : i64
    %899 = llvm.alloca %898 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg0, %899 : i64, !llvm.ptr
    %900 = llvm.mlir.constant(1 : i64) : i64
    %901 = llvm.alloca %900 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg1, %901 : i64, !llvm.ptr
    %902 = arith.constant 1 : i32
    %903 = arith.extsi %902 : i32 to i64
    %904 = llvm.mlir.constant(1 : i64) : i64
    %905 = llvm.alloca %904 x i64 : (i64) -> !llvm.ptr
    llvm.store %903, %905 : i64, !llvm.ptr
    %906 = arith.constant 0 : i32
    %907 = arith.extsi %906 : i32 to i64
    %908 = llvm.mlir.constant(1 : i64) : i64
    %909 = llvm.alloca %908 x i64 : (i64) -> !llvm.ptr
    llvm.store %907, %909 : i64, !llvm.ptr
    cf.br ^bb117
    ^bb117:
    %910 = llvm.load %901 : !llvm.ptr -> i64
    %911 = arith.constant 0 : i32
    %913 = arith.extsi %911 : i32 to i64
    %912 = arith.cmpi ne, %910, %913 : i64
    cf.cond_br %912, ^bb118, ^bb119
    ^bb118:
      %914 = llvm.load %899 : !llvm.ptr -> i64
      %915 = llvm.load %901 : !llvm.ptr -> i64
      %916 = arith.divsi %914, %915 : i64
      %917 = llvm.load %899 : !llvm.ptr -> i64
      %918 = llvm.load %901 : !llvm.ptr -> i64
      %919 = arith.muli %916, %918 : i64
      %920 = arith.subi %917, %919 : i64
      %921 = llvm.load %905 : !llvm.ptr -> i64
      %922 = llvm.load %909 : !llvm.ptr -> i64
      %923 = arith.muli %916, %922 : i64
      %924 = arith.subi %921, %923 : i64
      %925 = llvm.load %901 : !llvm.ptr -> i64
      llvm.store %925, %899 : i64, !llvm.ptr
      llvm.store %920, %901 : i64, !llvm.ptr
      %926 = llvm.load %909 : !llvm.ptr -> i64
      llvm.store %926, %905 : i64, !llvm.ptr
      llvm.store %924, %909 : i64, !llvm.ptr
      cf.br ^bb117
    ^bb119:
    %927 = llvm.load %905 : !llvm.ptr -> i64
    func.return %927 : i64
  }
  func.func @crtPair(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i64) -> !llvm.struct<(i64, i64, i32)> {
    %928 = func.call @llgcd(%arg1, %arg3) : (i64, i64) -> i64
    %929 = arith.subi %arg2, %arg0 : i64
    %930 = arith.remsi %929, %928 : i64
    %931 = arith.constant 0 : i32
    %933 = arith.extsi %931 : i32 to i64
    %932 = arith.cmpi ne, %930, %933 : i64
    cf.cond_br %932, ^bb120, ^bb121
    ^bb120:
      %934 = llvm.mlir.undef : !llvm.struct<(i64, i64, i32)>
      %935 = arith.constant 0 : i32
      %936 = arith.extsi %935 : i32 to i64
      %937 = llvm.insertvalue %936, %934[0] : !llvm.struct<(i64, i64, i32)>
      %938 = arith.constant 0 : i32
      %939 = arith.extsi %938 : i32 to i64
      %940 = llvm.insertvalue %939, %937[1] : !llvm.struct<(i64, i64, i32)>
      %941 = arith.constant 0 : i32
      %942 = llvm.insertvalue %941, %940[2] : !llvm.struct<(i64, i64, i32)>
      %943 = llvm.mlir.undef : !llvm.struct<(i64, i64, i32)>
      %944 = llvm.extractvalue %942[0] : !llvm.struct<(i64, i64, i32)>
      %945 = llvm.insertvalue %944, %943[0] : !llvm.struct<(i64, i64, i32)>
      %946 = llvm.extractvalue %942[1] : !llvm.struct<(i64, i64, i32)>
      %947 = llvm.insertvalue %946, %945[1] : !llvm.struct<(i64, i64, i32)>
      %948 = llvm.extractvalue %942[2] : !llvm.struct<(i64, i64, i32)>
      %949 = llvm.insertvalue %948, %947[2] : !llvm.struct<(i64, i64, i32)>
      %950 = llvm.mlir.constant(1 : i64) : i64
      %951 = llvm.alloca %950 x !llvm.struct<(i64, i64, i32)> : (i64) -> !llvm.ptr
      llvm.store %949, %951 : !llvm.struct<(i64, i64, i32)>, !llvm.ptr
      %952 = llvm.load %951 : !llvm.ptr -> !llvm.struct<(i64, i64, i32)>
      func.return %952 : !llvm.struct<(i64, i64, i32)>
    ^bb121:
      cf.br ^bb122
    ^bb122:
    %953 = arith.divsi %arg1, %928 : i64
    %954 = arith.divsi %arg3, %928 : i64
    %955 = func.call @modinv_egcd(%953, %954) : (i64, i64) -> i64
    %956 = arith.remsi %955, %954 : i64
    %957 = llvm.mlir.constant(1 : i64) : i64
    %958 = llvm.alloca %957 x i64 : (i64) -> !llvm.ptr
    llvm.store %956, %958 : i64, !llvm.ptr
    %959 = llvm.load %958 : !llvm.ptr -> i64
    %960 = arith.constant 0 : i32
    %962 = arith.extsi %960 : i32 to i64
    %961 = arith.cmpi slt, %959, %962 : i64
    cf.cond_br %961, ^bb123, ^bb124
    ^bb123:
      %963 = llvm.load %958 : !llvm.ptr -> i64
      %964 = arith.addi %963, %954 : i64
      llvm.store %964, %958 : i64, !llvm.ptr
      cf.br ^bb125
    ^bb124:
      cf.br ^bb125
    ^bb125:
    %965 = arith.divsi %929, %928 : i64
    %966 = arith.extsi %965 : i64 to i128
    %967 = llvm.load %958 : !llvm.ptr -> i64
    %968 = arith.extsi %967 : i64 to i128
    %970 = arith.trunci %966 : i128 to i64
    %971 = arith.trunci %968 : i128 to i64
    %969 = arith.muli %970, %971 : i64
    %972 = arith.extsi %954 : i64 to i128
    %974 = arith.trunci %972 : i128 to i64
    %973 = arith.remsi %969, %974 : i64
    %975 = arith.extsi %973 : i64 to i128
    %976 = llvm.mlir.constant(1 : i64) : i64
    %977 = llvm.alloca %976 x i128 : (i64) -> !llvm.ptr
    llvm.store %975, %977 : i128, !llvm.ptr
    %978 = llvm.load %977 : !llvm.ptr -> i128
    %979 = arith.constant 0 : i32
    %981 = arith.trunci %978 : i128 to i64
    %982 = arith.extsi %979 : i32 to i64
    %980 = arith.cmpi slt, %981, %982 : i64
    cf.cond_br %980, ^bb126, ^bb127
    ^bb126:
      %983 = llvm.load %977 : !llvm.ptr -> i128
      %984 = arith.extsi %954 : i64 to i128
      %986 = arith.trunci %983 : i128 to i64
      %987 = arith.trunci %984 : i128 to i64
      %985 = arith.addi %986, %987 : i64
      %988 = arith.extsi %985 : i64 to i128
      llvm.store %988, %977 : i128, !llvm.ptr
      cf.br ^bb128
    ^bb127:
      cf.br ^bb128
    ^bb128:
    %989 = arith.extsi %arg1 : i64 to i128
    %990 = arith.extsi %928 : i64 to i128
    %992 = arith.trunci %989 : i128 to i64
    %993 = arith.trunci %990 : i128 to i64
    %991 = arith.divsi %992, %993 : i64
    %994 = arith.extsi %arg3 : i64 to i128
    %996 = arith.trunci %994 : i128 to i64
    %995 = arith.muli %991, %996 : i64
    %997 = arith.extsi %995 : i64 to i128
    %998 = arith.extsi %arg0 : i64 to i128
    %999 = arith.extsi %arg1 : i64 to i128
    %1000 = llvm.load %977 : !llvm.ptr -> i128
    %1002 = arith.trunci %999 : i128 to i64
    %1003 = arith.trunci %1000 : i128 to i64
    %1001 = arith.muli %1002, %1003 : i64
    %1005 = arith.trunci %998 : i128 to i64
    %1004 = arith.addi %1005, %1001 : i64
    %1006 = arith.extsi %1004 : i64 to i128
    %1007 = arith.trunci %997 : i128 to i64
    %1009 = arith.trunci %1006 : i128 to i64
    %1010 = arith.trunci %997 : i128 to i64
    %1008 = arith.remsi %1009, %1010 : i64
    %1011 = llvm.mlir.constant(1 : i64) : i64
    %1012 = llvm.alloca %1011 x i64 : (i64) -> !llvm.ptr
    llvm.store %1008, %1012 : i64, !llvm.ptr
    %1013 = llvm.load %1012 : !llvm.ptr -> i64
    %1014 = arith.constant 0 : i32
    %1016 = arith.extsi %1014 : i32 to i64
    %1015 = arith.cmpi slt, %1013, %1016 : i64
    cf.cond_br %1015, ^bb129, ^bb130
    ^bb129:
      %1017 = llvm.load %1012 : !llvm.ptr -> i64
      %1018 = arith.addi %1017, %1007 : i64
      llvm.store %1018, %1012 : i64, !llvm.ptr
      cf.br ^bb131
    ^bb130:
      cf.br ^bb131
    ^bb131:
    %1019 = llvm.mlir.undef : !llvm.struct<(i64, i64, i32)>
    %1020 = llvm.load %1012 : !llvm.ptr -> i64
    %1021 = llvm.insertvalue %1020, %1019[0] : !llvm.struct<(i64, i64, i32)>
    %1022 = llvm.insertvalue %1007, %1021[1] : !llvm.struct<(i64, i64, i32)>
    %1023 = arith.constant 1 : i32
    %1024 = llvm.insertvalue %1023, %1022[2] : !llvm.struct<(i64, i64, i32)>
    %1025 = llvm.mlir.undef : !llvm.struct<(i64, i64, i32)>
    %1026 = llvm.extractvalue %1024[0] : !llvm.struct<(i64, i64, i32)>
    %1027 = llvm.insertvalue %1026, %1025[0] : !llvm.struct<(i64, i64, i32)>
    %1028 = llvm.extractvalue %1024[1] : !llvm.struct<(i64, i64, i32)>
    %1029 = llvm.insertvalue %1028, %1027[1] : !llvm.struct<(i64, i64, i32)>
    %1030 = llvm.extractvalue %1024[2] : !llvm.struct<(i64, i64, i32)>
    %1031 = llvm.insertvalue %1030, %1029[2] : !llvm.struct<(i64, i64, i32)>
    %1032 = llvm.mlir.constant(1 : i64) : i64
    %1033 = llvm.alloca %1032 x !llvm.struct<(i64, i64, i32)> : (i64) -> !llvm.ptr
    llvm.store %1031, %1033 : !llvm.struct<(i64, i64, i32)>, !llvm.ptr
    %1034 = llvm.load %1033 : !llvm.ptr -> !llvm.struct<(i64, i64, i32)>
    func.return %1034 : !llvm.struct<(i64, i64, i32)>
  }
  func.func @mergeCRT(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: !llvm.ptr, %arg4: i32, %arg5: i64) -> () {
    %1036 = arith.constant 0 : i32
    %1037 = arith.extsi %1036 : i32 to i64
    %1038 = llvm.getelementptr %arg1[%1037] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    %1035 = llvm.load %1038 : !llvm.ptr -> i32
    %1041 = arith.constant 0 : i32
    %1042 = arith.extsi %1041 : i32 to i64
    %1043 = llvm.getelementptr %arg2[%1042] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    %1040 = llvm.load %1043 : !llvm.ptr -> i64
    %1039 = func.call @lllcm(%1040, %arg5) : (i64, i64) -> i64
    %1044 = arith.extsi %1035 : i32 to i64
    %1045 = arith.extsi %arg4 : i32 to i64
    %1046 = arith.muli %1044, %1045 : i64
    %1047 = arith.constant 1 : i32
    %1049 = arith.extsi %1047 : i32 to i64
    %1048 = arith.addi %1046, %1049 : i64
    %1051 = arith.constant 8 : i32
    %1052 = arith.extsi %1051 : i32 to i64
    %1050 = func.call @calloc(%1048, %1052) : (i64, i64) -> !llvm.ptr
    %1053 = arith.constant 0 : i32
    %1054 = llvm.mlir.constant(1 : i64) : i64
    %1055 = llvm.alloca %1054 x i32 : (i64) -> !llvm.ptr
    llvm.store %1053, %1055 : i32, !llvm.ptr
    %1056 = arith.constant 0 : i32
    %1057 = llvm.mlir.constant(1 : i64) : i64
    %1058 = llvm.alloca %1057 x i32 : (i64) -> !llvm.ptr
    llvm.store %1056, %1058 : i32, !llvm.ptr
    cf.br ^bb132
    ^bb132:
    %1059 = llvm.load %1058 : !llvm.ptr -> i32
    %1060 = arith.cmpi slt, %1059, %1035 : i32
    cf.cond_br %1060, ^bb133, ^bb134
    ^bb133:
      %1061 = arith.constant 0 : i32
      %1062 = llvm.mlir.constant(1 : i64) : i64
      %1063 = llvm.alloca %1062 x i32 : (i64) -> !llvm.ptr
      llvm.store %1061, %1063 : i32, !llvm.ptr
      cf.br ^bb135
      ^bb135:
      %1064 = llvm.load %1063 : !llvm.ptr -> i32
      %1065 = arith.cmpi slt, %1064, %arg4 : i32
      cf.cond_br %1065, ^bb136, ^bb137
      ^bb136:
        %1068 = llvm.load %1063 : !llvm.ptr -> i32
        %1069 = arith.extsi %1068 : i32 to i64
        %1070 = llvm.getelementptr %arg3[%1069] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1067 = llvm.load %1070 : !llvm.ptr -> i64
        %1072 = arith.constant 0 : i32
        %1073 = arith.extsi %1072 : i32 to i64
        %1074 = llvm.getelementptr %arg2[%1073] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1071 = llvm.load %1074 : !llvm.ptr -> i64
        %1076 = llvm.load %1058 : !llvm.ptr -> i32
        %1077 = arith.extsi %1076 : i32 to i64
        %1078 = llvm.getelementptr %arg0[%1077] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1075 = llvm.load %1078 : !llvm.ptr -> i64
        %1066 = func.call @crtPair(%1075, %1071, %1067, %arg5) : (i64, i64, i64, i64) -> !llvm.struct<(i64, i64, i32)>
        %1079 = llvm.mlir.undef : !llvm.struct<(i64, i64, i32)>
        %1080 = llvm.extractvalue %1066[0] : !llvm.struct<(i64, i64, i32)>
        %1081 = llvm.insertvalue %1080, %1079[0] : !llvm.struct<(i64, i64, i32)>
        %1082 = llvm.extractvalue %1066[1] : !llvm.struct<(i64, i64, i32)>
        %1083 = llvm.insertvalue %1082, %1081[1] : !llvm.struct<(i64, i64, i32)>
        %1084 = llvm.extractvalue %1066[2] : !llvm.struct<(i64, i64, i32)>
        %1085 = llvm.insertvalue %1084, %1083[2] : !llvm.struct<(i64, i64, i32)>
        %1086 = llvm.mlir.constant(1 : i64) : i64
        %1087 = llvm.alloca %1086 x !llvm.struct<(i64, i64, i32)> : (i64) -> !llvm.ptr
        llvm.store %1085, %1087 : !llvm.struct<(i64, i64, i32)>, !llvm.ptr
        %1088 = llvm.load %1087 : !llvm.ptr -> !llvm.struct<(i64, i64, i32)>
        %1089 = llvm.mlir.constant(1 : i64) : i64
        %1090 = llvm.alloca %1089 x !llvm.struct<(i64, i64, i32)> : (i64) -> !llvm.ptr
        llvm.store %1088, %1090 : !llvm.struct<(i64, i64, i32)>, !llvm.ptr
        %1091 = llvm.load %1090 : !llvm.ptr -> !llvm.struct<(i64, i64, i32)>
        %1092 = llvm.getelementptr %1090[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64, i32)>
        %1093 = llvm.load %1092 : !llvm.ptr -> i32
        %1094 = arith.constant 0 : i32
        %1095 = arith.cmpi ne, %1093, %1094 : i32
        cf.cond_br %1095, ^bb138, ^bb139
        ^bb138:
          %1096 = llvm.load %1090 : !llvm.ptr -> !llvm.struct<(i64, i64, i32)>
          %1097 = llvm.getelementptr %1090[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64, i32)>
          %1098 = llvm.load %1097 : !llvm.ptr -> i64
          %1099 = llvm.load %1055 : !llvm.ptr -> i32
          %1100 = arith.extsi %1099 : i32 to i64
          %1101 = llvm.getelementptr %1050[%1100] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1098, %1101 : i64, !llvm.ptr
          %1102 = llvm.load %1055 : !llvm.ptr -> i32
          %1103 = arith.constant 1 : i32
          %1104 = arith.addi %1102, %1103 : i32
          llvm.store %1104, %1055 : i32, !llvm.ptr
          cf.br ^bb140
        ^bb139:
          cf.br ^bb140
        ^bb140:
        %1105 = llvm.load %1063 : !llvm.ptr -> i32
        %1106 = arith.constant 1 : i32
        %1107 = arith.addi %1105, %1106 : i32
        llvm.store %1107, %1063 : i32, !llvm.ptr
        cf.br ^bb135
      ^bb137:
      %1108 = llvm.load %1058 : !llvm.ptr -> i32
      %1109 = arith.constant 1 : i32
      %1110 = arith.addi %1108, %1109 : i32
      llvm.store %1110, %1058 : i32, !llvm.ptr
      cf.br ^bb132
    ^bb134:
    %1112 = llvm.load %1055 : !llvm.ptr -> i32
    func.call @sortI64(%1050, %1112) : (!llvm.ptr, i32) -> ()
    %1113 = arith.constant 0 : i32
    %1114 = llvm.mlir.constant(1 : i64) : i64
    %1115 = llvm.alloca %1114 x i32 : (i64) -> !llvm.ptr
    llvm.store %1113, %1115 : i32, !llvm.ptr
    %1116 = arith.constant 0 : i32
    %1117 = llvm.mlir.constant(1 : i64) : i64
    %1118 = llvm.alloca %1117 x i32 : (i64) -> !llvm.ptr
    llvm.store %1116, %1118 : i32, !llvm.ptr
    cf.br ^bb141
    ^bb141:
    %1119 = llvm.load %1118 : !llvm.ptr -> i32
    %1120 = llvm.load %1055 : !llvm.ptr -> i32
    %1121 = arith.cmpi slt, %1119, %1120 : i32
    cf.cond_br %1121, ^bb142, ^bb143
    ^bb142:
      %1122 = llvm.load %1115 : !llvm.ptr -> i32
      %1123 = arith.constant 0 : i32
      %1124 = arith.cmpi eq, %1122, %1123 : i32
      %1125 = scf.if %1124 -> (i1) {
        %1126 = arith.constant true
        scf.yield %1126 : i1
      } else {
        %1128 = llvm.load %1118 : !llvm.ptr -> i32
        %1129 = arith.extsi %1128 : i32 to i64
        %1130 = llvm.getelementptr %1050[%1129] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1127 = llvm.load %1130 : !llvm.ptr -> i64
        %1132 = llvm.load %1115 : !llvm.ptr -> i32
        %1133 = arith.constant 1 : i32
        %1134 = arith.subi %1132, %1133 : i32
        %1135 = arith.extsi %1134 : i32 to i64
        %1136 = llvm.getelementptr %1050[%1135] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1131 = llvm.load %1136 : !llvm.ptr -> i64
        %1137 = arith.cmpi ne, %1127, %1131 : i64
        scf.yield %1137 : i1
      }
      cf.cond_br %1125, ^bb144, ^bb145
      ^bb144:
        %1139 = llvm.load %1118 : !llvm.ptr -> i32
        %1140 = arith.extsi %1139 : i32 to i64
        %1141 = llvm.getelementptr %1050[%1140] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1138 = llvm.load %1141 : !llvm.ptr -> i64
        %1142 = llvm.load %1115 : !llvm.ptr -> i32
        %1143 = arith.extsi %1142 : i32 to i64
        %1144 = llvm.getelementptr %1050[%1143] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1138, %1144 : i64, !llvm.ptr
        %1145 = llvm.load %1115 : !llvm.ptr -> i32
        %1146 = arith.constant 1 : i32
        %1147 = arith.addi %1145, %1146 : i32
        llvm.store %1147, %1115 : i32, !llvm.ptr
        cf.br ^bb146
      ^bb145:
        cf.br ^bb146
      ^bb146:
      %1148 = llvm.load %1118 : !llvm.ptr -> i32
      %1149 = arith.constant 1 : i32
      %1150 = arith.addi %1148, %1149 : i32
      llvm.store %1150, %1118 : i32, !llvm.ptr
      cf.br ^bb141
    ^bb143:
    %1151 = arith.constant 0 : i32
    %1152 = llvm.mlir.constant(1 : i64) : i64
    %1153 = llvm.alloca %1152 x i32 : (i64) -> !llvm.ptr
    llvm.store %1151, %1153 : i32, !llvm.ptr
    cf.br ^bb147
    ^bb147:
    %1154 = llvm.load %1153 : !llvm.ptr -> i32
    %1155 = llvm.load %1115 : !llvm.ptr -> i32
    %1156 = arith.cmpi slt, %1154, %1155 : i32
    cf.cond_br %1156, ^bb148, ^bb149
    ^bb148:
      %1158 = llvm.load %1153 : !llvm.ptr -> i32
      %1159 = arith.extsi %1158 : i32 to i64
      %1160 = llvm.getelementptr %1050[%1159] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1157 = llvm.load %1160 : !llvm.ptr -> i64
      %1161 = llvm.load %1153 : !llvm.ptr -> i32
      %1162 = arith.extsi %1161 : i32 to i64
      %1163 = llvm.getelementptr %arg0[%1162] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1157, %1163 : i64, !llvm.ptr
      %1164 = llvm.load %1153 : !llvm.ptr -> i32
      %1165 = arith.constant 1 : i32
      %1166 = arith.addi %1164, %1165 : i32
      llvm.store %1166, %1153 : i32, !llvm.ptr
      cf.br ^bb147
    ^bb149:
    %1167 = llvm.load %1115 : !llvm.ptr -> i32
    %1168 = arith.constant 0 : i32
    %1169 = arith.extsi %1168 : i32 to i64
    %1170 = llvm.getelementptr %arg1[%1169] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %1167, %1170 : i32, !llvm.ptr
    %1171 = arith.constant 0 : i32
    %1172 = arith.extsi %1171 : i32 to i64
    %1173 = llvm.getelementptr %arg2[%1172] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1039, %1173 : i64, !llvm.ptr
    func.call @free(%1050) : (!llvm.ptr) -> ()
    func.return
  }
  func.func @cycleConstraint(%arg0: !llvm.ptr, %arg1: i32, %arg2: !llvm.ptr, %arg3: !llvm.ptr, %arg4: !llvm.ptr) -> () {
    %1175 = arith.constant 3 : i32
    %1176 = arith.divsi %arg1, %1175 : i32
    %1177 = arith.constant 0 : i32
    %1178 = llvm.mlir.constant(1 : i64) : i64
    %1179 = llvm.alloca %1178 x i32 : (i64) -> !llvm.ptr
    llvm.store %1177, %1179 : i32, !llvm.ptr
    %1180 = arith.constant 0 : i32
    %1181 = llvm.mlir.constant(1 : i64) : i64
    %1182 = llvm.alloca %1181 x i32 : (i64) -> !llvm.ptr
    llvm.store %1180, %1182 : i32, !llvm.ptr
    cf.br ^bb150
    ^bb150:
    %1183 = llvm.load %1182 : !llvm.ptr -> i32
    %1184 = arith.cmpi slt, %1183, %arg1 : i32
    cf.cond_br %1184, ^bb151, ^bb152
    ^bb151:
      %1185 = llvm.load %1179 : !llvm.ptr -> i32
      %1187 = llvm.load %1182 : !llvm.ptr -> i32
      %1188 = arith.extsi %1187 : i32 to i64
      %1189 = llvm.getelementptr %arg0[%1188] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1186 = llvm.load %1189 : !llvm.ptr -> i32
      %1190 = arith.xori %1185, %1186 : i32
      llvm.store %1190, %1179 : i32, !llvm.ptr
      %1191 = llvm.load %1182 : !llvm.ptr -> i32
      %1192 = arith.constant 1 : i32
      %1193 = arith.addi %1191, %1192 : i32
      llvm.store %1193, %1182 : i32, !llvm.ptr
      cf.br ^bb150
    ^bb152:
    %1194 = llvm.load %1179 : !llvm.ptr -> i32
    %1195 = arith.constant 0 : i32
    %1196 = arith.cmpi eq, %1194, %1195 : i32
    %1197 = scf.if %1196 -> (i64) {
      %1198 = arith.extsi %arg1 : i32 to i64
      scf.yield %1198 : i64
    } else {
      %1199 = arith.constant 2 : i32
      %1200 = arith.muli %1199, %arg1 : i32
      %1201 = arith.extsi %1200 : i32 to i64
      scf.yield %1201 : i64
    }
    %1202 = arith.constant 0 : i32
    %1203 = arith.extsi %1202 : i32 to i64
    %1204 = llvm.getelementptr %arg2[%1203] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1197, %1204 : i64, !llvm.ptr
    %1206 = arith.extsi %1176 : i32 to i64
    %1207 = arith.constant 4 : i32
    %1208 = arith.extsi %1207 : i32 to i64
    %1205 = func.call @calloc(%1206, %1208) : (i64, i64) -> !llvm.ptr
    %1210 = arith.extsi %1176 : i32 to i64
    %1211 = arith.constant 4 : i32
    %1212 = arith.extsi %1211 : i32 to i64
    %1209 = func.call @calloc(%1210, %1212) : (i64, i64) -> !llvm.ptr
    %1214 = arith.extsi %1176 : i32 to i64
    %1215 = arith.constant 4 : i32
    %1216 = arith.extsi %1215 : i32 to i64
    %1213 = func.call @calloc(%1214, %1216) : (i64, i64) -> !llvm.ptr
    %1217 = arith.constant 0 : i32
    llvm.store %1217, %1182 : i32, !llvm.ptr
    cf.br ^bb153
    ^bb153:
    %1218 = llvm.load %1182 : !llvm.ptr -> i32
    %1219 = arith.cmpi slt, %1218, %1176 : i32
    cf.cond_br %1219, ^bb154, ^bb155
    ^bb154:
      %1221 = arith.constant 3 : i32
      %1222 = llvm.load %1182 : !llvm.ptr -> i32
      %1223 = arith.muli %1221, %1222 : i32
      %1224 = arith.extsi %1223 : i32 to i64
      %1225 = llvm.getelementptr %arg0[%1224] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1220 = llvm.load %1225 : !llvm.ptr -> i32
      %1226 = llvm.load %1182 : !llvm.ptr -> i32
      %1227 = arith.extsi %1226 : i32 to i64
      %1228 = llvm.getelementptr %1205[%1227] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1220, %1228 : i32, !llvm.ptr
      %1230 = arith.constant 3 : i32
      %1231 = llvm.load %1182 : !llvm.ptr -> i32
      %1232 = arith.muli %1230, %1231 : i32
      %1233 = arith.constant 1 : i32
      %1234 = arith.addi %1232, %1233 : i32
      %1235 = arith.extsi %1234 : i32 to i64
      %1236 = llvm.getelementptr %arg0[%1235] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1229 = llvm.load %1236 : !llvm.ptr -> i32
      %1237 = llvm.load %1182 : !llvm.ptr -> i32
      %1238 = arith.extsi %1237 : i32 to i64
      %1239 = llvm.getelementptr %1209[%1238] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1229, %1239 : i32, !llvm.ptr
      %1241 = arith.constant 3 : i32
      %1242 = llvm.load %1182 : !llvm.ptr -> i32
      %1243 = arith.muli %1241, %1242 : i32
      %1244 = arith.constant 2 : i32
      %1245 = arith.addi %1243, %1244 : i32
      %1246 = arith.extsi %1245 : i32 to i64
      %1247 = llvm.getelementptr %arg0[%1246] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1240 = llvm.load %1247 : !llvm.ptr -> i32
      %1248 = llvm.load %1182 : !llvm.ptr -> i32
      %1249 = arith.extsi %1248 : i32 to i64
      %1250 = llvm.getelementptr %1213[%1249] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1240, %1250 : i32, !llvm.ptr
      %1251 = llvm.load %1182 : !llvm.ptr -> i32
      %1252 = arith.constant 1 : i32
      %1253 = arith.addi %1251, %1252 : i32
      llvm.store %1253, %1182 : i32, !llvm.ptr
      cf.br ^bb153
    ^bb155:
    %1255 = arith.extsi %1176 : i32 to i64
    %1256 = arith.constant 4 : i32
    %1257 = arith.extsi %1256 : i32 to i64
    %1254 = func.call @calloc(%1255, %1257) : (i64, i64) -> !llvm.ptr
    %1258 = arith.constant 0 : i32
    %1259 = llvm.mlir.constant(1 : i64) : i64
    %1260 = llvm.alloca %1259 x i32 : (i64) -> !llvm.ptr
    llvm.store %1258, %1260 : i32, !llvm.ptr
    %1261 = arith.constant 0 : i32
    llvm.store %1261, %1182 : i32, !llvm.ptr
    cf.br ^bb156
    ^bb156:
    %1262 = llvm.load %1182 : !llvm.ptr -> i32
    %1263 = arith.cmpi slt, %1262, %1176 : i32
    cf.cond_br %1263, ^bb157, ^bb158
    ^bb157:
      %1265 = llvm.load %1182 : !llvm.ptr -> i32
      %1266 = arith.extsi %1265 : i32 to i64
      %1267 = llvm.getelementptr %1205[%1266] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1264 = llvm.load %1267 : !llvm.ptr -> i32
      %1269 = llvm.load %1182 : !llvm.ptr -> i32
      %1270 = arith.extsi %1269 : i32 to i64
      %1271 = llvm.getelementptr %1209[%1270] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1268 = llvm.load %1271 : !llvm.ptr -> i32
      %1272 = arith.xori %1264, %1268 : i32
      %1274 = llvm.load %1182 : !llvm.ptr -> i32
      %1275 = arith.extsi %1274 : i32 to i64
      %1276 = llvm.getelementptr %1213[%1275] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1273 = llvm.load %1276 : !llvm.ptr -> i32
      %1277 = arith.xori %1272, %1273 : i32
      %1278 = llvm.load %1182 : !llvm.ptr -> i32
      %1279 = arith.extsi %1278 : i32 to i64
      %1280 = llvm.getelementptr %1254[%1279] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1277, %1280 : i32, !llvm.ptr
      %1281 = llvm.load %1260 : !llvm.ptr -> i32
      %1283 = llvm.load %1182 : !llvm.ptr -> i32
      %1284 = arith.extsi %1283 : i32 to i64
      %1285 = llvm.getelementptr %1254[%1284] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1282 = llvm.load %1285 : !llvm.ptr -> i32
      %1286 = arith.xori %1281, %1282 : i32
      llvm.store %1286, %1260 : i32, !llvm.ptr
      %1287 = llvm.load %1182 : !llvm.ptr -> i32
      %1288 = arith.constant 1 : i32
      %1289 = arith.addi %1287, %1288 : i32
      llvm.store %1289, %1182 : i32, !llvm.ptr
      cf.br ^bb156
    ^bb158:
    %1291 = arith.constant 1 : i32
    %1292 = arith.addi %1176, %1291 : i32
    %1293 = arith.extsi %1292 : i32 to i64
    %1294 = arith.constant 4 : i32
    %1295 = arith.extsi %1294 : i32 to i64
    %1290 = func.call @calloc(%1293, %1295) : (i64, i64) -> !llvm.ptr
    %1296 = arith.constant 0 : i32
    %1297 = arith.constant 0 : i32
    %1298 = arith.extsi %1297 : i32 to i64
    %1299 = llvm.getelementptr %1290[%1298] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %1296, %1299 : i32, !llvm.ptr
    %1300 = arith.constant 0 : i32
    llvm.store %1300, %1182 : i32, !llvm.ptr
    cf.br ^bb159
    ^bb159:
    %1301 = llvm.load %1182 : !llvm.ptr -> i32
    %1302 = arith.cmpi slt, %1301, %1176 : i32
    cf.cond_br %1302, ^bb160, ^bb161
    ^bb160:
      %1304 = llvm.load %1182 : !llvm.ptr -> i32
      %1305 = arith.extsi %1304 : i32 to i64
      %1306 = llvm.getelementptr %1290[%1305] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1303 = llvm.load %1306 : !llvm.ptr -> i32
      %1308 = llvm.load %1182 : !llvm.ptr -> i32
      %1309 = arith.extsi %1308 : i32 to i64
      %1310 = llvm.getelementptr %1254[%1309] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1307 = llvm.load %1310 : !llvm.ptr -> i32
      %1311 = arith.xori %1303, %1307 : i32
      %1312 = llvm.load %1182 : !llvm.ptr -> i32
      %1313 = arith.constant 1 : i32
      %1314 = arith.addi %1312, %1313 : i32
      %1315 = arith.extsi %1314 : i32 to i64
      %1316 = llvm.getelementptr %1290[%1315] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1311, %1316 : i32, !llvm.ptr
      %1317 = llvm.load %1182 : !llvm.ptr -> i32
      %1318 = arith.constant 1 : i32
      %1319 = arith.addi %1317, %1318 : i32
      llvm.store %1319, %1182 : i32, !llvm.ptr
      cf.br ^bb159
    ^bb161:
    %1320 = arith.constant 0 : i32
    %1321 = arith.constant 0 : i32
    %1322 = arith.extsi %1321 : i32 to i64
    %1323 = llvm.getelementptr %arg4[%1322] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %1320, %1323 : i32, !llvm.ptr
    %1324 = arith.constant 0 : i32
    %1325 = llvm.mlir.constant(1 : i64) : i64
    %1326 = llvm.alloca %1325 x i32 : (i64) -> !llvm.ptr
    llvm.store %1324, %1326 : i32, !llvm.ptr
    cf.br ^bb162
    ^bb162:
    %1327 = llvm.load %1326 : !llvm.ptr -> i32
    %1328 = arith.constant 3 : i32
    %1329 = arith.cmpi slt, %1327, %1328 : i32
    cf.cond_br %1329, ^bb163, ^bb164
    ^bb163:
      %1331 = arith.extsi %1176 : i32 to i64
      %1332 = arith.constant 4 : i32
      %1333 = arith.extsi %1332 : i32 to i64
      %1330 = func.call @calloc(%1331, %1333) : (i64, i64) -> !llvm.ptr
      %1334 = llvm.load %1326 : !llvm.ptr -> i32
      %1335 = arith.constant 0 : i32
      %1336 = arith.cmpi eq, %1334, %1335 : i32
      cf.cond_br %1336, ^bb165, ^bb166
      ^bb165:
        %1337 = arith.constant 0 : i32
        %1338 = llvm.mlir.constant(1 : i64) : i64
        %1339 = llvm.alloca %1338 x i32 : (i64) -> !llvm.ptr
        llvm.store %1337, %1339 : i32, !llvm.ptr
        cf.br ^bb168
        ^bb168:
        %1340 = llvm.load %1339 : !llvm.ptr -> i32
        %1341 = arith.cmpi slt, %1340, %1176 : i32
        cf.cond_br %1341, ^bb169, ^bb170
        ^bb169:
          %1342 = arith.constant 0 : i32
          %1343 = llvm.load %1339 : !llvm.ptr -> i32
          %1344 = arith.extsi %1343 : i32 to i64
          %1345 = llvm.getelementptr %1330[%1344] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          llvm.store %1342, %1345 : i32, !llvm.ptr
          %1346 = llvm.load %1339 : !llvm.ptr -> i32
          %1347 = arith.constant 1 : i32
          %1348 = arith.addi %1346, %1347 : i32
          llvm.store %1348, %1339 : i32, !llvm.ptr
          cf.br ^bb168
        ^bb170:
        cf.br ^bb167
      ^bb166:
        %1349 = llvm.load %1326 : !llvm.ptr -> i32
        %1350 = arith.constant 1 : i32
        %1351 = arith.cmpi eq, %1349, %1350 : i32
        cf.cond_br %1351, ^bb171, ^bb172
        ^bb171:
          %1352 = arith.constant 0 : i32
          %1353 = llvm.mlir.constant(1 : i64) : i64
          %1354 = llvm.alloca %1353 x i32 : (i64) -> !llvm.ptr
          llvm.store %1352, %1354 : i32, !llvm.ptr
          cf.br ^bb174
          ^bb174:
          %1355 = llvm.load %1354 : !llvm.ptr -> i32
          %1356 = arith.cmpi slt, %1355, %1176 : i32
          cf.cond_br %1356, ^bb175, ^bb176
          ^bb175:
            %1358 = llvm.load %1354 : !llvm.ptr -> i32
            %1359 = arith.extsi %1358 : i32 to i64
            %1360 = llvm.getelementptr %1205[%1359] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            %1357 = llvm.load %1360 : !llvm.ptr -> i32
            %1361 = llvm.load %1354 : !llvm.ptr -> i32
            %1362 = arith.extsi %1361 : i32 to i64
            %1363 = llvm.getelementptr %1330[%1362] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            llvm.store %1357, %1363 : i32, !llvm.ptr
            %1364 = llvm.load %1354 : !llvm.ptr -> i32
            %1365 = arith.constant 1 : i32
            %1366 = arith.addi %1364, %1365 : i32
            llvm.store %1366, %1354 : i32, !llvm.ptr
            cf.br ^bb174
          ^bb176:
          cf.br ^bb173
        ^bb172:
          %1367 = arith.constant 0 : i32
          %1368 = llvm.mlir.constant(1 : i64) : i64
          %1369 = llvm.alloca %1368 x i32 : (i64) -> !llvm.ptr
          llvm.store %1367, %1369 : i32, !llvm.ptr
          cf.br ^bb177
          ^bb177:
          %1370 = llvm.load %1369 : !llvm.ptr -> i32
          %1371 = arith.cmpi slt, %1370, %1176 : i32
          cf.cond_br %1371, ^bb178, ^bb179
          ^bb178:
            %1373 = llvm.load %1369 : !llvm.ptr -> i32
            %1374 = arith.extsi %1373 : i32 to i64
            %1375 = llvm.getelementptr %1205[%1374] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            %1372 = llvm.load %1375 : !llvm.ptr -> i32
            %1377 = llvm.load %1369 : !llvm.ptr -> i32
            %1378 = arith.extsi %1377 : i32 to i64
            %1379 = llvm.getelementptr %1209[%1378] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            %1376 = llvm.load %1379 : !llvm.ptr -> i32
            %1380 = arith.xori %1372, %1376 : i32
            %1381 = llvm.load %1369 : !llvm.ptr -> i32
            %1382 = arith.extsi %1381 : i32 to i64
            %1383 = llvm.getelementptr %1330[%1382] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            llvm.store %1380, %1383 : i32, !llvm.ptr
            %1384 = llvm.load %1369 : !llvm.ptr -> i32
            %1385 = arith.constant 1 : i32
            %1386 = arith.addi %1384, %1385 : i32
            llvm.store %1386, %1369 : i32, !llvm.ptr
            cf.br ^bb177
          ^bb179:
          cf.br ^bb173
        ^bb173:
        cf.br ^bb167
      ^bb167:
      %1388 = arith.extsi %1176 : i32 to i64
      %1389 = arith.constant 4 : i32
      %1390 = arith.extsi %1389 : i32 to i64
      %1387 = func.call @calloc(%1388, %1390) : (i64, i64) -> !llvm.ptr
      %1392 = arith.extsi %1176 : i32 to i64
      %1393 = arith.constant 4 : i32
      %1394 = arith.extsi %1393 : i32 to i64
      %1391 = func.call @calloc(%1392, %1394) : (i64, i64) -> !llvm.ptr
      %1395 = arith.constant 0 : i32
      %1396 = llvm.mlir.constant(1 : i64) : i64
      %1397 = llvm.alloca %1396 x i32 : (i64) -> !llvm.ptr
      llvm.store %1395, %1397 : i32, !llvm.ptr
      cf.br ^bb180
      ^bb180:
      %1398 = llvm.load %1397 : !llvm.ptr -> i32
      %1399 = arith.cmpi slt, %1398, %1176 : i32
      cf.cond_br %1399, ^bb181, ^bb182
      ^bb181:
        %1401 = llvm.load %1397 : !llvm.ptr -> i32
        %1402 = arith.extsi %1401 : i32 to i64
        %1403 = llvm.getelementptr %1330[%1402] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1400 = llvm.load %1403 : !llvm.ptr -> i32
        %1405 = llvm.load %1397 : !llvm.ptr -> i32
        %1406 = arith.constant 1 : i32
        %1407 = arith.addi %1405, %1406 : i32
        %1408 = arith.remsi %1407, %1176 : i32
        %1409 = arith.extsi %1408 : i32 to i64
        %1410 = llvm.getelementptr %1330[%1409] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1404 = llvm.load %1410 : !llvm.ptr -> i32
        %1411 = arith.xori %1400, %1404 : i32
        %1412 = llvm.load %1397 : !llvm.ptr -> i32
        %1413 = arith.extsi %1412 : i32 to i64
        %1414 = llvm.getelementptr %1387[%1413] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1411, %1414 : i32, !llvm.ptr
        %1416 = llvm.load %1397 : !llvm.ptr -> i32
        %1417 = arith.extsi %1416 : i32 to i64
        %1418 = llvm.getelementptr %1254[%1417] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1415 = llvm.load %1418 : !llvm.ptr -> i32
        %1420 = llvm.load %1397 : !llvm.ptr -> i32
        %1421 = arith.extsi %1420 : i32 to i64
        %1422 = llvm.getelementptr %1387[%1421] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1419 = llvm.load %1422 : !llvm.ptr -> i32
        %1423 = arith.xori %1415, %1419 : i32
        %1424 = llvm.load %1397 : !llvm.ptr -> i32
        %1425 = arith.extsi %1424 : i32 to i64
        %1426 = llvm.getelementptr %1391[%1425] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1423, %1426 : i32, !llvm.ptr
        %1427 = llvm.load %1397 : !llvm.ptr -> i32
        %1428 = arith.constant 1 : i32
        %1429 = arith.addi %1427, %1428 : i32
        llvm.store %1429, %1397 : i32, !llvm.ptr
        cf.br ^bb180
      ^bb182:
      %1431 = arith.extsi %1176 : i32 to i64
      %1432 = arith.constant 4 : i32
      %1433 = arith.extsi %1432 : i32 to i64
      %1430 = func.call @calloc(%1431, %1433) : (i64, i64) -> !llvm.ptr
      %1435 = arith.constant 1 : i32
      %1436 = arith.constant 4 : i32
      %1437 = arith.extsi %1435 : i32 to i64
      %1438 = arith.extsi %1436 : i32 to i64
      %1434 = func.call @calloc(%1437, %1438) : (i64, i64) -> !llvm.ptr
      func.call @findRotations(%1254, %1391, %1176, %1430, %1434) : (!llvm.ptr, !llvm.ptr, i32, !llvm.ptr, !llvm.ptr) -> ()
      %1441 = arith.constant 0 : i32
      %1442 = arith.extsi %1441 : i32 to i64
      %1443 = llvm.getelementptr %1434[%1442] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1440 = llvm.load %1443 : !llvm.ptr -> i32
      %1444 = arith.constant 0 : i32
      %1445 = llvm.mlir.constant(1 : i64) : i64
      %1446 = llvm.alloca %1445 x i32 : (i64) -> !llvm.ptr
      llvm.store %1444, %1446 : i32, !llvm.ptr
      cf.br ^bb183
      ^bb183:
      %1447 = llvm.load %1446 : !llvm.ptr -> i32
      %1448 = arith.cmpi slt, %1447, %1440 : i32
      cf.cond_br %1448, ^bb184, ^bb185
      ^bb184:
        %1450 = llvm.load %1446 : !llvm.ptr -> i32
        %1451 = arith.extsi %1450 : i32 to i64
        %1452 = llvm.getelementptr %1430[%1451] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1449 = llvm.load %1452 : !llvm.ptr -> i32
        %1453 = arith.constant 0 : i32
        %1454 = llvm.mlir.constant(1 : i64) : i64
        %1455 = llvm.alloca %1454 x i32 : (i64) -> !llvm.ptr
        llvm.store %1453, %1455 : i32, !llvm.ptr
        cf.br ^bb186
        ^bb186:
        %1456 = llvm.load %1455 : !llvm.ptr -> i32
        %1457 = arith.constant 2 : i32
        %1458 = arith.cmpi slt, %1456, %1457 : i32
        cf.cond_br %1458, ^bb187, ^bb188
        ^bb187:
          %1459 = llvm.load %1455 : !llvm.ptr -> i32
          %1460 = arith.muli %1459, %1176 : i32
          %1461 = arith.addi %1449, %1460 : i32
          %1463 = arith.extsi %1449 : i32 to i64
          %1464 = llvm.getelementptr %1290[%1463] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          %1462 = llvm.load %1464 : !llvm.ptr -> i32
          %1465 = llvm.load %1455 : !llvm.ptr -> i32
          %1466 = llvm.load %1260 : !llvm.ptr -> i32
          %1467 = arith.muli %1465, %1466 : i32
          %1468 = arith.xori %1462, %1467 : i32
          %1470 = arith.remsi %1461, %1176 : i32
          %1471 = arith.extsi %1470 : i32 to i64
          %1472 = llvm.getelementptr %1330[%1471] : (!llvm.ptr, i64) -> !llvm.ptr, i32
          %1469 = llvm.load %1472 : !llvm.ptr -> i32
          %1473 = arith.cmpi eq, %1468, %1469 : i32
          cf.cond_br %1473, ^bb189, ^bb190
          ^bb189:
            %1474 = arith.constant 3 : i32
            %1475 = arith.extsi %1461 : i32 to i64
            %1477 = arith.extsi %1474 : i32 to i64
            %1476 = arith.muli %1477, %1475 : i64
            %1478 = llvm.load %1326 : !llvm.ptr -> i32
            %1479 = arith.extsi %1478 : i32 to i64
            %1480 = arith.addi %1476, %1479 : i64
            %1481 = arith.remsi %1480, %1197 : i64
            %1483 = arith.constant 0 : i32
            %1484 = arith.extsi %1483 : i32 to i64
            %1485 = llvm.getelementptr %arg4[%1484] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            %1482 = llvm.load %1485 : !llvm.ptr -> i32
            %1486 = arith.extsi %1482 : i32 to i64
            %1487 = llvm.getelementptr %arg3[%1486] : (!llvm.ptr, i64) -> !llvm.ptr, i64
            llvm.store %1481, %1487 : i64, !llvm.ptr
            %1489 = arith.constant 0 : i32
            %1490 = arith.extsi %1489 : i32 to i64
            %1491 = llvm.getelementptr %arg4[%1490] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            %1488 = llvm.load %1491 : !llvm.ptr -> i32
            %1492 = arith.constant 1 : i32
            %1493 = arith.addi %1488, %1492 : i32
            %1494 = arith.constant 0 : i32
            %1495 = arith.extsi %1494 : i32 to i64
            %1496 = llvm.getelementptr %arg4[%1495] : (!llvm.ptr, i64) -> !llvm.ptr, i32
            llvm.store %1493, %1496 : i32, !llvm.ptr
            cf.br ^bb191
          ^bb190:
            cf.br ^bb191
          ^bb191:
          %1497 = llvm.load %1455 : !llvm.ptr -> i32
          %1498 = arith.constant 1 : i32
          %1499 = arith.addi %1497, %1498 : i32
          llvm.store %1499, %1455 : i32, !llvm.ptr
          cf.br ^bb186
        ^bb188:
        %1500 = llvm.load %1446 : !llvm.ptr -> i32
        %1501 = arith.constant 1 : i32
        %1502 = arith.addi %1500, %1501 : i32
        llvm.store %1502, %1446 : i32, !llvm.ptr
        cf.br ^bb183
      ^bb185:
      func.call @free(%1330) : (!llvm.ptr) -> ()
      func.call @free(%1387) : (!llvm.ptr) -> ()
      func.call @free(%1391) : (!llvm.ptr) -> ()
      func.call @free(%1430) : (!llvm.ptr) -> ()
      func.call @free(%1434) : (!llvm.ptr) -> ()
      %1508 = llvm.load %1326 : !llvm.ptr -> i32
      %1509 = arith.constant 1 : i32
      %1510 = arith.addi %1508, %1509 : i32
      llvm.store %1510, %1326 : i32, !llvm.ptr
      cf.br ^bb162
    ^bb164:
    %1513 = arith.constant 0 : i32
    %1514 = arith.extsi %1513 : i32 to i64
    %1515 = llvm.getelementptr %arg4[%1514] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    %1512 = llvm.load %1515 : !llvm.ptr -> i32
    func.call @sortI64(%arg3, %1512) : (!llvm.ptr, i32) -> ()
    %1516 = arith.constant 0 : i32
    %1517 = llvm.mlir.constant(1 : i64) : i64
    %1518 = llvm.alloca %1517 x i32 : (i64) -> !llvm.ptr
    llvm.store %1516, %1518 : i32, !llvm.ptr
    %1519 = arith.constant 0 : i32
    %1520 = llvm.mlir.constant(1 : i64) : i64
    %1521 = llvm.alloca %1520 x i32 : (i64) -> !llvm.ptr
    llvm.store %1519, %1521 : i32, !llvm.ptr
    cf.br ^bb192
    ^bb192:
    %1522 = llvm.load %1521 : !llvm.ptr -> i32
    %1524 = arith.constant 0 : i32
    %1525 = arith.extsi %1524 : i32 to i64
    %1526 = llvm.getelementptr %arg4[%1525] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    %1523 = llvm.load %1526 : !llvm.ptr -> i32
    %1527 = arith.cmpi slt, %1522, %1523 : i32
    cf.cond_br %1527, ^bb193, ^bb194
    ^bb193:
      %1528 = llvm.load %1518 : !llvm.ptr -> i32
      %1529 = arith.constant 0 : i32
      %1530 = arith.cmpi eq, %1528, %1529 : i32
      %1531 = scf.if %1530 -> (i1) {
        %1532 = arith.constant true
        scf.yield %1532 : i1
      } else {
        %1534 = llvm.load %1521 : !llvm.ptr -> i32
        %1535 = arith.extsi %1534 : i32 to i64
        %1536 = llvm.getelementptr %arg3[%1535] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1533 = llvm.load %1536 : !llvm.ptr -> i64
        %1538 = llvm.load %1518 : !llvm.ptr -> i32
        %1539 = arith.constant 1 : i32
        %1540 = arith.subi %1538, %1539 : i32
        %1541 = arith.extsi %1540 : i32 to i64
        %1542 = llvm.getelementptr %arg3[%1541] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1537 = llvm.load %1542 : !llvm.ptr -> i64
        %1543 = arith.cmpi ne, %1533, %1537 : i64
        scf.yield %1543 : i1
      }
      cf.cond_br %1531, ^bb195, ^bb196
      ^bb195:
        %1545 = llvm.load %1521 : !llvm.ptr -> i32
        %1546 = arith.extsi %1545 : i32 to i64
        %1547 = llvm.getelementptr %arg3[%1546] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1544 = llvm.load %1547 : !llvm.ptr -> i64
        %1548 = llvm.load %1518 : !llvm.ptr -> i32
        %1549 = arith.extsi %1548 : i32 to i64
        %1550 = llvm.getelementptr %arg3[%1549] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1544, %1550 : i64, !llvm.ptr
        %1551 = llvm.load %1518 : !llvm.ptr -> i32
        %1552 = arith.constant 1 : i32
        %1553 = arith.addi %1551, %1552 : i32
        llvm.store %1553, %1518 : i32, !llvm.ptr
        cf.br ^bb197
      ^bb196:
        cf.br ^bb197
      ^bb197:
      %1554 = llvm.load %1521 : !llvm.ptr -> i32
      %1555 = arith.constant 1 : i32
      %1556 = arith.addi %1554, %1555 : i32
      llvm.store %1556, %1521 : i32, !llvm.ptr
      cf.br ^bb192
    ^bb194:
    %1557 = llvm.load %1518 : !llvm.ptr -> i32
    %1558 = arith.constant 0 : i32
    %1559 = arith.extsi %1558 : i32 to i64
    %1560 = llvm.getelementptr %arg4[%1559] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %1557, %1560 : i32, !llvm.ptr
    func.call @free(%1205) : (!llvm.ptr) -> ()
    func.call @free(%1209) : (!llvm.ptr) -> ()
    func.call @free(%1213) : (!llvm.ptr) -> ()
    func.call @free(%1254) : (!llvm.ptr) -> ()
    func.call @free(%1290) : (!llvm.ptr) -> ()
    func.return
  }
  func.func @findIntervalIndex(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i32, %arg3: i64, %arg4: i64, %arg5: i64, %arg6: i32) -> i32 {
    %1566 = arith.constant 0 : i32
    %1567 = llvm.mlir.constant(1 : i64) : i64
    %1568 = llvm.alloca %1567 x i32 : (i64) -> !llvm.ptr
    llvm.store %1566, %1568 : i32, !llvm.ptr
    %1569 = llvm.mlir.constant(1 : i64) : i64
    %1570 = llvm.alloca %1569 x i32 : (i64) -> !llvm.ptr
    llvm.store %arg2, %1570 : i32, !llvm.ptr
    cf.br ^bb198
    ^bb198:
    %1571 = llvm.load %1568 : !llvm.ptr -> i32
    %1572 = arith.constant 1 : i32
    %1573 = arith.addi %1571, %1572 : i32
    %1574 = llvm.load %1570 : !llvm.ptr -> i32
    %1575 = arith.cmpi slt, %1573, %1574 : i32
    cf.cond_br %1575, ^bb199, ^bb200
    ^bb199:
      %1576 = llvm.load %1568 : !llvm.ptr -> i32
      %1577 = llvm.load %1570 : !llvm.ptr -> i32
      %1578 = arith.addi %1576, %1577 : i32
      %1579 = arith.constant 2 : i32
      %1580 = arith.divsi %1578, %1579 : i32
      %1583 = arith.extsi %1580 : i32 to i64
      %1584 = llvm.getelementptr %arg0[%1583] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1582 = llvm.load %1584 : !llvm.ptr -> i64
      %1586 = arith.extsi %1580 : i32 to i64
      %1587 = llvm.getelementptr %arg1[%1586] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1585 = llvm.load %1587 : !llvm.ptr -> i64
      %1581 = func.call @cmpPoints(%1582, %1585, %arg3, %arg4, %arg5, %arg6) : (i64, i64, i64, i64, i64, i32) -> i32
      %1588 = arith.constant 0 : i32
      %1589 = arith.cmpi sle, %1581, %1588 : i32
      cf.cond_br %1589, ^bb201, ^bb202
      ^bb201:
        llvm.store %1580, %1568 : i32, !llvm.ptr
        cf.br ^bb203
      ^bb202:
        llvm.store %1580, %1570 : i32, !llvm.ptr
        cf.br ^bb203
      ^bb203:
      cf.br ^bb198
    ^bb200:
    %1590 = llvm.load %1568 : !llvm.ptr -> i32
    func.return %1590 : i32
  }
  func.func @solvePermutation(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i32, %arg3: i32) -> i64 {
    %1592 = arith.extsi %arg2 : i32 to i64
    %1593 = arith.constant 4 : i32
    %1594 = arith.extsi %1593 : i32 to i64
    %1591 = func.call @calloc(%1592, %1594) : (i64, i64) -> !llvm.ptr
    %1595 = arith.constant 0 : i32
    %1596 = llvm.mlir.constant(1 : i64) : i64
    %1597 = llvm.alloca %1596 x i32 : (i64) -> !llvm.ptr
    llvm.store %1595, %1597 : i32, !llvm.ptr
    cf.br ^bb204
    ^bb204:
    %1598 = llvm.load %1597 : !llvm.ptr -> i32
    %1599 = arith.cmpi slt, %1598, %arg2 : i32
    cf.cond_br %1599, ^bb205, ^bb206
    ^bb205:
      %1600 = arith.constant 0 : i32
      %1601 = llvm.load %1597 : !llvm.ptr -> i32
      %1602 = arith.extsi %1601 : i32 to i64
      %1603 = llvm.getelementptr %1591[%1602] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1600, %1603 : i32, !llvm.ptr
      %1604 = llvm.load %1597 : !llvm.ptr -> i32
      %1605 = arith.constant 1 : i32
      %1606 = arith.addi %1604, %1605 : i32
      llvm.store %1606, %1597 : i32, !llvm.ptr
      cf.br ^bb204
    ^bb206:
    %1608 = arith.extsi %arg2 : i32 to i64
    %1609 = arith.constant 8 : i32
    %1610 = arith.extsi %1609 : i32 to i64
    %1607 = func.call @calloc(%1608, %1610) : (i64, i64) -> !llvm.ptr
    %1612 = arith.extsi %arg2 : i32 to i64
    %1613 = arith.constant 4 : i32
    %1614 = arith.extsi %1613 : i32 to i64
    %1611 = func.call @calloc(%1612, %1614) : (i64, i64) -> !llvm.ptr
    %1616 = arith.extsi %arg2 : i32 to i64
    %1617 = arith.constant 4 : i32
    %1618 = arith.extsi %1617 : i32 to i64
    %1615 = func.call @calloc(%1616, %1618) : (i64, i64) -> !llvm.ptr
    %1620 = arith.constant 2 : i32
    %1621 = arith.muli %1620, %arg2 : i32
    %1622 = arith.constant 1 : i32
    %1623 = arith.addi %1621, %1622 : i32
    %1624 = arith.extsi %1623 : i32 to i64
    %1625 = arith.constant 8 : i32
    %1626 = arith.extsi %1625 : i32 to i64
    %1619 = func.call @calloc(%1624, %1626) : (i64, i64) -> !llvm.ptr
    %1627 = arith.constant 0 : i32
    %1628 = llvm.mlir.constant(1 : i64) : i64
    %1629 = llvm.alloca %1628 x i32 : (i64) -> !llvm.ptr
    llvm.store %1627, %1629 : i32, !llvm.ptr
    %1630 = arith.constant 0 : i32
    %1631 = llvm.mlir.constant(1 : i64) : i64
    %1632 = llvm.alloca %1631 x i32 : (i64) -> !llvm.ptr
    llvm.store %1630, %1632 : i32, !llvm.ptr
    %1633 = arith.constant 0 : i32
    %1634 = llvm.mlir.constant(1 : i64) : i64
    %1635 = llvm.alloca %1634 x i32 : (i64) -> !llvm.ptr
    llvm.store %1633, %1635 : i32, !llvm.ptr
    cf.br ^bb207
    ^bb207:
    %1636 = llvm.load %1635 : !llvm.ptr -> i32
    %1637 = arith.cmpi slt, %1636, %arg2 : i32
    cf.cond_br %1637, ^bb208, ^bb209
    ^bb208:
      %1639 = llvm.load %1635 : !llvm.ptr -> i32
      %1640 = arith.extsi %1639 : i32 to i64
      %1641 = llvm.getelementptr %1591[%1640] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1638 = llvm.load %1641 : !llvm.ptr -> i32
      %1642 = arith.constant 0 : i32
      %1643 = arith.cmpi ne, %1638, %1642 : i32
      cf.cond_br %1643, ^bb210, ^bb211
      ^bb210:
        %1644 = llvm.load %1635 : !llvm.ptr -> i32
        %1645 = arith.constant 1 : i32
        %1646 = arith.addi %1644, %1645 : i32
        llvm.store %1646, %1635 : i32, !llvm.ptr
        cf.br ^bb207
      ^bb211:
        cf.br ^bb212
      ^bb212:
      %1648 = arith.extsi %arg2 : i32 to i64
      %1649 = arith.constant 4 : i32
      %1650 = arith.extsi %1649 : i32 to i64
      %1647 = func.call @calloc(%1648, %1650) : (i64, i64) -> !llvm.ptr
      %1651 = arith.constant 0 : i32
      %1652 = llvm.mlir.constant(1 : i64) : i64
      %1653 = llvm.alloca %1652 x i32 : (i64) -> !llvm.ptr
      llvm.store %1651, %1653 : i32, !llvm.ptr
      %1654 = llvm.load %1635 : !llvm.ptr -> i32
      %1655 = llvm.mlir.constant(1 : i64) : i64
      %1656 = llvm.alloca %1655 x i32 : (i64) -> !llvm.ptr
      llvm.store %1654, %1656 : i32, !llvm.ptr
      cf.br ^bb213
      ^bb213:
      %1658 = llvm.load %1656 : !llvm.ptr -> i32
      %1659 = arith.extsi %1658 : i32 to i64
      %1660 = llvm.getelementptr %1591[%1659] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1657 = llvm.load %1660 : !llvm.ptr -> i32
      %1661 = arith.constant 0 : i32
      %1662 = arith.cmpi eq, %1657, %1661 : i32
      cf.cond_br %1662, ^bb214, ^bb215
      ^bb214:
        %1663 = arith.constant 1 : i32
        %1664 = llvm.load %1656 : !llvm.ptr -> i32
        %1665 = arith.extsi %1664 : i32 to i64
        %1666 = llvm.getelementptr %1591[%1665] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1663, %1666 : i32, !llvm.ptr
        %1667 = llvm.load %1656 : !llvm.ptr -> i32
        %1668 = llvm.load %1653 : !llvm.ptr -> i32
        %1669 = arith.extsi %1668 : i32 to i64
        %1670 = llvm.getelementptr %1647[%1669] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1667, %1670 : i32, !llvm.ptr
        %1671 = llvm.load %1653 : !llvm.ptr -> i32
        %1672 = arith.constant 1 : i32
        %1673 = arith.addi %1671, %1672 : i32
        llvm.store %1673, %1653 : i32, !llvm.ptr
        %1675 = llvm.load %1656 : !llvm.ptr -> i32
        %1676 = arith.extsi %1675 : i32 to i64
        %1677 = llvm.getelementptr %arg0[%1676] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1674 = llvm.load %1677 : !llvm.ptr -> i32
        llvm.store %1674, %1656 : i32, !llvm.ptr
        cf.br ^bb213
      ^bb215:
      %1678 = arith.constant 0 : i32
      %1679 = llvm.mlir.constant(1 : i64) : i64
      %1680 = llvm.alloca %1679 x i32 : (i64) -> !llvm.ptr
      llvm.store %1678, %1680 : i32, !llvm.ptr
      %1681 = arith.constant 0 : i32
      %1682 = llvm.mlir.constant(1 : i64) : i64
      %1683 = llvm.alloca %1682 x i32 : (i64) -> !llvm.ptr
      llvm.store %1681, %1683 : i32, !llvm.ptr
      cf.br ^bb216
      ^bb216:
      %1684 = llvm.load %1683 : !llvm.ptr -> i32
      %1685 = llvm.load %1653 : !llvm.ptr -> i32
      %1686 = arith.cmpi slt, %1684, %1685 : i32
      cf.cond_br %1686, ^bb217, ^bb218
      ^bb217:
        %1688 = llvm.load %1683 : !llvm.ptr -> i32
        %1689 = arith.extsi %1688 : i32 to i64
        %1690 = llvm.getelementptr %1647[%1689] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1687 = llvm.load %1690 : !llvm.ptr -> i32
        %1691 = arith.cmpi slt, %1687, %arg3 : i32
        cf.cond_br %1691, ^bb219, ^bb220
        ^bb219:
          %1692 = llvm.load %1683 : !llvm.ptr -> i32
          llvm.store %1692, %1680 : i32, !llvm.ptr
          cf.br ^bb218
        ^bb220:
          cf.br ^bb221
        ^bb221:
        %1693 = llvm.load %1683 : !llvm.ptr -> i32
        %1694 = arith.constant 1 : i32
        %1695 = arith.addi %1693, %1694 : i32
        llvm.store %1695, %1683 : i32, !llvm.ptr
        cf.br ^bb216
      ^bb218:
      %1697 = llvm.load %1653 : !llvm.ptr -> i32
      %1698 = arith.extsi %1697 : i32 to i64
      %1699 = arith.constant 4 : i32
      %1700 = arith.extsi %1699 : i32 to i64
      %1696 = func.call @calloc(%1698, %1700) : (i64, i64) -> !llvm.ptr
      %1701 = arith.constant 0 : i32
      %1702 = llvm.mlir.constant(1 : i64) : i64
      %1703 = llvm.alloca %1702 x i32 : (i64) -> !llvm.ptr
      llvm.store %1701, %1703 : i32, !llvm.ptr
      cf.br ^bb222
      ^bb222:
      %1704 = llvm.load %1703 : !llvm.ptr -> i32
      %1705 = llvm.load %1653 : !llvm.ptr -> i32
      %1706 = arith.cmpi slt, %1704, %1705 : i32
      cf.cond_br %1706, ^bb223, ^bb224
      ^bb223:
        %1709 = llvm.load %1680 : !llvm.ptr -> i32
        %1710 = llvm.load %1703 : !llvm.ptr -> i32
        %1711 = arith.addi %1709, %1710 : i32
        %1712 = llvm.load %1653 : !llvm.ptr -> i32
        %1713 = arith.remsi %1711, %1712 : i32
        %1714 = arith.extsi %1713 : i32 to i64
        %1715 = llvm.getelementptr %1647[%1714] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1708 = llvm.load %1715 : !llvm.ptr -> i32
        %1716 = arith.extsi %1708 : i32 to i64
        %1717 = llvm.getelementptr %arg1[%1716] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1707 = llvm.load %1717 : !llvm.ptr -> i32
        %1718 = llvm.load %1703 : !llvm.ptr -> i32
        %1719 = arith.extsi %1718 : i32 to i64
        %1720 = llvm.getelementptr %1696[%1719] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1707, %1720 : i32, !llvm.ptr
        %1721 = llvm.load %1703 : !llvm.ptr -> i32
        %1722 = arith.constant 1 : i32
        %1723 = arith.addi %1721, %1722 : i32
        llvm.store %1723, %1703 : i32, !llvm.ptr
        cf.br ^bb222
      ^bb224:
      %1725 = arith.constant 1 : i32
      %1726 = arith.constant 8 : i32
      %1727 = arith.extsi %1725 : i32 to i64
      %1728 = arith.extsi %1726 : i32 to i64
      %1724 = func.call @calloc(%1727, %1728) : (i64, i64) -> !llvm.ptr
      %1730 = arith.constant 2 : i32
      %1731 = llvm.load %1653 : !llvm.ptr -> i32
      %1732 = arith.muli %1730, %1731 : i32
      %1733 = arith.constant 1 : i32
      %1734 = arith.addi %1732, %1733 : i32
      %1735 = arith.extsi %1734 : i32 to i64
      %1736 = arith.constant 8 : i32
      %1737 = arith.extsi %1736 : i32 to i64
      %1729 = func.call @calloc(%1735, %1737) : (i64, i64) -> !llvm.ptr
      %1739 = arith.constant 1 : i32
      %1740 = arith.constant 4 : i32
      %1741 = arith.extsi %1739 : i32 to i64
      %1742 = arith.extsi %1740 : i32 to i64
      %1738 = func.call @calloc(%1741, %1742) : (i64, i64) -> !llvm.ptr
      %1744 = llvm.load %1653 : !llvm.ptr -> i32
      func.call @cycleConstraint(%1696, %1744, %1724, %1729, %1738) : (!llvm.ptr, i32, !llvm.ptr, !llvm.ptr, !llvm.ptr) -> ()
      %1746 = arith.constant 0 : i32
      %1747 = arith.extsi %1746 : i32 to i64
      %1748 = llvm.getelementptr %1724[%1747] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1745 = llvm.load %1748 : !llvm.ptr -> i64
      %1749 = llvm.load %1632 : !llvm.ptr -> i32
      %1750 = arith.extsi %1749 : i32 to i64
      %1751 = llvm.getelementptr %1607[%1750] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1745, %1751 : i64, !llvm.ptr
      %1752 = llvm.load %1629 : !llvm.ptr -> i32
      %1753 = llvm.load %1632 : !llvm.ptr -> i32
      %1754 = arith.extsi %1753 : i32 to i64
      %1755 = llvm.getelementptr %1611[%1754] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1752, %1755 : i32, !llvm.ptr
      %1757 = arith.constant 0 : i32
      %1758 = arith.extsi %1757 : i32 to i64
      %1759 = llvm.getelementptr %1738[%1758] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1756 = llvm.load %1759 : !llvm.ptr -> i32
      %1760 = llvm.load %1632 : !llvm.ptr -> i32
      %1761 = arith.extsi %1760 : i32 to i64
      %1762 = llvm.getelementptr %1615[%1761] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1756, %1762 : i32, !llvm.ptr
      %1763 = arith.constant 0 : i32
      %1764 = llvm.mlir.constant(1 : i64) : i64
      %1765 = llvm.alloca %1764 x i32 : (i64) -> !llvm.ptr
      llvm.store %1763, %1765 : i32, !llvm.ptr
      cf.br ^bb225
      ^bb225:
      %1766 = llvm.load %1765 : !llvm.ptr -> i32
      %1768 = arith.constant 0 : i32
      %1769 = arith.extsi %1768 : i32 to i64
      %1770 = llvm.getelementptr %1738[%1769] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1767 = llvm.load %1770 : !llvm.ptr -> i32
      %1771 = arith.cmpi slt, %1766, %1767 : i32
      cf.cond_br %1771, ^bb226, ^bb227
      ^bb226:
        %1773 = llvm.load %1765 : !llvm.ptr -> i32
        %1774 = arith.extsi %1773 : i32 to i64
        %1775 = llvm.getelementptr %1729[%1774] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1772 = llvm.load %1775 : !llvm.ptr -> i64
        %1776 = llvm.load %1629 : !llvm.ptr -> i32
        %1777 = arith.extsi %1776 : i32 to i64
        %1778 = llvm.getelementptr %1619[%1777] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1772, %1778 : i64, !llvm.ptr
        %1779 = llvm.load %1629 : !llvm.ptr -> i32
        %1780 = arith.constant 1 : i32
        %1781 = arith.addi %1779, %1780 : i32
        llvm.store %1781, %1629 : i32, !llvm.ptr
        %1782 = llvm.load %1765 : !llvm.ptr -> i32
        %1783 = arith.constant 1 : i32
        %1784 = arith.addi %1782, %1783 : i32
        llvm.store %1784, %1765 : i32, !llvm.ptr
        cf.br ^bb225
      ^bb227:
      %1785 = llvm.load %1632 : !llvm.ptr -> i32
      %1786 = arith.constant 1 : i32
      %1787 = arith.addi %1785, %1786 : i32
      llvm.store %1787, %1632 : i32, !llvm.ptr
      func.call @free(%1647) : (!llvm.ptr) -> ()
      func.call @free(%1696) : (!llvm.ptr) -> ()
      func.call @free(%1724) : (!llvm.ptr) -> ()
      func.call @free(%1729) : (!llvm.ptr) -> ()
      func.call @free(%1738) : (!llvm.ptr) -> ()
      %1793 = llvm.load %1635 : !llvm.ptr -> i32
      %1794 = arith.constant 1 : i32
      %1795 = arith.addi %1793, %1794 : i32
      llvm.store %1795, %1635 : i32, !llvm.ptr
      cf.br ^bb207
    ^bb209:
    %1796 = arith.constant 1 : i32
    %1797 = llvm.mlir.constant(1 : i64) : i64
    %1798 = llvm.alloca %1797 x i32 : (i64) -> !llvm.ptr
    llvm.store %1796, %1798 : i32, !llvm.ptr
    cf.br ^bb228
    ^bb228:
    %1799 = llvm.load %1798 : !llvm.ptr -> i32
    %1800 = llvm.load %1632 : !llvm.ptr -> i32
    %1801 = arith.cmpi slt, %1799, %1800 : i32
    cf.cond_br %1801, ^bb229, ^bb230
    ^bb229:
      %1803 = llvm.load %1798 : !llvm.ptr -> i32
      %1804 = arith.extsi %1803 : i32 to i64
      %1805 = llvm.getelementptr %1607[%1804] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1802 = llvm.load %1805 : !llvm.ptr -> i64
      %1807 = llvm.load %1798 : !llvm.ptr -> i32
      %1808 = arith.extsi %1807 : i32 to i64
      %1809 = llvm.getelementptr %1611[%1808] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1806 = llvm.load %1809 : !llvm.ptr -> i32
      %1811 = llvm.load %1798 : !llvm.ptr -> i32
      %1812 = arith.extsi %1811 : i32 to i64
      %1813 = llvm.getelementptr %1615[%1812] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1810 = llvm.load %1813 : !llvm.ptr -> i32
      %1814 = llvm.load %1798 : !llvm.ptr -> i32
      %1815 = llvm.mlir.constant(1 : i64) : i64
      %1816 = llvm.alloca %1815 x i32 : (i64) -> !llvm.ptr
      llvm.store %1814, %1816 : i32, !llvm.ptr
      cf.br ^bb231
      ^bb231:
      %1817 = llvm.load %1816 : !llvm.ptr -> i32
      %1818 = arith.constant 0 : i32
      %1819 = arith.cmpi sgt, %1817, %1818 : i32
      %1820 = scf.if %1819 -> (i1) {
        %1822 = llvm.load %1816 : !llvm.ptr -> i32
        %1823 = arith.constant 1 : i32
        %1824 = arith.subi %1822, %1823 : i32
        %1825 = arith.extsi %1824 : i32 to i64
        %1826 = llvm.getelementptr %1607[%1825] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1821 = llvm.load %1826 : !llvm.ptr -> i64
        %1827 = arith.cmpi sgt, %1821, %1802 : i64
        scf.yield %1827 : i1
      } else {
        %1828 = arith.constant false
        scf.yield %1828 : i1
      }
      cf.cond_br %1820, ^bb232, ^bb233
      ^bb232:
        %1830 = llvm.load %1816 : !llvm.ptr -> i32
        %1831 = arith.constant 1 : i32
        %1832 = arith.subi %1830, %1831 : i32
        %1833 = arith.extsi %1832 : i32 to i64
        %1834 = llvm.getelementptr %1607[%1833] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1829 = llvm.load %1834 : !llvm.ptr -> i64
        %1835 = llvm.load %1816 : !llvm.ptr -> i32
        %1836 = arith.extsi %1835 : i32 to i64
        %1837 = llvm.getelementptr %1607[%1836] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1829, %1837 : i64, !llvm.ptr
        %1839 = llvm.load %1816 : !llvm.ptr -> i32
        %1840 = arith.constant 1 : i32
        %1841 = arith.subi %1839, %1840 : i32
        %1842 = arith.extsi %1841 : i32 to i64
        %1843 = llvm.getelementptr %1611[%1842] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1838 = llvm.load %1843 : !llvm.ptr -> i32
        %1844 = llvm.load %1816 : !llvm.ptr -> i32
        %1845 = arith.extsi %1844 : i32 to i64
        %1846 = llvm.getelementptr %1611[%1845] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1838, %1846 : i32, !llvm.ptr
        %1848 = llvm.load %1816 : !llvm.ptr -> i32
        %1849 = arith.constant 1 : i32
        %1850 = arith.subi %1848, %1849 : i32
        %1851 = arith.extsi %1850 : i32 to i64
        %1852 = llvm.getelementptr %1615[%1851] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1847 = llvm.load %1852 : !llvm.ptr -> i32
        %1853 = llvm.load %1816 : !llvm.ptr -> i32
        %1854 = arith.extsi %1853 : i32 to i64
        %1855 = llvm.getelementptr %1615[%1854] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1847, %1855 : i32, !llvm.ptr
        %1856 = llvm.load %1816 : !llvm.ptr -> i32
        %1857 = arith.constant 1 : i32
        %1858 = arith.subi %1856, %1857 : i32
        llvm.store %1858, %1816 : i32, !llvm.ptr
        cf.br ^bb231
      ^bb233:
      %1859 = llvm.load %1816 : !llvm.ptr -> i32
      %1860 = arith.extsi %1859 : i32 to i64
      %1861 = llvm.getelementptr %1607[%1860] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1802, %1861 : i64, !llvm.ptr
      %1862 = llvm.load %1816 : !llvm.ptr -> i32
      %1863 = arith.extsi %1862 : i32 to i64
      %1864 = llvm.getelementptr %1611[%1863] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1806, %1864 : i32, !llvm.ptr
      %1865 = llvm.load %1816 : !llvm.ptr -> i32
      %1866 = arith.extsi %1865 : i32 to i64
      %1867 = llvm.getelementptr %1615[%1866] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1810, %1867 : i32, !llvm.ptr
      %1868 = llvm.load %1798 : !llvm.ptr -> i32
      %1869 = arith.constant 1 : i32
      %1870 = arith.addi %1868, %1869 : i32
      llvm.store %1870, %1798 : i32, !llvm.ptr
      cf.br ^bb228
    ^bb230:
    %1872 = arith.constant 1000000 : i32
    %1873 = arith.constant 8 : i32
    %1874 = arith.extsi %1872 : i32 to i64
    %1875 = arith.extsi %1873 : i32 to i64
    %1871 = func.call @calloc(%1874, %1875) : (i64, i64) -> !llvm.ptr
    %1876 = arith.constant 0 : i32
    %1877 = arith.constant 0 : i32
    %1878 = arith.extsi %1876 : i32 to i64
    %1879 = arith.extsi %1877 : i32 to i64
    %1880 = llvm.getelementptr %1871[%1879] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1878, %1880 : i64, !llvm.ptr
    %1882 = arith.constant 1 : i32
    %1883 = arith.constant 4 : i32
    %1884 = arith.extsi %1882 : i32 to i64
    %1885 = arith.extsi %1883 : i32 to i64
    %1881 = func.call @calloc(%1884, %1885) : (i64, i64) -> !llvm.ptr
    %1886 = arith.constant 1 : i32
    %1887 = arith.constant 0 : i32
    %1888 = arith.extsi %1887 : i32 to i64
    %1889 = llvm.getelementptr %1881[%1888] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    llvm.store %1886, %1889 : i32, !llvm.ptr
    %1891 = arith.constant 1 : i32
    %1892 = arith.constant 8 : i32
    %1893 = arith.extsi %1891 : i32 to i64
    %1894 = arith.extsi %1892 : i32 to i64
    %1890 = func.call @calloc(%1893, %1894) : (i64, i64) -> !llvm.ptr
    %1895 = arith.constant 1 : i32
    %1896 = arith.constant 0 : i32
    %1897 = arith.extsi %1895 : i32 to i64
    %1898 = arith.extsi %1896 : i32 to i64
    %1899 = llvm.getelementptr %1890[%1898] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %1897, %1899 : i64, !llvm.ptr
    %1900 = arith.constant 0 : i32
    llvm.store %1900, %1798 : i32, !llvm.ptr
    cf.br ^bb234
    ^bb234:
    %1901 = llvm.load %1798 : !llvm.ptr -> i32
    %1902 = llvm.load %1632 : !llvm.ptr -> i32
    %1903 = arith.cmpi slt, %1901, %1902 : i32
    cf.cond_br %1903, ^bb235, ^bb236
    ^bb235:
      %1905 = llvm.load %1798 : !llvm.ptr -> i32
      %1906 = arith.extsi %1905 : i32 to i64
      %1907 = llvm.getelementptr %1615[%1906] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %1904 = llvm.load %1907 : !llvm.ptr -> i32
      %1909 = arith.extsi %1904 : i32 to i64
      %1910 = arith.constant 1 : i32
      %1912 = arith.extsi %1910 : i32 to i64
      %1911 = arith.addi %1909, %1912 : i64
      %1913 = arith.constant 8 : i32
      %1914 = arith.extsi %1913 : i32 to i64
      %1908 = func.call @calloc(%1911, %1914) : (i64, i64) -> !llvm.ptr
      %1915 = arith.constant 0 : i32
      %1916 = llvm.mlir.constant(1 : i64) : i64
      %1917 = llvm.alloca %1916 x i32 : (i64) -> !llvm.ptr
      llvm.store %1915, %1917 : i32, !llvm.ptr
      cf.br ^bb237
      ^bb237:
      %1918 = llvm.load %1917 : !llvm.ptr -> i32
      %1919 = arith.cmpi slt, %1918, %1904 : i32
      cf.cond_br %1919, ^bb238, ^bb239
      ^bb238:
        %1922 = llvm.load %1798 : !llvm.ptr -> i32
        %1923 = arith.extsi %1922 : i32 to i64
        %1924 = llvm.getelementptr %1611[%1923] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1921 = llvm.load %1924 : !llvm.ptr -> i32
        %1925 = llvm.load %1917 : !llvm.ptr -> i32
        %1926 = arith.addi %1921, %1925 : i32
        %1927 = arith.extsi %1926 : i32 to i64
        %1928 = llvm.getelementptr %1619[%1927] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1920 = llvm.load %1928 : !llvm.ptr -> i64
        %1929 = llvm.load %1917 : !llvm.ptr -> i32
        %1930 = arith.extsi %1929 : i32 to i64
        %1931 = llvm.getelementptr %1908[%1930] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1920, %1931 : i64, !llvm.ptr
        %1932 = llvm.load %1917 : !llvm.ptr -> i32
        %1933 = arith.constant 1 : i32
        %1934 = arith.addi %1932, %1933 : i32
        llvm.store %1934, %1917 : i32, !llvm.ptr
        cf.br ^bb237
      ^bb239:
      %1937 = llvm.load %1798 : !llvm.ptr -> i32
      %1938 = arith.extsi %1937 : i32 to i64
      %1939 = llvm.getelementptr %1607[%1938] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1936 = llvm.load %1939 : !llvm.ptr -> i64
      func.call @mergeCRT(%1871, %1881, %1890, %1908, %1904, %1936) : (!llvm.ptr, !llvm.ptr, !llvm.ptr, !llvm.ptr, i32, i64) -> ()
      func.call @free(%1908) : (!llvm.ptr) -> ()
      %1941 = llvm.load %1798 : !llvm.ptr -> i32
      %1942 = arith.constant 1 : i32
      %1943 = arith.addi %1941, %1942 : i32
      llvm.store %1943, %1798 : i32, !llvm.ptr
      cf.br ^bb234
    ^bb236:
    %1944 = arith.constant 9223372032559808511 : i32
    %1945 = arith.extsi %1944 : i32 to i64
    %1946 = llvm.mlir.constant(1 : i64) : i64
    %1947 = llvm.alloca %1946 x i64 : (i64) -> !llvm.ptr
    llvm.store %1945, %1947 : i64, !llvm.ptr
    %1948 = arith.constant 0 : i32
    %1949 = llvm.mlir.constant(1 : i64) : i64
    %1950 = llvm.alloca %1949 x i32 : (i64) -> !llvm.ptr
    llvm.store %1948, %1950 : i32, !llvm.ptr
    cf.br ^bb240
    ^bb240:
    %1951 = llvm.load %1950 : !llvm.ptr -> i32
    %1953 = arith.constant 0 : i32
    %1954 = arith.extsi %1953 : i32 to i64
    %1955 = llvm.getelementptr %1881[%1954] : (!llvm.ptr, i64) -> !llvm.ptr, i32
    %1952 = llvm.load %1955 : !llvm.ptr -> i32
    %1956 = arith.cmpi slt, %1951, %1952 : i32
    cf.cond_br %1956, ^bb241, ^bb242
    ^bb241:
      %1958 = llvm.load %1950 : !llvm.ptr -> i32
      %1959 = arith.extsi %1958 : i32 to i64
      %1960 = llvm.getelementptr %1871[%1959] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1957 = llvm.load %1960 : !llvm.ptr -> i64
      %1961 = arith.constant 0 : i32
      %1963 = arith.extsi %1961 : i32 to i64
      %1962 = arith.cmpi ne, %1957, %1963 : i64
      %1964 = scf.if %1962 -> (i1) {
        %1966 = llvm.load %1950 : !llvm.ptr -> i32
        %1967 = arith.extsi %1966 : i32 to i64
        %1968 = llvm.getelementptr %1871[%1967] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1965 = llvm.load %1968 : !llvm.ptr -> i64
        %1969 = llvm.load %1947 : !llvm.ptr -> i64
        %1970 = arith.cmpi slt, %1965, %1969 : i64
        scf.yield %1970 : i1
      } else {
        %1971 = arith.constant false
        scf.yield %1971 : i1
      }
      cf.cond_br %1964, ^bb243, ^bb244
      ^bb243:
        %1973 = llvm.load %1950 : !llvm.ptr -> i32
        %1974 = arith.extsi %1973 : i32 to i64
        %1975 = llvm.getelementptr %1871[%1974] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1972 = llvm.load %1975 : !llvm.ptr -> i64
        llvm.store %1972, %1947 : i64, !llvm.ptr
        cf.br ^bb245
      ^bb244:
        cf.br ^bb245
      ^bb245:
      %1976 = llvm.load %1950 : !llvm.ptr -> i32
      %1977 = arith.constant 1 : i32
      %1978 = arith.addi %1976, %1977 : i32
      llvm.store %1978, %1950 : i32, !llvm.ptr
      cf.br ^bb240
    ^bb242:
    %1979 = llvm.load %1947 : !llvm.ptr -> i64
    %1980 = arith.constant 9223372032559808511 : i32
    %1982 = arith.extsi %1980 : i32 to i64
    %1981 = arith.cmpi eq, %1979, %1982 : i64
    cf.cond_br %1981, ^bb246, ^bb247
    ^bb246:
      %1984 = arith.constant 0 : i32
      %1985 = arith.extsi %1984 : i32 to i64
      %1986 = llvm.getelementptr %1890[%1985] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1983 = llvm.load %1986 : !llvm.ptr -> i64
      llvm.store %1983, %1947 : i64, !llvm.ptr
      cf.br ^bb248
    ^bb247:
      cf.br ^bb248
    ^bb248:
    func.call @free(%1591) : (!llvm.ptr) -> ()
    func.call @free(%1607) : (!llvm.ptr) -> ()
    func.call @free(%1611) : (!llvm.ptr) -> ()
    func.call @free(%1615) : (!llvm.ptr) -> ()
    func.call @free(%1619) : (!llvm.ptr) -> ()
    func.call @free(%1871) : (!llvm.ptr) -> ()
    func.call @free(%1881) : (!llvm.ptr) -> ()
    func.call @free(%1890) : (!llvm.ptr) -> ()
    %1995 = llvm.load %1947 : !llvm.ptr -> i64
    func.return %1995 : i64
  }
  func.func @isSquare(%arg0: i32) -> i1 {
    %1997 = arith.sitofp %arg0 : i32 to f64
    %1998 = math.sqrt %1997 : f64
    %1996 = func.call @llround(%1998) : (f64) -> i64
    %1999 = arith.trunci %1996 : i64 to i32
    %2000 = arith.muli %1999, %1999 : i32
    %2001 = arith.cmpi eq, %2000, %arg0 : i32
    func.return %2001 : i1
  }
  func.func @F_square(%arg0: i32, %arg1: i32, %arg2: i32) -> i64 {
    %2003 = arith.sitofp %arg2 : i32 to f64
    %2004 = math.sqrt %2003 : f64
    %2002 = func.call @llround(%2004) : (f64) -> i64
    %2005 = arith.trunci %2002 : i64 to i32
    %2006 = arith.constant 1 : i32
    %2007 = arith.extsi %2006 : i32 to i64
    %2008 = llvm.mlir.constant(1 : i64) : i64
    %2009 = llvm.alloca %2008 x i64 : (i64) -> !llvm.ptr
    llvm.store %2007, %2009 : i64, !llvm.ptr
    %2011 = llvm.load %2009 : !llvm.ptr -> i64
    %2012 = arith.extsi %arg0 : i32 to i64
    %2010 = func.call @lllcm(%2011, %2012) : (i64, i64) -> i64
    llvm.store %2010, %2009 : i64, !llvm.ptr
    %2014 = llvm.load %2009 : !llvm.ptr -> i64
    %2015 = arith.extsi %arg1 : i32 to i64
    %2013 = func.call @lllcm(%2014, %2015) : (i64, i64) -> i64
    llvm.store %2013, %2009 : i64, !llvm.ptr
    %2017 = llvm.load %2009 : !llvm.ptr -> i64
    %2018 = arith.extsi %2005 : i32 to i64
    %2016 = func.call @lllcm(%2017, %2018) : (i64, i64) -> i64
    llvm.store %2016, %2009 : i64, !llvm.ptr
    %2019 = llvm.load %2009 : !llvm.ptr -> i64
    %2020 = arith.extsi %arg0 : i32 to i64
    %2021 = arith.divsi %2019, %2020 : i64
    %2022 = llvm.load %2009 : !llvm.ptr -> i64
    %2023 = arith.extsi %arg1 : i32 to i64
    %2024 = arith.divsi %2022, %2023 : i64
    %2025 = llvm.load %2009 : !llvm.ptr -> i64
    %2026 = arith.extsi %2005 : i32 to i64
    %2027 = arith.divsi %2025, %2026 : i64
    %2028 = llvm.load %2009 : !llvm.ptr -> i64
    %2029 = arith.trunci %2028 : i64 to i32
    %2030 = arith.constant 3 : i32
    %2031 = arith.muli %2030, %2029 : i32
    %2033 = arith.extsi %2031 : i32 to i64
    %2034 = arith.constant 4 : i32
    %2035 = arith.extsi %2034 : i32 to i64
    %2032 = func.call @calloc(%2033, %2035) : (i64, i64) -> !llvm.ptr
    %2037 = arith.extsi %2031 : i32 to i64
    %2038 = arith.constant 4 : i32
    %2039 = arith.extsi %2038 : i32 to i64
    %2036 = func.call @calloc(%2037, %2039) : (i64, i64) -> !llvm.ptr
    %2041 = llvm.mlir.constant(1 : i64) : i64
    %2042 = llvm.alloca %2041 x !llvm.array<3 x i64> : (i64) -> !llvm.ptr
    %2043 = llvm.mlir.zero : !llvm.array<3 x i64>
    llvm.store %2043, %2042 : !llvm.array<3 x i64>, !llvm.ptr
    %2044 = llvm.mlir.constant(0 : i64) : i64
    %2045 = llvm.getelementptr %2042[0, %2044] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2021, %2045 : i64, !llvm.ptr
    %2046 = llvm.mlir.constant(1 : i64) : i64
    %2047 = llvm.getelementptr %2042[0, %2046] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2024, %2047 : i64, !llvm.ptr
    %2048 = llvm.mlir.constant(2 : i64) : i64
    %2049 = llvm.getelementptr %2042[0, %2048] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2027, %2049 : i64, !llvm.ptr
    %2050 = arith.constant 0 : i32
    %2051 = llvm.mlir.constant(1 : i64) : i64
    %2052 = llvm.alloca %2051 x i32 : (i64) -> !llvm.ptr
    llvm.store %2050, %2052 : i32, !llvm.ptr
    cf.br ^bb249
    ^bb249:
    %2053 = llvm.load %2052 : !llvm.ptr -> i32
    %2054 = arith.constant 3 : i32
    %2055 = arith.cmpi slt, %2053, %2054 : i32
    cf.cond_br %2055, ^bb250, ^bb251
    ^bb250:
      %2057 = llvm.load %2052 : !llvm.ptr -> i32
      %2058 = arith.extsi %2057 : i32 to i64
      %2059 = llvm.getelementptr %2042[0, %2058] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
      %2056 = llvm.load %2059 : !llvm.ptr -> i64
      %2060 = arith.constant 0 : i32
      %2061 = llvm.mlir.constant(1 : i64) : i64
      %2062 = llvm.alloca %2061 x i32 : (i64) -> !llvm.ptr
      llvm.store %2060, %2062 : i32, !llvm.ptr
      cf.br ^bb252
      ^bb252:
      %2063 = llvm.load %2062 : !llvm.ptr -> i32
      %2064 = arith.cmpi slt, %2063, %2029 : i32
      cf.cond_br %2064, ^bb253, ^bb254
      ^bb253:
        %2065 = arith.constant 0 : i32
        %2066 = llvm.mlir.constant(1 : i64) : i64
        %2067 = llvm.alloca %2066 x i32 : (i64) -> !llvm.ptr
        llvm.store %2065, %2067 : i32, !llvm.ptr
        %2068 = arith.constant 0 : i32
        %2069 = llvm.mlir.constant(1 : i64) : i64
        %2070 = llvm.alloca %2069 x i32 : (i64) -> !llvm.ptr
        llvm.store %2068, %2070 : i32, !llvm.ptr
        %2071 = llvm.load %2062 : !llvm.ptr -> i32
        %2072 = arith.extsi %2071 : i32 to i64
        %2073 = arith.cmpi slt, %2072, %2056 : i64
        cf.cond_br %2073, ^bb255, ^bb256
        ^bb255:
          %2074 = arith.constant 1 : i32
          %2075 = arith.subi %2029, %2074 : i32
          %2076 = llvm.load %2062 : !llvm.ptr -> i32
          %2077 = arith.subi %2075, %2076 : i32
          llvm.store %2077, %2067 : i32, !llvm.ptr
          %2078 = arith.constant 1 : i32
          llvm.store %2078, %2070 : i32, !llvm.ptr
          cf.br ^bb257
        ^bb256:
          %2079 = llvm.load %2062 : !llvm.ptr -> i32
          %2080 = arith.extsi %2079 : i32 to i64
          %2081 = arith.subi %2080, %2056 : i64
          %2082 = arith.trunci %2081 : i64 to i32
          llvm.store %2082, %2067 : i32, !llvm.ptr
          %2083 = arith.constant 0 : i32
          llvm.store %2083, %2070 : i32, !llvm.ptr
          cf.br ^bb257
        ^bb257:
        %2084 = llvm.load %2052 : !llvm.ptr -> i32
        %2085 = arith.muli %2084, %2029 : i32
        %2086 = llvm.load %2062 : !llvm.ptr -> i32
        %2087 = arith.addi %2085, %2086 : i32
        %2088 = llvm.load %2052 : !llvm.ptr -> i32
        %2089 = arith.constant 1 : i32
        %2090 = arith.addi %2088, %2089 : i32
        %2091 = arith.constant 3 : i32
        %2092 = arith.remsi %2090, %2091 : i32
        %2093 = arith.muli %2092, %2029 : i32
        %2094 = llvm.load %2067 : !llvm.ptr -> i32
        %2095 = arith.addi %2093, %2094 : i32
        %2096 = arith.extsi %2087 : i32 to i64
        %2097 = llvm.getelementptr %2032[%2096] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %2095, %2097 : i32, !llvm.ptr
        %2098 = llvm.load %2070 : !llvm.ptr -> i32
        %2099 = arith.extsi %2087 : i32 to i64
        %2100 = llvm.getelementptr %2036[%2099] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %2098, %2100 : i32, !llvm.ptr
        %2101 = llvm.load %2062 : !llvm.ptr -> i32
        %2102 = arith.constant 1 : i32
        %2103 = arith.addi %2101, %2102 : i32
        llvm.store %2103, %2062 : i32, !llvm.ptr
        cf.br ^bb252
      ^bb254:
      %2104 = llvm.load %2052 : !llvm.ptr -> i32
      %2105 = arith.constant 1 : i32
      %2106 = arith.addi %2104, %2105 : i32
      llvm.store %2106, %2052 : i32, !llvm.ptr
      cf.br ^bb249
    ^bb251:
    %2107 = func.call @solvePermutation(%2032, %2036, %2031, %2029) : (!llvm.ptr, !llvm.ptr, i32, i32) -> i64
    func.call @free(%2032) : (!llvm.ptr) -> ()
    func.call @free(%2036) : (!llvm.ptr) -> ()
    func.return %2107 : i64
  }
  func.func @F_nonsquare(%arg0: i32, %arg1: i32, %arg2: i32) -> i64 {
    %2110 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2111 = llvm.insertvalue %arg0, %2110[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2112 = llvm.insertvalue %arg1, %2111[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2113 = llvm.insertvalue %arg2, %2112[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2114 = arith.extsi %arg0 : i32 to i64
    %2115 = arith.extsi %arg1 : i32 to i64
    %2116 = arith.muli %2114, %2115 : i64
    %2117 = llvm.insertvalue %2116, %2113[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2118 = arith.sitofp %arg2 : i32 to f64
    %2119 = math.sqrt %2118 : f64
    %2120 = llvm.insertvalue %2119, %2117[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2121 = llvm.mlir.constant(1 : i64) : i64
    %2122 = llvm.alloca %2121 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2120, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2124 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2125 = arith.constant 0 : i32
    %2126 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2127 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %2128 = llvm.load %2127 : !llvm.ptr -> i64
    %2129 = arith.extsi %arg0 : i32 to i64
    %2130 = arith.divsi %2128, %2129 : i64
    %2131 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2132 = llvm.extractvalue %2124[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2133 = llvm.insertvalue %2132, %2131[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2134 = llvm.extractvalue %2124[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2135 = llvm.insertvalue %2134, %2133[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2136 = llvm.extractvalue %2124[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2137 = llvm.insertvalue %2136, %2135[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2138 = llvm.extractvalue %2124[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2139 = llvm.insertvalue %2138, %2137[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2140 = llvm.extractvalue %2124[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2141 = llvm.insertvalue %2140, %2139[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2142 = arith.extsi %2125 : i32 to i64
    %2123 = func.call @canonical01(%2130, %2142, %2141) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %2143 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %2144 = llvm.extractvalue %2123[0] : !llvm.struct<(i64, i64)>
    %2145 = llvm.insertvalue %2144, %2143[0] : !llvm.struct<(i64, i64)>
    %2146 = llvm.extractvalue %2123[1] : !llvm.struct<(i64, i64)>
    %2147 = llvm.insertvalue %2146, %2145[1] : !llvm.struct<(i64, i64)>
    %2148 = llvm.mlir.constant(1 : i64) : i64
    %2149 = llvm.alloca %2148 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2147, %2149 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2150 = llvm.load %2149 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2151 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2152 = llvm.extractvalue %2141[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2153 = llvm.insertvalue %2152, %2151[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2154 = llvm.extractvalue %2141[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2155 = llvm.insertvalue %2154, %2153[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2156 = llvm.extractvalue %2141[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2157 = llvm.insertvalue %2156, %2155[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2158 = llvm.extractvalue %2141[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2159 = llvm.insertvalue %2158, %2157[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2160 = llvm.extractvalue %2141[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2161 = llvm.insertvalue %2160, %2159[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2162 = llvm.mlir.constant(1 : i64) : i64
    %2163 = llvm.alloca %2162 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2161, %2163 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2164 = llvm.load %2163 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %2164, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2165 = llvm.mlir.constant(1 : i64) : i64
    %2166 = llvm.alloca %2165 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2150, %2166 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2168 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2169 = arith.constant 0 : i32
    %2170 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2171 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
    %2172 = llvm.load %2171 : !llvm.ptr -> i64
    %2173 = arith.extsi %arg1 : i32 to i64
    %2174 = arith.divsi %2172, %2173 : i64
    %2175 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2176 = llvm.extractvalue %2168[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2177 = llvm.insertvalue %2176, %2175[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2178 = llvm.extractvalue %2168[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2179 = llvm.insertvalue %2178, %2177[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2180 = llvm.extractvalue %2168[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2181 = llvm.insertvalue %2180, %2179[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2182 = llvm.extractvalue %2168[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2183 = llvm.insertvalue %2182, %2181[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2184 = llvm.extractvalue %2168[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2185 = llvm.insertvalue %2184, %2183[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2186 = arith.extsi %2169 : i32 to i64
    %2167 = func.call @canonical01(%2174, %2186, %2185) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %2187 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %2188 = llvm.extractvalue %2167[0] : !llvm.struct<(i64, i64)>
    %2189 = llvm.insertvalue %2188, %2187[0] : !llvm.struct<(i64, i64)>
    %2190 = llvm.extractvalue %2167[1] : !llvm.struct<(i64, i64)>
    %2191 = llvm.insertvalue %2190, %2189[1] : !llvm.struct<(i64, i64)>
    %2192 = llvm.mlir.constant(1 : i64) : i64
    %2193 = llvm.alloca %2192 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2191, %2193 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2194 = llvm.load %2193 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2195 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2196 = llvm.extractvalue %2185[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2197 = llvm.insertvalue %2196, %2195[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2198 = llvm.extractvalue %2185[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2199 = llvm.insertvalue %2198, %2197[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2200 = llvm.extractvalue %2185[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2201 = llvm.insertvalue %2200, %2199[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2202 = llvm.extractvalue %2185[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2203 = llvm.insertvalue %2202, %2201[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2204 = llvm.extractvalue %2185[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2205 = llvm.insertvalue %2204, %2203[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2206 = llvm.mlir.constant(1 : i64) : i64
    %2207 = llvm.alloca %2206 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2205, %2207 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2208 = llvm.load %2207 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %2208, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2209 = llvm.mlir.constant(1 : i64) : i64
    %2210 = llvm.alloca %2209 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2194, %2210 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2212 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2213 = arith.constant 1 : i32
    %2214 = arith.constant 0 : i32
    %2215 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2216 = llvm.extractvalue %2212[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2217 = llvm.insertvalue %2216, %2215[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2218 = llvm.extractvalue %2212[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2219 = llvm.insertvalue %2218, %2217[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2220 = llvm.extractvalue %2212[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2221 = llvm.insertvalue %2220, %2219[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2222 = llvm.extractvalue %2212[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2223 = llvm.insertvalue %2222, %2221[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2224 = llvm.extractvalue %2212[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2225 = llvm.insertvalue %2224, %2223[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2226 = arith.extsi %2214 : i32 to i64
    %2227 = arith.extsi %2213 : i32 to i64
    %2211 = func.call @canonical01(%2226, %2227, %2225) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %2228 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %2229 = llvm.extractvalue %2211[0] : !llvm.struct<(i64, i64)>
    %2230 = llvm.insertvalue %2229, %2228[0] : !llvm.struct<(i64, i64)>
    %2231 = llvm.extractvalue %2211[1] : !llvm.struct<(i64, i64)>
    %2232 = llvm.insertvalue %2231, %2230[1] : !llvm.struct<(i64, i64)>
    %2233 = llvm.mlir.constant(1 : i64) : i64
    %2234 = llvm.alloca %2233 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2232, %2234 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2235 = llvm.load %2234 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2236 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2237 = llvm.extractvalue %2225[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2238 = llvm.insertvalue %2237, %2236[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2239 = llvm.extractvalue %2225[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2240 = llvm.insertvalue %2239, %2238[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2241 = llvm.extractvalue %2225[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2242 = llvm.insertvalue %2241, %2240[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2243 = llvm.extractvalue %2225[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2244 = llvm.insertvalue %2243, %2242[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2245 = llvm.extractvalue %2225[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2246 = llvm.insertvalue %2245, %2244[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2247 = llvm.mlir.constant(1 : i64) : i64
    %2248 = llvm.alloca %2247 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2246, %2248 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2249 = llvm.load %2248 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %2249, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2250 = llvm.mlir.constant(1 : i64) : i64
    %2251 = llvm.alloca %2250 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2235, %2251 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2253 = llvm.load %2166 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2254 = llvm.getelementptr %2166[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2255 = llvm.load %2254 : !llvm.ptr -> i64
    %2256 = llvm.load %2210 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2257 = llvm.getelementptr %2210[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2258 = llvm.load %2257 : !llvm.ptr -> i64
    %2259 = llvm.load %2251 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2260 = llvm.getelementptr %2251[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2261 = llvm.load %2260 : !llvm.ptr -> i64
    %2262 = llvm.mlir.constant(1 : i64) : i64
    %2263 = llvm.alloca %2262 x !llvm.array<3 x i64> : (i64) -> !llvm.ptr
    %2264 = llvm.mlir.zero : !llvm.array<3 x i64>
    llvm.store %2264, %2263 : !llvm.array<3 x i64>, !llvm.ptr
    %2265 = llvm.mlir.constant(0 : i64) : i64
    %2266 = llvm.getelementptr %2263[0, %2265] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2255, %2266 : i64, !llvm.ptr
    %2267 = llvm.mlir.constant(1 : i64) : i64
    %2268 = llvm.getelementptr %2263[0, %2267] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2258, %2268 : i64, !llvm.ptr
    %2269 = llvm.mlir.constant(2 : i64) : i64
    %2270 = llvm.getelementptr %2263[0, %2269] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2261, %2270 : i64, !llvm.ptr
    %2272 = llvm.load %2166 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2273 = llvm.getelementptr %2166[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2274 = llvm.load %2273 : !llvm.ptr -> i64
    %2275 = llvm.load %2210 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2276 = llvm.getelementptr %2210[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2277 = llvm.load %2276 : !llvm.ptr -> i64
    %2278 = llvm.load %2251 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2279 = llvm.getelementptr %2251[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2280 = llvm.load %2279 : !llvm.ptr -> i64
    %2281 = llvm.mlir.constant(1 : i64) : i64
    %2282 = llvm.alloca %2281 x !llvm.array<3 x i64> : (i64) -> !llvm.ptr
    %2283 = llvm.mlir.zero : !llvm.array<3 x i64>
    llvm.store %2283, %2282 : !llvm.array<3 x i64>, !llvm.ptr
    %2284 = llvm.mlir.constant(0 : i64) : i64
    %2285 = llvm.getelementptr %2282[0, %2284] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2274, %2285 : i64, !llvm.ptr
    %2286 = llvm.mlir.constant(1 : i64) : i64
    %2287 = llvm.getelementptr %2282[0, %2286] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2277, %2287 : i64, !llvm.ptr
    %2288 = llvm.mlir.constant(2 : i64) : i64
    %2289 = llvm.getelementptr %2282[0, %2288] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2280, %2289 : i64, !llvm.ptr
    %2291 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2292 = llvm.load %2166 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2293 = llvm.getelementptr %2166[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2294 = llvm.load %2293 : !llvm.ptr -> i64
    %2295 = llvm.load %2166 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2296 = llvm.getelementptr %2166[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2297 = llvm.load %2296 : !llvm.ptr -> i64
    %2298 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2299 = llvm.extractvalue %2291[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2300 = llvm.insertvalue %2299, %2298[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2301 = llvm.extractvalue %2291[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2302 = llvm.insertvalue %2301, %2300[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2303 = llvm.extractvalue %2291[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2304 = llvm.insertvalue %2303, %2302[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2305 = llvm.extractvalue %2291[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2306 = llvm.insertvalue %2305, %2304[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2307 = llvm.extractvalue %2291[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2308 = llvm.insertvalue %2307, %2306[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2290 = func.call @oneMinus(%2297, %2294, %2308) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %2309 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %2310 = llvm.extractvalue %2290[0] : !llvm.struct<(i64, i64)>
    %2311 = llvm.insertvalue %2310, %2309[0] : !llvm.struct<(i64, i64)>
    %2312 = llvm.extractvalue %2290[1] : !llvm.struct<(i64, i64)>
    %2313 = llvm.insertvalue %2312, %2311[1] : !llvm.struct<(i64, i64)>
    %2314 = llvm.mlir.constant(1 : i64) : i64
    %2315 = llvm.alloca %2314 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2313, %2315 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2316 = llvm.load %2315 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2317 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2318 = llvm.extractvalue %2308[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2319 = llvm.insertvalue %2318, %2317[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2320 = llvm.extractvalue %2308[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2321 = llvm.insertvalue %2320, %2319[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2322 = llvm.extractvalue %2308[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2323 = llvm.insertvalue %2322, %2321[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2324 = llvm.extractvalue %2308[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2325 = llvm.insertvalue %2324, %2323[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2326 = llvm.extractvalue %2308[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2327 = llvm.insertvalue %2326, %2325[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2328 = llvm.mlir.constant(1 : i64) : i64
    %2329 = llvm.alloca %2328 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2327, %2329 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2330 = llvm.load %2329 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %2330, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2331 = llvm.mlir.constant(1 : i64) : i64
    %2332 = llvm.alloca %2331 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2316, %2332 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2334 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2335 = llvm.load %2210 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2336 = llvm.getelementptr %2210[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2337 = llvm.load %2336 : !llvm.ptr -> i64
    %2338 = llvm.load %2210 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2339 = llvm.getelementptr %2210[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2340 = llvm.load %2339 : !llvm.ptr -> i64
    %2341 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2342 = llvm.extractvalue %2334[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2343 = llvm.insertvalue %2342, %2341[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2344 = llvm.extractvalue %2334[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2345 = llvm.insertvalue %2344, %2343[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2346 = llvm.extractvalue %2334[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2347 = llvm.insertvalue %2346, %2345[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2348 = llvm.extractvalue %2334[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2349 = llvm.insertvalue %2348, %2347[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2350 = llvm.extractvalue %2334[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2351 = llvm.insertvalue %2350, %2349[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2333 = func.call @oneMinus(%2340, %2337, %2351) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %2352 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %2353 = llvm.extractvalue %2333[0] : !llvm.struct<(i64, i64)>
    %2354 = llvm.insertvalue %2353, %2352[0] : !llvm.struct<(i64, i64)>
    %2355 = llvm.extractvalue %2333[1] : !llvm.struct<(i64, i64)>
    %2356 = llvm.insertvalue %2355, %2354[1] : !llvm.struct<(i64, i64)>
    %2357 = llvm.mlir.constant(1 : i64) : i64
    %2358 = llvm.alloca %2357 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2356, %2358 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2359 = llvm.load %2358 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2360 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2361 = llvm.extractvalue %2351[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2362 = llvm.insertvalue %2361, %2360[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2363 = llvm.extractvalue %2351[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2364 = llvm.insertvalue %2363, %2362[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2365 = llvm.extractvalue %2351[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2366 = llvm.insertvalue %2365, %2364[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2367 = llvm.extractvalue %2351[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2368 = llvm.insertvalue %2367, %2366[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2369 = llvm.extractvalue %2351[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2370 = llvm.insertvalue %2369, %2368[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2371 = llvm.mlir.constant(1 : i64) : i64
    %2372 = llvm.alloca %2371 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2370, %2372 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2373 = llvm.load %2372 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %2373, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2374 = llvm.mlir.constant(1 : i64) : i64
    %2375 = llvm.alloca %2374 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2359, %2375 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2377 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    %2378 = llvm.load %2251 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2379 = llvm.getelementptr %2251[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2380 = llvm.load %2379 : !llvm.ptr -> i64
    %2381 = llvm.load %2251 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2382 = llvm.getelementptr %2251[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2383 = llvm.load %2382 : !llvm.ptr -> i64
    %2384 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2385 = llvm.extractvalue %2377[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2386 = llvm.insertvalue %2385, %2384[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2387 = llvm.extractvalue %2377[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2388 = llvm.insertvalue %2387, %2386[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2389 = llvm.extractvalue %2377[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2390 = llvm.insertvalue %2389, %2388[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2391 = llvm.extractvalue %2377[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2392 = llvm.insertvalue %2391, %2390[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2393 = llvm.extractvalue %2377[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2394 = llvm.insertvalue %2393, %2392[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2376 = func.call @oneMinus(%2383, %2380, %2394) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
    %2395 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
    %2396 = llvm.extractvalue %2376[0] : !llvm.struct<(i64, i64)>
    %2397 = llvm.insertvalue %2396, %2395[0] : !llvm.struct<(i64, i64)>
    %2398 = llvm.extractvalue %2376[1] : !llvm.struct<(i64, i64)>
    %2399 = llvm.insertvalue %2398, %2397[1] : !llvm.struct<(i64, i64)>
    %2400 = llvm.mlir.constant(1 : i64) : i64
    %2401 = llvm.alloca %2400 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2399, %2401 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2402 = llvm.load %2401 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2403 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2404 = llvm.extractvalue %2394[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2405 = llvm.insertvalue %2404, %2403[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2406 = llvm.extractvalue %2394[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2407 = llvm.insertvalue %2406, %2405[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2408 = llvm.extractvalue %2394[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2409 = llvm.insertvalue %2408, %2407[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2410 = llvm.extractvalue %2394[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2411 = llvm.insertvalue %2410, %2409[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2412 = llvm.extractvalue %2394[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2413 = llvm.insertvalue %2412, %2411[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
    %2414 = llvm.mlir.constant(1 : i64) : i64
    %2415 = llvm.alloca %2414 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
    llvm.store %2413, %2415 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2416 = llvm.load %2415 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
    llvm.store %2416, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
    %2417 = llvm.mlir.constant(1 : i64) : i64
    %2418 = llvm.alloca %2417 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
    llvm.store %2402, %2418 : !llvm.struct<(i64, i64)>, !llvm.ptr
    %2420 = llvm.load %2332 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2421 = llvm.getelementptr %2332[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2422 = llvm.load %2421 : !llvm.ptr -> i64
    %2423 = llvm.load %2375 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2424 = llvm.getelementptr %2375[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2425 = llvm.load %2424 : !llvm.ptr -> i64
    %2426 = llvm.load %2418 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2427 = llvm.getelementptr %2418[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2428 = llvm.load %2427 : !llvm.ptr -> i64
    %2429 = llvm.mlir.constant(1 : i64) : i64
    %2430 = llvm.alloca %2429 x !llvm.array<3 x i64> : (i64) -> !llvm.ptr
    %2431 = llvm.mlir.zero : !llvm.array<3 x i64>
    llvm.store %2431, %2430 : !llvm.array<3 x i64>, !llvm.ptr
    %2432 = llvm.mlir.constant(0 : i64) : i64
    %2433 = llvm.getelementptr %2430[0, %2432] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2422, %2433 : i64, !llvm.ptr
    %2434 = llvm.mlir.constant(1 : i64) : i64
    %2435 = llvm.getelementptr %2430[0, %2434] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2425, %2435 : i64, !llvm.ptr
    %2436 = llvm.mlir.constant(2 : i64) : i64
    %2437 = llvm.getelementptr %2430[0, %2436] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2428, %2437 : i64, !llvm.ptr
    %2439 = llvm.load %2332 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2440 = llvm.getelementptr %2332[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2441 = llvm.load %2440 : !llvm.ptr -> i64
    %2442 = llvm.load %2375 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2443 = llvm.getelementptr %2375[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2444 = llvm.load %2443 : !llvm.ptr -> i64
    %2445 = llvm.load %2418 : !llvm.ptr -> !llvm.struct<(i64, i64)>
    %2446 = llvm.getelementptr %2418[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
    %2447 = llvm.load %2446 : !llvm.ptr -> i64
    %2448 = llvm.mlir.constant(1 : i64) : i64
    %2449 = llvm.alloca %2448 x !llvm.array<3 x i64> : (i64) -> !llvm.ptr
    %2450 = llvm.mlir.zero : !llvm.array<3 x i64>
    llvm.store %2450, %2449 : !llvm.array<3 x i64>, !llvm.ptr
    %2451 = llvm.mlir.constant(0 : i64) : i64
    %2452 = llvm.getelementptr %2449[0, %2451] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2441, %2452 : i64, !llvm.ptr
    %2453 = llvm.mlir.constant(1 : i64) : i64
    %2454 = llvm.getelementptr %2449[0, %2453] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2444, %2454 : i64, !llvm.ptr
    %2455 = llvm.mlir.constant(2 : i64) : i64
    %2456 = llvm.getelementptr %2449[0, %2455] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
    llvm.store %2447, %2456 : i64, !llvm.ptr
    %2457 = arith.constant 2097152 : i32
    %2458 = arith.constant 1 : i32
    %2459 = arith.subi %2457, %2458 : i32
    %2461 = arith.extsi %2457 : i32 to i64
    %2462 = arith.constant 8 : i32
    %2463 = arith.extsi %2462 : i32 to i64
    %2460 = func.call @calloc(%2461, %2463) : (i64, i64) -> !llvm.ptr
    %2465 = arith.extsi %2457 : i32 to i64
    %2466 = arith.constant 8 : i32
    %2467 = arith.extsi %2466 : i32 to i64
    %2464 = func.call @calloc(%2465, %2467) : (i64, i64) -> !llvm.ptr
    %2469 = arith.extsi %2457 : i32 to i64
    %2470 = arith.constant 8 : i32
    %2471 = arith.extsi %2470 : i32 to i64
    %2468 = func.call @calloc(%2469, %2471) : (i64, i64) -> !llvm.ptr
    %2473 = arith.extsi %2457 : i32 to i64
    %2474 = arith.constant 8 : i32
    %2475 = arith.extsi %2474 : i32 to i64
    %2472 = func.call @calloc(%2473, %2475) : (i64, i64) -> !llvm.ptr
    %2477 = arith.extsi %2457 : i32 to i64
    %2478 = arith.constant 8 : i32
    %2479 = arith.extsi %2478 : i32 to i64
    %2476 = func.call @calloc(%2477, %2479) : (i64, i64) -> !llvm.ptr
    %2481 = arith.extsi %2457 : i32 to i64
    %2482 = arith.constant 8 : i32
    %2483 = arith.extsi %2482 : i32 to i64
    %2480 = func.call @calloc(%2481, %2483) : (i64, i64) -> !llvm.ptr
    %2485 = arith.extsi %2457 : i32 to i64
    %2486 = arith.constant 4 : i32
    %2487 = arith.extsi %2486 : i32 to i64
    %2484 = func.call @calloc(%2485, %2487) : (i64, i64) -> !llvm.ptr
    %2489 = arith.extsi %2457 : i32 to i64
    %2490 = arith.constant 4 : i32
    %2491 = arith.extsi %2490 : i32 to i64
    %2488 = func.call @calloc(%2489, %2491) : (i64, i64) -> !llvm.ptr
    %2493 = arith.extsi %2457 : i32 to i64
    %2494 = arith.constant 4 : i32
    %2495 = arith.extsi %2494 : i32 to i64
    %2492 = func.call @calloc(%2493, %2495) : (i64, i64) -> !llvm.ptr
    %2497 = llvm.mlir.constant(1 : i64) : i64
    %2498 = llvm.alloca %2497 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %2499 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %2499, %2498 : !llvm.array<3 x ptr>, !llvm.ptr
    %2500 = llvm.mlir.constant(0 : i64) : i64
    %2501 = llvm.getelementptr %2498[0, %2500] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2460, %2501 : !llvm.ptr, !llvm.ptr
    %2502 = llvm.mlir.constant(1 : i64) : i64
    %2503 = llvm.getelementptr %2498[0, %2502] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2464, %2503 : !llvm.ptr, !llvm.ptr
    %2504 = llvm.mlir.constant(2 : i64) : i64
    %2505 = llvm.getelementptr %2498[0, %2504] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2468, %2505 : !llvm.ptr, !llvm.ptr
    %2507 = llvm.mlir.constant(1 : i64) : i64
    %2508 = llvm.alloca %2507 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %2509 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %2509, %2508 : !llvm.array<3 x ptr>, !llvm.ptr
    %2510 = llvm.mlir.constant(0 : i64) : i64
    %2511 = llvm.getelementptr %2508[0, %2510] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2472, %2511 : !llvm.ptr, !llvm.ptr
    %2512 = llvm.mlir.constant(1 : i64) : i64
    %2513 = llvm.getelementptr %2508[0, %2512] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2476, %2513 : !llvm.ptr, !llvm.ptr
    %2514 = llvm.mlir.constant(2 : i64) : i64
    %2515 = llvm.getelementptr %2508[0, %2514] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2480, %2515 : !llvm.ptr, !llvm.ptr
    %2517 = llvm.mlir.constant(1 : i64) : i64
    %2518 = llvm.alloca %2517 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %2519 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %2519, %2518 : !llvm.array<3 x ptr>, !llvm.ptr
    %2520 = llvm.mlir.constant(0 : i64) : i64
    %2521 = llvm.getelementptr %2518[0, %2520] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2484, %2521 : !llvm.ptr, !llvm.ptr
    %2522 = llvm.mlir.constant(1 : i64) : i64
    %2523 = llvm.getelementptr %2518[0, %2522] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2488, %2523 : !llvm.ptr, !llvm.ptr
    %2524 = llvm.mlir.constant(2 : i64) : i64
    %2525 = llvm.getelementptr %2518[0, %2524] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2492, %2525 : !llvm.ptr, !llvm.ptr
    %2527 = arith.extsi %2457 : i32 to i64
    %2528 = arith.constant 8 : i32
    %2529 = arith.extsi %2528 : i32 to i64
    %2526 = func.call @calloc(%2527, %2529) : (i64, i64) -> !llvm.ptr
    %2531 = arith.extsi %2457 : i32 to i64
    %2532 = arith.constant 8 : i32
    %2533 = arith.extsi %2532 : i32 to i64
    %2530 = func.call @calloc(%2531, %2533) : (i64, i64) -> !llvm.ptr
    %2535 = arith.extsi %2457 : i32 to i64
    %2536 = arith.constant 8 : i32
    %2537 = arith.extsi %2536 : i32 to i64
    %2534 = func.call @calloc(%2535, %2537) : (i64, i64) -> !llvm.ptr
    %2539 = arith.extsi %2457 : i32 to i64
    %2540 = arith.constant 8 : i32
    %2541 = arith.extsi %2540 : i32 to i64
    %2538 = func.call @calloc(%2539, %2541) : (i64, i64) -> !llvm.ptr
    %2543 = arith.extsi %2457 : i32 to i64
    %2544 = arith.constant 8 : i32
    %2545 = arith.extsi %2544 : i32 to i64
    %2542 = func.call @calloc(%2543, %2545) : (i64, i64) -> !llvm.ptr
    %2547 = arith.extsi %2457 : i32 to i64
    %2548 = arith.constant 8 : i32
    %2549 = arith.extsi %2548 : i32 to i64
    %2546 = func.call @calloc(%2547, %2549) : (i64, i64) -> !llvm.ptr
    %2551 = llvm.mlir.constant(1 : i64) : i64
    %2552 = llvm.alloca %2551 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %2553 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %2553, %2552 : !llvm.array<3 x ptr>, !llvm.ptr
    %2554 = llvm.mlir.constant(0 : i64) : i64
    %2555 = llvm.getelementptr %2552[0, %2554] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2526, %2555 : !llvm.ptr, !llvm.ptr
    %2556 = llvm.mlir.constant(1 : i64) : i64
    %2557 = llvm.getelementptr %2552[0, %2556] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2530, %2557 : !llvm.ptr, !llvm.ptr
    %2558 = llvm.mlir.constant(2 : i64) : i64
    %2559 = llvm.getelementptr %2552[0, %2558] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2534, %2559 : !llvm.ptr, !llvm.ptr
    %2561 = llvm.mlir.constant(1 : i64) : i64
    %2562 = llvm.alloca %2561 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %2563 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %2563, %2562 : !llvm.array<3 x ptr>, !llvm.ptr
    %2564 = llvm.mlir.constant(0 : i64) : i64
    %2565 = llvm.getelementptr %2562[0, %2564] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2538, %2565 : !llvm.ptr, !llvm.ptr
    %2566 = llvm.mlir.constant(1 : i64) : i64
    %2567 = llvm.getelementptr %2562[0, %2566] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2542, %2567 : !llvm.ptr, !llvm.ptr
    %2568 = llvm.mlir.constant(2 : i64) : i64
    %2569 = llvm.getelementptr %2562[0, %2568] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %2546, %2569 : !llvm.ptr, !llvm.ptr
    %2571 = arith.constant 0 : i32
    %2572 = arith.constant 0 : i32
    %2573 = arith.constant 0 : i32
    %2574 = llvm.mlir.constant(1 : i64) : i64
    %2575 = llvm.alloca %2574 x !llvm.array<3 x i32> : (i64) -> !llvm.ptr
    %2576 = llvm.mlir.zero : !llvm.array<3 x i32>
    llvm.store %2576, %2575 : !llvm.array<3 x i32>, !llvm.ptr
    %2577 = llvm.mlir.constant(0 : i64) : i64
    %2578 = llvm.getelementptr %2575[0, %2577] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
    llvm.store %2571, %2578 : i32, !llvm.ptr
    %2579 = llvm.mlir.constant(1 : i64) : i64
    %2580 = llvm.getelementptr %2575[0, %2579] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
    llvm.store %2572, %2580 : i32, !llvm.ptr
    %2581 = llvm.mlir.constant(2 : i64) : i64
    %2582 = llvm.getelementptr %2575[0, %2581] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
    llvm.store %2573, %2582 : i32, !llvm.ptr
    %2583 = arith.constant 0 : i32
    %2584 = llvm.mlir.constant(1 : i64) : i64
    %2585 = llvm.alloca %2584 x i32 : (i64) -> !llvm.ptr
    llvm.store %2583, %2585 : i32, !llvm.ptr
    cf.br ^bb258
    ^bb258:
    %2586 = llvm.load %2585 : !llvm.ptr -> i32
    %2587 = arith.constant 3 : i32
    %2588 = arith.cmpi slt, %2586, %2587 : i32
    cf.cond_br %2588, ^bb259, ^bb260
    ^bb259:
      %2590 = llvm.load %2585 : !llvm.ptr -> i32
      %2591 = arith.extsi %2590 : i32 to i64
      %2592 = llvm.getelementptr %2263[0, %2591] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
      %2589 = llvm.load %2592 : !llvm.ptr -> i64
      %2594 = llvm.load %2585 : !llvm.ptr -> i32
      %2595 = arith.extsi %2594 : i32 to i64
      %2596 = llvm.getelementptr %2282[0, %2595] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
      %2593 = llvm.load %2596 : !llvm.ptr -> i64
      %2597 = arith.constant 0 : i32
      %2598 = arith.constant 31 : i32
      %2599 = arith.muli %2597, %2598 : i32
      %2600 = arith.constant 0 : i32
      %2601 = arith.addi %2599, %2600 : i32
      %2602 = arith.extsi %2601 : i32 to i64
      %2603 = llvm.mlir.constant(1 : i64) : i64
      %2604 = llvm.alloca %2603 x i64 : (i64) -> !llvm.ptr
      llvm.store %2602, %2604 : i64, !llvm.ptr
      %2605 = llvm.load %2604 : !llvm.ptr -> i64
      %2606 = arith.constant 0 : i32
      %2608 = arith.extsi %2606 : i32 to i64
      %2607 = arith.cmpi slt, %2605, %2608 : i64
      cf.cond_br %2607, ^bb261, ^bb262
      ^bb261:
        %2609 = arith.constant 0 : i32
        %2610 = llvm.load %2604 : !llvm.ptr -> i64
        %2612 = arith.extsi %2609 : i32 to i64
        %2611 = arith.subi %2612, %2610 : i64
        llvm.store %2611, %2604 : i64, !llvm.ptr
        cf.br ^bb263
      ^bb262:
        cf.br ^bb263
      ^bb263:
      %2613 = llvm.load %2604 : !llvm.ptr -> i64
      %2614 = arith.extsi %2459 : i32 to i64
      %2615 = arith.andi %2613, %2614 : i64
      %2616 = arith.trunci %2615 : i64 to i32
      %2617 = arith.constant 0 : i32
      %2619 = llvm.load %2585 : !llvm.ptr -> i32
      %2620 = arith.extsi %2619 : i32 to i64
      %2621 = llvm.getelementptr %2498[0, %2620] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2618 = llvm.load %2621 : !llvm.ptr -> !llvm.ptr
      %2622 = arith.extsi %2617 : i32 to i64
      %2623 = arith.extsi %2616 : i32 to i64
      %2624 = llvm.getelementptr %2618[%2623] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2622, %2624 : i64, !llvm.ptr
      %2625 = arith.constant 0 : i32
      %2627 = llvm.load %2585 : !llvm.ptr -> i32
      %2628 = arith.extsi %2627 : i32 to i64
      %2629 = llvm.getelementptr %2508[0, %2628] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2626 = llvm.load %2629 : !llvm.ptr -> !llvm.ptr
      %2630 = arith.extsi %2625 : i32 to i64
      %2631 = arith.extsi %2616 : i32 to i64
      %2632 = llvm.getelementptr %2626[%2631] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2630, %2632 : i64, !llvm.ptr
      %2633 = arith.constant 1 : i32
      %2635 = llvm.load %2585 : !llvm.ptr -> i32
      %2636 = arith.extsi %2635 : i32 to i64
      %2637 = llvm.getelementptr %2518[0, %2636] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2634 = llvm.load %2637 : !llvm.ptr -> !llvm.ptr
      %2638 = arith.extsi %2616 : i32 to i64
      %2639 = llvm.getelementptr %2634[%2638] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %2633, %2639 : i32, !llvm.ptr
      %2640 = arith.constant 31 : i32
      %2642 = arith.extsi %2640 : i32 to i64
      %2641 = arith.muli %2589, %2642 : i64
      %2643 = arith.addi %2641, %2593 : i64
      %2644 = llvm.mlir.constant(1 : i64) : i64
      %2645 = llvm.alloca %2644 x i64 : (i64) -> !llvm.ptr
      llvm.store %2643, %2645 : i64, !llvm.ptr
      %2646 = llvm.load %2645 : !llvm.ptr -> i64
      %2647 = arith.constant 0 : i32
      %2649 = arith.extsi %2647 : i32 to i64
      %2648 = arith.cmpi slt, %2646, %2649 : i64
      cf.cond_br %2648, ^bb264, ^bb265
      ^bb264:
        %2650 = arith.constant 0 : i32
        %2651 = llvm.load %2645 : !llvm.ptr -> i64
        %2653 = arith.extsi %2650 : i32 to i64
        %2652 = arith.subi %2653, %2651 : i64
        llvm.store %2652, %2645 : i64, !llvm.ptr
        cf.br ^bb266
      ^bb265:
        cf.br ^bb266
      ^bb266:
      %2654 = llvm.load %2645 : !llvm.ptr -> i64
      %2655 = arith.extsi %2459 : i32 to i64
      %2656 = arith.andi %2654, %2655 : i64
      %2657 = arith.trunci %2656 : i64 to i32
      %2659 = llvm.load %2585 : !llvm.ptr -> i32
      %2660 = arith.extsi %2659 : i32 to i64
      %2661 = llvm.getelementptr %2498[0, %2660] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2658 = llvm.load %2661 : !llvm.ptr -> !llvm.ptr
      %2662 = arith.extsi %2657 : i32 to i64
      %2663 = llvm.getelementptr %2658[%2662] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2589, %2663 : i64, !llvm.ptr
      %2665 = llvm.load %2585 : !llvm.ptr -> i32
      %2666 = arith.extsi %2665 : i32 to i64
      %2667 = llvm.getelementptr %2508[0, %2666] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2664 = llvm.load %2667 : !llvm.ptr -> !llvm.ptr
      %2668 = arith.extsi %2657 : i32 to i64
      %2669 = llvm.getelementptr %2664[%2668] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2593, %2669 : i64, !llvm.ptr
      %2670 = arith.constant 1 : i32
      %2672 = llvm.load %2585 : !llvm.ptr -> i32
      %2673 = arith.extsi %2672 : i32 to i64
      %2674 = llvm.getelementptr %2518[0, %2673] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2671 = llvm.load %2674 : !llvm.ptr -> !llvm.ptr
      %2675 = arith.extsi %2657 : i32 to i64
      %2676 = llvm.getelementptr %2671[%2675] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %2670, %2676 : i32, !llvm.ptr
      %2677 = arith.constant 0 : i32
      %2679 = llvm.load %2585 : !llvm.ptr -> i32
      %2680 = arith.extsi %2679 : i32 to i64
      %2681 = llvm.getelementptr %2552[0, %2680] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2678 = llvm.load %2681 : !llvm.ptr -> !llvm.ptr
      %2682 = arith.constant 0 : i32
      %2683 = arith.extsi %2677 : i32 to i64
      %2684 = arith.extsi %2682 : i32 to i64
      %2685 = llvm.getelementptr %2678[%2684] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2683, %2685 : i64, !llvm.ptr
      %2686 = arith.constant 0 : i32
      %2688 = llvm.load %2585 : !llvm.ptr -> i32
      %2689 = arith.extsi %2688 : i32 to i64
      %2690 = llvm.getelementptr %2562[0, %2689] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2687 = llvm.load %2690 : !llvm.ptr -> !llvm.ptr
      %2691 = arith.constant 0 : i32
      %2692 = arith.extsi %2686 : i32 to i64
      %2693 = arith.extsi %2691 : i32 to i64
      %2694 = llvm.getelementptr %2687[%2693] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2692, %2694 : i64, !llvm.ptr
      %2696 = llvm.load %2585 : !llvm.ptr -> i32
      %2697 = arith.extsi %2696 : i32 to i64
      %2698 = llvm.getelementptr %2552[0, %2697] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2695 = llvm.load %2698 : !llvm.ptr -> !llvm.ptr
      %2699 = arith.constant 1 : i32
      %2700 = arith.extsi %2699 : i32 to i64
      %2701 = llvm.getelementptr %2695[%2700] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2589, %2701 : i64, !llvm.ptr
      %2703 = llvm.load %2585 : !llvm.ptr -> i32
      %2704 = arith.extsi %2703 : i32 to i64
      %2705 = llvm.getelementptr %2562[0, %2704] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %2702 = llvm.load %2705 : !llvm.ptr -> !llvm.ptr
      %2706 = arith.constant 1 : i32
      %2707 = arith.extsi %2706 : i32 to i64
      %2708 = llvm.getelementptr %2702[%2707] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %2593, %2708 : i64, !llvm.ptr
      %2709 = arith.constant 2 : i32
      %2710 = llvm.load %2585 : !llvm.ptr -> i32
      %2711 = arith.extsi %2710 : i32 to i64
      %2712 = llvm.getelementptr %2575[0, %2711] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
      llvm.store %2709, %2712 : i32, !llvm.ptr
      %2713 = llvm.load %2585 : !llvm.ptr -> i32
      %2714 = arith.constant 1 : i32
      %2715 = arith.addi %2713, %2714 : i32
      llvm.store %2715, %2585 : i32, !llvm.ptr
      cf.br ^bb258
    ^bb260:
    %2716 = arith.constant 1 : i1
    %2717 = llvm.mlir.constant(1 : i64) : i64
    %2718 = llvm.alloca %2717 x i1 : (i64) -> !llvm.ptr
    llvm.store %2716, %2718 : i1, !llvm.ptr
    cf.br ^bb267
    ^bb267:
    %2719 = llvm.load %2718 : !llvm.ptr -> i1
    cf.cond_br %2719, ^bb268, ^bb269
    ^bb268:
      %2720 = arith.constant 0 : i1
      llvm.store %2720, %2718 : i1, !llvm.ptr
      %2721 = arith.constant 0 : i32
      llvm.store %2721, %2585 : i32, !llvm.ptr
      cf.br ^bb270
      ^bb270:
      %2722 = llvm.load %2585 : !llvm.ptr -> i32
      %2723 = arith.constant 3 : i32
      %2724 = arith.cmpi slt, %2722, %2723 : i32
      cf.cond_br %2724, ^bb271, ^bb272
      ^bb271:
        %2725 = llvm.load %2585 : !llvm.ptr -> i32
        %2726 = arith.constant 2 : i32
        %2727 = arith.addi %2725, %2726 : i32
        %2728 = arith.constant 3 : i32
        %2729 = arith.remsi %2727, %2728 : i32
        cf.br ^bb273
        ^bb273:
        %2731 = llvm.load %2585 : !llvm.ptr -> i32
        %2732 = arith.extsi %2731 : i32 to i64
        %2733 = llvm.getelementptr %2575[0, %2732] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
        %2730 = llvm.load %2733 : !llvm.ptr -> i32
        %2734 = arith.constant 0 : i32
        %2735 = arith.cmpi sgt, %2730, %2734 : i32
        cf.cond_br %2735, ^bb274, ^bb275
        ^bb274:
          %2736 = arith.constant 1 : i1
          llvm.store %2736, %2718 : i1, !llvm.ptr
          %2738 = llvm.load %2585 : !llvm.ptr -> i32
          %2739 = arith.extsi %2738 : i32 to i64
          %2740 = llvm.getelementptr %2575[0, %2739] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
          %2737 = llvm.load %2740 : !llvm.ptr -> i32
          %2741 = arith.constant 1 : i32
          %2742 = arith.subi %2737, %2741 : i32
          %2743 = llvm.load %2585 : !llvm.ptr -> i32
          %2744 = arith.extsi %2743 : i32 to i64
          %2745 = llvm.getelementptr %2575[0, %2744] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
          llvm.store %2742, %2745 : i32, !llvm.ptr
          %2748 = llvm.load %2585 : !llvm.ptr -> i32
          %2749 = arith.extsi %2748 : i32 to i64
          %2750 = llvm.getelementptr %2552[0, %2749] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %2747 = llvm.load %2750 : !llvm.ptr -> !llvm.ptr
          %2752 = llvm.load %2585 : !llvm.ptr -> i32
          %2753 = arith.extsi %2752 : i32 to i64
          %2754 = llvm.getelementptr %2575[0, %2753] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
          %2751 = llvm.load %2754 : !llvm.ptr -> i32
          %2755 = arith.extsi %2751 : i32 to i64
          %2756 = llvm.getelementptr %2747[%2755] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %2746 = llvm.load %2756 : !llvm.ptr -> i64
          %2759 = llvm.load %2585 : !llvm.ptr -> i32
          %2760 = arith.extsi %2759 : i32 to i64
          %2761 = llvm.getelementptr %2562[0, %2760] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %2758 = llvm.load %2761 : !llvm.ptr -> !llvm.ptr
          %2763 = llvm.load %2585 : !llvm.ptr -> i32
          %2764 = arith.extsi %2763 : i32 to i64
          %2765 = llvm.getelementptr %2575[0, %2764] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
          %2762 = llvm.load %2765 : !llvm.ptr -> i32
          %2766 = arith.extsi %2762 : i32 to i64
          %2767 = llvm.getelementptr %2758[%2766] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %2757 = llvm.load %2767 : !llvm.ptr -> i64
          %2770 = arith.extsi %2729 : i32 to i64
          %2771 = llvm.getelementptr %2430[0, %2770] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
          %2769 = llvm.load %2771 : !llvm.ptr -> i64
          %2773 = arith.extsi %2729 : i32 to i64
          %2774 = llvm.getelementptr %2449[0, %2773] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
          %2772 = llvm.load %2774 : !llvm.ptr -> i64
          %2775 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
          %2776 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
          %2777 = llvm.load %2776 : !llvm.ptr -> i64
          %2778 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
          %2779 = llvm.getelementptr %2122[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
          %2780 = llvm.load %2779 : !llvm.ptr -> i32
          %2768 = func.call @cmpPoints(%2746, %2757, %2769, %2772, %2777, %2780) : (i64, i64, i64, i64, i64, i32) -> i32
          %2781 = arith.constant 0 : i32
          %2782 = arith.cmpi slt, %2768, %2781 : i32
          cf.cond_br %2782, ^bb276, ^bb277
          ^bb276:
            %2784 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
            %2786 = arith.extsi %2729 : i32 to i64
            %2787 = llvm.getelementptr %2282[0, %2786] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
            %2785 = llvm.load %2787 : !llvm.ptr -> i64
            %2789 = arith.extsi %2729 : i32 to i64
            %2790 = llvm.getelementptr %2263[0, %2789] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
            %2788 = llvm.load %2790 : !llvm.ptr -> i64
            %2791 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2792 = llvm.extractvalue %2784[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2793 = llvm.insertvalue %2792, %2791[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2794 = llvm.extractvalue %2784[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2795 = llvm.insertvalue %2794, %2793[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2796 = llvm.extractvalue %2784[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2797 = llvm.insertvalue %2796, %2795[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2798 = llvm.extractvalue %2784[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2799 = llvm.insertvalue %2798, %2797[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2800 = llvm.extractvalue %2784[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2801 = llvm.insertvalue %2800, %2799[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2783 = func.call @addP(%2746, %2757, %2788, %2785, %2801) : (i64, i64, i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
            %2802 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
            %2803 = llvm.extractvalue %2783[0] : !llvm.struct<(i64, i64)>
            %2804 = llvm.insertvalue %2803, %2802[0] : !llvm.struct<(i64, i64)>
            %2805 = llvm.extractvalue %2783[1] : !llvm.struct<(i64, i64)>
            %2806 = llvm.insertvalue %2805, %2804[1] : !llvm.struct<(i64, i64)>
            %2807 = llvm.mlir.constant(1 : i64) : i64
            %2808 = llvm.alloca %2807 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
            llvm.store %2806, %2808 : !llvm.struct<(i64, i64)>, !llvm.ptr
            %2809 = llvm.load %2808 : !llvm.ptr -> !llvm.struct<(i64, i64)>
            %2810 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2811 = llvm.extractvalue %2801[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2812 = llvm.insertvalue %2811, %2810[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2813 = llvm.extractvalue %2801[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2814 = llvm.insertvalue %2813, %2812[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2815 = llvm.extractvalue %2801[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2816 = llvm.insertvalue %2815, %2814[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2817 = llvm.extractvalue %2801[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2818 = llvm.insertvalue %2817, %2816[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2819 = llvm.extractvalue %2801[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2820 = llvm.insertvalue %2819, %2818[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2821 = llvm.mlir.constant(1 : i64) : i64
            %2822 = llvm.alloca %2821 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
            llvm.store %2820, %2822 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
            %2823 = llvm.load %2822 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
            llvm.store %2823, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
            %2824 = llvm.mlir.constant(1 : i64) : i64
            %2825 = llvm.alloca %2824 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
            llvm.store %2809, %2825 : !llvm.struct<(i64, i64)>, !llvm.ptr
            %2826 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
            %2827 = llvm.getelementptr %2825[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
            %2828 = llvm.load %2827 : !llvm.ptr -> i64
            %2829 = arith.constant 31 : i32
            %2831 = arith.extsi %2829 : i32 to i64
            %2830 = arith.muli %2828, %2831 : i64
            %2832 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
            %2833 = llvm.getelementptr %2825[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
            %2834 = llvm.load %2833 : !llvm.ptr -> i64
            %2835 = arith.addi %2830, %2834 : i64
            %2836 = llvm.mlir.constant(1 : i64) : i64
            %2837 = llvm.alloca %2836 x i64 : (i64) -> !llvm.ptr
            llvm.store %2835, %2837 : i64, !llvm.ptr
            %2838 = llvm.load %2837 : !llvm.ptr -> i64
            %2839 = arith.constant 0 : i32
            %2841 = arith.extsi %2839 : i32 to i64
            %2840 = arith.cmpi slt, %2838, %2841 : i64
            cf.cond_br %2840, ^bb279, ^bb280
            ^bb279:
              %2842 = arith.constant 0 : i32
              %2843 = llvm.load %2837 : !llvm.ptr -> i64
              %2845 = arith.extsi %2842 : i32 to i64
              %2844 = arith.subi %2845, %2843 : i64
              llvm.store %2844, %2837 : i64, !llvm.ptr
              cf.br ^bb281
            ^bb280:
              cf.br ^bb281
            ^bb281:
            %2846 = llvm.load %2837 : !llvm.ptr -> i64
            %2847 = arith.extsi %2459 : i32 to i64
            %2848 = arith.andi %2846, %2847 : i64
            %2849 = arith.trunci %2848 : i64 to i32
            %2850 = arith.constant 0 : i1
            %2851 = llvm.mlir.constant(1 : i64) : i64
            %2852 = llvm.alloca %2851 x i1 : (i64) -> !llvm.ptr
            llvm.store %2850, %2852 : i1, !llvm.ptr
            %2853 = arith.constant 0 : i32
            %2854 = llvm.mlir.constant(1 : i64) : i64
            %2855 = llvm.alloca %2854 x i32 : (i64) -> !llvm.ptr
            llvm.store %2853, %2855 : i32, !llvm.ptr
            cf.br ^bb282
            ^bb282:
            %2856 = llvm.load %2855 : !llvm.ptr -> i32
            %2857 = arith.cmpi slt, %2856, %2457 : i32
            cf.cond_br %2857, ^bb283, ^bb284
            ^bb283:
              %2858 = llvm.load %2855 : !llvm.ptr -> i32
              %2859 = arith.addi %2849, %2858 : i32
              %2860 = arith.andi %2859, %2459 : i32
              %2863 = arith.extsi %2729 : i32 to i64
              %2864 = llvm.getelementptr %2518[0, %2863] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %2862 = llvm.load %2864 : !llvm.ptr -> !llvm.ptr
              %2865 = arith.extsi %2860 : i32 to i64
              %2866 = llvm.getelementptr %2862[%2865] : (!llvm.ptr, i64) -> !llvm.ptr, i32
              %2861 = llvm.load %2866 : !llvm.ptr -> i32
              %2867 = arith.constant 0 : i32
              %2868 = arith.cmpi eq, %2861, %2867 : i32
              cf.cond_br %2868, ^bb285, ^bb286
              ^bb285:
                %2869 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
                %2870 = llvm.getelementptr %2825[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
                %2871 = llvm.load %2870 : !llvm.ptr -> i64
                %2873 = arith.extsi %2729 : i32 to i64
                %2874 = llvm.getelementptr %2498[0, %2873] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %2872 = llvm.load %2874 : !llvm.ptr -> !llvm.ptr
                %2875 = arith.extsi %2860 : i32 to i64
                %2876 = llvm.getelementptr %2872[%2875] : (!llvm.ptr, i64) -> !llvm.ptr, i64
                llvm.store %2871, %2876 : i64, !llvm.ptr
                %2877 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
                %2878 = llvm.getelementptr %2825[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
                %2879 = llvm.load %2878 : !llvm.ptr -> i64
                %2881 = arith.extsi %2729 : i32 to i64
                %2882 = llvm.getelementptr %2508[0, %2881] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %2880 = llvm.load %2882 : !llvm.ptr -> !llvm.ptr
                %2883 = arith.extsi %2860 : i32 to i64
                %2884 = llvm.getelementptr %2880[%2883] : (!llvm.ptr, i64) -> !llvm.ptr, i64
                llvm.store %2879, %2884 : i64, !llvm.ptr
                %2885 = arith.constant 1 : i32
                %2887 = arith.extsi %2729 : i32 to i64
                %2888 = llvm.getelementptr %2518[0, %2887] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %2886 = llvm.load %2888 : !llvm.ptr -> !llvm.ptr
                %2889 = arith.extsi %2860 : i32 to i64
                %2890 = llvm.getelementptr %2886[%2889] : (!llvm.ptr, i64) -> !llvm.ptr, i32
                llvm.store %2885, %2890 : i32, !llvm.ptr
                %2891 = arith.constant 1 : i1
                llvm.store %2891, %2852 : i1, !llvm.ptr
                cf.br ^bb284
              ^bb286:
                cf.br ^bb287
              ^bb287:
              %2894 = arith.extsi %2729 : i32 to i64
              %2895 = llvm.getelementptr %2498[0, %2894] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %2893 = llvm.load %2895 : !llvm.ptr -> !llvm.ptr
              %2896 = arith.extsi %2860 : i32 to i64
              %2897 = llvm.getelementptr %2893[%2896] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %2892 = llvm.load %2897 : !llvm.ptr -> i64
              %2898 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
              %2899 = llvm.getelementptr %2825[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
              %2900 = llvm.load %2899 : !llvm.ptr -> i64
              %2901 = arith.cmpi eq, %2892, %2900 : i64
              %2902 = scf.if %2901 -> (i1) {
                %2905 = arith.extsi %2729 : i32 to i64
                %2906 = llvm.getelementptr %2508[0, %2905] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %2904 = llvm.load %2906 : !llvm.ptr -> !llvm.ptr
                %2907 = arith.extsi %2860 : i32 to i64
                %2908 = llvm.getelementptr %2904[%2907] : (!llvm.ptr, i64) -> !llvm.ptr, i64
                %2903 = llvm.load %2908 : !llvm.ptr -> i64
                %2909 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
                %2910 = llvm.getelementptr %2825[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
                %2911 = llvm.load %2910 : !llvm.ptr -> i64
                %2912 = arith.cmpi eq, %2903, %2911 : i64
                scf.yield %2912 : i1
              } else {
                %2913 = arith.constant false
                scf.yield %2913 : i1
              }
              cf.cond_br %2902, ^bb288, ^bb289
              ^bb288:
                cf.br ^bb284
              ^bb289:
                cf.br ^bb290
              ^bb290:
              %2914 = llvm.load %2855 : !llvm.ptr -> i32
              %2915 = arith.constant 1 : i32
              %2916 = arith.addi %2914, %2915 : i32
              llvm.store %2916, %2855 : i32, !llvm.ptr
              cf.br ^bb282
            ^bb284:
            %2917 = llvm.load %2852 : !llvm.ptr -> i1
            cf.cond_br %2917, ^bb291, ^bb292
            ^bb291:
              %2918 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
              %2919 = llvm.getelementptr %2825[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
              %2920 = llvm.load %2919 : !llvm.ptr -> i64
              %2922 = arith.extsi %2729 : i32 to i64
              %2923 = llvm.getelementptr %2552[0, %2922] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %2921 = llvm.load %2923 : !llvm.ptr -> !llvm.ptr
              %2925 = arith.extsi %2729 : i32 to i64
              %2926 = llvm.getelementptr %2575[0, %2925] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              %2924 = llvm.load %2926 : !llvm.ptr -> i32
              %2927 = arith.extsi %2924 : i32 to i64
              %2928 = llvm.getelementptr %2921[%2927] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              llvm.store %2920, %2928 : i64, !llvm.ptr
              %2929 = llvm.load %2825 : !llvm.ptr -> !llvm.struct<(i64, i64)>
              %2930 = llvm.getelementptr %2825[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
              %2931 = llvm.load %2930 : !llvm.ptr -> i64
              %2933 = arith.extsi %2729 : i32 to i64
              %2934 = llvm.getelementptr %2562[0, %2933] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %2932 = llvm.load %2934 : !llvm.ptr -> !llvm.ptr
              %2936 = arith.extsi %2729 : i32 to i64
              %2937 = llvm.getelementptr %2575[0, %2936] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              %2935 = llvm.load %2937 : !llvm.ptr -> i32
              %2938 = arith.extsi %2935 : i32 to i64
              %2939 = llvm.getelementptr %2932[%2938] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              llvm.store %2931, %2939 : i64, !llvm.ptr
              %2941 = arith.extsi %2729 : i32 to i64
              %2942 = llvm.getelementptr %2575[0, %2941] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              %2940 = llvm.load %2942 : !llvm.ptr -> i32
              %2943 = arith.constant 1 : i32
              %2944 = arith.addi %2940, %2943 : i32
              %2945 = arith.extsi %2729 : i32 to i64
              %2946 = llvm.getelementptr %2575[0, %2945] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              llvm.store %2944, %2946 : i32, !llvm.ptr
              cf.br ^bb293
            ^bb292:
              cf.br ^bb293
            ^bb293:
            cf.br ^bb278
          ^bb277:
            cf.br ^bb278
          ^bb278:
          %2947 = arith.constant 0 : i32
          %2948 = arith.cmpi sgt, %2768, %2947 : i32
          cf.cond_br %2948, ^bb294, ^bb295
          ^bb294:
            %2950 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
            %2951 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2952 = llvm.extractvalue %2950[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2953 = llvm.insertvalue %2952, %2951[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2954 = llvm.extractvalue %2950[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2955 = llvm.insertvalue %2954, %2953[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2956 = llvm.extractvalue %2950[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2957 = llvm.insertvalue %2956, %2955[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2958 = llvm.extractvalue %2950[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2959 = llvm.insertvalue %2958, %2957[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2960 = llvm.extractvalue %2950[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2961 = llvm.insertvalue %2960, %2959[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2949 = func.call @oneMinus(%2746, %2757, %2961) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
            %2962 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
            %2963 = llvm.extractvalue %2949[0] : !llvm.struct<(i64, i64)>
            %2964 = llvm.insertvalue %2963, %2962[0] : !llvm.struct<(i64, i64)>
            %2965 = llvm.extractvalue %2949[1] : !llvm.struct<(i64, i64)>
            %2966 = llvm.insertvalue %2965, %2964[1] : !llvm.struct<(i64, i64)>
            %2967 = llvm.mlir.constant(1 : i64) : i64
            %2968 = llvm.alloca %2967 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
            llvm.store %2966, %2968 : !llvm.struct<(i64, i64)>, !llvm.ptr
            %2969 = llvm.load %2968 : !llvm.ptr -> !llvm.struct<(i64, i64)>
            %2970 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2971 = llvm.extractvalue %2961[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2972 = llvm.insertvalue %2971, %2970[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2973 = llvm.extractvalue %2961[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2974 = llvm.insertvalue %2973, %2972[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2975 = llvm.extractvalue %2961[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2976 = llvm.insertvalue %2975, %2974[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2977 = llvm.extractvalue %2961[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2978 = llvm.insertvalue %2977, %2976[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2979 = llvm.extractvalue %2961[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2980 = llvm.insertvalue %2979, %2978[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
            %2981 = llvm.mlir.constant(1 : i64) : i64
            %2982 = llvm.alloca %2981 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
            llvm.store %2980, %2982 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
            %2983 = llvm.load %2982 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
            llvm.store %2983, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
            %2984 = llvm.mlir.constant(1 : i64) : i64
            %2985 = llvm.alloca %2984 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
            llvm.store %2969, %2985 : !llvm.struct<(i64, i64)>, !llvm.ptr
            %2986 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
            %2987 = llvm.getelementptr %2985[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
            %2988 = llvm.load %2987 : !llvm.ptr -> i64
            %2989 = arith.constant 31 : i32
            %2991 = arith.extsi %2989 : i32 to i64
            %2990 = arith.muli %2988, %2991 : i64
            %2992 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
            %2993 = llvm.getelementptr %2985[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
            %2994 = llvm.load %2993 : !llvm.ptr -> i64
            %2995 = arith.addi %2990, %2994 : i64
            %2996 = llvm.mlir.constant(1 : i64) : i64
            %2997 = llvm.alloca %2996 x i64 : (i64) -> !llvm.ptr
            llvm.store %2995, %2997 : i64, !llvm.ptr
            %2998 = llvm.load %2997 : !llvm.ptr -> i64
            %2999 = arith.constant 0 : i32
            %3001 = arith.extsi %2999 : i32 to i64
            %3000 = arith.cmpi slt, %2998, %3001 : i64
            cf.cond_br %3000, ^bb297, ^bb298
            ^bb297:
              %3002 = arith.constant 0 : i32
              %3003 = llvm.load %2997 : !llvm.ptr -> i64
              %3005 = arith.extsi %3002 : i32 to i64
              %3004 = arith.subi %3005, %3003 : i64
              llvm.store %3004, %2997 : i64, !llvm.ptr
              cf.br ^bb299
            ^bb298:
              cf.br ^bb299
            ^bb299:
            %3006 = llvm.load %2997 : !llvm.ptr -> i64
            %3007 = arith.extsi %2459 : i32 to i64
            %3008 = arith.andi %3006, %3007 : i64
            %3009 = arith.trunci %3008 : i64 to i32
            %3010 = arith.constant 0 : i1
            %3011 = llvm.mlir.constant(1 : i64) : i64
            %3012 = llvm.alloca %3011 x i1 : (i64) -> !llvm.ptr
            llvm.store %3010, %3012 : i1, !llvm.ptr
            %3013 = arith.constant 0 : i32
            %3014 = llvm.mlir.constant(1 : i64) : i64
            %3015 = llvm.alloca %3014 x i32 : (i64) -> !llvm.ptr
            llvm.store %3013, %3015 : i32, !llvm.ptr
            cf.br ^bb300
            ^bb300:
            %3016 = llvm.load %3015 : !llvm.ptr -> i32
            %3017 = arith.cmpi slt, %3016, %2457 : i32
            cf.cond_br %3017, ^bb301, ^bb302
            ^bb301:
              %3018 = llvm.load %3015 : !llvm.ptr -> i32
              %3019 = arith.addi %3009, %3018 : i32
              %3020 = arith.andi %3019, %2459 : i32
              %3023 = arith.extsi %2729 : i32 to i64
              %3024 = llvm.getelementptr %2518[0, %3023] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %3022 = llvm.load %3024 : !llvm.ptr -> !llvm.ptr
              %3025 = arith.extsi %3020 : i32 to i64
              %3026 = llvm.getelementptr %3022[%3025] : (!llvm.ptr, i64) -> !llvm.ptr, i32
              %3021 = llvm.load %3026 : !llvm.ptr -> i32
              %3027 = arith.constant 0 : i32
              %3028 = arith.cmpi eq, %3021, %3027 : i32
              cf.cond_br %3028, ^bb303, ^bb304
              ^bb303:
                %3029 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
                %3030 = llvm.getelementptr %2985[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
                %3031 = llvm.load %3030 : !llvm.ptr -> i64
                %3033 = arith.extsi %2729 : i32 to i64
                %3034 = llvm.getelementptr %2498[0, %3033] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %3032 = llvm.load %3034 : !llvm.ptr -> !llvm.ptr
                %3035 = arith.extsi %3020 : i32 to i64
                %3036 = llvm.getelementptr %3032[%3035] : (!llvm.ptr, i64) -> !llvm.ptr, i64
                llvm.store %3031, %3036 : i64, !llvm.ptr
                %3037 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
                %3038 = llvm.getelementptr %2985[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
                %3039 = llvm.load %3038 : !llvm.ptr -> i64
                %3041 = arith.extsi %2729 : i32 to i64
                %3042 = llvm.getelementptr %2508[0, %3041] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %3040 = llvm.load %3042 : !llvm.ptr -> !llvm.ptr
                %3043 = arith.extsi %3020 : i32 to i64
                %3044 = llvm.getelementptr %3040[%3043] : (!llvm.ptr, i64) -> !llvm.ptr, i64
                llvm.store %3039, %3044 : i64, !llvm.ptr
                %3045 = arith.constant 1 : i32
                %3047 = arith.extsi %2729 : i32 to i64
                %3048 = llvm.getelementptr %2518[0, %3047] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %3046 = llvm.load %3048 : !llvm.ptr -> !llvm.ptr
                %3049 = arith.extsi %3020 : i32 to i64
                %3050 = llvm.getelementptr %3046[%3049] : (!llvm.ptr, i64) -> !llvm.ptr, i32
                llvm.store %3045, %3050 : i32, !llvm.ptr
                %3051 = arith.constant 1 : i1
                llvm.store %3051, %3012 : i1, !llvm.ptr
                cf.br ^bb302
              ^bb304:
                cf.br ^bb305
              ^bb305:
              %3054 = arith.extsi %2729 : i32 to i64
              %3055 = llvm.getelementptr %2498[0, %3054] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %3053 = llvm.load %3055 : !llvm.ptr -> !llvm.ptr
              %3056 = arith.extsi %3020 : i32 to i64
              %3057 = llvm.getelementptr %3053[%3056] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              %3052 = llvm.load %3057 : !llvm.ptr -> i64
              %3058 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
              %3059 = llvm.getelementptr %2985[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
              %3060 = llvm.load %3059 : !llvm.ptr -> i64
              %3061 = arith.cmpi eq, %3052, %3060 : i64
              %3062 = scf.if %3061 -> (i1) {
                %3065 = arith.extsi %2729 : i32 to i64
                %3066 = llvm.getelementptr %2508[0, %3065] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
                %3064 = llvm.load %3066 : !llvm.ptr -> !llvm.ptr
                %3067 = arith.extsi %3020 : i32 to i64
                %3068 = llvm.getelementptr %3064[%3067] : (!llvm.ptr, i64) -> !llvm.ptr, i64
                %3063 = llvm.load %3068 : !llvm.ptr -> i64
                %3069 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
                %3070 = llvm.getelementptr %2985[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
                %3071 = llvm.load %3070 : !llvm.ptr -> i64
                %3072 = arith.cmpi eq, %3063, %3071 : i64
                scf.yield %3072 : i1
              } else {
                %3073 = arith.constant false
                scf.yield %3073 : i1
              }
              cf.cond_br %3062, ^bb306, ^bb307
              ^bb306:
                cf.br ^bb302
              ^bb307:
                cf.br ^bb308
              ^bb308:
              %3074 = llvm.load %3015 : !llvm.ptr -> i32
              %3075 = arith.constant 1 : i32
              %3076 = arith.addi %3074, %3075 : i32
              llvm.store %3076, %3015 : i32, !llvm.ptr
              cf.br ^bb300
            ^bb302:
            %3077 = llvm.load %3012 : !llvm.ptr -> i1
            cf.cond_br %3077, ^bb309, ^bb310
            ^bb309:
              %3078 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
              %3079 = llvm.getelementptr %2985[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
              %3080 = llvm.load %3079 : !llvm.ptr -> i64
              %3082 = arith.extsi %2729 : i32 to i64
              %3083 = llvm.getelementptr %2552[0, %3082] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %3081 = llvm.load %3083 : !llvm.ptr -> !llvm.ptr
              %3085 = arith.extsi %2729 : i32 to i64
              %3086 = llvm.getelementptr %2575[0, %3085] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              %3084 = llvm.load %3086 : !llvm.ptr -> i32
              %3087 = arith.extsi %3084 : i32 to i64
              %3088 = llvm.getelementptr %3081[%3087] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              llvm.store %3080, %3088 : i64, !llvm.ptr
              %3089 = llvm.load %2985 : !llvm.ptr -> !llvm.struct<(i64, i64)>
              %3090 = llvm.getelementptr %2985[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
              %3091 = llvm.load %3090 : !llvm.ptr -> i64
              %3093 = arith.extsi %2729 : i32 to i64
              %3094 = llvm.getelementptr %2562[0, %3093] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
              %3092 = llvm.load %3094 : !llvm.ptr -> !llvm.ptr
              %3096 = arith.extsi %2729 : i32 to i64
              %3097 = llvm.getelementptr %2575[0, %3096] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              %3095 = llvm.load %3097 : !llvm.ptr -> i32
              %3098 = arith.extsi %3095 : i32 to i64
              %3099 = llvm.getelementptr %3092[%3098] : (!llvm.ptr, i64) -> !llvm.ptr, i64
              llvm.store %3091, %3099 : i64, !llvm.ptr
              %3101 = arith.extsi %2729 : i32 to i64
              %3102 = llvm.getelementptr %2575[0, %3101] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              %3100 = llvm.load %3102 : !llvm.ptr -> i32
              %3103 = arith.constant 1 : i32
              %3104 = arith.addi %3100, %3103 : i32
              %3105 = arith.extsi %2729 : i32 to i64
              %3106 = llvm.getelementptr %2575[0, %3105] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i32>
              llvm.store %3104, %3106 : i32, !llvm.ptr
              cf.br ^bb311
            ^bb310:
              cf.br ^bb311
            ^bb311:
            cf.br ^bb296
          ^bb295:
            cf.br ^bb296
          ^bb296:
          cf.br ^bb273
        ^bb275:
        %3107 = llvm.load %2585 : !llvm.ptr -> i32
        %3108 = arith.constant 1 : i32
        %3109 = arith.addi %3107, %3108 : i32
        llvm.store %3109, %2585 : i32, !llvm.ptr
        cf.br ^bb270
      ^bb272:
      cf.br ^bb267
    ^bb269:
    %3111 = arith.extsi %2457 : i32 to i64
    %3112 = arith.constant 8 : i32
    %3113 = arith.extsi %3112 : i32 to i64
    %3110 = func.call @calloc(%3111, %3113) : (i64, i64) -> !llvm.ptr
    %3115 = arith.extsi %2457 : i32 to i64
    %3116 = arith.constant 8 : i32
    %3117 = arith.extsi %3116 : i32 to i64
    %3114 = func.call @calloc(%3115, %3117) : (i64, i64) -> !llvm.ptr
    %3119 = arith.extsi %2457 : i32 to i64
    %3120 = arith.constant 8 : i32
    %3121 = arith.extsi %3120 : i32 to i64
    %3118 = func.call @calloc(%3119, %3121) : (i64, i64) -> !llvm.ptr
    %3123 = arith.extsi %2457 : i32 to i64
    %3124 = arith.constant 8 : i32
    %3125 = arith.extsi %3124 : i32 to i64
    %3122 = func.call @calloc(%3123, %3125) : (i64, i64) -> !llvm.ptr
    %3127 = arith.extsi %2457 : i32 to i64
    %3128 = arith.constant 8 : i32
    %3129 = arith.extsi %3128 : i32 to i64
    %3126 = func.call @calloc(%3127, %3129) : (i64, i64) -> !llvm.ptr
    %3131 = arith.extsi %2457 : i32 to i64
    %3132 = arith.constant 8 : i32
    %3133 = arith.extsi %3132 : i32 to i64
    %3130 = func.call @calloc(%3131, %3133) : (i64, i64) -> !llvm.ptr
    %3135 = llvm.mlir.constant(1 : i64) : i64
    %3136 = llvm.alloca %3135 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %3137 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %3137, %3136 : !llvm.array<3 x ptr>, !llvm.ptr
    %3138 = llvm.mlir.constant(0 : i64) : i64
    %3139 = llvm.getelementptr %3136[0, %3138] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %3110, %3139 : !llvm.ptr, !llvm.ptr
    %3140 = llvm.mlir.constant(1 : i64) : i64
    %3141 = llvm.getelementptr %3136[0, %3140] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %3114, %3141 : !llvm.ptr, !llvm.ptr
    %3142 = llvm.mlir.constant(2 : i64) : i64
    %3143 = llvm.getelementptr %3136[0, %3142] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %3118, %3143 : !llvm.ptr, !llvm.ptr
    %3145 = llvm.mlir.constant(1 : i64) : i64
    %3146 = llvm.alloca %3145 x !llvm.array<3 x ptr> : (i64) -> !llvm.ptr
    %3147 = llvm.mlir.zero : !llvm.array<3 x ptr>
    llvm.store %3147, %3146 : !llvm.array<3 x ptr>, !llvm.ptr
    %3148 = llvm.mlir.constant(0 : i64) : i64
    %3149 = llvm.getelementptr %3146[0, %3148] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %3122, %3149 : !llvm.ptr, !llvm.ptr
    %3150 = llvm.mlir.constant(1 : i64) : i64
    %3151 = llvm.getelementptr %3146[0, %3150] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %3126, %3151 : !llvm.ptr, !llvm.ptr
    %3152 = llvm.mlir.constant(2 : i64) : i64
    %3153 = llvm.getelementptr %3146[0, %3152] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
    llvm.store %3130, %3153 : !llvm.ptr, !llvm.ptr
    %3154 = arith.constant 1 : i32
    %3156 = arith.constant 0 : i32
    %3155 = arith.subi %3156, %3154 : i32
    %3157 = llvm.mlir.constant(1 : i64) : i64
    %3158 = llvm.alloca %3157 x i32 : (i64) -> !llvm.ptr
    llvm.store %3155, %3158 : i32, !llvm.ptr
    %3159 = arith.constant 0 : i32
    llvm.store %3159, %2585 : i32, !llvm.ptr
    cf.br ^bb312
    ^bb312:
    %3160 = llvm.load %2585 : !llvm.ptr -> i32
    %3161 = arith.constant 3 : i32
    %3162 = arith.cmpi slt, %3160, %3161 : i32
    cf.cond_br %3162, ^bb313, ^bb314
    ^bb313:
      %3163 = arith.constant 0 : i32
      %3164 = llvm.mlir.constant(1 : i64) : i64
      %3165 = llvm.alloca %3164 x i32 : (i64) -> !llvm.ptr
      llvm.store %3163, %3165 : i32, !llvm.ptr
      %3166 = arith.constant 0 : i32
      %3167 = llvm.mlir.constant(1 : i64) : i64
      %3168 = llvm.alloca %3167 x i32 : (i64) -> !llvm.ptr
      llvm.store %3166, %3168 : i32, !llvm.ptr
      cf.br ^bb315
      ^bb315:
      %3169 = llvm.load %3168 : !llvm.ptr -> i32
      %3170 = arith.cmpi slt, %3169, %2457 : i32
      cf.cond_br %3170, ^bb316, ^bb317
      ^bb316:
        %3173 = llvm.load %2585 : !llvm.ptr -> i32
        %3174 = arith.extsi %3173 : i32 to i64
        %3175 = llvm.getelementptr %2518[0, %3174] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
        %3172 = llvm.load %3175 : !llvm.ptr -> !llvm.ptr
        %3176 = llvm.load %3168 : !llvm.ptr -> i32
        %3177 = arith.extsi %3176 : i32 to i64
        %3178 = llvm.getelementptr %3172[%3177] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %3171 = llvm.load %3178 : !llvm.ptr -> i32
        %3179 = arith.constant 0 : i32
        %3180 = arith.cmpi ne, %3171, %3179 : i32
        cf.cond_br %3180, ^bb318, ^bb319
        ^bb318:
          %3183 = llvm.load %2585 : !llvm.ptr -> i32
          %3184 = arith.extsi %3183 : i32 to i64
          %3185 = llvm.getelementptr %2498[0, %3184] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %3182 = llvm.load %3185 : !llvm.ptr -> !llvm.ptr
          %3186 = llvm.load %3168 : !llvm.ptr -> i32
          %3187 = arith.extsi %3186 : i32 to i64
          %3188 = llvm.getelementptr %3182[%3187] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %3181 = llvm.load %3188 : !llvm.ptr -> i64
          %3190 = llvm.load %2585 : !llvm.ptr -> i32
          %3191 = arith.extsi %3190 : i32 to i64
          %3192 = llvm.getelementptr %3136[0, %3191] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %3189 = llvm.load %3192 : !llvm.ptr -> !llvm.ptr
          %3193 = llvm.load %3165 : !llvm.ptr -> i32
          %3194 = arith.extsi %3193 : i32 to i64
          %3195 = llvm.getelementptr %3189[%3194] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %3181, %3195 : i64, !llvm.ptr
          %3198 = llvm.load %2585 : !llvm.ptr -> i32
          %3199 = arith.extsi %3198 : i32 to i64
          %3200 = llvm.getelementptr %2508[0, %3199] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %3197 = llvm.load %3200 : !llvm.ptr -> !llvm.ptr
          %3201 = llvm.load %3168 : !llvm.ptr -> i32
          %3202 = arith.extsi %3201 : i32 to i64
          %3203 = llvm.getelementptr %3197[%3202] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %3196 = llvm.load %3203 : !llvm.ptr -> i64
          %3205 = llvm.load %2585 : !llvm.ptr -> i32
          %3206 = arith.extsi %3205 : i32 to i64
          %3207 = llvm.getelementptr %3146[0, %3206] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %3204 = llvm.load %3207 : !llvm.ptr -> !llvm.ptr
          %3208 = llvm.load %3165 : !llvm.ptr -> i32
          %3209 = arith.extsi %3208 : i32 to i64
          %3210 = llvm.getelementptr %3204[%3209] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %3196, %3210 : i64, !llvm.ptr
          %3211 = llvm.load %3165 : !llvm.ptr -> i32
          %3212 = arith.constant 1 : i32
          %3213 = arith.addi %3211, %3212 : i32
          llvm.store %3213, %3165 : i32, !llvm.ptr
          cf.br ^bb320
        ^bb319:
          cf.br ^bb320
        ^bb320:
        %3214 = llvm.load %3168 : !llvm.ptr -> i32
        %3215 = arith.constant 1 : i32
        %3216 = arith.addi %3214, %3215 : i32
        llvm.store %3216, %3168 : i32, !llvm.ptr
        cf.br ^bb315
      ^bb317:
      %3219 = llvm.load %2585 : !llvm.ptr -> i32
      %3220 = arith.extsi %3219 : i32 to i64
      %3221 = llvm.getelementptr %3136[0, %3220] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %3218 = llvm.load %3221 : !llvm.ptr -> !llvm.ptr
      %3223 = llvm.load %2585 : !llvm.ptr -> i32
      %3224 = arith.extsi %3223 : i32 to i64
      %3225 = llvm.getelementptr %3146[0, %3224] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
      %3222 = llvm.load %3225 : !llvm.ptr -> !llvm.ptr
      %3226 = llvm.load %3165 : !llvm.ptr -> i32
      %3227 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
      %3228 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
      %3229 = llvm.load %3228 : !llvm.ptr -> i64
      %3230 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
      %3231 = llvm.getelementptr %2122[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
      %3232 = llvm.load %3231 : !llvm.ptr -> i32
      func.call @sortPoints(%3218, %3222, %3226, %3229, %3232) : (!llvm.ptr, !llvm.ptr, i32, i64, i32) -> ()
      %3233 = llvm.load %3158 : !llvm.ptr -> i32
      %3234 = arith.constant 0 : i32
      %3235 = arith.cmpi slt, %3233, %3234 : i32
      cf.cond_br %3235, ^bb321, ^bb322
      ^bb321:
        %3236 = llvm.load %3165 : !llvm.ptr -> i32
        llvm.store %3236, %3158 : i32, !llvm.ptr
        cf.br ^bb323
      ^bb322:
        cf.br ^bb323
      ^bb323:
      %3237 = llvm.load %3158 : !llvm.ptr -> i32
      %3238 = llvm.load %3165 : !llvm.ptr -> i32
      %3239 = arith.cmpi ne, %3237, %3238 : i32
      cf.cond_br %3239, ^bb324, ^bb325
      ^bb324:
        %3240 = llvm.mlir.addressof @str_0 : !llvm.ptr
        %3241 = llvm.call @printf(%3240, %arg0, %arg1, %arg2) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i32, i32, i32) -> i32
        func.call @free(%2460) : (!llvm.ptr) -> ()
        func.call @free(%2464) : (!llvm.ptr) -> ()
        func.call @free(%2468) : (!llvm.ptr) -> ()
        func.call @free(%2472) : (!llvm.ptr) -> ()
        func.call @free(%2476) : (!llvm.ptr) -> ()
        func.call @free(%2480) : (!llvm.ptr) -> ()
        func.call @free(%2484) : (!llvm.ptr) -> ()
        func.call @free(%2488) : (!llvm.ptr) -> ()
        func.call @free(%2492) : (!llvm.ptr) -> ()
        func.call @free(%2526) : (!llvm.ptr) -> ()
        func.call @free(%2530) : (!llvm.ptr) -> ()
        func.call @free(%2534) : (!llvm.ptr) -> ()
        func.call @free(%2538) : (!llvm.ptr) -> ()
        func.call @free(%2542) : (!llvm.ptr) -> ()
        func.call @free(%2546) : (!llvm.ptr) -> ()
        func.call @free(%3110) : (!llvm.ptr) -> ()
        func.call @free(%3114) : (!llvm.ptr) -> ()
        func.call @free(%3118) : (!llvm.ptr) -> ()
        func.call @free(%3122) : (!llvm.ptr) -> ()
        func.call @free(%3126) : (!llvm.ptr) -> ()
        func.call @free(%3130) : (!llvm.ptr) -> ()
        %3263 = arith.constant 1 : i32
        %3265 = arith.constant 0 : i32
        %3264 = arith.subi %3265, %3263 : i32
        %3266 = arith.extsi %3264 : i32 to i64
        func.return %3266 : i64
      ^bb325:
        cf.br ^bb326
      ^bb326:
      %3267 = llvm.load %2585 : !llvm.ptr -> i32
      %3268 = arith.constant 1 : i32
      %3269 = arith.addi %3267, %3268 : i32
      llvm.store %3269, %2585 : i32, !llvm.ptr
      cf.br ^bb312
    ^bb314:
    %3270 = arith.constant 3 : i32
    %3271 = llvm.load %3158 : !llvm.ptr -> i32
    %3272 = arith.muli %3270, %3271 : i32
    %3274 = arith.extsi %3272 : i32 to i64
    %3275 = arith.constant 4 : i32
    %3276 = arith.extsi %3275 : i32 to i64
    %3273 = func.call @calloc(%3274, %3276) : (i64, i64) -> !llvm.ptr
    %3278 = arith.extsi %3272 : i32 to i64
    %3279 = arith.constant 4 : i32
    %3280 = arith.extsi %3279 : i32 to i64
    %3277 = func.call @calloc(%3278, %3280) : (i64, i64) -> !llvm.ptr
    %3281 = arith.constant 0 : i32
    llvm.store %3281, %2585 : i32, !llvm.ptr
    cf.br ^bb327
    ^bb327:
    %3282 = llvm.load %2585 : !llvm.ptr -> i32
    %3283 = arith.constant 3 : i32
    %3284 = arith.cmpi slt, %3282, %3283 : i32
    cf.cond_br %3284, ^bb328, ^bb329
    ^bb328:
      %3285 = arith.constant 0 : i32
      %3286 = llvm.mlir.constant(1 : i64) : i64
      %3287 = llvm.alloca %3286 x i32 : (i64) -> !llvm.ptr
      llvm.store %3285, %3287 : i32, !llvm.ptr
      cf.br ^bb330
      ^bb330:
      %3288 = llvm.load %3287 : !llvm.ptr -> i32
      %3289 = llvm.load %3158 : !llvm.ptr -> i32
      %3290 = arith.cmpi slt, %3288, %3289 : i32
      cf.cond_br %3290, ^bb331, ^bb332
      ^bb331:
        %3293 = llvm.load %2585 : !llvm.ptr -> i32
        %3294 = arith.extsi %3293 : i32 to i64
        %3295 = llvm.getelementptr %3136[0, %3294] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
        %3292 = llvm.load %3295 : !llvm.ptr -> !llvm.ptr
        %3296 = llvm.load %3287 : !llvm.ptr -> i32
        %3297 = arith.extsi %3296 : i32 to i64
        %3298 = llvm.getelementptr %3292[%3297] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %3291 = llvm.load %3298 : !llvm.ptr -> i64
        %3301 = llvm.load %2585 : !llvm.ptr -> i32
        %3302 = arith.extsi %3301 : i32 to i64
        %3303 = llvm.getelementptr %3146[0, %3302] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
        %3300 = llvm.load %3303 : !llvm.ptr -> !llvm.ptr
        %3304 = llvm.load %3287 : !llvm.ptr -> i32
        %3305 = arith.extsi %3304 : i32 to i64
        %3306 = llvm.getelementptr %3300[%3305] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %3299 = llvm.load %3306 : !llvm.ptr -> i64
        %3307 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
        %3308 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
        %3309 = llvm.load %3308 : !llvm.ptr -> i64
        %3310 = llvm.mlir.constant(1 : i64) : i64
        %3311 = llvm.alloca %3310 x i64 : (i64) -> !llvm.ptr
        llvm.store %3309, %3311 : i64, !llvm.ptr
        %3312 = arith.constant 0 : i32
        %3313 = arith.extsi %3312 : i32 to i64
        %3314 = llvm.mlir.constant(1 : i64) : i64
        %3315 = llvm.alloca %3314 x i64 : (i64) -> !llvm.ptr
        llvm.store %3313, %3315 : i64, !llvm.ptr
        %3316 = llvm.load %3287 : !llvm.ptr -> i32
        %3317 = arith.constant 1 : i32
        %3318 = arith.addi %3316, %3317 : i32
        %3319 = llvm.load %3158 : !llvm.ptr -> i32
        %3320 = arith.cmpi slt, %3318, %3319 : i32
        cf.cond_br %3320, ^bb333, ^bb334
        ^bb333:
          %3323 = llvm.load %2585 : !llvm.ptr -> i32
          %3324 = arith.extsi %3323 : i32 to i64
          %3325 = llvm.getelementptr %3136[0, %3324] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %3322 = llvm.load %3325 : !llvm.ptr -> !llvm.ptr
          %3326 = llvm.load %3287 : !llvm.ptr -> i32
          %3327 = arith.constant 1 : i32
          %3328 = arith.addi %3326, %3327 : i32
          %3329 = arith.extsi %3328 : i32 to i64
          %3330 = llvm.getelementptr %3322[%3329] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %3321 = llvm.load %3330 : !llvm.ptr -> i64
          llvm.store %3321, %3311 : i64, !llvm.ptr
          %3333 = llvm.load %2585 : !llvm.ptr -> i32
          %3334 = arith.extsi %3333 : i32 to i64
          %3335 = llvm.getelementptr %3146[0, %3334] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
          %3332 = llvm.load %3335 : !llvm.ptr -> !llvm.ptr
          %3336 = llvm.load %3287 : !llvm.ptr -> i32
          %3337 = arith.constant 1 : i32
          %3338 = arith.addi %3336, %3337 : i32
          %3339 = arith.extsi %3338 : i32 to i64
          %3340 = llvm.getelementptr %3332[%3339] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %3331 = llvm.load %3340 : !llvm.ptr -> i64
          llvm.store %3331, %3315 : i64, !llvm.ptr
          cf.br ^bb335
        ^bb334:
          cf.br ^bb335
        ^bb335:
        %3343 = llvm.load %2585 : !llvm.ptr -> i32
        %3344 = arith.extsi %3343 : i32 to i64
        %3345 = llvm.getelementptr %2263[0, %3344] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
        %3342 = llvm.load %3345 : !llvm.ptr -> i64
        %3347 = llvm.load %2585 : !llvm.ptr -> i32
        %3348 = arith.extsi %3347 : i32 to i64
        %3349 = llvm.getelementptr %2282[0, %3348] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
        %3346 = llvm.load %3349 : !llvm.ptr -> i64
        %3350 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
        %3351 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
        %3352 = llvm.load %3351 : !llvm.ptr -> i64
        %3353 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
        %3354 = llvm.getelementptr %2122[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
        %3355 = llvm.load %3354 : !llvm.ptr -> i32
        %3341 = func.call @cmpPoints(%3291, %3299, %3342, %3346, %3352, %3355) : (i64, i64, i64, i64, i64, i32) -> i32
        %3356 = arith.constant 0 : i32
        %3357 = arith.cmpi slt, %3341, %3356 : i32
        %3358 = arith.constant 0 : i32
        %3359 = arith.extsi %3358 : i32 to i64
        %3360 = llvm.mlir.constant(1 : i64) : i64
        %3361 = llvm.alloca %3360 x i64 : (i64) -> !llvm.ptr
        llvm.store %3359, %3361 : i64, !llvm.ptr
        %3362 = arith.constant 0 : i32
        %3363 = arith.extsi %3362 : i32 to i64
        %3364 = llvm.mlir.constant(1 : i64) : i64
        %3365 = llvm.alloca %3364 x i64 : (i64) -> !llvm.ptr
        llvm.store %3363, %3365 : i64, !llvm.ptr
        cf.cond_br %3357, ^bb336, ^bb337
        ^bb336:
          %3367 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
          %3368 = llvm.load %3315 : !llvm.ptr -> i64
          %3369 = llvm.load %3311 : !llvm.ptr -> i64
          %3370 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3371 = llvm.extractvalue %3367[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3372 = llvm.insertvalue %3371, %3370[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3373 = llvm.extractvalue %3367[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3374 = llvm.insertvalue %3373, %3372[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3375 = llvm.extractvalue %3367[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3376 = llvm.insertvalue %3375, %3374[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3377 = llvm.extractvalue %3367[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3378 = llvm.insertvalue %3377, %3376[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3379 = llvm.extractvalue %3367[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3380 = llvm.insertvalue %3379, %3378[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3366 = func.call @oneMinus(%3369, %3368, %3380) : (i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
          %3381 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
          %3382 = llvm.extractvalue %3366[0] : !llvm.struct<(i64, i64)>
          %3383 = llvm.insertvalue %3382, %3381[0] : !llvm.struct<(i64, i64)>
          %3384 = llvm.extractvalue %3366[1] : !llvm.struct<(i64, i64)>
          %3385 = llvm.insertvalue %3384, %3383[1] : !llvm.struct<(i64, i64)>
          %3386 = llvm.mlir.constant(1 : i64) : i64
          %3387 = llvm.alloca %3386 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
          llvm.store %3385, %3387 : !llvm.struct<(i64, i64)>, !llvm.ptr
          %3388 = llvm.load %3387 : !llvm.ptr -> !llvm.struct<(i64, i64)>
          %3389 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3390 = llvm.extractvalue %3380[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3391 = llvm.insertvalue %3390, %3389[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3392 = llvm.extractvalue %3380[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3393 = llvm.insertvalue %3392, %3391[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3394 = llvm.extractvalue %3380[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3395 = llvm.insertvalue %3394, %3393[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3396 = llvm.extractvalue %3380[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3397 = llvm.insertvalue %3396, %3395[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3398 = llvm.extractvalue %3380[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3399 = llvm.insertvalue %3398, %3397[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3400 = llvm.mlir.constant(1 : i64) : i64
          %3401 = llvm.alloca %3400 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
          llvm.store %3399, %3401 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
          %3402 = llvm.load %3401 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
          llvm.store %3402, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
          %3403 = llvm.mlir.constant(1 : i64) : i64
          %3404 = llvm.alloca %3403 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
          llvm.store %3388, %3404 : !llvm.struct<(i64, i64)>, !llvm.ptr
          %3405 = llvm.load %3404 : !llvm.ptr -> !llvm.struct<(i64, i64)>
          %3406 = llvm.getelementptr %3404[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
          %3407 = llvm.load %3406 : !llvm.ptr -> i64
          llvm.store %3407, %3361 : i64, !llvm.ptr
          %3408 = llvm.load %3404 : !llvm.ptr -> !llvm.struct<(i64, i64)>
          %3409 = llvm.getelementptr %3404[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
          %3410 = llvm.load %3409 : !llvm.ptr -> i64
          llvm.store %3410, %3365 : i64, !llvm.ptr
          cf.br ^bb338
        ^bb337:
          %3412 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
          %3414 = llvm.load %2585 : !llvm.ptr -> i32
          %3415 = arith.extsi %3414 : i32 to i64
          %3416 = llvm.getelementptr %2282[0, %3415] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
          %3413 = llvm.load %3416 : !llvm.ptr -> i64
          %3418 = llvm.load %2585 : !llvm.ptr -> i32
          %3419 = arith.extsi %3418 : i32 to i64
          %3420 = llvm.getelementptr %2263[0, %3419] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x i64>
          %3417 = llvm.load %3420 : !llvm.ptr -> i64
          %3421 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3422 = llvm.extractvalue %3412[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3423 = llvm.insertvalue %3422, %3421[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3424 = llvm.extractvalue %3412[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3425 = llvm.insertvalue %3424, %3423[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3426 = llvm.extractvalue %3412[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3427 = llvm.insertvalue %3426, %3425[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3428 = llvm.extractvalue %3412[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3429 = llvm.insertvalue %3428, %3427[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3430 = llvm.extractvalue %3412[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3431 = llvm.insertvalue %3430, %3429[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3411 = func.call @subP(%3291, %3299, %3417, %3413, %3431) : (i64, i64, i64, i64, !llvm.struct<(i32, i32, i32, i64, f64)>) -> !llvm.struct<(i64, i64)>
          %3432 = llvm.mlir.undef : !llvm.struct<(i64, i64)>
          %3433 = llvm.extractvalue %3411[0] : !llvm.struct<(i64, i64)>
          %3434 = llvm.insertvalue %3433, %3432[0] : !llvm.struct<(i64, i64)>
          %3435 = llvm.extractvalue %3411[1] : !llvm.struct<(i64, i64)>
          %3436 = llvm.insertvalue %3435, %3434[1] : !llvm.struct<(i64, i64)>
          %3437 = llvm.mlir.constant(1 : i64) : i64
          %3438 = llvm.alloca %3437 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
          llvm.store %3436, %3438 : !llvm.struct<(i64, i64)>, !llvm.ptr
          %3439 = llvm.load %3438 : !llvm.ptr -> !llvm.struct<(i64, i64)>
          %3440 = llvm.mlir.undef : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3441 = llvm.extractvalue %3431[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3442 = llvm.insertvalue %3441, %3440[0] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3443 = llvm.extractvalue %3431[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3444 = llvm.insertvalue %3443, %3442[1] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3445 = llvm.extractvalue %3431[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3446 = llvm.insertvalue %3445, %3444[2] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3447 = llvm.extractvalue %3431[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3448 = llvm.insertvalue %3447, %3446[3] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3449 = llvm.extractvalue %3431[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3450 = llvm.insertvalue %3449, %3448[4] : !llvm.struct<(i32, i32, i32, i64, f64)>
          %3451 = llvm.mlir.constant(1 : i64) : i64
          %3452 = llvm.alloca %3451 x !llvm.struct<(i32, i32, i32, i64, f64)> : (i64) -> !llvm.ptr
          llvm.store %3450, %3452 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
          %3453 = llvm.load %3452 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
          llvm.store %3453, %2122 : !llvm.struct<(i32, i32, i32, i64, f64)>, !llvm.ptr
          %3454 = llvm.mlir.constant(1 : i64) : i64
          %3455 = llvm.alloca %3454 x !llvm.struct<(i64, i64)> : (i64) -> !llvm.ptr
          llvm.store %3439, %3455 : !llvm.struct<(i64, i64)>, !llvm.ptr
          %3456 = llvm.load %3455 : !llvm.ptr -> !llvm.struct<(i64, i64)>
          %3457 = llvm.getelementptr %3455[0, 0] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
          %3458 = llvm.load %3457 : !llvm.ptr -> i64
          llvm.store %3458, %3361 : i64, !llvm.ptr
          %3459 = llvm.load %3455 : !llvm.ptr -> !llvm.struct<(i64, i64)>
          %3460 = llvm.getelementptr %3455[0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)>
          %3461 = llvm.load %3460 : !llvm.ptr -> i64
          llvm.store %3461, %3365 : i64, !llvm.ptr
          cf.br ^bb338
        ^bb338:
        %3462 = llvm.load %2585 : !llvm.ptr -> i32
        %3463 = arith.constant 1 : i32
        %3464 = arith.addi %3462, %3463 : i32
        %3465 = arith.constant 3 : i32
        %3466 = arith.remsi %3464, %3465 : i32
        %3469 = arith.extsi %3466 : i32 to i64
        %3470 = llvm.getelementptr %3136[0, %3469] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
        %3468 = llvm.load %3470 : !llvm.ptr -> !llvm.ptr
        %3472 = arith.extsi %3466 : i32 to i64
        %3473 = llvm.getelementptr %3146[0, %3472] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<3 x ptr>
        %3471 = llvm.load %3473 : !llvm.ptr -> !llvm.ptr
        %3474 = llvm.load %3158 : !llvm.ptr -> i32
        %3475 = llvm.load %3361 : !llvm.ptr -> i64
        %3476 = llvm.load %3365 : !llvm.ptr -> i64
        %3477 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
        %3478 = llvm.getelementptr %2122[0, 3] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
        %3479 = llvm.load %3478 : !llvm.ptr -> i64
        %3480 = llvm.load %2122 : !llvm.ptr -> !llvm.struct<(i32, i32, i32, i64, f64)>
        %3481 = llvm.getelementptr %2122[0, 2] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i32, i32, i32, i64, f64)>
        %3482 = llvm.load %3481 : !llvm.ptr -> i32
        %3467 = func.call @findIntervalIndex(%3468, %3471, %3474, %3475, %3476, %3479, %3482) : (!llvm.ptr, !llvm.ptr, i32, i64, i64, i64, i32) -> i32
        %3483 = llvm.load %2585 : !llvm.ptr -> i32
        %3484 = llvm.load %3158 : !llvm.ptr -> i32
        %3485 = arith.muli %3483, %3484 : i32
        %3486 = llvm.load %3287 : !llvm.ptr -> i32
        %3487 = arith.addi %3485, %3486 : i32
        %3488 = llvm.load %3158 : !llvm.ptr -> i32
        %3489 = arith.muli %3466, %3488 : i32
        %3490 = arith.addi %3489, %3467 : i32
        %3491 = arith.extsi %3487 : i32 to i64
        %3492 = llvm.getelementptr %3273[%3491] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %3490, %3492 : i32, !llvm.ptr
        %3493 = scf.if %3357 -> (i32) {
          %3494 = arith.constant 1 : i32
          scf.yield %3494 : i32
        } else {
          %3495 = arith.constant 0 : i32
          scf.yield %3495 : i32
        }
        %3496 = arith.extsi %3487 : i32 to i64
        %3497 = llvm.getelementptr %3277[%3496] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %3493, %3497 : i32, !llvm.ptr
        %3498 = llvm.load %3287 : !llvm.ptr -> i32
        %3499 = arith.constant 1 : i32
        %3500 = arith.addi %3498, %3499 : i32
        llvm.store %3500, %3287 : i32, !llvm.ptr
        cf.br ^bb330
      ^bb332:
      %3501 = llvm.load %2585 : !llvm.ptr -> i32
      %3502 = arith.constant 1 : i32
      %3503 = arith.addi %3501, %3502 : i32
      llvm.store %3503, %2585 : i32, !llvm.ptr
      cf.br ^bb327
    ^bb329:
    %3505 = llvm.load %3158 : !llvm.ptr -> i32
    %3504 = func.call @solvePermutation(%3273, %3277, %3272, %3505) : (!llvm.ptr, !llvm.ptr, i32, i32) -> i64
    func.call @free(%2460) : (!llvm.ptr) -> ()
    func.call @free(%2464) : (!llvm.ptr) -> ()
    func.call @free(%2468) : (!llvm.ptr) -> ()
    func.call @free(%2472) : (!llvm.ptr) -> ()
    func.call @free(%2476) : (!llvm.ptr) -> ()
    func.call @free(%2480) : (!llvm.ptr) -> ()
    func.call @free(%2484) : (!llvm.ptr) -> ()
    func.call @free(%2488) : (!llvm.ptr) -> ()
    func.call @free(%2492) : (!llvm.ptr) -> ()
    func.call @free(%2526) : (!llvm.ptr) -> ()
    func.call @free(%2530) : (!llvm.ptr) -> ()
    func.call @free(%2534) : (!llvm.ptr) -> ()
    func.call @free(%2538) : (!llvm.ptr) -> ()
    func.call @free(%2542) : (!llvm.ptr) -> ()
    func.call @free(%2546) : (!llvm.ptr) -> ()
    func.call @free(%3110) : (!llvm.ptr) -> ()
    func.call @free(%3114) : (!llvm.ptr) -> ()
    func.call @free(%3118) : (!llvm.ptr) -> ()
    func.call @free(%3122) : (!llvm.ptr) -> ()
    func.call @free(%3126) : (!llvm.ptr) -> ()
    func.call @free(%3130) : (!llvm.ptr) -> ()
    func.call @free(%3273) : (!llvm.ptr) -> ()
    func.call @free(%3277) : (!llvm.ptr) -> ()
    func.return %3504 : i64
  }
  func.func @F(%arg0: i32, %arg1: i32, %arg2: i32) -> i64 {
    %3529 = arith.constant 0 : i32
    %3530 = arith.extsi %3529 : i32 to i64
    %3531 = func.call @isSquare(%arg2) : (i32) -> i1
    %3532 = scf.if %3531 -> (i64) {
      %3533 = func.call @F_square(%arg0, %arg1, %arg2) : (i32, i32, i32) -> i64
      scf.yield %3533 : i64
    } else {
      %3534 = func.call @F_nonsquare(%arg0, %arg1, %arg2) : (i32, i32, i32) -> i64
      scf.yield %3534 : i64
    }
    func.return %3532 : i64
  }
  func.func @computeG(%arg0: i32) -> i64 {
    %3535 = arith.constant 0 : i32
    %3536 = arith.extsi %3535 : i32 to i64
    %3537 = llvm.mlir.constant(1 : i64) : i64
    %3538 = llvm.alloca %3537 x i64 : (i64) -> !llvm.ptr
    llvm.store %3536, %3538 : i64, !llvm.ptr
    %3539 = arith.constant 9 : i32
    %3540 = llvm.mlir.constant(1 : i64) : i64
    %3541 = llvm.alloca %3540 x i32 : (i64) -> !llvm.ptr
    llvm.store %3539, %3541 : i32, !llvm.ptr
    cf.br ^bb339
    ^bb339:
    %3542 = llvm.load %3541 : !llvm.ptr -> i32
    %3543 = arith.constant 2 : i32
    %3544 = arith.subi %arg0, %3543 : i32
    %3545 = arith.cmpi sle, %3542, %3544 : i32
    cf.cond_br %3545, ^bb340, ^bb341
    ^bb340:
      %3546 = llvm.load %3541 : !llvm.ptr -> i32
      %3547 = arith.constant 1 : i32
      %3548 = arith.addi %3546, %3547 : i32
      %3549 = llvm.mlir.constant(1 : i64) : i64
      %3550 = llvm.alloca %3549 x i32 : (i64) -> !llvm.ptr
      llvm.store %3548, %3550 : i32, !llvm.ptr
      cf.br ^bb342
      ^bb342:
      %3551 = llvm.load %3550 : !llvm.ptr -> i32
      %3552 = arith.constant 1 : i32
      %3553 = arith.subi %arg0, %3552 : i32
      %3554 = arith.cmpi sle, %3551, %3553 : i32
      cf.cond_br %3554, ^bb343, ^bb344
      ^bb343:
        %3555 = llvm.load %3550 : !llvm.ptr -> i32
        %3556 = arith.constant 1 : i32
        %3557 = arith.addi %3555, %3556 : i32
        %3558 = llvm.mlir.constant(1 : i64) : i64
        %3559 = llvm.alloca %3558 x i32 : (i64) -> !llvm.ptr
        llvm.store %3557, %3559 : i32, !llvm.ptr
        cf.br ^bb345
        ^bb345:
        %3560 = llvm.load %3559 : !llvm.ptr -> i32
        %3561 = arith.cmpi sle, %3560, %arg0 : i32
        cf.cond_br %3561, ^bb346, ^bb347
        ^bb346:
          %3562 = llvm.load %3538 : !llvm.ptr -> i64
          %3564 = llvm.load %3541 : !llvm.ptr -> i32
          %3565 = llvm.load %3550 : !llvm.ptr -> i32
          %3566 = llvm.load %3559 : !llvm.ptr -> i32
          %3563 = func.call @F(%3564, %3565, %3566) : (i32, i32, i32) -> i64
          %3567 = arith.addi %3562, %3563 : i64
          llvm.store %3567, %3538 : i64, !llvm.ptr
          %3568 = llvm.load %3559 : !llvm.ptr -> i32
          %3569 = arith.constant 1 : i32
          %3570 = arith.addi %3568, %3569 : i32
          llvm.store %3570, %3559 : i32, !llvm.ptr
          cf.br ^bb345
        ^bb347:
        %3571 = llvm.load %3550 : !llvm.ptr -> i32
        %3572 = arith.constant 1 : i32
        %3573 = arith.addi %3571, %3572 : i32
        llvm.store %3573, %3550 : i32, !llvm.ptr
        cf.br ^bb342
      ^bb344:
      %3574 = llvm.load %3541 : !llvm.ptr -> i32
      %3575 = arith.constant 1 : i32
      %3576 = arith.addi %3574, %3575 : i32
      llvm.store %3576, %3541 : i32, !llvm.ptr
      cf.br ^bb339
    ^bb341:
    %3577 = llvm.load %3538 : !llvm.ptr -> i64
    func.return %3577 : i64
  }
  func.func @validate_samples() -> i1 {
    %3579 = arith.constant 9 : i32
    %3580 = arith.constant 10 : i32
    %3581 = arith.constant 11 : i32
    %3578 = func.call @F(%3579, %3580, %3581) : (i32, i32, i32) -> i64
    %3582 = arith.constant 60 : i32
    %3584 = arith.extsi %3582 : i32 to i64
    %3583 = arith.cmpi ne, %3578, %3584 : i64
    cf.cond_br %3583, ^bb348, ^bb349
    ^bb348:
      %3585 = arith.constant 0 : i1
      func.return %3585 : i1
    ^bb349:
      cf.br ^bb350
    ^bb350:
    %3587 = arith.constant 10 : i32
    %3588 = arith.constant 14 : i32
    %3589 = arith.constant 16 : i32
    %3586 = func.call @F(%3587, %3588, %3589) : (i32, i32, i32) -> i64
    %3590 = arith.constant 506 : i32
    %3592 = arith.extsi %3590 : i32 to i64
    %3591 = arith.cmpi ne, %3586, %3592 : i64
    cf.cond_br %3591, ^bb351, ^bb352
    ^bb351:
      %3593 = arith.constant 0 : i1
      func.return %3593 : i1
    ^bb352:
      cf.br ^bb353
    ^bb353:
    %3595 = arith.constant 15 : i32
    %3596 = arith.constant 16 : i32
    %3597 = arith.constant 17 : i32
    %3594 = func.call @F(%3595, %3596, %3597) : (i32, i32, i32) -> i64
    %3598 = arith.constant 785232 : i32
    %3600 = arith.extsi %3598 : i32 to i64
    %3599 = arith.cmpi ne, %3594, %3600 : i64
    cf.cond_br %3599, ^bb354, ^bb355
    ^bb354:
      %3601 = arith.constant 0 : i1
      func.return %3601 : i1
    ^bb355:
      cf.br ^bb356
    ^bb356:
    %3603 = arith.constant 11 : i32
    %3602 = func.call @computeG(%3603) : (i32) -> i64
    %3604 = arith.constant 60 : i32
    %3606 = arith.extsi %3604 : i32 to i64
    %3605 = arith.cmpi ne, %3602, %3606 : i64
    cf.cond_br %3605, ^bb357, ^bb358
    ^bb357:
      %3607 = arith.constant 0 : i1
      func.return %3607 : i1
    ^bb358:
      cf.br ^bb359
    ^bb359:
    %3609 = arith.constant 14 : i32
    %3608 = func.call @computeG(%3609) : (i32) -> i64
    %3610 = arith.constant 58020 : i32
    %3612 = arith.extsi %3610 : i32 to i64
    %3611 = arith.cmpi ne, %3608, %3612 : i64
    cf.cond_br %3611, ^bb360, ^bb361
    ^bb360:
      %3613 = arith.constant 0 : i1
      func.return %3613 : i1
    ^bb361:
      cf.br ^bb362
    ^bb362:
    %3615 = arith.constant 17 : i32
    %3614 = func.call @computeG(%3615) : (i32) -> i64
    %3616 = arith.constant 1269260 : i32
    %3618 = arith.extsi %3616 : i32 to i64
    %3617 = arith.cmpi ne, %3614, %3618 : i64
    cf.cond_br %3617, ^bb363, ^bb364
    ^bb363:
      %3619 = arith.constant 0 : i1
      func.return %3619 : i1
    ^bb364:
      cf.br ^bb365
    ^bb365:
    %3620 = arith.constant 1 : i1
    func.return %3620 : i1
  }
  func.func @main() -> i32 {
    %3621 = func.call @validate_samples() : () -> i1
    %3623 = arith.constant 1 : i1
    %3622 = arith.xori %3621, %3623 : i1
    cf.cond_br %3622, ^bb366, ^bb367
    ^bb366:
      %3625 = llvm.mlir.addressof @str_1 : !llvm.ptr
      %3626 = llvm.call @printf(%3625) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr) -> i32
      %3627 = arith.constant 1 : i32
      func.return %3627 : i32
    ^bb367:
      cf.br ^bb368
    ^bb368:
    %3629 = arith.constant 53 : i32
    %3628 = func.call @computeG(%3629) : (i32) -> i64
    %3630 = llvm.mlir.addressof @str_2 : !llvm.ptr
    %3631 = llvm.call @printf(%3630, %3628) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i64) -> i32
    %3632 = arith.constant 0 : i32
    func.return %3632 : i32
  }
}