; LLVM IR from VeloxChem/VeloxChem :: src/pdft_func/PairDensitySlater.ll (ZN10pdftslater15compute_exc_vxcEiPKdPdS2_)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10pdftslater15compute_exc_vxcEiPKdPdS2_(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0x3FD5555555555555, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store double 0x3FE5555555555555, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 0x3FF5555555555555, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 0x3FC5555555555555, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 0x3FEC71C71C71C71C, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 0x4005555555555555, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %42 = load double, ptr %9, align 8, !tbaa !11
  %43 = call double @pow(double noundef 0x3FFE8EC8A4AEACC4, double noundef %42) #5
  %44 = fneg double %43
  store double %44, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %45 = load double, ptr %15, align 8, !tbaa !11
  %46 = fmul double %45, 7.500000e-01
  %47 = load double, ptr %11, align 8, !tbaa !11
  %48 = call double @pow(double noundef 2.000000e+00, double noundef %47) #5
  %49 = fdiv double %46, %48
  store double %49, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %275, %4
  %51 = load i32, ptr %17, align 4, !tbaa !5
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %278

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  %57 = load i32, ptr %17, align 4, !tbaa !5
  %58 = mul nsw i32 2, %57
  %59 = add nsw i32 %58, 0
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %56, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !11
  store double %62, ptr %19, align 8, !tbaa !11
  %63 = load double, ptr %19, align 8, !tbaa !11
  %64 = fcmp olt double %63, 0x3C9CD2B297D889BC
  br i1 %64, label %65, label %82

65:                                               ; preds = %55
  %66 = load ptr, ptr %7, align 8, !tbaa !9
  %67 = load i32, ptr %17, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds double, ptr %66, i64 %68
  store double 0.000000e+00, ptr %69, align 8, !tbaa !11
  %70 = load ptr, ptr %8, align 8, !tbaa !9
  %71 = load i32, ptr %17, align 4, !tbaa !5
  %72 = mul nsw i32 2, %71
  %73 = add nsw i32 %72, 0
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %70, i64 %74
  store double 0.000000e+00, ptr %75, align 8, !tbaa !11
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = load i32, ptr %17, align 4, !tbaa !5
  %78 = mul nsw i32 2, %77
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %76, i64 %80
  store double 0.000000e+00, ptr %81, align 8, !tbaa !11
  store i32 4, ptr %18, align 4
  br label %272

82:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %83 = load double, ptr %19, align 8, !tbaa !11
  %84 = load double, ptr %9, align 8, !tbaa !11
  %85 = call double @pow(double noundef %83, double noundef %84) #5
  store double %85, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %86 = load double, ptr %19, align 8, !tbaa !11
  %87 = load double, ptr %10, align 8, !tbaa !11
  %88 = call double @pow(double noundef %86, double noundef %87) #5
  store double %88, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %89 = load ptr, ptr %6, align 8, !tbaa !9
  %90 = load i32, ptr %17, align 4, !tbaa !5
  %91 = mul nsw i32 2, %90
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %89, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !11
  store double %95, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  %96 = load double, ptr %22, align 8, !tbaa !11
  %97 = fcmp ole double %96, 0.000000e+00
  br i1 %97, label %98, label %166

98:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %99 = load double, ptr %22, align 8, !tbaa !11
  %100 = fmul double -2.000000e+00, %99
  %101 = call double @sqrt(double noundef %100) #5
  store double %101, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %102 = load double, ptr %26, align 8, !tbaa !11
  %103 = load double, ptr %19, align 8, !tbaa !11
  %104 = fdiv double %102, %103
  store double %104, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %105 = load double, ptr %27, align 8, !tbaa !11
  %106 = fadd double 1.000000e+00, %105
  %107 = load double, ptr %11, align 8, !tbaa !11
  %108 = call double @pow(double noundef %106, double noundef %107) #5
  store double %108, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %109 = load double, ptr %27, align 8, !tbaa !11
  %110 = fadd double 1.000000e+00, %109
  %111 = load double, ptr %9, align 8, !tbaa !11
  %112 = call double @pow(double noundef %110, double noundef %111) #5
  store double %112, ptr %29, align 8, !tbaa !11
  %113 = load double, ptr %28, align 8, !tbaa !11
  store double %113, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %114 = load double, ptr %29, align 8, !tbaa !11
  store double %114, ptr %30, align 8, !tbaa !11
  %115 = load double, ptr %27, align 8, !tbaa !11
  %116 = fsub double 1.000000e+00, %115
  %117 = fcmp ogt double %116, 0x3C9CD2B297D889BC
  br i1 %117, label %118, label %133

118:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %119 = load double, ptr %27, align 8, !tbaa !11
  %120 = fsub double 1.000000e+00, %119
  %121 = load double, ptr %11, align 8, !tbaa !11
  %122 = call double @pow(double noundef %120, double noundef %121) #5
  store double %122, ptr %31, align 8, !tbaa !11
  %123 = load double, ptr %31, align 8, !tbaa !11
  %124 = load double, ptr %23, align 8, !tbaa !11
  %125 = fadd double %124, %123
  store double %125, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %126 = load double, ptr %27, align 8, !tbaa !11
  %127 = fsub double 1.000000e+00, %126
  %128 = load double, ptr %9, align 8, !tbaa !11
  %129 = call double @pow(double noundef %127, double noundef %128) #5
  store double %129, ptr %32, align 8, !tbaa !11
  %130 = load double, ptr %32, align 8, !tbaa !11
  %131 = load double, ptr %30, align 8, !tbaa !11
  %132 = fsub double %131, %130
  store double %132, ptr %30, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %133

133:                                              ; preds = %118, %98
  %134 = load double, ptr %16, align 8, !tbaa !11
  %135 = load double, ptr %11, align 8, !tbaa !11
  %136 = fmul double %134, %135
  %137 = load double, ptr %20, align 8, !tbaa !11
  %138 = fmul double %136, %137
  %139 = load double, ptr %23, align 8, !tbaa !11
  %140 = load double, ptr %27, align 8, !tbaa !11
  %141 = load double, ptr %30, align 8, !tbaa !11
  %142 = fneg double %140
  %143 = call double @llvm.fmuladd.f64(double %142, double %141, double %139)
  %144 = fmul double %138, %143
  store double %144, ptr %24, align 8, !tbaa !11
  %145 = load double, ptr %22, align 8, !tbaa !11
  %146 = fcmp olt double %145, 0xBC9CD2B297D889BC
  br i1 %146, label %147, label %158

147:                                              ; preds = %133
  %148 = load double, ptr %16, align 8, !tbaa !11
  %149 = fneg double %148
  %150 = load double, ptr %11, align 8, !tbaa !11
  %151 = fmul double %149, %150
  %152 = load double, ptr %20, align 8, !tbaa !11
  %153 = fmul double %151, %152
  %154 = load double, ptr %26, align 8, !tbaa !11
  %155 = fdiv double %153, %154
  %156 = load double, ptr %30, align 8, !tbaa !11
  %157 = fmul double %155, %156
  store double %157, ptr %25, align 8, !tbaa !11
  br label %165

158:                                              ; preds = %133
  %159 = load double, ptr %16, align 8, !tbaa !11
  %160 = fneg double %159
  %161 = load double, ptr %13, align 8, !tbaa !11
  %162 = fmul double %160, %161
  %163 = load double, ptr %21, align 8, !tbaa !11
  %164 = fdiv double %162, %163
  store double %164, ptr %25, align 8, !tbaa !11
  br label %165

165:                                              ; preds = %158, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %248

166:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %167 = load double, ptr %22, align 8, !tbaa !11
  %168 = fmul double 2.000000e+00, %167
  %169 = call double @sqrt(double noundef %168) #5
  store double %169, ptr %33, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %170 = load double, ptr %33, align 8, !tbaa !11
  %171 = load double, ptr %19, align 8, !tbaa !11
  %172 = fdiv double %170, %171
  store double %172, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %173 = load double, ptr %34, align 8, !tbaa !11
  %174 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %173, i32 noundef 2)
  %175 = fadd double 1.000000e+00, %174
  store double %175, ptr %35, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %176 = load double, ptr %11, align 8, !tbaa !11
  %177 = load double, ptr %34, align 8, !tbaa !11
  %178 = call double @atan(double noundef %177) #5
  %179 = fmul double %176, %178
  store double %179, ptr %36, align 8, !tbaa !11
  %180 = load double, ptr %35, align 8, !tbaa !11
  %181 = load double, ptr %10, align 8, !tbaa !11
  %182 = call double @pow(double noundef %180, double noundef %181) #5
  %183 = fmul double 2.000000e+00, %182
  %184 = load double, ptr %36, align 8, !tbaa !11
  %185 = call double @cos(double noundef %184) #5
  %186 = fmul double %183, %185
  store double %186, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %187 = load double, ptr %35, align 8, !tbaa !11
  %188 = load double, ptr %12, align 8, !tbaa !11
  %189 = call double @pow(double noundef %187, double noundef %188) #5
  store double %189, ptr %37, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  %190 = load double, ptr %9, align 8, !tbaa !11
  %191 = load double, ptr %34, align 8, !tbaa !11
  %192 = call double @atan(double noundef %191) #5
  %193 = fmul double %190, %192
  store double %193, ptr %38, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %194 = load double, ptr %38, align 8, !tbaa !11
  %195 = call double @sin(double noundef %194) #5
  store double %195, ptr %39, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  %196 = load double, ptr %14, align 8, !tbaa !11
  %197 = load double, ptr %35, align 8, !tbaa !11
  %198 = load double, ptr %9, align 8, !tbaa !11
  %199 = fneg double %198
  %200 = call double @pow(double noundef %197, double noundef %199) #5
  %201 = fmul double %196, %200
  %202 = load double, ptr %34, align 8, !tbaa !11
  %203 = fmul double %201, %202
  %204 = load double, ptr %19, align 8, !tbaa !11
  %205 = fdiv double %203, %204
  store double %205, ptr %40, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %206 = load double, ptr %40, align 8, !tbaa !11
  %207 = load double, ptr %34, align 8, !tbaa !11
  %208 = fneg double %207
  %209 = load double, ptr %36, align 8, !tbaa !11
  %210 = call double @cos(double noundef %209) #5
  %211 = load double, ptr %36, align 8, !tbaa !11
  %212 = call double @sin(double noundef %211) #5
  %213 = call double @llvm.fmuladd.f64(double %208, double %210, double %212)
  %214 = fmul double %206, %213
  store double %214, ptr %41, align 8, !tbaa !11
  %215 = load double, ptr %16, align 8, !tbaa !11
  %216 = load double, ptr %20, align 8, !tbaa !11
  %217 = fmul double %215, %216
  %218 = load double, ptr %11, align 8, !tbaa !11
  %219 = load double, ptr %23, align 8, !tbaa !11
  %220 = load double, ptr %19, align 8, !tbaa !11
  %221 = load double, ptr %41, align 8, !tbaa !11
  %222 = fmul double %220, %221
  %223 = call double @llvm.fmuladd.f64(double %218, double %219, double %222)
  %224 = fmul double %217, %223
  store double %224, ptr %24, align 8, !tbaa !11
  %225 = load double, ptr %22, align 8, !tbaa !11
  %226 = fcmp ogt double %225, 0x3C9CD2B297D889BC
  br i1 %226, label %227, label %240

227:                                              ; preds = %166
  %228 = load double, ptr %16, align 8, !tbaa !11
  %229 = fneg double %228
  %230 = load double, ptr %14, align 8, !tbaa !11
  %231 = fmul double %229, %230
  %232 = load double, ptr %20, align 8, !tbaa !11
  %233 = fmul double %231, %232
  %234 = load double, ptr %33, align 8, !tbaa !11
  %235 = fdiv double %233, %234
  %236 = load double, ptr %37, align 8, !tbaa !11
  %237 = fmul double %235, %236
  %238 = load double, ptr %39, align 8, !tbaa !11
  %239 = fmul double %237, %238
  store double %239, ptr %25, align 8, !tbaa !11
  br label %247

240:                                              ; preds = %166
  %241 = load double, ptr %16, align 8, !tbaa !11
  %242 = fneg double %241
  %243 = load double, ptr %13, align 8, !tbaa !11
  %244 = fmul double %242, %243
  %245 = load double, ptr %21, align 8, !tbaa !11
  %246 = fdiv double %244, %245
  store double %246, ptr %25, align 8, !tbaa !11
  br label %247

247:                                              ; preds = %240, %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  br label %248

248:                                              ; preds = %247, %165
  %249 = load double, ptr %16, align 8, !tbaa !11
  %250 = load double, ptr %20, align 8, !tbaa !11
  %251 = fmul double %249, %250
  %252 = load double, ptr %23, align 8, !tbaa !11
  %253 = fmul double %251, %252
  %254 = load ptr, ptr %7, align 8, !tbaa !9
  %255 = load i32, ptr %17, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds double, ptr %254, i64 %256
  store double %253, ptr %257, align 8, !tbaa !11
  %258 = load double, ptr %24, align 8, !tbaa !11
  %259 = load ptr, ptr %8, align 8, !tbaa !9
  %260 = load i32, ptr %17, align 4, !tbaa !5
  %261 = mul nsw i32 2, %260
  %262 = add nsw i32 %261, 0
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds double, ptr %259, i64 %263
  store double %258, ptr %264, align 8, !tbaa !11
  %265 = load double, ptr %25, align 8, !tbaa !11
  %266 = load ptr, ptr %8, align 8, !tbaa !9
  %267 = load i32, ptr %17, align 4, !tbaa !5
  %268 = mul nsw i32 2, %267
  %269 = add nsw i32 %268, 1
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds double, ptr %266, i64 %270
  store double %265, ptr %271, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  store i32 0, ptr %18, align 4
  br label %272

272:                                              ; preds = %248, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %273 = load i32, ptr %18, align 4
  switch i32 %273, label %279 [
    i32 0, label %274
    i32 4, label %275
  ]

274:                                              ; preds = %272
  br label %275

275:                                              ; preds = %274, %272
  %276 = load i32, ptr %17, align 4, !tbaa !5
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %17, align 4, !tbaa !5
  br label %50, !llvm.loop !13

278:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void

279:                                              ; preds = %272
  unreachable
}

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

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

; Function Attrs: nounwind
declare double @sqrt(double 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) #4

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

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

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

attributes #0 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress 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 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN10pdftslater15compute_exc_vxcEiPKdPdS2_(i32 noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = icmp sgt i32 %0, 0
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge

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

._crit_edge:                                      ; preds = %86, %4
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %86
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %86 ]
  %6 = shl nuw nsw i64 %indvars.iv, 1
  %7 = getelementptr inbounds double, ptr %1, i64 %6
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = fcmp olt double %8, 0x3C9CD2B297D889BC
  br i1 %9, label %10, label %14

10:                                               ; preds = %.lr.ph
  %11 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  store double 0.000000e+00, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds double, ptr %3, i64 %6
  store double 0.000000e+00, ptr %12, align 8, !tbaa !5
  %13 = or disjoint i64 %6, 1
  br label %86

14:                                               ; preds = %.lr.ph
  %15 = tail call double @pow(double noundef %8, double noundef 0x3FD5555555555555) #4
  %16 = tail call double @pow(double noundef %8, double noundef 0x3FE5555555555555) #4
  %17 = or disjoint i64 %6, 1
  %18 = getelementptr inbounds double, ptr %1, i64 %17
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = fcmp ugt double %19, 0.000000e+00
  br i1 %20, label %45, label %21

21:                                               ; preds = %14
  %22 = fmul double %19, -2.000000e+00
  %23 = tail call double @sqrt(double noundef %22) #4
  %24 = fdiv double %23, %8
  %25 = fadd double %24, 1.000000e+00
  %26 = tail call double @pow(double noundef %25, double noundef 0x3FF5555555555555) #4
  %27 = tail call double @pow(double noundef %25, double noundef 0x3FD5555555555555) #4
  %28 = fsub double 1.000000e+00, %24
  %29 = fcmp ogt double %28, 0x3C9CD2B297D889BC
  br i1 %29, label %30, label %35

30:                                               ; preds = %21
  %31 = tail call double @pow(double noundef %28, double noundef 0x3FF5555555555555) #4
  %32 = fadd double %26, %31
  %33 = tail call double @pow(double noundef %28, double noundef 0x3FD5555555555555) #4
  %34 = fsub double %27, %33
  br label %35

35:                                               ; preds = %30, %21
  %.0108 = phi double [ %34, %30 ], [ %27, %21 ]
  %.0104 = phi double [ %32, %30 ], [ %26, %21 ]
  %36 = fmul double %15, 0xBFDF8307FDF6D26D
  %37 = fneg double %24
  %38 = tail call double @llvm.fmuladd.f64(double %37, double %.0108, double %.0104)
  %39 = fmul double %36, %38
  %40 = fcmp olt double %19, 0xBC9CD2B297D889BC
  %41 = fmul double %15, 0x3FDF8307FDF6D26D
  %42 = fdiv double %41, %23
  %43 = fmul double %42, %.0108
  %44 = fdiv double 0x3FD5020553F9E19E, %16
  %.0106 = select i1 %40, double %43, double %44
  %.pre = fmul double %15, 0xBFD7A245FE791DD2
  br label %82

45:                                               ; preds = %14
  %46 = fmul double %19, 2.000000e+00
  %47 = tail call double @sqrt(double noundef %46) #4
  %48 = fdiv double %47, %8
  %49 = tail call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %48, i32 noundef 2)
  %50 = fadd double %49, 1.000000e+00
  %51 = tail call double @atan(double noundef %48) #4
  %52 = fmul double %51, 0x3FF5555555555555
  %53 = tail call double @pow(double noundef %50, double noundef 0x3FE5555555555555) #4
  %54 = fmul double %53, 2.000000e+00
  %55 = tail call double @cos(double noundef %52) #4
  %56 = fmul double %54, %55
  %57 = tail call double @pow(double noundef %50, double noundef 0x3FC5555555555555) #4
  %58 = tail call double @atan(double noundef %48) #4
  %59 = fmul double %58, 0x3FD5555555555555
  %60 = tail call double @sin(double noundef %59) #4
  %61 = tail call double @pow(double noundef %50, double noundef 0xBFD5555555555555) #4
  %62 = fmul double %61, 0x4005555555555555
  %63 = fmul double %48, %62
  %64 = fdiv double %63, %8
  %65 = fneg double %48
  %66 = tail call double @cos(double noundef %52) #4
  %67 = tail call double @sin(double noundef %52) #4
  %68 = tail call double @llvm.fmuladd.f64(double %65, double %66, double %67)
  %69 = fmul double %64, %68
  %70 = fmul double %15, 0xBFD7A245FE791DD2
  %71 = fmul double %8, %69
  %72 = tail call double @llvm.fmuladd.f64(double %56, double 0x3FF5555555555555, double %71)
  %73 = fmul double %70, %72
  %74 = fcmp ogt double %19, 0x3C9CD2B297D889BC
  br i1 %74, label %75, label %80

75:                                               ; preds = %45
  %76 = fmul double %15, 0x3FEF8307FDF6D26D
  %77 = fdiv double %76, %47
  %78 = fmul double %77, %57
  %79 = fmul double %78, %60
  br label %82

80:                                               ; preds = %45
  %81 = fdiv double 0x3FD5020553F9E19E, %16
  br label %82

82:                                               ; preds = %75, %80, %35
  %.pre-phi = phi double [ %70, %75 ], [ %70, %80 ], [ %.pre, %35 ]
  %.2 = phi double [ %79, %75 ], [ %81, %80 ], [ %.0106, %35 ]
  %.0105 = phi double [ %73, %75 ], [ %73, %80 ], [ %39, %35 ]
  %.1 = phi double [ %56, %75 ], [ %56, %80 ], [ %.0104, %35 ]
  %83 = fmul double %.pre-phi, %.1
  %84 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  store double %83, ptr %84, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %3, i64 %6
  store double %.0105, ptr %85, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %82, %10
  %.sink115 = phi i64 [ %17, %82 ], [ %13, %10 ]
  %.2.sink = phi double [ %.2, %82 ], [ 0.000000e+00, %10 ]
  %87 = getelementptr inbounds double, ptr %3, i64 %.sink115
  store double %.2.sink, ptr %87, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) local_unnamed_addr #3

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

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

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

attributes #0 = { mustprogress 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 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { inlinehint mustprogress 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 #4 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass