; LLVM IR from microsoft/ntttcp-for-linux :: src (ntttcp)

; 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.ntttcp_test = type { i8, i8, i8, i8, i8, i8, i8, ptr, i32, i32, ptr, i32, i32, i8, i32, i32, i32, i32, i64, i64, i64, i64, i32, i32, i32, i8, ptr, ptr, i8, ptr, i8, ptr, i8, ptr, i8, i8 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @default_ntttcp_test(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds %struct.ntttcp_test, ptr %3, i32 0, i32 0
  store i8 0, ptr %4, align 8, !tbaa !9
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.ntttcp_test, ptr %5, i32 0, i32 1
  store i8 0, ptr %6, align 1, !tbaa !14
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.ntttcp_test, ptr %7, i32 0, i32 4
  store i8 0, ptr %8, align 4, !tbaa !15
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.ntttcp_test, ptr %9, i32 0, i32 2
  store i8 0, ptr %10, align 2, !tbaa !16
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ntttcp_test, ptr %11, i32 0, i32 3
  store i8 0, ptr %12, align 1, !tbaa !17
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ntttcp_test, ptr %13, i32 0, i32 5
  store i8 0, ptr %14, align 1, !tbaa !18
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.ntttcp_test, ptr %15, i32 0, i32 6
  store i8 1, ptr %16, align 2, !tbaa !19
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ntttcp_test, ptr %17, i32 0, i32 7
  store ptr @.str, ptr %18, align 8, !tbaa !20
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ntttcp_test, ptr %19, i32 0, i32 10
  store ptr @.str.1, ptr %20, align 8, !tbaa !21
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ntttcp_test, ptr %21, i32 0, i32 9
  store i32 -1, ptr %22, align 4, !tbaa !22
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.ntttcp_test, ptr %23, i32 0, i32 8
  store i32 16, ptr %24, align 8, !tbaa !23
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.ntttcp_test, ptr %25, i32 0, i32 11
  store i32 4, ptr %26, align 8, !tbaa !24
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ntttcp_test, ptr %27, i32 0, i32 12
  store i32 1, ptr %28, align 4, !tbaa !25
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ntttcp_test, ptr %29, i32 0, i32 14
  store i32 2, ptr %30, align 4, !tbaa !26
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ntttcp_test, ptr %31, i32 0, i32 15
  store i32 1, ptr %32, align 8, !tbaa !27
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ntttcp_test, ptr %33, i32 0, i32 16
  store i32 5001, ptr %34, align 4, !tbaa !28
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ntttcp_test, ptr %35, i32 0, i32 17
  store i32 0, ptr %36, align 8, !tbaa !29
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ntttcp_test, ptr %37, i32 0, i32 18
  store i64 65536, ptr %38, align 8, !tbaa !30
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ntttcp_test, ptr %39, i32 0, i32 19
  store i64 131072, ptr %40, align 8, !tbaa !31
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ntttcp_test, ptr %41, i32 0, i32 20
  store i64 0, ptr %42, align 8, !tbaa !32
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ntttcp_test, ptr %43, i32 0, i32 21
  store i64 0, ptr %44, align 8, !tbaa !33
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ntttcp_test, ptr %45, i32 0, i32 22
  store i32 0, ptr %46, align 8, !tbaa !34
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ntttcp_test, ptr %47, i32 0, i32 23
  store i32 60, ptr %48, align 4, !tbaa !35
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ntttcp_test, ptr %49, i32 0, i32 24
  store i32 0, ptr %50, align 8, !tbaa !36
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ntttcp_test, ptr %51, i32 0, i32 13
  store i8 0, ptr %52, align 8, !tbaa !37
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ntttcp_test, ptr %53, i32 0, i32 25
  store i8 0, ptr %54, align 4, !tbaa !38
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ntttcp_test, ptr %55, i32 0, i32 26
  store ptr @.str.2, ptr %56, align 8, !tbaa !39
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ntttcp_test, ptr %57, i32 0, i32 27
  store ptr @.str.2, ptr %58, align 8, !tbaa !40
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ntttcp_test, ptr %59, i32 0, i32 28
  store i8 0, ptr %60, align 8, !tbaa !41
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ntttcp_test, ptr %61, i32 0, i32 29
  store ptr @.str.3, ptr %62, align 8, !tbaa !42
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ntttcp_test, ptr %63, i32 0, i32 30
  store i8 0, ptr %64, align 8, !tbaa !43
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ntttcp_test, ptr %65, i32 0, i32 31
  store ptr @.str.4, ptr %66, align 8, !tbaa !44
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ntttcp_test, ptr %67, i32 0, i32 32
  store i8 0, ptr %68, align 8, !tbaa !45
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ntttcp_test, ptr %69, i32 0, i32 33
  store ptr @.str.5, ptr %70, align 8, !tbaa !46
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ntttcp_test, ptr %71, i32 0, i32 34
  store i8 0, ptr %72, align 8, !tbaa !47
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ntttcp_test, ptr %73, i32 0, i32 35
  store i8 0, ptr %74, align 1, !tbaa !48
  ret void
}

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

!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 = !{!"ntttcp_test", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 4, !11, i64 5, !11, i64 6, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !12, i64 32, !12, i64 36, !11, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !12, i64 96, !12, i64 100, !12, i64 104, !11, i64 108, !6, i64 112, !6, i64 120, !11, i64 128, !6, i64 136, !11, i64 144, !6, i64 152, !11, i64 160, !6, i64 168, !11, i64 176, !11, i64 177}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !11, i64 1}
!15 = !{!10, !11, i64 4}
!16 = !{!10, !11, i64 2}
!17 = !{!10, !11, i64 3}
!18 = !{!10, !11, i64 5}
!19 = !{!10, !11, i64 6}
!20 = !{!10, !6, i64 8}
!21 = !{!10, !6, i64 24}
!22 = !{!10, !12, i64 20}
!23 = !{!10, !12, i64 16}
!24 = !{!10, !12, i64 32}
!25 = !{!10, !12, i64 36}
!26 = !{!10, !12, i64 44}
!27 = !{!10, !12, i64 48}
!28 = !{!10, !12, i64 52}
!29 = !{!10, !12, i64 56}
!30 = !{!10, !13, i64 64}
!31 = !{!10, !13, i64 72}
!32 = !{!10, !13, i64 80}
!33 = !{!10, !13, i64 88}
!34 = !{!10, !12, i64 96}
!35 = !{!10, !12, i64 100}
!36 = !{!10, !12, i64 104}
!37 = !{!10, !11, i64 40}
!38 = !{!10, !11, i64 108}
!39 = !{!10, !6, i64 112}
!40 = !{!10, !6, i64 120}
!41 = !{!10, !11, i64 128}
!42 = !{!10, !6, i64 136}
!43 = !{!10, !11, i64 144}
!44 = !{!10, !6, i64 152}
!45 = !{!10, !11, i64 160}
!46 = !{!10, !6, i64 168}
!47 = !{!10, !11, i64 176}
!48 = !{!10, !11, i64 177}


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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable
define dso_local void @default_ntttcp_test(ptr nocapture noundef writeonly %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 6
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(6) %0, i8 0, i64 6, i1 false)
  store i8 1, ptr %2, align 2, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr @.str, ptr %3, align 8, !tbaa !13
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr @.str.1, ptr %4, align 8, !tbaa !14
  %5 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 -1, ptr %5, align 4, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 16, ptr %6, align 8, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 4, ptr %7, align 8, !tbaa !17
  %8 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 1, ptr %8, align 4, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %0, i64 44
  store <4 x i32> <i32 2, i32 1, i32 5001, i32 0>, ptr %9, align 4, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 65536, ptr %10, align 8, !tbaa !20
  %11 = getelementptr inbounds i8, ptr %0, i64 72
  store i64 131072, ptr %11, align 8, !tbaa !21
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  %13 = getelementptr inbounds i8, ptr %0, i64 100
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %12, i8 0, i64 20, i1 false)
  store i32 60, ptr %13, align 4, !tbaa !22
  %14 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 0, ptr %14, align 8, !tbaa !23
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  store i8 0, ptr %15, align 8, !tbaa !24
  %16 = getelementptr inbounds i8, ptr %0, i64 108
  store i8 0, ptr %16, align 4, !tbaa !25
  %17 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr @.str.2, ptr %17, align 8, !tbaa !26
  %18 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr @.str.2, ptr %18, align 8, !tbaa !27
  %19 = getelementptr inbounds i8, ptr %0, i64 128
  store i8 0, ptr %19, align 8, !tbaa !28
  %20 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr @.str.3, ptr %20, align 8, !tbaa !29
  %21 = getelementptr inbounds i8, ptr %0, i64 144
  store i8 0, ptr %21, align 8, !tbaa !30
  %22 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr @.str.4, ptr %22, align 8, !tbaa !31
  %23 = getelementptr inbounds i8, ptr %0, i64 160
  store i8 0, ptr %23, align 8, !tbaa !32
  %24 = getelementptr inbounds i8, ptr %0, i64 168
  store ptr @.str.5, ptr %24, align 8, !tbaa !33
  %25 = getelementptr inbounds i8, ptr %0, i64 176
  store i8 0, ptr %25, align 8, !tbaa !34
  %26 = getelementptr inbounds i8, ptr %0, i64 177
  store i8 0, ptr %26, align 1, !tbaa !35
  ret void
}

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

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) 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 nounwind willreturn memory(argmem: write) }

!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 6}
!6 = !{!"ntttcp_test", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !10, i64 8, !11, i64 16, !11, i64 20, !10, i64 24, !11, i64 32, !11, i64 36, !7, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !11, i64 96, !11, i64 100, !11, i64 104, !7, i64 108, !10, i64 112, !10, i64 120, !7, i64 128, !10, i64 136, !7, i64 144, !10, i64 152, !7, i64 160, !10, i64 168, !7, i64 176, !7, i64 177}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !10, i64 24}
!15 = !{!6, !11, i64 20}
!16 = !{!6, !11, i64 16}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !11, i64 36}
!19 = !{!11, !11, i64 0}
!20 = !{!6, !12, i64 64}
!21 = !{!6, !12, i64 72}
!22 = !{!6, !11, i64 100}
!23 = !{!6, !11, i64 104}
!24 = !{!6, !7, i64 40}
!25 = !{!6, !7, i64 108}
!26 = !{!6, !10, i64 112}
!27 = !{!6, !10, i64 120}
!28 = !{!6, !7, i64 128}
!29 = !{!6, !10, i64 136}
!30 = !{!6, !7, i64 144}
!31 = !{!6, !10, i64 152}
!32 = !{!6, !7, i64 160}
!33 = !{!6, !10, i64 168}
!34 = !{!6, !7, i64 176}
!35 = !{!6, !7, i64 177}


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