; LLVM IR from rigtorp/ipc-bench :: src (pipe_lat)

; 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.timespec = type { i64, i64 }

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [2 x i32], align 4
  %7 = alloca [2 x i32], align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.timespec, align 8
  %14 = alloca %struct.timespec, align 8
  %15 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp ne i32 %16, 3
  br i1 %17, label %18, label %20

18:                                               ; preds = %2
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

20:                                               ; preds = %2
  %21 = load ptr, ptr %5, align 8, !tbaa !9
  %22 = getelementptr inbounds ptr, ptr %21, i64 1
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = call i32 @atoi(ptr noundef %23) #7
  store i32 %24, ptr %8, align 4, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 2
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = call i64 @atol(ptr noundef %27) #7
  store i64 %28, ptr %10, align 8, !tbaa !11
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call noalias ptr @malloc(i64 noundef %30) #8
  store ptr %31, ptr %9, align 8, !tbaa !9
  %32 = load ptr, ptr %9, align 8, !tbaa !9
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %20
  call void @perror(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

35:                                               ; preds = %20
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %36)
  %38 = load i64, ptr %10, align 8, !tbaa !11
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %38)
  %40 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  %41 = call i32 @pipe(ptr noundef %40) #6
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %44

43:                                               ; preds = %35
  call void @perror(ptr noundef @.str.4)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

44:                                               ; preds = %35
  %45 = getelementptr inbounds [2 x i32], ptr %7, i64 0, i64 0
  %46 = call i32 @pipe(ptr noundef %45) #6
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  call void @perror(ptr noundef @.str.4)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

49:                                               ; preds = %44
  %50 = call i32 @fork() #6
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %84, label %52

52:                                               ; preds = %49
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %53

53:                                               ; preds = %80, %52
  %54 = load i64, ptr %11, align 8, !tbaa !11
  %55 = load i64, ptr %10, align 8, !tbaa !11
  %56 = icmp slt i64 %54, %55
  br i1 %56, label %57, label %83

57:                                               ; preds = %53
  %58 = getelementptr inbounds [2 x i32], ptr %7, i64 0, i64 0
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !9
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = call i64 @read(i32 noundef %59, ptr noundef %60, i64 noundef %62)
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = icmp ne i64 %63, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %57
  call void @perror(ptr noundef @.str.5)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

68:                                               ; preds = %57
  %69 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 1
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call i64 @write(i32 noundef %70, ptr noundef %71, i64 noundef %73)
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = icmp ne i64 %74, %76
  br i1 %77, label %78, label %79

78:                                               ; preds = %68
  call void @perror(ptr noundef @.str.6)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

79:                                               ; preds = %68
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %11, align 8, !tbaa !11
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %11, align 8, !tbaa !11
  br label %53, !llvm.loop !13

83:                                               ; preds = %53
  br label %141

84:                                               ; preds = %49
  %85 = call i32 @clock_gettime(i32 noundef 1, ptr noundef %13) #6
  %86 = icmp eq i32 %85, -1
  br i1 %86, label %87, label %88

87:                                               ; preds = %84
  call void @perror(ptr noundef @.str.7)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

88:                                               ; preds = %84
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %116, %88
  %90 = load i64, ptr %11, align 8, !tbaa !11
  %91 = load i64, ptr %10, align 8, !tbaa !11
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %93, label %119

93:                                               ; preds = %89
  %94 = getelementptr inbounds [2 x i32], ptr %7, i64 0, i64 1
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load ptr, ptr %9, align 8, !tbaa !9
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = call i64 @write(i32 noundef %95, ptr noundef %96, i64 noundef %98)
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = icmp ne i64 %99, %101
  br i1 %102, label %103, label %104

103:                                              ; preds = %93
  call void @perror(ptr noundef @.str.6)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

104:                                              ; preds = %93
  %105 = getelementptr inbounds [2 x i32], ptr %6, i64 0, i64 0
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = load ptr, ptr %9, align 8, !tbaa !9
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = call i64 @read(i32 noundef %106, ptr noundef %107, i64 noundef %109)
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = icmp ne i64 %110, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %104
  call void @perror(ptr noundef @.str.5)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

115:                                              ; preds = %104
  br label %116

116:                                              ; preds = %115
  %117 = load i64, ptr %11, align 8, !tbaa !11
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %11, align 8, !tbaa !11
  br label %89, !llvm.loop !15

119:                                              ; preds = %89
  %120 = call i32 @clock_gettime(i32 noundef 1, ptr noundef %14) #6
  %121 = icmp eq i32 %120, -1
  br i1 %121, label %122, label %123

122:                                              ; preds = %119
  call void @perror(ptr noundef @.str.7)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

123:                                              ; preds = %119
  %124 = getelementptr inbounds %struct.timespec, ptr %14, i32 0, i32 0
  %125 = load i64, ptr %124, align 8, !tbaa !16
  %126 = getelementptr inbounds %struct.timespec, ptr %13, i32 0, i32 0
  %127 = load i64, ptr %126, align 8, !tbaa !16
  %128 = sub nsw i64 %125, %127
  %129 = mul nsw i64 %128, 1000000000
  %130 = getelementptr inbounds %struct.timespec, ptr %14, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !18
  %132 = getelementptr inbounds %struct.timespec, ptr %13, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !18
  %134 = sub nsw i64 %131, %133
  %135 = add nsw i64 %129, %134
  store i64 %135, ptr %12, align 8, !tbaa !11
  %136 = load i64, ptr %12, align 8, !tbaa !11
  %137 = load i64, ptr %10, align 8, !tbaa !11
  %138 = mul nsw i64 %137, 2
  %139 = sdiv i64 %136, %138
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %139)
  br label %141

141:                                              ; preds = %123, %83
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %142

142:                                              ; preds = %141, %122, %114, %103, %87, %78, %67, %48, %43, %34, %18
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %143 = load i32, ptr %3, align 4
  ret i32 %143
}

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr noundef nonnull) #3

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

declare void @perror(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @pipe(ptr noundef) #5

; Function Attrs: nounwind
declare i32 @fork() #5

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #2

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) #5

; 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 = { "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 = { inlinehint nounwind willreturn memory(read) 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 = !{!"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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !12, i64 0}
!17 = !{!"timespec", !12, i64 0, !12, i64 8}
!18 = !{!17, !12, i64 8}


; 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.timespec = type { i64, i64 }

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [2 x i32], align 4
  %4 = alloca [2 x i32], align 4
  %5 = alloca %struct.timespec, align 8
  %6 = alloca %struct.timespec, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %9, label %7

7:                                                ; preds = %2
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %.loopexit

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = tail call i32 @atoi(ptr nocapture noundef %11) #8
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = tail call i64 @atol(ptr nocapture noundef %14) #8
  %16 = sext i32 %12 to i64
  %17 = tail call noalias ptr @malloc(i64 noundef %16) #9
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %9
  tail call void @perror(ptr noundef nonnull @.str.1) #10
  br label %.loopexit

20:                                               ; preds = %9
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %12)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %15)
  %23 = call i32 @pipe(ptr noundef nonnull %3) #7
  %24 = icmp eq i32 %23, -1
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  call void @perror(ptr noundef nonnull @.str.4) #10
  br label %.loopexit

26:                                               ; preds = %20
  %27 = call i32 @pipe(ptr noundef nonnull %4) #7
  %28 = icmp eq i32 %27, -1
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  call void @perror(ptr noundef nonnull @.str.4) #10
  br label %.loopexit

30:                                               ; preds = %26
  %31 = call i32 @fork() #7
  %.not32 = icmp eq i32 %31, 0
  br i1 %.not32, label %.preheader, label %44

.preheader:                                       ; preds = %30
  %32 = icmp sgt i64 %15, 0
  br i1 %32, label %.lr.ph40, label %.loopexit

.lr.ph40:                                         ; preds = %.preheader
  %33 = getelementptr inbounds i8, ptr %3, i64 4
  br label %36

34:                                               ; preds = %40
  %35 = add nuw nsw i64 %.02739, 1
  %exitcond41.not = icmp eq i64 %35, %15
  br i1 %exitcond41.not, label %.loopexit, label %36, !llvm.loop !9

36:                                               ; preds = %.lr.ph40, %34
  %.02739 = phi i64 [ 0, %.lr.ph40 ], [ %35, %34 ]
  %37 = load i32, ptr %4, align 4, !tbaa !11
  %38 = call i64 @read(i32 noundef %37, ptr noundef nonnull %17, i64 noundef %16) #7
  %.not33 = icmp eq i64 %38, %16
  br i1 %.not33, label %40, label %39

