; LLVM IR from BlinkDL/fast.c :: nvme (main)

; 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.thread_data_t = type { ptr, double, double, i32 }

@__const.main.devices = external hidden unnamed_addr constant [4 x ptr], align 16
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [4 x ptr], align 16
  %3 = alloca [4 x i64], align 16
  %4 = alloca [4 x %struct.thread_data_t], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const.main.devices, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %4) #6
  call void @llvm.memset.p0.i64(ptr align 16 %4, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %57, %0
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 4
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  store i32 2, ptr %6, align 4
  br label %60

14:                                               ; preds = %10
  %15 = load i32, ptr %5, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = load i32, ptr %5, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %20
  %22 = getelementptr inbounds %struct.thread_data_t, ptr %21, i32 0, i32 0
  store ptr %18, ptr %22, align 16, !tbaa !11
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %24
  %26 = getelementptr inbounds %struct.thread_data_t, ptr %25, i32 0, i32 1
  store double 0.000000e+00, ptr %26, align 8, !tbaa !14
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %28
  %30 = getelementptr inbounds %struct.thread_data_t, ptr %29, i32 0, i32 2
  store double 0.000000e+00, ptr %30, align 16, !tbaa !15
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %32
  %34 = getelementptr inbounds %struct.thread_data_t, ptr %33, i32 0, i32 3
  store i32 0, ptr %34, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [4 x i64], ptr %3, i64 0, i64 %36
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %39
  %41 = call i32 @pthread_create(ptr noundef %37, ptr noundef null, ptr noundef @bench_thread, ptr noundef %40) #6
  store i32 %41, ptr %7, align 4, !tbaa !5
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %53

44:                                               ; preds = %14
  %45 = load ptr, ptr @stderr, align 8, !tbaa !9
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [4 x ptr], ptr %2, i64 0, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = call ptr @strerror(i32 noundef %50) #6
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.4, ptr noundef %49, ptr noundef %51) #6
  store i32 1, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %54

53:                                               ; preds = %14
  store i32 0, ptr %6, align 4
  br label %54

54:                                               ; preds = %53, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %55 = load i32, ptr %6, align 4
  switch i32 %55, label %60 [
    i32 0, label %56
  ]

56:                                               ; preds = %54
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %5, align 4, !tbaa !5
  br label %10, !llvm.loop !17

60:                                               ; preds = %54, %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %61 = load i32, ptr %6, align 4
  switch i32 %61, label %120 [
    i32 2, label %62
  ]

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 0.000000e+00, ptr %8, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %114, %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 4
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %117

67:                                               ; preds = %63
  %68 = load i32, ptr %9, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [4 x i64], ptr %3, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !20
  %72 = call i32 @pthread_join(i64 noundef %71, ptr noundef null)
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.thread_data_t, ptr %75, i32 0, i32 3
  %77 = load i32, ptr %76, align 8, !tbaa !16
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %87

79:                                               ; preds = %67
  %80 = load ptr, ptr @stderr, align 8, !tbaa !9
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.thread_data_t, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 16, !tbaa !11
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.5, ptr noundef %85) #6
  br label %113

87:                                               ; preds = %67
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.thread_data_t, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 16, !tbaa !11
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %92)
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %95
  %97 = getelementptr inbounds %struct.thread_data_t, ptr %96, i32 0, i32 2
  %98 = load double, ptr %97, align 16, !tbaa !15
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %98)
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %101
  %103 = getelementptr inbounds %struct.thread_data_t, ptr %102, i32 0, i32 1
  %104 = load double, ptr %103, align 8, !tbaa !14
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %104)
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [4 x %struct.thread_data_t], ptr %4, i64 0, i64 %107
  %109 = getelementptr inbounds %struct.thread_data_t, ptr %108, i32 0, i32 1
  %110 = load double, ptr %109, align 8, !tbaa !14
  %111 = load double, ptr %8, align 8, !tbaa !19
  %112 = fadd double %111, %110
  store double %112, ptr %8, align 8, !tbaa !19
  br label %113

113:                                              ; preds = %87, %79
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %9, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %9, align 4, !tbaa !5
  br label %63, !llvm.loop !22

117:                                              ; preds = %66
  %118 = load double, ptr %8, align 8, !tbaa !19
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, double noundef %118)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %120

120:                                              ; preds = %117, %60
  call void @llvm.lifetime.end.p0(i64 128, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %121 = load i32, ptr %1, align 4
  ret i32 %121
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden ptr @bench_thread(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #4

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

declare i32 @pthread_join(i64 noundef, ptr noundef) #5

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = { "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 }

!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, !10, i64 0}
!12 = !{!"", !10, i64 0, !13, i64 8, !13, i64 16, !6, i64 24}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !13, i64 16}
!16 = !{!12, !6, i64 24}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = distinct !{!22, !18}


; 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.thread_data_t = type { ptr, double, double, i32 }

@__const.main.devices = external hidden unnamed_addr constant [4 x ptr], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main() local_unnamed_addr #0 {
  %1 = alloca [4 x i64], align 16
  %2 = alloca [4 x %struct.thread_data_t], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #6
  %3 = getelementptr inbounds i8, ptr %2, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %3, i8 0, i64 112, i1 false)
  %4 = load ptr, ptr @__const.main.devices, align 16, !tbaa !5
  store ptr %4, ptr %2, align 16, !tbaa !9
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  %6 = getelementptr inbounds i8, ptr %2, i64 16
  %7 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %5, i8 0, i64 20, i1 false)
  %8 = call i32 @pthread_create(ptr noundef nonnull %1, ptr noundef null, ptr noundef nonnull @bench_thread, ptr noundef nonnull %2) #6
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %.thread36

9:                                                ; preds = %0
  %10 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.devices, i64 8), align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %2, i64 32
  store ptr %10, ptr %11, align 16, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %2, i64 40
  %13 = getelementptr inbounds i8, ptr %2, i64 48
  %14 = getelementptr inbounds i8, ptr %2, i64 56
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %12, i8 0, i64 20, i1 false)
  %16 = call i32 @pthread_create(ptr noundef nonnull %15, ptr noundef null, ptr noundef nonnull @bench_thread, ptr noundef nonnull %11) #6
  %.not.1 = icmp eq i32 %16, 0
  br i1 %.not.1, label %17, label %.thread36

17:                                               ; preds = %9
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.devices, i64 16), align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %2, i64 64
  store ptr %18, ptr %19, align 16, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %2, i64 72
  %21 = getelementptr inbounds i8, ptr %2, i64 80
  %22 = getelementptr inbounds i8, ptr %2, i64 88
  %23 = getelementptr inbounds i8, ptr %1, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %20, i8 0, i64 20, i1 false)
  %24 = call i32 @pthread_create(ptr noundef nonnull %23, ptr noundef null, ptr noundef nonnull @bench_thread, ptr noundef nonnull %19) #6
  %.not.2 = icmp eq i32 %24, 0
  br i1 %.not.2, label %25, label %.thread36

25:                                               ; preds = %17
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.main.devices, i64 24), align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %2, i64 96
  store ptr %26, ptr %27, align 16, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %2, i64 104
  %29 = getelementptr inbounds i8, ptr %2, i64 112
  %30 = getelementptr inbounds i8, ptr %2, i64 120
  %31 = getelementptr inbounds i8, ptr %1, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %28, i8 0, i64 20, i1 false)
  %32 = call i32 @pthread_create(ptr noundef nonnull %31, ptr noundef null, ptr noundef nonnull @bench_thread, ptr noundef nonnull %27) #6
  %.not.3 = icmp eq i32 %32, 0
  br i1 %.not.3, label %.preheader.preheader, label %.thread36

.preheader.preheader:                             ; preds = %25
  %33 = load i64, ptr %1, align 16, !tbaa !13
  %34 = call i32 @pthread_join(i64 noundef %33, ptr noundef null) #6
  %35 = load i32, ptr %7, align 8, !tbaa !15
  %.not33 = icmp eq i32 %35, 0
  br i1 %.not33, label %43, label %39

.thread36:                                        ; preds = %25, %17, %9, %0
  %.lcssa43 = phi ptr [ %4, %0 ], [ %10, %9 ], [ %18, %17 ], [ %26, %25 ]
  %.lcssa = phi i32 [ %8, %0 ], [ %16, %9 ], [ %24, %17 ], [ %32, %25 ]
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call ptr @strerror(i32 noundef %.lcssa) #6
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.4, ptr noundef %.lcssa43, ptr noundef %37) #7
  br label %102

39:                                               ; preds = %.preheader.preheader
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = load ptr, ptr %2, align 16, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.5, ptr noundef %41) #7
  br label %.preheader.1

43:                                               ; preds = %.preheader.preheader
  %44 = load ptr, ptr %2, align 16, !tbaa !9
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %44)
  %46 = load double, ptr %6, align 16, !tbaa !16
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %46)
  %48 = load double, ptr %5, align 8, !tbaa !17
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %48)
  %50 = load double, ptr %5, align 8, !tbaa !17
  %51 = fadd double %50, 0.000000e+00
  br label %.preheader.1

.preheader.1:                                     ; preds = %39, %43
  %.1 = phi double [ 0.000000e+00, %39 ], [ %51, %43 ]
  %52 = load i64, ptr %15, align 8, !tbaa !13
  %53 = call i32 @pthread_join(i64 noundef %52, ptr noundef null) #6
  %54 = load i32, ptr %14, align 8, !tbaa !15
  %.not33.1 = icmp eq i32 %54, 0
  br i1 %.not33.1, label %59, label %55

55:                                               ; preds = %.preheader.1
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = load ptr, ptr %11, align 16, !tbaa !9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.5, ptr noundef %57) #7
  br label %.preheader.2

59:                                               ; preds = %.preheader.1
  %60 = load ptr, ptr %11, align 16, !tbaa !9
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %60)
  %62 = load double, ptr %13, align 16, !tbaa !16
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %62)
  %64 = load double, ptr %12, align 8, !tbaa !17
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %64)
  %66 = load double, ptr %12, align 8, !tbaa !17
  %67 = fadd double %.1, %66
  br label %.preheader.2

.preheader.2:                                     ; preds = %59, %55
  %.1.1 = phi double [ %.1, %55 ], [ %67, %59 ]
  %68 = load i64, ptr %23, align 16, !tbaa !13
  %69 = call i32 @pthread_join(i64 noundef %68, ptr noundef null) #6
  %70 = load i32, ptr %22, align 8, !tbaa !15
  %.not33.2 = icmp eq i32 %70, 0
  br i1 %.not33.2, label %75, label %71

71:                                               ; preds = %.preheader.2
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = load ptr, ptr %19, align 16, !tbaa !9
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.5, ptr noundef %73) #7
  br label %.preheader.3

75:                                               ; preds = %.preheader.2
  %76 = load ptr, ptr %19, align 16, !tbaa !9
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %76)
  %78 = load double, ptr %21, align 16, !tbaa !16
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %78)
  %80 = load double, ptr %20, align 8, !tbaa !17
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %80)
  %82 = load double, ptr %20, align 8, !tbaa !17
  %83 = fadd double %.1.1, %82
  br label %.preheader.3

.preheader.3:                                     ; preds = %75, %71
  %.1.2 = phi double [ %.1.1, %71 ], [ %83, %75 ]
  %84 = load i64, ptr %31, align 8, !tbaa !13
  %85 = call i32 @pthread_join(i64 noundef %84, ptr noundef null) #6
  %86 = load i32, ptr %30, align 8, !tbaa !15
  %.not33.3 = icmp eq i32 %86, 0
  br i1 %.not33.3, label %91, label %87

87:                                               ; preds = %.preheader.3
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = load ptr, ptr %27, align 16, !tbaa !9
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.5, ptr noundef %89) #7
  br label %100

91:                                               ; preds = %.preheader.3
  %92 = load ptr, ptr %27, align 16, !tbaa !9
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %92)
  %94 = load double, ptr %29, align 16, !tbaa !16
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %94)
  %96 = load double, ptr %28, align 8, !tbaa !17
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %96)
  %98 = load double, ptr %28, align 8, !tbaa !17
  %99 = fadd double %.1.2, %98
  br label %100

100:                                              ; preds = %91, %87
  %.1.3 = phi double [ %.1.2, %87 ], [ %99, %91 ]
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, double noundef %.1.3)
  br label %102

102:                                              ; preds = %.thread36, %100
  %.3 = phi i32 [ 0, %100 ], [ 1, %.thread36 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  ret i32 %.3
}

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden ptr @bench_thread(ptr noundef) #0

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #3

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

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #5

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { 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 #5 = { "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 = { cold 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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !11, i64 16, !12, i64 24}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !12, i64 24}
!16 = !{!10, !11, i64 16}
!17 = !{!10, !11, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,SROAPass,SimplifyCFGPass