; LLVM IR from OpenFAST/openfast :: modules/map/src (mapapi)

; 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.MAP_OtherStateType = type { ptr, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32 }
%struct.Domain_t = type { %struct.InnerSolveAttributes_t, %struct.OuterSolveAttributes_t, %struct.DomainOptions_t, ptr, i32, %struct.Vessel_t, %struct.list_t, %struct.list_t, %struct.list_t, %struct.list_t, ptr }
%struct.InnerSolveAttributes_t = type { ptr, double, double, double, [2 x double], [2 x double], [4 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], double, i32, i32, i32, i32, i32, [2 x i32], i32, i32 }
%struct.OuterSolveAttributes_t = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8, i32, i32, i32 }
%struct.DomainOptions_t = type { ptr, double, double, double, i8, i8, i32 }
%struct.Vessel_t = type { %struct.EulerAngle_t, ptr, ptr, ptr, %struct.Point_t, %struct.Point_t, %struct.Force_t }
%struct.EulerAngle_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.VarType_t = type { ptr, ptr, double, i8, i8, i32, i32 }
%struct.Point_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.Force_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.list_t = type { ptr, ptr, ptr, i32, ptr, i32, i32, i32, ptr, %struct.list_attributes_s }
%struct.list_attributes_s = type { ptr, ptr, ptr, i32, ptr, ptr, ptr }
%struct.MAP_InputType = type { ptr, ptr, i32, ptr, i32, ptr, i32 }

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

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

declare void @map_reset_universal_error(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @map_offset_vessel(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6, double noundef %7, ptr noundef %8, ptr noundef %9) #2 {
  %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 ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca [3 x [3 x double]], align 16
  %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
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store double %2, ptr %13, align 8, !tbaa !9
  store double %3, ptr %14, align 8, !tbaa !9
  store double %4, ptr %15, align 8, !tbaa !9
  store double %5, ptr %16, align 8, !tbaa !9
  store double %6, ptr %17, align 8, !tbaa !9
  store double %7, ptr %18, align 8, !tbaa !9
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.MAP_OtherStateType, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  store ptr %37, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %38 = load ptr, ptr %21, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.Domain_t, ptr %38, i32 0, i32 5
  store ptr %39, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.MAP_InputType, ptr %40, i32 0, i32 2
  %42 = load i32, ptr %41, align 8, !tbaa !15
  store i32 %42, ptr %24, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 72, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store double 0.000000e+00, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store double 0.000000e+00, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  store double 0.000000e+00, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store double 0.000000e+00, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  store double 0.000000e+00, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store double 0.000000e+00, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  store double 0.000000e+00, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  store double 0.000000e+00, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  store double 0.000000e+00, ptr %34, align 8, !tbaa !9
  %43 = load ptr, ptr %19, align 8, !tbaa !5
  %44 = load ptr, ptr %20, align 8, !tbaa !5
  call void @map_reset_universal_error(ptr noundef %43, ptr noundef %44)
  %45 = load double, ptr %16, align 8, !tbaa !9
  %46 = fmul double %45, 0x3F91DF46A226E211
  %47 = call double @cos(double noundef %46) #5
  store double %47, ptr %26, align 8, !tbaa !9
  %48 = load double, ptr %16, align 8, !tbaa !9
  %49 = fmul double %48, 0x3F91DF46A226E211
  %50 = call double @sin(double noundef %49) #5
  store double %50, ptr %27, align 8, !tbaa !9
  %51 = load double, ptr %17, align 8, !tbaa !9
  %52 = fmul double %51, 0x3F91DF46A226E211
  %53 = call double @cos(double noundef %52) #5
  store double %53, ptr %28, align 8, !tbaa !9
  %54 = load double, ptr %17, align 8, !tbaa !9
  %55 = fmul double %54, 0x3F91DF46A226E211
  %56 = call double @sin(double noundef %55) #5
  store double %56, ptr %29, align 8, !tbaa !9
  %57 = load double, ptr %18, align 8, !tbaa !9
  %58 = fmul double %57, 0x3F91DF46A226E211
  %59 = call double @cos(double noundef %58) #5
  store double %59, ptr %30, align 8, !tbaa !9
  %60 = load double, ptr %18, align 8, !tbaa !9
  %61 = fmul double %60, 0x3F91DF46A226E211
  %62 = call double @sin(double noundef %61) #5
  store double %62, ptr %31, align 8, !tbaa !9
  %63 = load double, ptr %30, align 8, !tbaa !9
  %64 = load double, ptr %28, align 8, !tbaa !9
  %65 = fmul double %63, %64
  %66 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 0
  %67 = getelementptr inbounds [3 x double], ptr %66, i64 0, i64 0
  store double %65, ptr %67, align 16, !tbaa !9
  %68 = load double, ptr %30, align 8, !tbaa !9
  %69 = load double, ptr %29, align 8, !tbaa !9
  %70 = fmul double %68, %69
  %71 = load double, ptr %27, align 8, !tbaa !9
  %72 = load double, ptr %31, align 8, !tbaa !9
  %73 = load double, ptr %26, align 8, !tbaa !9
  %74 = fmul double %72, %73
  %75 = fneg double %74
  %76 = call double @llvm.fmuladd.f64(double %70, double %71, double %75)
  %77 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 0
  %78 = getelementptr inbounds [3 x double], ptr %77, i64 0, i64 1
  store double %76, ptr %78, align 8, !tbaa !9
  %79 = load double, ptr %30, align 8, !tbaa !9
  %80 = load double, ptr %29, align 8, !tbaa !9
  %81 = fmul double %79, %80
  %82 = load double, ptr %26, align 8, !tbaa !9
  %83 = load double, ptr %31, align 8, !tbaa !9
  %84 = load double, ptr %27, align 8, !tbaa !9
  %85 = fmul double %83, %84
  %86 = call double @llvm.fmuladd.f64(double %81, double %82, double %85)
  %87 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 0
  %88 = getelementptr inbounds [3 x double], ptr %87, i64 0, i64 2
  store double %86, ptr %88, align 16, !tbaa !9
  %89 = load double, ptr %31, align 8, !tbaa !9
  %90 = load double, ptr %28, align 8, !tbaa !9
  %91 = fmul double %89, %90
  %92 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 1
  %93 = getelementptr inbounds [3 x double], ptr %92, i64 0, i64 0
  store double %91, ptr %93, align 8, !tbaa !9
  %94 = load double, ptr %27, align 8, !tbaa !9
  %95 = load double, ptr %29, align 8, !tbaa !9
  %96 = fmul double %94, %95
  %97 = load double, ptr %31, align 8, !tbaa !9
  %98 = load double, ptr %30, align 8, !tbaa !9
  %99 = load double, ptr %26, align 8, !tbaa !9
  %100 = fmul double %98, %99
  %101 = call double @llvm.fmuladd.f64(double %96, double %97, double %100)
  %102 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 1
  %103 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 1
  store double %101, ptr %103, align 8, !tbaa !9
  %104 = load double, ptr %31, align 8, !tbaa !9
  %105 = load double, ptr %29, align 8, !tbaa !9
  %106 = fmul double %104, %105
  %107 = load double, ptr %26, align 8, !tbaa !9
  %108 = load double, ptr %30, align 8, !tbaa !9
  %109 = load double, ptr %27, align 8, !tbaa !9
  %110 = fmul double %108, %109
  %111 = fneg double %110
  %112 = call double @llvm.fmuladd.f64(double %106, double %107, double %111)
  %113 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 1
  %114 = getelementptr inbounds [3 x double], ptr %113, i64 0, i64 2
  store double %112, ptr %114, align 8, !tbaa !9
  %115 = load double, ptr %29, align 8, !tbaa !9
  %116 = fneg double %115
  %117 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 2
  %118 = getelementptr inbounds [3 x double], ptr %117, i64 0, i64 0
  store double %116, ptr %118, align 16, !tbaa !9
  %119 = load double, ptr %28, align 8, !tbaa !9
  %120 = load double, ptr %27, align 8, !tbaa !9
  %121 = fmul double %119, %120
  %122 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 2
  %123 = getelementptr inbounds [3 x double], ptr %122, i64 0, i64 1
  store double %121, ptr %123, align 8, !tbaa !9
  %124 = load double, ptr %28, align 8, !tbaa !9
  %125 = load double, ptr %26, align 8, !tbaa !9
  %126 = fmul double %124, %125
  %127 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 2
  %128 = getelementptr inbounds [3 x double], ptr %127, i64 0, i64 2
  store double %126, ptr %128, align 16, !tbaa !9
  store i32 0, ptr %23, align 4, !tbaa !14
  br label %129

129:                                              ; preds = %224, %10
  %130 = load i32, ptr %23, align 4, !tbaa !14
  %131 = load i32, ptr %24, align 4, !tbaa !14
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %133, label %227

133:                                              ; preds = %129
  %134 = load ptr, ptr %22, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.Vessel_t, ptr %134, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i32, ptr %23, align 4, !tbaa !14
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !9
  store double %140, ptr %32, align 8, !tbaa !9
  %141 = load ptr, ptr %22, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.Vessel_t, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !24
  %144 = load i32, ptr %23, align 4, !tbaa !14
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !9
  store double %147, ptr %33, align 8, !tbaa !9
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.Vessel_t, ptr %148, i32 0, i32 3
  %150 = load ptr, ptr %149, align 8, !tbaa !25
  %151 = load i32, ptr %23, align 4, !tbaa !14
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds double, ptr %150, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !9
  store double %154, ptr %34, align 8, !tbaa !9
  %155 = load double, ptr %13, align 8, !tbaa !9
  %156 = load double, ptr %32, align 8, !tbaa !9
  %157 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 0
  %158 = getelementptr inbounds [3 x double], ptr %157, i64 0, i64 0
  %159 = load double, ptr %158, align 16, !tbaa !9
  %160 = load double, ptr %33, align 8, !tbaa !9
  %161 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 0
  %162 = getelementptr inbounds [3 x double], ptr %161, i64 0, i64 1
  %163 = load double, ptr %162, align 8, !tbaa !9
  %164 = fmul double %160, %163
  %165 = call double @llvm.fmuladd.f64(double %156, double %159, double %164)
  %166 = load double, ptr %34, align 8, !tbaa !9
  %167 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 0
  %168 = getelementptr inbounds [3 x double], ptr %167, i64 0, i64 2
  %169 = load double, ptr %168, align 16, !tbaa !9
  %170 = call double @llvm.fmuladd.f64(double %166, double %169, double %165)
  %171 = fadd double %155, %170
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.MAP_InputType, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !26
  %175 = load i32, ptr %23, align 4, !tbaa !14
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds double, ptr %174, i64 %176
  store double %171, ptr %177, align 8, !tbaa !9
  %178 = load double, ptr %14, align 8, !tbaa !9
  %179 = load double, ptr %32, align 8, !tbaa !9
  %180 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 1
  %181 = getelementptr inbounds [3 x double], ptr %180, i64 0, i64 0
  %182 = load double, ptr %181, align 8, !tbaa !9
  %183 = load double, ptr %33, align 8, !tbaa !9
  %184 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 1
  %185 = getelementptr inbounds [3 x double], ptr %184, i64 0, i64 1
  %186 = load double, ptr %185, align 8, !tbaa !9
  %187 = fmul double %183, %186
  %188 = call double @llvm.fmuladd.f64(double %179, double %182, double %187)
  %189 = load double, ptr %34, align 8, !tbaa !9
  %190 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 1
  %191 = getelementptr inbounds [3 x double], ptr %190, i64 0, i64 2
  %192 = load double, ptr %191, align 8, !tbaa !9
  %193 = call double @llvm.fmuladd.f64(double %189, double %192, double %188)
  %194 = fadd double %178, %193
  %195 = load ptr, ptr %12, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.MAP_InputType, ptr %195, i32 0, i32 3
  %197 = load ptr, ptr %196, align 8, !tbaa !27
  %198 = load i32, ptr %23, align 4, !tbaa !14
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds double, ptr %197, i64 %199
  store double %194, ptr %200, align 8, !tbaa !9
  %201 = load double, ptr %15, align 8, !tbaa !9
  %202 = load double, ptr %32, align 8, !tbaa !9
  %203 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 2
  %204 = getelementptr inbounds [3 x double], ptr %203, i64 0, i64 0
  %205 = load double, ptr %204, align 16, !tbaa !9
  %206 = load double, ptr %33, align 8, !tbaa !9
  %207 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 2
  %208 = getelementptr inbounds [3 x double], ptr %207, i64 0, i64 1
  %209 = load double, ptr %208, align 8, !tbaa !9
  %210 = fmul double %206, %209
  %211 = call double @llvm.fmuladd.f64(double %202, double %205, double %210)
  %212 = load double, ptr %34, align 8, !tbaa !9
  %213 = getelementptr inbounds [3 x [3 x double]], ptr %25, i64 0, i64 2
  %214 = getelementptr inbounds [3 x double], ptr %213, i64 0, i64 2
  %215 = load double, ptr %214, align 16, !tbaa !9
  %216 = call double @llvm.fmuladd.f64(double %212, double %215, double %211)
  %217 = fadd double %201, %216
  %218 = load ptr, ptr %12, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.MAP_InputType, ptr %218, i32 0, i32 5
  %220 = load ptr, ptr %219, align 8, !tbaa !28
  %221 = load i32, ptr %23, align 4, !tbaa !14
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds double, ptr %220, i64 %222
  store double %217, ptr %223, align 8, !tbaa !9
  br label %224

224:                                              ; preds = %133
  %225 = load i32, ptr %23, align 4, !tbaa !14
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %23, align 4, !tbaa !14
  br label %129, !llvm.loop !29

227:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  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
  call void @llvm.lifetime.end.p0(i64 72, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret void
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"MAP_OtherStateType", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !6, i64 40, !13, i64 48, !6, i64 56, !13, i64 64, !6, i64 72, !13, i64 80, !6, i64 88, !13, i64 96, !6, i64 104, !13, i64 112, !6, i64 120, !13, i64 128, !6, i64 136, !13, i64 144, !6, i64 152, !13, i64 160, !6, i64 168, !13, i64 176, !6, i64 184, !13, i64 192, !6, i64 200, !13, i64 208, !6, i64 216, !13, i64 224, !6, i64 232, !13, i64 240, !6, i64 248, !13, i64 256}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !13, i64 16}
!16 = !{!"MAP_InputType", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !6, i64 40, !13, i64 48}
!17 = !{!18, !6, i64 120}
!18 = !{!"Vessel_t", !19, i64 0, !6, i64 120, !6, i64 128, !6, i64 136, !22, i64 144, !22, i64 264, !23, i64 384}
!19 = !{!"EulerAngle_t", !20, i64 0, !20, i64 40, !20, i64 80}
!20 = !{!"VarType_t", !6, i64 0, !6, i64 8, !10, i64 16, !21, i64 24, !21, i64 25, !13, i64 28, !13, i64 32}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!"Point_t", !20, i64 0, !20, i64 40, !20, i64 80}
!23 = !{!"Force_t", !20, i64 0, !20, i64 40, !20, i64 80}
!24 = !{!18, !6, i64 128}
!25 = !{!18, !6, i64 136}
!26 = !{!16, !6, i64 8}
!27 = !{!16, !6, i64 24}
!28 = !{!16, !6, i64 40}
!29 = distinct !{!29, !30}
!30 = !{!"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"

declare void @map_reset_universal_error(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @map_offset_vessel(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6, double noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #1 {
  %11 = load ptr, ptr %0, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !11
  tail call void @map_reset_universal_error(ptr noundef %8, ptr noundef %9) #5
  %14 = fmul double %5, 0x3F91DF46A226E211
  %15 = tail call double @cos(double noundef %14) #5
  %16 = tail call double @sin(double noundef %14) #5
  %17 = fmul double %6, 0x3F91DF46A226E211
  %18 = tail call double @cos(double noundef %17) #5
  %19 = tail call double @sin(double noundef %17) #5
  %20 = fmul double %7, 0x3F91DF46A226E211
  %21 = tail call double @cos(double noundef %20) #5
  %22 = tail call double @sin(double noundef %20) #5
  %23 = fmul double %18, %21
  %24 = fmul double %19, %21
  %25 = fneg double %22
  %26 = fmul double %15, %25
  %27 = tail call double @llvm.fmuladd.f64(double %24, double %16, double %26)
  %28 = fmul double %16, %22
  %29 = tail call double @llvm.fmuladd.f64(double %24, double %15, double %28)
  %30 = fmul double %18, %22
  %31 = fmul double %16, %19
  %32 = fmul double %15, %21
  %33 = tail call double @llvm.fmuladd.f64(double %31, double %22, double %32)
  %34 = fmul double %19, %22
  %35 = fneg double %21
  %36 = fmul double %16, %35
  %37 = tail call double @llvm.fmuladd.f64(double %34, double %15, double %36)
  %38 = fneg double %19
  %39 = fmul double %16, %18
  %40 = fmul double %15, %18
  %41 = icmp sgt i32 %13, 0
  br i1 %41, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10
  %42 = getelementptr inbounds i8, ptr %11, i64 584
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = getelementptr inbounds i8, ptr %11, i64 592
  %45 = load ptr, ptr %44, align 8, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %11, i64 600
  %47 = load ptr, ptr %46, align 8, !tbaa !22
  %48 = getelementptr inbounds i8, ptr %1, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %1, i64 24
  %51 = load ptr, ptr %50, align 8, !tbaa !24
  %52 = getelementptr inbounds i8, ptr %1, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !25
  %wide.trip.count = zext nneg i32 %13 to i64
  %min.iters.check = icmp ult i32 %13, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %54 = ptrtoint ptr %53 to i64
  %55 = ptrtoint ptr %51 to i64
  %56 = ptrtoint ptr %49 to i64
  %57 = ptrtoint ptr %47 to i64
  %58 = ptrtoint ptr %45 to i64
  %59 = ptrtoint ptr %43 to i64
  %60 = sub i64 %55, %56
  %diff.check = icmp ult i64 %60, 16
  %61 = sub i64 %54, %56
  %diff.check68 = icmp ult i64 %61, 16
  %conflict.rdx = or i1 %diff.check, %diff.check68
  %62 = sub i64 %56, %59
  %diff.check69 = icmp ult i64 %62, 16
  %conflict.rdx70 = or i1 %conflict.rdx, %diff.check69
  %63 = sub i64 %56, %58
  %diff.check71 = icmp ult i64 %63, 16
  %conflict.rdx72 = or i1 %conflict.rdx70, %diff.check71
  %64 = sub i64 %56, %57
  %diff.check73 = icmp ult i64 %64, 16
  %conflict.rdx74 = or i1 %conflict.rdx72, %diff.check73
  %65 = sub i64 %54, %55
  %diff.check75 = icmp ult i64 %65, 16
  %conflict.rdx76 = or i1 %conflict.rdx74, %diff.check75
  %66 = sub i64 %55, %59
  %diff.check77 = icmp ult i64 %66, 16
  %conflict.rdx78 = or i1 %conflict.rdx76, %diff.check77
  %67 = sub i64 %55, %58
  %diff.check79 = icmp ult i64 %67, 16
  %conflict.rdx80 = or i1 %conflict.rdx78, %diff.check79
  %68 = sub i64 %55, %57
  %diff.check81 = icmp ult i64 %68, 16
  %conflict.rdx82 = or i1 %conflict.rdx80, %diff.check81
  %69 = sub i64 %54, %59
  %diff.check83 = icmp ult i64 %69, 16
  %conflict.rdx84 = or i1 %conflict.rdx82, %diff.check83
  %70 = sub i64 %54, %58
  %diff.check85 = icmp ult i64 %70, 16
  %conflict.rdx86 = or i1 %conflict.rdx84, %diff.check85
  %71 = sub i64 %54, %57
  %diff.check87 = icmp ult i64 %71, 16
  %conflict.rdx88 = or i1 %conflict.rdx86, %diff.check87
  br i1 %conflict.rdx88, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %27, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert91 = insertelement <2 x double> poison, double %23, i64 0
  %broadcast.splat92 = shufflevector <2 x double> %broadcast.splatinsert91, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert93 = insertelement <2 x double> poison, double %29, i64 0
  %broadcast.splat94 = shufflevector <2 x double> %broadcast.splatinsert93, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert95 = insertelement <2 x double> poison, double %2, i64 0
  %broadcast.splat96 = shufflevector <2 x double> %broadcast.splatinsert95, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert97 = insertelement <2 x double> poison, double %33, i64 0
  %broadcast.splat98 = shufflevector <2 x double> %broadcast.splatinsert97, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert99 = insertelement <2 x double> poison, double %30, i64 0
  %broadcast.splat100 = shufflevector <2 x double> %broadcast.splatinsert99, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert101 = insertelement <2 x double> poison, double %37, i64 0
  %broadcast.splat102 = shufflevector <2 x double> %broadcast.splatinsert101, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert103 = insertelement <2 x double> poison, double %3, i64 0
  %broadcast.splat104 = shufflevector <2 x double> %broadcast.splatinsert103, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert105 = insertelement <2 x double> poison, double %39, i64 0
  %broadcast.splat106 = shufflevector <2 x double> %broadcast.splatinsert105, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert107 = insertelement <2 x double> poison, double %38, i64 0
  %broadcast.splat108 = shufflevector <2 x double> %broadcast.splatinsert107, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert109 = insertelement <2 x double> poison, double %40, i64 0
  %broadcast.splat110 = shufflevector <2 x double> %broadcast.splatinsert109, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert111 = insertelement <2 x double> poison, double %4, i64 0
  %broadcast.splat112 = shufflevector <2 x double> %broadcast.splatinsert111, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %72 = getelementptr inbounds double, ptr %43, i64 %index
  %wide.load = load <2 x double>, ptr %72, align 8, !tbaa !26
  %73 = getelementptr inbounds double, ptr %45, i64 %index
  %wide.load89 = load <2 x double>, ptr %73, align 8, !tbaa !26
  %74 = getelementptr inbounds double, ptr %47, i64 %index
  %wide.load90 = load <2 x double>, ptr %74, align 8, !tbaa !26
  %75 = fmul <2 x double> %broadcast.splat, %wide.load89
  %76 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat92, <2 x double> %75)
  %77 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load90, <2 x double> %broadcast.splat94, <2 x double> %76)
  %78 = fadd <2 x double> %77, %broadcast.splat96
  %79 = getelementptr inbounds double, ptr %49, i64 %index
  store <2 x double> %78, ptr %79, align 8, !tbaa !26
  %80 = fmul <2 x double> %broadcast.splat98, %wide.load89
  %81 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat100, <2 x double> %80)
  %82 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load90, <2 x double> %broadcast.splat102, <2 x double> %81)
  %83 = fadd <2 x double> %82, %broadcast.splat104
  %84 = getelementptr inbounds double, ptr %51, i64 %index
  store <2 x double> %83, ptr %84, align 8, !tbaa !26
  %85 = fmul <2 x double> %broadcast.splat106, %wide.load89
  %86 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat108, <2 x double> %85)
  %87 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load90, <2 x double> %broadcast.splat110, <2 x double> %86)
  %88 = fadd <2 x double> %87, %broadcast.splat112
  %89 = getelementptr inbounds double, ptr %53, i64 %index
  store <2 x double> %88, ptr %89, align 8, !tbaa !26
  %index.next = add nuw i64 %index, 2
  %90 = icmp eq i64 %index.next, %n.vec
  br i1 %90, label %middle.block, label %vector.body, !llvm.loop !27

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %91 = getelementptr inbounds double, ptr %43, i64 %indvars.iv
  %92 = load double, ptr %91, align 8, !tbaa !26
  %93 = getelementptr inbounds double, ptr %45, i64 %indvars.iv
  %94 = load double, ptr %93, align 8, !tbaa !26
  %95 = getelementptr inbounds double, ptr %47, i64 %indvars.iv
  %96 = load double, ptr %95, align 8, !tbaa !26
  %97 = fmul double %27, %94
  %98 = tail call double @llvm.fmuladd.f64(double %92, double %23, double %97)
  %99 = tail call double @llvm.fmuladd.f64(double %96, double %29, double %98)
  %100 = fadd double %99, %2
  %101 = getelementptr inbounds double, ptr %49, i64 %indvars.iv
  store double %100, ptr %101, align 8, !tbaa !26
  %102 = fmul double %33, %94
  %103 = tail call double @llvm.fmuladd.f64(double %92, double %30, double %102)
  %104 = tail call double @llvm.fmuladd.f64(double %96, double %37, double %103)
  %105 = fadd double %104, %3
  %106 = getelementptr inbounds double, ptr %51, i64 %indvars.iv
  store double %105, ptr %106, align 8, !tbaa !26
  %107 = fmul double %39, %94
  %108 = tail call double @llvm.fmuladd.f64(double %92, double %38, double %107)
  %109 = tail call double @llvm.fmuladd.f64(double %96, double %40, double %108)
  %110 = fadd double %109, %4
  %111 = getelementptr inbounds double, ptr %53, i64 %indvars.iv
  store double %110, ptr %111, align 8, !tbaa !26
  %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 %scalar.ph, !llvm.loop !31

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %10
  ret void
}

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

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

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

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

attributes #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !7, i64 0}
!6 = !{!"MAP_OtherStateType", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !10, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !7, i64 168, !10, i64 176, !7, i64 184, !10, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !10, i64 224, !7, i64 232, !10, i64 240, !7, i64 248, !10, i64 256}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"MAP_InputType", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48}
!13 = !{!14, !7, i64 120}
!14 = !{!"Vessel_t", !15, i64 0, !7, i64 120, !7, i64 128, !7, i64 136, !19, i64 144, !19, i64 264, !20, i64 384}
!15 = !{!"EulerAngle_t", !16, i64 0, !16, i64 40, !16, i64 80}
!16 = !{!"VarType_t", !7, i64 0, !7, i64 8, !17, i64 16, !18, i64 24, !18, i64 25, !10, i64 28, !10, i64 32}
!17 = !{!"double", !8, i64 0}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!"Point_t", !16, i64 0, !16, i64 40, !16, i64 80}
!20 = !{!"Force_t", !16, i64 0, !16, i64 40, !16, i64 80}
!21 = !{!14, !7, i64 128}
!22 = !{!14, !7, i64 136}
!23 = !{!12, !7, i64 8}
!24 = !{!12, !7, i64 24}
!25 = !{!12, !7, i64 40}
!26 = !{!17, !17, i64 0}
!27 = distinct !{!27, !28, !29, !30}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.isvectorized", i32 1}
!30 = !{!"llvm.loop.unroll.runtime.disable"}
!31 = distinct !{!31, !28, !29}


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