; LLVM IR from jingweizhanghuai/Morn :: src/deep_learning (morn_tensor_conv2)

; 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"

%struct.TensorRegister = type { [32 x i8], ptr, ptr, ptr }
%struct.TensorSampleConvPara = type { ptr, i32, i32, i32, i32, i32, float, i32, float, float, float }
%struct.MLayer = type { [32 x i8], i32, ptr, ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@__FUNCTION__.mTensorSampleConvPara = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @mTensorSampleConvPara(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %9 = call ptr @m_Malloc(i32 noundef 48)
  store ptr %9, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = ptrtoint ptr %11 to i64
  %13 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %10, i64 noundef %12, i64 noundef ptrtoint (ptr @.str to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %13, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call ptr @mNetworkLayer(ptr noundef %14, ptr noundef %15)
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %17, i32 0, i32 0
  store ptr %16, ptr %18, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = icmp eq ptr %22, null
  %24 = zext i1 %23 to i32
  store i32 %24, ptr %7, align 4, !tbaa !13
  %25 = load i32, ptr %7, align 4, !tbaa !13
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %19
  %28 = load i32, ptr %7, align 4, !tbaa !13
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %28, i32 noundef -1, ptr noundef @.str.1, i32 noundef 36, ptr noundef @__FUNCTION__.mTensorSampleConvPara, ptr noundef @.str.2)
  br label %29

29:                                               ; preds = %27, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.MLayer, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !14
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %37
  %39 = getelementptr inbounds %struct.TensorRegister, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds [32 x i8], ptr %39, i64 0, i64 0
  %41 = call i32 @strcmp(ptr noundef @.str.3, ptr noundef %40) #6
  %42 = icmp ne i32 %41, 0
  %43 = zext i1 %42 to i32
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %44, i32 0, i32 7
  store i32 %43, ptr %45, align 8, !tbaa !16
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = ptrtoint ptr %47 to i64
  %49 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %46, i64 noundef %48, i64 noundef ptrtoint (ptr @.str.4 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %49, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %57

52:                                               ; preds = %31
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call i32 @atoi(ptr noundef %53) #6
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %55, i32 0, i32 1
  store i32 %54, ptr %56, align 8, !tbaa !17
  br label %60

57:                                               ; preds = %31
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %58, i32 0, i32 1
  store i32 1, ptr %59, align 8, !tbaa !17
  br label %60

60:                                               ; preds = %57, %52
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = ptrtoint ptr %62 to i64
  %64 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %61, i64 noundef %63, i64 noundef ptrtoint (ptr @.str.5 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %64, ptr %6, align 8, !tbaa !5
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %72

67:                                               ; preds = %60
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = call i32 @atoi(ptr noundef %68) #6
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %70, i32 0, i32 2
  store i32 %69, ptr %71, align 4, !tbaa !18
  br label %75

72:                                               ; preds = %60
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %73, i32 0, i32 2
  store i32 1, ptr %74, align 4, !tbaa !18
  br label %75

75:                                               ; preds = %72, %67
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = ptrtoint ptr %77 to i64
  %79 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %76, i64 noundef %78, i64 noundef ptrtoint (ptr @.str.6 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %79, ptr %6, align 8, !tbaa !5
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %87

82:                                               ; preds = %75
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = call i32 @atoi(ptr noundef %83) #6
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %85, i32 0, i32 3
  store i32 %84, ptr %86, align 8, !tbaa !19
  br label %90

87:                                               ; preds = %75
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %88, i32 0, i32 3
  store i32 1, ptr %89, align 8, !tbaa !19
  br label %90

90:                                               ; preds = %87, %82
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = ptrtoint ptr %92 to i64
  %94 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %91, i64 noundef %93, i64 noundef ptrtoint (ptr @.str.7 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %94, ptr %6, align 8, !tbaa !5
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %102

97:                                               ; preds = %90
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = call i32 @atoi(ptr noundef %98) #6
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %100, i32 0, i32 4
  store i32 %99, ptr %101, align 4, !tbaa !20
  br label %105

102:                                              ; preds = %90
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %103, i32 0, i32 4
  store i32 1, ptr %104, align 4, !tbaa !20
  br label %105

105:                                              ; preds = %102, %97
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = ptrtoint ptr %107 to i64
  %109 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %106, i64 noundef %108, i64 noundef ptrtoint (ptr @.str.8 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %109, ptr %6, align 8, !tbaa !5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %117

112:                                              ; preds = %105
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = call i32 @atoi(ptr noundef %113) #6
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %115, i32 0, i32 5
  store i32 %114, ptr %116, align 8, !tbaa !21
  br label %120

117:                                              ; preds = %105
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %118, i32 0, i32 5
  store i32 1, ptr %119, align 8, !tbaa !21
  br label %120

120:                                              ; preds = %117, %112
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = ptrtoint ptr %122 to i64
  %124 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %121, i64 noundef %123, i64 noundef ptrtoint (ptr @.str.9 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %124, ptr %6, align 8, !tbaa !5
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %133

127:                                              ; preds = %120
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = call double @atof(ptr noundef %128) #6
  %130 = fptrunc double %129 to float
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %131, i32 0, i32 6
  store float %130, ptr %132, align 4, !tbaa !22
  br label %136

133:                                              ; preds = %120
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %134, i32 0, i32 6
  store float 5.000000e-01, ptr %135, align 4, !tbaa !22
  br label %136

136:                                              ; preds = %133, %127
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = ptrtoint ptr %138 to i64
  %140 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %137, i64 noundef %139, i64 noundef ptrtoint (ptr @.str.10 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %140, ptr %6, align 8, !tbaa !5
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %149

143:                                              ; preds = %136
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = call double @atof(ptr noundef %144) #6
  %146 = fptrunc double %145 to float
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %147, i32 0, i32 8
  store float %146, ptr %148, align 4, !tbaa !23
  br label %164

149:                                              ; preds = %136
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %150, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.10 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %151, ptr %6, align 8, !tbaa !5
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %160

154:                                              ; preds = %149
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = call double @atof(ptr noundef %155) #6
  %157 = fptrunc double %156 to float
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %158, i32 0, i32 8
  store float %157, ptr %159, align 4, !tbaa !23
  br label %163

160:                                              ; preds = %149
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %161, i32 0, i32 8
  store float 0x3F50624DE0000000, ptr %162, align 4, !tbaa !23
  br label %163

163:                                              ; preds = %160, %154
  br label %164

164:                                              ; preds = %163, %143
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = ptrtoint ptr %166 to i64
  %168 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %165, i64 noundef %167, i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %168, ptr %6, align 8, !tbaa !5
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = icmp ne ptr %169, null
  br i1 %170, label %171, label %177

171:                                              ; preds = %164
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = call double @atof(ptr noundef %172) #6
  %174 = fptrunc double %173 to float
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %175, i32 0, i32 9
  store float %174, ptr %176, align 8, !tbaa !24
  br label %192

177:                                              ; preds = %164
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %178, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %179, ptr %6, align 8, !tbaa !5
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = icmp ne ptr %180, null
  br i1 %181, label %182, label %188

182:                                              ; preds = %177
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = call double @atof(ptr noundef %183) #6
  %185 = fptrunc double %184 to float
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %186, i32 0, i32 9
  store float %185, ptr %187, align 8, !tbaa !24
  br label %191

188:                                              ; preds = %177
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %189, i32 0, i32 9
  store float 0x3F847AE140000000, ptr %190, align 8, !tbaa !24
  br label %191

191:                                              ; preds = %188, %182
  br label %192

192:                                              ; preds = %191, %171
  br label %193

193:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %194, i32 0, i32 9
  %196 = load float, ptr %195, align 8, !tbaa !24
  %197 = fcmp olt float %196, 0.000000e+00
  br i1 %197, label %203, label %198

198:                                              ; preds = %193
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %199, i32 0, i32 9
  %201 = load float, ptr %200, align 8, !tbaa !24
  %202 = fcmp oge float %201, 1.000000e+00
  br label %203

203:                                              ; preds = %198, %193
  %204 = phi i1 [ true, %193 ], [ %202, %198 ]
  %205 = zext i1 %204 to i32
  store i32 %205, ptr %8, align 4, !tbaa !13
  %206 = load i32, ptr %8, align 4, !tbaa !13
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %210

208:                                              ; preds = %203
  %209 = load i32, ptr %8, align 4, !tbaa !13
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %209, i32 noundef -1, ptr noundef @.str.1, i32 noundef 75, ptr noundef @__FUNCTION__.mTensorSampleConvPara, ptr noundef @.str.13)
  br label %210

210:                                              ; preds = %208, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = ptrtoint ptr %214 to i64
  %216 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %213, i64 noundef %215, i64 noundef ptrtoint (ptr @.str.14 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %216, ptr %6, align 8, !tbaa !5
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  %218 = icmp ne ptr %217, null
  br i1 %218, label %219, label %225

219:                                              ; preds = %212
  %220 = load ptr, ptr %6, align 8, !tbaa !5
  %221 = call double @atof(ptr noundef %220) #6
  %222 = fptrunc double %221 to float
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %223, i32 0, i32 10
  store float %222, ptr %224, align 4, !tbaa !25
  br label %240

225:                                              ; preds = %212
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %226, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.14 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %227, ptr %6, align 8, !tbaa !5
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = icmp ne ptr %228, null
  br i1 %229, label %230, label %236

230:                                              ; preds = %225
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = call double @atof(ptr noundef %231) #6
  %233 = fptrunc double %232 to float
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %234, i32 0, i32 10
  store float %233, ptr %235, align 4, !tbaa !25
  br label %239

236:                                              ; preds = %225
  %237 = load ptr, ptr %5, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.TensorSampleConvPara, ptr %237, i32 0, i32 10
  store float 0x3FECCCCCC0000000, ptr %238, align 4, !tbaa !25
  br label %239

239:                                              ; preds = %236, %230
  br label %240

240:                                              ; preds = %239, %219
  %241 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %241
}

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

declare ptr @m_Malloc(i32 noundef) #2

declare ptr @m_INIRead(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) #2

declare ptr @mNetworkLayer(ptr noundef, ptr noundef) #2

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 #3 = { 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 #4 = { inlinehint nounwind willreturn memory(read) 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"TensorSampleConvPara", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 28, !11, i64 32, !12, i64 36, !12, i64 40, !12, i64 44}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 32}
!15 = !{!"MLayer", !7, i64 0, !11, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64}
!16 = !{!10, !11, i64 32}
!17 = !{!10, !11, i64 8}
!18 = !{!10, !11, i64 12}
!19 = !{!10, !11, i64 16}
!20 = !{!10, !11, i64 20}
!21 = !{!10, !11, i64 24}
!22 = !{!10, !12, i64 28}
!23 = !{!10, !12, i64 36}
!24 = !{!10, !12, i64 40}
!25 = !{!10, !12, i64 44}


; 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"

%struct.TensorRegister = type { [32 x i8], ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@__FUNCTION__.mTensorSampleConvPara = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @mTensorSampleConvPara(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call ptr @m_Malloc(i32 noundef 48) #4
  %4 = ptrtoint ptr %1 to i64
  %5 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %6 = tail call ptr @mNetworkLayer(ptr noundef %0, ptr noundef %5) #4
  store ptr %6, ptr %3, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %9

8:                                                ; preds = %2
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 36, ptr noundef nonnull @__FUNCTION__.mTensorSampleConvPara, ptr noundef nonnull @.str.2) #4
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %8, %2
  %10 = phi ptr [ %.pre, %8 ], [ %6, %2 ]
  %11 = getelementptr inbounds i8, ptr %10, i64 32
  %12 = load i32, ptr %11, align 8, !tbaa !12
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %13
  %15 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull dereferenceable(1) %14) #5
  %16 = icmp ne i32 %15, 0
  %17 = zext i1 %16 to i32
  %18 = getelementptr inbounds i8, ptr %3, i64 32
  store i32 %17, ptr %18, align 8, !tbaa !14
  %19 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.4 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %22, label %20

20:                                               ; preds = %9
  %21 = tail call i32 @atoi(ptr nocapture noundef %19) #5
  br label %22

22:                                               ; preds = %9, %20
  %.sink = phi i32 [ %21, %20 ], [ 1, %9 ]
  %23 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 %.sink, ptr %23, align 8
  %24 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.5 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not92 = icmp eq ptr %24, null
  br i1 %.not92, label %27, label %25

25:                                               ; preds = %22
  %26 = tail call i32 @atoi(ptr nocapture noundef %24) #5
  br label %27

27:                                               ; preds = %22, %25
  %.sink103 = phi i32 [ %26, %25 ], [ 1, %22 ]
  %28 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 %.sink103, ptr %28, align 4
  %29 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.6 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not93 = icmp eq ptr %29, null
  br i1 %.not93, label %32, label %30

30:                                               ; preds = %27
  %31 = tail call i32 @atoi(ptr nocapture noundef %29) #5
  br label %32

32:                                               ; preds = %27, %30
  %.sink104 = phi i32 [ %31, %30 ], [ 1, %27 ]
  %33 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 %.sink104, ptr %33, align 8
  %34 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.7 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not94 = icmp eq ptr %34, null
  br i1 %.not94, label %37, label %35

35:                                               ; preds = %32
  %36 = tail call i32 @atoi(ptr nocapture noundef %34) #5
  br label %37

37:                                               ; preds = %32, %35
  %.sink105 = phi i32 [ %36, %35 ], [ 1, %32 ]
  %38 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 %.sink105, ptr %38, align 4
  %39 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.8 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not95 = icmp eq ptr %39, null
  br i1 %.not95, label %42, label %40

40:                                               ; preds = %37
  %41 = tail call i32 @atoi(ptr nocapture noundef %39) #5
  br label %42

42:                                               ; preds = %37, %40
  %.sink106 = phi i32 [ %41, %40 ], [ 1, %37 ]
  %43 = getelementptr inbounds i8, ptr %3, i64 24
  store i32 %.sink106, ptr %43, align 8
  %44 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.9 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not96 = icmp eq ptr %44, null
  br i1 %.not96, label %48, label %45

45:                                               ; preds = %42
  %46 = tail call double @atof(ptr noundef %44) #5
  %47 = fptrunc double %46 to float
  br label %48

48:                                               ; preds = %42, %45
  %.sink107 = phi float [ %47, %45 ], [ 5.000000e-01, %42 ]
  %49 = getelementptr inbounds i8, ptr %3, i64 28
  store float %.sink107, ptr %49, align 4
  %50 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.10 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not97 = icmp eq ptr %50, null
  br i1 %.not97, label %51, label %.sink.split

51:                                               ; preds = %48
  %52 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.10 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not98 = icmp eq ptr %52, null
  br i1 %.not98, label %55, label %.sink.split

.sink.split:                                      ; preds = %51, %48
  %.sink115 = phi ptr [ %50, %48 ], [ %52, %51 ]
  %53 = tail call double @atof(ptr noundef %.sink115) #5
  %54 = fptrunc double %53 to float
  br label %55

55:                                               ; preds = %.sink.split, %51
  %.sink108 = phi float [ 0x3F50624DE0000000, %51 ], [ %54, %.sink.split ]
  %56 = getelementptr inbounds i8, ptr %3, i64 36
  store float %.sink108, ptr %56, align 4, !tbaa !15
  %57 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not99 = icmp eq ptr %57, null
  br i1 %.not99, label %58, label %.sink.split116

58:                                               ; preds = %55
  %59 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not100 = icmp eq ptr %59, null
  br i1 %.not100, label %62, label %.sink.split116

.sink.split116:                                   ; preds = %58, %55
  %.sink118 = phi ptr [ %57, %55 ], [ %59, %58 ]
  %60 = tail call double @atof(ptr noundef %.sink118) #5
  %61 = fptrunc double %60 to float
  br label %62

62:                                               ; preds = %.sink.split116, %58
  %.sink110 = phi float [ 0x3F847AE140000000, %58 ], [ %61, %.sink.split116 ]
  %63 = getelementptr inbounds i8, ptr %3, i64 40
  store float %.sink110, ptr %63, align 8, !tbaa !16
  %64 = fcmp olt float %.sink110, 0.000000e+00
  %65 = fcmp oge float %.sink110, 1.000000e+00
  %66 = or i1 %64, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %62
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 75, ptr noundef nonnull @__FUNCTION__.mTensorSampleConvPara, ptr noundef nonnull @.str.13) #4
  br label %68

68:                                               ; preds = %67, %62
  %69 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %4, i64 noundef ptrtoint (ptr @.str.14 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not101 = icmp eq ptr %69, null
  br i1 %.not101, label %70, label %.sink.split119

70:                                               ; preds = %68
  %71 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef ptrtoint (ptr @.str.11 to i64), i64 noundef ptrtoint (ptr @.str.14 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not102 = icmp eq ptr %71, null
  br i1 %.not102, label %74, label %.sink.split119

.sink.split119:                                   ; preds = %70, %68
  %.sink121 = phi ptr [ %69, %68 ], [ %71, %70 ]
  %72 = tail call double @atof(ptr noundef %.sink121) #5
  %73 = fptrunc double %72 to float
  br label %74

74:                                               ; preds = %.sink.split119, %70
  %.sink112 = phi float [ 0x3FECCCCCC0000000, %70 ], [ %73, %.sink.split119 ]
  %75 = getelementptr inbounds i8, ptr %3, i64 44
  store float %.sink112, ptr %75, align 4, !tbaa !17
  ret ptr %3
}

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #1

declare ptr @m_INIRead(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #1

declare ptr @mNetworkLayer(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #3

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 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 #3 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #4 = { nounwind }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"TensorSampleConvPara", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !11, i64 28, !10, i64 32, !11, i64 36, !11, i64 40, !11, i64 44}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !10, i64 32}
!13 = !{!"MLayer", !8, i64 0, !10, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64}
!14 = !{!6, !10, i64 32}
!15 = !{!6, !11, i64 36}
!16 = !{!6, !11, i64 40}
!17 = !{!6, !11, i64 44}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass