; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Vehicle/VehicleTransmission.ll (ZN3JPH19VehicleTransmission6UpdateEfffb)

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

%"class.JPH::VehicleTransmissionSettings" = type { i8, %"class.JPH::Array", %"class.JPH::Array", float, float, float, float, float, float }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::VehicleTransmission" = type <{ %"class.JPH::VehicleTransmissionSettings", i32, float, float, float, float, [4 x i8] }>

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH19VehicleTransmission6UpdateEfffb(ptr noundef nonnull align 8 dereferenceable(100) %0, float noundef %1, float noundef %2, float noundef %3, i1 noundef zeroext %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store float %1, ptr %7, align 4, !tbaa !9
  store float %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !9
  %20 = zext i1 %4 to i8
  store i8 %20, ptr %10, align 1, !tbaa !11
  %21 = load ptr, ptr %6, align 8
  %22 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 0
  %23 = load i8, ptr %22, align 8, !tbaa !13
  %24 = icmp eq i8 %23, 0
  br i1 %24, label %25, label %199

25:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %26 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %27 = load i32, ptr %26, align 8, !tbaa !18
  store i32 %27, ptr %11, align 4, !tbaa !21
  %28 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %29 = load i32, ptr %28, align 8, !tbaa !18
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %38, label %31

31:                                               ; preds = %25
  %32 = load float, ptr %9, align 4, !tbaa !9
  %33 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !18
  %35 = sitofp i32 %34 to float
  %36 = fmul float %32, %35
  %37 = fcmp olt float %36, 0.000000e+00
  br i1 %37, label %38, label %50

38:                                               ; preds = %31, %25
  %39 = load float, ptr %9, align 4, !tbaa !9
  %40 = fcmp ogt float %39, 0.000000e+00
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  br label %47

42:                                               ; preds = %38
  %43 = load float, ptr %9, align 4, !tbaa !9
  %44 = fcmp olt float %43, 0.000000e+00
  %45 = zext i1 %44 to i64
  %46 = select i1 %44, i32 -1, i32 0
  br label %47

47:                                               ; preds = %42, %41
  %48 = phi i32 [ 1, %41 ], [ %46, %42 ]
  %49 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  store i32 %48, ptr %49, align 8, !tbaa !18
  br label %133

50:                                               ; preds = %31
  %51 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 5
  %52 = load float, ptr %51, align 8, !tbaa !22
  %53 = fcmp oeq float %52, 0.000000e+00
  br i1 %53, label %54, label %132

54:                                               ; preds = %50
  %55 = load i8, ptr %10, align 1, !tbaa !11, !range !23, !noundef !24
  %56 = trunc i8 %55 to i1
  br i1 %56, label %57, label %92

57:                                               ; preds = %54
  %58 = load float, ptr %8, align 4, !tbaa !9
  %59 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 6
  %60 = load float, ptr %59, align 4, !tbaa !25
  %61 = fcmp ogt float %58, %60
  br i1 %61, label %62, label %92

62:                                               ; preds = %57
  %63 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %64 = load i32, ptr %63, align 8, !tbaa !18
  %65 = icmp slt i32 %64, 0
  br i1 %65, label %66, label %79

66:                                               ; preds = %62
  %67 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %68 = load i32, ptr %67, align 8, !tbaa !18
  %69 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 2
  %70 = call noundef i64 @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %69)
  %71 = trunc i64 %70 to i32
  %72 = sub nsw i32 0, %71
  %73 = icmp sgt i32 %68, %72
  br i1 %73, label %74, label %78

74:                                               ; preds = %66
  %75 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !18
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %75, align 8, !tbaa !18
  br label %78

78:                                               ; preds = %74, %66
  br label %91

79:                                               ; preds = %62
  %80 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %81 = load i32, ptr %80, align 8, !tbaa !18
  %82 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 1
  %83 = call noundef i64 @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %82)
  %84 = trunc i64 %83 to i32
  %85 = icmp slt i32 %81, %84
  br i1 %85, label %86, label %90

86:                                               ; preds = %79
  %87 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %88 = load i32, ptr %87, align 8, !tbaa !18
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %87, align 8, !tbaa !18
  br label %90

90:                                               ; preds = %86, %79
  br label %91

91:                                               ; preds = %90, %78
  br label %131

92:                                               ; preds = %57, %54
  %93 = load float, ptr %8, align 4, !tbaa !9
  %94 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 7
  %95 = load float, ptr %94, align 8, !tbaa !26
  %96 = fcmp olt float %93, %95
  br i1 %96, label %97, label %130

97:                                               ; preds = %92
  %98 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !18
  %100 = icmp slt i32 %99, 0
  br i1 %100, label %101, label %115

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %102 = load float, ptr %9, align 4, !tbaa !9
  %103 = fcmp une float %102, 0.000000e+00
  %104 = zext i1 %103 to i64
  %105 = select i1 %103, i32 -1, i32 0
  store i32 %105, ptr %12, align 4, !tbaa !21
  %106 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !18
  %108 = load i32, ptr %12, align 4, !tbaa !21
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %110, label %114

110:                                              ; preds = %101
  %111 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %112 = load i32, ptr %111, align 8, !tbaa !18
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %111, align 8, !tbaa !18
  br label %114

114:                                              ; preds = %110, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %129

115:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %116 = load float, ptr %9, align 4, !tbaa !9
  %117 = fcmp une float %116, 0.000000e+00
  %118 = zext i1 %117 to i64
  %119 = select i1 %117, i32 1, i32 0
  store i32 %119, ptr %13, align 4, !tbaa !21
  %120 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %121 = load i32, ptr %120, align 8, !tbaa !18
  %122 = load i32, ptr %13, align 4, !tbaa !21
  %123 = icmp sgt i32 %121, %122
  br i1 %123, label %124, label %128

124:                                              ; preds = %115
  %125 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %126 = load i32, ptr %125, align 8, !tbaa !18
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %125, align 8, !tbaa !18
  br label %128

128:                                              ; preds = %124, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %129

129:                                              ; preds = %128, %114
  br label %130

130:                                              ; preds = %129, %92
  br label %131

131:                                              ; preds = %130, %91
  br label %132

132:                                              ; preds = %131, %50
  br label %133

133:                                              ; preds = %132, %47
  %134 = load i32, ptr %11, align 4, !tbaa !21
  %135 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 1
  %136 = load i32, ptr %135, align 8, !tbaa !18
  %137 = icmp ne i32 %134, %136
  br i1 %137, label %138, label %155

138:                                              ; preds = %133
  %139 = load i32, ptr %11, align 4, !tbaa !21
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %144

141:                                              ; preds = %138
  %142 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 3
  %143 = load float, ptr %142, align 8, !tbaa !27
  br label %145

144:                                              ; preds = %138
  br label %145

145:                                              ; preds = %144, %141
  %146 = phi float [ %143, %141 ], [ 0.000000e+00, %144 ]
  %147 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 3
  store float %146, ptr %147, align 8, !tbaa !28
  %148 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 4
  %149 = load float, ptr %148, align 4, !tbaa !29
  %150 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 4
  store float %149, ptr %150, align 4, !tbaa !30
  %151 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 5
  %152 = load float, ptr %151, align 8, !tbaa !31
  %153 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 5
  store float %152, ptr %153, align 8, !tbaa !22
  %154 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 2
  store float 0.000000e+00, ptr %154, align 4, !tbaa !32
  br label %198

155:                                              ; preds = %133
  %156 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 3
  %157 = load float, ptr %156, align 8, !tbaa !28
  %158 = fcmp ogt float %157, 0.000000e+00
  br i1 %158, label %159, label %168

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store float 0.000000e+00, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %160 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 3
  %161 = load float, ptr %160, align 8, !tbaa !28
  %162 = load float, ptr %7, align 4, !tbaa !9
  %163 = fsub float %161, %162
  store float %163, ptr %15, align 4, !tbaa !9
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %165 = load float, ptr %164, align 4, !tbaa !9
  %166 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 3
  store float %165, ptr %166, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  %167 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 2
  store float 0.000000e+00, ptr %167, align 4, !tbaa !32
  br label %197

168:                                              ; preds = %155
  %169 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 4
  %170 = load float, ptr %169, align 4, !tbaa !30
  %171 = fcmp ogt float %170, 0.000000e+00
  br i1 %171, label %172, label %187

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store float 0.000000e+00, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %173 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 4
  %174 = load float, ptr %173, align 4, !tbaa !30
  %175 = load float, ptr %7, align 4, !tbaa !9
  %176 = fsub float %174, %175
  store float %176, ptr %17, align 4, !tbaa !9
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %178 = load float, ptr %177, align 4, !tbaa !9
  %179 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 4
  store float %178, ptr %179, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  %180 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 4
  %181 = load float, ptr %180, align 4, !tbaa !30
  %182 = getelementptr inbounds %"class.JPH::VehicleTransmissionSettings", ptr %21, i32 0, i32 4
  %183 = load float, ptr %182, align 4, !tbaa !29
  %184 = fdiv float %181, %183
  %185 = fsub float 1.000000e+00, %184
  %186 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 2
  store float %185, ptr %186, align 4, !tbaa !32
  br label %196

187:                                              ; preds = %168
  %188 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 2
  store float 1.000000e+00, ptr %188, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %189 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 5
  %190 = load float, ptr %189, align 8, !tbaa !22
  %191 = load float, ptr %7, align 4, !tbaa !9
  %192 = fsub float %190, %191
  store float %192, ptr %19, align 4, !tbaa !9
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %194 = load float, ptr %193, align 4, !tbaa !9
  %195 = getelementptr inbounds %"class.JPH::VehicleTransmission", ptr %21, i32 0, i32 5
  store float %194, ptr %195, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %196

196:                                              ; preds = %187, %172
  br label %197

197:                                              ; preds = %196, %159
  br label %198

198:                                              ; preds = %197, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %199

199:                                              ; preds = %198, %5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3JPH27VehicleTransmissionSettingsE", !15, i64 0, !16, i64 8, !16, i64 32, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76}
!15 = !{!"_ZTSN3JPH17ETransmissionModeE", !7, i64 0}
!16 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !17, i64 0, !17, i64 8, !6, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!19, !20, i64 80}
!19 = !{!"_ZTSN3JPH19VehicleTransmissionE", !14, i64 0, !20, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96}
!20 = !{!"int", !7, i64 0}
!21 = !{!20, !20, i64 0}
!22 = !{!19, !10, i64 96}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!14, !10, i64 68}
!26 = !{!14, !10, i64 72}
!27 = !{!14, !10, i64 56}
!28 = !{!19, !10, i64 88}
!29 = !{!14, !10, i64 60}
!30 = !{!19, !10, i64 92}
!31 = !{!14, !10, i64 64}
!32 = !{!19, !10, i64 84}


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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3JPH19VehicleTransmission6UpdateEfffb(ptr noundef nonnull align 8 dereferenceable(100) %0, float noundef %1, float noundef %2, float noundef %3, i1 noundef zeroext %4) local_unnamed_addr #1 align 2 {
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = load i8, ptr %0, align 8, !tbaa !5
  %13 = icmp eq i8 %12, 0
  br i1 %13, label %14, label %104

14:                                               ; preds = %5
  %15 = getelementptr inbounds i8, ptr %0, i64 80
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %22, label %18

18:                                               ; preds = %14
  %19 = sitofp i32 %16 to float
  %20 = fmul float %19, %3
  %21 = fcmp olt float %20, 0.000000e+00
  br i1 %21, label %22, label %27

22:                                               ; preds = %18, %14
  %23 = fcmp ogt float %3, 0.000000e+00
  %24 = fcmp olt float %3, 0.000000e+00
  %25 = sext i1 %24 to i32
  %26 = select i1 %23, i32 1, i32 %25
  br label %.sink.split

27:                                               ; preds = %18
  %28 = getelementptr inbounds i8, ptr %0, i64 96
  %29 = load float, ptr %28, align 8, !tbaa !17
  %30 = fcmp oeq float %29, 0.000000e+00
  br i1 %30, label %31, label %.thread

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %0, i64 68
  %33 = load float, ptr %32, align 4
  %34 = fcmp olt float %33, %2
  %or.cond = select i1 %4, i1 %34, i1 false
  br i1 %or.cond, label %35, label %52

35:                                               ; preds = %31
  %36 = icmp slt i32 %16, 0
  br i1 %36, label %37, label %45

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %0, i64 32
  %39 = tail call noundef i64 @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
  %40 = trunc i64 %39 to i32
  %41 = sub nsw i32 0, %40
  %42 = icmp sgt i32 %16, %41
  %.pre = load i32, ptr %15, align 8, !tbaa !14
  br i1 %42, label %43, label %65

43:                                               ; preds = %37
  %44 = add nsw i32 %.pre, -1
  br label %.sink.split

45:                                               ; preds = %35
  %46 = getelementptr inbounds i8, ptr %0, i64 8
  %47 = tail call noundef i64 @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46)
  %48 = trunc i64 %47 to i32
  %49 = icmp slt i32 %16, %48
  %.pre20 = load i32, ptr %15, align 8, !tbaa !14
  br i1 %49, label %50, label %65

50:                                               ; preds = %45
  %51 = add nsw i32 %.pre20, 1
  br label %.sink.split

52:                                               ; preds = %31
  %53 = getelementptr inbounds i8, ptr %0, i64 72
  %54 = load float, ptr %53, align 8, !tbaa !18
  %55 = fcmp ogt float %54, %2
  br i1 %55, label %56, label %.thread

56:                                               ; preds = %52
  %57 = icmp slt i32 %16, 0
  %58 = fcmp une float %3, 0.000000e+00
  br i1 %57, label %59, label %62

59:                                               ; preds = %56
  %60 = sext i1 %58 to i32
  %61 = icmp slt i32 %16, %60
  br i1 %61, label %.thread23.sink.split, label %.thread

62:                                               ; preds = %56
  %63 = zext i1 %58 to i32
  %64 = icmp ugt i32 %16, %63
  br i1 %64, label %.thread23.sink.split, label %.thread

.sink.split:                                      ; preds = %22, %50, %43
  %.sink = phi i32 [ %44, %43 ], [ %51, %50 ], [ %26, %22 ]
  store i32 %.sink, ptr %15, align 8, !tbaa !14
  br label %65

65:                                               ; preds = %.sink.split, %37, %45
  %66 = phi i32 [ %.pre, %37 ], [ %.pre20, %45 ], [ %.sink, %.sink.split ]
  %.not = icmp eq i32 %16, %66
  br i1 %.not, label %.thread, label %.thread23

.thread23.sink.split:                             ; preds = %62, %59
  %.sink26 = phi i32 [ 1, %59 ], [ -1, %62 ]
  %67 = add nsw i32 %16, %.sink26
  store i32 %67, ptr %15, align 8, !tbaa !14
  br label %.thread23

.thread23:                                        ; preds = %.thread23.sink.split, %65
  %68 = getelementptr inbounds i8, ptr %0, i64 56
  %69 = load float, ptr %68, align 8
  %70 = select i1 %17, float 0.000000e+00, float %69
  %71 = getelementptr inbounds i8, ptr %0, i64 88
  store float %70, ptr %71, align 8, !tbaa !19
  %72 = getelementptr inbounds i8, ptr %0, i64 60
  %73 = getelementptr inbounds i8, ptr %0, i64 92
  %74 = load <2 x float>, ptr %72, align 4, !tbaa !20
  store <2 x float> %74, ptr %73, align 4, !tbaa !20
  %75 = getelementptr inbounds i8, ptr %0, i64 84
  store float 0.000000e+00, ptr %75, align 4, !tbaa !21
  br label %104

.thread:                                          ; preds = %52, %27, %59, %62, %65
  %76 = getelementptr inbounds i8, ptr %0, i64 88
  %77 = load float, ptr %76, align 8, !tbaa !19
  %78 = fcmp ogt float %77, 0.000000e+00
  br i1 %78, label %79, label %84

79:                                               ; preds = %.thread
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  store float 0.000000e+00, ptr %6, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %80 = fsub float %77, %1
  store float %80, ptr %7, align 4, !tbaa !20
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %82 = load float, ptr %81, align 4, !tbaa !20
  store float %82, ptr %76, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %83 = getelementptr inbounds i8, ptr %0, i64 84
  store float 0.000000e+00, ptr %83, align 4, !tbaa !21
  br label %104

84:                                               ; preds = %.thread
  %85 = getelementptr inbounds i8, ptr %0, i64 92
  %86 = load float, ptr %85, align 4, !tbaa !22
  %87 = fcmp ogt float %86, 0.000000e+00
  br i1 %87, label %88, label %97

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store float 0.000000e+00, ptr %8, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  %89 = fsub float %86, %1
  store float %89, ptr %9, align 4, !tbaa !20
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %91 = load float, ptr %90, align 4, !tbaa !20
  store float %91, ptr %85, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  %92 = getelementptr inbounds i8, ptr %0, i64 60
  %93 = load float, ptr %92, align 4, !tbaa !23
  %94 = fdiv float %91, %93
  %95 = fsub float 1.000000e+00, %94
  %96 = getelementptr inbounds i8, ptr %0, i64 84
  store float %95, ptr %96, align 4, !tbaa !21
  br label %104

97:                                               ; preds = %84
  %98 = getelementptr inbounds i8, ptr %0, i64 84
  store float 1.000000e+00, ptr %98, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  store float 0.000000e+00, ptr %10, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  %99 = getelementptr inbounds i8, ptr %0, i64 96
  %100 = load float, ptr %99, align 8, !tbaa !17
  %101 = fsub float %100, %1
  store float %101, ptr %11, align 4, !tbaa !20
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %103 = load float, ptr %102, align 4, !tbaa !20
  store float %103, ptr %99, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  br label %104

104:                                              ; preds = %.thread23, %88, %97, %79, %5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = !{!"_ZTSN3JPH27VehicleTransmissionSettingsE", !7, i64 0, !10, i64 8, !10, i64 32, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76}
!7 = !{!"_ZTSN3JPH17ETransmissionModeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !11, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!15, !16, i64 80}
!15 = !{!"_ZTSN3JPH19VehicleTransmissionE", !6, i64 0, !16, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96}
!16 = !{!"int", !8, i64 0}
!17 = !{!15, !13, i64 96}
!18 = !{!6, !13, i64 72}
!19 = !{!15, !13, i64 88}
!20 = !{!13, !13, i64 0}
!21 = !{!15, !13, i64 84}
!22 = !{!15, !13, i64 92}
!23 = !{!6, !13, i64 60}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass