; LLVM IR from stfc/PSycloneBench :: benchmarks/nemo/nemolite2d/manual_versions/psykal_c_opencl (timing)

; 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.TimerStruct = type { [64 x i8], i64, double }
%struct.val_loc_type = type { float, i32 }

@num_active_timers = external hidden global i32, align 4
@timer_list = external hidden global [40 x %struct.TimerStruct], align 16
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @TimerReportMPI() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %9 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = mul i64 %10, 8
  %12 = call noalias ptr @malloc(i64 noundef %11) #7
  store ptr %12, ptr %2, align 8, !tbaa !9
  %13 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = mul i64 %14, 8
  %16 = call noalias ptr @malloc(i64 noundef %15) #7
  store ptr %16, ptr %3, align 8, !tbaa !9
  %17 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = mul i64 %18, 8
  %20 = call noalias ptr @malloc(i64 noundef %19) #7
  store ptr %20, ptr %1, align 8, !tbaa !9
  %21 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = call noalias ptr @calloc(i64 noundef %22, i64 noundef 4) #8
  store ptr %23, ptr %4, align 8, !tbaa !9
  %24 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = call noalias ptr @calloc(i64 noundef %25, i64 noundef 4) #8
  store ptr %26, ptr %5, align 8, !tbaa !9
  %27 = load ptr, ptr %1, align 8, !tbaa !9
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %41

29:                                               ; preds = %0
  %30 = load ptr, ptr %2, align 8, !tbaa !9
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %41

32:                                               ; preds = %29
  %33 = load ptr, ptr %3, align 8, !tbaa !9
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %41

38:                                               ; preds = %35
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = icmp ne ptr %39, null
  br i1 %40, label %44, label %41

41:                                               ; preds = %38, %35, %32, %29, %0
  %42 = load ptr, ptr @stderr, align 8, !tbaa !9
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.4) #6
  store i32 1, ptr %8, align 4
  br label %177

44:                                               ; preds = %38
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %76, %44
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %79

49:                                               ; preds = %45
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %51
  %53 = getelementptr inbounds %struct.TimerStruct, ptr %52, i32 0, i32 2
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = fptrunc double %54 to float
  %56 = load ptr, ptr %1, align 8, !tbaa !9
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %struct.val_loc_type, ptr %56, i64 %58
  %60 = getelementptr inbounds %struct.val_loc_type, ptr %59, i32 0, i32 0
  store float %55, ptr %60, align 4, !tbaa !15
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %62
  %64 = getelementptr inbounds %struct.TimerStruct, ptr %63, i32 0, i32 2
  %65 = load double, ptr %64, align 8, !tbaa !11
  %66 = fptrunc double %65 to float
  %67 = load ptr, ptr %4, align 8, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds float, ptr %67, i64 %69
  store float %66, ptr %70, align 4, !tbaa !18
  %71 = load ptr, ptr %1, align 8, !tbaa !9
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds %struct.val_loc_type, ptr %71, i64 %73
  %75 = getelementptr inbounds %struct.val_loc_type, ptr %74, i32 0, i32 1
  store i32 0, ptr %75, align 4, !tbaa !19
  br label %76

76:                                               ; preds = %49
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !5
  br label %45, !llvm.loop !20

79:                                               ; preds = %45
  %80 = call noalias ptr @fopen(ptr noundef @.str.5, ptr noundef @.str.6)
  store ptr %80, ptr %7, align 8, !tbaa !9
  %81 = load ptr, ptr %7, align 8, !tbaa !9
  %82 = icmp ne ptr %81, null
  br i1 %82, label %86, label %83

83:                                               ; preds = %79
  %84 = load ptr, ptr @stderr, align 8, !tbaa !9
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str.7) #6
  store i32 1, ptr %8, align 4
  br label %177

86:                                               ; preds = %79
  %87 = load ptr, ptr %7, align 8, !tbaa !9
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.8) #6
  %89 = load ptr, ptr %7, align 8, !tbaa !9
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.9) #6
  %91 = load ptr, ptr %7, align 8, !tbaa !9
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.10) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %164, %86
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %167

97:                                               ; preds = %93
  %98 = load ptr, ptr %7, align 8, !tbaa !9
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %100
  %102 = getelementptr inbounds %struct.TimerStruct, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds [64 x i8], ptr %102, i64 0, i64 0
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %105
  %107 = getelementptr inbounds %struct.TimerStruct, ptr %106, i32 0, i32 1
  %108 = load i64, ptr %107, align 16, !tbaa !22
  %109 = load ptr, ptr %2, align 8, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.val_loc_type, ptr %109, i64 %111
  %113 = getelementptr inbounds %struct.val_loc_type, ptr %112, i32 0, i32 0
  %114 = load float, ptr %113, align 4, !tbaa !15
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %116
  %118 = getelementptr inbounds %struct.TimerStruct, ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 16, !tbaa !22
  %120 = sitofp i64 %119 to float
  %121 = fdiv float %114, %120
  %122 = fpext float %121 to double
  %123 = load ptr, ptr %2, align 8, !tbaa !9
  %124 = load i32, ptr %6, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.val_loc_type, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.val_loc_type, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !19
  %129 = load ptr, ptr %5, align 8, !tbaa !9
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds float, ptr %129, i64 %131
  %133 = load float, ptr %132, align 4, !tbaa !18
  %134 = load i32, ptr %6, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %135
  %137 = getelementptr inbounds %struct.TimerStruct, ptr %136, i32 0, i32 1
  %138 = load i64, ptr %137, align 16, !tbaa !22
  %139 = mul nsw i64 1, %138
  %140 = sitofp i64 %139 to float
  %141 = fdiv float %133, %140
  %142 = fpext float %141 to double
  %143 = load ptr, ptr %3, align 8, !tbaa !9
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds %struct.val_loc_type, ptr %143, i64 %145
  %147 = getelementptr inbounds %struct.val_loc_type, ptr %146, i32 0, i32 0
  %148 = load float, ptr %147, align 4, !tbaa !15
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %150
  %152 = getelementptr inbounds %struct.TimerStruct, ptr %151, i32 0, i32 1
  %153 = load i64, ptr %152, align 16, !tbaa !22
  %154 = sitofp i64 %153 to float
  %155 = fdiv float %148, %154
  %156 = fpext float %155 to double
  %157 = load ptr, ptr %3, align 8, !tbaa !9
  %158 = load i32, ptr %6, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds %struct.val_loc_type, ptr %157, i64 %159
  %161 = getelementptr inbounds %struct.val_loc_type, ptr %160, i32 0, i32 1
  %162 = load i32, ptr %161, align 4, !tbaa !19
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.11, ptr noundef %103, i64 noundef %108, double noundef %122, i32 noundef %128, double noundef %142, double noundef %156, i32 noundef %162) #6
  br label %164

164:                                              ; preds = %97
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %6, align 4, !tbaa !5
  br label %93, !llvm.loop !23

167:                                              ; preds = %93
  %168 = load ptr, ptr %7, align 8, !tbaa !9
  %169 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.10) #6
  %170 = load ptr, ptr %7, align 8, !tbaa !9
  %171 = call i32 @fclose(ptr noundef %170)
  %172 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %172) #6
  store ptr null, ptr %2, align 8, !tbaa !9
  %173 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %173) #6
  store ptr null, ptr %3, align 8, !tbaa !9
  %174 = load ptr, ptr %1, align 8, !tbaa !9
  call void @free(ptr noundef %174) #6
  store ptr null, ptr %1, align 8, !tbaa !9
  %175 = load ptr, ptr %4, align 8, !tbaa !9
  call void @free(ptr noundef %175) #6
  store ptr null, ptr %4, align 8, !tbaa !9
  %176 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %176) #6
  store ptr null, ptr %5, align 8, !tbaa !9
  store i32 0, ptr %8, align 4
  br label %177

177:                                              ; preds = %167, %83, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  %178 = load i32, ptr %8, align 4
  switch i32 %178, label %180 [
    i32 0, label %179
    i32 1, label %179
  ]

179:                                              ; preds = %177, %177
  ret void

180:                                              ; preds = %177
  unreachable
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !14, i64 72}
!12 = !{!"TimerStruct", !7, i64 0, !13, i64 64, !14, i64 72}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !6, i64 4}
!17 = !{!"float", !7, i64 0}
!18 = !{!17, !17, i64 0}
!19 = !{!16, !6, i64 4}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!12, !13, i64 64}
!23 = distinct !{!23, !21}


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

%struct.TimerStruct = type { [64 x i8], i64, double }
%struct.val_loc_type = type { float, i32 }

@num_active_timers = external hidden local_unnamed_addr global i32, align 4
@timer_list = external hidden global [40 x %struct.TimerStruct], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @TimerReportMPI() local_unnamed_addr #1 {
  %1 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %2 = sext i32 %1 to i64
  %3 = shl nsw i64 %2, 3
  %4 = tail call noalias ptr @malloc(i64 noundef %3) #5
  %5 = tail call noalias ptr @malloc(i64 noundef %3) #5
  %6 = tail call noalias ptr @calloc(i64 noundef %2, i64 noundef 4) #6
  %7 = icmp ne ptr %4, null
  %8 = icmp ne ptr %5, null
  %or.cond3 = and i1 %7, %8
  %9 = icmp ne ptr %6, null
  %or.cond7 = and i1 %or.cond3, %9
  br i1 %or.cond7, label %.preheader.preheader, label %11

.preheader.preheader:                             ; preds = %0
  %10 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6)
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %14, label %17

11:                                               ; preds = %0
  %12 = load ptr, ptr @stderr, align 8, !tbaa !9
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.4) #7
  br label %49

14:                                               ; preds = %.preheader.preheader
  %15 = load ptr, ptr @stderr, align 8, !tbaa !9
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.7) #7
  br label %49

17:                                               ; preds = %.preheader.preheader
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.8) #8
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.9) #8
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.10) #8
  %21 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %17 ]
  %23 = getelementptr inbounds [40 x %struct.TimerStruct], ptr @timer_list, i64 0, i64 %indvars.iv
  %24 = getelementptr inbounds i8, ptr %23, i64 64
  %25 = load i64, ptr %24, align 16, !tbaa !11
  %26 = getelementptr inbounds %struct.val_loc_type, ptr %4, i64 %indvars.iv
  %27 = load float, ptr %26, align 4, !tbaa !15
  %28 = sitofp i64 %25 to float
  %29 = fdiv float %27, %28
  %30 = fpext float %29 to double
  %31 = getelementptr inbounds i8, ptr %26, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !18
  %33 = getelementptr inbounds float, ptr %6, i64 %indvars.iv
  %34 = load float, ptr %33, align 4, !tbaa !19
  %35 = fdiv float %34, %28
  %36 = fpext float %35 to double
  %37 = getelementptr inbounds %struct.val_loc_type, ptr %5, i64 %indvars.iv
  %38 = load float, ptr %37, align 4, !tbaa !15
  %39 = fdiv float %38, %28
  %40 = fpext float %39 to double
  %41 = getelementptr inbounds i8, ptr %37, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !18
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.11, ptr noundef nonnull %23, i64 noundef %25, double noundef %30, i32 noundef %32, double noundef %36, double noundef %40, i32 noundef %42) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = load i32, ptr @num_active_timers, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next, %45
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph, %17
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.10) #8
  %48 = tail call i32 @fclose(ptr noundef nonnull %10)
  tail call void @free(ptr noundef nonnull %4) #8
  tail call void @free(ptr noundef nonnull %5) #8
  tail call void @free(ptr noundef nonnull %6) #8
  br label %49

49:                                               ; preds = %._crit_edge, %14, %11
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 allocsize(0) }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { cold nounwind }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 64}
!12 = !{!"TimerStruct", !7, i64 0, !13, i64 64, !14, i64 72}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !6, i64 4}
!17 = !{!"float", !7, i64 0}
!18 = !{!16, !6, i64 4}
!19 = !{!17, !17, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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