; LLVM IR from huawei-noah/bolt :: inference/examples/c_api (c_input_method)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@useFileStream = external global i32, align 4
@modelPath = external global ptr, align 8
@algorithmMapPath = external global ptr, align 8
@affinity = external global i32, align 4
@__const.main.data = external hidden unnamed_addr constant [4 x [1 x i32]], align 16
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca [4 x [1 x i32]], align 16
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = call i32 @ParseOptions(i32 noundef %36, ptr noundef %37)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %39 = load i32, ptr @useFileStream, align 4, !tbaa !5
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %49

41:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %42 = load ptr, ptr @modelPath, align 8, !tbaa !9
  %43 = call ptr @BuildFileStream(ptr noundef %42)
  store ptr %43, ptr %8, align 8, !tbaa !9
  %44 = load i32, ptr @useFileStream, align 4, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !9
  %46 = load ptr, ptr @algorithmMapPath, align 8, !tbaa !9
  %47 = load i32, ptr @affinity, align 4, !tbaa !5
  %48 = call i32 @CreateInference(i32 noundef %44, ptr noundef %45, ptr noundef %46, i32 noundef %47, ptr noundef %6, ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %55

49:                                               ; preds = %2
  %50 = load i32, ptr @useFileStream, align 4, !tbaa !5
  %51 = load ptr, ptr @modelPath, align 8, !tbaa !9
  %52 = load ptr, ptr @algorithmMapPath, align 8, !tbaa !9
  %53 = load i32, ptr @affinity, align 4, !tbaa !5
  %54 = call i32 @CreateInference(i32 noundef %50, ptr noundef %51, ptr noundef %52, i32 noundef %53, ptr noundef %6, ptr noundef %7)
  br label %55

55:                                               ; preds = %49, %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  %57 = call i32 @CreateInputTensorDesc(ptr noundef %56, ptr noundef %9, ptr noundef %16, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15)
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = mul i64 8, %59
  %61 = call noalias ptr @malloc(i64 noundef %60) #8
  store ptr %61, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %62 = load ptr, ptr %7, align 8, !tbaa !9
  %63 = call i32 @CreateOutputTensorDesc(ptr noundef %62, ptr noundef %18, ptr noundef %25, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24)
  %64 = load i32, ptr %18, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = mul i64 8, %65
  %67 = call noalias ptr @malloc(i64 noundef %66) #8
  store ptr %67, ptr %26, align 8, !tbaa !9
  %68 = load i32, ptr %18, align 4, !tbaa !5
  %69 = load ptr, ptr %25, align 8, !tbaa !9
  %70 = load ptr, ptr %19, align 8, !tbaa !9
  %71 = load ptr, ptr %20, align 8, !tbaa !9
  %72 = load ptr, ptr %21, align 8, !tbaa !9
  %73 = load ptr, ptr %22, align 8, !tbaa !9
  %74 = load ptr, ptr %23, align 8, !tbaa !9
  %75 = load ptr, ptr %24, align 8, !tbaa !9
  %76 = call i32 @MallocTensor(i32 noundef %68, ptr noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef %72, ptr noundef %73, ptr noundef %74, ptr noundef %75, ptr noundef %27)
  %77 = load i32, ptr %18, align 4, !tbaa !5
  %78 = load ptr, ptr %25, align 8, !tbaa !9
  %79 = load ptr, ptr %19, align 8, !tbaa !9
  %80 = load ptr, ptr %20, align 8, !tbaa !9
  %81 = load ptr, ptr %21, align 8, !tbaa !9
  %82 = load ptr, ptr %22, align 8, !tbaa !9
  %83 = load ptr, ptr %23, align 8, !tbaa !9
  %84 = load ptr, ptr %24, align 8, !tbaa !9
  %85 = load ptr, ptr %27, align 8, !tbaa !9
  %86 = call i32 @InitTensor(i32 noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80, ptr noundef %81, ptr noundef %82, ptr noundef %83, ptr noundef %84, ptr noundef %85, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 @__const.main.data, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %256, %55
  %88 = load i32, ptr %29, align 4, !tbaa !5
  %89 = zext i32 %88 to i64
  %90 = icmp ult i64 %89, 4
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 2, ptr %30, align 4
  br label %259

92:                                               ; preds = %87
  %93 = load i32, ptr %29, align 4, !tbaa !5
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %93)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 1, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %210, %92
  %96 = load i32, ptr %32, align 4, !tbaa !5
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 5, ptr %30, align 4
  br label %213

100:                                              ; preds = %95
  %101 = load ptr, ptr %16, align 8, !tbaa !9
  %102 = load i32, ptr %32, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = call i32 @strcmp(ptr noundef %105, ptr noundef @.str.1) #9
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %122

108:                                              ; preds = %100
  %109 = load i32, ptr %29, align 4, !tbaa !5
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds [4 x [1 x i32]], ptr %28, i64 0, i64 %110
  %112 = getelementptr inbounds [1 x i32], ptr %111, i64 0, i64 0
  %113 = load ptr, ptr %17, align 8, !tbaa !9
  %114 = load i32, ptr %32, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds ptr, ptr %113, i64 %115
  store ptr %112, ptr %116, align 8, !tbaa !9
  %117 = load i32, ptr %31, align 4, !tbaa !5
  %118 = load ptr, ptr %11, align 8, !tbaa !9
  %119 = load i32, ptr %32, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %118, i64 %120
  store i32 %117, ptr %121, align 4, !tbaa !5
  br label %209

122:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %123 = load ptr, ptr %16, align 8, !tbaa !9
  %124 = load i32, ptr %32, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %123, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = call i32 @strcmp(ptr noundef %127, ptr noundef @.str.2) #9
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %122
  store ptr @.str.3, ptr %33, align 8, !tbaa !9
  br label %148

131:                                              ; preds = %122
  %132 = load ptr, ptr %16, align 8, !tbaa !9
  %133 = load i32, ptr %32, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds ptr, ptr %132, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = call i32 @strcmp(ptr noundef %136, ptr noundef @.str.4) #9
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %140

139:                                              ; preds = %131
  store ptr @.str.5, ptr %33, align 8, !tbaa !9
  br label %147

140:                                              ; preds = %131
  %141 = load ptr, ptr %16, align 8, !tbaa !9
  %142 = load i32, ptr %32, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %141, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %145)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %30, align 4
  br label %206

147:                                              ; preds = %139
  br label %148

148:                                              ; preds = %147, %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  store i32 -1, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store i32 0, ptr %35, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %166, %148
  %150 = load i32, ptr %35, align 4, !tbaa !5
  %151 = load i32, ptr %18, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 8, ptr %30, align 4
  br label %169

154:                                              ; preds = %149
  %155 = load ptr, ptr %25, align 8, !tbaa !9
  %156 = load i32, ptr %35, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds ptr, ptr %155, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = load ptr, ptr %33, align 8, !tbaa !9
  %161 = call i32 @strcmp(ptr noundef %159, ptr noundef %160) #9
  %162 = icmp eq i32 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %154
  %164 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %164, ptr %34, align 4, !tbaa !5
  store i32 8, ptr %30, align 4
  br label %169

165:                                              ; preds = %154
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %35, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %35, align 4, !tbaa !5
  br label %149, !llvm.loop !11

169:                                              ; preds = %163, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %34, align 4, !tbaa !5
  %172 = icmp eq i32 %171, -1
  br i1 %172, label %173, label %181

173:                                              ; preds = %170
  %174 = load ptr, ptr %33, align 8, !tbaa !9
  %175 = load ptr, ptr %16, align 8, !tbaa !9
  %176 = load i32, ptr %32, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds ptr, ptr %175, i64 %177
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %174, ptr noundef %179)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %30, align 4
  br label %205

181:                                              ; preds = %170
  %182 = load i32, ptr %29, align 4, !tbaa !5
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %194

184:                                              ; preds = %181
  %185 = load ptr, ptr %27, align 8, !tbaa !9
  %186 = load i32, ptr %34, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds ptr, ptr %185, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !9
  %190 = load ptr, ptr %17, align 8, !tbaa !9
  %191 = load i32, ptr %32, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds ptr, ptr %190, i64 %192
  store ptr %189, ptr %193, align 8, !tbaa !9
  br label %204

194:                                              ; preds = %181
  %195 = load ptr, ptr %26, align 8, !tbaa !9
  %196 = load i32, ptr %34, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %195, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !9
  %200 = load ptr, ptr %17, align 8, !tbaa !9
  %201 = load i32, ptr %32, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds ptr, ptr %200, i64 %202
  store ptr %199, ptr %203, align 8, !tbaa !9
  br label %204

204:                                              ; preds = %194, %184
  store i32 0, ptr %30, align 4
  br label %205

205:                                              ; preds = %204, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %206

206:                                              ; preds = %205, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  %207 = load i32, ptr %30, align 4
  switch i32 %207, label %213 [
    i32 0, label %208
  ]

208:                                              ; preds = %206
  br label %209

209:                                              ; preds = %208, %108
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %32, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %32, align 4, !tbaa !5
  br label %95, !llvm.loop !13

213:                                              ; preds = %206, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  %214 = load i32, ptr %30, align 4
  switch i32 %214, label %253 [
    i32 5, label %215
  ]

215:                                              ; preds = %213
  %216 = load i32, ptr %9, align 4, !tbaa !5
  %217 = load ptr, ptr %16, align 8, !tbaa !9
  %218 = load ptr, ptr %10, align 8, !tbaa !9
  %219 = load ptr, ptr %11, align 8, !tbaa !9
  %220 = load ptr, ptr %12, align 8, !tbaa !9
  %221 = load ptr, ptr %13, align 8, !tbaa !9
  %222 = load ptr, ptr %14, align 8, !tbaa !9
  %223 = load ptr, ptr %15, align 8, !tbaa !9
  %224 = load ptr, ptr %17, align 8, !tbaa !9
  %225 = call i32 @PrintTensor(i32 noundef %216, ptr noundef %217, ptr noundef %218, ptr noundef %219, ptr noundef %220, ptr noundef %221, ptr noundef %222, ptr noundef %223, ptr noundef %224, ptr noundef @.str.8, i32 noundef 8)
  %226 = load ptr, ptr %6, align 8, !tbaa !9
  %227 = load i32, ptr %9, align 4, !tbaa !5
  %228 = load ptr, ptr %16, align 8, !tbaa !9
  %229 = load ptr, ptr %10, align 8, !tbaa !9
  %230 = load ptr, ptr %11, align 8, !tbaa !9
  %231 = load ptr, ptr %12, align 8, !tbaa !9
  %232 = load ptr, ptr %13, align 8, !tbaa !9
  %233 = load ptr, ptr %14, align 8, !tbaa !9
  %234 = load ptr, ptr %15, align 8, !tbaa !9
  call void @ResizeModelInput(ptr noundef %226, i32 noundef %227, ptr noundef %228, ptr noundef %229, ptr noundef %230, ptr noundef %231, ptr noundef %232, ptr noundef %233, ptr noundef %234)
  %235 = load ptr, ptr %6, align 8, !tbaa !9
  %236 = load ptr, ptr %7, align 8, !tbaa !9
  %237 = load i32, ptr %9, align 4, !tbaa !5
  %238 = load ptr, ptr %16, align 8, !tbaa !9
  %239 = load ptr, ptr %17, align 8, !tbaa !9
  call void @RunModel(ptr noundef %235, ptr noundef %236, i32 noundef %237, ptr noundef %238, ptr noundef %239)
  %240 = load ptr, ptr %7, align 8, !tbaa !9
  %241 = load i32, ptr %18, align 4, !tbaa !5
  %242 = load ptr, ptr %26, align 8, !tbaa !9
  call void @GetOutputDataFromResultHandle(ptr noundef %240, i32 noundef %241, ptr noundef %242)
  %243 = load i32, ptr %18, align 4, !tbaa !5
  %244 = load ptr, ptr %25, align 8, !tbaa !9
  %245 = load ptr, ptr %19, align 8, !tbaa !9
  %246 = load ptr, ptr %20, align 8, !tbaa !9
  %247 = load ptr, ptr %21, align 8, !tbaa !9
  %248 = load ptr, ptr %22, align 8, !tbaa !9
  %249 = load ptr, ptr %23, align 8, !tbaa !9
  %250 = load ptr, ptr %24, align 8, !tbaa !9
  %251 = load ptr, ptr %26, align 8, !tbaa !9
  %252 = call i32 @PrintTensor(i32 noundef %243, ptr noundef %244, ptr noundef %245, ptr noundef %246, ptr noundef %247, ptr noundef %248, ptr noundef %249, ptr noundef %250, ptr noundef %251, ptr noundef @.str.9, i32 noundef 8)
  store i32 0, ptr %30, align 4
  br label %253

253:                                              ; preds = %215, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  %254 = load i32, ptr %30, align 4
  switch i32 %254, label %259 [
    i32 0, label %255
  ]

255:                                              ; preds = %253
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %29, align 4, !tbaa !5
  %258 = add i32 %257, 1
  store i32 %258, ptr %29, align 4, !tbaa !5
  br label %87, !llvm.loop !14

259:                                              ; preds = %253, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  %260 = load i32, ptr %30, align 4
  switch i32 %260, label %285 [
    i32 2, label %261
  ]

261:                                              ; preds = %259
  %262 = load i32, ptr %9, align 4, !tbaa !5
  %263 = load ptr, ptr %16, align 8, !tbaa !9
  %264 = load ptr, ptr %10, align 8, !tbaa !9
  %265 = load ptr, ptr %11, align 8, !tbaa !9
  %266 = load ptr, ptr %12, align 8, !tbaa !9
  %267 = load ptr, ptr %13, align 8, !tbaa !9
  %268 = load ptr, ptr %14, align 8, !tbaa !9
  %269 = load ptr, ptr %15, align 8, !tbaa !9
  %270 = call i32 @FreeTensorDesc(i32 noundef %262, ptr noundef %263, ptr noundef %264, ptr noundef %265, ptr noundef %266, ptr noundef %267, ptr noundef %268, ptr noundef %269)
  %271 = load ptr, ptr %17, align 8, !tbaa !9
  call void @free(ptr noundef %271) #7
  %272 = load i32, ptr %18, align 4, !tbaa !5
  %273 = load ptr, ptr %25, align 8, !tbaa !9
  %274 = load ptr, ptr %19, align 8, !tbaa !9
  %275 = load ptr, ptr %20, align 8, !tbaa !9
  %276 = load ptr, ptr %21, align 8, !tbaa !9
  %277 = load ptr, ptr %22, align 8, !tbaa !9
  %278 = load ptr, ptr %23, align 8, !tbaa !9
  %279 = load ptr, ptr %24, align 8, !tbaa !9
  %280 = load ptr, ptr %27, align 8, !tbaa !9
  %281 = call i32 @FreeTensor(i32 noundef %272, ptr noundef %273, ptr noundef %274, ptr noundef %275, ptr noundef %276, ptr noundef %277, ptr noundef %278, ptr noundef %279, ptr noundef %280)
  %282 = load ptr, ptr %26, align 8, !tbaa !9
  call void @free(ptr noundef %282) #7
  %283 = load ptr, ptr %7, align 8, !tbaa !9
  call void @FreeResultHandle(ptr noundef %283)
  %284 = load ptr, ptr %6, align 8, !tbaa !9
  call void @DestroyModel(ptr noundef %284)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %30, align 4
  br label %285

285:                                              ; preds = %261, %259
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %286 = load i32, ptr %3, align 4
  ret i32 %286
}

declare i32 @ParseOptions(i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare ptr @BuildFileStream(ptr noundef) #1

declare i32 @CreateInference(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

declare i32 @CreateInputTensorDesc(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare i32 @CreateOutputTensorDesc(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @MallocTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @InitTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #5

declare i32 @PrintTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare void @ResizeModelInput(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @RunModel(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare void @GetOutputDataFromResultHandle(ptr noundef, i32 noundef, ptr noundef) #1

declare i32 @FreeTensorDesc(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

declare i32 @FreeTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @FreeResultHandle(ptr noundef) #1

declare void @DestroyModel(ptr noundef) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@useFileStream = external local_unnamed_addr global i32, align 4
@modelPath = external local_unnamed_addr global ptr, align 8
@algorithmMapPath = external local_unnamed_addr global ptr, align 8
@affinity = external local_unnamed_addr global i32, align 4
@__const.main.data = external hidden unnamed_addr constant [4 x [1 x i32]], align 16
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca [4 x [1 x i32]], align 16
  %23 = tail call i32 @ParseOptions(i32 noundef %0, ptr noundef %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %24 = load i32, ptr @useFileStream, align 4, !tbaa !5
  %.not = icmp eq i32 %24, 0
  %25 = load ptr, ptr @modelPath, align 8, !tbaa !9
  br i1 %.not, label %32, label %26

26:                                               ; preds = %2
  %27 = tail call ptr @BuildFileStream(ptr noundef %25) #8
  %28 = load i32, ptr @useFileStream, align 4, !tbaa !5
  %29 = load ptr, ptr @algorithmMapPath, align 8, !tbaa !9
  %30 = load i32, ptr @affinity, align 4, !tbaa !5
  %31 = call i32 @CreateInference(i32 noundef %28, ptr noundef %27, ptr noundef %29, i32 noundef %30, ptr noundef nonnull %3, ptr noundef nonnull %4) #8
  br label %36

32:                                               ; preds = %2
  %33 = load ptr, ptr @algorithmMapPath, align 8, !tbaa !9
  %34 = load i32, ptr @affinity, align 4, !tbaa !5
  %35 = call i32 @CreateInference(i32 noundef 0, ptr noundef %25, ptr noundef %33, i32 noundef %34, ptr noundef nonnull %3, ptr noundef nonnull %4) #8
  br label %36

36:                                               ; preds = %32, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %37 = load ptr, ptr %3, align 8, !tbaa !9
  %38 = call i32 @CreateInputTensorDesc(ptr noundef %37, ptr noundef nonnull %5, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #8
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = shl nsw i64 %40, 3
  %42 = call noalias ptr @malloc(i64 noundef %41) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  %43 = load ptr, ptr %4, align 8, !tbaa !9
  %44 = call i32 @CreateOutputTensorDesc(ptr noundef %43, ptr noundef nonnull %13, ptr noundef nonnull %20, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19) #8
  %45 = load i32, ptr %13, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = shl nsw i64 %46, 3
  %48 = call noalias ptr @malloc(i64 noundef %47) #9
  %49 = load ptr, ptr %20, align 8, !tbaa !9
  %50 = load ptr, ptr %14, align 8, !tbaa !9
  %51 = load ptr, ptr %15, align 8, !tbaa !9
  %52 = load ptr, ptr %16, align 8, !tbaa !9
  %53 = load ptr, ptr %17, align 8, !tbaa !9
  %54 = load ptr, ptr %18, align 8, !tbaa !9
  %55 = load ptr, ptr %19, align 8, !tbaa !9
  %56 = call i32 @MallocTensor(i32 noundef %45, ptr noundef %49, ptr noundef %50, ptr noundef %51, ptr noundef %52, ptr noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef nonnull %21) #8
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = load ptr, ptr %20, align 8, !tbaa !9
  %59 = load ptr, ptr %14, align 8, !tbaa !9
  %60 = load ptr, ptr %15, align 8, !tbaa !9
  %61 = load ptr, ptr %16, align 8, !tbaa !9
  %62 = load ptr, ptr %17, align 8, !tbaa !9
  %63 = load ptr, ptr %18, align 8, !tbaa !9
  %64 = load ptr, ptr %19, align 8, !tbaa !9
  %65 = load ptr, ptr %21, align 8, !tbaa !9
  %66 = call i32 @InitTensor(i32 noundef %57, ptr noundef %58, ptr noundef %59, ptr noundef %60, ptr noundef %61, ptr noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65, float noundef 0.000000e+00) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.data, i64 16, i1 false)
  br label %67

67:                                               ; preds = %36, %.thread66
  %indvars.iv116 = phi i64 [ 0, %36 ], [ %indvars.iv.next117, %.thread66 ]
  %68 = trunc nuw nsw i64 %indvars.iv116 to i32
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %68)
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %.not58.not77 = icmp sgt i32 %70, 0
  %.pre121 = load ptr, ptr %12, align 8, !tbaa !9
  br i1 %.not58.not77, label %.lr.ph80, label %.thread66

.lr.ph80:                                         ; preds = %67
  %71 = load ptr, ptr %20, align 8
  %72 = icmp eq i64 %indvars.iv116, 0
  %73 = load ptr, ptr %21, align 8
  %74 = getelementptr inbounds [4 x [1 x i32]], ptr %22, i64 0, i64 %indvars.iv116
  %75 = load ptr, ptr %7, align 8
  br i1 %72, label %.lr.ph80.split.us, label %.lr.ph80.split

.lr.ph80.split.us:                                ; preds = %.lr.ph80, %.thread60.us
  %76 = phi i32 [ %103, %.thread60.us ], [ %70, %.lr.ph80 ]
  %indvars.iv113 = phi i64 [ %indvars.iv.next114, %.thread60.us ], [ 0, %.lr.ph80 ]
  %77 = getelementptr inbounds ptr, ptr %.pre121, i64 %indvars.iv113
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %78, ptr noundef nonnull dereferenceable(1) @.str.1) #10
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %100, label %81

81:                                               ; preds = %.lr.ph80.split.us
  %82 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %78, ptr noundef nonnull dereferenceable(1) @.str.2) #10
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %87, label %84

84:                                               ; preds = %81
  %85 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %78, ptr noundef nonnull dereferenceable(1) @.str.4) #10
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %.thread64

87:                                               ; preds = %84, %81
  %.047.us = phi ptr [ @.str.3, %81 ], [ @.str.5, %84 ]
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %.lr.ph.us.preheader, label %._crit_edge

.lr.ph.us.preheader:                              ; preds = %87
  %wide.trip.count111 = zext nneg i32 %88 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %94
  %indvars.iv108 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next109, %94 ]
  %90 = getelementptr inbounds ptr, ptr %71, i64 %indvars.iv108
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %91, ptr noundef nonnull dereferenceable(1) %.047.us) #10
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %.lr.ph.us
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %wide.trip.count111
  br i1 %exitcond112.not, label %._crit_edge, label %.lr.ph.us, !llvm.loop !11

95:                                               ; preds = %.lr.ph.us
  %96 = and i64 %indvars.iv108, 4294967295
  %97 = getelementptr inbounds ptr, ptr %73, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv113
  store ptr %98, ptr %99, align 8, !tbaa !9
  br label %.thread60.us

100:                                              ; preds = %.lr.ph80.split.us
  %101 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv113
  store ptr %74, ptr %101, align 8, !tbaa !9
  %102 = getelementptr inbounds i32, ptr %75, i64 %indvars.iv113
  store i32 1, ptr %102, align 4, !tbaa !5
  %.pre120 = load i32, ptr %5, align 4, !tbaa !5
  br label %.thread60.us

.thread60.us:                                     ; preds = %100, %95
  %103 = phi i32 [ %.pre120, %100 ], [ %76, %95 ]
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %104 = sext i32 %103 to i64
  %.not58.not.us = icmp slt i64 %indvars.iv.next114, %104
  br i1 %.not58.not.us, label %.lr.ph80.split.us, label %.thread66, !llvm.loop !13

.lr.ph80.split:                                   ; preds = %.lr.ph80, %.thread60
  %105 = phi i32 [ %133, %.thread60 ], [ %70, %.lr.ph80 ]
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.thread60 ], [ 0, %.lr.ph80 ]
  %106 = getelementptr inbounds ptr, ptr %.pre121, i64 %indvars.iv105
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %107, ptr noundef nonnull dereferenceable(1) @.str.1) #10
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %113

110:                                              ; preds = %.lr.ph80.split
  %111 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv105
  store ptr %74, ptr %111, align 8, !tbaa !9
  %112 = getelementptr inbounds i32, ptr %75, i64 %indvars.iv105
  store i32 1, ptr %112, align 4, !tbaa !5
  %.pre = load i32, ptr %5, align 4, !tbaa !5
  br label %.thread60

113:                                              ; preds = %.lr.ph80.split
  %114 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %107, ptr noundef nonnull dereferenceable(1) @.str.2) #10
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %120, label %116

116:                                              ; preds = %113
  %117 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %107, ptr noundef nonnull dereferenceable(1) @.str.4) #10
  %118 = icmp eq i32 %117, 0
  br i1 %118, label %120, label %.thread64

.thread64:                                        ; preds = %116, %84
  %.us-phi = phi ptr [ %78, %84 ], [ %107, %116 ]
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %.us-phi)
  br label %.critedge

120:                                              ; preds = %116, %113
  %.047 = phi ptr [ @.str.3, %113 ], [ @.str.5, %116 ]
  %121 = load i32, ptr %13, align 4, !tbaa !5
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %120
  %wide.trip.count = zext nneg i32 %121 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %127
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %127 ]
  %123 = getelementptr inbounds ptr, ptr %71, i64 %indvars.iv
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  %125 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %124, ptr noundef nonnull dereferenceable(1) %.047) #10
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

128:                                              ; preds = %.lr.ph
  %129 = and i64 %indvars.iv, 4294967295
  %130 = getelementptr inbounds ptr, ptr %48, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  %132 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv105
  store ptr %131, ptr %132, align 8, !tbaa !9
  br label %.thread60

.thread60:                                        ; preds = %128, %110
  %133 = phi i32 [ %105, %128 ], [ %.pre, %110 ]
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %134 = sext i32 %133 to i64
  %.not58.not = icmp slt i64 %indvars.iv.next106, %134
  br i1 %.not58.not, label %.lr.ph80.split, label %.thread66, !llvm.loop !13

._crit_edge:                                      ; preds = %120, %87, %127, %94
  %.047.lcssa = phi ptr [ %.047.us, %94 ], [ %.047, %127 ], [ %.047.us, %87 ], [ %.047, %120 ]
  %.lcssa71 = phi ptr [ %78, %94 ], [ %107, %127 ], [ %78, %87 ], [ %107, %120 ]
  %135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull %.047.lcssa, ptr noundef %.lcssa71)
  br label %.critedge

.thread66:                                        ; preds = %.thread60, %.thread60.us, %67
  %136 = phi i32 [ %70, %67 ], [ %103, %.thread60.us ], [ %133, %.thread60 ]
  %137 = load ptr, ptr %6, align 8, !tbaa !9
  %138 = load ptr, ptr %7, align 8, !tbaa !9
  %139 = load ptr, ptr %8, align 8, !tbaa !9
  %140 = load ptr, ptr %9, align 8, !tbaa !9
  %141 = load ptr, ptr %10, align 8, !tbaa !9
  %142 = load ptr, ptr %11, align 8, !tbaa !9
  %143 = call i32 @PrintTensor(i32 noundef %136, ptr noundef %.pre121, ptr noundef %137, ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %42, ptr noundef nonnull @.str.8, i32 noundef 8) #8
  %144 = load ptr, ptr %3, align 8, !tbaa !9
  %145 = load i32, ptr %5, align 4, !tbaa !5
  %146 = load ptr, ptr %12, align 8, !tbaa !9
  %147 = load ptr, ptr %6, align 8, !tbaa !9
  %148 = load ptr, ptr %7, align 8, !tbaa !9
  %149 = load ptr, ptr %8, align 8, !tbaa !9
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  %151 = load ptr, ptr %10, align 8, !tbaa !9
  %152 = load ptr, ptr %11, align 8, !tbaa !9
  call void @ResizeModelInput(ptr noundef %144, i32 noundef %145, ptr noundef %146, ptr noundef %147, ptr noundef %148, ptr noundef %149, ptr noundef %150, ptr noundef %151, ptr noundef %152) #8
  %153 = load ptr, ptr %3, align 8, !tbaa !9
  %154 = load ptr, ptr %4, align 8, !tbaa !9
  %155 = load i32, ptr %5, align 4, !tbaa !5
  %156 = load ptr, ptr %12, align 8, !tbaa !9
  call void @RunModel(ptr noundef %153, ptr noundef %154, i32 noundef %155, ptr noundef %156, ptr noundef %42) #8
  %157 = load ptr, ptr %4, align 8, !tbaa !9
  %158 = load i32, ptr %13, align 4, !tbaa !5
  call void @GetOutputDataFromResultHandle(ptr noundef %157, i32 noundef %158, ptr noundef %48) #8
  %159 = load i32, ptr %13, align 4, !tbaa !5
  %160 = load ptr, ptr %20, align 8, !tbaa !9
  %161 = load ptr, ptr %14, align 8, !tbaa !9
  %162 = load ptr, ptr %15, align 8, !tbaa !9
  %163 = load ptr, ptr %16, align 8, !tbaa !9
  %164 = load ptr, ptr %17, align 8, !tbaa !9
  %165 = load ptr, ptr %18, align 8, !tbaa !9
  %166 = load ptr, ptr %19, align 8, !tbaa !9
  %167 = call i32 @PrintTensor(i32 noundef %159, ptr noundef %160, ptr noundef %161, ptr noundef %162, ptr noundef %163, ptr noundef %164, ptr noundef %165, ptr noundef %166, ptr noundef %48, ptr noundef nonnull @.str.9, i32 noundef 8) #8
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %exitcond119 = icmp eq i64 %indvars.iv.next117, 4
  br i1 %exitcond119, label %.critedge.thread, label %67, !llvm.loop !14

.critedge.thread:                                 ; preds = %.thread66
  %168 = load i32, ptr %5, align 4, !tbaa !5
  %169 = load ptr, ptr %12, align 8, !tbaa !9
  %170 = load ptr, ptr %6, align 8, !tbaa !9
  %171 = load ptr, ptr %7, align 8, !tbaa !9
  %172 = load ptr, ptr %8, align 8, !tbaa !9
  %173 = load ptr, ptr %9, align 8, !tbaa !9
  %174 = load ptr, ptr %10, align 8, !tbaa !9
  %175 = load ptr, ptr %11, align 8, !tbaa !9
  %176 = call i32 @FreeTensorDesc(i32 noundef %168, ptr noundef %169, ptr noundef %170, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %174, ptr noundef %175) #8
  call void @free(ptr noundef %42) #8
  %177 = load i32, ptr %13, align 4, !tbaa !5
  %178 = load ptr, ptr %20, align 8, !tbaa !9
  %179 = load ptr, ptr %14, align 8, !tbaa !9
  %180 = load ptr, ptr %15, align 8, !tbaa !9
  %181 = load ptr, ptr %16, align 8, !tbaa !9
  %182 = load ptr, ptr %17, align 8, !tbaa !9
  %183 = load ptr, ptr %18, align 8, !tbaa !9
  %184 = load ptr, ptr %19, align 8, !tbaa !9
  %185 = load ptr, ptr %21, align 8, !tbaa !9
  %186 = call i32 @FreeTensor(i32 noundef %177, ptr noundef %178, ptr noundef %179, ptr noundef %180, ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184, ptr noundef %185) #8
  call void @free(ptr noundef %48) #8
  %187 = load ptr, ptr %4, align 8, !tbaa !9
  call void @FreeResultHandle(ptr noundef %187) #8
  %188 = load ptr, ptr %3, align 8, !tbaa !9
  call void @DestroyModel(ptr noundef %188) #8
  br label %.critedge

.critedge:                                        ; preds = %.thread64, %._crit_edge, %.critedge.thread
  %.7 = phi i32 [ 0, %.critedge.thread ], [ 1, %._crit_edge ], [ 1, %.thread64 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i32 %.7
}

declare i32 @ParseOptions(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare ptr @BuildFileStream(ptr noundef) local_unnamed_addr #1

declare i32 @CreateInference(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

declare i32 @CreateInputTensorDesc(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare i32 @CreateOutputTensorDesc(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @MallocTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @InitTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6

declare i32 @PrintTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @ResizeModelInput(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @RunModel(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @GetOutputDataFromResultHandle(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @FreeTensorDesc(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

declare i32 @FreeTensor(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @FreeResultHandle(ptr noundef) local_unnamed_addr #1

declare void @DestroyModel(ptr noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass