; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/process/src/c_src (GeometricTransformation)

; 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.HyperMat = type { i32, i32, i32, i32, [3 x i8], ptr, ptr }

@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @hyper_mat_rotate(ptr noundef %0, double noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.HyperMat, ptr %39, i32 0, i32 4
  %41 = getelementptr inbounds [3 x i8], ptr %40, i64 0, i64 0
  %42 = call i32 @cmpstr(ptr noundef %41, ptr noundef @.str.9)
  %43 = icmp ne i32 %42, 1
  br i1 %43, label %44, label %46

44:                                               ; preds = %2
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  call void @convert2bip(ptr noundef %45)
  br label %46

46:                                               ; preds = %44, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %47 = load double, ptr %4, align 8, !tbaa !9
  %48 = fmul double %47, 0x400921FB4D12D84A
  %49 = fdiv double %48, 1.800000e+02
  store double %49, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %50 = load double, ptr %5, align 8, !tbaa !9
  %51 = call double @cos(double noundef %50) #7
  store double %51, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %52 = load double, ptr %5, align 8, !tbaa !9
  %53 = call double @sin(double noundef %52) #7
  store double %53, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.HyperMat, ptr %54, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !11
  %57 = add nsw i32 %56, 1
  %58 = sdiv i32 %57, 2
  store i32 %58, ptr %8, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.HyperMat, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !15
  %62 = add nsw i32 %61, 1
  %63 = sdiv i32 %62, 2
  store i32 %63, ptr %9, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %64 = load i32, ptr %9, align 4, !tbaa !14
  %65 = sub nsw i32 0, %64
  %66 = sitofp i32 %65 to double
  %67 = load double, ptr %6, align 8, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !14
  %69 = sitofp i32 %68 to double
  %70 = load double, ptr %7, align 8, !tbaa !9
  %71 = fmul double %69, %70
  %72 = fneg double %71
  %73 = call double @llvm.fmuladd.f64(double %66, double %67, double %72)
  %74 = fptrunc double %73 to float
  store float %74, ptr %10, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %75 = load i32, ptr %8, align 4, !tbaa !14
  %76 = sub nsw i32 0, %75
  %77 = sitofp i32 %76 to double
  %78 = load double, ptr %6, align 8, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !14
  %80 = sitofp i32 %79 to double
  %81 = load double, ptr %7, align 8, !tbaa !9
  %82 = fmul double %80, %81
  %83 = call double @llvm.fmuladd.f64(double %77, double %78, double %82)
  %84 = fptrunc double %83 to float
  store float %84, ptr %11, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %85 = load i32, ptr %9, align 4, !tbaa !14
  %86 = sitofp i32 %85 to double
  %87 = load double, ptr %6, align 8, !tbaa !9
  %88 = load i32, ptr %8, align 4, !tbaa !14
  %89 = sitofp i32 %88 to double
  %90 = load double, ptr %7, align 8, !tbaa !9
  %91 = fmul double %89, %90
  %92 = fneg double %91
  %93 = call double @llvm.fmuladd.f64(double %86, double %87, double %92)
  %94 = fptrunc double %93 to float
  store float %94, ptr %12, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %95 = load i32, ptr %8, align 4, !tbaa !14
  %96 = sub nsw i32 0, %95
  %97 = sitofp i32 %96 to double
  %98 = load double, ptr %6, align 8, !tbaa !9
  %99 = load i32, ptr %9, align 4, !tbaa !14
  %100 = sitofp i32 %99 to double
  %101 = load double, ptr %7, align 8, !tbaa !9
  %102 = fmul double %100, %101
  %103 = fneg double %102
  %104 = call double @llvm.fmuladd.f64(double %97, double %98, double %103)
  %105 = fptrunc double %104 to float
  store float %105, ptr %13, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %106 = load i32, ptr %9, align 4, !tbaa !14
  %107 = sitofp i32 %106 to double
  %108 = load double, ptr %6, align 8, !tbaa !9
  %109 = load i32, ptr %8, align 4, !tbaa !14
  %110 = sitofp i32 %109 to double
  %111 = load double, ptr %7, align 8, !tbaa !9
  %112 = fmul double %110, %111
  %113 = call double @llvm.fmuladd.f64(double %107, double %108, double %112)
  %114 = fptrunc double %113 to float
  store float %114, ptr %14, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %115 = load i32, ptr %8, align 4, !tbaa !14
  %116 = sitofp i32 %115 to double
  %117 = load double, ptr %6, align 8, !tbaa !9
  %118 = load i32, ptr %9, align 4, !tbaa !14
  %119 = sitofp i32 %118 to double
  %120 = load double, ptr %7, align 8, !tbaa !9
  %121 = fmul double %119, %120
  %122 = fneg double %121
  %123 = call double @llvm.fmuladd.f64(double %116, double %117, double %122)
  %124 = fptrunc double %123 to float
  store float %124, ptr %15, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %125 = load i32, ptr %9, align 4, !tbaa !14
  %126 = sub nsw i32 0, %125
  %127 = sitofp i32 %126 to double
  %128 = load double, ptr %6, align 8, !tbaa !9
  %129 = load i32, ptr %8, align 4, !tbaa !14
  %130 = sitofp i32 %129 to double
  %131 = load double, ptr %7, align 8, !tbaa !9
  %132 = fmul double %130, %131
  %133 = call double @llvm.fmuladd.f64(double %127, double %128, double %132)
  %134 = fptrunc double %133 to float
  store float %134, ptr %16, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %135 = load i32, ptr %8, align 4, !tbaa !14
  %136 = sitofp i32 %135 to double
  %137 = load double, ptr %6, align 8, !tbaa !9
  %138 = load i32, ptr %9, align 4, !tbaa !14
  %139 = sitofp i32 %138 to double
  %140 = load double, ptr %7, align 8, !tbaa !9
  %141 = fmul double %139, %140
  %142 = call double @llvm.fmuladd.f64(double %136, double %137, double %141)
  %143 = fptrunc double %142 to float
  store float %143, ptr %17, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %144 = load float, ptr %14, align 4, !tbaa !16
  %145 = load float, ptr %10, align 4, !tbaa !16
  %146 = fsub float %144, %145
  %147 = fpext float %146 to double
  %148 = call double @llvm.fabs.f64(double %147)
  %149 = fptrunc double %148 to float
  store float %149, ptr %18, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %150 = load float, ptr %16, align 4, !tbaa !16
  %151 = load float, ptr %12, align 4, !tbaa !16
  %152 = fsub float %150, %151
  %153 = fpext float %152 to double
  %154 = call double @llvm.fabs.f64(double %153)
  %155 = fptrunc double %154 to float
  store float %155, ptr %19, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %156 = load float, ptr %15, align 4, !tbaa !16
  %157 = load float, ptr %11, align 4, !tbaa !16
  %158 = fsub float %156, %157
  %159 = fpext float %158 to double
  %160 = call double @llvm.fabs.f64(double %159)
  %161 = fptrunc double %160 to float
  store float %161, ptr %20, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %162 = load float, ptr %17, align 4, !tbaa !16
  %163 = load float, ptr %13, align 4, !tbaa !16
  %164 = fsub float %162, %163
  %165 = fpext float %164 to double
  %166 = call double @llvm.fabs.f64(double %165)
  %167 = fptrunc double %166 to float
  store float %167, ptr %21, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %168 = load float, ptr %18, align 4, !tbaa !16
  %169 = load float, ptr %19, align 4, !tbaa !16
  %170 = fcmp ogt float %168, %169
  br i1 %170, label %171, label %173

171:                                              ; preds = %46
  %172 = load float, ptr %18, align 4, !tbaa !16
  br label %175

173:                                              ; preds = %46
  %174 = load float, ptr %19, align 4, !tbaa !16
  br label %175

175:                                              ; preds = %173, %171
  %176 = phi float [ %172, %171 ], [ %174, %173 ]
  %177 = fptosi float %176 to i32
  store i32 %177, ptr %22, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %178 = load float, ptr %20, align 4, !tbaa !16
  %179 = load float, ptr %21, align 4, !tbaa !16
  %180 = fcmp ogt float %178, %179
  br i1 %180, label %181, label %183

181:                                              ; preds = %175
  %182 = load float, ptr %20, align 4, !tbaa !16
  br label %185

183:                                              ; preds = %175
  %184 = load float, ptr %21, align 4, !tbaa !16
  br label %185

185:                                              ; preds = %183, %181
  %186 = phi float [ %182, %181 ], [ %184, %183 ]
  %187 = fptosi float %186 to i32
  store i32 %187, ptr %23, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %188 = load i32, ptr %22, align 4, !tbaa !14
  %189 = load i32, ptr %23, align 4, !tbaa !14
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.HyperMat, ptr %190, i32 0, i32 2
  %192 = load i32, ptr %191, align 8, !tbaa !18
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.HyperMat, ptr %193, i32 0, i32 3
  %195 = load i32, ptr %194, align 4, !tbaa !19
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.HyperMat, ptr %196, i32 0, i32 4
  %198 = getelementptr inbounds [3 x i8], ptr %197, i64 0, i64 0
  %199 = load ptr, ptr %3, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.HyperMat, ptr %199, i32 0, i32 6
  %201 = load ptr, ptr %200, align 8, !tbaa !20
  %202 = call ptr @create_hyper_mat_with_data(i32 noundef %188, i32 noundef %189, i32 noundef %192, i32 noundef %195, ptr noundef %198, ptr noundef null, ptr noundef %201)
  store ptr %202, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %203 = load float, ptr %10, align 4, !tbaa !16
  %204 = load i32, ptr %22, align 4, !tbaa !14
  %205 = sdiv i32 %204, 2
  %206 = sitofp i32 %205 to float
  %207 = fadd float %203, %206
  %208 = fptosi float %207 to i32
  store i32 %208, ptr %25, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %209 = load float, ptr %11, align 4, !tbaa !16
  %210 = load i32, ptr %23, align 4, !tbaa !14
  %211 = sdiv i32 %210, 2
  %212 = sitofp i32 %211 to float
  %213 = fadd float %209, %212
  %214 = fptosi float %213 to i32
  store i32 %214, ptr %26, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.HyperMat, ptr %215, i32 0, i32 5
  %217 = load ptr, ptr %216, align 8, !tbaa !21
  store ptr %217, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %218 = load ptr, ptr %24, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.HyperMat, ptr %218, i32 0, i32 5
  %220 = load ptr, ptr %219, align 8, !tbaa !21
  store ptr %220, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.HyperMat, ptr %221, i32 0, i32 3
  %223 = load i32, ptr %222, align 4, !tbaa !19
  %224 = call i32 @get_elemsize(i32 noundef %223)
  store i32 %224, ptr %29, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !14
  br label %225

225:                                              ; preds = %310, %185
  %226 = load i32, ptr %30, align 4, !tbaa !14
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.HyperMat, ptr %227, i32 0, i32 1
  %229 = load i32, ptr %228, align 4, !tbaa !11
  %230 = icmp slt i32 %226, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %225
  store i32 2, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %313

232:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !14
  br label %233

233:                                              ; preds = %306, %232
  %234 = load i32, ptr %32, align 4, !tbaa !14
  %235 = load ptr, ptr %3, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.HyperMat, ptr %235, i32 0, i32 0
  %237 = load i32, ptr %236, align 8, !tbaa !15
  %238 = icmp slt i32 %234, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %233
  store i32 5, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %309

240:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %241 = load i32, ptr %30, align 4, !tbaa !14
  %242 = sitofp i32 %241 to double
  %243 = load double, ptr %6, align 8, !tbaa !9
  %244 = load i32, ptr %32, align 4, !tbaa !14
  %245 = sitofp i32 %244 to double
  %246 = load double, ptr %7, align 8, !tbaa !9
  %247 = fmul double %245, %246
  %248 = call double @llvm.fmuladd.f64(double %242, double %243, double %247)
  %249 = load i32, ptr %25, align 4, !tbaa !14
  %250 = sitofp i32 %249 to double
  %251 = fadd double %248, %250
  %252 = fptosi double %251 to i32
  store i32 %252, ptr %33, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %253 = load i32, ptr %32, align 4, !tbaa !14
  %254 = sitofp i32 %253 to double
  %255 = load double, ptr %6, align 8, !tbaa !9
  %256 = load i32, ptr %30, align 4, !tbaa !14
  %257 = sitofp i32 %256 to double
  %258 = load double, ptr %7, align 8, !tbaa !9
  %259 = fmul double %257, %258
  %260 = fneg double %259
  %261 = call double @llvm.fmuladd.f64(double %254, double %255, double %260)
  %262 = load i32, ptr %26, align 4, !tbaa !14
  %263 = sitofp i32 %262 to double
  %264 = fadd double %261, %263
  %265 = fptosi double %264 to i32
  store i32 %265, ptr %34, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %266 = load i32, ptr %33, align 4, !tbaa !14
  %267 = load i32, ptr %22, align 4, !tbaa !14
  %268 = mul nsw i32 %266, %267
  %269 = load i32, ptr %34, align 4, !tbaa !14
  %270 = add nsw i32 %268, %269
  %271 = load ptr, ptr %3, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.HyperMat, ptr %271, i32 0, i32 2
  %273 = load i32, ptr %272, align 8, !tbaa !18
  %274 = mul nsw i32 %270, %273
  %275 = load i32, ptr %29, align 4, !tbaa !14
  %276 = mul nsw i32 %274, %275
  store i32 %276, ptr %35, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %277 = load i32, ptr %30, align 4, !tbaa !14
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.HyperMat, ptr %278, i32 0, i32 0
  %280 = load i32, ptr %279, align 8, !tbaa !15
  %281 = mul nsw i32 %277, %280
  %282 = load i32, ptr %32, align 4, !tbaa !14
  %283 = add nsw i32 %281, %282
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.HyperMat, ptr %284, i32 0, i32 2
  %286 = load i32, ptr %285, align 8, !tbaa !18
  %287 = mul nsw i32 %283, %286
  %288 = load i32, ptr %29, align 4, !tbaa !14
  %289 = mul nsw i32 %287, %288
  store i32 %289, ptr %36, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %290 = load ptr, ptr %27, align 8, !tbaa !5
  %291 = load i32, ptr %36, align 4, !tbaa !14
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds i8, ptr %290, i64 %292
  store ptr %293, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %294 = load ptr, ptr %28, align 8, !tbaa !5
  %295 = load i32, ptr %35, align 4, !tbaa !14
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds i8, ptr %294, i64 %296
  store ptr %297, ptr %38, align 8, !tbaa !5
  %298 = load ptr, ptr %38, align 8, !tbaa !5
  %299 = load ptr, ptr %37, align 8, !tbaa !5
  %300 = load ptr, ptr %3, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.HyperMat, ptr %300, i32 0, i32 2
  %302 = load i32, ptr %301, align 8, !tbaa !18
  %303 = load i32, ptr %29, align 4, !tbaa !14
  %304 = mul nsw i32 %302, %303
  %305 = sext i32 %304 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %298, ptr align 1 %299, i64 %305, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %306

306:                                              ; preds = %240
  %307 = load i32, ptr %32, align 4, !tbaa !14
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %32, align 4, !tbaa !14
  br label %233, !llvm.loop !22

309:                                              ; preds = %239
  br label %310

310:                                              ; preds = %309
  %311 = load i32, ptr %30, align 4, !tbaa !14
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %30, align 4, !tbaa !14
  br label %225, !llvm.loop !24

313:                                              ; preds = %231
  %314 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret ptr %314
}

declare i32 @cmpstr(ptr noundef, ptr noundef) #2

declare void @convert2bip(ptr noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #3

; Function Attrs: nounwind
declare double @sin(double noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #4

declare ptr @create_hyper_mat_with_data(i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @get_elemsize(i32 noundef) #5

; 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) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }

!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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 4}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !7, i64 16, !6, i64 24, !6, i64 32}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!12, !13, i64 8}
!19 = !{!12, !13, i64 12}
!20 = !{!12, !6, i64 32}
!21 = !{!12, !6, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


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

@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @hyper_mat_rotate(ptr noundef %0, double noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = tail call i32 @cmpstr(ptr noundef nonnull %3, ptr noundef nonnull @.str.9) #7
  %.not = icmp eq i32 %4, 1
  br i1 %.not, label %6, label %5

5:                                                ; preds = %2
  tail call void @convert2bip(ptr noundef %0) #7
  br label %6

6:                                                ; preds = %5, %2
  %7 = fmul double %1, 0x400921FB4D12D84A
  %8 = fdiv double %7, 1.800000e+02
  %9 = tail call double @cos(double noundef %8) #7
  %10 = tail call double @sin(double noundef %8) #7
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  %14 = sdiv i32 %13, 2
  %15 = load i32, ptr %0, align 8, !tbaa !11
  %16 = add nsw i32 %15, 1
  %17 = sdiv i32 %16, 2
  %18 = sub nsw i32 0, %17
  %19 = sitofp i32 %14 to double
  %20 = fmul double %10, %19
  %21 = fneg double %20
  %22 = sub nsw i32 0, %14
  %23 = sitofp i32 %22 to double
  %24 = insertelement <2 x i32> poison, i32 %18, i64 0
  %25 = insertelement <2 x i32> %24, i32 %17, i64 1
  %26 = sitofp <2 x i32> %25 to <2 x double>
  %27 = extractelement <2 x double> %26, i64 1
  %28 = fmul double %10, %27
  %29 = insertelement <2 x double> poison, double %9, i64 0
  %30 = shufflevector <2 x double> %29, <2 x double> poison, <2 x i32> zeroinitializer
  %31 = insertelement <2 x double> poison, double %21, i64 0
  %32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
  %33 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %30, <2 x double> %32)
  %34 = fptrunc <2 x double> %33 to <2 x float>
  %35 = shufflevector <2 x float> %34, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %36 = fneg double %28
  %37 = insertelement <2 x double> poison, double %20, i64 0
  %38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
  %39 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %30, <2 x double> %38)
  %40 = fptrunc <2 x double> %39 to <2 x float>
  %41 = fsub <2 x float> %40, %35
  %42 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %41)
  %43 = insertelement <2 x double> poison, double %23, i64 0
  %44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> zeroinitializer
  %45 = insertelement <2 x double> poison, double %36, i64 0
  %46 = insertelement <2 x double> %45, double %28, i64 1
  %47 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %44, <2 x double> %30, <2 x double> %46)
  %48 = fptrunc <2 x double> %47 to <2 x float>
  %49 = insertelement <2 x double> poison, double %19, i64 0
  %50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
  %51 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %30, <2 x double> %46)
  %52 = fptrunc <2 x double> %51 to <2 x float>
  %53 = shufflevector <2 x float> %52, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %54 = fsub <2 x float> %53, %48
  %55 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %54)
  %56 = extractelement <2 x float> %42, i64 0
  %57 = extractelement <2 x float> %42, i64 1
  %58 = fcmp ogt float %57, %56
  %59 = select i1 %58, float %57, float %56
  %60 = fptosi float %59 to i32
  %61 = extractelement <2 x float> %55, i64 0
  %62 = extractelement <2 x float> %55, i64 1
  %63 = fcmp ogt float %62, %61
  %64 = select i1 %63, float %62, float %61
  %65 = fptosi float %64 to i32
  %66 = getelementptr inbounds i8, ptr %0, i64 8
  %67 = load i32, ptr %66, align 8, !tbaa !12
  %68 = getelementptr inbounds i8, ptr %0, i64 12
  %69 = load i32, ptr %68, align 4, !tbaa !13
  %70 = getelementptr inbounds i8, ptr %0, i64 32
  %71 = load ptr, ptr %70, align 8, !tbaa !14
  %72 = tail call ptr @create_hyper_mat_with_data(i32 noundef %60, i32 noundef %65, i32 noundef %67, i32 noundef %69, ptr noundef nonnull %3, ptr noundef null, ptr noundef %71) #7
  %73 = getelementptr inbounds i8, ptr %0, i64 24
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = getelementptr inbounds i8, ptr %72, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load i32, ptr %68, align 4, !tbaa !13
  %78 = tail call i32 @get_elemsize(i32 noundef %77)
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.preheader.lr.ph, label %._crit_edge106

.preheader.lr.ph:                                 ; preds = %6
  %81 = sdiv i32 %65, 2
  %82 = sitofp i32 %81 to float
  %83 = extractelement <2 x float> %48, i64 1
  %84 = fadd float %83, %82
  %85 = fptosi float %84 to i32
  %86 = sdiv i32 %60, 2
  %87 = sitofp i32 %86 to float
  %88 = extractelement <2 x float> %34, i64 0
  %89 = fadd float %88, %87
  %90 = fptosi float %89 to i32
  %91 = sitofp i32 %90 to double
  %92 = fneg double %10
  %93 = sitofp i32 %85 to double
  %94 = load i32, ptr %0, align 8, !tbaa !11
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.preheader, label %._crit_edge106

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %96 = phi i32 [ %101, %._crit_edge ], [ %79, %.preheader.lr.ph ]
  %97 = phi i32 [ %102, %._crit_edge ], [ %94, %.preheader.lr.ph ]
  %.0105 = phi i32 [ %103, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %99 = uitofp nneg i32 %.0105 to double
  %100 = fmul double %92, %99
  br label %105

._crit_edge106:                                   ; preds = %._crit_edge, %.preheader.lr.ph, %6
  ret ptr %72

._crit_edge.loopexit:                             ; preds = %105
  %.pre = load i32, ptr %11, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %101 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %96, %.preheader ]
  %102 = phi i32 [ %129, %._crit_edge.loopexit ], [ %97, %.preheader ]
  %103 = add nuw nsw i32 %.0105, 1
  %104 = icmp slt i32 %103, %101
  br i1 %104, label %.preheader, label %._crit_edge106, !llvm.loop !16

105:                                              ; preds = %.lr.ph, %105
  %106 = phi i32 [ %97, %.lr.ph ], [ %129, %105 ]
  %.0102104 = phi i32 [ 0, %.lr.ph ], [ %128, %105 ]
  %107 = uitofp nneg i32 %.0102104 to double
  %108 = fmul double %10, %107
  %109 = tail call double @llvm.fmuladd.f64(double %99, double %9, double %108)
  %110 = fadd double %109, %91
  %111 = fptosi double %110 to i32
  %112 = tail call double @llvm.fmuladd.f64(double %107, double %9, double %100)
  %113 = fadd double %112, %93
  %114 = fptosi double %113 to i32
  %115 = mul nsw i32 %111, %60
  %116 = add nsw i32 %115, %114
  %117 = load i32, ptr %66, align 8, !tbaa !12
  %118 = mul i32 %117, %78
  %119 = mul i32 %118, %116
  %120 = mul nsw i32 %106, %.0105
  %121 = add nsw i32 %120, %.0102104
  %122 = mul i32 %118, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i8, ptr %74, i64 %123
  %125 = sext i32 %119 to i64
  %126 = getelementptr inbounds i8, ptr %76, i64 %125
  %127 = sext i32 %118 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %126, ptr align 1 %124, i64 %127, i1 false)
  %128 = add nuw nsw i32 %.0102104, 1
  %129 = load i32, ptr %0, align 8, !tbaa !11
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %105, label %._crit_edge.loopexit, !llvm.loop !19
}

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

declare void @convert2bip(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @get_elemsize(i32 noundef) local_unnamed_addr #4

; 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) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fabs.v2f32(<2 x float>) #6

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(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }

!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 4}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !8, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !10, i64 32}
!15 = !{!6, !10, i64 24}
!16 = distinct !{!16, !17, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !17}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass