; LLVM IR from generalized-intelligence/GAAS :: deprecated/software/SLAM/ygz_slam_ros/gps_test (gps_to_xyz)

; 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 nounwind uwtable
define dso_local void @_Z17geodeticOffsetInvddddRdS_(double noundef %0, double noundef %1, double noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #0 {
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %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 i32, align 4
  %34 = alloca i32, align 4
  %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 double %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !5
  store double %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store double 0x415854A640000000, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store double 0x41583FC4141C970F, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store double 0x3F6B775A84D99473, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %42 = load double, ptr %10, align 8, !tbaa !5
  %43 = load double, ptr %8, align 8, !tbaa !5
  %44 = fsub double %42, %43
  store double %44, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %45 = load double, ptr %15, align 8, !tbaa !5
  %46 = fsub double 1.000000e+00, %45
  %47 = load double, ptr %7, align 8, !tbaa !5
  %48 = call double @tan(double noundef %47) #4
  %49 = fmul double %46, %48
  %50 = call double @atan(double noundef %49) #4
  store double %50, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %51 = load double, ptr %15, align 8, !tbaa !5
  %52 = fsub double 1.000000e+00, %51
  %53 = load double, ptr %9, align 8, !tbaa !5
  %54 = call double @tan(double noundef %53) #4
  %55 = fmul double %52, %54
  %56 = call double @atan(double noundef %55) #4
  store double %56, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %57 = load double, ptr %17, align 8, !tbaa !5
  %58 = call double @sin(double noundef %57) #4
  store double %58, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %59 = load double, ptr %17, align 8, !tbaa !5
  %60 = call double @cos(double noundef %59) #4
  store double %60, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %61 = load double, ptr %18, align 8, !tbaa !5
  %62 = call double @sin(double noundef %61) #4
  store double %62, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %63 = load double, ptr %18, align 8, !tbaa !5
  %64 = call double @cos(double noundef %63) #4
  store double %64, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %65 = load double, ptr %16, align 8, !tbaa !5
  store double %65, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  store i32 100, ptr %33, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %181, %6
  %67 = load double, ptr %23, align 8, !tbaa !5
  %68 = call double @sin(double noundef %67) #4
  store double %68, ptr %30, align 8, !tbaa !5
  %69 = load double, ptr %23, align 8, !tbaa !5
  %70 = call double @cos(double noundef %69) #4
  store double %70, ptr %31, align 8, !tbaa !5
  %71 = load double, ptr %22, align 8, !tbaa !5
  %72 = load double, ptr %30, align 8, !tbaa !5
  %73 = fmul double %71, %72
  %74 = load double, ptr %22, align 8, !tbaa !5
  %75 = load double, ptr %30, align 8, !tbaa !5
  %76 = fmul double %74, %75
  %77 = load double, ptr %20, align 8, !tbaa !5
  %78 = load double, ptr %21, align 8, !tbaa !5
  %79 = load double, ptr %19, align 8, !tbaa !5
  %80 = load double, ptr %22, align 8, !tbaa !5
  %81 = fmul double %79, %80
  %82 = load double, ptr %31, align 8, !tbaa !5
  %83 = fmul double %81, %82
  %84 = fneg double %83
  %85 = call double @llvm.fmuladd.f64(double %77, double %78, double %84)
  %86 = load double, ptr %20, align 8, !tbaa !5
  %87 = load double, ptr %21, align 8, !tbaa !5
  %88 = load double, ptr %19, align 8, !tbaa !5
  %89 = load double, ptr %22, align 8, !tbaa !5
  %90 = fmul double %88, %89
  %91 = load double, ptr %31, align 8, !tbaa !5
  %92 = fmul double %90, %91
  %93 = fneg double %92
  %94 = call double @llvm.fmuladd.f64(double %86, double %87, double %93)
  %95 = fmul double %85, %94
  %96 = call double @llvm.fmuladd.f64(double %73, double %76, double %95)
  %97 = call double @sqrt(double noundef %96) #4
  store double %97, ptr %25, align 8, !tbaa !5
  %98 = load double, ptr %25, align 8, !tbaa !5
  %99 = fcmp oeq double %98, 0.000000e+00
  br i1 %99, label %100, label %103

100:                                              ; preds = %66
  %101 = load ptr, ptr %11, align 8, !tbaa !9
  store double 0.000000e+00, ptr %101, align 8, !tbaa !5
  %102 = load ptr, ptr %12, align 8, !tbaa !9
  store double 0.000000e+00, ptr %102, align 8, !tbaa !5
  store i32 1, ptr %34, align 4
  br label %280

103:                                              ; preds = %66
  %104 = load double, ptr %19, align 8, !tbaa !5
  %105 = load double, ptr %21, align 8, !tbaa !5
  %106 = load double, ptr %20, align 8, !tbaa !5
  %107 = load double, ptr %22, align 8, !tbaa !5
  %108 = fmul double %106, %107
  %109 = load double, ptr %31, align 8, !tbaa !5
  %110 = fmul double %108, %109
  %111 = call double @llvm.fmuladd.f64(double %104, double %105, double %110)
  store double %111, ptr %27, align 8, !tbaa !5
  %112 = load double, ptr %25, align 8, !tbaa !5
  %113 = load double, ptr %27, align 8, !tbaa !5
  %114 = call double @atan2(double noundef %112, double noundef %113) #4
  store double %114, ptr %26, align 8, !tbaa !5
  %115 = load double, ptr %20, align 8, !tbaa !5
  %116 = load double, ptr %22, align 8, !tbaa !5
  %117 = fmul double %115, %116
  %118 = load double, ptr %30, align 8, !tbaa !5
  %119 = fmul double %117, %118
  %120 = load double, ptr %25, align 8, !tbaa !5
  %121 = fdiv double %119, %120
  store double %121, ptr %32, align 8, !tbaa !5
  %122 = load double, ptr %32, align 8, !tbaa !5
  %123 = load double, ptr %32, align 8, !tbaa !5
  %124 = fneg double %122
  %125 = call double @llvm.fmuladd.f64(double %124, double %123, double 1.000000e+00)
  store double %125, ptr %28, align 8, !tbaa !5
  %126 = load double, ptr %27, align 8, !tbaa !5
  %127 = load double, ptr %19, align 8, !tbaa !5
  %128 = fmul double 2.000000e+00, %127
  %129 = load double, ptr %21, align 8, !tbaa !5
  %130 = fmul double %128, %129
  %131 = load double, ptr %28, align 8, !tbaa !5
  %132 = fdiv double %130, %131
  %133 = fsub double %126, %132
  store double %133, ptr %29, align 8, !tbaa !5
  %134 = load double, ptr %29, align 8, !tbaa !5
  %135 = load double, ptr %29, align 8, !tbaa !5
  %136 = fcmp une double %134, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %103
  store double 0.000000e+00, ptr %29, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %137, %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  %139 = load double, ptr %15, align 8, !tbaa !5
  %140 = fdiv double %139, 1.600000e+01
  %141 = load double, ptr %28, align 8, !tbaa !5
  %142 = fmul double %140, %141
  %143 = load double, ptr %15, align 8, !tbaa !5
  %144 = load double, ptr %28, align 8, !tbaa !5
  %145 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %144, double 4.000000e+00)
  %146 = call double @llvm.fmuladd.f64(double %143, double %145, double 4.000000e+00)
  %147 = fmul double %142, %146
  store double %147, ptr %35, align 8, !tbaa !5
  %148 = load double, ptr %23, align 8, !tbaa !5
  store double %148, ptr %24, align 8, !tbaa !5
  %149 = load double, ptr %16, align 8, !tbaa !5
  %150 = load double, ptr %35, align 8, !tbaa !5
  %151 = fsub double 1.000000e+00, %150
  %152 = load double, ptr %15, align 8, !tbaa !5
  %153 = fmul double %151, %152
  %154 = load double, ptr %32, align 8, !tbaa !5
  %155 = fmul double %153, %154
  %156 = load double, ptr %26, align 8, !tbaa !5
  %157 = load double, ptr %35, align 8, !tbaa !5
  %158 = load double, ptr %25, align 8, !tbaa !5
  %159 = fmul double %157, %158
  %160 = load double, ptr %29, align 8, !tbaa !5
  %161 = load double, ptr %35, align 8, !tbaa !5
  %162 = load double, ptr %27, align 8, !tbaa !5
  %163 = fmul double %161, %162
  %164 = load double, ptr %29, align 8, !tbaa !5
  %165 = fmul double 2.000000e+00, %164
  %166 = load double, ptr %29, align 8, !tbaa !5
  %167 = call double @llvm.fmuladd.f64(double %165, double %166, double -1.000000e+00)
  %168 = call double @llvm.fmuladd.f64(double %163, double %167, double %160)
  %169 = call double @llvm.fmuladd.f64(double %159, double %168, double %156)
  %170 = call double @llvm.fmuladd.f64(double %155, double %169, double %149)
  store double %170, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  br label %171

171:                                              ; preds = %138
  %172 = load double, ptr %23, align 8, !tbaa !5
  %173 = load double, ptr %24, align 8, !tbaa !5
  %174 = fsub double %172, %173
  %175 = call double @llvm.fabs.f64(double %174)
  %176 = fcmp ogt double %175, 0x3D719799812DEA11
  br i1 %176, label %177, label %181

177:                                              ; preds = %171
  %178 = load i32, ptr %33, align 4, !tbaa !11
  %179 = add nsw i32 %178, -1
  store i32 %179, ptr %33, align 4, !tbaa !11
  %180 = icmp sgt i32 %179, 0
  br label %181

181:                                              ; preds = %177, %171
  %182 = phi i1 [ false, %171 ], [ %180, %177 ]
  br i1 %182, label %66, label %183, !llvm.loop !13

183:                                              ; preds = %181
  %184 = load i32, ptr %33, align 4, !tbaa !11
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %189

186:                                              ; preds = %183
  %187 = load ptr, ptr %11, align 8, !tbaa !9
  store double 0.000000e+00, ptr %187, align 8, !tbaa !5
  %188 = load ptr, ptr %12, align 8, !tbaa !9
  store double 0.000000e+00, ptr %188, align 8, !tbaa !5
  store i32 1, ptr %34, align 4
  br label %280

189:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %190 = load double, ptr %28, align 8, !tbaa !5
  %191 = load double, ptr %13, align 8, !tbaa !5
  %192 = load double, ptr %13, align 8, !tbaa !5
  %193 = load double, ptr %14, align 8, !tbaa !5
  %194 = load double, ptr %14, align 8, !tbaa !5
  %195 = fmul double %193, %194
  %196 = fneg double %195
  %197 = call double @llvm.fmuladd.f64(double %191, double %192, double %196)
  %198 = fmul double %190, %197
  %199 = load double, ptr %14, align 8, !tbaa !5
  %200 = load double, ptr %14, align 8, !tbaa !5
  %201 = fmul double %199, %200
  %202 = fdiv double %198, %201
  store double %202, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  %203 = load double, ptr %36, align 8, !tbaa !5
  %204 = fdiv double %203, 1.638400e+04
  %205 = load double, ptr %36, align 8, !tbaa !5
  %206 = load double, ptr %36, align 8, !tbaa !5
  %207 = load double, ptr %36, align 8, !tbaa !5
  %208 = call double @llvm.fmuladd.f64(double -1.750000e+02, double %207, double 3.200000e+02)
  %209 = call double @llvm.fmuladd.f64(double %206, double %208, double -7.680000e+02)
  %210 = call double @llvm.fmuladd.f64(double %205, double %209, double 4.096000e+03)
  %211 = call double @llvm.fmuladd.f64(double %204, double %210, double 1.000000e+00)
  store double %211, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  %212 = load double, ptr %36, align 8, !tbaa !5
  %213 = fdiv double %212, 1.024000e+03
  %214 = load double, ptr %36, align 8, !tbaa !5
  %215 = load double, ptr %36, align 8, !tbaa !5
  %216 = load double, ptr %36, align 8, !tbaa !5
  %217 = call double @llvm.fmuladd.f64(double -4.700000e+01, double %216, double 7.400000e+01)
  %218 = call double @llvm.fmuladd.f64(double %215, double %217, double -1.280000e+02)
  %219 = call double @llvm.fmuladd.f64(double %214, double %218, double 2.560000e+02)
  %220 = fmul double %213, %219
  store double %220, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #4
  %221 = load double, ptr %38, align 8, !tbaa !5
  %222 = load double, ptr %25, align 8, !tbaa !5
  %223 = fmul double %221, %222
  %224 = load double, ptr %29, align 8, !tbaa !5
  %225 = load double, ptr %38, align 8, !tbaa !5
  %226 = fdiv double %225, 4.000000e+00
  %227 = load double, ptr %27, align 8, !tbaa !5
  %228 = load double, ptr %29, align 8, !tbaa !5
  %229 = fmul double 2.000000e+00, %228
  %230 = load double, ptr %29, align 8, !tbaa !5
  %231 = call double @llvm.fmuladd.f64(double %229, double %230, double -1.000000e+00)
  %232 = load double, ptr %38, align 8, !tbaa !5
  %233 = fdiv double %232, 6.000000e+00
  %234 = load double, ptr %29, align 8, !tbaa !5
  %235 = fmul double %233, %234
  %236 = load double, ptr %25, align 8, !tbaa !5
  %237 = fmul double 4.000000e+00, %236
  %238 = load double, ptr %25, align 8, !tbaa !5
  %239 = call double @llvm.fmuladd.f64(double %237, double %238, double -3.000000e+00)
  %240 = fmul double %235, %239
  %241 = load double, ptr %29, align 8, !tbaa !5
  %242 = fmul double 4.000000e+00, %241
  %243 = load double, ptr %29, align 8, !tbaa !5
  %244 = call double @llvm.fmuladd.f64(double %242, double %243, double -3.000000e+00)
  %245 = fmul double %240, %244
  %246 = fneg double %245
  %247 = call double @llvm.fmuladd.f64(double %227, double %231, double %246)
  %248 = call double @llvm.fmuladd.f64(double %226, double %247, double %224)
  %249 = fmul double %223, %248
  store double %249, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #4
  %250 = load double, ptr %14, align 8, !tbaa !5
  %251 = load double, ptr %37, align 8, !tbaa !5
  %252 = fmul double %250, %251
  %253 = load double, ptr %26, align 8, !tbaa !5
  %254 = load double, ptr %39, align 8, !tbaa !5
  %255 = fsub double %253, %254
  %256 = fmul double %252, %255
  store double %256, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #4
  %257 = load double, ptr %22, align 8, !tbaa !5
  %258 = load double, ptr %30, align 8, !tbaa !5
  %259 = fmul double %257, %258
  %260 = load double, ptr %20, align 8, !tbaa !5
  %261 = load double, ptr %21, align 8, !tbaa !5
  %262 = load double, ptr %19, align 8, !tbaa !5
  %263 = load double, ptr %22, align 8, !tbaa !5
  %264 = fmul double %262, %263
  %265 = load double, ptr %31, align 8, !tbaa !5
  %266 = fmul double %264, %265
  %267 = fneg double %266
  %268 = call double @llvm.fmuladd.f64(double %260, double %261, double %267)
  %269 = call double @atan2(double noundef %259, double noundef %268) #4
  store double %269, ptr %41, align 8, !tbaa !5
  %270 = load double, ptr %41, align 8, !tbaa !5
  %271 = call double @sin(double noundef %270) #4
  %272 = load double, ptr %40, align 8, !tbaa !5
  %273 = fmul double %271, %272
  %274 = load ptr, ptr %11, align 8, !tbaa !9
  store double %273, ptr %274, align 8, !tbaa !5
  %275 = load double, ptr %41, align 8, !tbaa !5
  %276 = call double @cos(double noundef %275) #4
  %277 = load double, ptr %40, align 8, !tbaa !5
  %278 = fmul double %276, %277
  %279 = load ptr, ptr %12, align 8, !tbaa !9
  store double %278, ptr %279, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  store i32 0, ptr %34, align 4
  br label %280

280:                                              ; preds = %189, %186, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %281 = load i32, ptr %34, align 4
  switch i32 %281, label %283 [
    i32 0, label %282
    i32 1, label %282
  ]

282:                                              ; preds = %280, %280
  ret void

283:                                              ; preds = %280
  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 @atan(double noundef) #2

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

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

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

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

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

; Function Attrs: nounwind
declare double @atan2(double noundef, 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.fabs.f64(double) #3

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 = { 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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !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 nofree nounwind memory(write) uwtable
define dso_local void @_Z17geodeticOffsetInvddddRdS_(double noundef %0, double noundef %1, double noundef %2, double noundef %3, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %4, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %5) local_unnamed_addr #0 {
  %7 = fsub double %3, %1
  %8 = tail call double @tan(double noundef %0) #4
  %9 = fmul double %8, 0x3FEFE488A57B266C
  %10 = tail call double @atan(double noundef %9) #4
  %11 = tail call double @tan(double noundef %2) #4
  %12 = fmul double %11, 0x3FEFE488A57B266C
  %13 = tail call double @atan(double noundef %12) #4
  %14 = tail call double @sin(double noundef %10) #4
  %15 = tail call double @cos(double noundef %10) #4
  %16 = tail call double @sin(double noundef %13) #4
  %17 = tail call double @cos(double noundef %13) #4
  %18 = fneg double %14
  %19 = fmul double %17, %18
  %20 = fmul double %15, %17
  %21 = fmul double %14, 2.000000e+00
  %22 = fmul double %21, %16
  br label %23

23:                                               ; preds = %60, %6
  %.0117 = phi i32 [ 100, %6 ], [ %61, %60 ]
  %.0 = phi double [ %7, %6 ], [ %56, %60 ]
  %24 = tail call double @sin(double noundef %.0) #4
  %25 = tail call double @cos(double noundef %.0) #4
  %26 = fmul double %17, %24
  %27 = fmul double %19, %25
  %28 = tail call double @llvm.fmuladd.f64(double %15, double %16, double %27)
  %29 = fmul double %28, %28
  %30 = tail call double @llvm.fmuladd.f64(double %26, double %26, double %29)
  %sqrt = tail call double @llvm.sqrt.f64(double %30)
  %31 = fcmp oeq double %sqrt, 0.000000e+00
  br i1 %31, label %32, label %33

32:                                               ; preds = %23
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  br label %102

33:                                               ; preds = %23
  %34 = fmul double %20, %25
  %35 = tail call double @llvm.fmuladd.f64(double %14, double %16, double %34)
  %36 = tail call double @atan2(double noundef %sqrt, double noundef %35) #4
  %37 = fmul double %20, %24
  %38 = fdiv double %37, %sqrt
  %39 = fneg double %38
  %40 = tail call double @llvm.fmuladd.f64(double %39, double %38, double 1.000000e+00)
  %41 = fdiv double %22, %40
  %42 = fsub double %35, %41
  %.inv = fcmp ord double %42, 0.000000e+00
  %.0116 = select i1 %.inv, double %42, double 0.000000e+00
  %43 = fmul double %40, 0x3F2B775A84D99473
  %44 = tail call double @llvm.fmuladd.f64(double %40, double -3.000000e+00, double 4.000000e+00)
  %45 = tail call double @llvm.fmuladd.f64(double %44, double 0x3F6B775A84D99473, double 4.000000e+00)
  %46 = fmul double %43, %45
  %47 = fsub double 1.000000e+00, %46
  %48 = fmul double %47, 0x3F6B775A84D99473
  %49 = fmul double %38, %48
  %50 = fmul double %sqrt, %46
  %51 = fmul double %35, %46
  %52 = fmul double %.0116, 2.000000e+00
  %53 = tail call double @llvm.fmuladd.f64(double %52, double %.0116, double -1.000000e+00)
  %54 = tail call double @llvm.fmuladd.f64(double %51, double %53, double %.0116)
  %55 = tail call double @llvm.fmuladd.f64(double %50, double %54, double %36)
  %56 = tail call double @llvm.fmuladd.f64(double %49, double %55, double %7)
  %57 = fsub double %56, %.0
  %58 = tail call double @llvm.fabs.f64(double %57)
  %59 = fcmp ogt double %58, 0x3D719799812DEA11
  br i1 %59, label %60, label %.critedge.thread

60:                                               ; preds = %33
  %61 = add nsw i32 %.0117, -1
  %62 = icmp ugt i32 %.0117, 1
  br i1 %62, label %23, label %.critedge, !llvm.loop !9

.critedge:                                        ; preds = %60
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  br label %102

.critedge.thread:                                 ; preds = %33
  %63 = fmul double %40, 0x424FB41D442EEC00
  %64 = fdiv double %63, 0x42C260252EEB8994
  %65 = tail call double @llvm.fmuladd.f64(double %64, double -1.750000e+02, double 3.200000e+02)
  %66 = tail call double @llvm.fmuladd.f64(double %64, double %65, double -7.680000e+02)
  %67 = fmul double %64, 0x3F50000000000000
  %68 = tail call double @llvm.fmuladd.f64(double %64, double -4.700000e+01, double 7.400000e+01)
  %69 = tail call double @llvm.fmuladd.f64(double %64, double %68, double -1.280000e+02)
  %70 = tail call double @llvm.fmuladd.f64(double %64, double %69, double 2.560000e+02)
  %71 = fmul double %67, %70
  %72 = fmul double %sqrt, %71
  %73 = fmul double %sqrt, 4.000000e+00
  %74 = tail call double @llvm.fmuladd.f64(double %73, double %sqrt, double -3.000000e+00)
  %75 = fmul double %.0116, 4.000000e+00
  %76 = tail call double @llvm.fmuladd.f64(double %75, double %.0116, double -3.000000e+00)
  %77 = fdiv double %71, -6.000000e+00
  %78 = fmul double %.0116, %77
  %79 = fmul double %74, %78
  %80 = fmul double %76, %79
  %81 = insertelement <2 x double> poison, double %64, i64 0
  %82 = insertelement <2 x double> %81, double %71, i64 1
  %83 = fmul <2 x double> %82, <double 0x3F10000000000000, double 2.500000e-01>
  %84 = insertelement <2 x double> %82, double %35, i64 1
  %85 = insertelement <2 x double> poison, double %66, i64 0
  %86 = insertelement <2 x double> %85, double %53, i64 1
  %87 = insertelement <2 x double> <double 4.096000e+03, double poison>, double %80, i64 1
  %88 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %86, <2 x double> %87)
  %89 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %.0116, i64 1
  %90 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %83, <2 x double> %88, <2 x double> %89)
  %91 = insertelement <2 x double> <double 0x41583FC4141C970F, double poison>, double %72, i64 1
  %92 = fmul <2 x double> %91, %90
  %93 = extractelement <2 x double> %92, i64 1
  %94 = fsub double %36, %93
  %95 = extractelement <2 x double> %92, i64 0
  %96 = fmul double %95, %94
  %97 = tail call double @atan2(double noundef %26, double noundef %28) #4
  %98 = tail call double @sin(double noundef %97) #4
  %99 = fmul double %96, %98
  store double %99, ptr %4, align 8, !tbaa !5
  %100 = tail call double @cos(double noundef %97) #4
  %101 = fmul double %96, %100
  br label %102

102:                                              ; preds = %.critedge.thread, %.critedge, %32
  %.sink = phi double [ %101, %.critedge.thread ], [ 0.000000e+00, %.critedge ], [ 0.000000e+00, %32 ]
  store double %.sink, ptr %5, align 8, !tbaa !5
  ret void
}

; 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 @tan(double noundef) local_unnamed_addr #1

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

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

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

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

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

attributes #0 = { mustprogress nofree nounwind memory(write) 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass