; LLVM IR from introlab/odas :: demo/odaslive (profiler)

; 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.profiler = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }

; Function Attrs: nounwind uwtable
define dso_local ptr @profiler_construct() #0 {
  %1 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  %2 = call noalias ptr @malloc(i64 noundef 156) #4
  store ptr %2, ptr %1, align 8, !tbaa !5
  %3 = load ptr, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds %struct.profiler, ptr %3, i32 0, i32 0
  store float 0.000000e+00, ptr %4, align 4, !tbaa !9
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.profiler, ptr %5, i32 0, i32 1
  store float 0.000000e+00, ptr %6, align 4, !tbaa !12
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.profiler, ptr %7, i32 0, i32 2
  store float 0.000000e+00, ptr %8, align 4, !tbaa !13
  %9 = load ptr, ptr %1, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.profiler, ptr %9, i32 0, i32 3
  store float 0.000000e+00, ptr %10, align 4, !tbaa !14
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.profiler, ptr %11, i32 0, i32 4
  store float 0.000000e+00, ptr %12, align 4, !tbaa !15
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.profiler, ptr %13, i32 0, i32 5
  store float 0.000000e+00, ptr %14, align 4, !tbaa !16
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.profiler, ptr %15, i32 0, i32 6
  store float 0.000000e+00, ptr %16, align 4, !tbaa !17
  %17 = load ptr, ptr %1, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.profiler, ptr %17, i32 0, i32 7
  store float 0.000000e+00, ptr %18, align 4, !tbaa !18
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.profiler, ptr %19, i32 0, i32 8
  store float 0.000000e+00, ptr %20, align 4, !tbaa !19
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.profiler, ptr %21, i32 0, i32 9
  store float 0.000000e+00, ptr %22, align 4, !tbaa !20
  %23 = load ptr, ptr %1, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.profiler, ptr %23, i32 0, i32 10
  store float 0.000000e+00, ptr %24, align 4, !tbaa !21
  %25 = load ptr, ptr %1, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.profiler, ptr %25, i32 0, i32 11
  store float 0.000000e+00, ptr %26, align 4, !tbaa !22
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.profiler, ptr %27, i32 0, i32 12
  store float 0.000000e+00, ptr %28, align 4, !tbaa !23
  %29 = load ptr, ptr %1, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.profiler, ptr %29, i32 0, i32 13
  store float 0.000000e+00, ptr %30, align 4, !tbaa !24
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.profiler, ptr %31, i32 0, i32 14
  store float 0.000000e+00, ptr %32, align 4, !tbaa !25
  %33 = load ptr, ptr %1, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.profiler, ptr %33, i32 0, i32 15
  store float 0.000000e+00, ptr %34, align 4, !tbaa !26
  %35 = load ptr, ptr %1, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.profiler, ptr %35, i32 0, i32 16
  store float 0.000000e+00, ptr %36, align 4, !tbaa !27
  %37 = load ptr, ptr %1, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.profiler, ptr %37, i32 0, i32 17
  store float 0.000000e+00, ptr %38, align 4, !tbaa !28
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.profiler, ptr %39, i32 0, i32 18
  store float 0.000000e+00, ptr %40, align 4, !tbaa !29
  %41 = load ptr, ptr %1, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.profiler, ptr %41, i32 0, i32 19
  store float 0.000000e+00, ptr %42, align 4, !tbaa !30
  %43 = load ptr, ptr %1, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.profiler, ptr %43, i32 0, i32 20
  store float 0.000000e+00, ptr %44, align 4, !tbaa !31
  %45 = load ptr, ptr %1, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.profiler, ptr %45, i32 0, i32 21
  store float 0.000000e+00, ptr %46, align 4, !tbaa !32
  %47 = load ptr, ptr %1, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.profiler, ptr %47, i32 0, i32 22
  store float 0.000000e+00, ptr %48, align 4, !tbaa !33
  %49 = load ptr, ptr %1, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.profiler, ptr %49, i32 0, i32 23
  store float 0.000000e+00, ptr %50, align 4, !tbaa !34
  %51 = load ptr, ptr %1, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.profiler, ptr %51, i32 0, i32 24
  store float 0.000000e+00, ptr %52, align 4, !tbaa !35
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.profiler, ptr %53, i32 0, i32 25
  store float 0.000000e+00, ptr %54, align 4, !tbaa !36
  %55 = load ptr, ptr %1, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.profiler, ptr %55, i32 0, i32 26
  store float 0.000000e+00, ptr %56, align 4, !tbaa !37
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.profiler, ptr %57, i32 0, i32 27
  store float 0.000000e+00, ptr %58, align 4, !tbaa !38
  %59 = load ptr, ptr %1, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.profiler, ptr %59, i32 0, i32 28
  store float 0.000000e+00, ptr %60, align 4, !tbaa !39
  %61 = load ptr, ptr %1, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.profiler, ptr %61, i32 0, i32 29
  store float 0.000000e+00, ptr %62, align 4, !tbaa !40
  %63 = load ptr, ptr %1, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.profiler, ptr %63, i32 0, i32 30
  store float 0.000000e+00, ptr %64, align 4, !tbaa !41
  %65 = load ptr, ptr %1, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.profiler, ptr %65, i32 0, i32 31
  store float 0.000000e+00, ptr %66, align 4, !tbaa !42
  %67 = load ptr, ptr %1, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.profiler, ptr %67, i32 0, i32 32
  store float 0.000000e+00, ptr %68, align 4, !tbaa !43
  %69 = load ptr, ptr %1, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.profiler, ptr %69, i32 0, i32 33
  store float 0.000000e+00, ptr %70, align 4, !tbaa !44
  %71 = load ptr, ptr %1, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.profiler, ptr %71, i32 0, i32 34
  store float 0.000000e+00, ptr %72, align 4, !tbaa !45
  %73 = load ptr, ptr %1, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.profiler, ptr %73, i32 0, i32 35
  store float 0.000000e+00, ptr %74, align 4, !tbaa !46
  %75 = load ptr, ptr %1, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.profiler, ptr %75, i32 0, i32 36
  store float 0.000000e+00, ptr %76, align 4, !tbaa !47
  %77 = load ptr, ptr %1, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.profiler, ptr %77, i32 0, i32 37
  store float 0.000000e+00, ptr %78, align 4, !tbaa !48
  %79 = load ptr, ptr %1, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.profiler, ptr %79, i32 0, i32 38
  store float 0.000000e+00, ptr %80, align 4, !tbaa !49
  %81 = load ptr, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret ptr %81
}

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

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

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

attributes #0 = { 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 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 = { nounwind }
attributes #4 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"profiler", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152}
!11 = !{!"float", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !11, i64 12}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !11, i64 20}
!17 = !{!10, !11, i64 24}
!18 = !{!10, !11, i64 28}
!19 = !{!10, !11, i64 32}
!20 = !{!10, !11, i64 36}
!21 = !{!10, !11, i64 40}
!22 = !{!10, !11, i64 44}
!23 = !{!10, !11, i64 48}
!24 = !{!10, !11, i64 52}
!25 = !{!10, !11, i64 56}
!26 = !{!10, !11, i64 60}
!27 = !{!10, !11, i64 64}
!28 = !{!10, !11, i64 68}
!29 = !{!10, !11, i64 72}
!30 = !{!10, !11, i64 76}
!31 = !{!10, !11, i64 80}
!32 = !{!10, !11, i64 84}
!33 = !{!10, !11, i64 88}
!34 = !{!10, !11, i64 92}
!35 = !{!10, !11, i64 96}
!36 = !{!10, !11, i64 100}
!37 = !{!10, !11, i64 104}
!38 = !{!10, !11, i64 108}
!39 = !{!10, !11, i64 112}
!40 = !{!10, !11, i64 116}
!41 = !{!10, !11, i64 120}
!42 = !{!10, !11, i64 124}
!43 = !{!10, !11, i64 128}
!44 = !{!10, !11, i64 132}
!45 = !{!10, !11, i64 136}
!46 = !{!10, !11, i64 140}
!47 = !{!10, !11, i64 144}
!48 = !{!10, !11, i64 148}
!49 = !{!10, !11, i64 152}


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

; Function Attrs: mustprogress nofree nounwind willreturn memory(inaccessiblemem: readwrite) uwtable
define dso_local noalias noundef ptr @profiler_construct() local_unnamed_addr #0 {
  %calloc = tail call dereferenceable_or_null(156) ptr @calloc(i64 1, i64 156)
  ret ptr %calloc
}

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

attributes #0 = { mustprogress nofree nounwind willreturn memory(inaccessiblemem: readwrite) 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 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }

!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)"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass