; LLVM IR from sfu-dis/mosaicdb :: benchmarks/egen/EGenLoader.ll (Z23transactions_input_initiii)

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

@inputFiles = external dso_local global ptr, align 8
@.str.44 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._Z23transactions_input_initiii = external hidden unnamed_addr constant [61 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TPCE13CLogFormatTabC2Ev(ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE11CEGenLoggerC2ENS_11eDriverTypeEjPKcPNS_17CBaseLogFormatterE(ptr noundef nonnull align 8 dereferenceable(1144), i32 noundef, i32 noundef, ptr noundef, ptr noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z23transactions_input_initiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #6 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %15 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 384) #9
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 384, i1 false)
  invoke void @_ZN4TPCE13CLogFormatTabC2Ev(ptr noundef nonnull align 8 dereferenceable(384) %15)
          to label %16 unwind label %28

16:                                               ; preds = %3
  store ptr %15, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %17 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1144) #9
  %18 = load ptr, ptr %7, align 8, !tbaa !9
  invoke void @_ZN4TPCE11CEGenLoggerC2ENS_11eDriverTypeEjPKcPNS_17CBaseLogFormatterE(ptr noundef nonnull align 8 dereferenceable(1144) %17, i32 noundef 2, i32 noundef 0, ptr noundef @.str.62, ptr noundef %18)
          to label %19 unwind label %32

19:                                               ; preds = %16
  store ptr %17, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %20 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 568) #9
  call void @llvm.memset.p0.i64(ptr align 16 %20, i8 0, i64 568, i1 false)
  invoke void @_ZN4TPCE20TDriverCETxnSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(568) %20)
          to label %21 unwind label %36

21:                                               ; preds = %19
  store ptr %20, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %22 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %22, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %23 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %23, ptr %13, align 4, !tbaa !5
  %24 = load ptr, ptr @inputFiles, align 8, !tbaa !9
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %21
  br label %41

27:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.63, ptr noundef @.str.44, i32 noundef 625, ptr noundef @__PRETTY_FUNCTION__._Z23transactions_input_initiii) #10
  unreachable

28:                                               ; preds = %3
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %15, i64 noundef 384) #11
  br label %61

32:                                               ; preds = %16
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %17, i64 noundef 1144) #11
  br label %60

36:                                               ; preds = %19
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %20, i64 noundef 568) #11
  br label %59

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %42 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4032) #9
  %43 = load ptr, ptr @inputFiles, align 8, !tbaa !9
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = load i32, ptr %13, align 4, !tbaa !5
  %50 = mul nsw i32 %49, 8
  %51 = load ptr, ptr %10, align 8, !tbaa !9
  %52 = load ptr, ptr %11, align 8, !tbaa !9
  invoke void @_ZN4TPCE20CCETxnInputGeneratorC1ERKNS_11CInputFilesExxiiPNS_11CBaseLoggerEPNS_20TDriverCETxnSettingsE(ptr noundef nonnull align 8 dereferenceable(4032) %42, ptr noundef nonnull align 8 dereferenceable(184) %43, i64 noundef %45, i64 noundef %47, i32 noundef %48, i32 noundef %50, ptr noundef %51, ptr noundef %52)
          to label %53 unwind label %55

53:                                               ; preds = %41
  store ptr %42, ptr %14, align 8, !tbaa !9
  %54 = load ptr, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, 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 %7) #8
  ret ptr %54

55:                                               ; preds = %41
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %8, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %42, i64 noundef 4032) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %59

59:                                               ; preds = %55, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %60

60:                                               ; preds = %59, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %61

61:                                               ; preds = %60, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %8, align 8
  %64 = load i32, ptr %9, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TPCE20TDriverCETxnSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(568)) unnamed_addr #5 align 2

declare void @_ZN4TPCE20CCETxnInputGeneratorC1ERKNS_11CInputFilesExxiiPNS_11CBaseLoggerEPNS_20TDriverCETxnSettingsE(ptr noundef nonnull align 8 dereferenceable(4032), ptr noundef nonnull align 8 dereferenceable(184), i64 noundef, i64 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) unnamed_addr #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { noreturn 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


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

@inputFiles = external dso_local local_unnamed_addr global ptr, align 8
@.str.44 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._Z23transactions_input_initiii = external hidden unnamed_addr constant [61 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TPCE13CLogFormatTabC2Ev(ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE11CEGenLoggerC2ENS_11eDriverTypeEjPKcPNS_17CBaseLogFormatterE(ptr noundef nonnull align 8 dereferenceable(1144), i32 noundef, i32 noundef, ptr noundef, ptr noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_Z23transactions_input_initiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %4 = tail call noalias noundef nonnull dereferenceable(384) ptr @_Znwm(i64 noundef 384) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(384) %4, i8 0, i64 384, i1 false)
  invoke void @_ZN4TPCE13CLogFormatTabC2Ev(ptr noundef nonnull align 8 dereferenceable(384) %4)
          to label %5 unwind label %12

5:                                                ; preds = %3
  %6 = tail call noalias noundef nonnull dereferenceable(1144) ptr @_Znwm(i64 noundef 1144) #7
  invoke void @_ZN4TPCE11CEGenLoggerC2ENS_11eDriverTypeEjPKcPNS_17CBaseLogFormatterE(ptr noundef nonnull align 8 dereferenceable(1144) %6, i32 noundef 2, i32 noundef 0, ptr noundef nonnull @.str.62, ptr noundef nonnull %4)
          to label %7 unwind label %14

7:                                                ; preds = %5
  %8 = tail call noalias noundef nonnull dereferenceable(568) ptr @_Znwm(i64 noundef 568) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(568) %8, i8 0, i64 568, i1 false)
  invoke void @_ZN4TPCE20TDriverCETxnSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(568) %8)
          to label %9 unwind label %16

9:                                                ; preds = %7
  %10 = load ptr, ptr @inputFiles, align 8, !tbaa !5
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %11, label %18

11:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.44, i32 noundef 625, ptr noundef nonnull @__PRETTY_FUNCTION__._Z23transactions_input_initiii) #8
  unreachable

12:                                               ; preds = %3
  %13 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %4, i64 noundef 384) #9
  br label %25

14:                                               ; preds = %5
  %15 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %6, i64 noundef 1144) #9
  br label %25

16:                                               ; preds = %7
  %17 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 568) #9
  br label %25

18:                                               ; preds = %9
  %19 = tail call noalias noundef nonnull dereferenceable(4032) ptr @_Znwm(i64 noundef 4032) #7
  %20 = sext i32 %0 to i64
  %21 = shl nsw i32 %2, 3
  invoke void @_ZN4TPCE20CCETxnInputGeneratorC1ERKNS_11CInputFilesExxiiPNS_11CBaseLoggerEPNS_20TDriverCETxnSettingsE(ptr noundef nonnull align 8 dereferenceable(4032) %19, ptr noundef nonnull align 8 dereferenceable(184) %10, i64 noundef %20, i64 noundef %20, i32 noundef %1, i32 noundef %21, ptr noundef nonnull %6, ptr noundef nonnull %8)
          to label %22 unwind label %23

22:                                               ; preds = %18
  ret ptr %19

23:                                               ; preds = %18
  %24 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %19, i64 noundef 4032) #9
  br label %25

25:                                               ; preds = %14, %23, %16, %12
  %.pn.pn.pn = phi { ptr, i32 } [ %13, %12 ], [ %15, %14 ], [ %24, %23 ], [ %17, %16 ]
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TPCE20TDriverCETxnSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(568)) unnamed_addr #4 align 2

declare void @_ZN4TPCE20CCETxnInputGeneratorC1ERKNS_11CInputFilesExxiiPNS_11CBaseLoggerEPNS_20TDriverCETxnSettingsE(ptr noundef nonnull align 8 dereferenceable(4032), ptr noundef nonnull align 8 dereferenceable(184), i64 noundef, i64 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { 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 #2 = { noreturn 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 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 #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 = { 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 #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 = { builtin allocsize(0) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass