; LLVM IR from lemire/testingRNG :: cpp-prng-bench/micro-bench.ll (Z4doitv)

; 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.std::linear_congruential_engine" = type { i64 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::chrono::duration.0" = type { double }

@.str = external hidden unnamed_addr constant [57 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4doitv() #0 {
  %1 = alloca %"class.std::linear_congruential_engine", align 8
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [30 x double], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::chrono::time_point", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::chrono::time_point", align 8
  %11 = alloca %"class.std::chrono::duration.0", align 8
  %12 = alloca %"class.std::chrono::duration", align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::chrono::time_point", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::chrono::time_point", align 8
  %18 = alloca %"class.std::chrono::duration.0", align 8
  %19 = alloca %"class.std::chrono::duration", align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #8
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 3405705229)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 30, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 100000000, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 240, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %57, %0
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 30
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %60

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %30 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %31 = getelementptr inbounds %"class.std::chrono::time_point", ptr %8, i32 0, i32 0
  %32 = getelementptr inbounds %"class.std::chrono::duration", ptr %31, i32 0, i32 0
  store i64 %30, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %42, %29
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = icmp slt i32 %34, 100000000
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %45

37:                                               ; preds = %33
  %38 = load i64, ptr %2, align 8, !tbaa !5
  %39 = add i64 %38, 1
  store i64 %39, ptr %2, align 8, !tbaa !5
  %40 = load i64, ptr %2, align 8, !tbaa !5
  %41 = call i64 asm "# Do nothing", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %40) #9, !srcloc !11
  store i64 %41, ptr %2, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %37
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !9
  br label %33, !llvm.loop !12

45:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %46 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %47 = getelementptr inbounds %"class.std::chrono::time_point", ptr %10, i32 0, i32 0
  %48 = getelementptr inbounds %"class.std::chrono::duration", ptr %47, i32 0, i32 0
  store i64 %46, ptr %48, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %49 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %50 = getelementptr inbounds %"class.std::chrono::duration", ptr %12, i32 0, i32 0
  store i64 %49, ptr %50, align 8
  %51 = call double @_ZNSt6chrono13duration_castINS_8durationIdSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %52 = getelementptr inbounds %"class.std::chrono::duration.0", ptr %11, i32 0, i32 0
  store double %51, ptr %52, align 8
  %53 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [30 x double], ptr %5, i64 0, i64 %55
  store double %53, ptr %56, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %57

57:                                               ; preds = %45
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %6, align 4, !tbaa !9
  br label %25, !llvm.loop !16

60:                                               ; preds = %28
  %61 = call noundef ptr @_ZSt5beginIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %5) #8
  %62 = call noundef ptr @_ZSt3endIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %5) #8
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef %61, ptr noundef %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %63 = getelementptr inbounds [30 x double], ptr %5, i64 0, i64 7
  %64 = load double, ptr %63, align 8, !tbaa !14
  store double %64, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %96, %60
  %66 = load i32, ptr %14, align 4, !tbaa !9
  %67 = icmp slt i32 %66, 30
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %99

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %70 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %71 = getelementptr inbounds %"class.std::chrono::time_point", ptr %15, i32 0, i32 0
  %72 = getelementptr inbounds %"class.std::chrono::duration", ptr %71, i32 0, i32 0
  store i64 %70, ptr %72, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %81, %69
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = icmp slt i32 %74, 100000000
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %84

77:                                               ; preds = %73
  %78 = call noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEclEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %79 = load i64, ptr %2, align 8, !tbaa !5
  %80 = add i64 %79, %78
  store i64 %80, ptr %2, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %77
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %16, align 4, !tbaa !9
  br label %73, !llvm.loop !17

84:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %85 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %86 = getelementptr inbounds %"class.std::chrono::time_point", ptr %17, i32 0, i32 0
  %87 = getelementptr inbounds %"class.std::chrono::duration", ptr %86, i32 0, i32 0
  store i64 %85, ptr %87, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %88 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %89 = getelementptr inbounds %"class.std::chrono::duration", ptr %19, i32 0, i32 0
  store i64 %88, ptr %89, align 8
  %90 = call double @_ZNSt6chrono13duration_castINS_8durationIdSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %91 = getelementptr inbounds %"class.std::chrono::duration.0", ptr %18, i32 0, i32 0
  store double %90, ptr %91, align 8
  %92 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [30 x double], ptr %5, i64 0, i64 %94
  store double %92, ptr %95, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %96

96:                                               ; preds = %84
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %14, align 4, !tbaa !9
  br label %65, !llvm.loop !18

99:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %100 = call noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3maxEv()
  %101 = call noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3minEv()
  %102 = sub i64 %100, %101
  %103 = add i64 %102, 1
  store i64 %103, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %104 = load i64, ptr %20, align 8, !tbaa !5
  %105 = icmp ne i64 %104, 0
  br i1 %105, label %106, label %110

106:                                              ; preds = %99
  %107 = load i64, ptr %20, align 8, !tbaa !5
  %108 = uitofp i64 %107 to double
  %109 = call double @log2(double noundef %108) #8
  br label %111

110:                                              ; preds = %99
  br label %111

111:                                              ; preds = %110, %106
  %112 = phi double [ %109, %106 ], [ 6.400000e+01, %110 ]
  store double %112, ptr %21, align 8, !tbaa !14
  %113 = load double, ptr %21, align 8, !tbaa !14
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef 8, double noundef %113)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %115 = load double, ptr %21, align 8, !tbaa !14
  %116 = call double @llvm.ceil.f64(double %115)
  %117 = fptosi double %116 to i32
  store i32 %117, ptr %22, align 4, !tbaa !9
  %118 = load i64, ptr %20, align 8, !tbaa !5
  %119 = icmp ugt i64 %118, 0
  br i1 %119, label %120, label %133

120:                                              ; preds = %111
  %121 = load double, ptr %21, align 8, !tbaa !14
  %122 = load i32, ptr %22, align 4, !tbaa !9
  %123 = sitofp i32 %122 to double
  %124 = fcmp une double %121, %123
  br i1 %124, label %125, label %133

125:                                              ; preds = %120
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = shl i64 1, %128
  %130 = load i64, ptr %20, align 8, !tbaa !5
  %131 = sub i64 %129, %130
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %126, i64 noundef %131)
  br label %136

133:                                              ; preds = %120, %111
  %134 = load i32, ptr %22, align 4, !tbaa !9
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %134)
  br label %136

136:                                              ; preds = %133, %125
  %137 = call noundef ptr @_ZSt5beginIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %5) #8
  %138 = call noundef ptr @_ZSt3endIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %5) #8
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef %137, ptr noundef %138)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %139 = getelementptr inbounds [30 x double], ptr %5, i64 0, i64 3
  %140 = load double, ptr %139, align 8, !tbaa !14
  store double %140, ptr %23, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %141 = load double, ptr %23, align 8, !tbaa !14
  %142 = load double, ptr %13, align 8, !tbaa !14
  %143 = fsub double %141, %142
  store double %143, ptr %24, align 8, !tbaa !14
  %144 = load i64, ptr %2, align 8, !tbaa !5
  %145 = lshr i64 %144, 1
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %145, i64 noundef 8)
  %147 = load double, ptr %24, align 8, !tbaa !14
  %148 = load double, ptr %21, align 8, !tbaa !14
  %149 = fmul double 1.000000e+08, %148
  %150 = fdiv double %149, 0x41D0000000000000
  %151 = load double, ptr %24, align 8, !tbaa !14
  %152 = fdiv double %150, %151
  %153 = load double, ptr %24, align 8, !tbaa !14
  %154 = load double, ptr %21, align 8, !tbaa !14
  %155 = fmul double 1.000000e+08, %154
  %156 = fdiv double %155, 3.200000e+01
  %157 = fdiv double %153, %156
  %158 = fmul double %157, 1.000000e+09
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %147, double noundef %152, double noundef %158)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212system_clock3nowEv() #2

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

; Function Attrs: mustprogress uwtable
declare dso_local double @_ZNSt6chrono13duration_castINS_8durationIdSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPdEvT_S1_(ptr noundef, ptr noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEclEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3maxEv() #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3minEv() #3 align 2

; Function Attrs: nounwind
declare double @log2(double noundef) #2

declare i32 @printf(ptr noundef, ...) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #7

attributes #0 = { 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 #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 = { 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 = { 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 #6 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind memory(none) }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 2687}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; 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.std::linear_congruential_engine" = type { i64 }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::chrono::duration.0" = type { double }

@.str = external hidden unnamed_addr constant [57 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4doitv() local_unnamed_addr #0 {
  %1 = alloca %"class.std::linear_congruential_engine", align 8
  %2 = alloca [30 x double], align 16
  %3 = alloca %"class.std::chrono::time_point", align 8
  %4 = alloca %"class.std::chrono::time_point", align 8
  %5 = alloca %"class.std::chrono::duration.0", align 8
  %6 = alloca %"class.std::chrono::duration", align 8
  %7 = alloca %"class.std::chrono::time_point", align 8
  %8 = alloca %"class.std::chrono::time_point", align 8
  %9 = alloca %"class.std::chrono::duration.0", align 8
  %10 = alloca %"class.std::chrono::duration", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  call void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef 3405705229)
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %2) #9
  br label %16

11:                                               ; preds = %18
  %12 = call noundef ptr @_ZSt5beginIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %2) #9
  %13 = call noundef ptr @_ZSt3endIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %2) #9
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef %12, ptr noundef %13)
  %14 = getelementptr inbounds i8, ptr %2, i64 56
  %15 = load double, ptr %14, align 8, !tbaa !5
  br label %33

16:                                               ; preds = %0, %18
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %18 ]
  %.042 = phi i64 [ 0, %0 ], [ %26, %18 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %17 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #9
  store i64 %17, ptr %3, align 8
  br label %24

18:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %19 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #9
  store i64 %19, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %20 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store i64 %20, ptr %6, align 8
  %21 = call double @_ZNSt6chrono13duration_castINS_8durationIdSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %6)
  store double %21, ptr %5, align 8
  %22 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %23 = getelementptr inbounds [30 x double], ptr %2, i64 0, i64 %indvars.iv
  store double %22, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next, 30
  br i1 %exitcond49.not, label %11, label %16, !llvm.loop !9

24:                                               ; preds = %16, %24
  %.140 = phi i64 [ %.042, %16 ], [ %26, %24 ]
  %.03239 = phi i32 [ 0, %16 ], [ %27, %24 ]
  %25 = add i64 %.140, 1
  %26 = call i64 asm "# Do nothing", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %25) #10, !srcloc !11
  %27 = add nuw nsw i32 %.03239, 1
  %exitcond.not = icmp eq i32 %27, 100000000
  br i1 %exitcond.not, label %18, label %24, !llvm.loop !12

28:                                               ; preds = %35
  %29 = call noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3maxEv()
  %30 = call noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3minEv()
  %31 = sub i64 %29, %30
  %32 = add i64 %31, 1
  %.not = icmp eq i64 %32, 0
  br i1 %.not, label %48, label %45

33:                                               ; preds = %11, %35
  %indvars.iv51 = phi i64 [ 0, %11 ], [ %indvars.iv.next52, %35 ]
  %.246 = phi i64 [ %26, %11 ], [ %43, %35 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %34 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #9
  store i64 %34, ptr %7, align 8
  br label %41

35:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %36 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #9
  store i64 %36, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %37 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %7)
  store i64 %37, ptr %10, align 8
  %38 = call double @_ZNSt6chrono13duration_castINS_8durationIdSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %10)
  store double %38, ptr %9, align 8
  %39 = call noundef double @_ZNKSt6chrono8durationIdSt5ratioILl1ELl1EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %40 = getelementptr inbounds [30 x double], ptr %2, i64 0, i64 %indvars.iv51
  store double %39, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next52, 30
  br i1 %exitcond54.not, label %28, label %33, !llvm.loop !13

41:                                               ; preds = %33, %41
  %.344 = phi i64 [ %.246, %33 ], [ %43, %41 ]
  %.03443 = phi i32 [ 0, %33 ], [ %44, %41 ]
  %42 = call noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEclEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %43 = add i64 %42, %.344
  %44 = add nuw nsw i32 %.03443, 1
  %exitcond50.not = icmp eq i32 %44, 100000000
  br i1 %exitcond50.not, label %35, label %41, !llvm.loop !14

45:                                               ; preds = %28
  %46 = uitofp i64 %32 to double
  %47 = call double @log2(double noundef %46) #9
  br label %48

48:                                               ; preds = %28, %45
  %49 = phi double [ %47, %45 ], [ 6.400000e+01, %28 ]
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef 8, double noundef %49)
  %51 = call double @llvm.ceil.f64(double %49)
  %52 = fptosi double %51 to i32
  %.not37 = icmp ne i64 %32, 0
  %53 = sitofp i32 %52 to double
  %54 = fcmp une double %49, %53
  %or.cond = select i1 %.not37, i1 %54, i1 false
  br i1 %or.cond, label %55, label %60

55:                                               ; preds = %48
  %56 = zext nneg i32 %52 to i64
  %57 = shl nuw i64 1, %56
  %58 = sub i64 %57, %32
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %52, i64 noundef %58)
  br label %62

60:                                               ; preds = %48
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %52)
  br label %62

62:                                               ; preds = %60, %55
  %63 = call noundef ptr @_ZSt5beginIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %2) #9
  %64 = call noundef ptr @_ZSt3endIdLm30EEPT_RAT0__S0_(ptr noundef nonnull align 8 dereferenceable(240) %2) #9
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef %63, ptr noundef %64)
  %65 = getelementptr inbounds i8, ptr %2, i64 24
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = fsub double %66, %15
  %68 = lshr i64 %43, 1
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %68, i64 noundef 8)
  %70 = fmul double %49, 1.000000e+08
  %71 = fmul double %70, 0x3E10000000000000
  %72 = fdiv double %71, %67
  %73 = fmul double %70, 3.125000e-02
  %74 = fdiv double %67, %73
  %75 = fmul double %74, 1.000000e+09
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %67, double noundef %72, double noundef %75)
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret void
}

; 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 uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212system_clock3nowEv() local_unnamed_addr #2

; 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 uwtable
declare dso_local double @_ZNSt6chrono13duration_castINS_8durationIdSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPdEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEclEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3maxEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE3minEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log2(double noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #8

attributes #0 = { 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 #1 = { mustprogress 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 = { 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 = { 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 #6 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { nounwind memory(none) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{i64 2687}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass