Problem 679
FREEFAREA words: Aho-Corasick automaton DP counting f(30). Patterns FREE, FARE, AREA, REEF over alphabet AEFR.
View problem on Project Euler
Performance comparison
| Metric | Our solution | Best known |
| Time complexity | O(n^3) | ? |
| Space complexity | O(n^2) | ? |
| Approach | Flow solution | Not curated |
| Verdict | Unknown |
Flow source
# Project Euler 679
# FREEFAREA words: Aho-Corasick automaton DP counting f(30).
# Patterns FREE, FARE, AREA, REEF over alphabet AEFR.
extern {
function calloc(n: i64, size: i64) -> ptr<void>
function free(p: ptr<void>) -> void
function memset(p: ptr<void>, c: i32, n: i64) -> ptr<void>
}
function main() -> i32 {
# alphabet = "AEFR", patterns = {"FREE", "FARE", "AREA", "REEF"}
# build trie
let next_map: ptr<i32> = calloc(64 * 4, 4)
let fail: ptr<i32> = calloc(64, 4)
let out: ptr<i32> = calloc(64, 4)
for i in 0..(64 * 4) {
next_map[i] = -1
}
let mut nodes: i32 = 1
# patterns as (char_index sequences)
# FREE: F=2, R=3, E=1, E=1
# FARE: F=2, A=0, R=3, E=1
# AREA: A=0, R=3, E=1, A=0
# REEF: R=3, E=1, E=1, F=2
let pat: ptr<i32> = calloc(16, 4)
# FREE
pat[0] = 2
pat[1] = 3
pat[2] = 1
pat[3] = 1
# FARE
pat[4] = 2
pat[5] = 0
pat[6] = 3
pat[7] = 1
# AREA
pat[8] = 0
pat[9] = 3
pat[10] = 1
pat[11] = 0
# REEF
pat[12] = 3
pat[13] = 1
pat[14] = 1
pat[15] = 2
for pi in 0..4 {
let mut v: i32 = 0
for ci in 0..4 {
let c: i32 = pat[pi * 4 + ci]
if next_map[v * 4 + c] < 0 {
next_map[v * 4 + c] = nodes
nodes = nodes + 1
}
v = next_map[v * 4 + c]
}
out[v] = out[v] | (1 << pi)
}
# fail links BFS
let q: ptr<i32> = calloc(64, 4)
let mut qh: i32 = 0
let mut qt: i32 = 0
for c in 0..4 {
if next_map[0 * 4 + c] >= 0 {
fail[next_map[0 * 4 + c]] = 0
q[qt] = next_map[0 * 4 + c]
qt = qt + 1
} else {
next_map[0 * 4 + c] = 0
}
}
while qh < qt {
let v: i32 = q[qh]
qh = qh + 1
out[v] = out[v] | out[fail[v]]
for c in 0..4 {
let u: i32 = next_map[v * 4 + c]
if u >= 0 {
fail[u] = next_map[fail[v] * 4 + c]
q[qt] = u
qt = qt + 1
} else {
next_map[v * 4 + c] = next_map[fail[v] * 4 + c]
}
}
}
let NS: i32 = nodes
let trans: ptr<i32> = calloc(64 * 4, 4)
for s in 0..NS {
for c in 0..4 {
trans[s * 4 + c] = next_map[s * 4 + c]
}
}
# DP: dp[node][mask], mask 0..15
let dp: ptr<i64> = calloc(NS * 16, 8)
let nd: ptr<i64> = calloc(NS * 16, 8)
dp[0 * 16 + 0] = 1
let N: i32 = 30
for len in 0..N {
memset(nd, 0, (NS * 16) * 8)
for s in 0..NS {
for mask in 0..16 {
let cur: i64 = dp[s * 16 + mask]
if cur == 0 {
continue
}
for c in 0..4 {
let ns2: i32 = trans[s * 4 + c]
let o: i32 = out[ns2]
if (o & mask) != 0 {
continue
}
let nm: i32 = mask | o
nd[ns2 * 16 + nm] = nd[ns2 * 16 + nm] + cur
}
}
}
# swap dp and nd
for i in 0..(NS * 16) {
dp[i] = nd[i]
}
}
let mut ans: i64 = 0
for s in 0..NS {
ans = ans + dp[s * 16 + 15]
}
printf("%lld\n", ans)
free(next_map)
free(fail)
free(out)
free(q)
free(pat)
free(trans)
free(dp)
free(nd)
return 0
}
Generated C
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Flow runtime helpers */
typedef struct flow_temp_node { struct flow_temp_node* next; } flow_temp_node;
static flow_temp_node* flow_temp_head = NULL;
static int flow_temp_atexit_set = 0;
__attribute__((unused)) static void flow_temp_free_all(void) {
while (flow_temp_head) {
flow_temp_node* n = flow_temp_head;
flow_temp_head = n->next;
free(n);
}
}
__attribute__((unused)) static void* flow_temp_alloc(size_t nbytes) {
flow_temp_node* node = (flow_temp_node*)malloc(sizeof(flow_temp_node) + nbytes);
if (!node) return NULL;
node->next = flow_temp_head;
flow_temp_head = node;
if (!flow_temp_atexit_set) {
flow_temp_atexit_set = 1;
atexit(flow_temp_free_all);
}
return (void*)(node + 1);
}
#ifndef FLOW_DIAG
#define FLOW_DIAG(msg) fprintf(stderr, "%s", (msg))
#endif
#ifndef FLOW_LOG
#define FLOW_LOG(fmt, ...) printf(fmt, __VA_ARGS__)
#endif
#ifndef FLOW_LOG_EMPTY
#define FLOW_LOG_EMPTY(fmt) printf(fmt)
#endif
static char* flow_strcat(const char* a, const char* b) {
size_t la = strlen(a ? a : ""), lb = strlen(b ? b : "");
char* r = (char*)flow_temp_alloc(la + lb + 1);
if (!r) return NULL;
if (la) memcpy(r, a, la);
if (lb) memcpy(r + la, b, lb);
r[la + lb] = '\0';
return r;
}
#define __flow_in_arr(arr, val) __extension__ ({ \
int _found = 0; \
size_t _n = sizeof(arr)/sizeof((arr)[0]); \
for (size_t _i = 0; _i < _n; _i++) { \
if ((arr)[_i] == (val)) { _found = 1; break; } \
} _found; })
/* Unified fault handler (MISRA #279) — override with -DFLOW_FAULT_HANDLER=fn */
#ifndef FLOW_FAULT_HANDLER
__attribute__((unused)) static inline void flow_fault_handler(const char* msg) {
fprintf(stderr, "flow: %s\n", msg ? msg : "fault");
abort();
#if defined(__GNUC__) || defined(__clang__)
__builtin_unreachable();
#endif
}
#else
#define flow_fault_handler FLOW_FAULT_HANDLER
#endif
#define flow_div_by_zero_handler() flow_fault_handler("division by zero")
#define flow_shift_ub_handler() flow_fault_handler("invalid shift (amount out of range or left-shift of negative)")
#ifndef FLOW_CHECKED_DIV
#define FLOW_CHECKED_DIV(L, R) (((R) != 0) ? ((L) / (R)) : (flow_div_by_zero_handler(), (L) * 0))
#endif
#ifndef FLOW_CHECKED_MOD
#define FLOW_CHECKED_MOD(L, R) (((R) != 0) ? ((L) % (R)) : (flow_div_by_zero_handler(), (L) * 0))
#endif
#ifndef FLOW_CHECKED_SHL
#define FLOW_CHECKED_SHL(L, R) ((((R) >= 0) && ((unsigned long long)(R) < (sizeof(L) * 8ull)) && ((L) >= 0)) ? ((L) << (R)) : (flow_shift_ub_handler(), (L) * 0))
#endif
#ifndef FLOW_CHECKED_SHR
#define FLOW_CHECKED_SHR(L, R) ((((R) >= 0) && ((unsigned long long)(R) < (sizeof(L) * 8ull))) ? ((L) >> (R)) : (flow_shift_ub_handler(), (L) * 0))
#endif
#include <math.h>
void* _ui_state = NULL;
static inline float i32_to_f32(int32_t v) { return (float)v; }
/* Host stub for @gpu kernels (device codegen replaces this). */
static inline int32_t gpu_thread_id(void) { return 0; }
int32_t main(void);
int32_t main(void) {
int32_t* next_map = (int32_t*)(calloc((64 * 4), 4));
int32_t* fail = (int32_t*)(calloc(64, 4));
int32_t* out = (int32_t*)(calloc(64, 4));
int32_t __flow_step_1 = 1;
for (int32_t i = 0; (0 <= (64 * 4)) ? i < (64 * 4) : i > (64 * 4); i += (0 <= (64 * 4)) ? 1 : -1) {
next_map[i] = (-1);
}
int32_t nodes = 1;
int32_t* pat = (int32_t*)(calloc(16, 4));
pat[0] = 2;
pat[1] = 3;
pat[2] = 1;
pat[3] = 1;
pat[4] = 2;
pat[5] = 0;
pat[6] = 3;
pat[7] = 1;
pat[8] = 0;
pat[9] = 3;
pat[10] = 1;
pat[11] = 0;
pat[12] = 3;
pat[13] = 1;
pat[14] = 1;
pat[15] = 2;
int32_t __flow_step_2 = 1;
for (int32_t pi = 0; (0 <= 4) ? pi < 4 : pi > 4; pi += (0 <= 4) ? 1 : -1) {
int32_t v = 0;
int32_t __flow_step_3 = 1;
for (int32_t ci = 0; (0 <= 4) ? ci < 4 : ci > 4; ci += (0 <= 4) ? 1 : -1) {
int32_t c = pat[((pi * 4) + ci)];
if (next_map[((v * 4) + c)] < 0) {
next_map[((v * 4) + c)] = nodes;
nodes = (nodes + 1);
}
v = next_map[((v * 4) + c)];
}
out[v] = (out[v] | FLOW_CHECKED_SHL((1), (pi)));
}
int32_t* q = (int32_t*)(calloc(64, 4));
int32_t qh = 0;
int32_t qt = 0;
int32_t __flow_step_4 = 1;
for (int32_t c = 0; (0 <= 4) ? c < 4 : c > 4; c += (0 <= 4) ? 1 : -1) {
if (next_map[((0 * 4) + c)] >= 0) {
fail[next_map[((0 * 4) + c)]] = 0;
q[qt] = next_map[((0 * 4) + c)];
qt = (qt + 1);
} else {
next_map[((0 * 4) + c)] = 0;
}
}
while (qh < qt) {
int32_t v = q[qh];
qh = (qh + 1);
out[v] = (out[v] | out[fail[v]]);
int32_t __flow_step_5 = 1;
for (int32_t c = 0; (0 <= 4) ? c < 4 : c > 4; c += (0 <= 4) ? 1 : -1) {
int32_t u = next_map[((v * 4) + c)];
if (u >= 0) {
fail[u] = next_map[((fail[v] * 4) + c)];
q[qt] = u;
qt = (qt + 1);
} else {
next_map[((v * 4) + c)] = next_map[((fail[v] * 4) + c)];
}
}
}
int32_t NS = nodes;
int32_t* trans = (int32_t*)(calloc((64 * 4), 4));
int32_t __flow_step_6 = 1;
for (int32_t s = 0; (0 <= NS) ? s < NS : s > NS; s += (0 <= NS) ? 1 : -1) {
int32_t __flow_step_7 = 1;
for (int32_t c = 0; (0 <= 4) ? c < 4 : c > 4; c += (0 <= 4) ? 1 : -1) {
trans[((s * 4) + c)] = next_map[((s * 4) + c)];
}
}
int64_t* dp = (int64_t*)(calloc((NS * 16), 8));
int64_t* nd = (int64_t*)(calloc((NS * 16), 8));
dp[((0 * 16) + 0)] = 1;
int32_t N = 30;
int32_t __flow_step_8 = 1;
for (int32_t len = 0; (0 <= N) ? len < N : len > N; len += (0 <= N) ? 1 : -1) {
memset(nd, 0, ((NS * 16) * 8));
int32_t __flow_step_9 = 1;
for (int32_t s = 0; (0 <= NS) ? s < NS : s > NS; s += (0 <= NS) ? 1 : -1) {
int32_t __flow_step_10 = 1;
for (int32_t mask = 0; (0 <= 16) ? mask < 16 : mask > 16; mask += (0 <= 16) ? 1 : -1) {
int64_t cur = dp[((s * 16) + mask)];
if (cur == 0) {
continue;
}
int32_t __flow_step_11 = 1;
for (int32_t c = 0; (0 <= 4) ? c < 4 : c > 4; c += (0 <= 4) ? 1 : -1) {
int32_t ns2 = trans[((s * 4) + c)];
int32_t o = out[ns2];
if ((o & mask) != 0) {
continue;
}
int32_t nm = (mask | o);
nd[((ns2 * 16) + nm)] = (nd[((ns2 * 16) + nm)] + cur);
}
}
}
int32_t __flow_step_12 = 1;
for (int32_t i = 0; (0 <= (NS * 16)) ? i < (NS * 16) : i > (NS * 16); i += (0 <= (NS * 16)) ? 1 : -1) {
dp[i] = nd[i];
}
}
int64_t ans = 0;
int32_t __flow_step_13 = 1;
for (int32_t s = 0; (0 <= NS) ? s < NS : s > NS; s += (0 <= NS) ? 1 : -1) {
ans = (ans + dp[((s * 16) + 15)]);
}
printf("%lld\n", ans);
free(next_map);
free(fail);
free(out);
free(q);
free(pat);
free(trans);
free(dp);
free(nd);
return 0;
}
Generated MLIR
module {
llvm.func @printf(!llvm.ptr, ...) -> i32
llvm.mlir.global internal constant @str_0("%lld\n\00") {addr_space = 0 : i32} : !llvm.array<6 x i8>
func.func private @calloc(i64, i64) -> !llvm.ptr
func.func private @free(!llvm.ptr) -> ()
func.func private @memset(!llvm.ptr, i32, i64) -> !llvm.ptr
func.func @main() -> i32 {
%1 = arith.constant 64 : i32
%2 = arith.constant 4 : i32
%3 = arith.muli %1, %2 : i32
%4 = arith.constant 4 : i32
%5 = arith.extsi %3 : i32 to i64
%6 = arith.extsi %4 : i32 to i64
%0 = func.call @calloc(%5, %6) : (i64, i64) -> !llvm.ptr
%8 = arith.constant 64 : i32
%9 = arith.constant 4 : i32
%10 = arith.extsi %8 : i32 to i64
%11 = arith.extsi %9 : i32 to i64
%7 = func.call @calloc(%10, %11) : (i64, i64) -> !llvm.ptr
%13 = arith.constant 64 : i32
%14 = arith.constant 4 : i32
%15 = arith.extsi %13 : i32 to i64
%16 = arith.extsi %14 : i32 to i64
%12 = func.call @calloc(%15, %16) : (i64, i64) -> !llvm.ptr
%17 = arith.constant 0 : i32
%18 = arith.constant 64 : i32
%19 = arith.constant 4 : i32
%20 = arith.muli %18, %19 : i32
%21 = arith.index_cast %17 : i32 to index
%22 = arith.index_cast %20 : i32 to index
%24 = arith.constant 1 : index
%25 = arith.constant -1 : index
%26 = arith.cmpi sle, %21, %22 : index
%23 = arith.select %26, %24, %25 : index
cf.br ^bb0(%21 : index)
^bb0(%27: index):
%28 = arith.cmpi slt, %27, %22 : index
%29 = arith.cmpi sgt, %27, %22 : index
%30 = arith.select %26, %28, %29 : i1
cf.cond_br %30, ^bb1(%27 : index), ^bb2(%27 : index)
^bb1(%31: index):
%32 = arith.constant 1 : i32
%34 = arith.constant 0 : i32
%33 = arith.subi %34, %32 : i32
%35 = arith.index_cast %31 : index to i64
%36 = llvm.getelementptr %0[%35] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %33, %36 : i32, !llvm.ptr
%37 = arith.addi %31, %23 : index
cf.br ^bb0(%37 : index)
^bb2(%38: index):
%39 = arith.constant 1 : i32
%40 = llvm.mlir.constant(1 : i64) : i64
%41 = llvm.alloca %40 x i32 : (i64) -> !llvm.ptr
llvm.store %39, %41 : i32, !llvm.ptr
%43 = arith.constant 16 : i32
%44 = arith.constant 4 : 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 = arith.constant 2 : i32
%48 = arith.constant 0 : i32
%49 = arith.extsi %48 : i32 to i64
%50 = llvm.getelementptr %42[%49] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %47, %50 : i32, !llvm.ptr
%51 = arith.constant 3 : i32
%52 = arith.constant 1 : i32
%53 = arith.extsi %52 : i32 to i64
%54 = llvm.getelementptr %42[%53] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %51, %54 : i32, !llvm.ptr
%55 = arith.constant 1 : i32
%56 = arith.constant 2 : i32
%57 = arith.extsi %56 : i32 to i64
%58 = llvm.getelementptr %42[%57] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %55, %58 : i32, !llvm.ptr
%59 = arith.constant 1 : i32
%60 = arith.constant 3 : i32
%61 = arith.extsi %60 : i32 to i64
%62 = llvm.getelementptr %42[%61] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %59, %62 : i32, !llvm.ptr
%63 = arith.constant 2 : i32
%64 = arith.constant 4 : i32
%65 = arith.extsi %64 : i32 to i64
%66 = llvm.getelementptr %42[%65] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %63, %66 : i32, !llvm.ptr
%67 = arith.constant 0 : i32
%68 = arith.constant 5 : i32
%69 = arith.extsi %68 : i32 to i64
%70 = llvm.getelementptr %42[%69] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %67, %70 : i32, !llvm.ptr
%71 = arith.constant 3 : i32
%72 = arith.constant 6 : i32
%73 = arith.extsi %72 : i32 to i64
%74 = llvm.getelementptr %42[%73] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %71, %74 : i32, !llvm.ptr
%75 = arith.constant 1 : i32
%76 = arith.constant 7 : i32
%77 = arith.extsi %76 : i32 to i64
%78 = llvm.getelementptr %42[%77] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %75, %78 : i32, !llvm.ptr
%79 = arith.constant 0 : i32
%80 = arith.constant 8 : i32
%81 = arith.extsi %80 : i32 to i64
%82 = llvm.getelementptr %42[%81] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %79, %82 : i32, !llvm.ptr
%83 = arith.constant 3 : i32
%84 = arith.constant 9 : i32
%85 = arith.extsi %84 : i32 to i64
%86 = llvm.getelementptr %42[%85] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %83, %86 : i32, !llvm.ptr
%87 = arith.constant 1 : i32
%88 = arith.constant 10 : i32
%89 = arith.extsi %88 : i32 to i64
%90 = llvm.getelementptr %42[%89] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %87, %90 : i32, !llvm.ptr
%91 = arith.constant 0 : i32
%92 = arith.constant 11 : i32
%93 = arith.extsi %92 : i32 to i64
%94 = llvm.getelementptr %42[%93] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %91, %94 : i32, !llvm.ptr
%95 = arith.constant 3 : i32
%96 = arith.constant 12 : i32
%97 = arith.extsi %96 : i32 to i64
%98 = llvm.getelementptr %42[%97] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %95, %98 : i32, !llvm.ptr
%99 = arith.constant 1 : i32
%100 = arith.constant 13 : i32
%101 = arith.extsi %100 : i32 to i64
%102 = llvm.getelementptr %42[%101] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %99, %102 : i32, !llvm.ptr
%103 = arith.constant 1 : i32
%104 = arith.constant 14 : i32
%105 = arith.extsi %104 : i32 to i64
%106 = llvm.getelementptr %42[%105] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %103, %106 : i32, !llvm.ptr
%107 = arith.constant 2 : i32
%108 = arith.constant 15 : i32
%109 = arith.extsi %108 : i32 to i64
%110 = llvm.getelementptr %42[%109] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %107, %110 : i32, !llvm.ptr
%111 = arith.constant 0 : i32
%112 = arith.constant 4 : i32
%113 = arith.index_cast %111 : i32 to index
%114 = arith.index_cast %112 : i32 to index
%116 = arith.constant 1 : index
%117 = arith.constant -1 : index
%118 = arith.cmpi sle, %113, %114 : index
%115 = arith.select %118, %116, %117 : index
cf.br ^bb3(%113 : index)
^bb3(%119: index):
%120 = arith.cmpi slt, %119, %114 : index
%121 = arith.cmpi sgt, %119, %114 : index
%122 = arith.select %118, %120, %121 : i1
cf.cond_br %122, ^bb4(%119 : index), ^bb5(%119 : index)
^bb4(%123: index):
%124 = arith.constant 0 : i32
%125 = llvm.mlir.constant(1 : i64) : i64
%126 = llvm.alloca %125 x i32 : (i64) -> !llvm.ptr
llvm.store %124, %126 : i32, !llvm.ptr
%127 = arith.constant 0 : i32
%128 = arith.constant 4 : i32
%129 = arith.index_cast %127 : i32 to index
%130 = arith.index_cast %128 : i32 to index
%132 = arith.constant 1 : index
%133 = arith.constant -1 : index
%134 = arith.cmpi sle, %129, %130 : index
%131 = arith.select %134, %132, %133 : index
cf.br ^bb6(%129 : index)
^bb6(%135: index):
%136 = arith.cmpi slt, %135, %130 : index
%137 = arith.cmpi sgt, %135, %130 : index
%138 = arith.select %134, %136, %137 : i1
cf.cond_br %138, ^bb7(%135 : index), ^bb8(%135 : index)
^bb7(%139: index):
%141 = arith.constant 4 : i32
%143 = arith.index_cast %123 : index to i32
%142 = arith.muli %143, %141 : i32
%145 = arith.index_cast %139 : index to i32
%144 = arith.addi %142, %145 : i32
%146 = arith.extsi %144 : i32 to i64
%147 = llvm.getelementptr %42[%146] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%140 = llvm.load %147 : !llvm.ptr -> i32
%149 = llvm.load %126 : !llvm.ptr -> i32
%150 = arith.constant 4 : i32
%151 = arith.muli %149, %150 : i32
%152 = arith.addi %151, %140 : i32
%153 = arith.extsi %152 : i32 to i64
%154 = llvm.getelementptr %0[%153] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%148 = llvm.load %154 : !llvm.ptr -> i32
%155 = arith.constant 0 : i32
%156 = arith.cmpi slt, %148, %155 : i32
cf.cond_br %156, ^bb9, ^bb10
^bb9:
%157 = llvm.load %41 : !llvm.ptr -> i32
%158 = llvm.load %126 : !llvm.ptr -> i32
%159 = arith.constant 4 : i32
%160 = arith.muli %158, %159 : i32
%161 = arith.addi %160, %140 : i32
%162 = arith.extsi %161 : i32 to i64
%163 = llvm.getelementptr %0[%162] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %157, %163 : i32, !llvm.ptr
%164 = llvm.load %41 : !llvm.ptr -> i32
%165 = arith.constant 1 : i32
%166 = arith.addi %164, %165 : i32
llvm.store %166, %41 : i32, !llvm.ptr
cf.br ^bb11
^bb10:
cf.br ^bb11
^bb11:
%168 = llvm.load %126 : !llvm.ptr -> i32
%169 = arith.constant 4 : i32
%170 = arith.muli %168, %169 : i32
%171 = arith.addi %170, %140 : i32
%172 = arith.extsi %171 : i32 to i64
%173 = llvm.getelementptr %0[%172] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%167 = llvm.load %173 : !llvm.ptr -> i32
llvm.store %167, %126 : i32, !llvm.ptr
%174 = arith.addi %139, %131 : index
cf.br ^bb6(%174 : index)
^bb8(%175: index):
%177 = llvm.load %126 : !llvm.ptr -> i32
%178 = arith.extsi %177 : i32 to i64
%179 = llvm.getelementptr %12[%178] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%176 = llvm.load %179 : !llvm.ptr -> i32
%180 = arith.constant 1 : i32
%182 = arith.index_cast %123 : index to i32
%181 = arith.shli %180, %182 : i32
%183 = arith.ori %176, %181 : i32
%184 = llvm.load %126 : !llvm.ptr -> i32
%185 = arith.extsi %184 : i32 to i64
%186 = llvm.getelementptr %12[%185] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %183, %186 : i32, !llvm.ptr
%187 = arith.addi %123, %115 : index
cf.br ^bb3(%187 : index)
^bb5(%188: index):
%190 = arith.constant 64 : i32
%191 = arith.constant 4 : i32
%192 = arith.extsi %190 : i32 to i64
%193 = arith.extsi %191 : i32 to i64
%189 = func.call @calloc(%192, %193) : (i64, i64) -> !llvm.ptr
%194 = arith.constant 0 : i32
%195 = llvm.mlir.constant(1 : i64) : i64
%196 = llvm.alloca %195 x i32 : (i64) -> !llvm.ptr
llvm.store %194, %196 : i32, !llvm.ptr
%197 = arith.constant 0 : i32
%198 = llvm.mlir.constant(1 : i64) : i64
%199 = llvm.alloca %198 x i32 : (i64) -> !llvm.ptr
llvm.store %197, %199 : i32, !llvm.ptr
%200 = arith.constant 0 : i32
%201 = arith.constant 4 : i32
%202 = arith.index_cast %200 : i32 to index
%203 = arith.index_cast %201 : i32 to index
%205 = arith.constant 1 : index
%206 = arith.constant -1 : index
%207 = arith.cmpi sle, %202, %203 : index
%204 = arith.select %207, %205, %206 : index
cf.br ^bb12(%202 : index)
^bb12(%208: index):
%209 = arith.cmpi slt, %208, %203 : index
%210 = arith.cmpi sgt, %208, %203 : index
%211 = arith.select %207, %209, %210 : i1
cf.cond_br %211, ^bb13(%208 : index), ^bb14(%208 : index)
^bb13(%212: index):
%214 = arith.constant 0 : i32
%215 = arith.constant 4 : i32
%216 = arith.muli %214, %215 : i32
%218 = arith.index_cast %212 : index to i32
%217 = arith.addi %216, %218 : i32
%219 = arith.extsi %217 : i32 to i64
%220 = llvm.getelementptr %0[%219] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%213 = llvm.load %220 : !llvm.ptr -> i32
%221 = arith.constant 0 : i32
%222 = arith.cmpi sge, %213, %221 : i32
cf.cond_br %222, ^bb15, ^bb16
^bb15:
%223 = arith.constant 0 : i32
%225 = arith.constant 0 : i32
%226 = arith.constant 4 : i32
%227 = arith.muli %225, %226 : i32
%229 = arith.index_cast %212 : index to i32
%228 = arith.addi %227, %229 : i32
%230 = arith.extsi %228 : i32 to i64
%231 = llvm.getelementptr %0[%230] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%224 = llvm.load %231 : !llvm.ptr -> i32
%232 = arith.extsi %224 : i32 to i64
%233 = llvm.getelementptr %7[%232] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %223, %233 : i32, !llvm.ptr
%235 = arith.constant 0 : i32
%236 = arith.constant 4 : i32
%237 = arith.muli %235, %236 : i32
%239 = arith.index_cast %212 : index to i32
%238 = arith.addi %237, %239 : i32
%240 = arith.extsi %238 : i32 to i64
%241 = llvm.getelementptr %0[%240] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%234 = llvm.load %241 : !llvm.ptr -> i32
%242 = llvm.load %199 : !llvm.ptr -> i32
%243 = arith.extsi %242 : i32 to i64
%244 = llvm.getelementptr %189[%243] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %234, %244 : i32, !llvm.ptr
%245 = llvm.load %199 : !llvm.ptr -> i32
%246 = arith.constant 1 : i32
%247 = arith.addi %245, %246 : i32
llvm.store %247, %199 : i32, !llvm.ptr
cf.br ^bb17
^bb16:
%248 = arith.constant 0 : i32
%249 = arith.constant 0 : i32
%250 = arith.constant 4 : i32
%251 = arith.muli %249, %250 : i32
%253 = arith.index_cast %212 : index to i32
%252 = arith.addi %251, %253 : i32
%254 = arith.extsi %252 : i32 to i64
%255 = llvm.getelementptr %0[%254] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %248, %255 : i32, !llvm.ptr
cf.br ^bb17
^bb17:
%256 = arith.addi %212, %204 : index
cf.br ^bb12(%256 : index)
^bb14(%257: index):
cf.br ^bb18
^bb18:
%258 = llvm.load %196 : !llvm.ptr -> i32
%259 = llvm.load %199 : !llvm.ptr -> i32
%260 = arith.cmpi slt, %258, %259 : i32
cf.cond_br %260, ^bb19, ^bb20
^bb19:
%262 = llvm.load %196 : !llvm.ptr -> i32
%263 = arith.extsi %262 : i32 to i64
%264 = llvm.getelementptr %189[%263] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%261 = llvm.load %264 : !llvm.ptr -> i32
%265 = llvm.load %196 : !llvm.ptr -> i32
%266 = arith.constant 1 : i32
%267 = arith.addi %265, %266 : i32
llvm.store %267, %196 : i32, !llvm.ptr
%269 = arith.extsi %261 : i32 to i64
%270 = llvm.getelementptr %12[%269] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%268 = llvm.load %270 : !llvm.ptr -> i32
%273 = arith.extsi %261 : i32 to i64
%274 = llvm.getelementptr %7[%273] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%272 = llvm.load %274 : !llvm.ptr -> i32
%275 = arith.extsi %272 : i32 to i64
%276 = llvm.getelementptr %12[%275] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%271 = llvm.load %276 : !llvm.ptr -> i32
%277 = arith.ori %268, %271 : i32
%278 = arith.extsi %261 : i32 to i64
%279 = llvm.getelementptr %12[%278] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %277, %279 : i32, !llvm.ptr
%280 = arith.constant 0 : i32
%281 = arith.constant 4 : i32
%282 = arith.index_cast %280 : i32 to index
%283 = arith.index_cast %281 : i32 to index
%285 = arith.constant 1 : index
%286 = arith.constant -1 : index
%287 = arith.cmpi sle, %282, %283 : index
%284 = arith.select %287, %285, %286 : index
cf.br ^bb21(%282 : index)
^bb21(%288: index):
%289 = arith.cmpi slt, %288, %283 : index
%290 = arith.cmpi sgt, %288, %283 : index
%291 = arith.select %287, %289, %290 : i1
cf.cond_br %291, ^bb22(%288 : index), ^bb23(%288 : index)
^bb22(%292: index):
%294 = arith.constant 4 : i32
%295 = arith.muli %261, %294 : i32
%297 = arith.index_cast %292 : index to i32
%296 = arith.addi %295, %297 : i32
%298 = arith.extsi %296 : i32 to i64
%299 = llvm.getelementptr %0[%298] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%293 = llvm.load %299 : !llvm.ptr -> i32
%300 = arith.constant 0 : i32
%301 = arith.cmpi sge, %293, %300 : i32
cf.cond_br %301, ^bb24, ^bb25
^bb24:
%304 = arith.extsi %261 : i32 to i64
%305 = llvm.getelementptr %7[%304] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%303 = llvm.load %305 : !llvm.ptr -> i32
%306 = arith.constant 4 : i32
%307 = arith.muli %303, %306 : i32
%309 = arith.index_cast %292 : index to i32
%308 = arith.addi %307, %309 : i32
%310 = arith.extsi %308 : i32 to i64
%311 = llvm.getelementptr %0[%310] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%302 = llvm.load %311 : !llvm.ptr -> i32
%312 = arith.extsi %293 : i32 to i64
%313 = llvm.getelementptr %7[%312] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %302, %313 : i32, !llvm.ptr
%314 = llvm.load %199 : !llvm.ptr -> i32
%315 = arith.extsi %314 : i32 to i64
%316 = llvm.getelementptr %189[%315] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %293, %316 : i32, !llvm.ptr
%317 = llvm.load %199 : !llvm.ptr -> i32
%318 = arith.constant 1 : i32
%319 = arith.addi %317, %318 : i32
llvm.store %319, %199 : i32, !llvm.ptr
cf.br ^bb26
^bb25:
%322 = arith.extsi %261 : i32 to i64
%323 = llvm.getelementptr %7[%322] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%321 = llvm.load %323 : !llvm.ptr -> i32
%324 = arith.constant 4 : i32
%325 = arith.muli %321, %324 : i32
%327 = arith.index_cast %292 : index to i32
%326 = arith.addi %325, %327 : i32
%328 = arith.extsi %326 : i32 to i64
%329 = llvm.getelementptr %0[%328] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%320 = llvm.load %329 : !llvm.ptr -> i32
%330 = arith.constant 4 : i32
%331 = arith.muli %261, %330 : i32
%333 = arith.index_cast %292 : index to i32
%332 = arith.addi %331, %333 : i32
%334 = arith.extsi %332 : i32 to i64
%335 = llvm.getelementptr %0[%334] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %320, %335 : i32, !llvm.ptr
cf.br ^bb26
^bb26:
%336 = arith.addi %292, %284 : index
cf.br ^bb21(%336 : index)
^bb23(%337: index):
cf.br ^bb18
^bb20:
%338 = llvm.load %41 : !llvm.ptr -> i32
%340 = arith.constant 64 : i32
%341 = arith.constant 4 : i32
%342 = arith.muli %340, %341 : i32
%343 = arith.constant 4 : i32
%344 = arith.extsi %342 : i32 to i64
%345 = arith.extsi %343 : i32 to i64
%339 = func.call @calloc(%344, %345) : (i64, i64) -> !llvm.ptr
%346 = arith.constant 0 : i32
%347 = arith.index_cast %346 : i32 to index
%348 = arith.index_cast %338 : i32 to index
%350 = arith.constant 1 : index
%351 = arith.constant -1 : index
%352 = arith.cmpi sle, %347, %348 : index
%349 = arith.select %352, %350, %351 : index
cf.br ^bb27(%347 : index)
^bb27(%353: index):
%354 = arith.cmpi slt, %353, %348 : index
%355 = arith.cmpi sgt, %353, %348 : index
%356 = arith.select %352, %354, %355 : i1
cf.cond_br %356, ^bb28(%353 : index), ^bb29(%353 : index)
^bb28(%357: index):
%358 = arith.constant 0 : i32
%359 = arith.constant 4 : i32
%360 = arith.index_cast %358 : i32 to index
%361 = arith.index_cast %359 : i32 to index
%363 = arith.constant 1 : index
%364 = arith.constant -1 : index
%365 = arith.cmpi sle, %360, %361 : index
%362 = arith.select %365, %363, %364 : index
cf.br ^bb30(%360 : index)
^bb30(%366: index):
%367 = arith.cmpi slt, %366, %361 : index
%368 = arith.cmpi sgt, %366, %361 : index
%369 = arith.select %365, %367, %368 : i1
cf.cond_br %369, ^bb31(%366 : index), ^bb32(%366 : index)
^bb31(%370: index):
%372 = arith.constant 4 : i32
%374 = arith.index_cast %357 : index to i32
%373 = arith.muli %374, %372 : i32
%376 = arith.index_cast %370 : index to i32
%375 = arith.addi %373, %376 : i32
%377 = arith.extsi %375 : i32 to i64
%378 = llvm.getelementptr %0[%377] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%371 = llvm.load %378 : !llvm.ptr -> i32
%379 = arith.constant 4 : i32
%381 = arith.index_cast %357 : index to i32
%380 = arith.muli %381, %379 : i32
%383 = arith.index_cast %370 : index to i32
%382 = arith.addi %380, %383 : i32
%384 = arith.extsi %382 : i32 to i64
%385 = llvm.getelementptr %339[%384] : (!llvm.ptr, i64) -> !llvm.ptr, i32
llvm.store %371, %385 : i32, !llvm.ptr
%386 = arith.addi %370, %362 : index
cf.br ^bb30(%386 : index)
^bb32(%387: index):
%388 = arith.addi %357, %349 : index
cf.br ^bb27(%388 : index)
^bb29(%389: index):
%391 = arith.constant 16 : i32
%392 = arith.muli %338, %391 : i32
%393 = arith.constant 8 : i32
%394 = arith.extsi %392 : i32 to i64
%395 = arith.extsi %393 : i32 to i64
%390 = func.call @calloc(%394, %395) : (i64, i64) -> !llvm.ptr
%397 = arith.constant 16 : i32
%398 = arith.muli %338, %397 : i32
%399 = arith.constant 8 : i32
%400 = arith.extsi %398 : i32 to i64
%401 = arith.extsi %399 : i32 to i64
%396 = func.call @calloc(%400, %401) : (i64, i64) -> !llvm.ptr
%402 = arith.constant 1 : i32
%403 = arith.constant 0 : i32
%404 = arith.constant 16 : i32
%405 = arith.muli %403, %404 : i32
%406 = arith.constant 0 : i32
%407 = arith.addi %405, %406 : i32
%408 = arith.extsi %402 : i32 to i64
%409 = arith.extsi %407 : i32 to i64
%410 = llvm.getelementptr %390[%409] : (!llvm.ptr, i64) -> !llvm.ptr, i64
llvm.store %408, %410 : i64, !llvm.ptr
%411 = arith.constant 30 : i32
%412 = arith.constant 0 : i32
%413 = arith.index_cast %412 : i32 to index
%414 = arith.index_cast %411 : i32 to index
%416 = arith.constant 1 : index
%417 = arith.constant -1 : index
%418 = arith.cmpi sle, %413, %414 : index
%415 = arith.select %418, %416, %417 : index
cf.br ^bb33(%413 : index)
^bb33(%419: index):
%420 = arith.cmpi slt, %419, %414 : index
%421 = arith.cmpi sgt, %419, %414 : index
%422 = arith.select %418, %420, %421 : i1
cf.cond_br %422, ^bb34(%419 : index), ^bb35(%419 : index)
^bb34(%423: index):
%425 = arith.constant 0 : i32
%426 = arith.constant 16 : i32
%427 = arith.muli %338, %426 : i32
%428 = arith.constant 8 : i32
%429 = arith.muli %427, %428 : i32
%430 = arith.extsi %429 : i32 to i64
%424 = func.call @memset(%396, %425, %430) : (!llvm.ptr, i32, i64) -> !llvm.ptr
%431 = arith.constant 0 : i32
%432 = arith.index_cast %431 : i32 to index
%433 = arith.index_cast %338 : i32 to index
%435 = arith.constant 1 : index
%436 = arith.constant -1 : index
%437 = arith.cmpi sle, %432, %433 : index
%434 = arith.select %437, %435, %436 : index
cf.br ^bb36(%432 : index)
^bb36(%438: index):
%439 = arith.cmpi slt, %438, %433 : index
%440 = arith.cmpi sgt, %438, %433 : index
%441 = arith.select %437, %439, %440 : i1
cf.cond_br %441, ^bb37(%438 : index), ^bb38(%438 : index)
^bb37(%442: index):
%443 = arith.constant 0 : i32
%444 = arith.constant 16 : i32
%445 = arith.index_cast %443 : i32 to index
%446 = arith.index_cast %444 : i32 to index
%448 = arith.constant 1 : index
%449 = arith.constant -1 : index
%450 = arith.cmpi sle, %445, %446 : index
%447 = arith.select %450, %448, %449 : index
cf.br ^bb39(%445 : index)
^bb39(%451: index):
%452 = arith.cmpi slt, %451, %446 : index
%453 = arith.cmpi sgt, %451, %446 : index
%454 = arith.select %450, %452, %453 : i1
cf.cond_br %454, ^bb40(%451 : index), ^bb41(%451 : index)
^bb40(%455: index):
%457 = arith.constant 16 : i32
%459 = arith.index_cast %442 : index to i32
%458 = arith.muli %459, %457 : i32
%461 = arith.index_cast %455 : index to i32
%460 = arith.addi %458, %461 : i32
%462 = arith.extsi %460 : i32 to i64
%463 = llvm.getelementptr %390[%462] : (!llvm.ptr, i64) -> !llvm.ptr, i64
%456 = llvm.load %463 : !llvm.ptr -> i64
%464 = arith.constant 0 : i32
%466 = arith.extsi %464 : i32 to i64
%465 = arith.cmpi eq, %456, %466 : i64
cf.cond_br %465, ^bb42, ^bb43
^bb42:
%467 = arith.addi %455, %447 : index
cf.br ^bb39(%467 : index)
^bb43:
cf.br ^bb44
^bb44:
%468 = arith.constant 0 : i32
%469 = arith.constant 4 : i32
%470 = arith.index_cast %468 : i32 to index
%471 = arith.index_cast %469 : i32 to index
%473 = arith.constant 1 : index
%474 = arith.constant -1 : index
%475 = arith.cmpi sle, %470, %471 : index
%472 = arith.select %475, %473, %474 : index
cf.br ^bb45(%470 : index)
^bb45(%476: index):
%477 = arith.cmpi slt, %476, %471 : index
%478 = arith.cmpi sgt, %476, %471 : index
%479 = arith.select %475, %477, %478 : i1
cf.cond_br %479, ^bb46(%476 : index), ^bb47(%476 : index)
^bb46(%480: index):
%482 = arith.constant 4 : i32
%484 = arith.index_cast %442 : index to i32
%483 = arith.muli %484, %482 : i32
%486 = arith.index_cast %480 : index to i32
%485 = arith.addi %483, %486 : i32
%487 = arith.extsi %485 : i32 to i64
%488 = llvm.getelementptr %339[%487] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%481 = llvm.load %488 : !llvm.ptr -> i32
%490 = arith.extsi %481 : i32 to i64
%491 = llvm.getelementptr %12[%490] : (!llvm.ptr, i64) -> !llvm.ptr, i32
%489 = llvm.load %491 : !llvm.ptr -> i32
%493 = arith.index_cast %455 : index to i32
%492 = arith.andi %489, %493 : i32
%494 = arith.constant 0 : i32
%495 = arith.cmpi ne, %492, %494 : i32
cf.cond_br %495, ^bb48, ^bb49
^bb48:
%496 = arith.addi %480, %472 : index
cf.br ^bb45(%496 : index)
^bb49:
cf.br ^bb50
^bb50:
%498 = arith.index_cast %455 : index to i32
%497 = arith.ori %498, %489 : i32
%500 = arith.constant 16 : i32
%501 = arith.muli %481, %500 : i32
%502 = arith.addi %501, %497 : i32
%503 = arith.extsi %502 : i32 to i64
%504 = llvm.getelementptr %396[%503] : (!llvm.ptr, i64) -> !llvm.ptr, i64
%499 = llvm.load %504 : !llvm.ptr -> i64
%505 = arith.addi %499, %456 : i64
%506 = arith.constant 16 : i32
%507 = arith.muli %481, %506 : i32
%508 = arith.addi %507, %497 : i32
%509 = arith.extsi %508 : i32 to i64
%510 = llvm.getelementptr %396[%509] : (!llvm.ptr, i64) -> !llvm.ptr, i64
llvm.store %505, %510 : i64, !llvm.ptr
%511 = arith.addi %480, %472 : index
cf.br ^bb45(%511 : index)
^bb47(%512: index):
%513 = arith.addi %455, %447 : index
cf.br ^bb39(%513 : index)
^bb41(%514: index):
%515 = arith.addi %442, %434 : index
cf.br ^bb36(%515 : index)
^bb38(%516: index):
%517 = arith.constant 0 : i32
%518 = arith.constant 16 : i32
%519 = arith.muli %338, %518 : i32
%520 = arith.index_cast %517 : i32 to index
%521 = arith.index_cast %519 : i32 to index
%523 = arith.constant 1 : index
%524 = arith.constant -1 : index
%525 = arith.cmpi sle, %520, %521 : index
%522 = arith.select %525, %523, %524 : index
cf.br ^bb51(%520 : index)
^bb51(%526: index):
%527 = arith.cmpi slt, %526, %521 : index
%528 = arith.cmpi sgt, %526, %521 : index
%529 = arith.select %525, %527, %528 : i1
cf.cond_br %529, ^bb52(%526 : index), ^bb53(%526 : index)
^bb52(%530: index):
%532 = arith.index_cast %530 : index to i64
%533 = llvm.getelementptr %396[%532] : (!llvm.ptr, i64) -> !llvm.ptr, i64
%531 = llvm.load %533 : !llvm.ptr -> i64
%534 = arith.index_cast %530 : index to i64
%535 = llvm.getelementptr %390[%534] : (!llvm.ptr, i64) -> !llvm.ptr, i64
llvm.store %531, %535 : i64, !llvm.ptr
%536 = arith.addi %530, %522 : index
cf.br ^bb51(%536 : index)
^bb53(%537: index):
%538 = arith.addi %423, %415 : index
cf.br ^bb33(%538 : index)
^bb35(%539: index):
%540 = arith.constant 0 : i32
%541 = arith.extsi %540 : i32 to i64
%542 = llvm.mlir.constant(1 : i64) : i64
%543 = llvm.alloca %542 x i64 : (i64) -> !llvm.ptr
llvm.store %541, %543 : i64, !llvm.ptr
%544 = arith.constant 0 : i32
%545 = arith.index_cast %544 : i32 to index
%546 = arith.index_cast %338 : i32 to index
%548 = arith.constant 1 : index
%549 = arith.constant -1 : index
%550 = arith.cmpi sle, %545, %546 : index
%547 = arith.select %550, %548, %549 : index
cf.br ^bb54(%545 : index)
^bb54(%551: index):
%552 = arith.cmpi slt, %551, %546 : index
%553 = arith.cmpi sgt, %551, %546 : index
%554 = arith.select %550, %552, %553 : i1
cf.cond_br %554, ^bb55(%551 : index), ^bb56(%551 : index)
^bb55(%555: index):
%556 = llvm.load %543 : !llvm.ptr -> i64
%558 = arith.constant 16 : i32
%560 = arith.index_cast %555 : index to i32
%559 = arith.muli %560, %558 : i32
%561 = arith.constant 15 : i32
%562 = arith.addi %559, %561 : i32
%563 = arith.extsi %562 : i32 to i64
%564 = llvm.getelementptr %390[%563] : (!llvm.ptr, i64) -> !llvm.ptr, i64
%557 = llvm.load %564 : !llvm.ptr -> i64
%565 = arith.addi %556, %557 : i64
llvm.store %565, %543 : i64, !llvm.ptr
%566 = arith.addi %555, %547 : index
cf.br ^bb54(%566 : index)
^bb56(%567: index):
%568 = llvm.mlir.addressof @str_0 : !llvm.ptr
%569 = llvm.load %543 : !llvm.ptr -> i64
%570 = llvm.call @printf(%568, %569) vararg(!llvm.func<i32 (ptr, ...)>) : (!llvm.ptr, i64) -> i32
func.call @free(%0) : (!llvm.ptr) -> ()
func.call @free(%7) : (!llvm.ptr) -> ()
func.call @free(%12) : (!llvm.ptr) -> ()
func.call @free(%189) : (!llvm.ptr) -> ()
func.call @free(%42) : (!llvm.ptr) -> ()
func.call @free(%339) : (!llvm.ptr) -> ()
func.call @free(%390) : (!llvm.ptr) -> ()
func.call @free(%396) : (!llvm.ptr) -> ()
%579 = arith.constant 0 : i32
func.return %579 : i32
}
}