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

; 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.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 }

; Function Attrs: nounwind uwtable
define dso_local void @initialize_vessel_to_null(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds %struct.Vessel_t, ptr %3, i32 0, i32 1
  store ptr null, ptr %4, align 8, !tbaa !9
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.Vessel_t, ptr %5, i32 0, i32 2
  store ptr null, ptr %6, align 8, !tbaa !18
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.Vessel_t, ptr %7, i32 0, i32 3
  store ptr null, ptr %8, align 8, !tbaa !19
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.Vessel_t, ptr %9, i32 0, i32 4
  %11 = getelementptr inbounds %struct.Point_t, ptr %10, i32 0, i32 0
  %12 = getelementptr inbounds %struct.VarType_t, ptr %11, i32 0, i32 1
  store ptr null, ptr %12, align 8, !tbaa !20
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.Vessel_t, ptr %13, i32 0, i32 4
  %15 = getelementptr inbounds %struct.Point_t, ptr %14, i32 0, i32 1
  %16 = getelementptr inbounds %struct.VarType_t, ptr %15, i32 0, i32 1
  store ptr null, ptr %16, align 8, !tbaa !21
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Vessel_t, ptr %17, i32 0, i32 4
  %19 = getelementptr inbounds %struct.Point_t, ptr %18, i32 0, i32 2
  %20 = getelementptr inbounds %struct.VarType_t, ptr %19, i32 0, i32 1
  store ptr null, ptr %20, align 8, !tbaa !22
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.Vessel_t, ptr %21, i32 0, i32 5
  %23 = getelementptr inbounds %struct.Point_t, ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %struct.VarType_t, ptr %23, i32 0, i32 1
  store ptr null, ptr %24, align 8, !tbaa !23
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.Vessel_t, ptr %25, i32 0, i32 5
  %27 = getelementptr inbounds %struct.Point_t, ptr %26, i32 0, i32 1
  %28 = getelementptr inbounds %struct.VarType_t, ptr %27, i32 0, i32 1
  store ptr null, ptr %28, align 8, !tbaa !24
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.Vessel_t, ptr %29, i32 0, i32 5
  %31 = getelementptr inbounds %struct.Point_t, ptr %30, i32 0, i32 2
  %32 = getelementptr inbounds %struct.VarType_t, ptr %31, i32 0, i32 1
  store ptr null, ptr %32, align 8, !tbaa !25
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.Vessel_t, ptr %33, i32 0, i32 6
  %35 = getelementptr inbounds %struct.Force_t, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %struct.VarType_t, ptr %35, i32 0, i32 1
  store ptr null, ptr %36, align 8, !tbaa !26
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Vessel_t, ptr %37, i32 0, i32 6
  %39 = getelementptr inbounds %struct.Force_t, ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds %struct.VarType_t, ptr %39, i32 0, i32 1
  store ptr null, ptr %40, align 8, !tbaa !27
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.Vessel_t, ptr %41, i32 0, i32 6
  %43 = getelementptr inbounds %struct.Force_t, ptr %42, i32 0, i32 2
  %44 = getelementptr inbounds %struct.VarType_t, ptr %43, i32 0, i32 1
  store ptr null, ptr %44, align 8, !tbaa !28
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Vessel_t, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds %struct.EulerAngle_t, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %struct.VarType_t, ptr %47, i32 0, i32 1
  store ptr null, ptr %48, align 8, !tbaa !29
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Vessel_t, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %struct.EulerAngle_t, ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds %struct.VarType_t, ptr %51, i32 0, i32 1
  store ptr null, ptr %52, align 8, !tbaa !30
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.Vessel_t, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds %struct.EulerAngle_t, ptr %54, i32 0, i32 2
  %56 = getelementptr inbounds %struct.VarType_t, ptr %55, i32 0, i32 1
  store ptr null, ptr %56, align 8, !tbaa !31
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.Vessel_t, ptr %57, i32 0, i32 4
  %59 = getelementptr inbounds %struct.Point_t, ptr %58, i32 0, i32 0
  %60 = getelementptr inbounds %struct.VarType_t, ptr %59, i32 0, i32 0
  store ptr null, ptr %60, align 8, !tbaa !32
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.Vessel_t, ptr %61, i32 0, i32 4
  %63 = getelementptr inbounds %struct.Point_t, ptr %62, i32 0, i32 1
  %64 = getelementptr inbounds %struct.VarType_t, ptr %63, i32 0, i32 0
  store ptr null, ptr %64, align 8, !tbaa !33
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.Vessel_t, ptr %65, i32 0, i32 4
  %67 = getelementptr inbounds %struct.Point_t, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.VarType_t, ptr %67, i32 0, i32 0
  store ptr null, ptr %68, align 8, !tbaa !34
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.Vessel_t, ptr %69, i32 0, i32 5
  %71 = getelementptr inbounds %struct.Point_t, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %struct.VarType_t, ptr %71, i32 0, i32 0
  store ptr null, ptr %72, align 8, !tbaa !35
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.Vessel_t, ptr %73, i32 0, i32 5
  %75 = getelementptr inbounds %struct.Point_t, ptr %74, i32 0, i32 1
  %76 = getelementptr inbounds %struct.VarType_t, ptr %75, i32 0, i32 0
  store ptr null, ptr %76, align 8, !tbaa !36
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.Vessel_t, ptr %77, i32 0, i32 5
  %79 = getelementptr inbounds %struct.Point_t, ptr %78, i32 0, i32 2
  %80 = getelementptr inbounds %struct.VarType_t, ptr %79, i32 0, i32 0
  store ptr null, ptr %80, align 8, !tbaa !37
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.Vessel_t, ptr %81, i32 0, i32 6
  %83 = getelementptr inbounds %struct.Force_t, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.VarType_t, ptr %83, i32 0, i32 0
  store ptr null, ptr %84, align 8, !tbaa !38
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.Vessel_t, ptr %85, i32 0, i32 6
  %87 = getelementptr inbounds %struct.Force_t, ptr %86, i32 0, i32 1
  %88 = getelementptr inbounds %struct.VarType_t, ptr %87, i32 0, i32 0
  store ptr null, ptr %88, align 8, !tbaa !39
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.Vessel_t, ptr %89, i32 0, i32 6
  %91 = getelementptr inbounds %struct.Force_t, ptr %90, i32 0, i32 2
  %92 = getelementptr inbounds %struct.VarType_t, ptr %91, i32 0, i32 0
  store ptr null, ptr %92, align 8, !tbaa !40
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.Vessel_t, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds %struct.EulerAngle_t, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds %struct.VarType_t, ptr %95, i32 0, i32 0
  store ptr null, ptr %96, align 8, !tbaa !41
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Vessel_t, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds %struct.EulerAngle_t, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.VarType_t, ptr %99, i32 0, i32 0
  store ptr null, ptr %100, align 8, !tbaa !42
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.Vessel_t, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds %struct.EulerAngle_t, ptr %102, i32 0, i32 2
  %104 = getelementptr inbounds %struct.VarType_t, ptr %103, i32 0, i32 0
  store ptr null, ptr %104, align 8, !tbaa !43
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.Vessel_t, ptr %105, i32 0, i32 5
  %107 = getelementptr inbounds %struct.Point_t, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds %struct.VarType_t, ptr %107, i32 0, i32 2
  store double 0.000000e+00, ptr %108, align 8, !tbaa !44
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.Vessel_t, ptr %109, i32 0, i32 5
  %111 = getelementptr inbounds %struct.Point_t, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.VarType_t, ptr %111, i32 0, i32 2
  store double 0.000000e+00, ptr %112, align 8, !tbaa !45
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.Vessel_t, ptr %113, i32 0, i32 5
  %115 = getelementptr inbounds %struct.Point_t, ptr %114, i32 0, i32 2
  %116 = getelementptr inbounds %struct.VarType_t, ptr %115, i32 0, i32 2
  store double 0.000000e+00, ptr %116, align 8, !tbaa !46
  ret void
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !6, i64 120}
!10 = !{!"Vessel_t", !11, i64 0, !6, i64 120, !6, i64 128, !6, i64 136, !16, i64 144, !16, i64 264, !17, i64 384}
!11 = !{!"EulerAngle_t", !12, i64 0, !12, i64 40, !12, i64 80}
!12 = !{!"VarType_t", !6, i64 0, !6, i64 8, !13, i64 16, !14, i64 24, !14, i64 25, !15, i64 28, !15, i64 32}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"Point_t", !12, i64 0, !12, i64 40, !12, i64 80}
!17 = !{!"Force_t", !12, i64 0, !12, i64 40, !12, i64 80}
!18 = !{!10, !6, i64 128}
!19 = !{!10, !6, i64 136}
!20 = !{!10, !6, i64 152}
!21 = !{!10, !6, i64 192}
!22 = !{!10, !6, i64 232}
!23 = !{!10, !6, i64 272}
!24 = !{!10, !6, i64 312}
!25 = !{!10, !6, i64 352}
!26 = !{!10, !6, i64 392}
!27 = !{!10, !6, i64 432}
!28 = !{!10, !6, i64 472}
!29 = !{!10, !6, i64 8}
!30 = !{!10, !6, i64 48}
!31 = !{!10, !6, i64 88}
!32 = !{!10, !6, i64 144}
!33 = !{!10, !6, i64 184}
!34 = !{!10, !6, i64 224}
!35 = !{!10, !6, i64 264}
!36 = !{!10, !6, i64 304}
!37 = !{!10, !6, i64 344}
!38 = !{!10, !6, i64 384}
!39 = !{!10, !6, i64 424}
!40 = !{!10, !6, i64 464}
!41 = !{!10, !6, i64 0}
!42 = !{!10, !6, i64 40}
!43 = !{!10, !6, i64 80}
!44 = !{!10, !13, i64 280}
!45 = !{!10, !13, i64 320}
!46 = !{!10, !13, i64 360}


; 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 norecurse nosync nounwind willreturn memory(argmem: write) uwtable
define dso_local void @initialize_vessel_to_null(ptr nocapture noundef writeonly %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 120
  %3 = getelementptr inbounds i8, ptr %0, i64 184
  %4 = getelementptr inbounds i8, ptr %0, i64 224
  %5 = getelementptr inbounds i8, ptr %0, i64 264
  %6 = getelementptr inbounds i8, ptr %0, i64 304
  %7 = getelementptr inbounds i8, ptr %0, i64 344
  %8 = getelementptr inbounds i8, ptr %0, i64 384
  %9 = getelementptr inbounds i8, ptr %0, i64 424
  %10 = getelementptr inbounds i8, ptr %0, i64 464
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %0, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %11, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 0, i64 40, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass