; LLVM IR from seppo0010/rlite :: src (signal_posix)

; 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.fd_set = type { [16 x i64] }

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

22:                                               ; preds = %4
  %23 = load i32, ptr %17, align 4, !tbaa !9
  %24 = or i32 %23, 2048
  store i32 %24, ptr %17, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %22, %4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load i32, ptr %17, align 4, !tbaa !9
  %28 = call i32 (ptr, i32, ...) @open(ptr noundef %26, i32 noundef %27)
  store i32 %28, ptr %13, align 4, !tbaa !9
  %29 = load i32, ptr %13, align 4, !tbaa !9
  %30 = icmp eq i32 %29, -1
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  store i32 6, ptr %14, align 4, !tbaa !9
  br label %125

32:                                               ; preds = %25
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %77

35:                                               ; preds = %32
  br label %36

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr %16, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %47, %36
  %38 = load i32, ptr %18, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = icmp ult i64 %39, 16
  br i1 %40, label %41, label %50

41:                                               ; preds = %37
  %42 = load ptr, ptr %19, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.fd_set, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %18, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds [16 x i64], ptr %43, i64 0, i64 %45
  store i64 0, ptr %46, align 8, !tbaa !11
  br label %47

47:                                               ; preds = %41
  %48 = load i32, ptr %18, align 4, !tbaa !9
  %49 = add i32 %48, 1
  store i32 %49, ptr %18, align 4, !tbaa !9
  br label %37, !llvm.loop !13

50:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = srem i32 %53, 64
  %55 = zext i32 %54 to i64
  %56 = shl i64 1, %55
  %57 = getelementptr inbounds %struct.fd_set, ptr %16, i32 0, i32 0
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = sdiv i32 %58, 64
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [16 x i64], ptr %57, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = or i64 %62, %56
  store i64 %63, ptr %61, align 8, !tbaa !11
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = call i32 @select(i32 noundef %65, ptr noundef %16, ptr noundef null, ptr noundef null, ptr noundef %66)
  store i32 %67, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %14, align 4, !tbaa !9
  %69 = icmp eq i32 %68, -1
  br i1 %69, label %70, label %71

70:                                               ; preds = %52
  store i32 6, ptr %14, align 4, !tbaa !9
  br label %125

71:                                               ; preds = %52
  %72 = load i32, ptr %14, align 4, !tbaa !9
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %71
  store i32 14, ptr %14, align 4, !tbaa !9
  br label %125

75:                                               ; preds = %71
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76, %32
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = getelementptr inbounds [12 x i8], ptr %9, i64 0, i64 0
  %80 = call i64 @read(i32 noundef %78, ptr noundef %79, i64 noundef 12)
  store i64 %80, ptr %11, align 8, !tbaa !11
  %81 = load i64, ptr %11, align 8, !tbaa !11
  %82 = icmp ne i64 %81, 12
  br i1 %82, label %83, label %84

83:                                               ; preds = %77
  store i32 6, ptr %14, align 4, !tbaa !9
  br label %125

84:                                               ; preds = %77
  %85 = getelementptr inbounds [12 x i8], ptr %9, i64 0, i64 0
  %86 = call i32 @get_4bytes(ptr noundef %85)
  %87 = sext i32 %86 to i64
  store i64 %87, ptr %12, align 8, !tbaa !11
  %88 = load i64, ptr %12, align 8, !tbaa !11
  %89 = mul i64 1, %88
  %90 = call noalias ptr @malloc(i64 noundef %89) #8
  store ptr %90, ptr %15, align 8, !tbaa !5
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %94, label %93

93:                                               ; preds = %84
  store i32 4, ptr %14, align 4, !tbaa !9
  br label %125

94:                                               ; preds = %84
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = load i64, ptr %12, align 8, !tbaa !11
  %98 = call i64 @read(i32 noundef %95, ptr noundef %96, i64 noundef %97)
  store i64 %98, ptr %11, align 8, !tbaa !11
  %99 = load i64, ptr %11, align 8, !tbaa !11
  %100 = load i64, ptr %12, align 8, !tbaa !11
  %101 = icmp ne i64 %99, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %94
  store i32 6, ptr %14, align 4, !tbaa !9
  br label %125

103:                                              ; preds = %94
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = load i64, ptr %12, align 8, !tbaa !11
  %106 = call i64 @rl_crc64(i64 noundef 0, ptr noundef %104, i64 noundef %105)
  store i64 %106, ptr %10, align 8, !tbaa !11
  %107 = getelementptr inbounds [12 x i8], ptr %9, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %107, ptr align 8 %10, i64 8, i1 false)
  %108 = getelementptr inbounds [12 x i8], ptr %9, i64 0, i64 4
  %109 = call i32 @memcmp(ptr noundef %10, ptr noundef %108, i64 noundef 8) #9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %103
  store i32 6, ptr %14, align 4, !tbaa !9
  br label %125

112:                                              ; preds = %103
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %118

115:                                              ; preds = %112
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %116, ptr %117, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %115, %112
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %124

121:                                              ; preds = %118
  %122 = load i64, ptr %12, align 8, !tbaa !11
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 %122, ptr %123, align 8, !tbaa !11
  br label %124

124:                                              ; preds = %121, %118
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %124, %111, %102, %93, %83, %74, %70, %31
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = icmp sge i32 %126, 0
  br i1 %127, label %128, label %131

128:                                              ; preds = %125
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = call i32 @close(i32 noundef %129)
  br label %131

131:                                              ; preds = %128, %125
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %137, label %134

134:                                              ; preds = %131
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = icmp eq ptr %135, null
  br i1 %136, label %137, label %139

137:                                              ; preds = %134, %131
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %138) #7
  br label %139

139:                                              ; preds = %137, %134
  %140 = load i32, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  ret i32 %140
}

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

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

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

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @get_4bytes(ptr noundef) #2

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

declare i64 @rl_crc64(i64 noundef, ptr noundef, i64 noundef) #2

; 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) #4

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

declare i32 @close(i32 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind willreturn memory(read) "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 "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 allocsize(0) }
attributes #9 = { nounwind willreturn memory(read) }

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


; 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.fd_set = type { [16 x i64] }

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 15) i32 @rl_read_signal(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef writeonly %2, ptr noundef writeonly %3) local_unnamed_addr #0 {
  %5 = alloca [12 x i8], align 1
  %6 = alloca i64, align 8
  %7 = alloca %struct.fd_set, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #8
  %.not = icmp eq ptr %1, null
  %spec.select = select i1 %.not, i32 0, i32 2048
  %8 = tail call i32 (ptr, i32, ...) @open(ptr noundef %0, i32 noundef %spec.select) #8
  %9 = icmp eq i32 %8, -1
  br i1 %9, label %.thread62, label %10

10:                                               ; preds = %4
  br i1 %.not, label %22, label %.preheader.preheader

.preheader.preheader:                             ; preds = %10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %7, i8 0, i64 128, i1 false), !tbaa !5
  %11 = srem i32 %8, 64
  %12 = zext nneg i32 %11 to i64
  %13 = shl nuw i64 1, %12
  %14 = sdiv i32 %8, 64
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %15
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %18 = or i64 %17, %13
  store i64 %18, ptr %16, align 8, !tbaa !5
  %19 = add nuw nsw i32 %8, 1
  %20 = call i32 @select(i32 noundef %19, ptr noundef nonnull %7, ptr noundef null, ptr noundef null, ptr noundef nonnull %1) #8
  switch i32 %20, label %21 [
    i32 -1, label %37
    i32 0, label %22
  ]

21:                                               ; preds = %.preheader.preheader
  br label %37

22:                                               ; preds = %.preheader.preheader, %10
  %23 = call i64 @read(i32 noundef %8, ptr noundef nonnull %5, i64 noundef 12) #8
  %.not52 = icmp eq i64 %23, 12
  br i1 %.not52, label %24, label %37

24:                                               ; preds = %22
  %25 = call i32 @get_4bytes(ptr noundef nonnull %5) #8
  %26 = sext i32 %25 to i64
  %27 = call noalias ptr @malloc(i64 noundef %26) #9
  %.not53 = icmp eq ptr %27, null
  br i1 %.not53, label %37, label %28

28:                                               ; preds = %24
  %29 = call i64 @read(i32 noundef %8, ptr noundef nonnull %27, i64 noundef %26) #8
  %.not54 = icmp eq i64 %29, %26
  br i1 %.not54, label %30, label %37

30:                                               ; preds = %28
  %31 = call i64 @rl_crc64(i64 noundef 0, ptr noundef nonnull %27, i64 noundef %26) #8
  store i64 %31, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %5, i64 4
  store i64 %31, ptr %32, align 1
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(8) %6, ptr noundef nonnull dereferenceable(8) %32, i64 8)
  %.not55 = icmp eq i32 %bcmp, 0
  br i1 %.not55, label %33, label %37

33:                                               ; preds = %30
  %.not56 = icmp eq ptr %2, null
  br i1 %.not56, label %35, label %34

34:                                               ; preds = %33
  store ptr %27, ptr %2, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %34, %33
  %.not57 = icmp eq ptr %3, null
  br i1 %.not57, label %37, label %36

36:                                               ; preds = %35
  store i64 %26, ptr %3, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %35, %36, %30, %28, %24, %22, %.preheader.preheader, %21
  %38 = phi i1 [ true, %21 ], [ true, %.preheader.preheader ], [ true, %22 ], [ true, %24 ], [ true, %28 ], [ true, %30 ], [ false, %36 ], [ false, %35 ]
  %.041 = phi i32 [ 14, %21 ], [ 6, %.preheader.preheader ], [ 6, %22 ], [ 4, %24 ], [ 6, %28 ], [ 6, %30 ], [ 0, %36 ], [ 0, %35 ]
  %.040 = phi ptr [ null, %21 ], [ null, %.preheader.preheader ], [ null, %22 ], [ null, %24 ], [ %27, %28 ], [ %27, %30 ], [ %27, %36 ], [ %27, %35 ]
  %39 = icmp sgt i32 %8, -1
  br i1 %39, label %40, label %42

40:                                               ; preds = %37
  %41 = call i32 @close(i32 noundef %8) #8
  br label %42

42:                                               ; preds = %40, %37
  %43 = icmp eq ptr %2, null
  %or.cond = or i1 %43, %38
  br i1 %or.cond, label %.thread62, label %44

.thread62:                                        ; preds = %4, %42
  %.0416068 = phi i32 [ %.041, %42 ], [ 6, %4 ]
  %.0406166 = phi ptr [ %.040, %42 ], [ null, %4 ]
  call void @free(ptr noundef %.0406166) #8
  br label %44

44:                                               ; preds = %42, %.thread62
  %.0416067 = phi i32 [ %.041, %42 ], [ %.0416068, %.thread62 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  ret i32 %.0416067
}

; 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
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #2

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

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @get_4bytes(ptr noundef) 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

declare i64 @rl_crc64(i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

declare i32 @close(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6

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

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 "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 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #6 = { nofree nounwind willreturn memory(argmem: read) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!"long", !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}


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