Problem 954

Digit DP with mod-7 residue tracking using a hash table.

Answer736463823
Output736463823
StatusPASS
Native helperno
Runtime10190 ms
Peak memory963056 KB
Time complexityO(n^3) (estimated)
Space complexityO(n^2) (estimated)

Performance comparison

MetricOur solutionBest known
Time complexityO(n^3)O(n * d * s)
Space complexityO(n^2)O(d * s)
ApproachFlow solutionDigit DP
VerdictUnknown

Flow source

# Project Euler 954
# Digit DP with mod-7 residue tracking using a hash table.

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

# Lookup tables (allocated in init_tables)
let mut W_arr: ptr<i64> = null
let mut SHIFT_arr: ptr<i64> = null
let mut shifts_tab: ptr<i64> = null
let mut rot_tab: ptr<i64> = null
let mut mask_all: ptr<i64> = null
let mut mask_no0: ptr<i64> = null
let mut update_tab: ptr<i64> = null
let mut add_contrib_tab: ptr<i64> = null
let mut res_of_idx: ptr<i64> = null
let mut mult_of_idx: ptr<i64> = null

# Temporary counts array for ht_insert
let mut tmp_counts: ptr<i64> = null

# Hash table 0
let mut occ0: ptr<i8> = null
let mut sta0: ptr<i64> = null
let mut cnt0: ptr<i64> = null
let mut sl0: ptr<i32> = null
let mut cap0: i64 = 0
let mut mask0: i64 = 0
let mut count0: i64 = 0
let mut sls0: i64 = 0

# Hash table 1
let mut occ1: ptr<i8> = null
let mut sta1: ptr<i64> = null
let mut cnt1: ptr<i64> = null
let mut sl1: ptr<i32> = null
let mut cap1: i64 = 0
let mut mask1: i64 = 0
let mut count1: i64 = 0
let mut sls1: i64 = 0

function mod_inv7(a: i64) -> i64 {
    let mut i: i64 = 1
    while i < 7 {
        if (a * i) % 7 == 1 { return i }
        i = i + 1
    }
    return 0
}

function init_tables() -> void {
    W_arr = calloc(6, 8)
    SHIFT_arr = calloc(6, 8)
    shifts_tab = calloc(7 * 6 * 6, 8)
    rot_tab = calloc(7 * 128, 8)
    mask_all = calloc(512, 8)
    mask_no0 = calloc(512, 8)
    update_tab = calloc(512 * 8, 8)
    add_contrib_tab = calloc(6 * 8, 8)
    res_of_idx = calloc(8, 8)
    mult_of_idx = calloc(8, 8)

    W_arr[0] = 1
    W_arr[1] = 3
    W_arr[2] = 2
    W_arr[3] = 6
    W_arr[4] = 4
    W_arr[5] = 5

    let mut c: i64 = 0
    while c < 6 {
        SHIFT_arr[c] = 9 * c
        c = c + 1
    }

    let invdiff: ptr<i64> = calloc(6 * 6, 8)
    let mut a: i64 = 0
    while a < 6 {
        let mut b: i64 = 0
        while b < 6 {
            if a != b {
                invdiff[a * 6 + b] = mod_inv7((W_arr[b] - W_arr[a] + 7) % 7)
            }
            b = b + 1
        }
        a = a + 1
    }

    let mut r: i64 = 1
    while r < 7 {
        let mut a2: i64 = 0
        while a2 < 6 {
            let mut b2: i64 = 0
            while b2 < 6 {
                if a2 != b2 {
                    shifts_tab[r * 36 + a2 * 6 + b2] = (r * invdiff[a2 * 6 + b2]) % 7
                }
                b2 = b2 + 1
            }
            a2 = a2 + 1
        }
        r = r + 1
    }
    free(invdiff)

    let mut sh: i64 = 0
    while sh < 7 {
        let mut m: i64 = 0
        while m < 128 {
            if sh == 0 {
                rot_tab[sh * 128 + m] = m
            } else {
                rot_tab[sh * 128 + m] = ((m << sh) | (m >> (7 - sh))) & 0x7F
            }
            m = m + 1
        }
        sh = sh + 1
    }

    let mut bits: i64 = 0
    while bits < 512 {
        let mask: i64 = bits & 0x7F
        let has7: i64 = (bits >> 8) & 1
        mask_all[bits] = mask
        let mut m2: i64 = mask & ~1
        if has7 != 0 { m2 = m2 | 1 }
        mask_no0[bits] = m2
        bits = bits + 1
    }

    let choices_res: ptr<i64> = calloc(8, 8)
    let choices_add0: ptr<i64> = calloc(8, 8)
    let choices_add7: ptr<i64> = calloc(8, 8)
    choices_res[0] = 0; choices_add0[0] = 1; choices_add7[0] = 0
    choices_res[1] = 0; choices_add0[1] = 0; choices_add7[1] = 1
    choices_res[2] = 1; choices_add0[2] = 0; choices_add7[2] = 0
    choices_res[3] = 2; choices_add0[3] = 0; choices_add7[3] = 0
    choices_res[4] = 3; choices_add0[4] = 0; choices_add7[4] = 0
    choices_res[5] = 4; choices_add0[5] = 0; choices_add7[5] = 0
    choices_res[6] = 5; choices_add0[6] = 0; choices_add7[6] = 0
    choices_res[7] = 6; choices_add0[7] = 0; choices_add7[7] = 0

    let mut oldbits: i64 = 0
    while oldbits < 512 {
        let mask: i64 = oldbits & 0x7F
        let has0: i64 = (oldbits >> 7) & 1
        let has7: i64 = (oldbits >> 8) & 1
        let mut idx: i64 = 0
        while idx < 8 {
            let res: i64 = choices_res[idx]
            let add0: i64 = choices_add0[idx]
            let add7: i64 = choices_add7[idx]
            let newmask: i64 = mask | (1 << res)
            let newhas0: i64 = has0 | add0
            let newhas7: i64 = has7 | add7
            update_tab[oldbits * 8 + idx] = newmask | (newhas0 << 7) | (newhas7 << 8)
            idx = idx + 1
        }
        oldbits = oldbits + 1
    }
    free(choices_res)
    free(choices_add0)
    free(choices_add7)

    res_of_idx[0] = 0
    res_of_idx[1] = 0
    res_of_idx[2] = 1
    res_of_idx[3] = 2
    res_of_idx[4] = 3
    res_of_idx[5] = 4
    res_of_idx[6] = 5
    res_of_idx[7] = 6

    mult_of_idx[0] = 1
    mult_of_idx[1] = 1
    mult_of_idx[2] = 2
    mult_of_idx[3] = 2
    mult_of_idx[4] = 1
    mult_of_idx[5] = 1
    mult_of_idx[6] = 1
    mult_of_idx[7] = 1

    let mut c2: i64 = 0
    while c2 < 6 {
        let mut idx2: i64 = 0
        while idx2 < 8 {
            add_contrib_tab[c2 * 8 + idx2] = (res_of_idx[idx2] * W_arr[c2]) % 7
            idx2 = idx2 + 1
        }
        c2 = c2 + 1
    }

    tmp_counts = calloc(7, 8)
}

function ht_hash(state: i64, mask: i64) -> i64 {
    let mut h: i64 = state
    h = h ^ (h >> 16)
    h = h * 2654435761
    h = h ^ (h >> 16)
    return h & mask
}

function ht_init(tid: i64, capacity: i64) -> void {
    if tid == 0 {
        cap0 = capacity
        mask0 = capacity - 1
        count0 = 0
        occ0 = calloc(capacity, 1)
        sta0 = calloc(capacity, 8)
        cnt0 = calloc(capacity * 7, 8)
        sl0 = calloc(capacity, 4)
        sls0 = 0
    } else {
        cap1 = capacity
        mask1 = capacity - 1
        count1 = 0
        occ1 = calloc(capacity, 1)
        sta1 = calloc(capacity, 8)
        cnt1 = calloc(capacity * 7, 8)
        sl1 = calloc(capacity, 4)
        sls1 = 0
    }
}

function ht_clear(tid: i64) -> void {
    if tid == 0 {
        let mut i: i64 = 0
        while i < sls0 {
            occ0[sl0[i] as i64] = 0
            i = i + 1
        }
        count0 = 0
        sls0 = 0
    } else {
        let mut i: i64 = 0
        while i < sls1 {
            occ1[sl1[i] as i64] = 0
            i = i + 1
        }
        count1 = 0
        sls1 = 0
    }
}

function ht_resize(tid: i64, new_cap: i64) -> void {
    if tid == 0 {
        let old_occ: ptr<i8> = occ0
        let old_sta: ptr<i64> = sta0
        let old_cnt: ptr<i64> = cnt0
        let old_sl: ptr<i32> = sl0
        let old_sls: i64 = sls0

        cap0 = new_cap
        mask0 = new_cap - 1
        count0 = 0
        sls0 = 0
        occ0 = calloc(new_cap, 1)
        sta0 = calloc(new_cap, 8)
        cnt0 = calloc(new_cap * 7, 8)
        sl0 = calloc(new_cap, 4)

        let mut si: i64 = 0
        while si < old_sls {
            let slot: i64 = old_sl[si] as i64
            let state: i64 = old_sta[slot]
            let mut h: i64 = ht_hash(state, mask0)
            while occ0[h] != 0 {
                h = (h + 1) & mask0
            }
            occ0[h] = 1
            sta0[h] = state
            let mut j: i64 = 0
            while j < 7 {
                cnt0[h * 7 + j] = old_cnt[slot * 7 + j]
                j = j + 1
            }
            sl0[sls0] = h as i32
            sls0 = sls0 + 1
            count0 = count0 + 1
            si = si + 1
        }

        free(old_occ)
        free(old_sta)
        free(old_cnt)
        free(old_sl)
    } else {
        let old_occ: ptr<i8> = occ1
        let old_sta: ptr<i64> = sta1
        let old_cnt: ptr<i64> = cnt1
        let old_sl: ptr<i32> = sl1
        let old_sls: i64 = sls1

        cap1 = new_cap
        mask1 = new_cap - 1
        count1 = 0
        sls1 = 0
        occ1 = calloc(new_cap, 1)
        sta1 = calloc(new_cap, 8)
        cnt1 = calloc(new_cap * 7, 8)
        sl1 = calloc(new_cap, 4)

        let mut si: i64 = 0
        while si < old_sls {
            let slot: i64 = old_sl[si] as i64
            let state: i64 = old_sta[slot]
            let mut h: i64 = ht_hash(state, mask1)
            while occ1[h] != 0 {
                h = (h + 1) & mask1
            }
            occ1[h] = 1
            sta1[h] = state
            let mut j: i64 = 0
            while j < 7 {
                cnt1[h * 7 + j] = old_cnt[slot * 7 + j]
                j = j + 1
            }
            sl1[sls1] = h as i32
            sls1 = sls1 + 1
            count1 = count1 + 1
            si = si + 1
        }

        free(old_occ)
        free(old_sta)
        free(old_cnt)
        free(old_sl)
    }
}

function ht_insert(tid: i64, state: i64) -> void {
    if tid == 0 {
        if count0 * 2 >= cap0 {
            ht_resize(0, cap0 * 2)
        }
        let mut h: i64 = ht_hash(state, mask0)
        while occ0[h] != 0 {
            if sta0[h] == state {
                cnt0[h * 7 + 0] = cnt0[h * 7 + 0] + tmp_counts[0]
                cnt0[h * 7 + 1] = cnt0[h * 7 + 1] + tmp_counts[1]
                cnt0[h * 7 + 2] = cnt0[h * 7 + 2] + tmp_counts[2]
                cnt0[h * 7 + 3] = cnt0[h * 7 + 3] + tmp_counts[3]
                cnt0[h * 7 + 4] = cnt0[h * 7 + 4] + tmp_counts[4]
                cnt0[h * 7 + 5] = cnt0[h * 7 + 5] + tmp_counts[5]
                cnt0[h * 7 + 6] = cnt0[h * 7 + 6] + tmp_counts[6]
                return
            }
            h = (h + 1) & mask0
        }
        occ0[h] = 1
        sta0[h] = state
        cnt0[h * 7 + 0] = tmp_counts[0]
        cnt0[h * 7 + 1] = tmp_counts[1]
        cnt0[h * 7 + 2] = tmp_counts[2]
        cnt0[h * 7 + 3] = tmp_counts[3]
        cnt0[h * 7 + 4] = tmp_counts[4]
        cnt0[h * 7 + 5] = tmp_counts[5]
        cnt0[h * 7 + 6] = tmp_counts[6]
        sl0[sls0] = h as i32
        sls0 = sls0 + 1
        count0 = count0 + 1
    } else {
        if count1 * 2 >= cap1 {
            ht_resize(1, cap1 * 2)
        }
        let mut h: i64 = ht_hash(state, mask1)
        while occ1[h] != 0 {
            if sta1[h] == state {
                cnt1[h * 7 + 0] = cnt1[h * 7 + 0] + tmp_counts[0]
                cnt1[h * 7 + 1] = cnt1[h * 7 + 1] + tmp_counts[1]
                cnt1[h * 7 + 2] = cnt1[h * 7 + 2] + tmp_counts[2]
                cnt1[h * 7 + 3] = cnt1[h * 7 + 3] + tmp_counts[3]
                cnt1[h * 7 + 4] = cnt1[h * 7 + 4] + tmp_counts[4]
                cnt1[h * 7 + 5] = cnt1[h * 7 + 5] + tmp_counts[5]
                cnt1[h * 7 + 6] = cnt1[h * 7 + 6] + tmp_counts[6]
                return
            }
            h = (h + 1) & mask1
        }
        occ1[h] = 1
        sta1[h] = state
        cnt1[h * 7 + 0] = tmp_counts[0]
        cnt1[h * 7 + 1] = tmp_counts[1]
        cnt1[h * 7 + 2] = tmp_counts[2]
        cnt1[h * 7 + 3] = tmp_counts[3]
        cnt1[h * 7 + 4] = tmp_counts[4]
        cnt1[h * 7 + 5] = tmp_counts[5]
        cnt1[h * 7 + 6] = tmp_counts[6]
        sl1[sls1] = h as i32
        sls1 = sls1 + 1
        count1 = count1 + 1
    }
}

function advance_dp(old_tid: i64, new_tid: i64, pos: i64, target_r: i64, is_MSD: bool) -> void {
    let c: i64 = pos % 6
    let shiftc: i64 = SHIFT_arr[c]

    let mask_func: ptr<i64> = mask_all
    let choices_start: i64 = 0
    if is_MSD {
        mask_func = mask_no0
        choices_start = 1
    }

    let sh_row: array<i64, 6> = [0, 0, 0, 0, 0, 0]
    let mut a: i64 = 0
    while a < 6 {
        sh_row[a] = shifts_tab[target_r * 36 + a * 6 + c]
        a = a + 1
    }

    ht_clear(new_tid)

    # Read from old_tid
    let r_occ: ptr<i8> = null
    let r_sta: ptr<i64> = null
    let r_cnt: ptr<i64> = null
    let r_sl: ptr<i32> = null
    let r_sls: i64 = 0
    if old_tid == 0 {
        r_occ = occ0
        r_sta = sta0
        r_cnt = cnt0
        r_sl = sl0
        r_sls = sls0
    } else {
        r_occ = occ1
        r_sta = sta1
        r_cnt = cnt1
        r_sl = sl1
        r_sls = sls1
    }

    let mut si: i64 = 0
    while si < r_sls {
        let i_slot: i64 = r_sl[si] as i64
        let state: i64 = r_sta[i_slot]

        let mut forb: i64 = 0
        let mut a2: i64 = 0
        while a2 < 6 {
            if a2 != c {
                let bitsa: i64 = (state >> SHIFT_arr[a2]) & 0x1FF
                let mask_use: i64 = mask_func[bitsa]
                if mask_use != 0 {
                    forb = forb | rot_tab[sh_row[a2] * 128 + mask_use]
                }
            }
            a2 = a2 + 1
        }

        let bitsc: i64 = (state >> shiftc) & 0x1FF

        let mut idx: i64 = choices_start
        while idx < 8 {
            let res: i64 = res_of_idx[idx]
            if (forb & (1 << res)) != 0 {
                idx = idx + 1
                continue
            }
            let newbitsc: i64 = update_tab[bitsc * 8 + idx]
            let newstate: i64 = state ^ ((bitsc ^ newbitsc) << shiftc)
            let add: i64 = add_contrib_tab[c * 8 + idx]
            let mult: i64 = mult_of_idx[idx]

            let mut j: i64 = 0
            while j < 7 {
                tmp_counts[(j + add) % 7] = r_cnt[i_slot * 7 + j] * mult
                j = j + 1
            }

            ht_insert(new_tid, newstate)
            idx = idx + 1
        }
        si = si + 1
    }
}

function count_len_res(L: i64, target_r: i64, ht_a: i64, ht_b: i64) -> i64 {
    ht_clear(ht_a)
    tmp_counts[0] = 1
    tmp_counts[1] = 0
    tmp_counts[2] = 0
    tmp_counts[3] = 0
    tmp_counts[4] = 0
    tmp_counts[5] = 0
    tmp_counts[6] = 0
    ht_insert(ht_a, 0)

    let mut pos: i64 = 0
    let mut cur_a: i64 = ht_a
    let mut cur_b: i64 = ht_b
    while pos < L {
        let is_msd: bool = pos == L - 1
        advance_dp(cur_a, cur_b, pos, target_r, is_msd)
        let tmp: i64 = cur_a
        cur_a = cur_b
        cur_b = tmp
        pos = pos + 1
    }

    let mut total: i64 = 0
    if cur_a == 0 {
        let mut si: i64 = 0
        while si < sls0 {
            let i_slot: i64 = sl0[si] as i64
            total = total + cnt0[i_slot * 7 + target_r]
            si = si + 1
        }
    } else {
        let mut si: i64 = 0
        while si < sls1 {
            let i_slot: i64 = sl1[si] as i64
            total = total + cnt1[i_slot * 7 + target_r]
            si = si + 1
        }
    }
    return total
}

function main() -> i32 {
    init_tables()

    ht_init(0, 1024)
    ht_init(1, 1024)

    let mut total: i64 = 0
    let mut L: i64 = 1
    while L <= 13 {
        let mut r: i64 = 1
        while r <= 6 {
            total = total + count_len_res(L, r, 0, 1)
            r = r + 1
        }
        L = L + 1
    }

    printf("%lld\n", total)
    return 0
}

Generated C

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

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

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

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

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

#include <math.h>

void* _ui_state = NULL;

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

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

int64_t mod_inv7_i64(int64_t a);
void init_tables(void);
int64_t ht_hash_i64_i64(int64_t state, int64_t mask);
void ht_init_i64_i64(int64_t tid, int64_t capacity);
void ht_clear_i64(int64_t tid);
void ht_resize_i64_i64(int64_t tid, int64_t new_cap);
void ht_insert_i64_i64(int64_t tid, int64_t state);
void advance_dp_i64_i64_i64_i64_bool(int64_t old_tid, int64_t new_tid, int64_t pos, int64_t target_r, bool is_MSD);
int64_t count_len_res_i64_i64_i64_i64(int64_t L, int64_t target_r, int64_t ht_a, int64_t ht_b);
int32_t main(void);

/* Module statics */
static int64_t* W_arr = NULL;
static int64_t* SHIFT_arr = NULL;
static int64_t* shifts_tab = NULL;
static int64_t* rot_tab = NULL;
static int64_t* mask_all = NULL;
static int64_t* mask_no0 = NULL;
static int64_t* update_tab = NULL;
static int64_t* add_contrib_tab = NULL;
static int64_t* res_of_idx = NULL;
static int64_t* mult_of_idx = NULL;
static int64_t* tmp_counts = NULL;
static int8_t* occ0 = NULL;
static int64_t* sta0 = NULL;
static int64_t* cnt0 = NULL;
static int32_t* sl0 = NULL;
static int64_t cap0 = 0;
static int64_t mask0 = 0;
static int64_t count0 = 0;
static int64_t sls0 = 0;
static int8_t* occ1 = NULL;
static int64_t* sta1 = NULL;
static int64_t* cnt1 = NULL;
static int32_t* sl1 = NULL;
static int64_t cap1 = 0;
static int64_t mask1 = 0;
static int64_t count1 = 0;
static int64_t sls1 = 0;





int64_t mod_inv7_i64(int64_t a) {
    int64_t i = 1;
    while (i < 7) {
        if (FLOW_CHECKED_MOD(((a * i)), (7)) == 1) {
            return i;
        }
        i = (i + 1);
    }
    return 0;
}

void init_tables(void) {
    W_arr = calloc(6, 8);
    SHIFT_arr = calloc(6, 8);
    shifts_tab = calloc(((7 * 6) * 6), 8);
    rot_tab = calloc((7 * 128), 8);
    mask_all = calloc(512, 8);
    mask_no0 = calloc(512, 8);
    update_tab = calloc((512 * 8), 8);
    add_contrib_tab = calloc((6 * 8), 8);
    res_of_idx = calloc(8, 8);
    mult_of_idx = calloc(8, 8);
    W_arr[0] = 1;
    W_arr[1] = 3;
    W_arr[2] = 2;
    W_arr[3] = 6;
    W_arr[4] = 4;
    W_arr[5] = 5;
    int64_t c = 0;
    while (c < 6) {
        SHIFT_arr[c] = (9 * c);
        c = (c + 1);
    }
    int64_t* invdiff = (int64_t*)(calloc((6 * 6), 8));
    int64_t a = 0;
    while (a < 6) {
        int64_t b = 0;
        while (b < 6) {
            if (a != b) {
                invdiff[((a * 6) + b)] = mod_inv7_i64(FLOW_CHECKED_MOD((((W_arr[b] - W_arr[a]) + 7)), (7)));
            }
            b = (b + 1);
        }
        a = (a + 1);
    }
    int64_t r = 1;
    while (r < 7) {
        int64_t a2 = 0;
        while (a2 < 6) {
            int64_t b2 = 0;
            while (b2 < 6) {
                if (a2 != b2) {
                    shifts_tab[(((r * 36) + (a2 * 6)) + b2)] = FLOW_CHECKED_MOD(((r * invdiff[((a2 * 6) + b2)])), (7));
                }
                b2 = (b2 + 1);
            }
            a2 = (a2 + 1);
        }
        r = (r + 1);
    }
    free(invdiff);
    int64_t sh = 0;
    while (sh < 7) {
        int64_t m = 0;
        while (m < 128) {
            if (sh == 0) {
                rot_tab[((sh * 128) + m)] = m;
            } else {
                rot_tab[((sh * 128) + m)] = ((FLOW_CHECKED_SHL((m), (sh)) | FLOW_CHECKED_SHR((m), ((7 - sh)))) & 127);
            }
            m = (m + 1);
        }
        sh = (sh + 1);
    }
    int64_t bits = 0;
    while (bits < 512) {
        int64_t mask = (bits & 127);
        int64_t has7 = (FLOW_CHECKED_SHR((bits), (8)) & 1);
        mask_all[bits] = mask;
        int64_t m2 = (mask & (~1));
        if (has7 != 0) {
            m2 = (m2 | 1);
        }
        mask_no0[bits] = m2;
        bits = (bits + 1);
    }
    int64_t* choices_res = (int64_t*)(calloc(8, 8));
    int64_t* choices_add0 = (int64_t*)(calloc(8, 8));
    int64_t* choices_add7 = (int64_t*)(calloc(8, 8));
    choices_res[0] = 0;
    choices_add0[0] = 1;
    choices_add7[0] = 0;
    choices_res[1] = 0;
    choices_add0[1] = 0;
    choices_add7[1] = 1;
    choices_res[2] = 1;
    choices_add0[2] = 0;
    choices_add7[2] = 0;
    choices_res[3] = 2;
    choices_add0[3] = 0;
    choices_add7[3] = 0;
    choices_res[4] = 3;
    choices_add0[4] = 0;
    choices_add7[4] = 0;
    choices_res[5] = 4;
    choices_add0[5] = 0;
    choices_add7[5] = 0;
    choices_res[6] = 5;
    choices_add0[6] = 0;
    choices_add7[6] = 0;
    choices_res[7] = 6;
    choices_add0[7] = 0;
    choices_add7[7] = 0;
    int64_t oldbits = 0;
    while (oldbits < 512) {
        int64_t mask = (oldbits & 127);
        int64_t has0 = (FLOW_CHECKED_SHR((oldbits), (7)) & 1);
        int64_t has7 = (FLOW_CHECKED_SHR((oldbits), (8)) & 1);
        int64_t idx = 0;
        while (idx < 8) {
            int64_t res = choices_res[idx];
            int64_t add0 = choices_add0[idx];
            int64_t add7 = choices_add7[idx];
            int64_t newmask = (mask | FLOW_CHECKED_SHL((1), (res)));
            int64_t newhas0 = (has0 | add0);
            int64_t newhas7 = (has7 | add7);
            update_tab[((oldbits * 8) + idx)] = ((newmask | FLOW_CHECKED_SHL((newhas0), (7))) | FLOW_CHECKED_SHL((newhas7), (8)));
            idx = (idx + 1);
        }
        oldbits = (oldbits + 1);
    }
    free(choices_res);
    free(choices_add0);
    free(choices_add7);
    res_of_idx[0] = 0;
    res_of_idx[1] = 0;
    res_of_idx[2] = 1;
    res_of_idx[3] = 2;
    res_of_idx[4] = 3;
    res_of_idx[5] = 4;
    res_of_idx[6] = 5;
    res_of_idx[7] = 6;
    mult_of_idx[0] = 1;
    mult_of_idx[1] = 1;
    mult_of_idx[2] = 2;
    mult_of_idx[3] = 2;
    mult_of_idx[4] = 1;
    mult_of_idx[5] = 1;
    mult_of_idx[6] = 1;
    mult_of_idx[7] = 1;
    int64_t c2 = 0;
    while (c2 < 6) {
        int64_t idx2 = 0;
        while (idx2 < 8) {
            add_contrib_tab[((c2 * 8) + idx2)] = FLOW_CHECKED_MOD(((res_of_idx[idx2] * W_arr[c2])), (7));
            idx2 = (idx2 + 1);
        }
        c2 = (c2 + 1);
    }
    tmp_counts = calloc(7, 8);
}

int64_t ht_hash_i64_i64(int64_t state, int64_t mask) {
    int64_t h = state;
    h = (h ^ FLOW_CHECKED_SHR((h), (16)));
    h = (h * 2654435761);
    h = (h ^ FLOW_CHECKED_SHR((h), (16)));
    return (h & mask);
}

void ht_init_i64_i64(int64_t tid, int64_t capacity) {
    if (tid == 0) {
        cap0 = capacity;
        mask0 = (capacity - 1);
        count0 = 0;
        occ0 = calloc(capacity, 1);
        sta0 = calloc(capacity, 8);
        cnt0 = calloc((capacity * 7), 8);
        sl0 = calloc(capacity, 4);
        sls0 = 0;
    } else {
        cap1 = capacity;
        mask1 = (capacity - 1);
        count1 = 0;
        occ1 = calloc(capacity, 1);
        sta1 = calloc(capacity, 8);
        cnt1 = calloc((capacity * 7), 8);
        sl1 = calloc(capacity, 4);
        sls1 = 0;
    }
}

void ht_clear_i64(int64_t tid) {
    if (tid == 0) {
        int64_t i = 0;
        while (i < sls0) {
            occ0[((int64_t)(sl0[i]))] = 0;
            i = (i + 1);
        }
        count0 = 0;
        sls0 = 0;
    } else {
        int64_t i = 0;
        while (i < sls1) {
            occ1[((int64_t)(sl1[i]))] = 0;
            i = (i + 1);
        }
        count1 = 0;
        sls1 = 0;
    }
}

void ht_resize_i64_i64(int64_t tid, int64_t new_cap) {
    if (tid == 0) {
        int8_t* old_occ = (int8_t*)(occ0);
        int64_t* old_sta = (int64_t*)(sta0);
        int64_t* old_cnt = (int64_t*)(cnt0);
        int32_t* old_sl = (int32_t*)(sl0);
        int64_t old_sls = sls0;
        cap0 = new_cap;
        mask0 = (new_cap - 1);
        count0 = 0;
        sls0 = 0;
        occ0 = calloc(new_cap, 1);
        sta0 = calloc(new_cap, 8);
        cnt0 = calloc((new_cap * 7), 8);
        sl0 = calloc(new_cap, 4);
        int64_t si = 0;
        while (si < old_sls) {
            int64_t slot = ((int64_t)(old_sl[si]));
            int64_t state = old_sta[slot];
            int64_t h = ht_hash_i64_i64(state, mask0);
            while (occ0[h] != 0) {
                h = ((h + 1) & mask0);
            }
            occ0[h] = 1;
            sta0[h] = state;
            int64_t j = 0;
            while (j < 7) {
                cnt0[((h * 7) + j)] = old_cnt[((slot * 7) + j)];
                j = (j + 1);
            }
            sl0[sls0] = ((int32_t)(h));
            sls0 = (sls0 + 1);
            count0 = (count0 + 1);
            si = (si + 1);
        }
        free(old_occ);
        free(old_sta);
        free(old_cnt);
        free(old_sl);
    } else {
        int8_t* old_occ = (int8_t*)(occ1);
        int64_t* old_sta = (int64_t*)(sta1);
        int64_t* old_cnt = (int64_t*)(cnt1);
        int32_t* old_sl = (int32_t*)(sl1);
        int64_t old_sls = sls1;
        cap1 = new_cap;
        mask1 = (new_cap - 1);
        count1 = 0;
        sls1 = 0;
        occ1 = calloc(new_cap, 1);
        sta1 = calloc(new_cap, 8);
        cnt1 = calloc((new_cap * 7), 8);
        sl1 = calloc(new_cap, 4);
        int64_t si = 0;
        while (si < old_sls) {
            int64_t slot = ((int64_t)(old_sl[si]));
            int64_t state = old_sta[slot];
            int64_t h = ht_hash_i64_i64(state, mask1);
            while (occ1[h] != 0) {
                h = ((h + 1) & mask1);
            }
            occ1[h] = 1;
            sta1[h] = state;
            int64_t j = 0;
            while (j < 7) {
                cnt1[((h * 7) + j)] = old_cnt[((slot * 7) + j)];
                j = (j + 1);
            }
            sl1[sls1] = ((int32_t)(h));
            sls1 = (sls1 + 1);
            count1 = (count1 + 1);
            si = (si + 1);
        }
        free(old_occ);
        free(old_sta);
        free(old_cnt);
        free(old_sl);
    }
}

void ht_insert_i64_i64(int64_t tid, int64_t state) {
    if (tid == 0) {
        if ((count0 * 2) >= cap0) {
            ht_resize_i64_i64(0, (cap0 * 2));
        }
        int64_t h = ht_hash_i64_i64(state, mask0);
        while (occ0[h] != 0) {
            if (sta0[h] == state) {
                cnt0[((h * 7) + 0)] = (cnt0[((h * 7) + 0)] + tmp_counts[0]);
                cnt0[((h * 7) + 1)] = (cnt0[((h * 7) + 1)] + tmp_counts[1]);
                cnt0[((h * 7) + 2)] = (cnt0[((h * 7) + 2)] + tmp_counts[2]);
                cnt0[((h * 7) + 3)] = (cnt0[((h * 7) + 3)] + tmp_counts[3]);
                cnt0[((h * 7) + 4)] = (cnt0[((h * 7) + 4)] + tmp_counts[4]);
                cnt0[((h * 7) + 5)] = (cnt0[((h * 7) + 5)] + tmp_counts[5]);
                cnt0[((h * 7) + 6)] = (cnt0[((h * 7) + 6)] + tmp_counts[6]);
                return;
            }
            h = ((h + 1) & mask0);
        }
        occ0[h] = 1;
        sta0[h] = state;
        cnt0[((h * 7) + 0)] = tmp_counts[0];
        cnt0[((h * 7) + 1)] = tmp_counts[1];
        cnt0[((h * 7) + 2)] = tmp_counts[2];
        cnt0[((h * 7) + 3)] = tmp_counts[3];
        cnt0[((h * 7) + 4)] = tmp_counts[4];
        cnt0[((h * 7) + 5)] = tmp_counts[5];
        cnt0[((h * 7) + 6)] = tmp_counts[6];
        sl0[sls0] = ((int32_t)(h));
        sls0 = (sls0 + 1);
        count0 = (count0 + 1);
    } else {
        if ((count1 * 2) >= cap1) {
            ht_resize_i64_i64(1, (cap1 * 2));
        }
        int64_t h = ht_hash_i64_i64(state, mask1);
        while (occ1[h] != 0) {
            if (sta1[h] == state) {
                cnt1[((h * 7) + 0)] = (cnt1[((h * 7) + 0)] + tmp_counts[0]);
                cnt1[((h * 7) + 1)] = (cnt1[((h * 7) + 1)] + tmp_counts[1]);
                cnt1[((h * 7) + 2)] = (cnt1[((h * 7) + 2)] + tmp_counts[2]);
                cnt1[((h * 7) + 3)] = (cnt1[((h * 7) + 3)] + tmp_counts[3]);
                cnt1[((h * 7) + 4)] = (cnt1[((h * 7) + 4)] + tmp_counts[4]);
                cnt1[((h * 7) + 5)] = (cnt1[((h * 7) + 5)] + tmp_counts[5]);
                cnt1[((h * 7) + 6)] = (cnt1[((h * 7) + 6)] + tmp_counts[6]);
                return;
            }
            h = ((h + 1) & mask1);
        }
        occ1[h] = 1;
        sta1[h] = state;
        cnt1[((h * 7) + 0)] = tmp_counts[0];
        cnt1[((h * 7) + 1)] = tmp_counts[1];
        cnt1[((h * 7) + 2)] = tmp_counts[2];
        cnt1[((h * 7) + 3)] = tmp_counts[3];
        cnt1[((h * 7) + 4)] = tmp_counts[4];
        cnt1[((h * 7) + 5)] = tmp_counts[5];
        cnt1[((h * 7) + 6)] = tmp_counts[6];
        sl1[sls1] = ((int32_t)(h));
        sls1 = (sls1 + 1);
        count1 = (count1 + 1);
    }
}

void advance_dp_i64_i64_i64_i64_bool(int64_t old_tid, int64_t new_tid, int64_t pos, int64_t target_r, bool is_MSD) {
    int64_t c = FLOW_CHECKED_MOD((pos), (6));
    int64_t shiftc = SHIFT_arr[c];
    int64_t* mask_func = (int64_t*)(mask_all);
    int64_t choices_start = 0;
    if (is_MSD) {
        mask_func = mask_no0;
        choices_start = 1;
    }
    int64_t sh_row[6] = { 0, 0, 0, 0, 0, 0 };
    int64_t a = 0;
    while (a < 6) {
        sh_row[a] = shifts_tab[(((target_r * 36) + (a * 6)) + c)];
        a = (a + 1);
    }
    ht_clear_i64(new_tid);
    int8_t* r_occ = (int8_t*)(NULL);
    int64_t* r_sta = (int64_t*)(NULL);
    int64_t* r_cnt = (int64_t*)(NULL);
    int32_t* r_sl = (int32_t*)(NULL);
    int64_t r_sls = 0;
    if (old_tid == 0) {
        r_occ = occ0;
        r_sta = sta0;
        r_cnt = cnt0;
        r_sl = sl0;
        r_sls = sls0;
    } else {
        r_occ = occ1;
        r_sta = sta1;
        r_cnt = cnt1;
        r_sl = sl1;
        r_sls = sls1;
    }
    int64_t si = 0;
    while (si < r_sls) {
        int64_t i_slot = ((int64_t)(r_sl[si]));
        int64_t state = r_sta[i_slot];
        int64_t forb = 0;
        int64_t a2 = 0;
        while (a2 < 6) {
            if (a2 != c) {
                int64_t bitsa = (FLOW_CHECKED_SHR((state), (SHIFT_arr[a2])) & 511);
                int64_t mask_use = mask_func[bitsa];
                if (mask_use != 0) {
                    forb = (forb | rot_tab[(((((unsigned)(a2) < 6) ? sh_row[a2] : (fprintf(stderr, "array index %d out of bounds (size %d)\n", (int)(a2), 6), flow_fault_handler("array index out of bounds"), sh_row[0])) * 128) + mask_use)]);
                }
            }
            a2 = (a2 + 1);
        }
        int64_t bitsc = (FLOW_CHECKED_SHR((state), (shiftc)) & 511);
        int64_t idx = choices_start;
        while (idx < 8) {
            int64_t res = res_of_idx[idx];
            if ((forb & FLOW_CHECKED_SHL((1), (res))) != 0) {
                idx = (idx + 1);
                continue;
            }
            int64_t newbitsc = update_tab[((bitsc * 8) + idx)];
            int64_t newstate = (state ^ FLOW_CHECKED_SHL(((bitsc ^ newbitsc)), (shiftc)));
            int64_t add = add_contrib_tab[((c * 8) + idx)];
            int64_t mult = mult_of_idx[idx];
            int64_t j = 0;
            while (j < 7) {
                tmp_counts[FLOW_CHECKED_MOD(((j + add)), (7))] = (r_cnt[((i_slot * 7) + j)] * mult);
                j = (j + 1);
            }
            ht_insert_i64_i64(new_tid, newstate);
            idx = (idx + 1);
        }
        si = (si + 1);
    }
}

int64_t count_len_res_i64_i64_i64_i64(int64_t L, int64_t target_r, int64_t ht_a, int64_t ht_b) {
    ht_clear_i64(ht_a);
    tmp_counts[0] = 1;
    tmp_counts[1] = 0;
    tmp_counts[2] = 0;
    tmp_counts[3] = 0;
    tmp_counts[4] = 0;
    tmp_counts[5] = 0;
    tmp_counts[6] = 0;
    ht_insert_i64_i64(ht_a, 0);
    int64_t pos = 0;
    int64_t cur_a = ht_a;
    int64_t cur_b = ht_b;
    while (pos < L) {
        bool is_msd = pos == (L - 1);
        advance_dp_i64_i64_i64_i64_bool(cur_a, cur_b, pos, target_r, is_msd);
        int64_t tmp = cur_a;
        cur_a = cur_b;
        cur_b = tmp;
        pos = (pos + 1);
    }
    int64_t total = 0;
    if (cur_a == 0) {
        int64_t si = 0;
        while (si < sls0) {
            int64_t i_slot = ((int64_t)(sl0[si]));
            total = (total + cnt0[((i_slot * 7) + target_r)]);
            si = (si + 1);
        }
    } else {
        int64_t si = 0;
        while (si < sls1) {
            int64_t i_slot = ((int64_t)(sl1[si]));
            total = (total + cnt1[((i_slot * 7) + target_r)]);
            si = (si + 1);
        }
    }
    return total;
}

int32_t main(void) {
    init_tables();
    ht_init_i64_i64(0, 1024);
    ht_init_i64_i64(1, 1024);
    int64_t total = 0;
    int64_t L = 1;
    while (L <= 13) {
        int64_t r = 1;
        while (r <= 6) {
            total = (total + count_len_res_i64_i64_i64_i64(L, r, 0, 1));
            r = (r + 1);
        }
        L = (L + 1);
    }
    printf("%lld\n", total);
    return 0;
}

Generated MLIR

module {
  llvm.func @printf(!llvm.ptr, ...) -> i32
  llvm.mlir.global internal constant @str_0("%lld\n\00") {addr_space = 0 : i32} : !llvm.array<6 x i8>
  func.func private @calloc(i64, i64) -> !llvm.ptr
  func.func private @free(!llvm.ptr) -> ()
  func.func private @malloc(i64) -> !llvm.ptr
  func.func private @memset(!llvm.ptr, i32, i64) -> !llvm.ptr
  // Module static: W_arr
  llvm.mlir.global internal @W_arr() {addr_space = 0 : i32} : !llvm.ptr {
    %0 = llvm.mlir.zero : !llvm.ptr
    llvm.return %0 : !llvm.ptr
  }
  // Module static: SHIFT_arr
  llvm.mlir.global internal @SHIFT_arr() {addr_space = 0 : i32} : !llvm.ptr {
    %1 = llvm.mlir.zero : !llvm.ptr
    llvm.return %1 : !llvm.ptr
  }
  // Module static: shifts_tab
  llvm.mlir.global internal @shifts_tab() {addr_space = 0 : i32} : !llvm.ptr {
    %2 = llvm.mlir.zero : !llvm.ptr
    llvm.return %2 : !llvm.ptr
  }
  // Module static: rot_tab
  llvm.mlir.global internal @rot_tab() {addr_space = 0 : i32} : !llvm.ptr {
    %3 = llvm.mlir.zero : !llvm.ptr
    llvm.return %3 : !llvm.ptr
  }
  // Module static: mask_all
  llvm.mlir.global internal @mask_all() {addr_space = 0 : i32} : !llvm.ptr {
    %4 = llvm.mlir.zero : !llvm.ptr
    llvm.return %4 : !llvm.ptr
  }
  // Module static: mask_no0
  llvm.mlir.global internal @mask_no0() {addr_space = 0 : i32} : !llvm.ptr {
    %5 = llvm.mlir.zero : !llvm.ptr
    llvm.return %5 : !llvm.ptr
  }
  // Module static: update_tab
  llvm.mlir.global internal @update_tab() {addr_space = 0 : i32} : !llvm.ptr {
    %6 = llvm.mlir.zero : !llvm.ptr
    llvm.return %6 : !llvm.ptr
  }
  // Module static: add_contrib_tab
  llvm.mlir.global internal @add_contrib_tab() {addr_space = 0 : i32} : !llvm.ptr {
    %7 = llvm.mlir.zero : !llvm.ptr
    llvm.return %7 : !llvm.ptr
  }
  // Module static: res_of_idx
  llvm.mlir.global internal @res_of_idx() {addr_space = 0 : i32} : !llvm.ptr {
    %8 = llvm.mlir.zero : !llvm.ptr
    llvm.return %8 : !llvm.ptr
  }
  // Module static: mult_of_idx
  llvm.mlir.global internal @mult_of_idx() {addr_space = 0 : i32} : !llvm.ptr {
    %9 = llvm.mlir.zero : !llvm.ptr
    llvm.return %9 : !llvm.ptr
  }
  // Module static: tmp_counts
  llvm.mlir.global internal @tmp_counts() {addr_space = 0 : i32} : !llvm.ptr {
    %10 = llvm.mlir.zero : !llvm.ptr
    llvm.return %10 : !llvm.ptr
  }
  // Module static: occ0
  llvm.mlir.global internal @occ0() {addr_space = 0 : i32} : !llvm.ptr {
    %11 = llvm.mlir.zero : !llvm.ptr
    llvm.return %11 : !llvm.ptr
  }
  // Module static: sta0
  llvm.mlir.global internal @sta0() {addr_space = 0 : i32} : !llvm.ptr {
    %12 = llvm.mlir.zero : !llvm.ptr
    llvm.return %12 : !llvm.ptr
  }
  // Module static: cnt0
  llvm.mlir.global internal @cnt0() {addr_space = 0 : i32} : !llvm.ptr {
    %13 = llvm.mlir.zero : !llvm.ptr
    llvm.return %13 : !llvm.ptr
  }
  // Module static: sl0
  llvm.mlir.global internal @sl0() {addr_space = 0 : i32} : !llvm.ptr {
    %14 = llvm.mlir.zero : !llvm.ptr
    llvm.return %14 : !llvm.ptr
  }
  // Module static: cap0
  llvm.mlir.global internal @cap0(0 : i64) : i64
  // Module static: mask0
  llvm.mlir.global internal @mask0(0 : i64) : i64
  // Module static: count0
  llvm.mlir.global internal @count0(0 : i64) : i64
  // Module static: sls0
  llvm.mlir.global internal @sls0(0 : i64) : i64
  // Module static: occ1
  llvm.mlir.global internal @occ1() {addr_space = 0 : i32} : !llvm.ptr {
    %15 = llvm.mlir.zero : !llvm.ptr
    llvm.return %15 : !llvm.ptr
  }
  // Module static: sta1
  llvm.mlir.global internal @sta1() {addr_space = 0 : i32} : !llvm.ptr {
    %16 = llvm.mlir.zero : !llvm.ptr
    llvm.return %16 : !llvm.ptr
  }
  // Module static: cnt1
  llvm.mlir.global internal @cnt1() {addr_space = 0 : i32} : !llvm.ptr {
    %17 = llvm.mlir.zero : !llvm.ptr
    llvm.return %17 : !llvm.ptr
  }
  // Module static: sl1
  llvm.mlir.global internal @sl1() {addr_space = 0 : i32} : !llvm.ptr {
    %18 = llvm.mlir.zero : !llvm.ptr
    llvm.return %18 : !llvm.ptr
  }
  // Module static: cap1
  llvm.mlir.global internal @cap1(0 : i64) : i64
  // Module static: mask1
  llvm.mlir.global internal @mask1(0 : i64) : i64
  // Module static: count1
  llvm.mlir.global internal @count1(0 : i64) : i64
  // Module static: sls1
  llvm.mlir.global internal @sls1(0 : i64) : i64
  func.func @mod_inv7(%arg0: i64) -> i64 {
    %19 = arith.constant 1 : i32
    %20 = arith.extsi %19 : i32 to i64
    %21 = llvm.mlir.constant(1 : i64) : i64
    %22 = llvm.alloca %21 x i64 : (i64) -> !llvm.ptr
    llvm.store %20, %22 : i64, !llvm.ptr
    cf.br ^bb0
    ^bb0:
    %23 = llvm.load %22 : !llvm.ptr -> i64
    %24 = arith.constant 7 : i32
    %26 = arith.extsi %24 : i32 to i64
    %25 = arith.cmpi slt, %23, %26 : i64
    cf.cond_br %25, ^bb1, ^bb2
    ^bb1:
      %27 = llvm.load %22 : !llvm.ptr -> i64
      %28 = arith.muli %arg0, %27 : i64
      %29 = arith.constant 7 : i32
      %31 = arith.extsi %29 : i32 to i64
      %30 = arith.remsi %28, %31 : i64
      %32 = arith.constant 1 : i32
      %34 = arith.extsi %32 : i32 to i64
      %33 = arith.cmpi eq, %30, %34 : i64
      cf.cond_br %33, ^bb3, ^bb4
      ^bb3:
        %35 = llvm.load %22 : !llvm.ptr -> i64
        func.return %35 : i64
      ^bb4:
        cf.br ^bb5
      ^bb5:
      %36 = llvm.load %22 : !llvm.ptr -> i64
      %37 = arith.constant 1 : i32
      %39 = arith.extsi %37 : i32 to i64
      %38 = arith.addi %36, %39 : i64
      llvm.store %38, %22 : i64, !llvm.ptr
      cf.br ^bb0
    ^bb2:
    %40 = arith.constant 0 : i32
    %41 = arith.extsi %40 : i32 to i64
    func.return %41 : i64
  }
  func.func @init_tables() -> () {
    %43 = arith.constant 6 : i32
    %44 = arith.constant 8 : i32
    %45 = arith.extsi %43 : i32 to i64
    %46 = arith.extsi %44 : i32 to i64
    %42 = func.call @calloc(%45, %46) : (i64, i64) -> !llvm.ptr
    %47 = llvm.mlir.addressof @W_arr : !llvm.ptr
    llvm.store %42, %47 : !llvm.ptr, !llvm.ptr
    %49 = arith.constant 6 : i32
    %50 = arith.constant 8 : i32
    %51 = arith.extsi %49 : i32 to i64
    %52 = arith.extsi %50 : i32 to i64
    %48 = func.call @calloc(%51, %52) : (i64, i64) -> !llvm.ptr
    %53 = llvm.mlir.addressof @SHIFT_arr : !llvm.ptr
    llvm.store %48, %53 : !llvm.ptr, !llvm.ptr
    %55 = arith.constant 7 : i32
    %56 = arith.constant 6 : i32
    %57 = arith.muli %55, %56 : i32
    %58 = arith.constant 6 : i32
    %59 = arith.muli %57, %58 : i32
    %60 = arith.constant 8 : i32
    %61 = arith.extsi %59 : i32 to i64
    %62 = arith.extsi %60 : i32 to i64
    %54 = func.call @calloc(%61, %62) : (i64, i64) -> !llvm.ptr
    %63 = llvm.mlir.addressof @shifts_tab : !llvm.ptr
    llvm.store %54, %63 : !llvm.ptr, !llvm.ptr
    %65 = arith.constant 7 : i32
    %66 = arith.constant 128 : i32
    %67 = arith.muli %65, %66 : i32
    %68 = arith.constant 8 : i32
    %69 = arith.extsi %67 : i32 to i64
    %70 = arith.extsi %68 : i32 to i64
    %64 = func.call @calloc(%69, %70) : (i64, i64) -> !llvm.ptr
    %71 = llvm.mlir.addressof @rot_tab : !llvm.ptr
    llvm.store %64, %71 : !llvm.ptr, !llvm.ptr
    %73 = arith.constant 512 : i32
    %74 = arith.constant 8 : i32
    %75 = arith.extsi %73 : i32 to i64
    %76 = arith.extsi %74 : i32 to i64
    %72 = func.call @calloc(%75, %76) : (i64, i64) -> !llvm.ptr
    %77 = llvm.mlir.addressof @mask_all : !llvm.ptr
    llvm.store %72, %77 : !llvm.ptr, !llvm.ptr
    %79 = arith.constant 512 : i32
    %80 = arith.constant 8 : i32
    %81 = arith.extsi %79 : i32 to i64
    %82 = arith.extsi %80 : i32 to i64
    %78 = func.call @calloc(%81, %82) : (i64, i64) -> !llvm.ptr
    %83 = llvm.mlir.addressof @mask_no0 : !llvm.ptr
    llvm.store %78, %83 : !llvm.ptr, !llvm.ptr
    %85 = arith.constant 512 : i32
    %86 = arith.constant 8 : i32
    %87 = arith.muli %85, %86 : i32
    %88 = arith.constant 8 : i32
    %89 = arith.extsi %87 : i32 to i64
    %90 = arith.extsi %88 : i32 to i64
    %84 = func.call @calloc(%89, %90) : (i64, i64) -> !llvm.ptr
    %91 = llvm.mlir.addressof @update_tab : !llvm.ptr
    llvm.store %84, %91 : !llvm.ptr, !llvm.ptr
    %93 = arith.constant 6 : i32
    %94 = arith.constant 8 : i32
    %95 = arith.muli %93, %94 : i32
    %96 = arith.constant 8 : i32
    %97 = arith.extsi %95 : i32 to i64
    %98 = arith.extsi %96 : i32 to i64
    %92 = func.call @calloc(%97, %98) : (i64, i64) -> !llvm.ptr
    %99 = llvm.mlir.addressof @add_contrib_tab : !llvm.ptr
    llvm.store %92, %99 : !llvm.ptr, !llvm.ptr
    %101 = arith.constant 8 : i32
    %102 = arith.constant 8 : i32
    %103 = arith.extsi %101 : i32 to i64
    %104 = arith.extsi %102 : i32 to i64
    %100 = func.call @calloc(%103, %104) : (i64, i64) -> !llvm.ptr
    %105 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    llvm.store %100, %105 : !llvm.ptr, !llvm.ptr
    %107 = arith.constant 8 : i32
    %108 = arith.constant 8 : i32
    %109 = arith.extsi %107 : i32 to i64
    %110 = arith.extsi %108 : i32 to i64
    %106 = func.call @calloc(%109, %110) : (i64, i64) -> !llvm.ptr
    %111 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    llvm.store %106, %111 : !llvm.ptr, !llvm.ptr
    %112 = arith.constant 1 : i32
    %113 = llvm.mlir.addressof @W_arr : !llvm.ptr
    %114 = llvm.load %113 : !llvm.ptr -> !llvm.ptr
    %115 = arith.constant 0 : i32
    %116 = arith.extsi %112 : i32 to i64
    %117 = arith.extsi %115 : i32 to i64
    %118 = llvm.getelementptr %114[%117] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %116, %118 : i64, !llvm.ptr
    %119 = arith.constant 3 : i32
    %120 = llvm.mlir.addressof @W_arr : !llvm.ptr
    %121 = llvm.load %120 : !llvm.ptr -> !llvm.ptr
    %122 = arith.constant 1 : i32
    %123 = arith.extsi %119 : i32 to i64
    %124 = arith.extsi %122 : i32 to i64
    %125 = llvm.getelementptr %121[%124] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %123, %125 : i64, !llvm.ptr
    %126 = arith.constant 2 : i32
    %127 = llvm.mlir.addressof @W_arr : !llvm.ptr
    %128 = llvm.load %127 : !llvm.ptr -> !llvm.ptr
    %129 = arith.constant 2 : i32
    %130 = arith.extsi %126 : i32 to i64
    %131 = arith.extsi %129 : i32 to i64
    %132 = llvm.getelementptr %128[%131] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %130, %132 : i64, !llvm.ptr
    %133 = arith.constant 6 : i32
    %134 = llvm.mlir.addressof @W_arr : !llvm.ptr
    %135 = llvm.load %134 : !llvm.ptr -> !llvm.ptr
    %136 = arith.constant 3 : i32
    %137 = arith.extsi %133 : i32 to i64
    %138 = arith.extsi %136 : i32 to i64
    %139 = llvm.getelementptr %135[%138] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %137, %139 : i64, !llvm.ptr
    %140 = arith.constant 4 : i32
    %141 = llvm.mlir.addressof @W_arr : !llvm.ptr
    %142 = llvm.load %141 : !llvm.ptr -> !llvm.ptr
    %143 = arith.constant 4 : i32
    %144 = arith.extsi %140 : i32 to i64
    %145 = arith.extsi %143 : i32 to i64
    %146 = llvm.getelementptr %142[%145] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %144, %146 : i64, !llvm.ptr
    %147 = arith.constant 5 : i32
    %148 = llvm.mlir.addressof @W_arr : !llvm.ptr
    %149 = llvm.load %148 : !llvm.ptr -> !llvm.ptr
    %150 = arith.constant 5 : i32
    %151 = arith.extsi %147 : i32 to i64
    %152 = arith.extsi %150 : i32 to i64
    %153 = llvm.getelementptr %149[%152] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %151, %153 : i64, !llvm.ptr
    %154 = arith.constant 0 : i32
    %155 = arith.extsi %154 : i32 to i64
    %156 = llvm.mlir.constant(1 : i64) : i64
    %157 = llvm.alloca %156 x i64 : (i64) -> !llvm.ptr
    llvm.store %155, %157 : i64, !llvm.ptr
    cf.br ^bb6
    ^bb6:
    %158 = llvm.load %157 : !llvm.ptr -> i64
    %159 = arith.constant 6 : i32
    %161 = arith.extsi %159 : i32 to i64
    %160 = arith.cmpi slt, %158, %161 : i64
    cf.cond_br %160, ^bb7, ^bb8
    ^bb7:
      %162 = arith.constant 9 : i32
      %163 = llvm.load %157 : !llvm.ptr -> i64
      %165 = arith.extsi %162 : i32 to i64
      %164 = arith.muli %165, %163 : i64
      %166 = llvm.mlir.addressof @SHIFT_arr : !llvm.ptr
      %167 = llvm.load %166 : !llvm.ptr -> !llvm.ptr
      %168 = llvm.load %157 : !llvm.ptr -> i64
      %169 = llvm.getelementptr %167[%168] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %164, %169 : i64, !llvm.ptr
      %170 = llvm.load %157 : !llvm.ptr -> i64
      %171 = arith.constant 1 : i32
      %173 = arith.extsi %171 : i32 to i64
      %172 = arith.addi %170, %173 : i64
      llvm.store %172, %157 : i64, !llvm.ptr
      cf.br ^bb6
    ^bb8:
    %175 = arith.constant 6 : i32
    %176 = arith.constant 6 : i32
    %177 = arith.muli %175, %176 : i32
    %178 = arith.constant 8 : i32
    %179 = arith.extsi %177 : i32 to i64
    %180 = arith.extsi %178 : i32 to i64
    %174 = func.call @calloc(%179, %180) : (i64, i64) -> !llvm.ptr
    %181 = arith.constant 0 : i32
    %182 = arith.extsi %181 : i32 to i64
    %183 = llvm.mlir.constant(1 : i64) : i64
    %184 = llvm.alloca %183 x i64 : (i64) -> !llvm.ptr
    llvm.store %182, %184 : i64, !llvm.ptr
    cf.br ^bb9
    ^bb9:
    %185 = llvm.load %184 : !llvm.ptr -> i64
    %186 = arith.constant 6 : i32
    %188 = arith.extsi %186 : i32 to i64
    %187 = arith.cmpi slt, %185, %188 : i64
    cf.cond_br %187, ^bb10, ^bb11
    ^bb10:
      %189 = arith.constant 0 : i32
      %190 = arith.extsi %189 : i32 to i64
      %191 = llvm.mlir.constant(1 : i64) : i64
      %192 = llvm.alloca %191 x i64 : (i64) -> !llvm.ptr
      llvm.store %190, %192 : i64, !llvm.ptr
      cf.br ^bb12
      ^bb12:
      %193 = llvm.load %192 : !llvm.ptr -> i64
      %194 = arith.constant 6 : i32
      %196 = arith.extsi %194 : i32 to i64
      %195 = arith.cmpi slt, %193, %196 : i64
      cf.cond_br %195, ^bb13, ^bb14
      ^bb13:
        %197 = llvm.load %184 : !llvm.ptr -> i64
        %198 = llvm.load %192 : !llvm.ptr -> i64
        %199 = arith.cmpi ne, %197, %198 : i64
        cf.cond_br %199, ^bb15, ^bb16
        ^bb15:
          %202 = llvm.mlir.addressof @W_arr : !llvm.ptr
          %203 = llvm.load %202 : !llvm.ptr -> !llvm.ptr
          %204 = llvm.load %192 : !llvm.ptr -> i64
          %205 = llvm.getelementptr %203[%204] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %201 = llvm.load %205 : !llvm.ptr -> i64
          %207 = llvm.mlir.addressof @W_arr : !llvm.ptr
          %208 = llvm.load %207 : !llvm.ptr -> !llvm.ptr
          %209 = llvm.load %184 : !llvm.ptr -> i64
          %210 = llvm.getelementptr %208[%209] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %206 = llvm.load %210 : !llvm.ptr -> i64
          %211 = arith.subi %201, %206 : i64
          %212 = arith.constant 7 : i32
          %214 = arith.extsi %212 : i32 to i64
          %213 = arith.addi %211, %214 : i64
          %215 = arith.constant 7 : i32
          %217 = arith.extsi %215 : i32 to i64
          %216 = arith.remsi %213, %217 : i64
          %200 = func.call @mod_inv7(%216) : (i64) -> i64
          %218 = llvm.load %184 : !llvm.ptr -> i64
          %219 = arith.constant 6 : i32
          %221 = arith.extsi %219 : i32 to i64
          %220 = arith.muli %218, %221 : i64
          %222 = llvm.load %192 : !llvm.ptr -> i64
          %223 = arith.addi %220, %222 : i64
          %224 = llvm.getelementptr %174[%223] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %200, %224 : i64, !llvm.ptr
          cf.br ^bb17
        ^bb16:
          cf.br ^bb17
        ^bb17:
        %225 = llvm.load %192 : !llvm.ptr -> i64
        %226 = arith.constant 1 : i32
        %228 = arith.extsi %226 : i32 to i64
        %227 = arith.addi %225, %228 : i64
        llvm.store %227, %192 : i64, !llvm.ptr
        cf.br ^bb12
      ^bb14:
      %229 = llvm.load %184 : !llvm.ptr -> i64
      %230 = arith.constant 1 : i32
      %232 = arith.extsi %230 : i32 to i64
      %231 = arith.addi %229, %232 : i64
      llvm.store %231, %184 : i64, !llvm.ptr
      cf.br ^bb9
    ^bb11:
    %233 = arith.constant 1 : i32
    %234 = arith.extsi %233 : i32 to i64
    %235 = llvm.mlir.constant(1 : i64) : i64
    %236 = llvm.alloca %235 x i64 : (i64) -> !llvm.ptr
    llvm.store %234, %236 : i64, !llvm.ptr
    cf.br ^bb18
    ^bb18:
    %237 = llvm.load %236 : !llvm.ptr -> i64
    %238 = arith.constant 7 : i32
    %240 = arith.extsi %238 : i32 to i64
    %239 = arith.cmpi slt, %237, %240 : i64
    cf.cond_br %239, ^bb19, ^bb20
    ^bb19:
      %241 = arith.constant 0 : i32
      %242 = arith.extsi %241 : i32 to i64
      %243 = llvm.mlir.constant(1 : i64) : i64
      %244 = llvm.alloca %243 x i64 : (i64) -> !llvm.ptr
      llvm.store %242, %244 : i64, !llvm.ptr
      cf.br ^bb21
      ^bb21:
      %245 = llvm.load %244 : !llvm.ptr -> i64
      %246 = arith.constant 6 : i32
      %248 = arith.extsi %246 : i32 to i64
      %247 = arith.cmpi slt, %245, %248 : i64
      cf.cond_br %247, ^bb22, ^bb23
      ^bb22:
        %249 = arith.constant 0 : i32
        %250 = arith.extsi %249 : i32 to i64
        %251 = llvm.mlir.constant(1 : i64) : i64
        %252 = llvm.alloca %251 x i64 : (i64) -> !llvm.ptr
        llvm.store %250, %252 : i64, !llvm.ptr
        cf.br ^bb24
        ^bb24:
        %253 = llvm.load %252 : !llvm.ptr -> i64
        %254 = arith.constant 6 : i32
        %256 = arith.extsi %254 : i32 to i64
        %255 = arith.cmpi slt, %253, %256 : i64
        cf.cond_br %255, ^bb25, ^bb26
        ^bb25:
          %257 = llvm.load %244 : !llvm.ptr -> i64
          %258 = llvm.load %252 : !llvm.ptr -> i64
          %259 = arith.cmpi ne, %257, %258 : i64
          cf.cond_br %259, ^bb27, ^bb28
          ^bb27:
            %260 = llvm.load %236 : !llvm.ptr -> i64
            %262 = llvm.load %244 : !llvm.ptr -> i64
            %263 = arith.constant 6 : i32
            %265 = arith.extsi %263 : i32 to i64
            %264 = arith.muli %262, %265 : i64
            %266 = llvm.load %252 : !llvm.ptr -> i64
            %267 = arith.addi %264, %266 : i64
            %268 = llvm.getelementptr %174[%267] : (!llvm.ptr, i64) -> !llvm.ptr, i64
            %261 = llvm.load %268 : !llvm.ptr -> i64
            %269 = arith.muli %260, %261 : i64
            %270 = arith.constant 7 : i32
            %272 = arith.extsi %270 : i32 to i64
            %271 = arith.remsi %269, %272 : i64
            %273 = llvm.mlir.addressof @shifts_tab : !llvm.ptr
            %274 = llvm.load %273 : !llvm.ptr -> !llvm.ptr
            %275 = llvm.load %236 : !llvm.ptr -> i64
            %276 = arith.constant 36 : i32
            %278 = arith.extsi %276 : i32 to i64
            %277 = arith.muli %275, %278 : i64
            %279 = llvm.load %244 : !llvm.ptr -> i64
            %280 = arith.constant 6 : i32
            %282 = arith.extsi %280 : i32 to i64
            %281 = arith.muli %279, %282 : i64
            %283 = arith.addi %277, %281 : i64
            %284 = llvm.load %252 : !llvm.ptr -> i64
            %285 = arith.addi %283, %284 : i64
            %286 = llvm.getelementptr %274[%285] : (!llvm.ptr, i64) -> !llvm.ptr, i64
            llvm.store %271, %286 : i64, !llvm.ptr
            cf.br ^bb29
          ^bb28:
            cf.br ^bb29
          ^bb29:
          %287 = llvm.load %252 : !llvm.ptr -> i64
          %288 = arith.constant 1 : i32
          %290 = arith.extsi %288 : i32 to i64
          %289 = arith.addi %287, %290 : i64
          llvm.store %289, %252 : i64, !llvm.ptr
          cf.br ^bb24
        ^bb26:
        %291 = llvm.load %244 : !llvm.ptr -> i64
        %292 = arith.constant 1 : i32
        %294 = arith.extsi %292 : i32 to i64
        %293 = arith.addi %291, %294 : i64
        llvm.store %293, %244 : i64, !llvm.ptr
        cf.br ^bb21
      ^bb23:
      %295 = llvm.load %236 : !llvm.ptr -> i64
      %296 = arith.constant 1 : i32
      %298 = arith.extsi %296 : i32 to i64
      %297 = arith.addi %295, %298 : i64
      llvm.store %297, %236 : i64, !llvm.ptr
      cf.br ^bb18
    ^bb20:
    func.call @free(%174) : (!llvm.ptr) -> ()
    %300 = arith.constant 0 : i32
    %301 = arith.extsi %300 : i32 to i64
    %302 = llvm.mlir.constant(1 : i64) : i64
    %303 = llvm.alloca %302 x i64 : (i64) -> !llvm.ptr
    llvm.store %301, %303 : i64, !llvm.ptr
    cf.br ^bb30
    ^bb30:
    %304 = llvm.load %303 : !llvm.ptr -> i64
    %305 = arith.constant 7 : i32
    %307 = arith.extsi %305 : i32 to i64
    %306 = arith.cmpi slt, %304, %307 : i64
    cf.cond_br %306, ^bb31, ^bb32
    ^bb31:
      %308 = arith.constant 0 : i32
      %309 = arith.extsi %308 : i32 to i64
      %310 = llvm.mlir.constant(1 : i64) : i64
      %311 = llvm.alloca %310 x i64 : (i64) -> !llvm.ptr
      llvm.store %309, %311 : i64, !llvm.ptr
      cf.br ^bb33
      ^bb33:
      %312 = llvm.load %311 : !llvm.ptr -> i64
      %313 = arith.constant 128 : i32
      %315 = arith.extsi %313 : i32 to i64
      %314 = arith.cmpi slt, %312, %315 : i64
      cf.cond_br %314, ^bb34, ^bb35
      ^bb34:
        %316 = llvm.load %303 : !llvm.ptr -> i64
        %317 = arith.constant 0 : i32
        %319 = arith.extsi %317 : i32 to i64
        %318 = arith.cmpi eq, %316, %319 : i64
        cf.cond_br %318, ^bb36, ^bb37
        ^bb36:
          %320 = llvm.load %311 : !llvm.ptr -> i64
          %321 = llvm.mlir.addressof @rot_tab : !llvm.ptr
          %322 = llvm.load %321 : !llvm.ptr -> !llvm.ptr
          %323 = llvm.load %303 : !llvm.ptr -> i64
          %324 = arith.constant 128 : i32
          %326 = arith.extsi %324 : i32 to i64
          %325 = arith.muli %323, %326 : i64
          %327 = llvm.load %311 : !llvm.ptr -> i64
          %328 = arith.addi %325, %327 : i64
          %329 = llvm.getelementptr %322[%328] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %320, %329 : i64, !llvm.ptr
          cf.br ^bb38
        ^bb37:
          %330 = llvm.load %311 : !llvm.ptr -> i64
          %331 = llvm.load %303 : !llvm.ptr -> i64
          %332 = arith.shli %330, %331 : i64
          %333 = llvm.load %311 : !llvm.ptr -> i64
          %334 = arith.constant 7 : i32
          %335 = llvm.load %303 : !llvm.ptr -> i64
          %337 = arith.extsi %334 : i32 to i64
          %336 = arith.subi %337, %335 : i64
          %338 = arith.shrsi %333, %336 : i64
          %339 = arith.ori %332, %338 : i64
          %340 = arith.constant 127 : i32
          %342 = arith.extsi %340 : i32 to i64
          %341 = arith.andi %339, %342 : i64
          %343 = llvm.mlir.addressof @rot_tab : !llvm.ptr
          %344 = llvm.load %343 : !llvm.ptr -> !llvm.ptr
          %345 = llvm.load %303 : !llvm.ptr -> i64
          %346 = arith.constant 128 : i32
          %348 = arith.extsi %346 : i32 to i64
          %347 = arith.muli %345, %348 : i64
          %349 = llvm.load %311 : !llvm.ptr -> i64
          %350 = arith.addi %347, %349 : i64
          %351 = llvm.getelementptr %344[%350] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %341, %351 : i64, !llvm.ptr
          cf.br ^bb38
        ^bb38:
        %352 = llvm.load %311 : !llvm.ptr -> i64
        %353 = arith.constant 1 : i32
        %355 = arith.extsi %353 : i32 to i64
        %354 = arith.addi %352, %355 : i64
        llvm.store %354, %311 : i64, !llvm.ptr
        cf.br ^bb33
      ^bb35:
      %356 = llvm.load %303 : !llvm.ptr -> i64
      %357 = arith.constant 1 : i32
      %359 = arith.extsi %357 : i32 to i64
      %358 = arith.addi %356, %359 : i64
      llvm.store %358, %303 : i64, !llvm.ptr
      cf.br ^bb30
    ^bb32:
    %360 = arith.constant 0 : i32
    %361 = arith.extsi %360 : i32 to i64
    %362 = llvm.mlir.constant(1 : i64) : i64
    %363 = llvm.alloca %362 x i64 : (i64) -> !llvm.ptr
    llvm.store %361, %363 : i64, !llvm.ptr
    cf.br ^bb39
    ^bb39:
    %364 = llvm.load %363 : !llvm.ptr -> i64
    %365 = arith.constant 512 : i32
    %367 = arith.extsi %365 : i32 to i64
    %366 = arith.cmpi slt, %364, %367 : i64
    cf.cond_br %366, ^bb40, ^bb41
    ^bb40:
      %368 = llvm.load %363 : !llvm.ptr -> i64
      %369 = arith.constant 127 : i32
      %371 = arith.extsi %369 : i32 to i64
      %370 = arith.andi %368, %371 : i64
      %372 = llvm.load %363 : !llvm.ptr -> i64
      %373 = arith.constant 8 : i32
      %375 = arith.extsi %373 : i32 to i64
      %374 = arith.shrsi %372, %375 : i64
      %376 = arith.constant 1 : i32
      %378 = arith.extsi %376 : i32 to i64
      %377 = arith.andi %374, %378 : i64
      %379 = llvm.mlir.addressof @mask_all : !llvm.ptr
      %380 = llvm.load %379 : !llvm.ptr -> !llvm.ptr
      %381 = llvm.load %363 : !llvm.ptr -> i64
      %382 = llvm.getelementptr %380[%381] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %370, %382 : i64, !llvm.ptr
      %383 = arith.constant 1 : i32
      %385 = arith.constant -1 : i32
      %384 = arith.xori %383, %385 : i32
      %387 = arith.extsi %384 : i32 to i64
      %386 = arith.andi %370, %387 : i64
      %388 = llvm.mlir.constant(1 : i64) : i64
      %389 = llvm.alloca %388 x i64 : (i64) -> !llvm.ptr
      llvm.store %386, %389 : i64, !llvm.ptr
      %390 = arith.constant 0 : i32
      %392 = arith.extsi %390 : i32 to i64
      %391 = arith.cmpi ne, %377, %392 : i64
      cf.cond_br %391, ^bb42, ^bb43
      ^bb42:
        %393 = llvm.load %389 : !llvm.ptr -> i64
        %394 = arith.constant 1 : i32
        %396 = arith.extsi %394 : i32 to i64
        %395 = arith.ori %393, %396 : i64
        llvm.store %395, %389 : i64, !llvm.ptr
        cf.br ^bb44
      ^bb43:
        cf.br ^bb44
      ^bb44:
      %397 = llvm.load %389 : !llvm.ptr -> i64
      %398 = llvm.mlir.addressof @mask_no0 : !llvm.ptr
      %399 = llvm.load %398 : !llvm.ptr -> !llvm.ptr
      %400 = llvm.load %363 : !llvm.ptr -> i64
      %401 = llvm.getelementptr %399[%400] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %397, %401 : i64, !llvm.ptr
      %402 = llvm.load %363 : !llvm.ptr -> i64
      %403 = arith.constant 1 : i32
      %405 = arith.extsi %403 : i32 to i64
      %404 = arith.addi %402, %405 : i64
      llvm.store %404, %363 : i64, !llvm.ptr
      cf.br ^bb39
    ^bb41:
    %407 = arith.constant 8 : i32
    %408 = arith.constant 8 : i32
    %409 = arith.extsi %407 : i32 to i64
    %410 = arith.extsi %408 : i32 to i64
    %406 = func.call @calloc(%409, %410) : (i64, i64) -> !llvm.ptr
    %412 = arith.constant 8 : i32
    %413 = arith.constant 8 : i32
    %414 = arith.extsi %412 : i32 to i64
    %415 = arith.extsi %413 : i32 to i64
    %411 = func.call @calloc(%414, %415) : (i64, i64) -> !llvm.ptr
    %417 = arith.constant 8 : i32
    %418 = arith.constant 8 : i32
    %419 = arith.extsi %417 : i32 to i64
    %420 = arith.extsi %418 : i32 to i64
    %416 = func.call @calloc(%419, %420) : (i64, i64) -> !llvm.ptr
    %421 = arith.constant 0 : i32
    %422 = arith.constant 0 : i32
    %423 = arith.extsi %421 : i32 to i64
    %424 = arith.extsi %422 : i32 to i64
    %425 = llvm.getelementptr %406[%424] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %423, %425 : i64, !llvm.ptr
    %426 = arith.constant 1 : i32
    %427 = arith.constant 0 : i32
    %428 = arith.extsi %426 : i32 to i64
    %429 = arith.extsi %427 : i32 to i64
    %430 = llvm.getelementptr %411[%429] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %428, %430 : i64, !llvm.ptr
    %431 = arith.constant 0 : i32
    %432 = arith.constant 0 : i32
    %433 = arith.extsi %431 : i32 to i64
    %434 = arith.extsi %432 : i32 to i64
    %435 = llvm.getelementptr %416[%434] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %433, %435 : i64, !llvm.ptr
    %436 = arith.constant 0 : i32
    %437 = arith.constant 1 : i32
    %438 = arith.extsi %436 : i32 to i64
    %439 = arith.extsi %437 : i32 to i64
    %440 = llvm.getelementptr %406[%439] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %438, %440 : i64, !llvm.ptr
    %441 = arith.constant 0 : i32
    %442 = arith.constant 1 : i32
    %443 = arith.extsi %441 : i32 to i64
    %444 = arith.extsi %442 : i32 to i64
    %445 = llvm.getelementptr %411[%444] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %443, %445 : i64, !llvm.ptr
    %446 = arith.constant 1 : i32
    %447 = arith.constant 1 : i32
    %448 = arith.extsi %446 : i32 to i64
    %449 = arith.extsi %447 : i32 to i64
    %450 = llvm.getelementptr %416[%449] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %448, %450 : i64, !llvm.ptr
    %451 = arith.constant 1 : i32
    %452 = arith.constant 2 : i32
    %453 = arith.extsi %451 : i32 to i64
    %454 = arith.extsi %452 : i32 to i64
    %455 = llvm.getelementptr %406[%454] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %453, %455 : i64, !llvm.ptr
    %456 = arith.constant 0 : i32
    %457 = arith.constant 2 : i32
    %458 = arith.extsi %456 : i32 to i64
    %459 = arith.extsi %457 : i32 to i64
    %460 = llvm.getelementptr %411[%459] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %458, %460 : i64, !llvm.ptr
    %461 = arith.constant 0 : i32
    %462 = arith.constant 2 : i32
    %463 = arith.extsi %461 : i32 to i64
    %464 = arith.extsi %462 : i32 to i64
    %465 = llvm.getelementptr %416[%464] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %463, %465 : i64, !llvm.ptr
    %466 = arith.constant 2 : i32
    %467 = arith.constant 3 : i32
    %468 = arith.extsi %466 : i32 to i64
    %469 = arith.extsi %467 : i32 to i64
    %470 = llvm.getelementptr %406[%469] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %468, %470 : i64, !llvm.ptr
    %471 = arith.constant 0 : i32
    %472 = arith.constant 3 : i32
    %473 = arith.extsi %471 : i32 to i64
    %474 = arith.extsi %472 : i32 to i64
    %475 = llvm.getelementptr %411[%474] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %473, %475 : i64, !llvm.ptr
    %476 = arith.constant 0 : i32
    %477 = arith.constant 3 : i32
    %478 = arith.extsi %476 : i32 to i64
    %479 = arith.extsi %477 : i32 to i64
    %480 = llvm.getelementptr %416[%479] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %478, %480 : i64, !llvm.ptr
    %481 = arith.constant 3 : i32
    %482 = arith.constant 4 : i32
    %483 = arith.extsi %481 : i32 to i64
    %484 = arith.extsi %482 : i32 to i64
    %485 = llvm.getelementptr %406[%484] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %483, %485 : i64, !llvm.ptr
    %486 = arith.constant 0 : i32
    %487 = arith.constant 4 : i32
    %488 = arith.extsi %486 : i32 to i64
    %489 = arith.extsi %487 : i32 to i64
    %490 = llvm.getelementptr %411[%489] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %488, %490 : i64, !llvm.ptr
    %491 = arith.constant 0 : i32
    %492 = arith.constant 4 : i32
    %493 = arith.extsi %491 : i32 to i64
    %494 = arith.extsi %492 : i32 to i64
    %495 = llvm.getelementptr %416[%494] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %493, %495 : i64, !llvm.ptr
    %496 = arith.constant 4 : i32
    %497 = arith.constant 5 : i32
    %498 = arith.extsi %496 : i32 to i64
    %499 = arith.extsi %497 : i32 to i64
    %500 = llvm.getelementptr %406[%499] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %498, %500 : i64, !llvm.ptr
    %501 = arith.constant 0 : i32
    %502 = arith.constant 5 : i32
    %503 = arith.extsi %501 : i32 to i64
    %504 = arith.extsi %502 : i32 to i64
    %505 = llvm.getelementptr %411[%504] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %503, %505 : i64, !llvm.ptr
    %506 = arith.constant 0 : i32
    %507 = arith.constant 5 : i32
    %508 = arith.extsi %506 : i32 to i64
    %509 = arith.extsi %507 : i32 to i64
    %510 = llvm.getelementptr %416[%509] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %508, %510 : i64, !llvm.ptr
    %511 = arith.constant 5 : i32
    %512 = arith.constant 6 : i32
    %513 = arith.extsi %511 : i32 to i64
    %514 = arith.extsi %512 : i32 to i64
    %515 = llvm.getelementptr %406[%514] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %513, %515 : i64, !llvm.ptr
    %516 = arith.constant 0 : i32
    %517 = arith.constant 6 : i32
    %518 = arith.extsi %516 : i32 to i64
    %519 = arith.extsi %517 : i32 to i64
    %520 = llvm.getelementptr %411[%519] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %518, %520 : i64, !llvm.ptr
    %521 = arith.constant 0 : i32
    %522 = arith.constant 6 : i32
    %523 = arith.extsi %521 : i32 to i64
    %524 = arith.extsi %522 : i32 to i64
    %525 = llvm.getelementptr %416[%524] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %523, %525 : i64, !llvm.ptr
    %526 = arith.constant 6 : i32
    %527 = arith.constant 7 : i32
    %528 = arith.extsi %526 : i32 to i64
    %529 = arith.extsi %527 : i32 to i64
    %530 = llvm.getelementptr %406[%529] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %528, %530 : i64, !llvm.ptr
    %531 = arith.constant 0 : i32
    %532 = arith.constant 7 : i32
    %533 = arith.extsi %531 : i32 to i64
    %534 = arith.extsi %532 : i32 to i64
    %535 = llvm.getelementptr %411[%534] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %533, %535 : i64, !llvm.ptr
    %536 = arith.constant 0 : i32
    %537 = arith.constant 7 : i32
    %538 = arith.extsi %536 : i32 to i64
    %539 = arith.extsi %537 : i32 to i64
    %540 = llvm.getelementptr %416[%539] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %538, %540 : i64, !llvm.ptr
    %541 = arith.constant 0 : i32
    %542 = arith.extsi %541 : i32 to i64
    %543 = llvm.mlir.constant(1 : i64) : i64
    %544 = llvm.alloca %543 x i64 : (i64) -> !llvm.ptr
    llvm.store %542, %544 : i64, !llvm.ptr
    cf.br ^bb45
    ^bb45:
    %545 = llvm.load %544 : !llvm.ptr -> i64
    %546 = arith.constant 512 : i32
    %548 = arith.extsi %546 : i32 to i64
    %547 = arith.cmpi slt, %545, %548 : i64
    cf.cond_br %547, ^bb46, ^bb47
    ^bb46:
      %549 = llvm.load %544 : !llvm.ptr -> i64
      %550 = arith.constant 127 : i32
      %552 = arith.extsi %550 : i32 to i64
      %551 = arith.andi %549, %552 : i64
      %553 = llvm.load %544 : !llvm.ptr -> i64
      %554 = arith.constant 7 : i32
      %556 = arith.extsi %554 : i32 to i64
      %555 = arith.shrsi %553, %556 : i64
      %557 = arith.constant 1 : i32
      %559 = arith.extsi %557 : i32 to i64
      %558 = arith.andi %555, %559 : i64
      %560 = llvm.load %544 : !llvm.ptr -> i64
      %561 = arith.constant 8 : i32
      %563 = arith.extsi %561 : i32 to i64
      %562 = arith.shrsi %560, %563 : i64
      %564 = arith.constant 1 : i32
      %566 = arith.extsi %564 : i32 to i64
      %565 = arith.andi %562, %566 : i64
      %567 = arith.constant 0 : i32
      %568 = arith.extsi %567 : i32 to i64
      %569 = llvm.mlir.constant(1 : i64) : i64
      %570 = llvm.alloca %569 x i64 : (i64) -> !llvm.ptr
      llvm.store %568, %570 : i64, !llvm.ptr
      cf.br ^bb48
      ^bb48:
      %571 = llvm.load %570 : !llvm.ptr -> i64
      %572 = arith.constant 8 : i32
      %574 = arith.extsi %572 : i32 to i64
      %573 = arith.cmpi slt, %571, %574 : i64
      cf.cond_br %573, ^bb49, ^bb50
      ^bb49:
        %576 = llvm.load %570 : !llvm.ptr -> i64
        %577 = llvm.getelementptr %406[%576] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %575 = llvm.load %577 : !llvm.ptr -> i64
        %579 = llvm.load %570 : !llvm.ptr -> i64
        %580 = llvm.getelementptr %411[%579] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %578 = llvm.load %580 : !llvm.ptr -> i64
        %582 = llvm.load %570 : !llvm.ptr -> i64
        %583 = llvm.getelementptr %416[%582] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %581 = llvm.load %583 : !llvm.ptr -> i64
        %584 = arith.constant 1 : i32
        %586 = arith.extsi %584 : i32 to i64
        %585 = arith.shli %586, %575 : i64
        %587 = arith.ori %551, %585 : i64
        %588 = arith.ori %558, %578 : i64
        %589 = arith.ori %565, %581 : i64
        %590 = arith.constant 7 : i32
        %592 = arith.extsi %590 : i32 to i64
        %591 = arith.shli %588, %592 : i64
        %593 = arith.ori %587, %591 : i64
        %594 = arith.constant 8 : i32
        %596 = arith.extsi %594 : i32 to i64
        %595 = arith.shli %589, %596 : i64
        %597 = arith.ori %593, %595 : i64
        %598 = llvm.mlir.addressof @update_tab : !llvm.ptr
        %599 = llvm.load %598 : !llvm.ptr -> !llvm.ptr
        %600 = llvm.load %544 : !llvm.ptr -> i64
        %601 = arith.constant 8 : i32
        %603 = arith.extsi %601 : i32 to i64
        %602 = arith.muli %600, %603 : i64
        %604 = llvm.load %570 : !llvm.ptr -> i64
        %605 = arith.addi %602, %604 : i64
        %606 = llvm.getelementptr %599[%605] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %597, %606 : i64, !llvm.ptr
        %607 = llvm.load %570 : !llvm.ptr -> i64
        %608 = arith.constant 1 : i32
        %610 = arith.extsi %608 : i32 to i64
        %609 = arith.addi %607, %610 : i64
        llvm.store %609, %570 : i64, !llvm.ptr
        cf.br ^bb48
      ^bb50:
      %611 = llvm.load %544 : !llvm.ptr -> i64
      %612 = arith.constant 1 : i32
      %614 = arith.extsi %612 : i32 to i64
      %613 = arith.addi %611, %614 : i64
      llvm.store %613, %544 : i64, !llvm.ptr
      cf.br ^bb45
    ^bb47:
    func.call @free(%406) : (!llvm.ptr) -> ()
    func.call @free(%411) : (!llvm.ptr) -> ()
    func.call @free(%416) : (!llvm.ptr) -> ()
    %618 = arith.constant 0 : i32
    %619 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %620 = llvm.load %619 : !llvm.ptr -> !llvm.ptr
    %621 = arith.constant 0 : i32
    %622 = arith.extsi %618 : i32 to i64
    %623 = arith.extsi %621 : i32 to i64
    %624 = llvm.getelementptr %620[%623] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %622, %624 : i64, !llvm.ptr
    %625 = arith.constant 0 : i32
    %626 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %627 = llvm.load %626 : !llvm.ptr -> !llvm.ptr
    %628 = arith.constant 1 : i32
    %629 = arith.extsi %625 : i32 to i64
    %630 = arith.extsi %628 : i32 to i64
    %631 = llvm.getelementptr %627[%630] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %629, %631 : i64, !llvm.ptr
    %632 = arith.constant 1 : i32
    %633 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %634 = llvm.load %633 : !llvm.ptr -> !llvm.ptr
    %635 = arith.constant 2 : i32
    %636 = arith.extsi %632 : i32 to i64
    %637 = arith.extsi %635 : i32 to i64
    %638 = llvm.getelementptr %634[%637] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %636, %638 : i64, !llvm.ptr
    %639 = arith.constant 2 : i32
    %640 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %641 = llvm.load %640 : !llvm.ptr -> !llvm.ptr
    %642 = arith.constant 3 : i32
    %643 = arith.extsi %639 : i32 to i64
    %644 = arith.extsi %642 : i32 to i64
    %645 = llvm.getelementptr %641[%644] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %643, %645 : i64, !llvm.ptr
    %646 = arith.constant 3 : i32
    %647 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %648 = llvm.load %647 : !llvm.ptr -> !llvm.ptr
    %649 = arith.constant 4 : i32
    %650 = arith.extsi %646 : i32 to i64
    %651 = arith.extsi %649 : i32 to i64
    %652 = llvm.getelementptr %648[%651] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %650, %652 : i64, !llvm.ptr
    %653 = arith.constant 4 : i32
    %654 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %655 = llvm.load %654 : !llvm.ptr -> !llvm.ptr
    %656 = arith.constant 5 : i32
    %657 = arith.extsi %653 : i32 to i64
    %658 = arith.extsi %656 : i32 to i64
    %659 = llvm.getelementptr %655[%658] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %657, %659 : i64, !llvm.ptr
    %660 = arith.constant 5 : i32
    %661 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %662 = llvm.load %661 : !llvm.ptr -> !llvm.ptr
    %663 = arith.constant 6 : i32
    %664 = arith.extsi %660 : i32 to i64
    %665 = arith.extsi %663 : i32 to i64
    %666 = llvm.getelementptr %662[%665] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %664, %666 : i64, !llvm.ptr
    %667 = arith.constant 6 : i32
    %668 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
    %669 = llvm.load %668 : !llvm.ptr -> !llvm.ptr
    %670 = arith.constant 7 : i32
    %671 = arith.extsi %667 : i32 to i64
    %672 = arith.extsi %670 : i32 to i64
    %673 = llvm.getelementptr %669[%672] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %671, %673 : i64, !llvm.ptr
    %674 = arith.constant 1 : i32
    %675 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %676 = llvm.load %675 : !llvm.ptr -> !llvm.ptr
    %677 = arith.constant 0 : i32
    %678 = arith.extsi %674 : i32 to i64
    %679 = arith.extsi %677 : i32 to i64
    %680 = llvm.getelementptr %676[%679] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %678, %680 : i64, !llvm.ptr
    %681 = arith.constant 1 : i32
    %682 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %683 = llvm.load %682 : !llvm.ptr -> !llvm.ptr
    %684 = arith.constant 1 : i32
    %685 = arith.extsi %681 : i32 to i64
    %686 = arith.extsi %684 : i32 to i64
    %687 = llvm.getelementptr %683[%686] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %685, %687 : i64, !llvm.ptr
    %688 = arith.constant 2 : i32
    %689 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %690 = llvm.load %689 : !llvm.ptr -> !llvm.ptr
    %691 = arith.constant 2 : i32
    %692 = arith.extsi %688 : i32 to i64
    %693 = arith.extsi %691 : i32 to i64
    %694 = llvm.getelementptr %690[%693] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %692, %694 : i64, !llvm.ptr
    %695 = arith.constant 2 : i32
    %696 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %697 = llvm.load %696 : !llvm.ptr -> !llvm.ptr
    %698 = arith.constant 3 : i32
    %699 = arith.extsi %695 : i32 to i64
    %700 = arith.extsi %698 : i32 to i64
    %701 = llvm.getelementptr %697[%700] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %699, %701 : i64, !llvm.ptr
    %702 = arith.constant 1 : i32
    %703 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %704 = llvm.load %703 : !llvm.ptr -> !llvm.ptr
    %705 = arith.constant 4 : i32
    %706 = arith.extsi %702 : i32 to i64
    %707 = arith.extsi %705 : i32 to i64
    %708 = llvm.getelementptr %704[%707] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %706, %708 : i64, !llvm.ptr
    %709 = arith.constant 1 : i32
    %710 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %711 = llvm.load %710 : !llvm.ptr -> !llvm.ptr
    %712 = arith.constant 5 : i32
    %713 = arith.extsi %709 : i32 to i64
    %714 = arith.extsi %712 : i32 to i64
    %715 = llvm.getelementptr %711[%714] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %713, %715 : i64, !llvm.ptr
    %716 = arith.constant 1 : i32
    %717 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %718 = llvm.load %717 : !llvm.ptr -> !llvm.ptr
    %719 = arith.constant 6 : i32
    %720 = arith.extsi %716 : i32 to i64
    %721 = arith.extsi %719 : i32 to i64
    %722 = llvm.getelementptr %718[%721] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %720, %722 : i64, !llvm.ptr
    %723 = arith.constant 1 : i32
    %724 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
    %725 = llvm.load %724 : !llvm.ptr -> !llvm.ptr
    %726 = arith.constant 7 : i32
    %727 = arith.extsi %723 : i32 to i64
    %728 = arith.extsi %726 : i32 to i64
    %729 = llvm.getelementptr %725[%728] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %727, %729 : i64, !llvm.ptr
    %730 = arith.constant 0 : i32
    %731 = arith.extsi %730 : i32 to i64
    %732 = llvm.mlir.constant(1 : i64) : i64
    %733 = llvm.alloca %732 x i64 : (i64) -> !llvm.ptr
    llvm.store %731, %733 : i64, !llvm.ptr
    cf.br ^bb51
    ^bb51:
    %734 = llvm.load %733 : !llvm.ptr -> i64
    %735 = arith.constant 6 : i32
    %737 = arith.extsi %735 : i32 to i64
    %736 = arith.cmpi slt, %734, %737 : i64
    cf.cond_br %736, ^bb52, ^bb53
    ^bb52:
      %738 = arith.constant 0 : i32
      %739 = arith.extsi %738 : i32 to i64
      %740 = llvm.mlir.constant(1 : i64) : i64
      %741 = llvm.alloca %740 x i64 : (i64) -> !llvm.ptr
      llvm.store %739, %741 : i64, !llvm.ptr
      cf.br ^bb54
      ^bb54:
      %742 = llvm.load %741 : !llvm.ptr -> i64
      %743 = arith.constant 8 : i32
      %745 = arith.extsi %743 : i32 to i64
      %744 = arith.cmpi slt, %742, %745 : i64
      cf.cond_br %744, ^bb55, ^bb56
      ^bb55:
        %747 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
        %748 = llvm.load %747 : !llvm.ptr -> !llvm.ptr
        %749 = llvm.load %741 : !llvm.ptr -> i64
        %750 = llvm.getelementptr %748[%749] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %746 = llvm.load %750 : !llvm.ptr -> i64
        %752 = llvm.mlir.addressof @W_arr : !llvm.ptr
        %753 = llvm.load %752 : !llvm.ptr -> !llvm.ptr
        %754 = llvm.load %733 : !llvm.ptr -> i64
        %755 = llvm.getelementptr %753[%754] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %751 = llvm.load %755 : !llvm.ptr -> i64
        %756 = arith.muli %746, %751 : i64
        %757 = arith.constant 7 : i32
        %759 = arith.extsi %757 : i32 to i64
        %758 = arith.remsi %756, %759 : i64
        %760 = llvm.mlir.addressof @add_contrib_tab : !llvm.ptr
        %761 = llvm.load %760 : !llvm.ptr -> !llvm.ptr
        %762 = llvm.load %733 : !llvm.ptr -> i64
        %763 = arith.constant 8 : i32
        %765 = arith.extsi %763 : i32 to i64
        %764 = arith.muli %762, %765 : i64
        %766 = llvm.load %741 : !llvm.ptr -> i64
        %767 = arith.addi %764, %766 : i64
        %768 = llvm.getelementptr %761[%767] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %758, %768 : i64, !llvm.ptr
        %769 = llvm.load %741 : !llvm.ptr -> i64
        %770 = arith.constant 1 : i32
        %772 = arith.extsi %770 : i32 to i64
        %771 = arith.addi %769, %772 : i64
        llvm.store %771, %741 : i64, !llvm.ptr
        cf.br ^bb54
      ^bb56:
      %773 = llvm.load %733 : !llvm.ptr -> i64
      %774 = arith.constant 1 : i32
      %776 = arith.extsi %774 : i32 to i64
      %775 = arith.addi %773, %776 : i64
      llvm.store %775, %733 : i64, !llvm.ptr
      cf.br ^bb51
    ^bb53:
    %778 = arith.constant 7 : i32
    %779 = arith.constant 8 : i32
    %780 = arith.extsi %778 : i32 to i64
    %781 = arith.extsi %779 : i32 to i64
    %777 = func.call @calloc(%780, %781) : (i64, i64) -> !llvm.ptr
    %782 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    llvm.store %777, %782 : !llvm.ptr, !llvm.ptr
    func.return
  }
  func.func @ht_hash(%arg0: i64, %arg1: i64) -> i64 {
    %783 = llvm.mlir.constant(1 : i64) : i64
    %784 = llvm.alloca %783 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg0, %784 : i64, !llvm.ptr
    %785 = llvm.load %784 : !llvm.ptr -> i64
    %786 = llvm.load %784 : !llvm.ptr -> i64
    %787 = arith.constant 16 : i32
    %789 = arith.extsi %787 : i32 to i64
    %788 = arith.shrsi %786, %789 : i64
    %790 = arith.xori %785, %788 : i64
    llvm.store %790, %784 : i64, !llvm.ptr
    %791 = llvm.load %784 : !llvm.ptr -> i64
    %792 = arith.constant -1640531535 : i32
    %794 = arith.extsi %792 : i32 to i64
    %793 = arith.muli %791, %794 : i64
    llvm.store %793, %784 : i64, !llvm.ptr
    %795 = llvm.load %784 : !llvm.ptr -> i64
    %796 = llvm.load %784 : !llvm.ptr -> i64
    %797 = arith.constant 16 : i32
    %799 = arith.extsi %797 : i32 to i64
    %798 = arith.shrsi %796, %799 : i64
    %800 = arith.xori %795, %798 : i64
    llvm.store %800, %784 : i64, !llvm.ptr
    %801 = llvm.load %784 : !llvm.ptr -> i64
    %802 = arith.andi %801, %arg1 : i64
    func.return %802 : i64
  }
  func.func @ht_init(%arg0: i64, %arg1: i64) -> () {
    %803 = arith.constant 0 : i32
    %805 = arith.extsi %803 : i32 to i64
    %804 = arith.cmpi eq, %arg0, %805 : i64
    cf.cond_br %804, ^bb57, ^bb58
    ^bb57:
      %806 = llvm.mlir.addressof @cap0 : !llvm.ptr
      llvm.store %arg1, %806 : i64, !llvm.ptr
      %807 = arith.constant 1 : i32
      %809 = arith.extsi %807 : i32 to i64
      %808 = arith.subi %arg1, %809 : i64
      %810 = llvm.mlir.addressof @mask0 : !llvm.ptr
      llvm.store %808, %810 : i64, !llvm.ptr
      %811 = arith.constant 0 : i32
      %812 = arith.extsi %811 : i32 to i64
      %813 = llvm.mlir.addressof @count0 : !llvm.ptr
      llvm.store %812, %813 : i64, !llvm.ptr
      %815 = arith.constant 1 : i32
      %816 = arith.extsi %815 : i32 to i64
      %814 = func.call @calloc(%arg1, %816) : (i64, i64) -> !llvm.ptr
      %817 = llvm.mlir.addressof @occ0 : !llvm.ptr
      llvm.store %814, %817 : !llvm.ptr, !llvm.ptr
      %819 = arith.constant 8 : i32
      %820 = arith.extsi %819 : i32 to i64
      %818 = func.call @calloc(%arg1, %820) : (i64, i64) -> !llvm.ptr
      %821 = llvm.mlir.addressof @sta0 : !llvm.ptr
      llvm.store %818, %821 : !llvm.ptr, !llvm.ptr
      %823 = arith.constant 7 : i32
      %825 = arith.extsi %823 : i32 to i64
      %824 = arith.muli %arg1, %825 : i64
      %826 = arith.constant 8 : i32
      %827 = arith.extsi %826 : i32 to i64
      %822 = func.call @calloc(%824, %827) : (i64, i64) -> !llvm.ptr
      %828 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      llvm.store %822, %828 : !llvm.ptr, !llvm.ptr
      %830 = arith.constant 4 : i32
      %831 = arith.extsi %830 : i32 to i64
      %829 = func.call @calloc(%arg1, %831) : (i64, i64) -> !llvm.ptr
      %832 = llvm.mlir.addressof @sl0 : !llvm.ptr
      llvm.store %829, %832 : !llvm.ptr, !llvm.ptr
      %833 = arith.constant 0 : i32
      %834 = arith.extsi %833 : i32 to i64
      %835 = llvm.mlir.addressof @sls0 : !llvm.ptr
      llvm.store %834, %835 : i64, !llvm.ptr
      cf.br ^bb59
    ^bb58:
      %836 = llvm.mlir.addressof @cap1 : !llvm.ptr
      llvm.store %arg1, %836 : i64, !llvm.ptr
      %837 = arith.constant 1 : i32
      %839 = arith.extsi %837 : i32 to i64
      %838 = arith.subi %arg1, %839 : i64
      %840 = llvm.mlir.addressof @mask1 : !llvm.ptr
      llvm.store %838, %840 : i64, !llvm.ptr
      %841 = arith.constant 0 : i32
      %842 = arith.extsi %841 : i32 to i64
      %843 = llvm.mlir.addressof @count1 : !llvm.ptr
      llvm.store %842, %843 : i64, !llvm.ptr
      %845 = arith.constant 1 : i32
      %846 = arith.extsi %845 : i32 to i64
      %844 = func.call @calloc(%arg1, %846) : (i64, i64) -> !llvm.ptr
      %847 = llvm.mlir.addressof @occ1 : !llvm.ptr
      llvm.store %844, %847 : !llvm.ptr, !llvm.ptr
      %849 = arith.constant 8 : i32
      %850 = arith.extsi %849 : i32 to i64
      %848 = func.call @calloc(%arg1, %850) : (i64, i64) -> !llvm.ptr
      %851 = llvm.mlir.addressof @sta1 : !llvm.ptr
      llvm.store %848, %851 : !llvm.ptr, !llvm.ptr
      %853 = arith.constant 7 : i32
      %855 = arith.extsi %853 : i32 to i64
      %854 = arith.muli %arg1, %855 : i64
      %856 = arith.constant 8 : i32
      %857 = arith.extsi %856 : i32 to i64
      %852 = func.call @calloc(%854, %857) : (i64, i64) -> !llvm.ptr
      %858 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      llvm.store %852, %858 : !llvm.ptr, !llvm.ptr
      %860 = arith.constant 4 : i32
      %861 = arith.extsi %860 : i32 to i64
      %859 = func.call @calloc(%arg1, %861) : (i64, i64) -> !llvm.ptr
      %862 = llvm.mlir.addressof @sl1 : !llvm.ptr
      llvm.store %859, %862 : !llvm.ptr, !llvm.ptr
      %863 = arith.constant 0 : i32
      %864 = arith.extsi %863 : i32 to i64
      %865 = llvm.mlir.addressof @sls1 : !llvm.ptr
      llvm.store %864, %865 : i64, !llvm.ptr
      cf.br ^bb59
    ^bb59:
    func.return
  }
  func.func @ht_clear(%arg0: i64) -> () {
    %866 = arith.constant 0 : i32
    %868 = arith.extsi %866 : i32 to i64
    %867 = arith.cmpi eq, %arg0, %868 : i64
    cf.cond_br %867, ^bb60, ^bb61
    ^bb60:
      %869 = arith.constant 0 : i32
      %870 = arith.extsi %869 : i32 to i64
      %871 = llvm.mlir.constant(1 : i64) : i64
      %872 = llvm.alloca %871 x i64 : (i64) -> !llvm.ptr
      llvm.store %870, %872 : i64, !llvm.ptr
      cf.br ^bb63
      ^bb63:
      %873 = llvm.load %872 : !llvm.ptr -> i64
      %874 = llvm.mlir.addressof @sls0 : !llvm.ptr
      %875 = llvm.load %874 : !llvm.ptr -> i64
      %876 = arith.cmpi slt, %873, %875 : i64
      cf.cond_br %876, ^bb64, ^bb65
      ^bb64:
        %877 = arith.constant 0 : i32
        %878 = llvm.mlir.addressof @occ0 : !llvm.ptr
        %879 = llvm.load %878 : !llvm.ptr -> !llvm.ptr
        %881 = llvm.mlir.addressof @sl0 : !llvm.ptr
        %882 = llvm.load %881 : !llvm.ptr -> !llvm.ptr
        %883 = llvm.load %872 : !llvm.ptr -> i64
        %884 = llvm.getelementptr %882[%883] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %880 = llvm.load %884 : !llvm.ptr -> i32
        %885 = arith.extsi %880 : i32 to i64
        %886 = arith.trunci %877 : i32 to i8
        %887 = llvm.getelementptr %879[%885] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        llvm.store %886, %887 : i8, !llvm.ptr
        %888 = llvm.load %872 : !llvm.ptr -> i64
        %889 = arith.constant 1 : i32
        %891 = arith.extsi %889 : i32 to i64
        %890 = arith.addi %888, %891 : i64
        llvm.store %890, %872 : i64, !llvm.ptr
        cf.br ^bb63
      ^bb65:
      %892 = arith.constant 0 : i32
      %893 = arith.extsi %892 : i32 to i64
      %894 = llvm.mlir.addressof @count0 : !llvm.ptr
      llvm.store %893, %894 : i64, !llvm.ptr
      %895 = arith.constant 0 : i32
      %896 = arith.extsi %895 : i32 to i64
      %897 = llvm.mlir.addressof @sls0 : !llvm.ptr
      llvm.store %896, %897 : i64, !llvm.ptr
      cf.br ^bb62
    ^bb61:
      %898 = arith.constant 0 : i32
      %899 = arith.extsi %898 : i32 to i64
      %900 = llvm.mlir.constant(1 : i64) : i64
      %901 = llvm.alloca %900 x i64 : (i64) -> !llvm.ptr
      llvm.store %899, %901 : i64, !llvm.ptr
      cf.br ^bb66
      ^bb66:
      %902 = llvm.load %901 : !llvm.ptr -> i64
      %903 = llvm.mlir.addressof @sls1 : !llvm.ptr
      %904 = llvm.load %903 : !llvm.ptr -> i64
      %905 = arith.cmpi slt, %902, %904 : i64
      cf.cond_br %905, ^bb67, ^bb68
      ^bb67:
        %906 = arith.constant 0 : i32
        %907 = llvm.mlir.addressof @occ1 : !llvm.ptr
        %908 = llvm.load %907 : !llvm.ptr -> !llvm.ptr
        %910 = llvm.mlir.addressof @sl1 : !llvm.ptr
        %911 = llvm.load %910 : !llvm.ptr -> !llvm.ptr
        %912 = llvm.load %901 : !llvm.ptr -> i64
        %913 = llvm.getelementptr %911[%912] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %909 = llvm.load %913 : !llvm.ptr -> i32
        %914 = arith.extsi %909 : i32 to i64
        %915 = arith.trunci %906 : i32 to i8
        %916 = llvm.getelementptr %908[%914] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        llvm.store %915, %916 : i8, !llvm.ptr
        %917 = llvm.load %901 : !llvm.ptr -> i64
        %918 = arith.constant 1 : i32
        %920 = arith.extsi %918 : i32 to i64
        %919 = arith.addi %917, %920 : i64
        llvm.store %919, %901 : i64, !llvm.ptr
        cf.br ^bb66
      ^bb68:
      %921 = arith.constant 0 : i32
      %922 = arith.extsi %921 : i32 to i64
      %923 = llvm.mlir.addressof @count1 : !llvm.ptr
      llvm.store %922, %923 : i64, !llvm.ptr
      %924 = arith.constant 0 : i32
      %925 = arith.extsi %924 : i32 to i64
      %926 = llvm.mlir.addressof @sls1 : !llvm.ptr
      llvm.store %925, %926 : i64, !llvm.ptr
      cf.br ^bb62
    ^bb62:
    func.return
  }
  func.func @ht_resize(%arg0: i64, %arg1: i64) -> () {
    %927 = arith.constant 0 : i32
    %929 = arith.extsi %927 : i32 to i64
    %928 = arith.cmpi eq, %arg0, %929 : i64
    cf.cond_br %928, ^bb69, ^bb70
    ^bb69:
      %930 = llvm.mlir.addressof @occ0 : !llvm.ptr
      %931 = llvm.load %930 : !llvm.ptr -> !llvm.ptr
      %932 = llvm.mlir.addressof @sta0 : !llvm.ptr
      %933 = llvm.load %932 : !llvm.ptr -> !llvm.ptr
      %934 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %935 = llvm.load %934 : !llvm.ptr -> !llvm.ptr
      %936 = llvm.mlir.addressof @sl0 : !llvm.ptr
      %937 = llvm.load %936 : !llvm.ptr -> !llvm.ptr
      %938 = llvm.mlir.addressof @sls0 : !llvm.ptr
      %939 = llvm.load %938 : !llvm.ptr -> i64
      %940 = llvm.mlir.addressof @cap0 : !llvm.ptr
      llvm.store %arg1, %940 : i64, !llvm.ptr
      %941 = arith.constant 1 : i32
      %943 = arith.extsi %941 : i32 to i64
      %942 = arith.subi %arg1, %943 : i64
      %944 = llvm.mlir.addressof @mask0 : !llvm.ptr
      llvm.store %942, %944 : i64, !llvm.ptr
      %945 = arith.constant 0 : i32
      %946 = arith.extsi %945 : i32 to i64
      %947 = llvm.mlir.addressof @count0 : !llvm.ptr
      llvm.store %946, %947 : i64, !llvm.ptr
      %948 = arith.constant 0 : i32
      %949 = arith.extsi %948 : i32 to i64
      %950 = llvm.mlir.addressof @sls0 : !llvm.ptr
      llvm.store %949, %950 : i64, !llvm.ptr
      %952 = arith.constant 1 : i32
      %953 = arith.extsi %952 : i32 to i64
      %951 = func.call @calloc(%arg1, %953) : (i64, i64) -> !llvm.ptr
      %954 = llvm.mlir.addressof @occ0 : !llvm.ptr
      llvm.store %951, %954 : !llvm.ptr, !llvm.ptr
      %956 = arith.constant 8 : i32
      %957 = arith.extsi %956 : i32 to i64
      %955 = func.call @calloc(%arg1, %957) : (i64, i64) -> !llvm.ptr
      %958 = llvm.mlir.addressof @sta0 : !llvm.ptr
      llvm.store %955, %958 : !llvm.ptr, !llvm.ptr
      %960 = arith.constant 7 : i32
      %962 = arith.extsi %960 : i32 to i64
      %961 = arith.muli %arg1, %962 : i64
      %963 = arith.constant 8 : i32
      %964 = arith.extsi %963 : i32 to i64
      %959 = func.call @calloc(%961, %964) : (i64, i64) -> !llvm.ptr
      %965 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      llvm.store %959, %965 : !llvm.ptr, !llvm.ptr
      %967 = arith.constant 4 : i32
      %968 = arith.extsi %967 : i32 to i64
      %966 = func.call @calloc(%arg1, %968) : (i64, i64) -> !llvm.ptr
      %969 = llvm.mlir.addressof @sl0 : !llvm.ptr
      llvm.store %966, %969 : !llvm.ptr, !llvm.ptr
      %970 = arith.constant 0 : i32
      %971 = arith.extsi %970 : i32 to i64
      %972 = llvm.mlir.constant(1 : i64) : i64
      %973 = llvm.alloca %972 x i64 : (i64) -> !llvm.ptr
      llvm.store %971, %973 : i64, !llvm.ptr
      cf.br ^bb72
      ^bb72:
      %974 = llvm.load %973 : !llvm.ptr -> i64
      %975 = arith.cmpi slt, %974, %939 : i64
      cf.cond_br %975, ^bb73, ^bb74
      ^bb73:
        %977 = llvm.load %973 : !llvm.ptr -> i64
        %978 = llvm.getelementptr %937[%977] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %976 = llvm.load %978 : !llvm.ptr -> i32
        %979 = arith.extsi %976 : i32 to i64
        %981 = llvm.getelementptr %933[%979] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %980 = llvm.load %981 : !llvm.ptr -> i64
        %983 = llvm.mlir.addressof @mask0 : !llvm.ptr
        %984 = llvm.load %983 : !llvm.ptr -> i64
        %982 = func.call @ht_hash(%980, %984) : (i64, i64) -> i64
        %985 = llvm.mlir.constant(1 : i64) : i64
        %986 = llvm.alloca %985 x i64 : (i64) -> !llvm.ptr
        llvm.store %982, %986 : i64, !llvm.ptr
        cf.br ^bb75
        ^bb75:
        %988 = llvm.mlir.addressof @occ0 : !llvm.ptr
        %989 = llvm.load %988 : !llvm.ptr -> !llvm.ptr
        %990 = llvm.load %986 : !llvm.ptr -> i64
        %991 = llvm.getelementptr %989[%990] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        %987 = llvm.load %991 : !llvm.ptr -> i8
        %992 = arith.constant 0 : i32
        %994 = arith.extsi %987 : i8 to i32
        %993 = arith.cmpi ne, %994, %992 : i32
        cf.cond_br %993, ^bb76, ^bb77
        ^bb76:
          %995 = llvm.load %986 : !llvm.ptr -> i64
          %996 = arith.constant 1 : i32
          %998 = arith.extsi %996 : i32 to i64
          %997 = arith.addi %995, %998 : i64
          %999 = llvm.mlir.addressof @mask0 : !llvm.ptr
          %1000 = llvm.load %999 : !llvm.ptr -> i64
          %1001 = arith.andi %997, %1000 : i64
          llvm.store %1001, %986 : i64, !llvm.ptr
          cf.br ^bb75
        ^bb77:
        %1002 = arith.constant 1 : i32
        %1003 = llvm.mlir.addressof @occ0 : !llvm.ptr
        %1004 = llvm.load %1003 : !llvm.ptr -> !llvm.ptr
        %1005 = llvm.load %986 : !llvm.ptr -> i64
        %1006 = arith.trunci %1002 : i32 to i8
        %1007 = llvm.getelementptr %1004[%1005] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        llvm.store %1006, %1007 : i8, !llvm.ptr
        %1008 = llvm.mlir.addressof @sta0 : !llvm.ptr
        %1009 = llvm.load %1008 : !llvm.ptr -> !llvm.ptr
        %1010 = llvm.load %986 : !llvm.ptr -> i64
        %1011 = llvm.getelementptr %1009[%1010] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %980, %1011 : i64, !llvm.ptr
        %1012 = arith.constant 0 : i32
        %1013 = arith.extsi %1012 : i32 to i64
        %1014 = llvm.mlir.constant(1 : i64) : i64
        %1015 = llvm.alloca %1014 x i64 : (i64) -> !llvm.ptr
        llvm.store %1013, %1015 : i64, !llvm.ptr
        cf.br ^bb78
        ^bb78:
        %1016 = llvm.load %1015 : !llvm.ptr -> i64
        %1017 = arith.constant 7 : i32
        %1019 = arith.extsi %1017 : i32 to i64
        %1018 = arith.cmpi slt, %1016, %1019 : i64
        cf.cond_br %1018, ^bb79, ^bb80
        ^bb79:
          %1021 = arith.constant 7 : i32
          %1023 = arith.extsi %1021 : i32 to i64
          %1022 = arith.muli %979, %1023 : i64
          %1024 = llvm.load %1015 : !llvm.ptr -> i64
          %1025 = arith.addi %1022, %1024 : i64
          %1026 = llvm.getelementptr %935[%1025] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1020 = llvm.load %1026 : !llvm.ptr -> i64
          %1027 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1028 = llvm.load %1027 : !llvm.ptr -> !llvm.ptr
          %1029 = llvm.load %986 : !llvm.ptr -> i64
          %1030 = arith.constant 7 : i32
          %1032 = arith.extsi %1030 : i32 to i64
          %1031 = arith.muli %1029, %1032 : i64
          %1033 = llvm.load %1015 : !llvm.ptr -> i64
          %1034 = arith.addi %1031, %1033 : i64
          %1035 = llvm.getelementptr %1028[%1034] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1020, %1035 : i64, !llvm.ptr
          %1036 = llvm.load %1015 : !llvm.ptr -> i64
          %1037 = arith.constant 1 : i32
          %1039 = arith.extsi %1037 : i32 to i64
          %1038 = arith.addi %1036, %1039 : i64
          llvm.store %1038, %1015 : i64, !llvm.ptr
          cf.br ^bb78
        ^bb80:
        %1040 = llvm.load %986 : !llvm.ptr -> i64
        %1041 = arith.trunci %1040 : i64 to i32
        %1042 = llvm.mlir.addressof @sl0 : !llvm.ptr
        %1043 = llvm.load %1042 : !llvm.ptr -> !llvm.ptr
        %1044 = llvm.mlir.addressof @sls0 : !llvm.ptr
        %1045 = llvm.load %1044 : !llvm.ptr -> i64
        %1046 = llvm.getelementptr %1043[%1045] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1041, %1046 : i32, !llvm.ptr
        %1047 = llvm.mlir.addressof @sls0 : !llvm.ptr
        %1048 = llvm.load %1047 : !llvm.ptr -> i64
        %1049 = arith.constant 1 : i32
        %1051 = arith.extsi %1049 : i32 to i64
        %1050 = arith.addi %1048, %1051 : i64
        %1052 = llvm.mlir.addressof @sls0 : !llvm.ptr
        llvm.store %1050, %1052 : i64, !llvm.ptr
        %1053 = llvm.mlir.addressof @count0 : !llvm.ptr
        %1054 = llvm.load %1053 : !llvm.ptr -> i64
        %1055 = arith.constant 1 : i32
        %1057 = arith.extsi %1055 : i32 to i64
        %1056 = arith.addi %1054, %1057 : i64
        %1058 = llvm.mlir.addressof @count0 : !llvm.ptr
        llvm.store %1056, %1058 : i64, !llvm.ptr
        %1059 = llvm.load %973 : !llvm.ptr -> i64
        %1060 = arith.constant 1 : i32
        %1062 = arith.extsi %1060 : i32 to i64
        %1061 = arith.addi %1059, %1062 : i64
        llvm.store %1061, %973 : i64, !llvm.ptr
        cf.br ^bb72
      ^bb74:
      func.call @free(%931) : (!llvm.ptr) -> ()
      func.call @free(%933) : (!llvm.ptr) -> ()
      func.call @free(%935) : (!llvm.ptr) -> ()
      func.call @free(%937) : (!llvm.ptr) -> ()
      cf.br ^bb71
    ^bb70:
      %1067 = llvm.mlir.addressof @occ1 : !llvm.ptr
      %1068 = llvm.load %1067 : !llvm.ptr -> !llvm.ptr
      %1069 = llvm.mlir.addressof @sta1 : !llvm.ptr
      %1070 = llvm.load %1069 : !llvm.ptr -> !llvm.ptr
      %1071 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1072 = llvm.load %1071 : !llvm.ptr -> !llvm.ptr
      %1073 = llvm.mlir.addressof @sl1 : !llvm.ptr
      %1074 = llvm.load %1073 : !llvm.ptr -> !llvm.ptr
      %1075 = llvm.mlir.addressof @sls1 : !llvm.ptr
      %1076 = llvm.load %1075 : !llvm.ptr -> i64
      %1077 = llvm.mlir.addressof @cap1 : !llvm.ptr
      llvm.store %arg1, %1077 : i64, !llvm.ptr
      %1078 = arith.constant 1 : i32
      %1080 = arith.extsi %1078 : i32 to i64
      %1079 = arith.subi %arg1, %1080 : i64
      %1081 = llvm.mlir.addressof @mask1 : !llvm.ptr
      llvm.store %1079, %1081 : i64, !llvm.ptr
      %1082 = arith.constant 0 : i32
      %1083 = arith.extsi %1082 : i32 to i64
      %1084 = llvm.mlir.addressof @count1 : !llvm.ptr
      llvm.store %1083, %1084 : i64, !llvm.ptr
      %1085 = arith.constant 0 : i32
      %1086 = arith.extsi %1085 : i32 to i64
      %1087 = llvm.mlir.addressof @sls1 : !llvm.ptr
      llvm.store %1086, %1087 : i64, !llvm.ptr
      %1089 = arith.constant 1 : i32
      %1090 = arith.extsi %1089 : i32 to i64
      %1088 = func.call @calloc(%arg1, %1090) : (i64, i64) -> !llvm.ptr
      %1091 = llvm.mlir.addressof @occ1 : !llvm.ptr
      llvm.store %1088, %1091 : !llvm.ptr, !llvm.ptr
      %1093 = arith.constant 8 : i32
      %1094 = arith.extsi %1093 : i32 to i64
      %1092 = func.call @calloc(%arg1, %1094) : (i64, i64) -> !llvm.ptr
      %1095 = llvm.mlir.addressof @sta1 : !llvm.ptr
      llvm.store %1092, %1095 : !llvm.ptr, !llvm.ptr
      %1097 = arith.constant 7 : i32
      %1099 = arith.extsi %1097 : i32 to i64
      %1098 = arith.muli %arg1, %1099 : i64
      %1100 = arith.constant 8 : i32
      %1101 = arith.extsi %1100 : i32 to i64
      %1096 = func.call @calloc(%1098, %1101) : (i64, i64) -> !llvm.ptr
      %1102 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      llvm.store %1096, %1102 : !llvm.ptr, !llvm.ptr
      %1104 = arith.constant 4 : i32
      %1105 = arith.extsi %1104 : i32 to i64
      %1103 = func.call @calloc(%arg1, %1105) : (i64, i64) -> !llvm.ptr
      %1106 = llvm.mlir.addressof @sl1 : !llvm.ptr
      llvm.store %1103, %1106 : !llvm.ptr, !llvm.ptr
      %1107 = arith.constant 0 : i32
      %1108 = arith.extsi %1107 : i32 to i64
      %1109 = llvm.mlir.constant(1 : i64) : i64
      %1110 = llvm.alloca %1109 x i64 : (i64) -> !llvm.ptr
      llvm.store %1108, %1110 : i64, !llvm.ptr
      cf.br ^bb81
      ^bb81:
      %1111 = llvm.load %1110 : !llvm.ptr -> i64
      %1112 = arith.cmpi slt, %1111, %1076 : i64
      cf.cond_br %1112, ^bb82, ^bb83
      ^bb82:
        %1114 = llvm.load %1110 : !llvm.ptr -> i64
        %1115 = llvm.getelementptr %1074[%1114] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %1113 = llvm.load %1115 : !llvm.ptr -> i32
        %1116 = arith.extsi %1113 : i32 to i64
        %1118 = llvm.getelementptr %1070[%1116] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1117 = llvm.load %1118 : !llvm.ptr -> i64
        %1120 = llvm.mlir.addressof @mask1 : !llvm.ptr
        %1121 = llvm.load %1120 : !llvm.ptr -> i64
        %1119 = func.call @ht_hash(%1117, %1121) : (i64, i64) -> i64
        %1122 = llvm.mlir.constant(1 : i64) : i64
        %1123 = llvm.alloca %1122 x i64 : (i64) -> !llvm.ptr
        llvm.store %1119, %1123 : i64, !llvm.ptr
        cf.br ^bb84
        ^bb84:
        %1125 = llvm.mlir.addressof @occ1 : !llvm.ptr
        %1126 = llvm.load %1125 : !llvm.ptr -> !llvm.ptr
        %1127 = llvm.load %1123 : !llvm.ptr -> i64
        %1128 = llvm.getelementptr %1126[%1127] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        %1124 = llvm.load %1128 : !llvm.ptr -> i8
        %1129 = arith.constant 0 : i32
        %1131 = arith.extsi %1124 : i8 to i32
        %1130 = arith.cmpi ne, %1131, %1129 : i32
        cf.cond_br %1130, ^bb85, ^bb86
        ^bb85:
          %1132 = llvm.load %1123 : !llvm.ptr -> i64
          %1133 = arith.constant 1 : i32
          %1135 = arith.extsi %1133 : i32 to i64
          %1134 = arith.addi %1132, %1135 : i64
          %1136 = llvm.mlir.addressof @mask1 : !llvm.ptr
          %1137 = llvm.load %1136 : !llvm.ptr -> i64
          %1138 = arith.andi %1134, %1137 : i64
          llvm.store %1138, %1123 : i64, !llvm.ptr
          cf.br ^bb84
        ^bb86:
        %1139 = arith.constant 1 : i32
        %1140 = llvm.mlir.addressof @occ1 : !llvm.ptr
        %1141 = llvm.load %1140 : !llvm.ptr -> !llvm.ptr
        %1142 = llvm.load %1123 : !llvm.ptr -> i64
        %1143 = arith.trunci %1139 : i32 to i8
        %1144 = llvm.getelementptr %1141[%1142] : (!llvm.ptr, i64) -> !llvm.ptr, i8
        llvm.store %1143, %1144 : i8, !llvm.ptr
        %1145 = llvm.mlir.addressof @sta1 : !llvm.ptr
        %1146 = llvm.load %1145 : !llvm.ptr -> !llvm.ptr
        %1147 = llvm.load %1123 : !llvm.ptr -> i64
        %1148 = llvm.getelementptr %1146[%1147] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        llvm.store %1117, %1148 : i64, !llvm.ptr
        %1149 = arith.constant 0 : i32
        %1150 = arith.extsi %1149 : i32 to i64
        %1151 = llvm.mlir.constant(1 : i64) : i64
        %1152 = llvm.alloca %1151 x i64 : (i64) -> !llvm.ptr
        llvm.store %1150, %1152 : i64, !llvm.ptr
        cf.br ^bb87
        ^bb87:
        %1153 = llvm.load %1152 : !llvm.ptr -> i64
        %1154 = arith.constant 7 : i32
        %1156 = arith.extsi %1154 : i32 to i64
        %1155 = arith.cmpi slt, %1153, %1156 : i64
        cf.cond_br %1155, ^bb88, ^bb89
        ^bb88:
          %1158 = arith.constant 7 : i32
          %1160 = arith.extsi %1158 : i32 to i64
          %1159 = arith.muli %1116, %1160 : i64
          %1161 = llvm.load %1152 : !llvm.ptr -> i64
          %1162 = arith.addi %1159, %1161 : i64
          %1163 = llvm.getelementptr %1072[%1162] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1157 = llvm.load %1163 : !llvm.ptr -> i64
          %1164 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1165 = llvm.load %1164 : !llvm.ptr -> !llvm.ptr
          %1166 = llvm.load %1123 : !llvm.ptr -> i64
          %1167 = arith.constant 7 : i32
          %1169 = arith.extsi %1167 : i32 to i64
          %1168 = arith.muli %1166, %1169 : i64
          %1170 = llvm.load %1152 : !llvm.ptr -> i64
          %1171 = arith.addi %1168, %1170 : i64
          %1172 = llvm.getelementptr %1165[%1171] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1157, %1172 : i64, !llvm.ptr
          %1173 = llvm.load %1152 : !llvm.ptr -> i64
          %1174 = arith.constant 1 : i32
          %1176 = arith.extsi %1174 : i32 to i64
          %1175 = arith.addi %1173, %1176 : i64
          llvm.store %1175, %1152 : i64, !llvm.ptr
          cf.br ^bb87
        ^bb89:
        %1177 = llvm.load %1123 : !llvm.ptr -> i64
        %1178 = arith.trunci %1177 : i64 to i32
        %1179 = llvm.mlir.addressof @sl1 : !llvm.ptr
        %1180 = llvm.load %1179 : !llvm.ptr -> !llvm.ptr
        %1181 = llvm.mlir.addressof @sls1 : !llvm.ptr
        %1182 = llvm.load %1181 : !llvm.ptr -> i64
        %1183 = llvm.getelementptr %1180[%1182] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        llvm.store %1178, %1183 : i32, !llvm.ptr
        %1184 = llvm.mlir.addressof @sls1 : !llvm.ptr
        %1185 = llvm.load %1184 : !llvm.ptr -> i64
        %1186 = arith.constant 1 : i32
        %1188 = arith.extsi %1186 : i32 to i64
        %1187 = arith.addi %1185, %1188 : i64
        %1189 = llvm.mlir.addressof @sls1 : !llvm.ptr
        llvm.store %1187, %1189 : i64, !llvm.ptr
        %1190 = llvm.mlir.addressof @count1 : !llvm.ptr
        %1191 = llvm.load %1190 : !llvm.ptr -> i64
        %1192 = arith.constant 1 : i32
        %1194 = arith.extsi %1192 : i32 to i64
        %1193 = arith.addi %1191, %1194 : i64
        %1195 = llvm.mlir.addressof @count1 : !llvm.ptr
        llvm.store %1193, %1195 : i64, !llvm.ptr
        %1196 = llvm.load %1110 : !llvm.ptr -> i64
        %1197 = arith.constant 1 : i32
        %1199 = arith.extsi %1197 : i32 to i64
        %1198 = arith.addi %1196, %1199 : i64
        llvm.store %1198, %1110 : i64, !llvm.ptr
        cf.br ^bb81
      ^bb83:
      func.call @free(%1068) : (!llvm.ptr) -> ()
      func.call @free(%1070) : (!llvm.ptr) -> ()
      func.call @free(%1072) : (!llvm.ptr) -> ()
      func.call @free(%1074) : (!llvm.ptr) -> ()
      cf.br ^bb71
    ^bb71:
    func.return
  }
  func.func @ht_insert(%arg0: i64, %arg1: i64) -> () {
    %1204 = arith.constant 0 : i32
    %1206 = arith.extsi %1204 : i32 to i64
    %1205 = arith.cmpi eq, %arg0, %1206 : i64
    cf.cond_br %1205, ^bb90, ^bb91
    ^bb90:
      %1207 = llvm.mlir.addressof @count0 : !llvm.ptr
      %1208 = llvm.load %1207 : !llvm.ptr -> i64
      %1209 = arith.constant 2 : i32
      %1211 = arith.extsi %1209 : i32 to i64
      %1210 = arith.muli %1208, %1211 : i64
      %1212 = llvm.mlir.addressof @cap0 : !llvm.ptr
      %1213 = llvm.load %1212 : !llvm.ptr -> i64
      %1214 = arith.cmpi sge, %1210, %1213 : i64
      cf.cond_br %1214, ^bb93, ^bb94
      ^bb93:
        %1216 = arith.constant 0 : i32
        %1217 = llvm.mlir.addressof @cap0 : !llvm.ptr
        %1218 = llvm.load %1217 : !llvm.ptr -> i64
        %1219 = arith.constant 2 : i32
        %1221 = arith.extsi %1219 : i32 to i64
        %1220 = arith.muli %1218, %1221 : i64
        %1222 = arith.extsi %1216 : i32 to i64
        func.call @ht_resize(%1222, %1220) : (i64, i64) -> ()
        cf.br ^bb95
      ^bb94:
        cf.br ^bb95
      ^bb95:
      %1224 = llvm.mlir.addressof @mask0 : !llvm.ptr
      %1225 = llvm.load %1224 : !llvm.ptr -> i64
      %1223 = func.call @ht_hash(%arg1, %1225) : (i64, i64) -> i64
      %1226 = llvm.mlir.constant(1 : i64) : i64
      %1227 = llvm.alloca %1226 x i64 : (i64) -> !llvm.ptr
      llvm.store %1223, %1227 : i64, !llvm.ptr
      cf.br ^bb96
      ^bb96:
      %1229 = llvm.mlir.addressof @occ0 : !llvm.ptr
      %1230 = llvm.load %1229 : !llvm.ptr -> !llvm.ptr
      %1231 = llvm.load %1227 : !llvm.ptr -> i64
      %1232 = llvm.getelementptr %1230[%1231] : (!llvm.ptr, i64) -> !llvm.ptr, i8
      %1228 = llvm.load %1232 : !llvm.ptr -> i8
      %1233 = arith.constant 0 : i32
      %1235 = arith.extsi %1228 : i8 to i32
      %1234 = arith.cmpi ne, %1235, %1233 : i32
      cf.cond_br %1234, ^bb97, ^bb98
      ^bb97:
        %1237 = llvm.mlir.addressof @sta0 : !llvm.ptr
        %1238 = llvm.load %1237 : !llvm.ptr -> !llvm.ptr
        %1239 = llvm.load %1227 : !llvm.ptr -> i64
        %1240 = llvm.getelementptr %1238[%1239] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1236 = llvm.load %1240 : !llvm.ptr -> i64
        %1241 = arith.cmpi eq, %1236, %arg1 : i64
        cf.cond_br %1241, ^bb99, ^bb100
        ^bb99:
          %1243 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1244 = llvm.load %1243 : !llvm.ptr -> !llvm.ptr
          %1245 = llvm.load %1227 : !llvm.ptr -> i64
          %1246 = arith.constant 7 : i32
          %1248 = arith.extsi %1246 : i32 to i64
          %1247 = arith.muli %1245, %1248 : i64
          %1249 = arith.constant 0 : i32
          %1251 = arith.extsi %1249 : i32 to i64
          %1250 = arith.addi %1247, %1251 : i64
          %1252 = llvm.getelementptr %1244[%1250] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1242 = llvm.load %1252 : !llvm.ptr -> i64
          %1254 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1255 = llvm.load %1254 : !llvm.ptr -> !llvm.ptr
          %1256 = arith.constant 0 : i32
          %1257 = arith.extsi %1256 : i32 to i64
          %1258 = llvm.getelementptr %1255[%1257] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1253 = llvm.load %1258 : !llvm.ptr -> i64
          %1259 = arith.addi %1242, %1253 : i64
          %1260 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1261 = llvm.load %1260 : !llvm.ptr -> !llvm.ptr
          %1262 = llvm.load %1227 : !llvm.ptr -> i64
          %1263 = arith.constant 7 : i32
          %1265 = arith.extsi %1263 : i32 to i64
          %1264 = arith.muli %1262, %1265 : i64
          %1266 = arith.constant 0 : i32
          %1268 = arith.extsi %1266 : i32 to i64
          %1267 = arith.addi %1264, %1268 : i64
          %1269 = llvm.getelementptr %1261[%1267] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1259, %1269 : i64, !llvm.ptr
          %1271 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1272 = llvm.load %1271 : !llvm.ptr -> !llvm.ptr
          %1273 = llvm.load %1227 : !llvm.ptr -> i64
          %1274 = arith.constant 7 : i32
          %1276 = arith.extsi %1274 : i32 to i64
          %1275 = arith.muli %1273, %1276 : i64
          %1277 = arith.constant 1 : i32
          %1279 = arith.extsi %1277 : i32 to i64
          %1278 = arith.addi %1275, %1279 : i64
          %1280 = llvm.getelementptr %1272[%1278] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1270 = llvm.load %1280 : !llvm.ptr -> i64
          %1282 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1283 = llvm.load %1282 : !llvm.ptr -> !llvm.ptr
          %1284 = arith.constant 1 : i32
          %1285 = arith.extsi %1284 : i32 to i64
          %1286 = llvm.getelementptr %1283[%1285] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1281 = llvm.load %1286 : !llvm.ptr -> i64
          %1287 = arith.addi %1270, %1281 : i64
          %1288 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1289 = llvm.load %1288 : !llvm.ptr -> !llvm.ptr
          %1290 = llvm.load %1227 : !llvm.ptr -> i64
          %1291 = arith.constant 7 : i32
          %1293 = arith.extsi %1291 : i32 to i64
          %1292 = arith.muli %1290, %1293 : i64
          %1294 = arith.constant 1 : i32
          %1296 = arith.extsi %1294 : i32 to i64
          %1295 = arith.addi %1292, %1296 : i64
          %1297 = llvm.getelementptr %1289[%1295] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1287, %1297 : i64, !llvm.ptr
          %1299 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1300 = llvm.load %1299 : !llvm.ptr -> !llvm.ptr
          %1301 = llvm.load %1227 : !llvm.ptr -> i64
          %1302 = arith.constant 7 : i32
          %1304 = arith.extsi %1302 : i32 to i64
          %1303 = arith.muli %1301, %1304 : i64
          %1305 = arith.constant 2 : i32
          %1307 = arith.extsi %1305 : i32 to i64
          %1306 = arith.addi %1303, %1307 : i64
          %1308 = llvm.getelementptr %1300[%1306] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1298 = llvm.load %1308 : !llvm.ptr -> i64
          %1310 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1311 = llvm.load %1310 : !llvm.ptr -> !llvm.ptr
          %1312 = arith.constant 2 : i32
          %1313 = arith.extsi %1312 : i32 to i64
          %1314 = llvm.getelementptr %1311[%1313] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1309 = llvm.load %1314 : !llvm.ptr -> i64
          %1315 = arith.addi %1298, %1309 : i64
          %1316 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1317 = llvm.load %1316 : !llvm.ptr -> !llvm.ptr
          %1318 = llvm.load %1227 : !llvm.ptr -> i64
          %1319 = arith.constant 7 : i32
          %1321 = arith.extsi %1319 : i32 to i64
          %1320 = arith.muli %1318, %1321 : i64
          %1322 = arith.constant 2 : i32
          %1324 = arith.extsi %1322 : i32 to i64
          %1323 = arith.addi %1320, %1324 : i64
          %1325 = llvm.getelementptr %1317[%1323] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1315, %1325 : i64, !llvm.ptr
          %1327 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1328 = llvm.load %1327 : !llvm.ptr -> !llvm.ptr
          %1329 = llvm.load %1227 : !llvm.ptr -> i64
          %1330 = arith.constant 7 : i32
          %1332 = arith.extsi %1330 : i32 to i64
          %1331 = arith.muli %1329, %1332 : i64
          %1333 = arith.constant 3 : i32
          %1335 = arith.extsi %1333 : i32 to i64
          %1334 = arith.addi %1331, %1335 : i64
          %1336 = llvm.getelementptr %1328[%1334] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1326 = llvm.load %1336 : !llvm.ptr -> i64
          %1338 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1339 = llvm.load %1338 : !llvm.ptr -> !llvm.ptr
          %1340 = arith.constant 3 : i32
          %1341 = arith.extsi %1340 : i32 to i64
          %1342 = llvm.getelementptr %1339[%1341] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1337 = llvm.load %1342 : !llvm.ptr -> i64
          %1343 = arith.addi %1326, %1337 : i64
          %1344 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1345 = llvm.load %1344 : !llvm.ptr -> !llvm.ptr
          %1346 = llvm.load %1227 : !llvm.ptr -> i64
          %1347 = arith.constant 7 : i32
          %1349 = arith.extsi %1347 : i32 to i64
          %1348 = arith.muli %1346, %1349 : i64
          %1350 = arith.constant 3 : i32
          %1352 = arith.extsi %1350 : i32 to i64
          %1351 = arith.addi %1348, %1352 : i64
          %1353 = llvm.getelementptr %1345[%1351] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1343, %1353 : i64, !llvm.ptr
          %1355 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1356 = llvm.load %1355 : !llvm.ptr -> !llvm.ptr
          %1357 = llvm.load %1227 : !llvm.ptr -> i64
          %1358 = arith.constant 7 : i32
          %1360 = arith.extsi %1358 : i32 to i64
          %1359 = arith.muli %1357, %1360 : i64
          %1361 = arith.constant 4 : i32
          %1363 = arith.extsi %1361 : i32 to i64
          %1362 = arith.addi %1359, %1363 : i64
          %1364 = llvm.getelementptr %1356[%1362] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1354 = llvm.load %1364 : !llvm.ptr -> i64
          %1366 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1367 = llvm.load %1366 : !llvm.ptr -> !llvm.ptr
          %1368 = arith.constant 4 : i32
          %1369 = arith.extsi %1368 : i32 to i64
          %1370 = llvm.getelementptr %1367[%1369] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1365 = llvm.load %1370 : !llvm.ptr -> i64
          %1371 = arith.addi %1354, %1365 : i64
          %1372 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1373 = llvm.load %1372 : !llvm.ptr -> !llvm.ptr
          %1374 = llvm.load %1227 : !llvm.ptr -> i64
          %1375 = arith.constant 7 : i32
          %1377 = arith.extsi %1375 : i32 to i64
          %1376 = arith.muli %1374, %1377 : i64
          %1378 = arith.constant 4 : i32
          %1380 = arith.extsi %1378 : i32 to i64
          %1379 = arith.addi %1376, %1380 : i64
          %1381 = llvm.getelementptr %1373[%1379] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1371, %1381 : i64, !llvm.ptr
          %1383 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1384 = llvm.load %1383 : !llvm.ptr -> !llvm.ptr
          %1385 = llvm.load %1227 : !llvm.ptr -> i64
          %1386 = arith.constant 7 : i32
          %1388 = arith.extsi %1386 : i32 to i64
          %1387 = arith.muli %1385, %1388 : i64
          %1389 = arith.constant 5 : i32
          %1391 = arith.extsi %1389 : i32 to i64
          %1390 = arith.addi %1387, %1391 : i64
          %1392 = llvm.getelementptr %1384[%1390] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1382 = llvm.load %1392 : !llvm.ptr -> i64
          %1394 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1395 = llvm.load %1394 : !llvm.ptr -> !llvm.ptr
          %1396 = arith.constant 5 : i32
          %1397 = arith.extsi %1396 : i32 to i64
          %1398 = llvm.getelementptr %1395[%1397] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1393 = llvm.load %1398 : !llvm.ptr -> i64
          %1399 = arith.addi %1382, %1393 : i64
          %1400 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1401 = llvm.load %1400 : !llvm.ptr -> !llvm.ptr
          %1402 = llvm.load %1227 : !llvm.ptr -> i64
          %1403 = arith.constant 7 : i32
          %1405 = arith.extsi %1403 : i32 to i64
          %1404 = arith.muli %1402, %1405 : i64
          %1406 = arith.constant 5 : i32
          %1408 = arith.extsi %1406 : i32 to i64
          %1407 = arith.addi %1404, %1408 : i64
          %1409 = llvm.getelementptr %1401[%1407] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1399, %1409 : i64, !llvm.ptr
          %1411 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1412 = llvm.load %1411 : !llvm.ptr -> !llvm.ptr
          %1413 = llvm.load %1227 : !llvm.ptr -> i64
          %1414 = arith.constant 7 : i32
          %1416 = arith.extsi %1414 : i32 to i64
          %1415 = arith.muli %1413, %1416 : i64
          %1417 = arith.constant 6 : i32
          %1419 = arith.extsi %1417 : i32 to i64
          %1418 = arith.addi %1415, %1419 : i64
          %1420 = llvm.getelementptr %1412[%1418] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1410 = llvm.load %1420 : !llvm.ptr -> i64
          %1422 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1423 = llvm.load %1422 : !llvm.ptr -> !llvm.ptr
          %1424 = arith.constant 6 : i32
          %1425 = arith.extsi %1424 : i32 to i64
          %1426 = llvm.getelementptr %1423[%1425] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1421 = llvm.load %1426 : !llvm.ptr -> i64
          %1427 = arith.addi %1410, %1421 : i64
          %1428 = llvm.mlir.addressof @cnt0 : !llvm.ptr
          %1429 = llvm.load %1428 : !llvm.ptr -> !llvm.ptr
          %1430 = llvm.load %1227 : !llvm.ptr -> i64
          %1431 = arith.constant 7 : i32
          %1433 = arith.extsi %1431 : i32 to i64
          %1432 = arith.muli %1430, %1433 : i64
          %1434 = arith.constant 6 : i32
          %1436 = arith.extsi %1434 : i32 to i64
          %1435 = arith.addi %1432, %1436 : i64
          %1437 = llvm.getelementptr %1429[%1435] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1427, %1437 : i64, !llvm.ptr
          func.return
        ^bb100:
          cf.br ^bb101
        ^bb101:
        %1438 = llvm.load %1227 : !llvm.ptr -> i64
        %1439 = arith.constant 1 : i32
        %1441 = arith.extsi %1439 : i32 to i64
        %1440 = arith.addi %1438, %1441 : i64
        %1442 = llvm.mlir.addressof @mask0 : !llvm.ptr
        %1443 = llvm.load %1442 : !llvm.ptr -> i64
        %1444 = arith.andi %1440, %1443 : i64
        llvm.store %1444, %1227 : i64, !llvm.ptr
        cf.br ^bb96
      ^bb98:
      %1445 = arith.constant 1 : i32
      %1446 = llvm.mlir.addressof @occ0 : !llvm.ptr
      %1447 = llvm.load %1446 : !llvm.ptr -> !llvm.ptr
      %1448 = llvm.load %1227 : !llvm.ptr -> i64
      %1449 = arith.trunci %1445 : i32 to i8
      %1450 = llvm.getelementptr %1447[%1448] : (!llvm.ptr, i64) -> !llvm.ptr, i8
      llvm.store %1449, %1450 : i8, !llvm.ptr
      %1451 = llvm.mlir.addressof @sta0 : !llvm.ptr
      %1452 = llvm.load %1451 : !llvm.ptr -> !llvm.ptr
      %1453 = llvm.load %1227 : !llvm.ptr -> i64
      %1454 = llvm.getelementptr %1452[%1453] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %arg1, %1454 : i64, !llvm.ptr
      %1456 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1457 = llvm.load %1456 : !llvm.ptr -> !llvm.ptr
      %1458 = arith.constant 0 : i32
      %1459 = arith.extsi %1458 : i32 to i64
      %1460 = llvm.getelementptr %1457[%1459] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1455 = llvm.load %1460 : !llvm.ptr -> i64
      %1461 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1462 = llvm.load %1461 : !llvm.ptr -> !llvm.ptr
      %1463 = llvm.load %1227 : !llvm.ptr -> i64
      %1464 = arith.constant 7 : i32
      %1466 = arith.extsi %1464 : i32 to i64
      %1465 = arith.muli %1463, %1466 : i64
      %1467 = arith.constant 0 : i32
      %1469 = arith.extsi %1467 : i32 to i64
      %1468 = arith.addi %1465, %1469 : i64
      %1470 = llvm.getelementptr %1462[%1468] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1455, %1470 : i64, !llvm.ptr
      %1472 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1473 = llvm.load %1472 : !llvm.ptr -> !llvm.ptr
      %1474 = arith.constant 1 : i32
      %1475 = arith.extsi %1474 : i32 to i64
      %1476 = llvm.getelementptr %1473[%1475] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1471 = llvm.load %1476 : !llvm.ptr -> i64
      %1477 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1478 = llvm.load %1477 : !llvm.ptr -> !llvm.ptr
      %1479 = llvm.load %1227 : !llvm.ptr -> i64
      %1480 = arith.constant 7 : i32
      %1482 = arith.extsi %1480 : i32 to i64
      %1481 = arith.muli %1479, %1482 : i64
      %1483 = arith.constant 1 : i32
      %1485 = arith.extsi %1483 : i32 to i64
      %1484 = arith.addi %1481, %1485 : i64
      %1486 = llvm.getelementptr %1478[%1484] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1471, %1486 : i64, !llvm.ptr
      %1488 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1489 = llvm.load %1488 : !llvm.ptr -> !llvm.ptr
      %1490 = arith.constant 2 : i32
      %1491 = arith.extsi %1490 : i32 to i64
      %1492 = llvm.getelementptr %1489[%1491] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1487 = llvm.load %1492 : !llvm.ptr -> i64
      %1493 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1494 = llvm.load %1493 : !llvm.ptr -> !llvm.ptr
      %1495 = llvm.load %1227 : !llvm.ptr -> i64
      %1496 = arith.constant 7 : i32
      %1498 = arith.extsi %1496 : i32 to i64
      %1497 = arith.muli %1495, %1498 : i64
      %1499 = arith.constant 2 : i32
      %1501 = arith.extsi %1499 : i32 to i64
      %1500 = arith.addi %1497, %1501 : i64
      %1502 = llvm.getelementptr %1494[%1500] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1487, %1502 : i64, !llvm.ptr
      %1504 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1505 = llvm.load %1504 : !llvm.ptr -> !llvm.ptr
      %1506 = arith.constant 3 : i32
      %1507 = arith.extsi %1506 : i32 to i64
      %1508 = llvm.getelementptr %1505[%1507] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1503 = llvm.load %1508 : !llvm.ptr -> i64
      %1509 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1510 = llvm.load %1509 : !llvm.ptr -> !llvm.ptr
      %1511 = llvm.load %1227 : !llvm.ptr -> i64
      %1512 = arith.constant 7 : i32
      %1514 = arith.extsi %1512 : i32 to i64
      %1513 = arith.muli %1511, %1514 : i64
      %1515 = arith.constant 3 : i32
      %1517 = arith.extsi %1515 : i32 to i64
      %1516 = arith.addi %1513, %1517 : i64
      %1518 = llvm.getelementptr %1510[%1516] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1503, %1518 : i64, !llvm.ptr
      %1520 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1521 = llvm.load %1520 : !llvm.ptr -> !llvm.ptr
      %1522 = arith.constant 4 : i32
      %1523 = arith.extsi %1522 : i32 to i64
      %1524 = llvm.getelementptr %1521[%1523] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1519 = llvm.load %1524 : !llvm.ptr -> i64
      %1525 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1526 = llvm.load %1525 : !llvm.ptr -> !llvm.ptr
      %1527 = llvm.load %1227 : !llvm.ptr -> i64
      %1528 = arith.constant 7 : i32
      %1530 = arith.extsi %1528 : i32 to i64
      %1529 = arith.muli %1527, %1530 : i64
      %1531 = arith.constant 4 : i32
      %1533 = arith.extsi %1531 : i32 to i64
      %1532 = arith.addi %1529, %1533 : i64
      %1534 = llvm.getelementptr %1526[%1532] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1519, %1534 : i64, !llvm.ptr
      %1536 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1537 = llvm.load %1536 : !llvm.ptr -> !llvm.ptr
      %1538 = arith.constant 5 : i32
      %1539 = arith.extsi %1538 : i32 to i64
      %1540 = llvm.getelementptr %1537[%1539] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1535 = llvm.load %1540 : !llvm.ptr -> i64
      %1541 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1542 = llvm.load %1541 : !llvm.ptr -> !llvm.ptr
      %1543 = llvm.load %1227 : !llvm.ptr -> i64
      %1544 = arith.constant 7 : i32
      %1546 = arith.extsi %1544 : i32 to i64
      %1545 = arith.muli %1543, %1546 : i64
      %1547 = arith.constant 5 : i32
      %1549 = arith.extsi %1547 : i32 to i64
      %1548 = arith.addi %1545, %1549 : i64
      %1550 = llvm.getelementptr %1542[%1548] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1535, %1550 : i64, !llvm.ptr
      %1552 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1553 = llvm.load %1552 : !llvm.ptr -> !llvm.ptr
      %1554 = arith.constant 6 : i32
      %1555 = arith.extsi %1554 : i32 to i64
      %1556 = llvm.getelementptr %1553[%1555] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1551 = llvm.load %1556 : !llvm.ptr -> i64
      %1557 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %1558 = llvm.load %1557 : !llvm.ptr -> !llvm.ptr
      %1559 = llvm.load %1227 : !llvm.ptr -> i64
      %1560 = arith.constant 7 : i32
      %1562 = arith.extsi %1560 : i32 to i64
      %1561 = arith.muli %1559, %1562 : i64
      %1563 = arith.constant 6 : i32
      %1565 = arith.extsi %1563 : i32 to i64
      %1564 = arith.addi %1561, %1565 : i64
      %1566 = llvm.getelementptr %1558[%1564] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1551, %1566 : i64, !llvm.ptr
      %1567 = llvm.load %1227 : !llvm.ptr -> i64
      %1568 = arith.trunci %1567 : i64 to i32
      %1569 = llvm.mlir.addressof @sl0 : !llvm.ptr
      %1570 = llvm.load %1569 : !llvm.ptr -> !llvm.ptr
      %1571 = llvm.mlir.addressof @sls0 : !llvm.ptr
      %1572 = llvm.load %1571 : !llvm.ptr -> i64
      %1573 = llvm.getelementptr %1570[%1572] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1568, %1573 : i32, !llvm.ptr
      %1574 = llvm.mlir.addressof @sls0 : !llvm.ptr
      %1575 = llvm.load %1574 : !llvm.ptr -> i64
      %1576 = arith.constant 1 : i32
      %1578 = arith.extsi %1576 : i32 to i64
      %1577 = arith.addi %1575, %1578 : i64
      %1579 = llvm.mlir.addressof @sls0 : !llvm.ptr
      llvm.store %1577, %1579 : i64, !llvm.ptr
      %1580 = llvm.mlir.addressof @count0 : !llvm.ptr
      %1581 = llvm.load %1580 : !llvm.ptr -> i64
      %1582 = arith.constant 1 : i32
      %1584 = arith.extsi %1582 : i32 to i64
      %1583 = arith.addi %1581, %1584 : i64
      %1585 = llvm.mlir.addressof @count0 : !llvm.ptr
      llvm.store %1583, %1585 : i64, !llvm.ptr
      cf.br ^bb92
    ^bb91:
      %1586 = llvm.mlir.addressof @count1 : !llvm.ptr
      %1587 = llvm.load %1586 : !llvm.ptr -> i64
      %1588 = arith.constant 2 : i32
      %1590 = arith.extsi %1588 : i32 to i64
      %1589 = arith.muli %1587, %1590 : i64
      %1591 = llvm.mlir.addressof @cap1 : !llvm.ptr
      %1592 = llvm.load %1591 : !llvm.ptr -> i64
      %1593 = arith.cmpi sge, %1589, %1592 : i64
      cf.cond_br %1593, ^bb102, ^bb103
      ^bb102:
        %1595 = arith.constant 1 : i32
        %1596 = llvm.mlir.addressof @cap1 : !llvm.ptr
        %1597 = llvm.load %1596 : !llvm.ptr -> i64
        %1598 = arith.constant 2 : i32
        %1600 = arith.extsi %1598 : i32 to i64
        %1599 = arith.muli %1597, %1600 : i64
        %1601 = arith.extsi %1595 : i32 to i64
        func.call @ht_resize(%1601, %1599) : (i64, i64) -> ()
        cf.br ^bb104
      ^bb103:
        cf.br ^bb104
      ^bb104:
      %1603 = llvm.mlir.addressof @mask1 : !llvm.ptr
      %1604 = llvm.load %1603 : !llvm.ptr -> i64
      %1602 = func.call @ht_hash(%arg1, %1604) : (i64, i64) -> i64
      %1605 = llvm.mlir.constant(1 : i64) : i64
      %1606 = llvm.alloca %1605 x i64 : (i64) -> !llvm.ptr
      llvm.store %1602, %1606 : i64, !llvm.ptr
      cf.br ^bb105
      ^bb105:
      %1608 = llvm.mlir.addressof @occ1 : !llvm.ptr
      %1609 = llvm.load %1608 : !llvm.ptr -> !llvm.ptr
      %1610 = llvm.load %1606 : !llvm.ptr -> i64
      %1611 = llvm.getelementptr %1609[%1610] : (!llvm.ptr, i64) -> !llvm.ptr, i8
      %1607 = llvm.load %1611 : !llvm.ptr -> i8
      %1612 = arith.constant 0 : i32
      %1614 = arith.extsi %1607 : i8 to i32
      %1613 = arith.cmpi ne, %1614, %1612 : i32
      cf.cond_br %1613, ^bb106, ^bb107
      ^bb106:
        %1616 = llvm.mlir.addressof @sta1 : !llvm.ptr
        %1617 = llvm.load %1616 : !llvm.ptr -> !llvm.ptr
        %1618 = llvm.load %1606 : !llvm.ptr -> i64
        %1619 = llvm.getelementptr %1617[%1618] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %1615 = llvm.load %1619 : !llvm.ptr -> i64
        %1620 = arith.cmpi eq, %1615, %arg1 : i64
        cf.cond_br %1620, ^bb108, ^bb109
        ^bb108:
          %1622 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1623 = llvm.load %1622 : !llvm.ptr -> !llvm.ptr
          %1624 = llvm.load %1606 : !llvm.ptr -> i64
          %1625 = arith.constant 7 : i32
          %1627 = arith.extsi %1625 : i32 to i64
          %1626 = arith.muli %1624, %1627 : i64
          %1628 = arith.constant 0 : i32
          %1630 = arith.extsi %1628 : i32 to i64
          %1629 = arith.addi %1626, %1630 : i64
          %1631 = llvm.getelementptr %1623[%1629] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1621 = llvm.load %1631 : !llvm.ptr -> i64
          %1633 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1634 = llvm.load %1633 : !llvm.ptr -> !llvm.ptr
          %1635 = arith.constant 0 : i32
          %1636 = arith.extsi %1635 : i32 to i64
          %1637 = llvm.getelementptr %1634[%1636] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1632 = llvm.load %1637 : !llvm.ptr -> i64
          %1638 = arith.addi %1621, %1632 : i64
          %1639 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1640 = llvm.load %1639 : !llvm.ptr -> !llvm.ptr
          %1641 = llvm.load %1606 : !llvm.ptr -> i64
          %1642 = arith.constant 7 : i32
          %1644 = arith.extsi %1642 : i32 to i64
          %1643 = arith.muli %1641, %1644 : i64
          %1645 = arith.constant 0 : i32
          %1647 = arith.extsi %1645 : i32 to i64
          %1646 = arith.addi %1643, %1647 : i64
          %1648 = llvm.getelementptr %1640[%1646] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1638, %1648 : i64, !llvm.ptr
          %1650 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1651 = llvm.load %1650 : !llvm.ptr -> !llvm.ptr
          %1652 = llvm.load %1606 : !llvm.ptr -> i64
          %1653 = arith.constant 7 : i32
          %1655 = arith.extsi %1653 : i32 to i64
          %1654 = arith.muli %1652, %1655 : i64
          %1656 = arith.constant 1 : i32
          %1658 = arith.extsi %1656 : i32 to i64
          %1657 = arith.addi %1654, %1658 : i64
          %1659 = llvm.getelementptr %1651[%1657] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1649 = llvm.load %1659 : !llvm.ptr -> i64
          %1661 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1662 = llvm.load %1661 : !llvm.ptr -> !llvm.ptr
          %1663 = arith.constant 1 : i32
          %1664 = arith.extsi %1663 : i32 to i64
          %1665 = llvm.getelementptr %1662[%1664] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1660 = llvm.load %1665 : !llvm.ptr -> i64
          %1666 = arith.addi %1649, %1660 : i64
          %1667 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1668 = llvm.load %1667 : !llvm.ptr -> !llvm.ptr
          %1669 = llvm.load %1606 : !llvm.ptr -> i64
          %1670 = arith.constant 7 : i32
          %1672 = arith.extsi %1670 : i32 to i64
          %1671 = arith.muli %1669, %1672 : i64
          %1673 = arith.constant 1 : i32
          %1675 = arith.extsi %1673 : i32 to i64
          %1674 = arith.addi %1671, %1675 : i64
          %1676 = llvm.getelementptr %1668[%1674] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1666, %1676 : i64, !llvm.ptr
          %1678 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1679 = llvm.load %1678 : !llvm.ptr -> !llvm.ptr
          %1680 = llvm.load %1606 : !llvm.ptr -> i64
          %1681 = arith.constant 7 : i32
          %1683 = arith.extsi %1681 : i32 to i64
          %1682 = arith.muli %1680, %1683 : i64
          %1684 = arith.constant 2 : i32
          %1686 = arith.extsi %1684 : i32 to i64
          %1685 = arith.addi %1682, %1686 : i64
          %1687 = llvm.getelementptr %1679[%1685] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1677 = llvm.load %1687 : !llvm.ptr -> i64
          %1689 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1690 = llvm.load %1689 : !llvm.ptr -> !llvm.ptr
          %1691 = arith.constant 2 : i32
          %1692 = arith.extsi %1691 : i32 to i64
          %1693 = llvm.getelementptr %1690[%1692] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1688 = llvm.load %1693 : !llvm.ptr -> i64
          %1694 = arith.addi %1677, %1688 : i64
          %1695 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1696 = llvm.load %1695 : !llvm.ptr -> !llvm.ptr
          %1697 = llvm.load %1606 : !llvm.ptr -> i64
          %1698 = arith.constant 7 : i32
          %1700 = arith.extsi %1698 : i32 to i64
          %1699 = arith.muli %1697, %1700 : i64
          %1701 = arith.constant 2 : i32
          %1703 = arith.extsi %1701 : i32 to i64
          %1702 = arith.addi %1699, %1703 : i64
          %1704 = llvm.getelementptr %1696[%1702] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1694, %1704 : i64, !llvm.ptr
          %1706 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1707 = llvm.load %1706 : !llvm.ptr -> !llvm.ptr
          %1708 = llvm.load %1606 : !llvm.ptr -> i64
          %1709 = arith.constant 7 : i32
          %1711 = arith.extsi %1709 : i32 to i64
          %1710 = arith.muli %1708, %1711 : i64
          %1712 = arith.constant 3 : i32
          %1714 = arith.extsi %1712 : i32 to i64
          %1713 = arith.addi %1710, %1714 : i64
          %1715 = llvm.getelementptr %1707[%1713] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1705 = llvm.load %1715 : !llvm.ptr -> i64
          %1717 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1718 = llvm.load %1717 : !llvm.ptr -> !llvm.ptr
          %1719 = arith.constant 3 : i32
          %1720 = arith.extsi %1719 : i32 to i64
          %1721 = llvm.getelementptr %1718[%1720] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1716 = llvm.load %1721 : !llvm.ptr -> i64
          %1722 = arith.addi %1705, %1716 : i64
          %1723 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1724 = llvm.load %1723 : !llvm.ptr -> !llvm.ptr
          %1725 = llvm.load %1606 : !llvm.ptr -> i64
          %1726 = arith.constant 7 : i32
          %1728 = arith.extsi %1726 : i32 to i64
          %1727 = arith.muli %1725, %1728 : i64
          %1729 = arith.constant 3 : i32
          %1731 = arith.extsi %1729 : i32 to i64
          %1730 = arith.addi %1727, %1731 : i64
          %1732 = llvm.getelementptr %1724[%1730] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1722, %1732 : i64, !llvm.ptr
          %1734 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1735 = llvm.load %1734 : !llvm.ptr -> !llvm.ptr
          %1736 = llvm.load %1606 : !llvm.ptr -> i64
          %1737 = arith.constant 7 : i32
          %1739 = arith.extsi %1737 : i32 to i64
          %1738 = arith.muli %1736, %1739 : i64
          %1740 = arith.constant 4 : i32
          %1742 = arith.extsi %1740 : i32 to i64
          %1741 = arith.addi %1738, %1742 : i64
          %1743 = llvm.getelementptr %1735[%1741] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1733 = llvm.load %1743 : !llvm.ptr -> i64
          %1745 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1746 = llvm.load %1745 : !llvm.ptr -> !llvm.ptr
          %1747 = arith.constant 4 : i32
          %1748 = arith.extsi %1747 : i32 to i64
          %1749 = llvm.getelementptr %1746[%1748] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1744 = llvm.load %1749 : !llvm.ptr -> i64
          %1750 = arith.addi %1733, %1744 : i64
          %1751 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1752 = llvm.load %1751 : !llvm.ptr -> !llvm.ptr
          %1753 = llvm.load %1606 : !llvm.ptr -> i64
          %1754 = arith.constant 7 : i32
          %1756 = arith.extsi %1754 : i32 to i64
          %1755 = arith.muli %1753, %1756 : i64
          %1757 = arith.constant 4 : i32
          %1759 = arith.extsi %1757 : i32 to i64
          %1758 = arith.addi %1755, %1759 : i64
          %1760 = llvm.getelementptr %1752[%1758] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1750, %1760 : i64, !llvm.ptr
          %1762 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1763 = llvm.load %1762 : !llvm.ptr -> !llvm.ptr
          %1764 = llvm.load %1606 : !llvm.ptr -> i64
          %1765 = arith.constant 7 : i32
          %1767 = arith.extsi %1765 : i32 to i64
          %1766 = arith.muli %1764, %1767 : i64
          %1768 = arith.constant 5 : i32
          %1770 = arith.extsi %1768 : i32 to i64
          %1769 = arith.addi %1766, %1770 : i64
          %1771 = llvm.getelementptr %1763[%1769] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1761 = llvm.load %1771 : !llvm.ptr -> i64
          %1773 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1774 = llvm.load %1773 : !llvm.ptr -> !llvm.ptr
          %1775 = arith.constant 5 : i32
          %1776 = arith.extsi %1775 : i32 to i64
          %1777 = llvm.getelementptr %1774[%1776] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1772 = llvm.load %1777 : !llvm.ptr -> i64
          %1778 = arith.addi %1761, %1772 : i64
          %1779 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1780 = llvm.load %1779 : !llvm.ptr -> !llvm.ptr
          %1781 = llvm.load %1606 : !llvm.ptr -> i64
          %1782 = arith.constant 7 : i32
          %1784 = arith.extsi %1782 : i32 to i64
          %1783 = arith.muli %1781, %1784 : i64
          %1785 = arith.constant 5 : i32
          %1787 = arith.extsi %1785 : i32 to i64
          %1786 = arith.addi %1783, %1787 : i64
          %1788 = llvm.getelementptr %1780[%1786] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1778, %1788 : i64, !llvm.ptr
          %1790 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1791 = llvm.load %1790 : !llvm.ptr -> !llvm.ptr
          %1792 = llvm.load %1606 : !llvm.ptr -> i64
          %1793 = arith.constant 7 : i32
          %1795 = arith.extsi %1793 : i32 to i64
          %1794 = arith.muli %1792, %1795 : i64
          %1796 = arith.constant 6 : i32
          %1798 = arith.extsi %1796 : i32 to i64
          %1797 = arith.addi %1794, %1798 : i64
          %1799 = llvm.getelementptr %1791[%1797] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1789 = llvm.load %1799 : !llvm.ptr -> i64
          %1801 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %1802 = llvm.load %1801 : !llvm.ptr -> !llvm.ptr
          %1803 = arith.constant 6 : i32
          %1804 = arith.extsi %1803 : i32 to i64
          %1805 = llvm.getelementptr %1802[%1804] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %1800 = llvm.load %1805 : !llvm.ptr -> i64
          %1806 = arith.addi %1789, %1800 : i64
          %1807 = llvm.mlir.addressof @cnt1 : !llvm.ptr
          %1808 = llvm.load %1807 : !llvm.ptr -> !llvm.ptr
          %1809 = llvm.load %1606 : !llvm.ptr -> i64
          %1810 = arith.constant 7 : i32
          %1812 = arith.extsi %1810 : i32 to i64
          %1811 = arith.muli %1809, %1812 : i64
          %1813 = arith.constant 6 : i32
          %1815 = arith.extsi %1813 : i32 to i64
          %1814 = arith.addi %1811, %1815 : i64
          %1816 = llvm.getelementptr %1808[%1814] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %1806, %1816 : i64, !llvm.ptr
          func.return
        ^bb109:
          cf.br ^bb110
        ^bb110:
        %1817 = llvm.load %1606 : !llvm.ptr -> i64
        %1818 = arith.constant 1 : i32
        %1820 = arith.extsi %1818 : i32 to i64
        %1819 = arith.addi %1817, %1820 : i64
        %1821 = llvm.mlir.addressof @mask1 : !llvm.ptr
        %1822 = llvm.load %1821 : !llvm.ptr -> i64
        %1823 = arith.andi %1819, %1822 : i64
        llvm.store %1823, %1606 : i64, !llvm.ptr
        cf.br ^bb105
      ^bb107:
      %1824 = arith.constant 1 : i32
      %1825 = llvm.mlir.addressof @occ1 : !llvm.ptr
      %1826 = llvm.load %1825 : !llvm.ptr -> !llvm.ptr
      %1827 = llvm.load %1606 : !llvm.ptr -> i64
      %1828 = arith.trunci %1824 : i32 to i8
      %1829 = llvm.getelementptr %1826[%1827] : (!llvm.ptr, i64) -> !llvm.ptr, i8
      llvm.store %1828, %1829 : i8, !llvm.ptr
      %1830 = llvm.mlir.addressof @sta1 : !llvm.ptr
      %1831 = llvm.load %1830 : !llvm.ptr -> !llvm.ptr
      %1832 = llvm.load %1606 : !llvm.ptr -> i64
      %1833 = llvm.getelementptr %1831[%1832] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %arg1, %1833 : i64, !llvm.ptr
      %1835 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1836 = llvm.load %1835 : !llvm.ptr -> !llvm.ptr
      %1837 = arith.constant 0 : i32
      %1838 = arith.extsi %1837 : i32 to i64
      %1839 = llvm.getelementptr %1836[%1838] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1834 = llvm.load %1839 : !llvm.ptr -> i64
      %1840 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1841 = llvm.load %1840 : !llvm.ptr -> !llvm.ptr
      %1842 = llvm.load %1606 : !llvm.ptr -> i64
      %1843 = arith.constant 7 : i32
      %1845 = arith.extsi %1843 : i32 to i64
      %1844 = arith.muli %1842, %1845 : i64
      %1846 = arith.constant 0 : i32
      %1848 = arith.extsi %1846 : i32 to i64
      %1847 = arith.addi %1844, %1848 : i64
      %1849 = llvm.getelementptr %1841[%1847] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1834, %1849 : i64, !llvm.ptr
      %1851 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1852 = llvm.load %1851 : !llvm.ptr -> !llvm.ptr
      %1853 = arith.constant 1 : i32
      %1854 = arith.extsi %1853 : i32 to i64
      %1855 = llvm.getelementptr %1852[%1854] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1850 = llvm.load %1855 : !llvm.ptr -> i64
      %1856 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1857 = llvm.load %1856 : !llvm.ptr -> !llvm.ptr
      %1858 = llvm.load %1606 : !llvm.ptr -> i64
      %1859 = arith.constant 7 : i32
      %1861 = arith.extsi %1859 : i32 to i64
      %1860 = arith.muli %1858, %1861 : i64
      %1862 = arith.constant 1 : i32
      %1864 = arith.extsi %1862 : i32 to i64
      %1863 = arith.addi %1860, %1864 : i64
      %1865 = llvm.getelementptr %1857[%1863] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1850, %1865 : i64, !llvm.ptr
      %1867 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1868 = llvm.load %1867 : !llvm.ptr -> !llvm.ptr
      %1869 = arith.constant 2 : i32
      %1870 = arith.extsi %1869 : i32 to i64
      %1871 = llvm.getelementptr %1868[%1870] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1866 = llvm.load %1871 : !llvm.ptr -> i64
      %1872 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1873 = llvm.load %1872 : !llvm.ptr -> !llvm.ptr
      %1874 = llvm.load %1606 : !llvm.ptr -> i64
      %1875 = arith.constant 7 : i32
      %1877 = arith.extsi %1875 : i32 to i64
      %1876 = arith.muli %1874, %1877 : i64
      %1878 = arith.constant 2 : i32
      %1880 = arith.extsi %1878 : i32 to i64
      %1879 = arith.addi %1876, %1880 : i64
      %1881 = llvm.getelementptr %1873[%1879] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1866, %1881 : i64, !llvm.ptr
      %1883 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1884 = llvm.load %1883 : !llvm.ptr -> !llvm.ptr
      %1885 = arith.constant 3 : i32
      %1886 = arith.extsi %1885 : i32 to i64
      %1887 = llvm.getelementptr %1884[%1886] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1882 = llvm.load %1887 : !llvm.ptr -> i64
      %1888 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1889 = llvm.load %1888 : !llvm.ptr -> !llvm.ptr
      %1890 = llvm.load %1606 : !llvm.ptr -> i64
      %1891 = arith.constant 7 : i32
      %1893 = arith.extsi %1891 : i32 to i64
      %1892 = arith.muli %1890, %1893 : i64
      %1894 = arith.constant 3 : i32
      %1896 = arith.extsi %1894 : i32 to i64
      %1895 = arith.addi %1892, %1896 : i64
      %1897 = llvm.getelementptr %1889[%1895] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1882, %1897 : i64, !llvm.ptr
      %1899 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1900 = llvm.load %1899 : !llvm.ptr -> !llvm.ptr
      %1901 = arith.constant 4 : i32
      %1902 = arith.extsi %1901 : i32 to i64
      %1903 = llvm.getelementptr %1900[%1902] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1898 = llvm.load %1903 : !llvm.ptr -> i64
      %1904 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1905 = llvm.load %1904 : !llvm.ptr -> !llvm.ptr
      %1906 = llvm.load %1606 : !llvm.ptr -> i64
      %1907 = arith.constant 7 : i32
      %1909 = arith.extsi %1907 : i32 to i64
      %1908 = arith.muli %1906, %1909 : i64
      %1910 = arith.constant 4 : i32
      %1912 = arith.extsi %1910 : i32 to i64
      %1911 = arith.addi %1908, %1912 : i64
      %1913 = llvm.getelementptr %1905[%1911] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1898, %1913 : i64, !llvm.ptr
      %1915 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1916 = llvm.load %1915 : !llvm.ptr -> !llvm.ptr
      %1917 = arith.constant 5 : i32
      %1918 = arith.extsi %1917 : i32 to i64
      %1919 = llvm.getelementptr %1916[%1918] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1914 = llvm.load %1919 : !llvm.ptr -> i64
      %1920 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1921 = llvm.load %1920 : !llvm.ptr -> !llvm.ptr
      %1922 = llvm.load %1606 : !llvm.ptr -> i64
      %1923 = arith.constant 7 : i32
      %1925 = arith.extsi %1923 : i32 to i64
      %1924 = arith.muli %1922, %1925 : i64
      %1926 = arith.constant 5 : i32
      %1928 = arith.extsi %1926 : i32 to i64
      %1927 = arith.addi %1924, %1928 : i64
      %1929 = llvm.getelementptr %1921[%1927] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1914, %1929 : i64, !llvm.ptr
      %1931 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
      %1932 = llvm.load %1931 : !llvm.ptr -> !llvm.ptr
      %1933 = arith.constant 6 : i32
      %1934 = arith.extsi %1933 : i32 to i64
      %1935 = llvm.getelementptr %1932[%1934] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %1930 = llvm.load %1935 : !llvm.ptr -> i64
      %1936 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %1937 = llvm.load %1936 : !llvm.ptr -> !llvm.ptr
      %1938 = llvm.load %1606 : !llvm.ptr -> i64
      %1939 = arith.constant 7 : i32
      %1941 = arith.extsi %1939 : i32 to i64
      %1940 = arith.muli %1938, %1941 : i64
      %1942 = arith.constant 6 : i32
      %1944 = arith.extsi %1942 : i32 to i64
      %1943 = arith.addi %1940, %1944 : i64
      %1945 = llvm.getelementptr %1937[%1943] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      llvm.store %1930, %1945 : i64, !llvm.ptr
      %1946 = llvm.load %1606 : !llvm.ptr -> i64
      %1947 = arith.trunci %1946 : i64 to i32
      %1948 = llvm.mlir.addressof @sl1 : !llvm.ptr
      %1949 = llvm.load %1948 : !llvm.ptr -> !llvm.ptr
      %1950 = llvm.mlir.addressof @sls1 : !llvm.ptr
      %1951 = llvm.load %1950 : !llvm.ptr -> i64
      %1952 = llvm.getelementptr %1949[%1951] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      llvm.store %1947, %1952 : i32, !llvm.ptr
      %1953 = llvm.mlir.addressof @sls1 : !llvm.ptr
      %1954 = llvm.load %1953 : !llvm.ptr -> i64
      %1955 = arith.constant 1 : i32
      %1957 = arith.extsi %1955 : i32 to i64
      %1956 = arith.addi %1954, %1957 : i64
      %1958 = llvm.mlir.addressof @sls1 : !llvm.ptr
      llvm.store %1956, %1958 : i64, !llvm.ptr
      %1959 = llvm.mlir.addressof @count1 : !llvm.ptr
      %1960 = llvm.load %1959 : !llvm.ptr -> i64
      %1961 = arith.constant 1 : i32
      %1963 = arith.extsi %1961 : i32 to i64
      %1962 = arith.addi %1960, %1963 : i64
      %1964 = llvm.mlir.addressof @count1 : !llvm.ptr
      llvm.store %1962, %1964 : i64, !llvm.ptr
      cf.br ^bb92
    ^bb92:
    func.return
  }
  func.func @advance_dp(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i64, %arg4: i1) -> () {
    %1965 = arith.constant 6 : i32
    %1967 = arith.extsi %1965 : i32 to i64
    %1966 = arith.remsi %arg2, %1967 : i64
    %1969 = llvm.mlir.addressof @SHIFT_arr : !llvm.ptr
    %1970 = llvm.load %1969 : !llvm.ptr -> !llvm.ptr
    %1971 = llvm.getelementptr %1970[%1966] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    %1968 = llvm.load %1971 : !llvm.ptr -> i64
    %1972 = llvm.mlir.addressof @mask_all : !llvm.ptr
    %1973 = llvm.load %1972 : !llvm.ptr -> !llvm.ptr
    %1974 = arith.constant 0 : i32
    %1975 = arith.extsi %1974 : i32 to i64
    %1976, %1977 = scf.if %arg4 -> (!llvm.ptr, i64) {
      %1978 = llvm.mlir.addressof @mask_no0 : !llvm.ptr
      %1979 = llvm.load %1978 : !llvm.ptr -> !llvm.ptr
      %1980 = arith.constant 1 : i32
      %1981 = arith.extsi %1980 : i32 to i64
      scf.yield %1979, %1981 : !llvm.ptr, i64
    } else {
      scf.yield %1973, %1975 : !llvm.ptr, i64
    }
    %1983 = arith.constant 0 : i32
    %1984 = arith.constant 0 : i32
    %1985 = arith.constant 0 : i32
    %1986 = arith.constant 0 : i32
    %1987 = arith.constant 0 : i32
    %1988 = arith.constant 0 : i32
    %1989 = llvm.mlir.constant(1 : i64) : i64
    %1990 = llvm.alloca %1989 x !llvm.array<6 x i64> : (i64) -> !llvm.ptr
    %1991 = llvm.mlir.zero : !llvm.array<6 x i64>
    llvm.store %1991, %1990 : !llvm.array<6 x i64>, !llvm.ptr
    %1992 = arith.extsi %1983 : i32 to i64
    %1993 = arith.extsi %1984 : i32 to i64
    %1994 = arith.extsi %1985 : i32 to i64
    %1995 = arith.extsi %1986 : i32 to i64
    %1996 = arith.extsi %1987 : i32 to i64
    %1997 = arith.extsi %1988 : i32 to i64
    %1998 = llvm.mlir.constant(0 : i64) : i64
    %1999 = llvm.getelementptr %1990[0, %1998] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
    llvm.store %1992, %1999 : i64, !llvm.ptr
    %2000 = llvm.mlir.constant(1 : i64) : i64
    %2001 = llvm.getelementptr %1990[0, %2000] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
    llvm.store %1993, %2001 : i64, !llvm.ptr
    %2002 = llvm.mlir.constant(2 : i64) : i64
    %2003 = llvm.getelementptr %1990[0, %2002] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
    llvm.store %1994, %2003 : i64, !llvm.ptr
    %2004 = llvm.mlir.constant(3 : i64) : i64
    %2005 = llvm.getelementptr %1990[0, %2004] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
    llvm.store %1995, %2005 : i64, !llvm.ptr
    %2006 = llvm.mlir.constant(4 : i64) : i64
    %2007 = llvm.getelementptr %1990[0, %2006] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
    llvm.store %1996, %2007 : i64, !llvm.ptr
    %2008 = llvm.mlir.constant(5 : i64) : i64
    %2009 = llvm.getelementptr %1990[0, %2008] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
    llvm.store %1997, %2009 : i64, !llvm.ptr
    %2010 = arith.constant 0 : i32
    %2011 = arith.extsi %2010 : i32 to i64
    %2012 = llvm.mlir.constant(1 : i64) : i64
    %2013 = llvm.alloca %2012 x i64 : (i64) -> !llvm.ptr
    llvm.store %2011, %2013 : i64, !llvm.ptr
    cf.br ^bb111
    ^bb111:
    %2014 = llvm.load %2013 : !llvm.ptr -> i64
    %2015 = arith.constant 6 : i32
    %2017 = arith.extsi %2015 : i32 to i64
    %2016 = arith.cmpi slt, %2014, %2017 : i64
    cf.cond_br %2016, ^bb112, ^bb113
    ^bb112:
      %2019 = llvm.mlir.addressof @shifts_tab : !llvm.ptr
      %2020 = llvm.load %2019 : !llvm.ptr -> !llvm.ptr
      %2021 = arith.constant 36 : i32
      %2023 = arith.extsi %2021 : i32 to i64
      %2022 = arith.muli %arg3, %2023 : i64
      %2024 = llvm.load %2013 : !llvm.ptr -> i64
      %2025 = arith.constant 6 : i32
      %2027 = arith.extsi %2025 : i32 to i64
      %2026 = arith.muli %2024, %2027 : i64
      %2028 = arith.addi %2022, %2026 : i64
      %2029 = arith.addi %2028, %1966 : i64
      %2030 = llvm.getelementptr %2020[%2029] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %2018 = llvm.load %2030 : !llvm.ptr -> i64
      %2031 = llvm.load %2013 : !llvm.ptr -> i64
      %2032 = llvm.getelementptr %1990[0, %2031] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
      llvm.store %2018, %2032 : i64, !llvm.ptr
      %2033 = llvm.load %2013 : !llvm.ptr -> i64
      %2034 = arith.constant 1 : i32
      %2036 = arith.extsi %2034 : i32 to i64
      %2035 = arith.addi %2033, %2036 : i64
      llvm.store %2035, %2013 : i64, !llvm.ptr
      cf.br ^bb111
    ^bb113:
    func.call @ht_clear(%arg1) : (i64) -> ()
    %2038 = llvm.mlir.zero : !llvm.ptr
    %2039 = llvm.mlir.zero : !llvm.ptr
    %2040 = llvm.mlir.zero : !llvm.ptr
    %2041 = llvm.mlir.zero : !llvm.ptr
    %2042 = arith.constant 0 : i32
    %2043 = arith.extsi %2042 : i32 to i64
    %2044 = arith.constant 0 : i32
    %2046 = arith.extsi %2044 : i32 to i64
    %2045 = arith.cmpi eq, %arg0, %2046 : i64
    %2047, %2048, %2049, %2050, %2051 = scf.if %2045 -> (!llvm.ptr, !llvm.ptr, !llvm.ptr, !llvm.ptr, i64) {
      %2052 = llvm.mlir.addressof @occ0 : !llvm.ptr
      %2053 = llvm.load %2052 : !llvm.ptr -> !llvm.ptr
      %2054 = llvm.mlir.addressof @sta0 : !llvm.ptr
      %2055 = llvm.load %2054 : !llvm.ptr -> !llvm.ptr
      %2056 = llvm.mlir.addressof @cnt0 : !llvm.ptr
      %2057 = llvm.load %2056 : !llvm.ptr -> !llvm.ptr
      %2058 = llvm.mlir.addressof @sl0 : !llvm.ptr
      %2059 = llvm.load %2058 : !llvm.ptr -> !llvm.ptr
      %2060 = llvm.mlir.addressof @sls0 : !llvm.ptr
      %2061 = llvm.load %2060 : !llvm.ptr -> i64
      scf.yield %2053, %2055, %2057, %2059, %2061 : !llvm.ptr, !llvm.ptr, !llvm.ptr, !llvm.ptr, i64
    } else {
      %2062 = llvm.mlir.addressof @occ1 : !llvm.ptr
      %2063 = llvm.load %2062 : !llvm.ptr -> !llvm.ptr
      %2064 = llvm.mlir.addressof @sta1 : !llvm.ptr
      %2065 = llvm.load %2064 : !llvm.ptr -> !llvm.ptr
      %2066 = llvm.mlir.addressof @cnt1 : !llvm.ptr
      %2067 = llvm.load %2066 : !llvm.ptr -> !llvm.ptr
      %2068 = llvm.mlir.addressof @sl1 : !llvm.ptr
      %2069 = llvm.load %2068 : !llvm.ptr -> !llvm.ptr
      %2070 = llvm.mlir.addressof @sls1 : !llvm.ptr
      %2071 = llvm.load %2070 : !llvm.ptr -> i64
      scf.yield %2063, %2065, %2067, %2069, %2071 : !llvm.ptr, !llvm.ptr, !llvm.ptr, !llvm.ptr, i64
    }
    %2072 = arith.constant 0 : i32
    %2073 = arith.extsi %2072 : i32 to i64
    %2074 = llvm.mlir.constant(1 : i64) : i64
    %2075 = llvm.alloca %2074 x i64 : (i64) -> !llvm.ptr
    llvm.store %2073, %2075 : i64, !llvm.ptr
    cf.br ^bb114
    ^bb114:
    %2076 = llvm.load %2075 : !llvm.ptr -> i64
    %2077 = arith.cmpi slt, %2076, %2051 : i64
    cf.cond_br %2077, ^bb115, ^bb116
    ^bb115:
      %2079 = llvm.load %2075 : !llvm.ptr -> i64
      %2080 = llvm.getelementptr %2050[%2079] : (!llvm.ptr, i64) -> !llvm.ptr, i32
      %2078 = llvm.load %2080 : !llvm.ptr -> i32
      %2081 = arith.extsi %2078 : i32 to i64
      %2083 = llvm.getelementptr %2048[%2081] : (!llvm.ptr, i64) -> !llvm.ptr, i64
      %2082 = llvm.load %2083 : !llvm.ptr -> i64
      %2084 = arith.constant 0 : i32
      %2085 = arith.extsi %2084 : i32 to i64
      %2086 = llvm.mlir.constant(1 : i64) : i64
      %2087 = llvm.alloca %2086 x i64 : (i64) -> !llvm.ptr
      llvm.store %2085, %2087 : i64, !llvm.ptr
      %2088 = arith.constant 0 : i32
      %2089 = arith.extsi %2088 : i32 to i64
      %2090 = llvm.mlir.constant(1 : i64) : i64
      %2091 = llvm.alloca %2090 x i64 : (i64) -> !llvm.ptr
      llvm.store %2089, %2091 : i64, !llvm.ptr
      cf.br ^bb117
      ^bb117:
      %2092 = llvm.load %2091 : !llvm.ptr -> i64
      %2093 = arith.constant 6 : i32
      %2095 = arith.extsi %2093 : i32 to i64
      %2094 = arith.cmpi slt, %2092, %2095 : i64
      cf.cond_br %2094, ^bb118, ^bb119
      ^bb118:
        %2096 = llvm.load %2091 : !llvm.ptr -> i64
        %2097 = arith.cmpi ne, %2096, %1966 : i64
        cf.cond_br %2097, ^bb120, ^bb121
        ^bb120:
          %2099 = llvm.mlir.addressof @SHIFT_arr : !llvm.ptr
          %2100 = llvm.load %2099 : !llvm.ptr -> !llvm.ptr
          %2101 = llvm.load %2091 : !llvm.ptr -> i64
          %2102 = llvm.getelementptr %2100[%2101] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %2098 = llvm.load %2102 : !llvm.ptr -> i64
          %2103 = arith.shrsi %2082, %2098 : i64
          %2104 = arith.constant 511 : i32
          %2106 = arith.extsi %2104 : i32 to i64
          %2105 = arith.andi %2103, %2106 : i64
          %2108 = llvm.getelementptr %1976[%2105] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %2107 = llvm.load %2108 : !llvm.ptr -> i64
          %2109 = arith.constant 0 : i32
          %2111 = arith.extsi %2109 : i32 to i64
          %2110 = arith.cmpi ne, %2107, %2111 : i64
          cf.cond_br %2110, ^bb123, ^bb124
          ^bb123:
            %2112 = llvm.load %2087 : !llvm.ptr -> i64
            %2114 = llvm.mlir.addressof @rot_tab : !llvm.ptr
            %2115 = llvm.load %2114 : !llvm.ptr -> !llvm.ptr
            %2117 = llvm.load %2091 : !llvm.ptr -> i64
            %2118 = llvm.getelementptr %1990[0, %2117] : (!llvm.ptr, i64) -> !llvm.ptr, !llvm.array<6 x i64>
            %2116 = llvm.load %2118 : !llvm.ptr -> i64
            %2119 = arith.constant 128 : i32
            %2121 = arith.extsi %2119 : i32 to i64
            %2120 = arith.muli %2116, %2121 : i64
            %2122 = arith.addi %2120, %2107 : i64
            %2123 = llvm.getelementptr %2115[%2122] : (!llvm.ptr, i64) -> !llvm.ptr, i64
            %2113 = llvm.load %2123 : !llvm.ptr -> i64
            %2124 = arith.ori %2112, %2113 : i64
            llvm.store %2124, %2087 : i64, !llvm.ptr
            cf.br ^bb125
          ^bb124:
            cf.br ^bb125
          ^bb125:
          cf.br ^bb122
        ^bb121:
          cf.br ^bb122
        ^bb122:
        %2125 = llvm.load %2091 : !llvm.ptr -> i64
        %2126 = arith.constant 1 : i32
        %2128 = arith.extsi %2126 : i32 to i64
        %2127 = arith.addi %2125, %2128 : i64
        llvm.store %2127, %2091 : i64, !llvm.ptr
        cf.br ^bb117
      ^bb119:
      %2129 = arith.shrsi %2082, %1968 : i64
      %2130 = arith.constant 511 : i32
      %2132 = arith.extsi %2130 : i32 to i64
      %2131 = arith.andi %2129, %2132 : i64
      %2133 = llvm.mlir.constant(1 : i64) : i64
      %2134 = llvm.alloca %2133 x i64 : (i64) -> !llvm.ptr
      llvm.store %1977, %2134 : i64, !llvm.ptr
      cf.br ^bb126
      ^bb126:
      %2135 = llvm.load %2134 : !llvm.ptr -> i64
      %2136 = arith.constant 8 : i32
      %2138 = arith.extsi %2136 : i32 to i64
      %2137 = arith.cmpi slt, %2135, %2138 : i64
      cf.cond_br %2137, ^bb127, ^bb128
      ^bb127:
        %2140 = llvm.mlir.addressof @res_of_idx : !llvm.ptr
        %2141 = llvm.load %2140 : !llvm.ptr -> !llvm.ptr
        %2142 = llvm.load %2134 : !llvm.ptr -> i64
        %2143 = llvm.getelementptr %2141[%2142] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %2139 = llvm.load %2143 : !llvm.ptr -> i64
        %2144 = llvm.load %2087 : !llvm.ptr -> i64
        %2145 = arith.constant 1 : i32
        %2147 = arith.extsi %2145 : i32 to i64
        %2146 = arith.shli %2147, %2139 : i64
        %2148 = arith.andi %2144, %2146 : i64
        %2149 = arith.constant 0 : i32
        %2151 = arith.extsi %2149 : i32 to i64
        %2150 = arith.cmpi ne, %2148, %2151 : i64
        cf.cond_br %2150, ^bb129, ^bb130
        ^bb129:
          %2152 = llvm.load %2134 : !llvm.ptr -> i64
          %2153 = arith.constant 1 : i32
          %2155 = arith.extsi %2153 : i32 to i64
          %2154 = arith.addi %2152, %2155 : i64
          llvm.store %2154, %2134 : i64, !llvm.ptr
          cf.br ^bb126
        ^bb130:
          cf.br ^bb131
        ^bb131:
        %2157 = llvm.mlir.addressof @update_tab : !llvm.ptr
        %2158 = llvm.load %2157 : !llvm.ptr -> !llvm.ptr
        %2159 = arith.constant 8 : i32
        %2161 = arith.extsi %2159 : i32 to i64
        %2160 = arith.muli %2131, %2161 : i64
        %2162 = llvm.load %2134 : !llvm.ptr -> i64
        %2163 = arith.addi %2160, %2162 : i64
        %2164 = llvm.getelementptr %2158[%2163] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %2156 = llvm.load %2164 : !llvm.ptr -> i64
        %2165 = arith.xori %2131, %2156 : i64
        %2166 = arith.shli %2165, %1968 : i64
        %2167 = arith.xori %2082, %2166 : i64
        %2169 = llvm.mlir.addressof @add_contrib_tab : !llvm.ptr
        %2170 = llvm.load %2169 : !llvm.ptr -> !llvm.ptr
        %2171 = arith.constant 8 : i32
        %2173 = arith.extsi %2171 : i32 to i64
        %2172 = arith.muli %1966, %2173 : i64
        %2174 = llvm.load %2134 : !llvm.ptr -> i64
        %2175 = arith.addi %2172, %2174 : i64
        %2176 = llvm.getelementptr %2170[%2175] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %2168 = llvm.load %2176 : !llvm.ptr -> i64
        %2178 = llvm.mlir.addressof @mult_of_idx : !llvm.ptr
        %2179 = llvm.load %2178 : !llvm.ptr -> !llvm.ptr
        %2180 = llvm.load %2134 : !llvm.ptr -> i64
        %2181 = llvm.getelementptr %2179[%2180] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %2177 = llvm.load %2181 : !llvm.ptr -> i64
        %2182 = arith.constant 0 : i32
        %2183 = arith.extsi %2182 : i32 to i64
        %2184 = llvm.mlir.constant(1 : i64) : i64
        %2185 = llvm.alloca %2184 x i64 : (i64) -> !llvm.ptr
        llvm.store %2183, %2185 : i64, !llvm.ptr
        cf.br ^bb132
        ^bb132:
        %2186 = llvm.load %2185 : !llvm.ptr -> i64
        %2187 = arith.constant 7 : i32
        %2189 = arith.extsi %2187 : i32 to i64
        %2188 = arith.cmpi slt, %2186, %2189 : i64
        cf.cond_br %2188, ^bb133, ^bb134
        ^bb133:
          %2191 = arith.constant 7 : i32
          %2193 = arith.extsi %2191 : i32 to i64
          %2192 = arith.muli %2081, %2193 : i64
          %2194 = llvm.load %2185 : !llvm.ptr -> i64
          %2195 = arith.addi %2192, %2194 : i64
          %2196 = llvm.getelementptr %2049[%2195] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          %2190 = llvm.load %2196 : !llvm.ptr -> i64
          %2197 = arith.muli %2190, %2177 : i64
          %2198 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
          %2199 = llvm.load %2198 : !llvm.ptr -> !llvm.ptr
          %2200 = llvm.load %2185 : !llvm.ptr -> i64
          %2201 = arith.addi %2200, %2168 : i64
          %2202 = arith.constant 7 : i32
          %2204 = arith.extsi %2202 : i32 to i64
          %2203 = arith.remsi %2201, %2204 : i64
          %2205 = llvm.getelementptr %2199[%2203] : (!llvm.ptr, i64) -> !llvm.ptr, i64
          llvm.store %2197, %2205 : i64, !llvm.ptr
          %2206 = llvm.load %2185 : !llvm.ptr -> i64
          %2207 = arith.constant 1 : i32
          %2209 = arith.extsi %2207 : i32 to i64
          %2208 = arith.addi %2206, %2209 : i64
          llvm.store %2208, %2185 : i64, !llvm.ptr
          cf.br ^bb132
        ^bb134:
        func.call @ht_insert(%arg1, %2167) : (i64, i64) -> ()
        %2211 = llvm.load %2134 : !llvm.ptr -> i64
        %2212 = arith.constant 1 : i32
        %2214 = arith.extsi %2212 : i32 to i64
        %2213 = arith.addi %2211, %2214 : i64
        llvm.store %2213, %2134 : i64, !llvm.ptr
        cf.br ^bb126
      ^bb128:
      %2215 = llvm.load %2075 : !llvm.ptr -> i64
      %2216 = arith.constant 1 : i32
      %2218 = arith.extsi %2216 : i32 to i64
      %2217 = arith.addi %2215, %2218 : i64
      llvm.store %2217, %2075 : i64, !llvm.ptr
      cf.br ^bb114
    ^bb116:
    func.return
  }
  func.func @count_len_res(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i64) -> i64 {
    func.call @ht_clear(%arg2) : (i64) -> ()
    %2220 = arith.constant 1 : i32
    %2221 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2222 = llvm.load %2221 : !llvm.ptr -> !llvm.ptr
    %2223 = arith.constant 0 : i32
    %2224 = arith.extsi %2220 : i32 to i64
    %2225 = arith.extsi %2223 : i32 to i64
    %2226 = llvm.getelementptr %2222[%2225] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2224, %2226 : i64, !llvm.ptr
    %2227 = arith.constant 0 : i32
    %2228 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2229 = llvm.load %2228 : !llvm.ptr -> !llvm.ptr
    %2230 = arith.constant 1 : i32
    %2231 = arith.extsi %2227 : i32 to i64
    %2232 = arith.extsi %2230 : i32 to i64
    %2233 = llvm.getelementptr %2229[%2232] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2231, %2233 : i64, !llvm.ptr
    %2234 = arith.constant 0 : i32
    %2235 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2236 = llvm.load %2235 : !llvm.ptr -> !llvm.ptr
    %2237 = arith.constant 2 : i32
    %2238 = arith.extsi %2234 : i32 to i64
    %2239 = arith.extsi %2237 : i32 to i64
    %2240 = llvm.getelementptr %2236[%2239] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2238, %2240 : i64, !llvm.ptr
    %2241 = arith.constant 0 : i32
    %2242 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2243 = llvm.load %2242 : !llvm.ptr -> !llvm.ptr
    %2244 = arith.constant 3 : i32
    %2245 = arith.extsi %2241 : i32 to i64
    %2246 = arith.extsi %2244 : i32 to i64
    %2247 = llvm.getelementptr %2243[%2246] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2245, %2247 : i64, !llvm.ptr
    %2248 = arith.constant 0 : i32
    %2249 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2250 = llvm.load %2249 : !llvm.ptr -> !llvm.ptr
    %2251 = arith.constant 4 : i32
    %2252 = arith.extsi %2248 : i32 to i64
    %2253 = arith.extsi %2251 : i32 to i64
    %2254 = llvm.getelementptr %2250[%2253] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2252, %2254 : i64, !llvm.ptr
    %2255 = arith.constant 0 : i32
    %2256 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2257 = llvm.load %2256 : !llvm.ptr -> !llvm.ptr
    %2258 = arith.constant 5 : i32
    %2259 = arith.extsi %2255 : i32 to i64
    %2260 = arith.extsi %2258 : i32 to i64
    %2261 = llvm.getelementptr %2257[%2260] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2259, %2261 : i64, !llvm.ptr
    %2262 = arith.constant 0 : i32
    %2263 = llvm.mlir.addressof @tmp_counts : !llvm.ptr
    %2264 = llvm.load %2263 : !llvm.ptr -> !llvm.ptr
    %2265 = arith.constant 6 : i32
    %2266 = arith.extsi %2262 : i32 to i64
    %2267 = arith.extsi %2265 : i32 to i64
    %2268 = llvm.getelementptr %2264[%2267] : (!llvm.ptr, i64) -> !llvm.ptr, i64
    llvm.store %2266, %2268 : i64, !llvm.ptr
    %2270 = arith.constant 0 : i32
    %2271 = arith.extsi %2270 : i32 to i64
    func.call @ht_insert(%arg2, %2271) : (i64, i64) -> ()
    %2272 = arith.constant 0 : i32
    %2273 = arith.extsi %2272 : i32 to i64
    %2274 = llvm.mlir.constant(1 : i64) : i64
    %2275 = llvm.alloca %2274 x i64 : (i64) -> !llvm.ptr
    llvm.store %2273, %2275 : i64, !llvm.ptr
    %2276 = llvm.mlir.constant(1 : i64) : i64
    %2277 = llvm.alloca %2276 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg2, %2277 : i64, !llvm.ptr
    %2278 = llvm.mlir.constant(1 : i64) : i64
    %2279 = llvm.alloca %2278 x i64 : (i64) -> !llvm.ptr
    llvm.store %arg3, %2279 : i64, !llvm.ptr
    cf.br ^bb135
    ^bb135:
    %2280 = llvm.load %2275 : !llvm.ptr -> i64
    %2281 = arith.cmpi slt, %2280, %arg0 : i64
    cf.cond_br %2281, ^bb136, ^bb137
    ^bb136:
      %2282 = llvm.load %2275 : !llvm.ptr -> i64
      %2283 = arith.constant 1 : i32
      %2285 = arith.extsi %2283 : i32 to i64
      %2284 = arith.subi %arg0, %2285 : i64
      %2286 = arith.cmpi eq, %2282, %2284 : i64
      %2288 = llvm.load %2277 : !llvm.ptr -> i64
      %2289 = llvm.load %2279 : !llvm.ptr -> i64
      %2290 = llvm.load %2275 : !llvm.ptr -> i64
      func.call @advance_dp(%2288, %2289, %2290, %arg1, %2286) : (i64, i64, i64, i64, i1) -> ()
      %2291 = llvm.load %2277 : !llvm.ptr -> i64
      %2292 = llvm.load %2279 : !llvm.ptr -> i64
      llvm.store %2292, %2277 : i64, !llvm.ptr
      llvm.store %2291, %2279 : i64, !llvm.ptr
      %2293 = llvm.load %2275 : !llvm.ptr -> i64
      %2294 = arith.constant 1 : i32
      %2296 = arith.extsi %2294 : i32 to i64
      %2295 = arith.addi %2293, %2296 : i64
      llvm.store %2295, %2275 : i64, !llvm.ptr
      cf.br ^bb135
    ^bb137:
    %2297 = arith.constant 0 : i32
    %2298 = arith.extsi %2297 : i32 to i64
    %2299 = llvm.mlir.constant(1 : i64) : i64
    %2300 = llvm.alloca %2299 x i64 : (i64) -> !llvm.ptr
    llvm.store %2298, %2300 : i64, !llvm.ptr
    %2301 = llvm.load %2277 : !llvm.ptr -> i64
    %2302 = arith.constant 0 : i32
    %2304 = arith.extsi %2302 : i32 to i64
    %2303 = arith.cmpi eq, %2301, %2304 : i64
    cf.cond_br %2303, ^bb138, ^bb139
    ^bb138:
      %2305 = arith.constant 0 : i32
      %2306 = arith.extsi %2305 : i32 to i64
      %2307 = llvm.mlir.constant(1 : i64) : i64
      %2308 = llvm.alloca %2307 x i64 : (i64) -> !llvm.ptr
      llvm.store %2306, %2308 : i64, !llvm.ptr
      cf.br ^bb141
      ^bb141:
      %2309 = llvm.load %2308 : !llvm.ptr -> i64
      %2310 = llvm.mlir.addressof @sls0 : !llvm.ptr
      %2311 = llvm.load %2310 : !llvm.ptr -> i64
      %2312 = arith.cmpi slt, %2309, %2311 : i64
      cf.cond_br %2312, ^bb142, ^bb143
      ^bb142:
        %2314 = llvm.mlir.addressof @sl0 : !llvm.ptr
        %2315 = llvm.load %2314 : !llvm.ptr -> !llvm.ptr
        %2316 = llvm.load %2308 : !llvm.ptr -> i64
        %2317 = llvm.getelementptr %2315[%2316] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %2313 = llvm.load %2317 : !llvm.ptr -> i32
        %2318 = arith.extsi %2313 : i32 to i64
        %2319 = llvm.load %2300 : !llvm.ptr -> i64
        %2321 = llvm.mlir.addressof @cnt0 : !llvm.ptr
        %2322 = llvm.load %2321 : !llvm.ptr -> !llvm.ptr
        %2323 = arith.constant 7 : i32
        %2325 = arith.extsi %2323 : i32 to i64
        %2324 = arith.muli %2318, %2325 : i64
        %2326 = arith.addi %2324, %arg1 : i64
        %2327 = llvm.getelementptr %2322[%2326] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %2320 = llvm.load %2327 : !llvm.ptr -> i64
        %2328 = arith.addi %2319, %2320 : i64
        llvm.store %2328, %2300 : i64, !llvm.ptr
        %2329 = llvm.load %2308 : !llvm.ptr -> i64
        %2330 = arith.constant 1 : i32
        %2332 = arith.extsi %2330 : i32 to i64
        %2331 = arith.addi %2329, %2332 : i64
        llvm.store %2331, %2308 : i64, !llvm.ptr
        cf.br ^bb141
      ^bb143:
      cf.br ^bb140
    ^bb139:
      %2333 = arith.constant 0 : i32
      %2334 = arith.extsi %2333 : i32 to i64
      %2335 = llvm.mlir.constant(1 : i64) : i64
      %2336 = llvm.alloca %2335 x i64 : (i64) -> !llvm.ptr
      llvm.store %2334, %2336 : i64, !llvm.ptr
      cf.br ^bb144
      ^bb144:
      %2337 = llvm.load %2336 : !llvm.ptr -> i64
      %2338 = llvm.mlir.addressof @sls1 : !llvm.ptr
      %2339 = llvm.load %2338 : !llvm.ptr -> i64
      %2340 = arith.cmpi slt, %2337, %2339 : i64
      cf.cond_br %2340, ^bb145, ^bb146
      ^bb145:
        %2342 = llvm.mlir.addressof @sl1 : !llvm.ptr
        %2343 = llvm.load %2342 : !llvm.ptr -> !llvm.ptr
        %2344 = llvm.load %2336 : !llvm.ptr -> i64
        %2345 = llvm.getelementptr %2343[%2344] : (!llvm.ptr, i64) -> !llvm.ptr, i32
        %2341 = llvm.load %2345 : !llvm.ptr -> i32
        %2346 = arith.extsi %2341 : i32 to i64
        %2347 = llvm.load %2300 : !llvm.ptr -> i64
        %2349 = llvm.mlir.addressof @cnt1 : !llvm.ptr
        %2350 = llvm.load %2349 : !llvm.ptr -> !llvm.ptr
        %2351 = arith.constant 7 : i32
        %2353 = arith.extsi %2351 : i32 to i64
        %2352 = arith.muli %2346, %2353 : i64
        %2354 = arith.addi %2352, %arg1 : i64
        %2355 = llvm.getelementptr %2350[%2354] : (!llvm.ptr, i64) -> !llvm.ptr, i64
        %2348 = llvm.load %2355 : !llvm.ptr -> i64
        %2356 = arith.addi %2347, %2348 : i64
        llvm.store %2356, %2300 : i64, !llvm.ptr
        %2357 = llvm.load %2336 : !llvm.ptr -> i64
        %2358 = arith.constant 1 : i32
        %2360 = arith.extsi %2358 : i32 to i64
        %2359 = arith.addi %2357, %2360 : i64
        llvm.store %2359, %2336 : i64, !llvm.ptr
        cf.br ^bb144
      ^bb146:
      cf.br ^bb140
    ^bb140:
    %2361 = llvm.load %2300 : !llvm.ptr -> i64
    func.return %2361 : i64
  }
  func.func @main() -> i32 {
    func.call @init_tables() : () -> ()
    %2364 = arith.constant 0 : i32
    %2365 = arith.constant 1024 : i32
    %2366 = arith.extsi %2364 : i32 to i64
    %2367 = arith.extsi %2365 : i32 to i64
    func.call @ht_init(%2366, %2367) : (i64, i64) -> ()
    %2369 = arith.constant 1 : i32
    %2370 = arith.constant 1024 : i32
    %2371 = arith.extsi %2369 : i32 to i64
    %2372 = arith.extsi %2370 : i32 to i64
    func.call @ht_init(%2371, %2372) : (i64, i64) -> ()
    %2373 = arith.constant 0 : i32
    %2374 = arith.extsi %2373 : i32 to i64
    %2375 = llvm.mlir.constant(1 : i64) : i64
    %2376 = llvm.alloca %2375 x i64 : (i64) -> !llvm.ptr
    llvm.store %2374, %2376 : i64, !llvm.ptr
    %2377 = arith.constant 1 : i32
    %2378 = arith.extsi %2377 : i32 to i64
    %2379 = llvm.mlir.constant(1 : i64) : i64
    %2380 = llvm.alloca %2379 x i64 : (i64) -> !llvm.ptr
    llvm.store %2378, %2380 : i64, !llvm.ptr
    cf.br ^bb147
    ^bb147:
    %2381 = llvm.load %2380 : !llvm.ptr -> i64
    %2382 = arith.constant 13 : i32
    %2384 = arith.extsi %2382 : i32 to i64
    %2383 = arith.cmpi sle, %2381, %2384 : i64
    cf.cond_br %2383, ^bb148, ^bb149
    ^bb148:
      %2385 = arith.constant 1 : i32
      %2386 = arith.extsi %2385 : i32 to i64
      %2387 = llvm.mlir.constant(1 : i64) : i64
      %2388 = llvm.alloca %2387 x i64 : (i64) -> !llvm.ptr
      llvm.store %2386, %2388 : i64, !llvm.ptr
      cf.br ^bb150
      ^bb150:
      %2389 = llvm.load %2388 : !llvm.ptr -> i64
      %2390 = arith.constant 6 : i32
      %2392 = arith.extsi %2390 : i32 to i64
      %2391 = arith.cmpi sle, %2389, %2392 : i64
      cf.cond_br %2391, ^bb151, ^bb152
      ^bb151:
        %2393 = llvm.load %2376 : !llvm.ptr -> i64
        %2395 = llvm.load %2380 : !llvm.ptr -> i64
        %2396 = llvm.load %2388 : !llvm.ptr -> i64
        %2397 = arith.constant 0 : i32
        %2398 = arith.constant 1 : i32
        %2399 = arith.extsi %2397 : i32 to i64
        %2400 = arith.extsi %2398 : i32 to i64
        %2394 = func.call @count_len_res(%2395, %2396, %2399, %2400) : (i64, i64, i64, i64) -> i64
        %2401 = arith.addi %2393, %2394 : i64
        llvm.store %2401, %2376 : i64, !llvm.ptr
        %2402 = llvm.load %2388 : !llvm.ptr -> i64
        %2403 = arith.constant 1 : i32
        %2405 = arith.extsi %2403 : i32 to i64
        %2404 = arith.addi %2402, %2405 : i64
        llvm.store %2404, %2388 : i64, !llvm.ptr
        cf.br ^bb150
      ^bb152:
      %2406 = llvm.load %2380 : !llvm.ptr -> i64
      %2407 = arith.constant 1 : i32
      %2409 = arith.extsi %2407 : i32 to i64
      %2408 = arith.addi %2406, %2409 : i64
      llvm.store %2408, %2380 : i64, !llvm.ptr
      cf.br ^bb147
    ^bb149:
    %2410 = llvm.mlir.addressof @str_0 : !llvm.ptr
    %2411 = llvm.load %2376 : !llvm.ptr -> i64
    %2412 = llvm.call @printf(%2410, %2411) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i64) -> i32
    %2413 = arith.constant 0 : i32
    func.return %2413 : i32
  }
}