39:                                               ; preds = %36
  call void @perror(ptr noundef nonnull @.str.5) #10
  br label %.loopexit

40:                                               ; preds = %36
  %41 = load i32, ptr %33, align 4, !tbaa !11
  %42 = call i64 @write(i32 noundef %41, ptr noundef nonnull %17, i64 noundef %16) #7
  %.not34 = icmp eq i64 %42, %16
  br i1 %.not34, label %34, label %43

43:                                               ; preds = %40
  call void @perror(ptr noundef nonnull @.str.6) #10
  br label %.loopexit

44:                                               ; preds = %30
  %45 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %5) #7
  %46 = icmp eq i32 %45, -1
  br i1 %46, label %49, label %.preheader37

.preheader37:                                     ; preds = %44
  %47 = icmp sgt i64 %15, 0
  br i1 %47, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader37
  %48 = getelementptr inbounds i8, ptr %4, i64 4
  br label %52

49:                                               ; preds = %44
  call void @perror(ptr noundef nonnull @.str.7) #10
  br label %.loopexit

50:                                               ; preds = %56
  %51 = add nuw nsw i64 %.138, 1
  %exitcond.not = icmp eq i64 %51, %15
  br i1 %exitcond.not, label %._crit_edge, label %52, !llvm.loop !13

52:                                               ; preds = %.lr.ph, %50
  %.138 = phi i64 [ 0, %.lr.ph ], [ %51, %50 ]
  %53 = load i32, ptr %48, align 4, !tbaa !11
  %54 = call i64 @write(i32 noundef %53, ptr noundef nonnull %17, i64 noundef %16) #7
  %.not35 = icmp eq i64 %54, %16
  br i1 %.not35, label %56, label %55

55:                                               ; preds = %52
  call void @perror(ptr noundef nonnull @.str.6) #10
  br label %.loopexit

56:                                               ; preds = %52
  %57 = load i32, ptr %3, align 4, !tbaa !11
  %58 = call i64 @read(i32 noundef %57, ptr noundef nonnull %17, i64 noundef %16) #7
  %.not36 = icmp eq i64 %58, %16
  br i1 %.not36, label %50, label %59

59:                                               ; preds = %56
  call void @perror(ptr noundef nonnull @.str.5) #10
  br label %.loopexit

._crit_edge:                                      ; preds = %50, %.preheader37
  %60 = call i32 @clock_gettime(i32 noundef 1, ptr noundef nonnull %6) #7
  %61 = icmp eq i32 %60, -1
  br i1 %61, label %62, label %63

62:                                               ; preds = %._crit_edge
  call void @perror(ptr noundef nonnull @.str.7) #10
  br label %.loopexit

63:                                               ; preds = %._crit_edge
  %64 = load i64, ptr %6, align 8, !tbaa !14
  %65 = load i64, ptr %5, align 8, !tbaa !14
  %66 = sub nsw i64 %64, %65
  %67 = mul nsw i64 %66, 1000000000
  %68 = getelementptr inbounds i8, ptr %6, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !17
  %70 = getelementptr inbounds i8, ptr %5, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !17
  %72 = sub i64 %69, %71
  %73 = add nsw i64 %72, %67
  %74 = shl nsw i64 %15, 1
  %75 = sdiv i64 %73, %74
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %75)
  br label %.loopexit

.loopexit:                                        ; preds = %34, %.preheader, %63, %62, %59, %55, %49, %43, %39, %29, %25, %19, %7
  %.0 = phi i32 [ 1, %7 ], [ 1, %19 ], [ 1, %25 ], [ 1, %29 ], [ 1, %49 ], [ 1, %55 ], [ 1, %59 ], [ 1, %62 ], [ 1, %39 ], [ 1, %43 ], [ 0, %63 ], [ 0, %.preheader ], [ 0, %34 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 %.0
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr nocapture noundef nonnull) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @pipe(ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare i32 @fork() local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { 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 #5 = { 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 #6 = { nofree "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 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { cold }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!15, !16, i64 0}
!15 = !{!"timespec", !16, i64 0, !16, i64 8}
!16 = !{!"long", !7, i64 0}
!17 = !{!15, !16, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass