; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Constraints (ConstraintManager)

; 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::UniqueLock" = type <{ ptr, ptr, i32, [4 x i8] }>
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::ConstraintManager" = type { ptr, %"class.JPH::Array", %"class.JPH::Mutex" }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Mutex" = type { %"class.std::mutex", %"class.std::thread::id" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::thread::id" = type { i64 }
%"class.JPH::Constraint" = type { ptr, %"class.JPH::RefTarget", i32, i32, i8, i8, i8, i64 }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Ref" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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
declare dso_local void @_ZN3JPH10UniqueLockINS_5MutexEEC2ERS1_PKNS_11BodyManagerENS_17EPhysicsLockTypesE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10UniqueLockINS_5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH17ConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.JPH::UniqueLock", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.JPH::AssertLastParam", align 1
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.JPH::AssertLastParam", align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  %23 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 2
  %24 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  call void @_ZN3JPH10UniqueLockINS_5MutexEEC2ERS1_PKNS_11BodyManagerENS_17EPhysicsLockTypesE(ptr noundef nonnull align 8 dereferenceable(20) %6, ptr noundef nonnull align 8 dereferenceable(48) %23, ptr noundef %25, i32 noundef 16)
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = invoke noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %26)
          to label %28 unwind label %47

28:                                               ; preds = %2
  br i1 %27, label %29, label %134

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %30 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 1
  %31 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %32 unwind label %51

32:                                               ; preds = %29
  %33 = trunc i64 %31 to i32
  store i32 %33, ptr %9, align 4, !tbaa !17
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %35 unwind label %51

35:                                               ; preds = %32
  %36 = load i32, ptr %9, align 4, !tbaa !17
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 1
  %39 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %40 unwind label %51

40:                                               ; preds = %35
  %41 = icmp ne i64 %37, %39
  br i1 %41, label %42, label %58

42:                                               ; preds = %40
  br label %43

43:                                               ; preds = %42
  %44 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 252, ptr noundef @.str.6)
          to label %45 unwind label %51

45:                                               ; preds = %43
  br i1 %44, label %46, label %55

46:                                               ; preds = %45
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !19
  br label %55

47:                                               ; preds = %2
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  br label %196

51:                                               ; preds = %43, %35, %32, %29
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  br label %133

55:                                               ; preds = %46, %45
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %130

58:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %59 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 1
  store ptr %59, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %62 unwind label %71

62:                                               ; preds = %58
  store ptr %61, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %63)
          to label %65 unwind label %75

65:                                               ; preds = %62
  store ptr %64, ptr %14, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %122, %65
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = icmp ne ptr %67, %68
  br i1 %69, label %79, label %70

70:                                               ; preds = %66
  store i32 4, ptr %11, align 4
  br label %125

71:                                               ; preds = %58
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  br label %128

75:                                               ; preds = %62
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %7, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %8, align 4
  br label %127

79:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %80, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %81 = load ptr, ptr %15, align 8, !tbaa !5
  %82 = invoke noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %81)
          to label %83 unwind label %100

83:                                               ; preds = %79
  %84 = getelementptr inbounds %"class.JPH::Constraint", ptr %82, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !20
  store i32 %85, ptr %16, align 4, !tbaa !17
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %87 unwind label %100

87:                                               ; preds = %83
  %88 = load i32, ptr %16, align 4, !tbaa !17
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = invoke noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %91 unwind label %100

91:                                               ; preds = %87
  %92 = getelementptr inbounds %"class.JPH::Constraint", ptr %90, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !20
  %94 = icmp ne i32 %88, %93
  br i1 %94, label %95, label %107

95:                                               ; preds = %91
  br label %96

96:                                               ; preds = %95
  %97 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 261, ptr noundef @.str.7)
          to label %98 unwind label %100

98:                                               ; preds = %96
  br i1 %97, label %99, label %104

99:                                               ; preds = %98
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !26
  br label %104

100:                                              ; preds = %110, %107, %96, %87, %83, %79
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %127

104:                                              ; preds = %99, %98
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %116

107:                                              ; preds = %91
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = invoke noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %108)
          to label %110 unwind label %100

110:                                              ; preds = %107
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = load ptr, ptr %109, align 8, !tbaa !27
  %113 = getelementptr inbounds ptr, ptr %112, i64 14
  %114 = load ptr, ptr %113, align 8
  invoke void %114(ptr noundef nonnull align 8 dereferenceable(32) %109, ptr noundef nonnull align 8 dereferenceable(18) %111)
          to label %115 unwind label %100

115:                                              ; preds = %110
  store i32 0, ptr %11, align 4
  br label %116

116:                                              ; preds = %115, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %117 = load i32, ptr %11, align 4
  switch i32 %117, label %119 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  store i32 0, ptr %11, align 4
  br label %119

119:                                              ; preds = %118, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %120 = load i32, ptr %11, align 4
  switch i32 %120, label %125 [
    i32 0, label %121
  ]

121:                                              ; preds = %119
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.JPH::Ref", ptr %123, i32 1
  store ptr %124, ptr %13, align 8, !tbaa !5
  br label %66

125:                                              ; preds = %119, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %126 = load i32, ptr %11, align 4
  switch i32 %126, label %130 [
    i32 4, label %129
  ]

127:                                              ; preds = %100, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %128

128:                                              ; preds = %127, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %133

129:                                              ; preds = %125
  store i32 0, ptr %11, align 4
  br label %130

130:                                              ; preds = %129, %125, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %131 = load i32, ptr %11, align 4
  switch i32 %131, label %194 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %193

133:                                              ; preds = %128, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %196

134:                                              ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !17
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %136 unwind label %142

136:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !17
  br label %137

137:                                              ; preds = %183, %136
  %138 = load i32, ptr %19, align 4, !tbaa !17
  %139 = load i32, ptr %18, align 4, !tbaa !17
  %140 = icmp ult i32 %138, %139
  br i1 %140, label %146, label %141

141:                                              ; preds = %137
  store i32 8, ptr %11, align 4
  br label %186

142:                                              ; preds = %134
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %7, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %8, align 4
  br label %192

146:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %148 unwind label %160

148:                                              ; preds = %146
  %149 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 1
  %150 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %149)
          to label %151 unwind label %160

151:                                              ; preds = %148
  %152 = load i32, ptr %20, align 4, !tbaa !17
  %153 = zext i32 %152 to i64
  %154 = icmp ule i64 %150, %153
  br i1 %154, label %155, label %167

155:                                              ; preds = %151
  br label %156

156:                                              ; preds = %155
  %157 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 279, ptr noundef @.str.8)
          to label %158 unwind label %160

158:                                              ; preds = %156
  br i1 %157, label %159, label %164

159:                                              ; preds = %158
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !29
  br label %164

160:                                              ; preds = %174, %172, %167, %156, %148, %146
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %7, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %192

164:                                              ; preds = %159, %158
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %180

167:                                              ; preds = %151
  %168 = getelementptr inbounds %"class.JPH::ConstraintManager", ptr %22, i32 0, i32 1
  %169 = load i32, ptr %20, align 4, !tbaa !17
  %170 = zext i32 %169 to i64
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %170)
          to label %172 unwind label %160

172:                                              ; preds = %167
  %173 = invoke noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %171)
          to label %174 unwind label %160

174:                                              ; preds = %172
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = load ptr, ptr %173, align 8, !tbaa !27
  %177 = getelementptr inbounds ptr, ptr %176, i64 14
  %178 = load ptr, ptr %177, align 8
  invoke void %178(ptr noundef nonnull align 8 dereferenceable(32) %173, ptr noundef nonnull align 8 dereferenceable(18) %175)
          to label %179 unwind label %160

179:                                              ; preds = %174
  store i32 0, ptr %11, align 4
  br label %180

180:                                              ; preds = %179, %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %181 = load i32, ptr %11, align 4
  switch i32 %181, label %186 [
    i32 0, label %182
  ]

182:                                              ; preds = %180
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %19, align 4, !tbaa !17
  %185 = add i32 %184, 1
  store i32 %185, ptr %19, align 4, !tbaa !17
  br label %137, !llvm.loop !30

186:                                              ; preds = %180, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %187 = load i32, ptr %11, align 4
  switch i32 %187, label %189 [
    i32 8, label %188
  ]

188:                                              ; preds = %186
  store i32 0, ptr %11, align 4
  br label %189

189:                                              ; preds = %188, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %190 = load i32, ptr %11, align 4
  switch i32 %190, label %194 [
    i32 0, label %191
  ]

191:                                              ; preds = %189
  br label %193

192:                                              ; preds = %160, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %196

193:                                              ; preds = %191, %132
  store i1 true, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %194

194:                                              ; preds = %193, %189, %130
  call void @_ZN3JPH10UniqueLockINS_5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  %195 = load i1, ptr %3, align 1
  ret i1 %195

196:                                              ; preds = %192, %133, %47
  call void @_ZN3JPH10UniqueLockINS_5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %7, align 8
  %199 = load i32, ptr %8, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 #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++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !11, i64 8, !13, i64 32}
!11 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN3JPH5MutexE", !14, i64 0, !16, i64 40}
!14 = !{!"_ZTSSt5mutex", !15, i64 0}
!15 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!16 = !{!"_ZTSNSt6thread2idE", !12, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{i64 2157754780}
!20 = !{!21, !18, i64 12}
!21 = !{!"_ZTSN3JPH10ConstraintE", !22, i64 8, !18, i64 12, !18, i64 16, !7, i64 20, !7, i64 21, !25, i64 22, !12, i64 24}
!22 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !23, i64 0}
!23 = !{!"_ZTSSt6atomicIjE", !24, i64 0}
!24 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{i64 2157755127}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !8, i64 0}
!29 = !{i64 2157755490}
!30 = distinct !{!30, !31}
!31 = !{!"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"

%"class.JPH::UniqueLock" = type <{ ptr, ptr, i32, [4 x i8] }>

@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZN3JPH10UniqueLockINS_5MutexEEC2ERS1_PKNS_11BodyManagerENS_17EPhysicsLockTypesE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10UniqueLockINS_5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH17ConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::UniqueLock", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN3JPH10UniqueLockINS_5MutexEEC2ERS1_PKNS_11BodyManagerENS_17EPhysicsLockTypesE(ptr noundef nonnull align 8 dereferenceable(20) %3, ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef %9, i32 noundef 16)
  %10 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %10, label %11, label %50

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %14 = trunc i64 %13 to i32
  store i32 %14, ptr %4, align 4, !tbaa !16
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %15 unwind label %23

15:                                               ; preds = %11
  %16 = load i32, ptr %4, align 4, !tbaa !16
  %17 = zext i32 %16 to i64
  %18 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %.not52 = icmp eq i64 %18, %17
  br i1 %.not52, label %25, label %19

19:                                               ; preds = %15
  %20 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 252, ptr noundef nonnull @.str.6)
          to label %21 unwind label %23

21:                                               ; preds = %19
  br i1 %20, label %22, label %.critedge

22:                                               ; preds = %21
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !18
  br label %.critedge

23:                                               ; preds = %19, %11
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %49

25:                                               ; preds = %15
  %26 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %27 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %.not5371 = icmp eq ptr %26, %27
  br i1 %.not5371, label %.critedge59, label %.lr.ph73

.lr.ph73:                                         ; preds = %25, %46
  %.04072 = phi ptr [ %47, %46 ], [ %26, %25 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %28 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.04072)
  %29 = getelementptr inbounds i8, ptr %28, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !19
  store i32 %30, ptr %5, align 4, !tbaa !16
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %31 unwind label %.loopexit

31:                                               ; preds = %.lr.ph73
  %32 = load i32, ptr %5, align 4, !tbaa !16
  %33 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.04072)
  %34 = getelementptr inbounds i8, ptr %33, i64 12
  %35 = load i32, ptr %34, align 4, !tbaa !19
  %.not54 = icmp eq i32 %32, %35
  br i1 %.not54, label %41, label %36

36:                                               ; preds = %31
  %37 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 261, ptr noundef nonnull @.str.7)
          to label %38 unwind label %.loopexit.split-lp

38:                                               ; preds = %36
  br i1 %37, label %39, label %48

39:                                               ; preds = %38
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !25
  br label %48

.loopexit:                                        ; preds = %.lr.ph73, %41
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %40

.loopexit.split-lp:                               ; preds = %36
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %40

40:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %49

41:                                               ; preds = %31
  %42 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %.04072)
  %43 = load ptr, ptr %42, align 8, !tbaa !26
  %44 = getelementptr inbounds i8, ptr %43, i64 112
  %45 = load ptr, ptr %44, align 8
  invoke void %45(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(18) %1)
          to label %46 unwind label %.loopexit

46:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %47 = getelementptr inbounds i8, ptr %.04072, i64 8
  %.not53 = icmp eq ptr %47, %27
  br i1 %.not53, label %.critedge59, label %.lr.ph73

48:                                               ; preds = %38, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %77

49:                                               ; preds = %40, %23
  %.pn55 = phi { ptr, i32 } [ %24, %23 ], [ %lpad.phi, %40 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %78

50:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !16
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %.preheader unwind label %53

.preheader:                                       ; preds = %50
  %51 = load i32, ptr %6, align 4, !tbaa !16
  %.not5169.not = icmp eq i32 %51, 0
  br i1 %.not5169.not, label %.critedge61, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %52 = getelementptr inbounds i8, ptr %0, i64 8
  br label %55

53:                                               ; preds = %50
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %76

55:                                               ; preds = %.lr.ph, %72
  %.070 = phi i32 [ 0, %.lr.ph ], [ %73, %72 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %56 unwind label %.loopexit64

56:                                               ; preds = %55
  %57 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52)
  %58 = load i32, ptr %7, align 4, !tbaa !16
  %59 = zext i32 %58 to i64
  %.not = icmp ugt i64 %57, %59
  br i1 %.not, label %65, label %60

60:                                               ; preds = %56
  %61 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 279, ptr noundef nonnull @.str.8)
          to label %62 unwind label %.loopexit.split-lp65

62:                                               ; preds = %60
  br i1 %61, label %63, label %75

63:                                               ; preds = %62
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !28
  br label %75

.loopexit64:                                      ; preds = %55, %65, %67
  %lpad.loopexit66 = landingpad { ptr, i32 }
          cleanup
  br label %64

.loopexit.split-lp65:                             ; preds = %60
  %lpad.loopexit.split-lp67 = landingpad { ptr, i32 }
          cleanup
  br label %64

64:                                               ; preds = %.loopexit.split-lp65, %.loopexit64
  %lpad.phi68 = phi { ptr, i32 } [ %lpad.loopexit66, %.loopexit64 ], [ %lpad.loopexit.split-lp67, %.loopexit.split-lp65 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %76

65:                                               ; preds = %56
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %59)
          to label %67 unwind label %.loopexit64

67:                                               ; preds = %65
  %68 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %66)
  %69 = load ptr, ptr %68, align 8, !tbaa !26
  %70 = getelementptr inbounds i8, ptr %69, i64 112
  %71 = load ptr, ptr %70, align 8
  invoke void %71(ptr noundef nonnull align 8 dereferenceable(32) %68, ptr noundef nonnull align 8 dereferenceable(18) %1)
          to label %72 unwind label %.loopexit64

72:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  %73 = add nuw i32 %.070, 1
  %74 = load i32, ptr %6, align 4, !tbaa !16
  %.not51 = icmp ult i32 %73, %74
  br i1 %.not51, label %55, label %.critedge61, !llvm.loop !29

75:                                               ; preds = %62, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %77

76:                                               ; preds = %64, %53
  %.pn = phi { ptr, i32 } [ %lpad.phi68, %64 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %78

.critedge59:                                      ; preds = %46, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %77

.critedge61:                                      ; preds = %72, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %77

.critedge:                                        ; preds = %21, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %77

77:                                               ; preds = %.critedge59, %.critedge61, %75, %48, %.critedge
  %.7 = phi i1 [ false, %48 ], [ false, %75 ], [ false, %.critedge ], [ true, %.critedge61 ], [ true, %.critedge59 ]
  call void @_ZN3JPH10UniqueLockINS_5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret i1 %.7

78:                                               ; preds = %76, %49
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %49 ], [ %.pn, %76 ]
  call void @_ZN3JPH10UniqueLockINS_5MutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(20) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn55.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

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

attributes #0 = { mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 #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 = !{!"_ZTSN3JPH17ConstraintManagerE", !7, i64 0, !10, i64 8, !12, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !11, i64 0, !11, i64 8, !7, i64 16}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSN3JPH5MutexE", !13, i64 0, !15, i64 40}
!13 = !{!"_ZTSSt5mutex", !14, i64 0}
!14 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!15 = !{!"_ZTSNSt6thread2idE", !11, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{i64 2157754780}
!19 = !{!20, !17, i64 12}
!20 = !{!"_ZTSN3JPH10ConstraintE", !21, i64 8, !17, i64 12, !17, i64 16, !8, i64 20, !8, i64 21, !24, i64 22, !11, i64 24}
!21 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !22, i64 0}
!22 = !{!"_ZTSSt6atomicIjE", !23, i64 0}
!23 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!24 = !{!"bool", !8, i64 0}
!25 = !{i64 2157755127}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !9, i64 0}
!28 = !{i64 2157755490}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass