; LLVM IR from stivalaa/EstimNetDirected :: Test/TestChangeStatsAttrBipartite (testStatsSumChangeStatsAttrBipartiteMain)

; 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 [44 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 [37 x i8], align 1
@main.lambda_values = external hidden global [4 x double], align 16
@main.exponent_values = external hidden global [4 x double], align 16
@main.theta = external hidden global [4 x double], align 16
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [136 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 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 i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [4 x i32], align 16
  %21 = alloca [4 x double], align 16
  %22 = alloca [4 x ptr], align 16
  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 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %23 = call i64 @time(ptr noundef null) #7
  %24 = trunc i64 %23 to i32
  call void @srand(i32 noundef %24) #7
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp ne i32 %25, 3
  br i1 %26, label %27, label %33

27:                                               ; preds = %2
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %29, i64 0
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str, ptr noundef %31) #7
  call void @exit(i32 noundef 1) #8
  unreachable

33:                                               ; preds = %2
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 1
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  store ptr %36, ptr %7, align 8, !tbaa !9
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = getelementptr inbounds ptr, ptr %37, i64 2
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  store ptr %39, ptr %12, align 8, !tbaa !9
  %40 = load ptr, ptr %7, align 8, !tbaa !9
  %41 = call noalias ptr @fopen(ptr noundef %40, ptr noundef @.str.1)
  store ptr %41, ptr %8, align 8, !tbaa !9
  %42 = icmp ne ptr %41, null
  br i1 %42, label %50, label %43

43:                                               ; preds = %33
  %44 = load ptr, ptr @stderr, align 8, !tbaa !9
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  %46 = call ptr @__errno_location() #9
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = call ptr @strerror(i32 noundef %47) #7
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str.2, ptr noundef %45, ptr noundef %48) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %168

50:                                               ; preds = %33
  %51 = load ptr, ptr %8, align 8, !tbaa !9
  call void @get_num_vertices_from_bipartite_pajek_file(ptr noundef %51, ptr noundef %9, ptr noundef %10)
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = call ptr @allocate_graph(i32 noundef %52, i32 noundef 0, i32 noundef 1, i32 noundef %53)
  store ptr %54, ptr %11, align 8, !tbaa !9
  %55 = load ptr, ptr %11, align 8, !tbaa !9
  %56 = load ptr, ptr %12, align 8, !tbaa !9
  %57 = call i32 @load_attributes(ptr noundef %55, ptr noundef %56, ptr noundef null, ptr noundef null, ptr noundef null)
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %62

59:                                               ; preds = %50
  %60 = load ptr, ptr @stderr, align 8, !tbaa !9
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.3) #7
  call void @exit(i32 noundef 1) #8
  unreachable

62:                                               ; preds = %50
  %63 = load ptr, ptr %7, align 8, !tbaa !9
  %64 = call noalias ptr @fopen(ptr noundef %63, ptr noundef @.str.1)
  store ptr %64, ptr %8, align 8, !tbaa !9
  %65 = icmp ne ptr %64, null
  br i1 %65, label %73, label %66

66:                                               ; preds = %62
  %67 = load ptr, ptr @stderr, align 8, !tbaa !9
  %68 = load ptr, ptr %7, align 8, !tbaa !9
  %69 = call ptr @__errno_location() #9
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = call ptr @strerror(i32 noundef %70) #7
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.2, ptr noundef %68, ptr noundef %71) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %168

73:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 2, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 4, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 4, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #7
  %74 = getelementptr inbounds [4 x ptr], ptr %22, i64 0, i64 0
  store ptr @changeBipartiteExactlyOneNeighbourA, ptr %74, align 16, !tbaa !9
  %75 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 0
  store i32 1, ptr %75, align 16, !tbaa !5
  %76 = getelementptr inbounds [4 x ptr], ptr %22, i64 0, i64 1
  store ptr @changeBipartiteExactlyOneNeighbourB, ptr %76, align 8, !tbaa !9
  %77 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 1
  store i32 0, ptr %77, align 4, !tbaa !5
  %78 = getelementptr inbounds [4 x ptr], ptr %22, i64 0, i64 2
  store ptr @changeBipartiteTwoPathExactlyOneNeighbourA, ptr %78, align 16, !tbaa !9
  %79 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 2
  store i32 1, ptr %79, align 8, !tbaa !5
  %80 = getelementptr inbounds [4 x ptr], ptr %22, i64 0, i64 3
  store ptr @changeBipartiteTwoPathExactlyOneNeighbourB, ptr %80, align 8, !tbaa !9
  %81 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 3
  store i32 0, ptr %81, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %89, %73
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = icmp ult i32 %83, 4
  br i1 %84, label %85, label %92

85:                                               ; preds = %82
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 %87
  store double 0.000000e+00, ptr %88, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %85
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = add i32 %90, 1
  store i32 %91, ptr %6, align 4, !tbaa !5
  br label %82, !llvm.loop !13

92:                                               ; preds = %82
  %93 = load ptr, ptr %8, align 8, !tbaa !9
  %94 = load ptr, ptr %11, align 8, !tbaa !9
  %95 = load i32, ptr %18, align 4, !tbaa !5
  %96 = load i32, ptr %19, align 4, !tbaa !5
  %97 = getelementptr inbounds [4 x ptr], ptr %22, i64 0, i64 0
  %98 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 0
  %99 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 0
  %100 = call ptr @load_graph_from_arclist_file(ptr noundef %93, ptr noundef %94, i32 noundef 1, i32 noundef %95, i32 noundef %96, i32 noundef 0, i32 noundef 0, ptr noundef null, ptr noundef @main.lambda_values, ptr noundef %97, ptr noundef null, ptr noundef null, ptr noundef %98, ptr noundef @main.exponent_values, ptr noundef null, ptr noundef %99, ptr noundef @main.theta)
  store ptr %100, ptr %11, align 8, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %110, %92
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = icmp ult i32 %102, 4
  br i1 %103, label %104, label %113

104:                                              ; preds = %101
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %108)
  br label %110

110:                                              ; preds = %104
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = add i32 %111, 1
  store i32 %112, ptr %6, align 4, !tbaa !5
  br label %101, !llvm.loop !15

113:                                              ; preds = %101
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %115 = load ptr, ptr %11, align 8, !tbaa !9
  %116 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 0
  %117 = load i32, ptr %116, align 16, !tbaa !5
  %118 = call double @BipartiteExactlyOneNeighbourA(ptr noundef %115, i32 noundef %117)
  store double %118, ptr %13, align 8, !tbaa !11
  %119 = load double, ptr %13, align 8, !tbaa !11
  %120 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 0
  %121 = load double, ptr %120, align 16, !tbaa !11
  %122 = fsub double %119, %121
  %123 = call double @llvm.fabs.f64(double %122)
  %124 = fcmp ole double %123, 0x3CB0000000000000
  br i1 %124, label %125, label %126

125:                                              ; preds = %113
  br label %127

126:                                              ; preds = %113
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 139, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

127:                                              ; preds = %125
  %128 = load ptr, ptr %11, align 8, !tbaa !9
  %129 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 1
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = call double @BipartiteExactlyOneNeighbourB(ptr noundef %128, i32 noundef %130)
  store double %131, ptr %13, align 8, !tbaa !11
  %132 = load double, ptr %13, align 8, !tbaa !11
  %133 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 1
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = fsub double %132, %134
  %136 = call double @llvm.fabs.f64(double %135)
  %137 = fcmp ole double %136, 0x3CB0000000000000
  br i1 %137, label %138, label %139

138:                                              ; preds = %127
  br label %140

139:                                              ; preds = %127
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.7, i32 noundef 142, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

140:                                              ; preds = %138
  %141 = load ptr, ptr %11, align 8, !tbaa !9
  %142 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 2
  %143 = load i32, ptr %142, align 8, !tbaa !5
  %144 = call double @BipartiteTwoPathExactlyOneNeighbourA(ptr noundef %141, i32 noundef %143)
  store double %144, ptr %13, align 8, !tbaa !11
  %145 = load double, ptr %13, align 8, !tbaa !11
  %146 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 2
  %147 = load double, ptr %146, align 16, !tbaa !11
  %148 = fsub double %145, %147
  %149 = call double @llvm.fabs.f64(double %148)
  %150 = fcmp ole double %149, 0x3CB0000000000000
  br i1 %150, label %151, label %152

151:                                              ; preds = %140
  br label %153

152:                                              ; preds = %140
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.7, i32 noundef 145, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

153:                                              ; preds = %151
  %154 = load ptr, ptr %11, align 8, !tbaa !9
  %155 = getelementptr inbounds [4 x i32], ptr %20, i64 0, i64 3
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = call double @BipartiteTwoPathExactlyOneNeighbourB(ptr noundef %154, i32 noundef %156)
  store double %157, ptr %13, align 8, !tbaa !11
  %158 = load double, ptr %13, align 8, !tbaa !11
  %159 = getelementptr inbounds [4 x double], ptr %21, i64 0, i64 3
  %160 = load double, ptr %159, align 8, !tbaa !11
  %161 = fsub double %158, %160
  %162 = call double @llvm.fabs.f64(double %161)
  %163 = fcmp ole double %162, 0x3CB0000000000000
  br i1 %163, label %164, label %165

164:                                              ; preds = %153
  br label %166

165:                                              ; preds = %153
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.7, i32 noundef 148, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

166:                                              ; preds = %164
  %167 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free_graph(ptr noundef %167)
  call void @exit(i32 noundef 0) #8
  unreachable

168:                                              ; preds = %66, %43
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %169 = load i32, ptr %3, align 4
  ret i32 %169
}

; 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 void @get_num_vertices_from_bipartite_pajek_file(ptr noundef, ptr noundef, ptr noundef) #4

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #6

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

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

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

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

declare void @free_graph(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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 [44 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 [37 x i8], align 1
@main.lambda_values = external hidden global [4 x double], align 16
@main.exponent_values = external hidden global [4 x double], align 16
@main.theta = external hidden global [4 x double], align 16
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [136 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [4 x i32], align 16
  %6 = alloca [4 x double], align 16
  %7 = alloca [4 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 0, ptr %4, align 4, !tbaa !5
  %8 = tail call i64 @time(ptr noundef null) #9
  %9 = trunc i64 %8 to i32
  tail call void @srand(i32 noundef %9) #9
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %14, label %10

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

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = tail call noalias ptr @fopen(ptr noundef %16, ptr noundef nonnull @.str.1)
  %.not32 = icmp eq ptr %19, null
  br i1 %.not32, label %20, label %26

20:                                               ; preds = %14
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = tail call ptr @__errno_location() #12
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = tail call ptr @strerror(i32 noundef %23) #9
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.2, ptr noundef %16, ptr noundef %24) #10
  br label %94

26:                                               ; preds = %14
  call void @get_num_vertices_from_bipartite_pajek_file(ptr noundef nonnull %19, ptr noundef nonnull %3, ptr noundef nonnull %4) #9
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = call ptr @allocate_graph(i32 noundef %27, i32 noundef 0, i32 noundef 1, i32 noundef %28) #9
  %30 = call i32 @load_attributes(ptr noundef %29, ptr noundef %18, ptr noundef null, ptr noundef null, ptr noundef null) #9
  %.not33 = icmp eq i32 %30, 0
  br i1 %.not33, label %34, label %31

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

34:                                               ; preds = %26
  %35 = call noalias ptr @fopen(ptr noundef %16, ptr noundef nonnull @.str.1)
  %.not34 = icmp eq ptr %35, null
  br i1 %.not34, label %36, label %42

36:                                               ; preds = %34
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = tail call ptr @__errno_location() #12
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = call ptr @strerror(i32 noundef %39) #9
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.2, ptr noundef %16, ptr noundef %40) #10
  br label %94

42:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  store ptr @changeBipartiteExactlyOneNeighbourA, ptr %7, align 16, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr @changeBipartiteExactlyOneNeighbourB, ptr %43, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr @changeBipartiteTwoPathExactlyOneNeighbourA, ptr %44, align 16, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %5, i64 8
  %46 = getelementptr inbounds i8, ptr %7, i64 24
  store ptr @changeBipartiteTwoPathExactlyOneNeighbourB, ptr %46, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %5, i64 12
  store <4 x i32> <i32 1, i32 0, i32 1, i32 0>, ptr %5, align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, i8 0, i64 32, i1 false), !tbaa !11
  %48 = call ptr @load_graph_from_arclist_file(ptr noundef nonnull %35, ptr noundef %29, i32 noundef 1, i32 noundef 4, i32 noundef 4, i32 noundef 0, i32 noundef 0, ptr noundef null, ptr noundef nonnull @main.lambda_values, ptr noundef nonnull %7, ptr noundef null, ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull @main.exponent_values, ptr noundef null, ptr noundef nonnull %6, ptr noundef nonnull @main.theta) #9
  %49 = load double, ptr %6, align 16, !tbaa !11
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %49)
  %51 = getelementptr inbounds i8, ptr %6, i64 8
  %52 = load double, ptr %51, align 8, !tbaa !11
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %52)
  %54 = getelementptr inbounds i8, ptr %6, i64 16
  %55 = load double, ptr %54, align 16, !tbaa !11
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %55)
  %57 = getelementptr inbounds i8, ptr %6, i64 24
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %58)
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %61 = load i32, ptr %5, align 16, !tbaa !5
  %62 = call double @BipartiteExactlyOneNeighbourA(ptr noundef %48, i32 noundef %61) #9
  %63 = load double, ptr %6, align 16, !tbaa !11
  %64 = fsub double %62, %63
  %65 = call double @llvm.fabs.f64(double %64)
  %66 = fcmp ugt double %65, 0x3CB0000000000000
  br i1 %66, label %67, label %68

67:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 139, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

68:                                               ; preds = %42
  %69 = getelementptr inbounds i8, ptr %5, i64 4
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = call double @BipartiteExactlyOneNeighbourB(ptr noundef %48, i32 noundef %70) #9
  %72 = load double, ptr %51, align 8, !tbaa !11
  %73 = fsub double %71, %72
  %74 = call double @llvm.fabs.f64(double %73)
  %75 = fcmp ugt double %74, 0x3CB0000000000000
  br i1 %75, label %76, label %77

76:                                               ; preds = %68
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.7, i32 noundef 142, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

77:                                               ; preds = %68
  %78 = load i32, ptr %45, align 8, !tbaa !5
  %79 = call double @BipartiteTwoPathExactlyOneNeighbourA(ptr noundef %48, i32 noundef %78) #9
  %80 = load double, ptr %54, align 16, !tbaa !11
  %81 = fsub double %79, %80
  %82 = call double @llvm.fabs.f64(double %81)
  %83 = fcmp ugt double %82, 0x3CB0000000000000
  br i1 %83, label %84, label %85

84:                                               ; preds = %77
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.7, i32 noundef 145, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

85:                                               ; preds = %77
  %86 = load i32, ptr %47, align 4, !tbaa !5
  %87 = call double @BipartiteTwoPathExactlyOneNeighbourB(ptr noundef %48, i32 noundef %86) #9
  %88 = load double, ptr %57, align 8, !tbaa !11
  %89 = fsub double %87, %88
  %90 = call double @llvm.fabs.f64(double %89)
  %91 = fcmp ugt double %90, 0x3CB0000000000000
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.7, i32 noundef 148, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #11
  unreachable

93:                                               ; preds = %85
  call void @free_graph(ptr noundef %48) #9
  call void @exit(i32 noundef 0) #11
  unreachable

94:                                               ; preds = %36, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  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

declare void @get_num_vertices_from_bipartite_pajek_file(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

declare double @changeBipartiteExactlyOneNeighbourA(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) #6

declare double @changeBipartiteExactlyOneNeighbourB(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) #6

declare double @changeBipartiteTwoPathExactlyOneNeighbourA(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) #6

declare double @changeBipartiteTwoPathExactlyOneNeighbourB(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, double noundef) #6

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #7

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

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

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

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

declare void @free_graph(ptr noundef) local_unnamed_addr #6

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

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

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { 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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopIdiomRecognizePass,LoopRotatePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass