; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl (liop)

; 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._VlLiopDesc = type { i32, i32, float, i64, i64, i64, ptr, ptr, ptr, float, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__.vl_liopdesc_new = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @vl_liopdesc_new(i32 noundef %0, i32 noundef %1, float noundef %2, i64 noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i64, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store float %2, ptr %7, align 4, !tbaa !9
  store i64 %3, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %28 = call ptr @vl_calloc(i64 noundef 104, i64 noundef 1)
  store ptr %28, ptr %11, align 8, !tbaa !13
  %29 = load float, ptr %7, align 4, !tbaa !9
  %30 = load i64, ptr %8, align 8, !tbaa !11
  %31 = udiv i64 %30, 2
  %32 = uitofp i64 %31 to float
  %33 = fcmp ole float %29, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %4
  br label %36

35:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 327, ptr noundef @__PRETTY_FUNCTION__.vl_liopdesc_new) #7
  unreachable

36:                                               ; preds = %34
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = load ptr, ptr %11, align 8, !tbaa !13
  %39 = getelementptr inbounds %struct._VlLiopDesc, ptr %38, i32 0, i32 0
  store i32 %37, ptr %39, align 8, !tbaa !15
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !13
  %42 = getelementptr inbounds %struct._VlLiopDesc, ptr %41, i32 0, i32 1
  store i32 %40, ptr %42, align 4, !tbaa !17
  %43 = load float, ptr %7, align 4, !tbaa !9
  %44 = load ptr, ptr %11, align 8, !tbaa !13
  %45 = getelementptr inbounds %struct._VlLiopDesc, ptr %44, i32 0, i32 9
  store float %43, ptr %45, align 8, !tbaa !18
  %46 = load ptr, ptr %11, align 8, !tbaa !13
  %47 = getelementptr inbounds %struct._VlLiopDesc, ptr %46, i32 0, i32 2
  store float 0xBF94141420000000, ptr %47, align 8, !tbaa !19
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = call i32 @factorial(i32 noundef %48)
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = mul nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = load ptr, ptr %11, align 8, !tbaa !13
  %54 = getelementptr inbounds %struct._VlLiopDesc, ptr %53, i32 0, i32 3
  store i64 %52, ptr %54, align 8, !tbaa !20
  %55 = load ptr, ptr %11, align 8, !tbaa !13
  %56 = getelementptr inbounds %struct._VlLiopDesc, ptr %55, i32 0, i32 5
  store i64 0, ptr %56, align 8, !tbaa !21
  %57 = load i64, ptr %8, align 8, !tbaa !11
  %58 = mul i64 8, %57
  %59 = load i64, ptr %8, align 8, !tbaa !11
  %60 = mul i64 %58, %59
  %61 = call ptr @vl_malloc(i64 noundef %60)
  %62 = load ptr, ptr %11, align 8, !tbaa !13
  %63 = getelementptr inbounds %struct._VlLiopDesc, ptr %62, i32 0, i32 6
  store ptr %61, ptr %63, align 8, !tbaa !22
  %64 = load i64, ptr %8, align 8, !tbaa !11
  %65 = load ptr, ptr %11, align 8, !tbaa !13
  %66 = getelementptr inbounds %struct._VlLiopDesc, ptr %65, i32 0, i32 4
  store i64 %64, ptr %66, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %67 = load i64, ptr %8, align 8, !tbaa !11
  %68 = sub i64 %67, 1
  %69 = udiv i64 %68, 2
  store i64 %69, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %70 = load i64, ptr %14, align 8, !tbaa !11
  %71 = sitofp i64 %70 to float
  %72 = load float, ptr %7, align 4, !tbaa !9
  %73 = fsub float %71, %72
  %74 = fpext float %73 to double
  %75 = fadd double %74, 6.000000e-01
  store double %75, ptr %15, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %76 = load double, ptr %15, align 8, !tbaa !24
  %77 = load double, ptr %15, align 8, !tbaa !24
  %78 = fmul double %76, %77
  %79 = fptosi double %78 to i64
  store i64 %79, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !11
  br label %80

80:                                               ; preds = %138, %36
  %81 = load i64, ptr %13, align 8, !tbaa !11
  %82 = load i64, ptr %8, align 8, !tbaa !11
  %83 = trunc i64 %82 to i32
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %81, %84
  br i1 %85, label %86, label %141

86:                                               ; preds = %80
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %134, %86
  %88 = load i64, ptr %12, align 8, !tbaa !11
  %89 = load i64, ptr %8, align 8, !tbaa !11
  %90 = trunc i64 %89 to i32
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %88, %91
  br i1 %92, label %93, label %137

93:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %94 = load i64, ptr %12, align 8, !tbaa !11
  %95 = load i64, ptr %14, align 8, !tbaa !11
  %96 = sub nsw i64 %94, %95
  store i64 %96, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %97 = load i64, ptr %13, align 8, !tbaa !11
  %98 = load i64, ptr %14, align 8, !tbaa !11
  %99 = sub nsw i64 %97, %98
  store i64 %99, ptr %18, align 8, !tbaa !11
  %100 = load i64, ptr %12, align 8, !tbaa !11
  %101 = icmp eq i64 %100, 0
  br i1 %101, label %102, label %106

102:                                              ; preds = %93
  %103 = load i64, ptr %13, align 8, !tbaa !11
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %102
  store i32 7, ptr %19, align 4
  br label %131

106:                                              ; preds = %102, %93
  %107 = load i64, ptr %17, align 8, !tbaa !11
  %108 = load i64, ptr %17, align 8, !tbaa !11
  %109 = mul nsw i64 %107, %108
  %110 = load i64, ptr %18, align 8, !tbaa !11
  %111 = load i64, ptr %18, align 8, !tbaa !11
  %112 = mul nsw i64 %110, %111
  %113 = add nsw i64 %109, %112
  %114 = load i64, ptr %16, align 8, !tbaa !11
  %115 = icmp sle i64 %113, %114
  br i1 %115, label %116, label %130

116:                                              ; preds = %106
  %117 = load i64, ptr %12, align 8, !tbaa !11
  %118 = load i64, ptr %13, align 8, !tbaa !11
  %119 = load i64, ptr %8, align 8, !tbaa !11
  %120 = mul i64 %118, %119
  %121 = add i64 %117, %120
  %122 = load ptr, ptr %11, align 8, !tbaa !13
  %123 = getelementptr inbounds %struct._VlLiopDesc, ptr %122, i32 0, i32 6
  %124 = load ptr, ptr %123, align 8, !tbaa !22
  %125 = load ptr, ptr %11, align 8, !tbaa !13
  %126 = getelementptr inbounds %struct._VlLiopDesc, ptr %125, i32 0, i32 5
  %127 = load i64, ptr %126, align 8, !tbaa !21
  %128 = add i64 %127, 1
  store i64 %128, ptr %126, align 8, !tbaa !21
  %129 = getelementptr inbounds i64, ptr %124, i64 %127
  store i64 %121, ptr %129, align 8, !tbaa !11
  br label %130

130:                                              ; preds = %116, %106
  store i32 0, ptr %19, align 4
  br label %131

131:                                              ; preds = %130, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  %132 = load i32, ptr %19, align 4
  switch i32 %132, label %309 [
    i32 0, label %133
    i32 7, label %134
  ]

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133, %131
  %135 = load i64, ptr %12, align 8, !tbaa !11
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %12, align 8, !tbaa !11
  br label %87, !llvm.loop !26

137:                                              ; preds = %87
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %13, align 8, !tbaa !11
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %13, align 8, !tbaa !11
  br label %80, !llvm.loop !28

141:                                              ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %142 = load ptr, ptr %11, align 8, !tbaa !13
  %143 = getelementptr inbounds %struct._VlLiopDesc, ptr %142, i32 0, i32 5
  %144 = load i64, ptr %143, align 8, !tbaa !21
  %145 = mul i64 8, %144
  %146 = call ptr @vl_malloc(i64 noundef %145)
  %147 = load ptr, ptr %11, align 8, !tbaa !13
  %148 = getelementptr inbounds %struct._VlLiopDesc, ptr %147, i32 0, i32 7
  store ptr %146, ptr %148, align 8, !tbaa !29
  %149 = load ptr, ptr %11, align 8, !tbaa !13
  %150 = getelementptr inbounds %struct._VlLiopDesc, ptr %149, i32 0, i32 5
  %151 = load i64, ptr %150, align 8, !tbaa !21
  %152 = mul i64 8, %151
  %153 = call ptr @vl_malloc(i64 noundef %152)
  %154 = load ptr, ptr %11, align 8, !tbaa !13
  %155 = getelementptr inbounds %struct._VlLiopDesc, ptr %154, i32 0, i32 8
  store ptr %153, ptr %155, align 8, !tbaa !30
  %156 = load ptr, ptr %11, align 8, !tbaa !13
  %157 = getelementptr inbounds %struct._VlLiopDesc, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !15
  %159 = sext i32 %158 to i64
  %160 = mul i64 8, %159
  %161 = call ptr @vl_malloc(i64 noundef %160)
  %162 = load ptr, ptr %11, align 8, !tbaa !13
  %163 = getelementptr inbounds %struct._VlLiopDesc, ptr %162, i32 0, i32 11
  store ptr %161, ptr %163, align 8, !tbaa !31
  %164 = load ptr, ptr %11, align 8, !tbaa !13
  %165 = getelementptr inbounds %struct._VlLiopDesc, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 8, !tbaa !15
  %167 = sext i32 %166 to i64
  %168 = mul i64 4, %167
  %169 = call ptr @vl_malloc(i64 noundef %168)
  %170 = load ptr, ptr %11, align 8, !tbaa !13
  %171 = getelementptr inbounds %struct._VlLiopDesc, ptr %170, i32 0, i32 10
  store ptr %169, ptr %171, align 8, !tbaa !32
  %172 = load ptr, ptr %11, align 8, !tbaa !13
  %173 = getelementptr inbounds %struct._VlLiopDesc, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 8, !tbaa !15
  %175 = sext i32 %174 to i64
  %176 = load ptr, ptr %11, align 8, !tbaa !13
  %177 = getelementptr inbounds %struct._VlLiopDesc, ptr %176, i32 0, i32 5
  %178 = load i64, ptr %177, align 8, !tbaa !21
  %179 = mul i64 %175, %178
  %180 = call ptr @vl_calloc(i64 noundef 8, i64 noundef %179)
  %181 = load ptr, ptr %11, align 8, !tbaa !13
  %182 = getelementptr inbounds %struct._VlLiopDesc, ptr %181, i32 0, i32 12
  store ptr %180, ptr %182, align 8, !tbaa !33
  %183 = load ptr, ptr %11, align 8, !tbaa !13
  %184 = getelementptr inbounds %struct._VlLiopDesc, ptr %183, i32 0, i32 0
  %185 = load i32, ptr %184, align 8, !tbaa !15
  %186 = sext i32 %185 to i64
  %187 = load ptr, ptr %11, align 8, !tbaa !13
  %188 = getelementptr inbounds %struct._VlLiopDesc, ptr %187, i32 0, i32 5
  %189 = load i64, ptr %188, align 8, !tbaa !21
  %190 = mul i64 %186, %189
  %191 = call ptr @vl_calloc(i64 noundef 8, i64 noundef %190)
  %192 = load ptr, ptr %11, align 8, !tbaa !13
  %193 = getelementptr inbounds %struct._VlLiopDesc, ptr %192, i32 0, i32 13
  store ptr %191, ptr %193, align 8, !tbaa !34
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %194

194:                                              ; preds = %304, %141
  %195 = load i64, ptr %9, align 8, !tbaa !11
  %196 = load ptr, ptr %11, align 8, !tbaa !13
  %197 = getelementptr inbounds %struct._VlLiopDesc, ptr %196, i32 0, i32 5
  %198 = load i64, ptr %197, align 8, !tbaa !21
  %199 = trunc i64 %198 to i32
  %200 = sext i32 %199 to i64
  %201 = icmp slt i64 %195, %200
  br i1 %201, label %202, label %307

202:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %203 = load ptr, ptr %11, align 8, !tbaa !13
  %204 = getelementptr inbounds %struct._VlLiopDesc, ptr %203, i32 0, i32 0
  %205 = load i32, ptr %204, align 8, !tbaa !15
  %206 = sitofp i32 %205 to double
  %207 = fdiv double 0x401921FB54442D18, %206
  store double %207, ptr %23, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %208 = load i64, ptr %8, align 8, !tbaa !11
  %209 = sub i64 %208, 1
  %210 = udiv i64 %209, 2
  store i64 %210, ptr %25, align 8, !tbaa !11
  %211 = load ptr, ptr %11, align 8, !tbaa !13
  %212 = getelementptr inbounds %struct._VlLiopDesc, ptr %211, i32 0, i32 6
  %213 = load ptr, ptr %212, align 8, !tbaa !22
  %214 = load i64, ptr %9, align 8, !tbaa !11
  %215 = getelementptr inbounds i64, ptr %213, i64 %214
  %216 = load i64, ptr %215, align 8, !tbaa !11
  store i64 %216, ptr %20, align 8, !tbaa !11
  %217 = load i64, ptr %20, align 8, !tbaa !11
  %218 = load ptr, ptr %11, align 8, !tbaa !13
  %219 = getelementptr inbounds %struct._VlLiopDesc, ptr %218, i32 0, i32 4
  %220 = load i64, ptr %219, align 8, !tbaa !23
  %221 = trunc i64 %220 to i32
  %222 = sext i32 %221 to i64
  %223 = srem i64 %217, %222
  %224 = load i64, ptr %25, align 8, !tbaa !11
  %225 = sub nsw i64 %223, %224
  %226 = sitofp i64 %225 to double
  store double %226, ptr %21, align 8, !tbaa !24
  %227 = load i64, ptr %20, align 8, !tbaa !11
  %228 = load ptr, ptr %11, align 8, !tbaa !13
  %229 = getelementptr inbounds %struct._VlLiopDesc, ptr %228, i32 0, i32 4
  %230 = load i64, ptr %229, align 8, !tbaa !23
  %231 = trunc i64 %230 to i32
  %232 = sext i32 %231 to i64
  %233 = sdiv i64 %227, %232
  %234 = load i64, ptr %25, align 8, !tbaa !11
  %235 = sub nsw i64 %233, %234
  %236 = sitofp i64 %235 to double
  store double %236, ptr %22, align 8, !tbaa !24
  %237 = load double, ptr %22, align 8, !tbaa !24
  %238 = load double, ptr %21, align 8, !tbaa !24
  %239 = call double @atan2(double noundef %237, double noundef %238) #6
  store double %239, ptr %24, align 8, !tbaa !24
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %240

240:                                              ; preds = %300, %202
  %241 = load i64, ptr %10, align 8, !tbaa !11
  %242 = load ptr, ptr %11, align 8, !tbaa !13
  %243 = getelementptr inbounds %struct._VlLiopDesc, ptr %242, i32 0, i32 0
  %244 = load i32, ptr %243, align 8, !tbaa !15
  %245 = sext i32 %244 to i64
  %246 = icmp slt i64 %241, %245
  br i1 %246, label %247, label %303

247:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %248 = load double, ptr %21, align 8, !tbaa !24
  %249 = load float, ptr %7, align 4, !tbaa !9
  %250 = fpext float %249 to double
  %251 = load double, ptr %24, align 8, !tbaa !24
  %252 = load double, ptr %23, align 8, !tbaa !24
  %253 = load i64, ptr %10, align 8, !tbaa !11
  %254 = sitofp i64 %253 to double
  %255 = call double @llvm.fmuladd.f64(double %252, double %254, double %251)
  %256 = call double @cos(double noundef %255) #6
  %257 = call double @llvm.fmuladd.f64(double %250, double %256, double %248)
  %258 = load i64, ptr %25, align 8, !tbaa !11
  %259 = sitofp i64 %258 to double
  %260 = fadd double %257, %259
  store double %260, ptr %26, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %261 = load double, ptr %22, align 8, !tbaa !24
  %262 = load float, ptr %7, align 4, !tbaa !9
  %263 = fpext float %262 to double
  %264 = load double, ptr %24, align 8, !tbaa !24
  %265 = load double, ptr %23, align 8, !tbaa !24
  %266 = load i64, ptr %10, align 8, !tbaa !11
  %267 = sitofp i64 %266 to double
  %268 = call double @llvm.fmuladd.f64(double %265, double %267, double %264)
  %269 = call double @sin(double noundef %268) #6
  %270 = call double @llvm.fmuladd.f64(double %263, double %269, double %261)
  %271 = load i64, ptr %25, align 8, !tbaa !11
  %272 = sitofp i64 %271 to double
  %273 = fadd double %270, %272
  store double %273, ptr %27, align 8, !tbaa !24
  %274 = load double, ptr %26, align 8, !tbaa !24
  %275 = load ptr, ptr %11, align 8, !tbaa !13
  %276 = getelementptr inbounds %struct._VlLiopDesc, ptr %275, i32 0, i32 12
  %277 = load ptr, ptr %276, align 8, !tbaa !33
  %278 = load i64, ptr %10, align 8, !tbaa !11
  %279 = load ptr, ptr %11, align 8, !tbaa !13
  %280 = getelementptr inbounds %struct._VlLiopDesc, ptr %279, i32 0, i32 0
  %281 = load i32, ptr %280, align 8, !tbaa !15
  %282 = sext i32 %281 to i64
  %283 = load i64, ptr %9, align 8, !tbaa !11
  %284 = mul nsw i64 %282, %283
  %285 = add nsw i64 %278, %284
  %286 = getelementptr inbounds double, ptr %277, i64 %285
  store double %274, ptr %286, align 8, !tbaa !24
  %287 = load double, ptr %27, align 8, !tbaa !24
  %288 = load ptr, ptr %11, align 8, !tbaa !13
  %289 = getelementptr inbounds %struct._VlLiopDesc, ptr %288, i32 0, i32 13
  %290 = load ptr, ptr %289, align 8, !tbaa !34
  %291 = load i64, ptr %10, align 8, !tbaa !11
  %292 = load ptr, ptr %11, align 8, !tbaa !13
  %293 = getelementptr inbounds %struct._VlLiopDesc, ptr %292, i32 0, i32 0
  %294 = load i32, ptr %293, align 8, !tbaa !15
  %295 = sext i32 %294 to i64
  %296 = load i64, ptr %9, align 8, !tbaa !11
  %297 = mul nsw i64 %295, %296
  %298 = add nsw i64 %291, %297
  %299 = getelementptr inbounds double, ptr %290, i64 %298
  store double %287, ptr %299, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %300

300:                                              ; preds = %247
  %301 = load i64, ptr %10, align 8, !tbaa !11
  %302 = add nsw i64 %301, 1
  store i64 %302, ptr %10, align 8, !tbaa !11
  br label %240, !llvm.loop !35

303:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %304

304:                                              ; preds = %303
  %305 = load i64, ptr %9, align 8, !tbaa !11
  %306 = add nsw i64 %305, 1
  store i64 %306, ptr %9, align 8, !tbaa !11
  br label %194, !llvm.loop !36

307:                                              ; preds = %194
  %308 = load ptr, ptr %11, align 8, !tbaa !13
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret ptr %308

309:                                              ; preds = %131
  unreachable
}

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

declare ptr @vl_calloc(i64 noundef, i64 noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @factorial(i32 noundef) #0

declare ptr @vl_malloc(i64 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
declare double @atan2(double noundef, double noundef) #4

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

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

; Function Attrs: nounwind
declare double @sin(double noundef) #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 = { noreturn 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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_VlLiopDesc", !6, i64 0, !6, i64 4, !10, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !10, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !10, i64 64}
!19 = !{!16, !10, i64 8}
!20 = !{!16, !12, i64 16}
!21 = !{!16, !12, i64 32}
!22 = !{!16, !14, i64 40}
!23 = !{!16, !12, i64 24}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!16, !14, i64 48}
!30 = !{!16, !14, i64 56}
!31 = !{!16, !14, i64 80}
!32 = !{!16, !14, i64 72}
!33 = !{!16, !14, i64 88}
!34 = !{!16, !14, i64 96}
!35 = distinct !{!35, !27}
!36 = distinct !{!36, !27}


; 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 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__.vl_liopdesc_new = external hidden unnamed_addr constant [60 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @vl_liopdesc_new(i32 noundef %0, i32 noundef %1, float noundef %2, i64 noundef %3) local_unnamed_addr #0 {
  %5 = tail call ptr @vl_calloc(i64 noundef 104, i64 noundef 1) #5
  %6 = lshr i64 %3, 1
  %7 = uitofp nneg i64 %6 to float
  %8 = fcmp ult float %7, %2
  br i1 %8, label %9, label %10

9:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 327, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_liopdesc_new) #6
  unreachable

10:                                               ; preds = %4
  store i32 %0, ptr %5, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %1, ptr %11, align 4, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %5, i64 64
  store float %2, ptr %12, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  store float 0xBF94141420000000, ptr %13, align 8, !tbaa !15
  %14 = tail call i32 @factorial(i32 noundef %0)
  %15 = mul nsw i32 %14, %1
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 %16, ptr %17, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %5, i64 32
  store i64 0, ptr %18, align 8, !tbaa !17
  %19 = shl i64 %3, 3
  %20 = mul i64 %19, %3
  %21 = tail call ptr @vl_malloc(i64 noundef %20) #5
  %22 = getelementptr inbounds i8, ptr %5, i64 40
  store ptr %21, ptr %22, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 %3, ptr %23, align 8, !tbaa !19
  %24 = add i64 %3, -1
  %25 = lshr i64 %24, 1
  %26 = uitofp nneg i64 %25 to float
  %27 = fsub float %26, %2
  %28 = fpext float %27 to double
  %29 = fadd double %28, 6.000000e-01
  %30 = fmul double %29, %29
  %31 = fptosi double %30 to i64
  %sext = shl i64 %3, 32
  %32 = ashr exact i64 %sext, 32
  %33 = icmp sgt i64 %32, 0
  br i1 %33, label %.preheader.us, label %._crit_edge109

.preheader.us:                                    ; preds = %10, %._crit_edge.us
  %.0102108.us = phi i64 [ %50, %._crit_edge.us ], [ 0, %10 ]
  %34 = sub nsw i64 %.0102108.us, %25
  %35 = mul nsw i64 %34, %34
  %36 = mul i64 %.0102108.us, %3
  br label %37

37:                                               ; preds = %.preheader.us, %48
  %.0101107.us = phi i64 [ 0, %.preheader.us ], [ %49, %48 ]
  %38 = or i64 %.0101107.us, %.0102108.us
  %or.cond.us = icmp eq i64 %38, 0
  br i1 %or.cond.us, label %48, label %39

39:                                               ; preds = %37
  %40 = sub nsw i64 %.0101107.us, %25
  %41 = mul nsw i64 %40, %40
  %42 = add nuw nsw i64 %41, %35
  %.not.us = icmp sgt i64 %42, %31
  br i1 %.not.us, label %48, label %43

43:                                               ; preds = %39
  %44 = add i64 %.0101107.us, %36
  %45 = load i64, ptr %18, align 8, !tbaa !17
  %46 = add i64 %45, 1
  store i64 %46, ptr %18, align 8, !tbaa !17
  %47 = getelementptr inbounds i64, ptr %21, i64 %45
  store i64 %44, ptr %47, align 8, !tbaa !20
  br label %48

48:                                               ; preds = %43, %39, %37
  %49 = add nuw nsw i64 %.0101107.us, 1
  %exitcond.not = icmp eq i64 %49, %32
  br i1 %exitcond.not, label %._crit_edge.us, label %37, !llvm.loop !21

._crit_edge.us:                                   ; preds = %48
  %50 = add nuw nsw i64 %.0102108.us, 1
  %exitcond116.not = icmp eq i64 %50, %32
  br i1 %exitcond116.not, label %._crit_edge109, label %.preheader.us, !llvm.loop !23

._crit_edge109:                                   ; preds = %._crit_edge.us, %10
  %51 = load i64, ptr %18, align 8, !tbaa !17
  %52 = shl i64 %51, 3
  %53 = tail call ptr @vl_malloc(i64 noundef %52) #5
  %54 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr %53, ptr %54, align 8, !tbaa !24
  %55 = load i64, ptr %18, align 8, !tbaa !17
  %56 = shl i64 %55, 3
  %57 = tail call ptr @vl_malloc(i64 noundef %56) #5
  %58 = getelementptr inbounds i8, ptr %5, i64 56
  store ptr %57, ptr %58, align 8, !tbaa !25
  %59 = load i32, ptr %5, align 8, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = shl nsw i64 %60, 3
  %62 = tail call ptr @vl_malloc(i64 noundef %61) #5
  %63 = getelementptr inbounds i8, ptr %5, i64 80
  store ptr %62, ptr %63, align 8, !tbaa !26
  %64 = load i32, ptr %5, align 8, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = shl nsw i64 %65, 2
  %67 = tail call ptr @vl_malloc(i64 noundef %66) #5
  %68 = getelementptr inbounds i8, ptr %5, i64 72
  store ptr %67, ptr %68, align 8, !tbaa !27
  %69 = load i32, ptr %5, align 8, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = load i64, ptr %18, align 8, !tbaa !17
  %72 = mul i64 %71, %70
  %73 = tail call ptr @vl_calloc(i64 noundef 8, i64 noundef %72) #5
  %74 = getelementptr inbounds i8, ptr %5, i64 88
  store ptr %73, ptr %74, align 8, !tbaa !28
  %75 = load i32, ptr %5, align 8, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = load i64, ptr %18, align 8, !tbaa !17
  %78 = mul i64 %77, %76
  %79 = tail call ptr @vl_calloc(i64 noundef 8, i64 noundef %78) #5
  %80 = getelementptr inbounds i8, ptr %5, i64 96
  store ptr %79, ptr %80, align 8, !tbaa !29
  %81 = load i64, ptr %18, align 8, !tbaa !17
  %82 = trunc i64 %81 to i32
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph114, label %._crit_edge115

.lr.ph114:                                        ; preds = %._crit_edge109
  %84 = fpext float %2 to double
  %85 = uitofp nneg i64 %25 to double
  %.pre = load i32, ptr %5, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %.lr.ph114, %._crit_edge
  %87 = phi i32 [ %.pre, %.lr.ph114 ], [ %123, %._crit_edge ]
  %.0112 = phi i64 [ 0, %.lr.ph114 ], [ %124, %._crit_edge ]
  %88 = sitofp i32 %87 to double
  %89 = fdiv double 0x401921FB54442D18, %88
  %90 = load ptr, ptr %22, align 8, !tbaa !18
  %91 = getelementptr inbounds i64, ptr %90, i64 %.0112
  %92 = load i64, ptr %91, align 8, !tbaa !20
  %93 = load i64, ptr %23, align 8, !tbaa !19
  %sext106 = shl i64 %93, 32
  %94 = ashr exact i64 %sext106, 32
  %95 = srem i64 %92, %94
  %96 = sub nsw i64 %95, %25
  %97 = sitofp i64 %96 to double
  %98 = sdiv i64 %92, %94
  %99 = sub nsw i64 %98, %25
  %100 = sitofp i64 %99 to double
  %101 = tail call double @atan2(double noundef %100, double noundef %97) #5
  %102 = load i32, ptr %5, align 8, !tbaa !5
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %86, %.lr.ph
  %.0100110 = phi i64 [ %121, %.lr.ph ], [ 0, %86 ]
  %104 = uitofp nneg i64 %.0100110 to double
  %105 = tail call double @llvm.fmuladd.f64(double %89, double %104, double %101)
  %106 = tail call double @cos(double noundef %105) #5
  %107 = tail call double @llvm.fmuladd.f64(double %84, double %106, double %97)
  %108 = fadd double %107, %85
  %109 = tail call double @sin(double noundef %105) #5
  %110 = tail call double @llvm.fmuladd.f64(double %84, double %109, double %100)
  %111 = fadd double %110, %85
  %112 = load ptr, ptr %74, align 8, !tbaa !28
  %113 = load i32, ptr %5, align 8, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = mul nsw i64 %.0112, %114
  %116 = getelementptr double, ptr %112, i64 %.0100110
  %117 = getelementptr double, ptr %116, i64 %115
  store double %108, ptr %117, align 8, !tbaa !30
  %118 = load ptr, ptr %80, align 8, !tbaa !29
  %119 = getelementptr double, ptr %118, i64 %.0100110
  %120 = getelementptr double, ptr %119, i64 %115
  store double %111, ptr %120, align 8, !tbaa !30
  %121 = add nuw nsw i64 %.0100110, 1
  %122 = icmp slt i64 %121, %114
  br i1 %122, label %.lr.ph, label %._crit_edge, !llvm.loop !32

._crit_edge:                                      ; preds = %.lr.ph, %86
  %123 = phi i32 [ %102, %86 ], [ %113, %.lr.ph ]
  %124 = add nuw nsw i64 %.0112, 1
  %125 = load i64, ptr %18, align 8, !tbaa !17
  %sext105 = shl i64 %125, 32
  %126 = ashr exact i64 %sext105, 32
  %127 = icmp slt i64 %124, %126
  br i1 %127, label %86, label %._crit_edge115, !llvm.loop !33

._crit_edge115:                                   ; preds = %._crit_edge, %._crit_edge109
  ret ptr %5
}

declare ptr @vl_calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @factorial(i32 noundef) local_unnamed_addr #0

declare ptr @vl_malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @atan2(double noundef, double noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) 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 = { noreturn 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 0}
!6 = !{!"_VlLiopDesc", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !10, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !10, i64 64}
!15 = !{!6, !10, i64 8}
!16 = !{!6, !11, i64 16}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !12, i64 40}
!19 = !{!6, !11, i64 24}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!6, !12, i64 48}
!25 = !{!6, !12, i64 56}
!26 = !{!6, !12, i64 80}
!27 = !{!6, !12, i64 72}
!28 = !{!6, !12, i64 88}
!29 = !{!6, !12, i64 96}
!30 = !{!31, !31, i64 0}
!31 = !{!"double", !8, i64 0}
!32 = distinct !{!32, !22}
!33 = distinct !{!33, !22}


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