; LLVM IR from stivalaa/EstimNetDirected :: Test/TestSetFunctions (testSetFunctions)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [100 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [10 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 [1024 x i8], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [2000 x ptr], align 16
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = 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 1024, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16000, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %18 = call i64 @time(ptr noundef null) #6
  %19 = trunc i64 %18 to i32
  call void @srand(i32 noundef %19) #6
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = icmp ne i32 %20, 2
  br i1 %21, label %22, label %28

22:                                               ; preds = %2
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !9
  %25 = getelementptr inbounds ptr, ptr %24, i64 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str, ptr noundef %26) #6
  call void @exit(i32 noundef 1) #7
  unreachable

28:                                               ; preds = %2
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %29, i64 1
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  store ptr %31, ptr %10, align 8, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %146, %28
  %33 = load i32, ptr %12, align 4, !tbaa !5
  %34 = icmp slt i32 %33, 2
  br i1 %34, label %35, label %149

35:                                               ; preds = %32
  store i32 0, ptr %15, align 4, !tbaa !5
  %36 = load ptr, ptr %10, align 8, !tbaa !9
  %37 = call noalias ptr @fopen(ptr noundef %36, ptr noundef @.str.1)
  store ptr %37, ptr %11, align 8, !tbaa !9
  %38 = icmp ne ptr %37, null
  br i1 %38, label %46, label %39

39:                                               ; preds = %35
  %40 = load ptr, ptr @stderr, align 8, !tbaa !9
  %41 = load ptr, ptr %10, align 8, !tbaa !9
  %42 = call ptr @__errno_location() #8
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = call ptr @strerror(i32 noundef %43) #6
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.2, ptr noundef %41, ptr noundef %44) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %186

46:                                               ; preds = %35
  %47 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %48 = load ptr, ptr %11, align 8, !tbaa !9
  %49 = call ptr @fgets(ptr noundef %47, i32 noundef 1023, ptr noundef %48)
  %50 = icmp ne ptr %49, null
  br i1 %50, label %58, label %51

51:                                               ; preds = %46
  %52 = load ptr, ptr @stderr, align 8, !tbaa !9
  %53 = load ptr, ptr %10, align 8, !tbaa !9
  %54 = call ptr @__errno_location() #8
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = call ptr @strerror(i32 noundef %55) #6
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.3, ptr noundef %53, ptr noundef %56) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %186

58:                                               ; preds = %46
  %59 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %60 = load ptr, ptr %11, align 8, !tbaa !9
  %61 = call ptr @fgets(ptr noundef %59, i32 noundef 1023, ptr noundef %60)
  %62 = icmp ne ptr %61, null
  br i1 %62, label %75, label %63

63:                                               ; preds = %58
  %64 = load ptr, ptr %11, align 8, !tbaa !9
  %65 = call i32 @feof(ptr noundef %64) #6
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %74, label %67

67:                                               ; preds = %63
  %68 = load ptr, ptr @stderr, align 8, !tbaa !9
  %69 = load ptr, ptr %10, align 8, !tbaa !9
  %70 = call ptr @__errno_location() #8
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = call ptr @strerror(i32 noundef %71) #6
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.4, ptr noundef %69, ptr noundef %72) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %186

74:                                               ; preds = %63
  br label %75

75:                                               ; preds = %74, %58
  br label %76

76:                                               ; preds = %122, %75
  %77 = load ptr, ptr %11, align 8, !tbaa !9
  %78 = call i32 @feof(ptr noundef %77) #6
  %79 = icmp ne i32 %78, 0
  %80 = xor i1 %79, true
  br i1 %80, label %81, label %123

81:                                               ; preds = %76
  %82 = load i32, ptr %15, align 4, !tbaa !5
  %83 = icmp uge i32 %82, 2000
  br i1 %83, label %84, label %87

84:                                               ; preds = %81
  %85 = load ptr, ptr @stderr, align 8, !tbaa !9
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.5, i32 noundef 2000) #6
  call void @exit(i32 noundef 1) #7
  unreachable

87:                                               ; preds = %81
  %88 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %89 = call ptr @rstrip(ptr noundef %88)
  %90 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %91 = load i32, ptr %12, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 0
  %93 = zext i1 %92 to i32
  %94 = load i32, ptr %15, align 4, !tbaa !5
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [2000 x ptr], ptr %14, i64 0, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  %98 = call i32 @parse_category_set(ptr noundef %90, i32 noundef %93, ptr noundef %13, ptr noundef %97)
  %99 = icmp slt i32 %98, 0
  br i1 %99, label %100, label %103

100:                                              ; preds = %87
  %101 = load ptr, ptr @stderr, align 8, !tbaa !9
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.6) #6
  call void @exit(i32 noundef 1) #7
  unreachable

103:                                              ; preds = %87
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = add i32 %104, 1
  store i32 %105, ptr %15, align 4, !tbaa !5
  %106 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %107 = load ptr, ptr %11, align 8, !tbaa !9
  %108 = call ptr @fgets(ptr noundef %106, i32 noundef 1023, ptr noundef %107)
  %109 = icmp ne ptr %108, null
  br i1 %109, label %122, label %110

110:                                              ; preds = %103
  %111 = load ptr, ptr %11, align 8, !tbaa !9
  %112 = call i32 @feof(ptr noundef %111) #6
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %121, label %114

114:                                              ; preds = %110
  %115 = load ptr, ptr @stderr, align 8, !tbaa !9
  %116 = load ptr, ptr %10, align 8, !tbaa !9
  %117 = call ptr @__errno_location() #8
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = call ptr @strerror(i32 noundef %118) #6
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.7, ptr noundef %116, ptr noundef %119) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %186

121:                                              ; preds = %110
  br label %122

122:                                              ; preds = %121, %103
  br label %76, !llvm.loop !11

123:                                              ; preds = %76
  %124 = load ptr, ptr %11, align 8, !tbaa !9
  %125 = call i32 @fclose(ptr noundef %124)
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %145

128:                                              ; preds = %123
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %141, %128
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = load i32, ptr %15, align 4, !tbaa !5
  %132 = icmp ult i32 %130, %131
  br i1 %132, label %133, label %144

133:                                              ; preds = %129
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = zext i32 %134 to i64
  %136 = mul i64 %135, 4
  %137 = call ptr @safe_malloc(i64 noundef %136)
  %138 = load i32, ptr %9, align 4, !tbaa !5
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds [2000 x ptr], ptr %14, i64 0, i64 %139
  store ptr %137, ptr %140, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %133
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = add i32 %142, 1
  store i32 %143, ptr %9, align 4, !tbaa !5
  br label %129, !llvm.loop !13

144:                                              ; preds = %129
  br label %145

145:                                              ; preds = %144, %123
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %12, align 4, !tbaa !5
  br label %32, !llvm.loop !14

149:                                              ; preds = %32
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %182, %149
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = icmp ult i32 %151, 1000
  br i1 %152, label %153, label %185

153:                                              ; preds = %150
  %154 = call i32 @rand() #6
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = urem i32 %154, %155
  store i32 %156, ptr %7, align 4, !tbaa !5
  %157 = call i32 @rand() #6
  %158 = load i32, ptr %15, align 4, !tbaa !5
  %159 = urem i32 %157, %158
  store i32 %159, ptr %8, align 4, !tbaa !5
  %160 = load i32, ptr %7, align 4, !tbaa !5
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds [2000 x ptr], ptr %14, i64 0, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds [2000 x ptr], ptr %14, i64 0, i64 %165
  %167 = load ptr, ptr %166, align 8, !tbaa !9
  %168 = load i32, ptr %13, align 4, !tbaa !5
  %169 = call double @jaccard_index(ptr noundef %163, ptr noundef %167, i32 noundef %168)
  store double %169, ptr %16, align 8, !tbaa !15
  %170 = load double, ptr %16, align 8, !tbaa !15
  %171 = fcmp oge double %170, 0.000000e+00
  br i1 %171, label %172, label %176

172:                                              ; preds = %153
  %173 = load double, ptr %16, align 8, !tbaa !15
  %174 = fcmp ole double %173, 1.000000e+00
  br i1 %174, label %175, label %176

175:                                              ; preds = %172
  br label %177

176:                                              ; preds = %172, %153
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 108, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

177:                                              ; preds = %175
  %178 = load i32, ptr %7, align 4, !tbaa !5
  %179 = load i32, ptr %8, align 4, !tbaa !5
  %180 = load double, ptr %16, align 8, !tbaa !15
  %181 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %178, i32 noundef %179, double noundef %180)
  br label %182

182:                                              ; preds = %177
  %183 = load i32, ptr %9, align 4, !tbaa !5
  %184 = add i32 %183, 1
  store i32 %184, ptr %9, align 4, !tbaa !5
  br label %150, !llvm.loop !17

185:                                              ; preds = %150
  call void @exit(i32 noundef 0) #7
  unreachable

186:                                              ; preds = %114, %67, %51, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16000, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #6
  %187 = load i32, ptr %3, align 4
  ret i32 %187
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #2

declare ptr @rstrip(ptr noundef) #4

declare i32 @parse_category_set(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #4

declare i32 @fclose(ptr noundef) #4

declare ptr @safe_malloc(i64 noundef) #4

; Function Attrs: nounwind
declare i32 @rand() #2

declare double @jaccard_index(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

; 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 "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 = { noreturn 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 = { "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 willreturn memory(none) "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 = { noreturn nounwind }
attributes #8 = { nounwind willreturn memory(none) }

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


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [100 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [1024 x i8], align 16
  %4 = alloca i32, align 4
  %5 = alloca [2000 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16000, ptr nonnull %5) #7
  %6 = tail call i64 @time(ptr noundef null) #7
  %7 = trunc i64 %6 to i32
  tail call void @srand(i32 noundef %7) #7
  %.not = icmp eq i32 %0, 2
  br i1 %.not, label %12, label %8

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !9
  %10 = load ptr, ptr %1, align 8, !tbaa !9
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef %10) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

12:                                               ; preds = %2
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = tail call noalias ptr @fopen(ptr noundef %14, ptr noundef nonnull @.str.1)
  %.not43 = icmp eq ptr %15, null
  br i1 %.not43, label %.loopexit75, label %16

16:                                               ; preds = %12
  %17 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1023, ptr noundef nonnull %15)
  %.not44 = icmp eq ptr %17, null
  br i1 %.not44, label %.loopexit75, label %18

18:                                               ; preds = %16
  %19 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1023, ptr noundef nonnull %15)
  %.not45 = icmp eq ptr %19, null
  br i1 %.not45, label %20, label %22

20:                                               ; preds = %18
  %21 = call i32 @feof(ptr noundef nonnull %15) #7
  %.not46 = icmp eq i32 %21, 0
  br i1 %.not46, label %.loopexit75, label %22

22:                                               ; preds = %20, %18
  %23 = call i32 @feof(ptr noundef nonnull %15) #7
  %.not4760 = icmp eq i32 %23, 0
  br i1 %.not4760, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %22
  %24 = call i32 @fclose(ptr noundef nonnull %15)
  br label %.loopexit

.lr.ph:                                           ; preds = %22, %39
  %indvars.iv = phi i64 [ %indvars.iv.next, %39 ], [ 0, %22 ]
  %exitcond = icmp eq i64 %indvars.iv, 2000
  br i1 %exitcond, label %.loopexit73, label %27

.loopexit73:                                      ; preds = %.lr.ph, %.lr.ph.1
  %25 = load ptr, ptr @stderr, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.5, i32 noundef 2000) #8
  call void @exit(i32 noundef 1) #9
  unreachable

27:                                               ; preds = %.lr.ph
  %28 = call ptr @rstrip(ptr noundef nonnull %3) #7
  %29 = getelementptr inbounds [2000 x ptr], ptr %5, i64 0, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = call i32 @parse_category_set(ptr noundef nonnull %3, i32 noundef 1, ptr noundef nonnull %4, ptr noundef %30) #7
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %.loopexit74, label %35

.loopexit74:                                      ; preds = %27, %56
  %33 = load ptr, ptr @stderr, align 8, !tbaa !9
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.6) #8
  call void @exit(i32 noundef 1) #9
  unreachable

35:                                               ; preds = %27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1023, ptr noundef nonnull %15)
  %.not48 = icmp eq ptr %36, null
  br i1 %.not48, label %37, label %39

37:                                               ; preds = %35
  %38 = call i32 @feof(ptr noundef nonnull %15) #7
  %.not49 = icmp eq i32 %38, 0
  br i1 %.not49, label %.loopexit75, label %39

39:                                               ; preds = %37, %35
  %40 = call i32 @feof(ptr noundef nonnull %15) #7
  %.not47 = icmp eq i32 %40, 0
  br i1 %.not47, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %39
  %41 = call i32 @fclose(ptr noundef nonnull %15)
  %wide.trip.count = and i64 %indvars.iv.next, 4294967295
  br label %.lr.ph63

.lr.ph63:                                         ; preds = %._crit_edge, %.lr.ph63
  %indvars.iv69 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next70, %.lr.ph63 ]
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = zext i32 %42 to i64
  %44 = shl nuw nsw i64 %43, 2
  %45 = call ptr @safe_malloc(i64 noundef %44) #7
  %46 = getelementptr inbounds [2000 x ptr], ptr %5, i64 0, i64 %indvars.iv69
  store ptr %45, ptr %46, align 8, !tbaa !9
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond72.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count
  br i1 %exitcond72.not, label %.loopexit, label %.lr.ph63, !llvm.loop !13

.loopexit:                                        ; preds = %.lr.ph63, %._crit_edge.thread
  %47 = call noalias ptr @fopen(ptr noundef %14, ptr noundef nonnull @.str.1)
  %.not43.1 = icmp eq ptr %47, null
  br i1 %.not43.1, label %.loopexit75, label %48

48:                                               ; preds = %.loopexit
  %49 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1023, ptr noundef nonnull %47)
  %.not44.1 = icmp eq ptr %49, null
  br i1 %.not44.1, label %.loopexit75, label %50

50:                                               ; preds = %48
  %51 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1023, ptr noundef nonnull %47)
  %.not45.1 = icmp eq ptr %51, null
  br i1 %.not45.1, label %52, label %54

52:                                               ; preds = %50
  %53 = call i32 @feof(ptr noundef nonnull %47) #7
  %.not46.1 = icmp eq i32 %53, 0
  br i1 %.not46.1, label %.loopexit75, label %54

54:                                               ; preds = %52, %50
  %55 = call i32 @feof(ptr noundef nonnull %47) #7
  %.not4760.1 = icmp eq i32 %55, 0
  br i1 %.not4760.1, label %.lr.ph.1, label %.loopexit.1

.lr.ph.1:                                         ; preds = %54, %66
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %66 ], [ 0, %54 ]
  %exitcond.1 = icmp eq i64 %indvars.iv.1, 2000
  br i1 %exitcond.1, label %.loopexit73, label %56

56:                                               ; preds = %.lr.ph.1
  %57 = call ptr @rstrip(ptr noundef nonnull %3) #7
  %58 = getelementptr inbounds [2000 x ptr], ptr %5, i64 0, i64 %indvars.iv.1
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = call i32 @parse_category_set(ptr noundef nonnull %3, i32 noundef 0, ptr noundef nonnull %4, ptr noundef %59) #7
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %.loopexit74, label %62

62:                                               ; preds = %56
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %63 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 1023, ptr noundef nonnull %47)
  %.not48.1 = icmp eq ptr %63, null
  br i1 %.not48.1, label %64, label %66

64:                                               ; preds = %62
  %65 = call i32 @feof(ptr noundef nonnull %47) #7
  %.not49.1 = icmp eq i32 %65, 0
  br i1 %.not49.1, label %.loopexit75, label %66

66:                                               ; preds = %64, %62
  %67 = call i32 @feof(ptr noundef nonnull %47) #7
  %.not47.1 = icmp eq i32 %67, 0
  br i1 %.not47.1, label %.lr.ph.1, label %._crit_edge.loopexit.1, !llvm.loop !11

._crit_edge.loopexit.1:                           ; preds = %66
  %68 = trunc nuw nsw i64 %indvars.iv.next.1 to i32
  br label %.loopexit.1

.loopexit.1:                                      ; preds = %54, %._crit_edge.loopexit.1
  %.1.lcssa.1 = phi i32 [ 0, %54 ], [ %68, %._crit_edge.loopexit.1 ]
  %69 = call i32 @fclose(ptr noundef nonnull %47)
  br label %70

70:                                               ; preds = %.loopexit.1, %86
  %.14165 = phi i32 [ 0, %.loopexit.1 ], [ %88, %86 ]
  %71 = call i32 @rand() #7
  %72 = urem i32 %71, %.1.lcssa.1
  %73 = call i32 @rand() #7
  %74 = urem i32 %73, %.1.lcssa.1
  %75 = zext nneg i32 %72 to i64
  %76 = getelementptr inbounds [2000 x ptr], ptr %5, i64 0, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !9
  %78 = zext nneg i32 %74 to i64
  %79 = getelementptr inbounds [2000 x ptr], ptr %5, i64 0, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = call double @jaccard_index(ptr noundef %77, ptr noundef %80, i32 noundef %81) #7
  %83 = fcmp oge double %82, 0.000000e+00
  %84 = fcmp ole double %82, 1.000000e+00
  %or.cond = and i1 %83, %84
  br i1 %or.cond, label %86, label %85

85:                                               ; preds = %70
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 108, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

86:                                               ; preds = %70
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %72, i32 noundef %74, double noundef %82)
  %88 = add nuw nsw i32 %.14165, 1
  %exitcond79.not = icmp eq i32 %88, 1000
  br i1 %exitcond79.not, label %89, label %70, !llvm.loop !14

89:                                               ; preds = %86
  call void @exit(i32 noundef 0) #9
  unreachable

.loopexit75:                                      ; preds = %37, %64, %20, %52, %16, %48, %12, %.loopexit
  %.str.7.sink = phi ptr [ @.str.2, %.loopexit ], [ @.str.2, %12 ], [ @.str.3, %48 ], [ @.str.3, %16 ], [ @.str.4, %52 ], [ @.str.4, %20 ], [ @.str.7, %64 ], [ @.str.7, %37 ]
  %90 = load ptr, ptr @stderr, align 8, !tbaa !9
  %91 = tail call ptr @__errno_location() #10
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = call ptr @strerror(i32 noundef %92) #7
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef nonnull %.str.7.sink, ptr noundef %14, ptr noundef %93) #8
  call void @llvm.lifetime.end.p0(i64 16000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #7
  ret i32 -1
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #5

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

; Function Attrs: nofree nounwind
declare noundef i32 @feof(ptr nocapture noundef) local_unnamed_addr #3

declare ptr @rstrip(ptr noundef) local_unnamed_addr #6

declare i32 @parse_category_set(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

declare ptr @safe_malloc(i64 noundef) local_unnamed_addr #6

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

declare double @jaccard_index(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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

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 = { 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 = { 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 #4 = { noreturn 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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { "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 = { cold nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(none) }

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass