; LLVM IR from kylewray/nova :: src/pomdp/utilities (pomdp_expand_cpu)

; 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.nova::NovaPOMDP" = type { i32, i32, i32, i32, i32, i32, float, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4nova33pomdp_expand_construct_belief_cpuEPKNS_9NovaPOMDPEjPf(ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4nova40pomdp_expand_probability_observation_cpuEPKNS_9NovaPOMDPEPKfjjRf(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

declare i32 @pomdp_belief_update_cpu(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #7

declare i32 @pomdp_add_new_raw_beliefs_cpu(ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local i32 @pomdp_expand_distinct_beliefs_cpu(ptr noundef %0) #8 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %85, label %25

25:                                               ; preds = %1
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !9
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %85, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %85, label %35

35:                                               ; preds = %30
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !14
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %85, label %40

40:                                               ; preds = %35
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %41, i32 0, i32 3
  %43 = load i32, ptr %42, align 4, !tbaa !15
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %85, label %45

45:                                               ; preds = %40
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 8, !tbaa !16
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %85, label %50

50:                                               ; preds = %45
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %51, i32 0, i32 5
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %85, label %55

55:                                               ; preds = %50
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %56, i32 0, i32 8
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = icmp eq ptr %58, null
  br i1 %59, label %85, label %60

60:                                               ; preds = %55
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %61, i32 0, i32 9
  %63 = load ptr, ptr %62, align 8, !tbaa !19
  %64 = icmp eq ptr %63, null
  br i1 %64, label %85, label %65

65:                                               ; preds = %60
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %66, i32 0, i32 10
  %68 = load ptr, ptr %67, align 8, !tbaa !20
  %69 = icmp eq ptr %68, null
  br i1 %69, label %85, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %71, i32 0, i32 11
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  %74 = icmp eq ptr %73, null
  br i1 %74, label %85, label %75

75:                                               ; preds = %70
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %76, i32 0, i32 12
  %78 = load ptr, ptr %77, align 8, !tbaa !22
  %79 = icmp eq ptr %78, null
  br i1 %79, label %85, label %80

80:                                               ; preds = %75
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %81, i32 0, i32 13
  %83 = load ptr, ptr %82, align 8, !tbaa !23
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %88

85:                                               ; preds = %80, %75, %70, %65, %60, %55, %50, %45, %40, %35, %30, %25, %1
  %86 = load ptr, ptr @stderr, align 8, !tbaa !5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.2, ptr noundef @.str.1) #10
  store i32 1, ptr %2, align 4
  br label %331

88:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %89, i32 0, i32 4
  %91 = load i32, ptr %90, align 8, !tbaa !16
  store i32 %91, ptr %4, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %92 = load i32, ptr %4, align 4, !tbaa !24
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !9
  %96 = mul i32 %92, %95
  %97 = zext i32 %96 to i64
  %98 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %97, i64 4)
  %99 = extractvalue { i64, i1 } %98, 1
  %100 = extractvalue { i64, i1 } %98, 0
  %101 = select i1 %99, i64 -1, i64 %100
  %102 = call noalias noundef nonnull ptr @_Znam(i64 noundef %101) #11
  store ptr %102, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  store i32 0, ptr %6, align 4, !tbaa !24
  br label %103

103:                                              ; preds = %117, %88
  %104 = load i32, ptr %6, align 4, !tbaa !24
  %105 = load i32, ptr %4, align 4, !tbaa !24
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !9
  %109 = mul i32 %105, %108
  %110 = icmp ult i32 %104, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %120

112:                                              ; preds = %103
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = load i32, ptr %6, align 4, !tbaa !24
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds float, ptr %113, i64 %115
  store float 0.000000e+00, ptr %116, align 4, !tbaa !25
  br label %117

117:                                              ; preds = %112
  %118 = load i32, ptr %6, align 4, !tbaa !24
  %119 = add i32 %118, 1
  store i32 %119, ptr %6, align 4, !tbaa !24
  br label %103, !llvm.loop !26

120:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 8, !tbaa !9
  %124 = zext i32 %123 to i64
  %125 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %124, i64 4)
  %126 = extractvalue { i64, i1 } %125, 1
  %127 = extractvalue { i64, i1 } %125, 0
  %128 = select i1 %126, i64 -1, i64 %127
  %129 = call noalias noundef nonnull ptr @_Znam(i64 noundef %128) #11
  store ptr %129, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 0, ptr %8, align 4, !tbaa !24
  br label %130

130:                                              ; preds = %142, %120
  %131 = load i32, ptr %8, align 4, !tbaa !24
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %132, i32 0, i32 0
  %134 = load i32, ptr %133, align 8, !tbaa !9
  %135 = icmp ult i32 %131, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  br label %145

137:                                              ; preds = %130
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load i32, ptr %8, align 4, !tbaa !24
  %140 = zext i32 %139 to i64
  %141 = getelementptr inbounds float, ptr %138, i64 %140
  store float 0.000000e+00, ptr %141, align 4, !tbaa !25
  br label %142

142:                                              ; preds = %137
  %143 = load i32, ptr %8, align 4, !tbaa !24
  %144 = add i32 %143, 1
  store i32 %144, ptr %8, align 4, !tbaa !24
  br label %130, !llvm.loop !28

145:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 0, ptr %9, align 4, !tbaa !24
  br label %146

146:                                              ; preds = %315, %145
  %147 = load i32, ptr %9, align 4, !tbaa !24
  %148 = load i32, ptr %4, align 4, !tbaa !24
  %149 = icmp ult i32 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %318

151:                                              ; preds = %146
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = load i32, ptr %9, align 4, !tbaa !24
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = call noundef i32 @_ZN4nova33pomdp_expand_construct_belief_cpuEPKNS_9NovaPOMDPEjPf(ptr noundef %152, i32 noundef %153, ptr noundef %154)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %159, i64 4)
  %161 = extractvalue { i64, i1 } %160, 1
  %162 = extractvalue { i64, i1 } %160, 0
  %163 = select i1 %161, i64 -1, i64 %162
  %164 = call noalias noundef nonnull ptr @_Znam(i64 noundef %163) #11
  store ptr %164, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  store float -1.000000e+10, ptr %12, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 0, ptr %13, align 4, !tbaa !24
  br label %165

165:                                              ; preds = %293, %151
  %166 = load i32, ptr %13, align 4, !tbaa !24
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 8, !tbaa !14
  %170 = icmp ult i32 %166, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %165
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %296

172:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  store i32 0, ptr %14, align 4, !tbaa !24
  br label %173

173:                                              ; preds = %289, %172
  %174 = load i32, ptr %14, align 4, !tbaa !24
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %175, i32 0, i32 3
  %177 = load i32, ptr %176, align 4, !tbaa !15
  %178 = icmp ult i32 %174, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %173
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  br label %292

180:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  store float 0.000000e+00, ptr %15, align 4, !tbaa !25
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load i32, ptr %13, align 4, !tbaa !24
  %184 = load i32, ptr %14, align 4, !tbaa !24
  %185 = call noundef i32 @_ZN4nova40pomdp_expand_probability_observation_cpuEPKNS_9NovaPOMDPEPKfjjRf(ptr noundef %181, ptr noundef %182, i32 noundef %183, i32 noundef %184, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %186 = load float, ptr %15, align 4, !tbaa !25
  %187 = fcmp oeq float %186, 0.000000e+00
  br i1 %187, label %188, label %189

188:                                              ; preds = %180
  store i32 16, ptr %10, align 4
  br label %286

189:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  store ptr null, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = load i32, ptr %13, align 4, !tbaa !24
  %193 = load i32, ptr %14, align 4, !tbaa !24
  %194 = call i32 @pomdp_belief_update_cpu(ptr noundef %190, ptr noundef %191, i32 noundef %192, i32 noundef %193, ptr noundef nonnull align 8 dereferenceable(8) %16)
  store i32 %194, ptr %17, align 4, !tbaa !24
  %195 = load i32, ptr %17, align 4, !tbaa !24
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %206

197:                                              ; preds = %189
  %198 = load ptr, ptr %16, align 8, !tbaa !5
  %199 = icmp ne ptr %198, null
  br i1 %199, label %200, label %205

200:                                              ; preds = %197
  %201 = load ptr, ptr %16, align 8, !tbaa !5
  %202 = icmp eq ptr %201, null
  br i1 %202, label %204, label %203

203:                                              ; preds = %200
  call void @_ZdaPv(ptr noundef %201) #12
  br label %204

204:                                              ; preds = %203, %200
  br label %205

205:                                              ; preds = %204, %197
  store i32 16, ptr %10, align 4
  br label %285

206:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  store float 1.000000e+10, ptr %18, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 0, ptr %19, align 4, !tbaa !24
  br label %207

207:                                              ; preds = %264, %206
  %208 = load i32, ptr %19, align 4, !tbaa !24
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %209, i32 0, i32 4
  %211 = load i32, ptr %210, align 8, !tbaa !16
  %212 = icmp ult i32 %208, %211
  br i1 %212, label %214, label %213

213:                                              ; preds = %207
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %267

214:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %215, i32 0, i32 0
  %217 = load i32, ptr %216, align 8, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %218, i64 4)
  %220 = extractvalue { i64, i1 } %219, 1
  %221 = extractvalue { i64, i1 } %219, 0
  %222 = select i1 %220, i64 -1, i64 %221
  %223 = call noalias noundef nonnull ptr @_Znam(i64 noundef %222) #11
  store ptr %223, ptr %20, align 8, !tbaa !5
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = load i32, ptr %19, align 4, !tbaa !24
  %226 = load ptr, ptr %20, align 8, !tbaa !5
  %227 = call noundef i32 @_ZN4nova33pomdp_expand_construct_belief_cpuEPKNS_9NovaPOMDPEjPf(ptr noundef %224, i32 noundef %225, ptr noundef %226)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  store float 0.000000e+00, ptr %21, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !24
  br label %228

228:                                              ; preds = %250, %214
  %229 = load i32, ptr %22, align 4, !tbaa !24
  %230 = load ptr, ptr %3, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %230, i32 0, i32 0
  %232 = load i32, ptr %231, align 8, !tbaa !9
  %233 = icmp ult i32 %229, %232
  br i1 %233, label %235, label %234

234:                                              ; preds = %228
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %253

235:                                              ; preds = %228
  %236 = load ptr, ptr %20, align 8, !tbaa !5
  %237 = load i32, ptr %22, align 4, !tbaa !24
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds float, ptr %236, i64 %238
  %240 = load float, ptr %239, align 4, !tbaa !25
  %241 = load ptr, ptr %16, align 8, !tbaa !5
  %242 = load i32, ptr %22, align 4, !tbaa !24
  %243 = zext i32 %242 to i64
  %244 = getelementptr inbounds float, ptr %241, i64 %243
  %245 = load float, ptr %244, align 4, !tbaa !25
  %246 = fsub float %240, %245
  %247 = call noundef float @_ZSt4fabsf(float noundef %246)
  %248 = load float, ptr %21, align 4, !tbaa !25
  %249 = fadd float %248, %247
  store float %249, ptr %21, align 4, !tbaa !25
  br label %250

250:                                              ; preds = %235
  %251 = load i32, ptr %22, align 4, !tbaa !24
  %252 = add i32 %251, 1
  store i32 %252, ptr %22, align 4, !tbaa !24
  br label %228, !llvm.loop !29

253:                                              ; preds = %234
  %254 = load float, ptr %21, align 4, !tbaa !25
  %255 = load float, ptr %18, align 4, !tbaa !25
  %256 = fcmp olt float %254, %255
  br i1 %256, label %257, label %259

257:                                              ; preds = %253
  %258 = load float, ptr %21, align 4, !tbaa !25
  store float %258, ptr %18, align 4, !tbaa !25
  br label %259

259:                                              ; preds = %257, %253
  %260 = load ptr, ptr %20, align 8, !tbaa !5
  %261 = icmp eq ptr %260, null
  br i1 %261, label %263, label %262

262:                                              ; preds = %259
  call void @_ZdaPv(ptr noundef %260) #12
  br label %263

263:                                              ; preds = %262, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %19, align 4, !tbaa !24
  %266 = add i32 %265, 1
  store i32 %266, ptr %19, align 4, !tbaa !24
  br label %207, !llvm.loop !30

267:                                              ; preds = %213
  %268 = load float, ptr %18, align 4, !tbaa !25
  %269 = load float, ptr %12, align 4, !tbaa !25
  %270 = fcmp ogt float %268, %269
  br i1 %270, label %271, label %280

271:                                              ; preds = %267
  %272 = load ptr, ptr %11, align 8, !tbaa !5
  %273 = load ptr, ptr %16, align 8, !tbaa !5
  %274 = load ptr, ptr %3, align 8, !tbaa !5
  %275 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %274, i32 0, i32 0
  %276 = load i32, ptr %275, align 8, !tbaa !9
  %277 = zext i32 %276 to i64
  %278 = mul i64 %277, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %272, ptr align 4 %273, i64 %278, i1 false)
  %279 = load float, ptr %18, align 4, !tbaa !25
  store float %279, ptr %12, align 4, !tbaa !25
  br label %280

280:                                              ; preds = %271, %267
  %281 = load ptr, ptr %16, align 8, !tbaa !5
  %282 = icmp eq ptr %281, null
  br i1 %282, label %284, label %283

283:                                              ; preds = %280
  call void @_ZdaPv(ptr noundef %281) #12
  br label %284

284:                                              ; preds = %283, %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  store i32 0, ptr %10, align 4
  br label %285

285:                                              ; preds = %284, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %286

286:                                              ; preds = %285, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  %287 = load i32, ptr %10, align 4
  switch i32 %287, label %333 [
    i32 0, label %288
    i32 16, label %289
  ]

288:                                              ; preds = %286
  br label %289

289:                                              ; preds = %288, %286
  %290 = load i32, ptr %14, align 4, !tbaa !24
  %291 = add i32 %290, 1
  store i32 %291, ptr %14, align 4, !tbaa !24
  br label %173, !llvm.loop !31

292:                                              ; preds = %179
  br label %293

293:                                              ; preds = %292
  %294 = load i32, ptr %13, align 4, !tbaa !24
  %295 = add i32 %294, 1
  store i32 %295, ptr %13, align 4, !tbaa !24
  br label %165, !llvm.loop !32

296:                                              ; preds = %171
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  %298 = load i32, ptr %9, align 4, !tbaa !24
  %299 = load ptr, ptr %3, align 8, !tbaa !5
  %300 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %299, i32 0, i32 0
  %301 = load i32, ptr %300, align 8, !tbaa !9
  %302 = mul i32 %298, %301
  %303 = zext i32 %302 to i64
  %304 = getelementptr inbounds float, ptr %297, i64 %303
  %305 = load ptr, ptr %11, align 8, !tbaa !5
  %306 = load ptr, ptr %3, align 8, !tbaa !5
  %307 = getelementptr inbounds %"struct.nova::NovaPOMDP", ptr %306, i32 0, i32 0
  %308 = load i32, ptr %307, align 8, !tbaa !9
  %309 = zext i32 %308 to i64
  %310 = mul i64 %309, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %304, ptr align 4 %305, i64 %310, i1 false)
  %311 = load ptr, ptr %11, align 8, !tbaa !5
  %312 = icmp eq ptr %311, null
  br i1 %312, label %314, label %313

313:                                              ; preds = %296
  call void @_ZdaPv(ptr noundef %311) #12
  br label %314

314:                                              ; preds = %313, %296
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %315

315:                                              ; preds = %314
  %316 = load i32, ptr %9, align 4, !tbaa !24
  %317 = add i32 %316, 1
  store i32 %317, ptr %9, align 4, !tbaa !24
  br label %146, !llvm.loop !33

318:                                              ; preds = %150
  %319 = load ptr, ptr %3, align 8, !tbaa !5
  %320 = load i32, ptr %4, align 4, !tbaa !24
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = call i32 @pomdp_add_new_raw_beliefs_cpu(ptr noundef %319, i32 noundef %320, ptr noundef %321)
  %323 = load ptr, ptr %7, align 8, !tbaa !5
  %324 = icmp eq ptr %323, null
  br i1 %324, label %326, label %325

325:                                              ; preds = %318
  call void @_ZdaPv(ptr noundef %323) #12
  br label %326

326:                                              ; preds = %325, %318
  %327 = load ptr, ptr %5, align 8, !tbaa !5
  %328 = icmp eq ptr %327, null
  br i1 %328, label %330, label %329

329:                                              ; preds = %326
  call void @_ZdaPv(ptr noundef %327) #12
  br label %330

330:                                              ; preds = %329, %326
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  br label %331

331:                                              ; preds = %330, %85
  %332 = load i32, ptr %2, align 4
  ret i32 %332

333:                                              ; preds = %286
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) #9

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 = { "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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nobuiltin 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin 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, !11, i64 0}
!10 = !{!"_ZTSN4nova9NovaPOMDPE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !11, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!10, !11, i64 8}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !11, i64 16}
!17 = !{!10, !11, i64 20}
!18 = !{!10, !6, i64 32}
!19 = !{!10, !6, i64 40}
!20 = !{!10, !6, i64 48}
!21 = !{!10, !6, i64 56}
!22 = !{!10, !6, i64 64}
!23 = !{!10, !6, i64 72}
!24 = !{!11, !11, i64 0}
!25 = !{!12, !12, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}
!33 = distinct !{!33, !27}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4nova33pomdp_expand_construct_belief_cpuEPKNS_9NovaPOMDPEjPf(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4nova40pomdp_expand_probability_observation_cpuEPKNS_9NovaPOMDPEPKfjjRf(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

declare i32 @pomdp_belief_update_cpu(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #6

declare i32 @pomdp_add_new_raw_beliefs_cpu(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local range(i32 0, 2) i32 @pomdp_expand_distinct_beliefs_cpu(ptr noundef %0) local_unnamed_addr #7 {
  %2 = alloca float, align 4
  %3 = alloca ptr, align 8
  %4 = icmp eq ptr %0, null
  br i1 %4, label %52, label %5

5:                                                ; preds = %1
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %52, label %8

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !12
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %52, label %12

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !13
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %52, label %16

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !14
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %52, label %20

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  %22 = load i32, ptr %21, align 8, !tbaa !15
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %52, label %24

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %0, i64 20
  %26 = load i32, ptr %25, align 4, !tbaa !16
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %52, label %28

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = icmp eq ptr %30, null
  br i1 %31, label %52, label %32

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %35 = icmp eq ptr %34, null
  br i1 %35, label %52, label %36

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %0, i64 48
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = icmp eq ptr %38, null
  br i1 %39, label %52, label %40

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %0, i64 56
  %42 = load ptr, ptr %41, align 8, !tbaa !20
  %43 = icmp eq ptr %42, null
  br i1 %43, label %52, label %44

44:                                               ; preds = %40
  %45 = getelementptr inbounds i8, ptr %0, i64 64
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = icmp eq ptr %46, null
  br i1 %47, label %52, label %48

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %0, i64 72
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %55

52:                                               ; preds = %48, %44, %40, %36, %32, %28, %24, %20, %16, %12, %8, %5, %1
  %53 = load ptr, ptr @stderr, align 8, !tbaa !23
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1) #10
  br label %125

55:                                               ; preds = %48
  %56 = mul i32 %22, %6
  %57 = zext i32 %56 to i64
  %58 = shl nuw nsw i64 %57, 2
  %59 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %58) #11
  %.not124 = icmp eq i32 %56, 0
  br i1 %.not124, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %55
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %59, i8 0, i64 %58, i1 false), !tbaa !24
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %55
  %60 = zext i32 %6 to i64
  %61 = shl nuw nsw i64 %60, 2
  %62 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %61) #11
  %63 = shl nuw nsw i64 %60, 2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %62, i8 0, i64 %63, i1 false), !tbaa !24
  br label %.preheader102

64:                                               ; preds = %._crit_edge122
  %65 = call i32 @pomdp_add_new_raw_beliefs_cpu(ptr noundef nonnull %0, i32 noundef %22, ptr noundef nonnull %59)
  call void @_ZdaPv(ptr noundef nonnull %62) #12
  call void @_ZdaPv(ptr noundef nonnull %59) #12
  br label %125

.preheader102:                                    ; preds = %._crit_edge, %._crit_edge122
  %.094123 = phi i32 [ %79, %._crit_edge122 ], [ 0, %._crit_edge ]
  %66 = call noundef i32 @_ZN4nova33pomdp_expand_construct_belief_cpuEPKNS_9NovaPOMDPEjPf(ptr noundef nonnull %0, i32 noundef %.094123, ptr noundef nonnull %62)
  %67 = load i32, ptr %0, align 8, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = shl nuw nsw i64 %68, 2
  %70 = call noalias noundef nonnull ptr @_Znam(i64 noundef %69) #11
  %71 = load i32, ptr %13, align 8, !tbaa !13
  %.not125 = icmp eq i32 %71, 0
  br i1 %.not125, label %._crit_edge122, label %.preheader101.lr.ph

.preheader101.lr.ph:                              ; preds = %.preheader102
  %72 = load i32, ptr %17, align 4, !tbaa !14
  %.not126 = icmp eq i32 %72, 0
  br i1 %.not126, label %._crit_edge122, label %.preheader101

.preheader101:                                    ; preds = %.preheader101.lr.ph, %._crit_edge118
  %73 = phi i32 [ %80, %._crit_edge118 ], [ %71, %.preheader101.lr.ph ]
  %74 = phi i32 [ %81, %._crit_edge118 ], [ 1, %.preheader101.lr.ph ]
  %.090121 = phi i32 [ %82, %._crit_edge118 ], [ 0, %.preheader101.lr.ph ]
  %.091120 = phi float [ %.192.lcssa, %._crit_edge118 ], [ -1.000000e+10, %.preheader101.lr.ph ]
  %.not127 = icmp eq i32 %74, 0
  br i1 %.not127, label %._crit_edge118, label %.lr.ph117

._crit_edge122.loopexit130:                       ; preds = %._crit_edge118
  %.pre135 = load i32, ptr %0, align 8, !tbaa !5
  %.pre136 = zext i32 %.pre135 to i64
  %.pre137 = shl nuw nsw i64 %.pre136, 2
  br label %._crit_edge122

._crit_edge122:                                   ; preds = %.preheader101.lr.ph, %._crit_edge122.loopexit130, %.preheader102
  %.pre-phi138 = phi i64 [ %.pre137, %._crit_edge122.loopexit130 ], [ %69, %.preheader102 ], [ %69, %.preheader101.lr.ph ]
  %75 = phi i32 [ %.pre135, %._crit_edge122.loopexit130 ], [ %67, %.preheader102 ], [ %67, %.preheader101.lr.ph ]
  %76 = mul i32 %75, %.094123
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds float, ptr %59, i64 %77
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %78, ptr nonnull align 4 %70, i64 %.pre-phi138, i1 false)
  call void @_ZdaPv(ptr noundef nonnull %70) #12
  %79 = add nuw i32 %.094123, 1
  %exitcond.not = icmp eq i32 %79, %22
  br i1 %exitcond.not, label %64, label %.preheader102, !llvm.loop !25

._crit_edge118.loopexit:                          ; preds = %121
  %.pre = load i32, ptr %13, align 8, !tbaa !13
  br label %._crit_edge118

._crit_edge118:                                   ; preds = %._crit_edge118.loopexit, %.preheader101
  %80 = phi i32 [ %73, %.preheader101 ], [ %.pre, %._crit_edge118.loopexit ]
  %81 = phi i32 [ 0, %.preheader101 ], [ %123, %._crit_edge118.loopexit ]
  %.192.lcssa = phi float [ %.091120, %.preheader101 ], [ %.4, %._crit_edge118.loopexit ]
  %82 = add nuw i32 %.090121, 1
  %83 = icmp ult i32 %82, %80
  br i1 %83, label %.preheader101, label %._crit_edge122.loopexit130, !llvm.loop !27

.lr.ph117:                                        ; preds = %.preheader101, %121
  %.089116 = phi i32 [ %122, %121 ], [ 0, %.preheader101 ]
  %.192115 = phi float [ %.4, %121 ], [ %.091120, %.preheader101 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #13
  store float 0.000000e+00, ptr %2, align 4, !tbaa !24
  %84 = call noundef i32 @_ZN4nova40pomdp_expand_probability_observation_cpuEPKNS_9NovaPOMDPEPKfjjRf(ptr noundef nonnull %0, ptr noundef nonnull %62, i32 noundef %.090121, i32 noundef %.089116, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %85 = load float, ptr %2, align 4, !tbaa !24
  %86 = fcmp oeq float %85, 0.000000e+00
  br i1 %86, label %121, label %87

87:                                               ; preds = %.lr.ph117
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #13
  store ptr null, ptr %3, align 8, !tbaa !23
  %88 = call i32 @pomdp_belief_update_cpu(ptr noundef nonnull %0, ptr noundef nonnull %62, i32 noundef %.090121, i32 noundef %.089116, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %.not = icmp eq i32 %88, 0
  br i1 %.not, label %.preheader, label %90

.preheader:                                       ; preds = %87
  %89 = load i32, ptr %21, align 8, !tbaa !15
  %.not128 = icmp eq i32 %89, 0
  br i1 %.not128, label %._crit_edge113, label %.lr.ph112

90:                                               ; preds = %87
  %91 = load ptr, ptr %3, align 8, !tbaa !23
  %.not100 = icmp eq ptr %91, null
  br i1 %.not100, label %120, label %.sink.split

._crit_edge113:                                   ; preds = %._crit_edge109, %.preheader
  %.087.lcssa = phi float [ 1.000000e+10, %.preheader ], [ %.1, %._crit_edge109 ]
  %92 = fcmp ogt float %.087.lcssa, %.192115
  %93 = load ptr, ptr %3, align 8, !tbaa !23
  br i1 %92, label %115, label %thread-pre-split

.lr.ph112:                                        ; preds = %.preheader, %._crit_edge109
  %.086111 = phi i32 [ %101, %._crit_edge109 ], [ 0, %.preheader ]
  %.087110 = phi float [ %.1, %._crit_edge109 ], [ 1.000000e+10, %.preheader ]
  %94 = load i32, ptr %0, align 8, !tbaa !5
  %95 = zext i32 %94 to i64
  %96 = shl nuw nsw i64 %95, 2
  %97 = call noalias noundef nonnull ptr @_Znam(i64 noundef %96) #11
  %98 = call noundef i32 @_ZN4nova33pomdp_expand_construct_belief_cpuEPKNS_9NovaPOMDPEjPf(ptr noundef nonnull %0, i32 noundef %.086111, ptr noundef nonnull %97)
  %99 = load i32, ptr %0, align 8, !tbaa !5
  %.not129 = icmp eq i32 %99, 0
  br i1 %.not129, label %._crit_edge109, label %.lr.ph108

._crit_edge109:                                   ; preds = %.lr.ph108, %.lr.ph112
  %.084.lcssa = phi float [ 0.000000e+00, %.lr.ph112 ], [ %111, %.lr.ph108 ]
  %100 = fcmp olt float %.084.lcssa, %.087110
  %.1 = select i1 %100, float %.084.lcssa, float %.087110
  call void @_ZdaPv(ptr noundef nonnull %97) #12
  %101 = add nuw i32 %.086111, 1
  %102 = load i32, ptr %21, align 8, !tbaa !15
  %103 = icmp ult i32 %101, %102
  br i1 %103, label %.lr.ph112, label %._crit_edge113, !llvm.loop !29

.lr.ph108:                                        ; preds = %.lr.ph112, %.lr.ph108
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph108 ], [ 0, %.lr.ph112 ]
  %.084105 = phi float [ %111, %.lr.ph108 ], [ 0.000000e+00, %.lr.ph112 ]
  %104 = getelementptr inbounds float, ptr %97, i64 %indvars.iv
  %105 = load float, ptr %104, align 4, !tbaa !24
  %106 = load ptr, ptr %3, align 8, !tbaa !23
  %107 = getelementptr inbounds float, ptr %106, i64 %indvars.iv
  %108 = load float, ptr %107, align 4, !tbaa !24
  %109 = fsub float %105, %108
  %110 = call noundef float @_ZSt4fabsf(float noundef %109)
  %111 = fadd float %.084105, %110
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %112 = load i32, ptr %0, align 8, !tbaa !5
  %113 = zext i32 %112 to i64
  %114 = icmp ult i64 %indvars.iv.next, %113
  br i1 %114, label %.lr.ph108, label %._crit_edge109, !llvm.loop !30

115:                                              ; preds = %._crit_edge113
  %116 = load i32, ptr %0, align 8, !tbaa !5
  %117 = zext i32 %116 to i64
  %118 = shl nuw nsw i64 %117, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %70, ptr align 4 %93, i64 %118, i1 false)
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %._crit_edge113, %115
  %.2 = phi float [ %.087.lcssa, %115 ], [ %.192115, %._crit_edge113 ]
  %119 = icmp eq ptr %93, null
  br i1 %119, label %120, label %.sink.split

.sink.split:                                      ; preds = %thread-pre-split, %90
  %.sink = phi ptr [ %91, %90 ], [ %93, %thread-pre-split ]
  %.3.ph = phi float [ %.192115, %90 ], [ %.2, %thread-pre-split ]
  call void @_ZdaPv(ptr noundef nonnull %.sink) #12
  br label %120

120:                                              ; preds = %.sink.split, %thread-pre-split, %90
  %.3 = phi float [ %.192115, %90 ], [ %.2, %thread-pre-split ], [ %.3.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #13
  br label %121

121:                                              ; preds = %.lr.ph117, %120
  %.4 = phi float [ %.3, %120 ], [ %.192115, %.lr.ph117 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #13
  %122 = add nuw i32 %.089116, 1
  %123 = load i32, ptr %17, align 4, !tbaa !14
  %124 = icmp ult i32 %122, %123
  br i1 %124, label %.lr.ph117, label %._crit_edge118.loopexit, !llvm.loop !31

125:                                              ; preds = %64, %52
  %.085 = phi i32 [ 1, %52 ], [ 0, %64 ]
  ret i32 %.085
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) local_unnamed_addr #8

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nobuiltin 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 #7 = { 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 #8 = { 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 #9 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { cold nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin nounwind }
attributes #13 = { 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 = !{!"_ZTSN4nova9NovaPOMDPE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 12}
!15 = !{!6, !7, i64 16}
!16 = !{!6, !7, i64 20}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !11, i64 40}
!19 = !{!6, !11, i64 48}
!20 = !{!6, !11, i64 56}
!21 = !{!6, !11, i64 64}
!22 = !{!6, !11, i64 72}
!23 = !{!11, !11, i64 0}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26, !28}
!28 = !{!"llvm.loop.unswitch.partial.disable"}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass