; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/Numerics/FEM/src (dsrc2c)

; 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.anon = type { i64, i64, i64, i64, i64, i64 }
%struct.anon.0 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.anon.1 = type { i64, i64, i64, i64, i64 }

@itcom1_ = external hidden global %struct.anon, align 8
@c__1 = external hidden global i64, align 8
@itcom3_ = external hidden global %struct.anon.0, align 8
@c__0 = external hidden global i64, align 8
@c_b21 = external hidden global double, align 8
@itcom2_ = external hidden global %struct.anon.1, align 8
@c__3 = external hidden global i64, align 8
@itsor_.h = external hidden global double, align 8
@itsor_.q1 = external hidden global i64, align 8
@itsor_.ip = external hidden global i64, align 8
@itsor_.iss = external hidden global i64, align 8
@itsor_.dnrm = external hidden global double, align 8
@itsor_.iphat = external hidden global i64, align 8
@itsor_.spcrm1 = external hidden global double, align 8
@itsor_.change = external hidden global i64, align 8
@itsor_.omegap = external hidden global double, align 8
@itsor_.ipstar = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
declare dso_local i32 @itpackdcopy_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @itsor_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca double, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %16 = load i64, ptr @itcom1_, align 8, !tbaa !9
  %17 = icmp ne i64 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %7
  br label %32

19:                                               ; preds = %7
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %13, align 8, !tbaa !5
  %22 = call i32 @pstop_(ptr noundef %20, ptr noundef %21, ptr noundef @c_b21, ptr noundef @c_b21, ptr noundef @c__0, ptr noundef @itsor_.q1)
  %23 = load i64, ptr @itcom2_, align 8, !tbaa !12
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %19
  store i64 0, ptr @itsor_.change, align 8, !tbaa !14
  store i64 0, ptr @itsor_.ip, align 8, !tbaa !14
  store i64 2, ptr @itsor_.iphat, align 8, !tbaa !14
  store i64 0, ptr @itsor_.iss, align 8, !tbaa !14
  br label %66

26:                                               ; preds = %19
  store i64 1, ptr @itsor_.change, align 8, !tbaa !14
  store i64 0, ptr @itsor_.ip, align 8, !tbaa !14
  %27 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  store double %27, ptr @itsor_.omegap, align 8, !tbaa !18
  store double 1.000000e+00, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  store i64 0, ptr @itsor_.iss, align 8, !tbaa !14
  store i64 2, ptr @itsor_.iphat, align 8, !tbaa !14
  store i64 4, ptr @itsor_.ipstar, align 8, !tbaa !14
  %28 = load double, ptr @itsor_.omegap, align 8, !tbaa !18
  %29 = fcmp ole double %28, 1.000000e+00
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  store i64 0, ptr @itsor_.change, align 8, !tbaa !14
  br label %31

31:                                               ; preds = %30, %26
  br label %32

32:                                               ; preds = %31, %18
  %33 = load i64, ptr @itsor_.change, align 8, !tbaa !14
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %35, label %65

35:                                               ; preds = %32
  store i64 0, ptr @itsor_.change, align 8, !tbaa !14
  %36 = load i64, ptr getelementptr inbounds (%struct.anon, ptr @itcom1_, i32 0, i32 1), align 8, !tbaa !19
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr getelementptr inbounds (%struct.anon, ptr @itcom1_, i32 0, i32 1), align 8, !tbaa !19
  store i64 0, ptr @itsor_.ip, align 8, !tbaa !14
  store i64 0, ptr @itsor_.iss, align 8, !tbaa !14
  %38 = load double, ptr @itsor_.omegap, align 8, !tbaa !18
  %39 = call double @tau_(ptr noundef getelementptr inbounds (%struct.anon, ptr @itcom1_, i32 0, i32 1))
  %40 = fcmp ole double %38, %39
  br i1 %40, label %41, label %43

41:                                               ; preds = %35
  %42 = load double, ptr @itsor_.omegap, align 8, !tbaa !18
  br label %45

43:                                               ; preds = %35
  %44 = call double @tau_(ptr noundef getelementptr inbounds (%struct.anon, ptr @itcom1_, i32 0, i32 1))
  br label %45

45:                                               ; preds = %43, %41
  %46 = phi double [ %42, %41 ], [ %44, %43 ]
  store double %46, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %47 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %48 = fsub double %47, 1.000000e+00
  %49 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %50 = fsub double 2.000000e+00, %49
  %51 = fdiv double %48, %50
  %52 = fptosi double %51 to i64
  %53 = icmp sge i64 3, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %45
  br label %62

55:                                               ; preds = %45
  %56 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %57 = fsub double %56, 1.000000e+00
  %58 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %59 = fsub double 2.000000e+00, %58
  %60 = fdiv double %57, %59
  %61 = fptosi double %60 to i64
  br label %62

62:                                               ; preds = %55, %54
  %63 = phi i64 [ 3, %54 ], [ %61, %55 ]
  store i64 %63, ptr @itsor_.iphat, align 8, !tbaa !14
  %64 = call i64 @ipstr_(ptr noundef getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7))
  store i64 %64, ptr @itsor_.ipstar, align 8, !tbaa !14
  br label %65

65:                                               ; preds = %62, %32
  br label %66

66:                                               ; preds = %65, %25
  %67 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 3), align 8, !tbaa !20
  store double %67, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 4), align 8, !tbaa !21
  %68 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  store double %68, ptr @itsor_.spcrm1, align 8, !tbaa !18
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = call i32 @itpackdcopy_(ptr noundef %69, ptr noundef %70, ptr noundef @c__1, ptr noundef %71, ptr noundef @c__1)
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = call i32 @pfsor1_(ptr noundef %73, ptr noundef %74, ptr noundef %75, ptr noundef %76, ptr noundef %77, ptr noundef %78)
  %80 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 3), align 8, !tbaa !20
  %81 = fcmp oeq double %80, 0.000000e+00
  br i1 %81, label %82, label %83

82:                                               ; preds = %66
  br label %107

83:                                               ; preds = %66
  %84 = load i64, ptr @itcom1_, align 8, !tbaa !9
  %85 = icmp ne i64 %84, 0
  br i1 %85, label %86, label %90

86:                                               ; preds = %83
  %87 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 3), align 8, !tbaa !20
  %88 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 4), align 8, !tbaa !21
  %89 = fdiv double %87, %88
  store double %89, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  br label %90

90:                                               ; preds = %86, %83
  %91 = load i64, ptr @itsor_.ip, align 8, !tbaa !14
  %92 = load i64, ptr @itsor_.iphat, align 8, !tbaa !14
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  br label %216

95:                                               ; preds = %90
  %96 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %97 = fcmp oge double %96, 1.000000e+00
  br i1 %97, label %98, label %99

98:                                               ; preds = %95
  br label %216

99:                                               ; preds = %95
  %100 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %101 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %102 = fsub double %101, 1.000000e+00
  %103 = fcmp ogt double %100, %102
  br i1 %103, label %104, label %106

104:                                              ; preds = %99
  %105 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  store double %105, ptr @itsor_.h, align 8, !tbaa !18
  br label %112

106:                                              ; preds = %99
  br label %107

107:                                              ; preds = %106, %82
  %108 = load i64, ptr @itsor_.iss, align 8, !tbaa !14
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr @itsor_.iss, align 8, !tbaa !14
  %110 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %111 = fsub double %110, 1.000000e+00
  store double %111, ptr @itsor_.h, align 8, !tbaa !18
  br label %112

112:                                              ; preds = %107, %104
  %113 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 3), align 8, !tbaa !20
  %114 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 3), align 8, !tbaa !20
  %115 = fmul double %113, %114
  store double %115, ptr @itsor_.dnrm, align 8, !tbaa !18
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = call i32 @pstop_(ptr noundef %116, ptr noundef %117, ptr noundef @itsor_.dnrm, ptr noundef @itsor_.h, ptr noundef @c__1, ptr noundef @itsor_.q1)
  %119 = load i64, ptr getelementptr inbounds (%struct.anon.1, ptr @itcom2_, i32 0, i32 3), align 8, !tbaa !23
  %120 = icmp ne i64 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %112
  br label %216

122:                                              ; preds = %112
  %123 = load i64, ptr @itcom2_, align 8, !tbaa !12
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %126, label %125

125:                                              ; preds = %122
  br label %216

126:                                              ; preds = %122
  %127 = load i64, ptr @itsor_.ip, align 8, !tbaa !14
  %128 = load i64, ptr @itsor_.ipstar, align 8, !tbaa !14
  %129 = icmp slt i64 %127, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %126
  br label %216

131:                                              ; preds = %126
  %132 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %133 = fcmp ole double %132, 1.000000e+00
  br i1 %133, label %134, label %160

134:                                              ; preds = %131
  %135 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %136 = fcmp oge double %135, 0.000000e+00
  br i1 %136, label %137, label %139

137:                                              ; preds = %134
  %138 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  br label %142

139:                                              ; preds = %134
  %140 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %141 = fneg double %140
  br label %142

142:                                              ; preds = %139, %137
  %143 = phi double [ %138, %137 ], [ %141, %139 ]
  %144 = call double @sqrt(double noundef %143) #5
  store double %144, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %145 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %146 = fsub double 1.000000e+00, %145
  %147 = fcmp oge double %146, 0.000000e+00
  br i1 %147, label %148, label %151

148:                                              ; preds = %142
  %149 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %150 = fsub double 1.000000e+00, %149
  br label %155

151:                                              ; preds = %142
  %152 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %153 = fsub double 1.000000e+00, %152
  %154 = fneg double %153
  br label %155

155:                                              ; preds = %151, %148
  %156 = phi double [ %150, %148 ], [ %154, %151 ]
  %157 = call double @sqrt(double noundef %156) #5
  %158 = fadd double %157, 1.000000e+00
  %159 = fdiv double 2.000000e+00, %158
  store double %159, ptr @itsor_.omegap, align 8, !tbaa !18
  store i64 1, ptr @itsor_.change, align 8, !tbaa !14
  br label %216

160:                                              ; preds = %131
  %161 = load i64, ptr @itsor_.iss, align 8, !tbaa !14
  %162 = icmp ne i64 %161, 0
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  br label %216

164:                                              ; preds = %160
  %165 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %166 = fsub double %165, 1.000000e+00
  store double %166, ptr %15, align 8, !tbaa !18
  %167 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %168 = call double @v3p_netlib_pow_dd(ptr noundef %15, ptr noundef getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 5))
  %169 = fcmp ole double %167, %168
  br i1 %169, label %170, label %171

170:                                              ; preds = %164
  br label %216

171:                                              ; preds = %164
  %172 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %173 = fadd double %172, 5.000000e-05
  %174 = load double, ptr @itsor_.spcrm1, align 8, !tbaa !18
  %175 = fcmp ogt double %173, %174
  br i1 %175, label %176, label %215

176:                                              ; preds = %171
  %177 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %178 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %179 = fadd double %177, %178
  %180 = fsub double %179, 1.000000e+00
  %181 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %182 = fcmp oge double %181, 0.000000e+00
  br i1 %182, label %183, label %185

183:                                              ; preds = %176
  %184 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  br label %188

185:                                              ; preds = %176
  %186 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 14), align 8, !tbaa !22
  %187 = fneg double %186
  br label %188

188:                                              ; preds = %185, %183
  %189 = phi double [ %184, %183 ], [ %187, %185 ]
  %190 = call double @sqrt(double noundef %189) #5
  %191 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 7), align 8, !tbaa !15
  %192 = fmul double %190, %191
  %193 = fdiv double %180, %192
  store double %193, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %194 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %195 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %196 = fneg double %194
  %197 = call double @llvm.fmuladd.f64(double %196, double %195, double 1.000000e+00)
  %198 = fcmp oge double %197, 0.000000e+00
  br i1 %198, label %199, label %204

199:                                              ; preds = %188
  %200 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %201 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %202 = fneg double %200
  %203 = call double @llvm.fmuladd.f64(double %202, double %201, double 1.000000e+00)
  br label %210

204:                                              ; preds = %188
  %205 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %206 = load double, ptr getelementptr inbounds (%struct.anon.0, ptr @itcom3_, i32 0, i32 2), align 8, !tbaa !24
  %207 = fneg double %205
  %208 = call double @llvm.fmuladd.f64(double %207, double %206, double 1.000000e+00)
  %209 = fneg double %208
  br label %210

210:                                              ; preds = %204, %199
  %211 = phi double [ %203, %199 ], [ %209, %204 ]
  %212 = call double @sqrt(double noundef %211) #5
  %213 = fadd double %212, 1.000000e+00
  %214 = fdiv double 2.000000e+00, %213
  store double %214, ptr @itsor_.omegap, align 8, !tbaa !18
  store i64 1, ptr @itsor_.change, align 8, !tbaa !14
  br label %215

215:                                              ; preds = %210, %171
  br label %216

216:                                              ; preds = %215, %170, %163, %155, %130, %125, %121, %98, %94
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load ptr, ptr %13, align 8, !tbaa !5
  %220 = load ptr, ptr %14, align 8, !tbaa !5
  %221 = call i32 @iterm_(ptr noundef %217, ptr noundef %218, ptr noundef %219, ptr noundef %220, ptr noundef @c__3)
  %222 = load i64, ptr @itsor_.ip, align 8, !tbaa !14
  %223 = add nsw i64 %222, 1
  store i64 %223, ptr @itsor_.ip, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  ret i32 0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @pstop_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @iterm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local double @tau_(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @ipstr_(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @pfsor1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

declare double @v3p_netlib_pow_dd(ptr noundef, ptr 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = { 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, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !17, i64 56}
!16 = !{!"", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112, !17, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152}
!17 = !{!"double", !7, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!10, !11, i64 8}
!20 = !{!16, !17, i64 24}
!21 = !{!16, !17, i64 32}
!22 = !{!16, !17, i64 112}
!23 = !{!13, !11, i64 24}
!24 = !{!16, !17, i64 16}


; 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.anon = type { i64, i64, i64, i64, i64, i64 }
%struct.anon.0 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.anon.1 = type { i64, i64, i64, i64, i64 }

@itcom1_ = external hidden global %struct.anon, align 8
@c__1 = external hidden global i64, align 8
@itcom3_ = external hidden global %struct.anon.0, align 8
@c__0 = external hidden global i64, align 8
@c_b21 = external hidden global double, align 8
@itcom2_ = external hidden local_unnamed_addr global %struct.anon.1, align 8
@c__3 = external hidden global i64, align 8
@itsor_.h = external hidden global double, align 8
@itsor_.q1 = external hidden global i64, align 8
@itsor_.ip = external hidden local_unnamed_addr global i64, align 8
@itsor_.iss = external hidden local_unnamed_addr global i64, align 8
@itsor_.dnrm = external hidden global double, align 8
@itsor_.iphat = external hidden local_unnamed_addr global i64, align 8
@itsor_.spcrm1 = external hidden local_unnamed_addr global double, align 8
@itsor_.change = external hidden local_unnamed_addr global i64, align 8
@itsor_.omegap = external hidden local_unnamed_addr global double, align 8
@itsor_.ipstar = external hidden local_unnamed_addr global i64, align 8

; Function Attrs: nounwind uwtable
declare dso_local i32 @itpackdcopy_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @itsor_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #0 {
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %9 = load i64, ptr @itcom1_, align 8, !tbaa !5
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %10, label %17

10:                                               ; preds = %7
  %11 = tail call i32 @pstop_(ptr noundef %0, ptr noundef %5, ptr noundef nonnull @c_b21, ptr noundef nonnull @c_b21, ptr noundef nonnull @c__0, ptr noundef nonnull @itsor_.q1)
  %12 = load i64, ptr @itcom2_, align 8, !tbaa !10
  %.not26 = icmp eq i64 %12, 0
  br i1 %.not26, label %13, label %14

13:                                               ; preds = %10
  store i64 0, ptr @itsor_.change, align 8, !tbaa !12
  store i64 0, ptr @itsor_.ip, align 8, !tbaa !12
  store i64 2, ptr @itsor_.iphat, align 8, !tbaa !12
  store i64 0, ptr @itsor_.iss, align 8, !tbaa !12
  br label %35

14:                                               ; preds = %10
  store i64 0, ptr @itsor_.ip, align 8, !tbaa !12
  %15 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  store double %15, ptr @itsor_.omegap, align 8, !tbaa !16
  store double 1.000000e+00, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  store i64 0, ptr @itsor_.iss, align 8, !tbaa !12
  store i64 2, ptr @itsor_.iphat, align 8, !tbaa !12
  store i64 4, ptr @itsor_.ipstar, align 8, !tbaa !12
  %16 = fcmp ugt double %15, 1.000000e+00
  br i1 %16, label %.thread36, label %.thread

.thread:                                          ; preds = %14
  store i64 0, ptr @itsor_.change, align 8, !tbaa !12
  br label %35

17:                                               ; preds = %7
  %.pr.pre = load i64, ptr @itsor_.change, align 8, !tbaa !12
  %18 = icmp eq i64 %.pr.pre, 0
  br i1 %18, label %35, label %.thread36

.thread36:                                        ; preds = %14, %17
  store i64 0, ptr @itsor_.change, align 8, !tbaa !12
  %19 = load i64, ptr getelementptr inbounds (i8, ptr @itcom1_, i64 8), align 8, !tbaa !17
  %20 = add nsw i64 %19, 1
  store i64 %20, ptr getelementptr inbounds (i8, ptr @itcom1_, i64 8), align 8, !tbaa !17
  store i64 0, ptr @itsor_.ip, align 8, !tbaa !12
  store i64 0, ptr @itsor_.iss, align 8, !tbaa !12
  %21 = load double, ptr @itsor_.omegap, align 8, !tbaa !16
  %22 = tail call double @tau_(ptr noundef nonnull getelementptr inbounds (i8, ptr @itcom1_, i64 8))
  %23 = fcmp ugt double %21, %22
  br i1 %23, label %26, label %24

24:                                               ; preds = %.thread36
  %25 = load double, ptr @itsor_.omegap, align 8, !tbaa !16
  br label %28

26:                                               ; preds = %.thread36
  %27 = tail call double @tau_(ptr noundef nonnull getelementptr inbounds (i8, ptr @itcom1_, i64 8))
  br label %28

28:                                               ; preds = %26, %24
  %29 = phi double [ %25, %24 ], [ %27, %26 ]
  store double %29, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  %30 = fadd double %29, -1.000000e+00
  %31 = fsub double 2.000000e+00, %29
  %32 = fdiv double %30, %31
  %33 = fptosi double %32 to i64
  %spec.select = tail call i64 @llvm.smax.i64(i64 %33, i64 3)
  store i64 %spec.select, ptr @itsor_.iphat, align 8, !tbaa !12
  %34 = tail call i64 @ipstr_(ptr noundef nonnull getelementptr inbounds (i8, ptr @itcom3_, i64 56))
  store i64 %34, ptr @itsor_.ipstar, align 8, !tbaa !12
  br label %35

35:                                               ; preds = %.thread, %17, %28, %13
  %36 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 24), align 8, !tbaa !18
  store double %36, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 32), align 8, !tbaa !19
  %37 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8, !tbaa !20
  store double %37, ptr @itsor_.spcrm1, align 8, !tbaa !16
  %38 = tail call i32 @itpackdcopy_(ptr noundef %0, ptr noundef %4, ptr noundef nonnull @c__1, ptr noundef %6, ptr noundef nonnull @c__1)
  %39 = tail call i32 @pfsor1_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %5, ptr noundef %6)
  %40 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 24), align 8, !tbaa !18
  %41 = fcmp oeq double %40, 0.000000e+00
  br i1 %41, label %._crit_edge33, label %42

._crit_edge33:                                    ; preds = %35
  %.pre34 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  %.pre35 = fadd double %.pre34, -1.000000e+00
  br label %57

42:                                               ; preds = %35
  %43 = load i64, ptr @itcom1_, align 8, !tbaa !5
  %.not28 = icmp eq i64 %43, 0
  br i1 %.not28, label %._crit_edge32, label %44

._crit_edge32:                                    ; preds = %42
  %.pre = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8
  br label %47

44:                                               ; preds = %42
  %45 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 32), align 8, !tbaa !19
  %46 = fdiv double %40, %45
  store double %46, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8, !tbaa !20
  br label %47

47:                                               ; preds = %._crit_edge32, %44
  %48 = phi double [ %.pre, %._crit_edge32 ], [ %46, %44 ]
  %49 = load i64, ptr @itsor_.ip, align 8, !tbaa !12
  %50 = load i64, ptr @itsor_.iphat, align 8, !tbaa !12
  %51 = icmp slt i64 %49, %50
  %52 = fcmp oge double %48, 1.000000e+00
  %or.cond = select i1 %51, i1 true, i1 %52
  br i1 %or.cond, label %117, label %53

53:                                               ; preds = %47
  %54 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  %55 = fadd double %54, -1.000000e+00
  %56 = fcmp ogt double %48, %55
  br i1 %56, label %60, label %57

57:                                               ; preds = %._crit_edge33, %53
  %.pre-phi = phi double [ %.pre35, %._crit_edge33 ], [ %55, %53 ]
  %58 = load i64, ptr @itsor_.iss, align 8, !tbaa !12
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr @itsor_.iss, align 8, !tbaa !12
  br label %60

60:                                               ; preds = %53, %57
  %storemerge = phi double [ %.pre-phi, %57 ], [ %48, %53 ]
  store double %storemerge, ptr @itsor_.h, align 8, !tbaa !16
  %61 = fmul double %40, %40
  store double %61, ptr @itsor_.dnrm, align 8, !tbaa !16
  %62 = tail call i32 @pstop_(ptr noundef %0, ptr noundef %5, ptr noundef nonnull @itsor_.dnrm, ptr noundef nonnull @itsor_.h, ptr noundef nonnull @c__1, ptr noundef nonnull @itsor_.q1)
  %63 = load i64, ptr getelementptr inbounds (i8, ptr @itcom2_, i64 24), align 8, !tbaa !21
  %64 = icmp eq i64 %63, 0
  %65 = load i64, ptr @itcom2_, align 8
  %66 = icmp ne i64 %65, 0
  %or.cond3 = select i1 %64, i1 %66, i1 false
  br i1 %or.cond3, label %67, label %117

67:                                               ; preds = %60
  %68 = load i64, ptr @itsor_.ip, align 8, !tbaa !12
  %69 = load i64, ptr @itsor_.ipstar, align 8, !tbaa !12
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %117, label %71

71:                                               ; preds = %67
  %72 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  %73 = fcmp ugt double %72, 1.000000e+00
  br i1 %73, label %86, label %74

74:                                               ; preds = %71
  %75 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8
  %76 = fcmp oge double %75, 0.000000e+00
  %77 = fneg double %75
  %78 = select i1 %76, double %75, double %77
  %79 = tail call double @sqrt(double noundef %78) #6
  store double %79, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 16), align 8, !tbaa !22
  %80 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8, !tbaa !20
  %81 = fsub double 1.000000e+00, %80
  %82 = fcmp ult double %81, 0.000000e+00
  %83 = fneg double %81
  %84 = select i1 %82, double %83, double %81
  %85 = tail call double @sqrt(double noundef %84) #6
  br label %.sink.split

86:                                               ; preds = %71
  %87 = load i64, ptr @itsor_.iss, align 8, !tbaa !12
  %.not29 = icmp eq i64 %87, 0
  br i1 %.not29, label %88, label %117

88:                                               ; preds = %86
  %89 = fadd double %72, -1.000000e+00
  store double %89, ptr %8, align 8, !tbaa !16
  %90 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8, !tbaa !20
  %91 = call double @v3p_netlib_pow_dd(ptr noundef nonnull %8, ptr noundef nonnull getelementptr inbounds (i8, ptr @itcom3_, i64 40)) #6
  %92 = fcmp ugt double %90, %91
  br i1 %92, label %93, label %117

93:                                               ; preds = %88
  %94 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 112), align 8
  %95 = fadd double %94, 5.000000e-05
  %96 = load double, ptr @itsor_.spcrm1, align 8, !tbaa !16
  %97 = fcmp ogt double %95, %96
  br i1 %97, label %98, label %117

98:                                               ; preds = %93
  %99 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  %100 = fadd double %94, %99
  %101 = fadd double %100, -1.000000e+00
  %102 = fcmp oge double %94, 0.000000e+00
  %103 = fneg double %94
  %104 = select i1 %102, double %94, double %103
  %105 = call double @sqrt(double noundef %104) #6
  %106 = load double, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 56), align 8, !tbaa !13
  %107 = fmul double %105, %106
  %108 = fdiv double %101, %107
  store double %108, ptr getelementptr inbounds (i8, ptr @itcom3_, i64 16), align 8, !tbaa !22
  %109 = fneg double %108
  %110 = call double @llvm.fmuladd.f64(double %109, double %108, double 1.000000e+00)
  %111 = fcmp ult double %110, 0.000000e+00
  %112 = fneg double %110
  %113 = select i1 %111, double %112, double %110
  %114 = call double @sqrt(double noundef %113) #6
  br label %.sink.split

.sink.split:                                      ; preds = %74, %98
  %.sink = phi double [ %114, %98 ], [ %85, %74 ]
  %115 = fadd double %.sink, 1.000000e+00
  %116 = fdiv double 2.000000e+00, %115
  store double %116, ptr @itsor_.omegap, align 8, !tbaa !16
  store i64 1, ptr @itsor_.change, align 8, !tbaa !12
  br label %117

117:                                              ; preds = %.sink.split, %93, %88, %86, %67, %60, %47
  %118 = call i32 @iterm_(ptr noundef %0, ptr noundef %3, ptr noundef %5, ptr noundef %6, ptr noundef nonnull @c__3)
  %119 = load i64, ptr @itsor_.ip, align 8, !tbaa !12
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr @itsor_.ip, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  ret i32 0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @pstop_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @iterm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local double @tau_(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @ipstr_(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @pfsor1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare double @v3p_netlib_pow_dd(ptr noundef, ptr 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !15, i64 56}
!14 = !{!"", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152}
!15 = !{!"double", !8, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!6, !7, i64 8}
!18 = !{!14, !15, i64 24}
!19 = !{!14, !15, i64 32}
!20 = !{!14, !15, i64 112}
!21 = !{!11, !7, i64 24}
!22 = !{!14, !15, i64 16}


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