; LLVM IR from stivalaa/EstimNetDirected :: Test/TestChangeStatsUndirected (testStatsSumChangeStatsUndirectedMain)

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

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

25:                                               ; preds = %37, %2
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = call i32 @getopt(i32 noundef %26, ptr noundef %27, ptr noundef @.str) #7
  store i32 %28, ptr %6, align 4, !tbaa !5
  %29 = icmp ne i32 %28, -1
  br i1 %29, label %30, label %38

30:                                               ; preds = %25
  %31 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %31, label %33 [
    i32 115, label %32
  ]

32:                                               ; preds = %30
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %37

33:                                               ; preds = %30
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 0
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  call void @usage(ptr noundef %36)
  br label %37

37:                                               ; preds = %33, %32
  br label %25, !llvm.loop !11

38:                                               ; preds = %25
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = load i32, ptr @optind, align 4, !tbaa !5
  %41 = sub nsw i32 %39, %40
  %42 = icmp ne i32 %41, 2
  br i1 %42, label %43, label %47

43:                                               ; preds = %38
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 0
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  call void @usage(ptr noundef %46)
  br label %47

47:                                               ; preds = %43, %38
  %48 = load i32, ptr %18, align 4, !tbaa !5
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  %50 = load i32, ptr @optind, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds ptr, ptr %49, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  store ptr %53, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = load i32, ptr @optind, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds ptr, ptr %54, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = call double @strtod(ptr noundef %59, ptr noundef %17) #7
  store double %60, ptr %16, align 8, !tbaa !13
  %61 = load double, ptr %16, align 8, !tbaa !13
  %62 = fcmp ole double %61, 1.000000e+00
  br i1 %62, label %63, label %67

63:                                               ; preds = %47
  %64 = load ptr, ptr @stderr, align 8, !tbaa !9
  %65 = load double, ptr %16, align 8, !tbaa !13
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.1, double noundef %65) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %174

67:                                               ; preds = %47
  %68 = load ptr, ptr %8, align 8, !tbaa !9
  %69 = call noalias ptr @fopen(ptr noundef %68, ptr noundef @.str.2)
  store ptr %69, ptr %9, align 8, !tbaa !9
  %70 = icmp ne ptr %69, null
  br i1 %70, label %78, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = load ptr, ptr %8, align 8, !tbaa !9
  %74 = call ptr @__errno_location() #8
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = call ptr @strerror(i32 noundef %75) #7
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.3, ptr noundef %73, ptr noundef %76) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %174

78:                                               ; preds = %67
  %79 = load ptr, ptr %9, align 8, !tbaa !9
  %80 = call i32 @get_num_vertices_from_arclist_file(ptr noundef %79)
  store i32 %80, ptr %10, align 4, !tbaa !5
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !5
  %83 = call ptr @allocate_graph(i32 noundef %81, i32 noundef 0, i32 noundef 0, i32 noundef %82)
  store ptr %83, ptr %12, align 8, !tbaa !9
  %84 = load ptr, ptr %8, align 8, !tbaa !9
  %85 = call noalias ptr @fopen(ptr noundef %84, ptr noundef @.str.2)
  store ptr %85, ptr %9, align 8, !tbaa !9
  %86 = icmp ne ptr %85, null
  br i1 %86, label %94, label %87

87:                                               ; preds = %78
  %88 = load ptr, ptr @stderr, align 8, !tbaa !9
  %89 = load ptr, ptr %8, align 8, !tbaa !9
  %90 = call ptr @__errno_location() #8
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = call ptr @strerror(i32 noundef %91) #7
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.3, ptr noundef %89, ptr noundef %92) #7
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %19, align 4
  br label %174

94:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 2, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %95 = getelementptr inbounds [2 x ptr], ptr %22, i64 0, i64 0
  store ptr @changeFourCycles, ptr %95, align 16, !tbaa !9
  store double 0.000000e+00, ptr @main.lambda_values, align 16, !tbaa !13
  %96 = getelementptr inbounds [2 x ptr], ptr %22, i64 0, i64 1
  store ptr @changePowerFourCycles, ptr %96, align 8, !tbaa !9
  %97 = load double, ptr %16, align 8, !tbaa !13
  store double %97, ptr getelementptr inbounds ([2 x double], ptr @main.lambda_values, i64 0, i64 1), align 8, !tbaa !13
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %105, %94
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = icmp ult i32 %99, 2
  br i1 %100, label %101, label %108

101:                                              ; preds = %98
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 %103
  store double 0.000000e+00, ptr %104, align 8, !tbaa !13
  br label %105

105:                                              ; preds = %101
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = add i32 %106, 1
  store i32 %107, ptr %7, align 4, !tbaa !5
  br label %98, !llvm.loop !15

108:                                              ; preds = %98
  %109 = load ptr, ptr %9, align 8, !tbaa !9
  %110 = load ptr, ptr %12, align 8, !tbaa !9
  %111 = load i32, ptr %20, align 4, !tbaa !5
  %112 = getelementptr inbounds [2 x ptr], ptr %22, i64 0, i64 0
  %113 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 0
  %114 = call ptr @load_graph_from_arclist_file(ptr noundef %109, ptr noundef %110, i32 noundef 1, i32 noundef %111, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef %112, ptr noundef @main.lambda_values, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef %113, ptr noundef @main.theta)
  store ptr %114, ptr %12, align 8, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %124, %108
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = icmp ult i32 %116, 2
  br i1 %117, label %118, label %127

118:                                              ; preds = %115
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !13
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %122)
  br label %124

124:                                              ; preds = %118
  %125 = load i32, ptr %7, align 4, !tbaa !5
  %126 = add i32 %125, 1
  store i32 %126, ptr %7, align 4, !tbaa !5
  br label %115, !llvm.loop !16

127:                                              ; preds = %115
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %129 = load ptr, ptr %12, align 8, !tbaa !9
  %130 = call i64 @FourCycles(ptr noundef %129)
  store i64 %130, ptr %14, align 8, !tbaa !17
  %131 = load ptr, ptr %12, align 8, !tbaa !9
  %132 = call i64 @FourCycles_sum_by_node(ptr noundef %131)
  store i64 %132, ptr %15, align 8, !tbaa !17
  %133 = load i64, ptr %14, align 8, !tbaa !17
  %134 = load i64, ptr %15, align 8, !tbaa !17
  %135 = icmp eq i64 %133, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %127
  br label %138

137:                                              ; preds = %127
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 148, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

138:                                              ; preds = %136
  %139 = load i64, ptr %14, align 8, !tbaa !17
  %140 = uitofp i64 %139 to double
  %141 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 0
  %142 = load double, ptr %141, align 16, !tbaa !13
  %143 = fsub double %140, %142
  %144 = call double @llvm.fabs.f64(double %143)
  %145 = fcmp ole double %144, 0x3EB0C6F7A0B5ED8D
  br i1 %145, label %146, label %147

146:                                              ; preds = %138
  br label %148

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

148:                                              ; preds = %146
  %149 = load ptr, ptr %12, align 8, !tbaa !9
  %150 = load double, ptr getelementptr inbounds ([2 x double], ptr @main.lambda_values, i64 0, i64 1), align 8, !tbaa !13
  %151 = call double @PowerFourCycles(ptr noundef %149, double noundef %150)
  store double %151, ptr %13, align 8, !tbaa !13
  %152 = load ptr, ptr @stderr, align 8, !tbaa !9
  %153 = load double, ptr %13, align 8, !tbaa !13
  %154 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 1
  %155 = load double, ptr %154, align 8, !tbaa !13
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef @.str.9, double noundef %153, double noundef %155) #7
  %157 = load ptr, ptr @stderr, align 8, !tbaa !9
  %158 = load double, ptr %13, align 8, !tbaa !13
  %159 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 1
  %160 = load double, ptr %159, align 8, !tbaa !13
  %161 = fsub double %158, %160
  %162 = call double @llvm.fabs.f64(double %161)
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.10, double noundef %162) #7
  %164 = load double, ptr %13, align 8, !tbaa !13
  %165 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 1
  %166 = load double, ptr %165, align 8, !tbaa !13
  %167 = fsub double %164, %166
  %168 = call double @llvm.fabs.f64(double %167)
  %169 = fcmp ole double %168, 0x3EB0C6F7A0B5ED8D
  br i1 %169, label %170, label %171

170:                                              ; preds = %148
  br label %172

171:                                              ; preds = %148
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.7, i32 noundef 154, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

172:                                              ; preds = %170
  %173 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free_graph(ptr noundef %173)
  call void @exit(i32 noundef 0) #9
  unreachable

174:                                              ; preds = %87, %71, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  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 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %175 = load i32, ptr %3, align 4
  ret i32 %175
}

; 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 @getopt(i32 noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind
declare double @strtod(ptr noundef, ptr noundef) #2

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

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

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

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

declare i32 @get_num_vertices_from_arclist_file(ptr noundef) #3

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

declare double @changeFourCycles(ptr noundef, i32 noundef, i32 noundef, double noundef) #3

declare double @changePowerFourCycles(ptr noundef, i32 noundef, i32 noundef, double noundef) #3

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) #3

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

declare i64 @FourCycles(ptr noundef) #3

declare i64 @FourCycles_sum_by_node(ptr noundef) #3

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

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

declare double @PowerFourCycles(ptr noundef, double noundef) #3

declare void @free_graph(ptr noundef) #3

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { noreturn 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}


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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@main.lambda_values = external hidden global [2 x double], align 16
@main.theta = external hidden global [2 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 [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca [2 x double], align 16
  %5 = alloca [2 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  %6 = tail call i64 @time(ptr noundef null) #10
  %7 = trunc i64 %6 to i32
  tail call void @srand(i32 noundef %7) #10
  br label %8

8:                                                ; preds = %.backedge, %2
  %9 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #10
  switch i32 %9, label %10 [
    i32 -1, label %12
    i32 115, label %.backedge
  ]

.backedge:                                        ; preds = %8, %10
  br label %8, !llvm.loop !5

10:                                               ; preds = %8
  %11 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %11)
  br label %.backedge

12:                                               ; preds = %8
  %13 = load i32, ptr @optind, align 4, !tbaa !11
  %14 = sub nsw i32 %0, %13
  %.not46 = icmp eq i32 %14, 2
  br i1 %.not46, label %17, label %15

15:                                               ; preds = %12
  %16 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %16)
  %.pre = load i32, ptr @optind, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %15, %12
  %18 = phi i32 [ %.pre, %15 ], [ %13, %12 ]
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds ptr, ptr %1, i64 %19
  %21 = load ptr, ptr %20, align 8, !tbaa !7
  %22 = getelementptr i8, ptr %20, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !7
  %24 = call double @strtod(ptr noundef %23, ptr noundef nonnull %3) #10
  %25 = fcmp ugt double %24, 1.000000e+00
  br i1 %25, label %29, label %26

26:                                               ; preds = %17
  %27 = load ptr, ptr @stderr, align 8, !tbaa !7
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.1, double noundef %24) #11
  br label %84

29:                                               ; preds = %17
  %30 = tail call noalias ptr @fopen(ptr noundef %21, ptr noundef nonnull @.str.2)
  %.not47 = icmp eq ptr %30, null
  br i1 %.not47, label %31, label %37

31:                                               ; preds = %29
  %32 = load ptr, ptr @stderr, align 8, !tbaa !7
  %33 = tail call ptr @__errno_location() #12
  %34 = load i32, ptr %33, align 4, !tbaa !11
  %35 = tail call ptr @strerror(i32 noundef %34) #10
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.3, ptr noundef %21, ptr noundef %35) #11
  br label %84

37:                                               ; preds = %29
  %38 = tail call i32 @get_num_vertices_from_arclist_file(ptr noundef nonnull %30) #10
  %39 = tail call ptr @allocate_graph(i32 noundef %38, i32 noundef 0, i32 noundef 0, i32 noundef 0) #10
  %40 = tail call noalias ptr @fopen(ptr noundef %21, ptr noundef nonnull @.str.2)
  %.not48 = icmp eq ptr %40, null
  br i1 %.not48, label %41, label %47

41:                                               ; preds = %37
  %42 = load ptr, ptr @stderr, align 8, !tbaa !7
  %43 = tail call ptr @__errno_location() #12
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = tail call ptr @strerror(i32 noundef %44) #10
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.3, ptr noundef %21, ptr noundef %45) #11
  br label %84

47:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #10
  store ptr @changeFourCycles, ptr %5, align 16, !tbaa !7
  store double 0.000000e+00, ptr @main.lambda_values, align 16, !tbaa !13
  %48 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @changePowerFourCycles, ptr %48, align 8, !tbaa !7
  store double %24, ptr getelementptr inbounds (i8, ptr @main.lambda_values, i64 8), align 8, !tbaa !13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false), !tbaa !13
  %49 = call ptr @load_graph_from_arclist_file(ptr noundef nonnull %40, ptr noundef %39, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef nonnull %5, ptr noundef nonnull @main.lambda_values, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef nonnull %4, ptr noundef nonnull @main.theta) #10
  %50 = load double, ptr %4, align 16, !tbaa !13
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %50)
  %52 = getelementptr inbounds i8, ptr %4, i64 8
  %53 = load double, ptr %52, align 8, !tbaa !13
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %53)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %56 = call i64 @FourCycles(ptr noundef %49) #10
  %57 = call i64 @FourCycles_sum_by_node(ptr noundef %49) #10
  %58 = icmp eq i64 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %47
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 148, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #13
  unreachable

60:                                               ; preds = %47
  %61 = uitofp i64 %56 to double
  %62 = load double, ptr %4, align 16, !tbaa !13
  %63 = fsub double %61, %62
  %64 = call double @llvm.fabs.f64(double %63)
  %65 = fcmp ugt double %64, 0x3EB0C6F7A0B5ED8D
  br i1 %65, label %66, label %67

66:                                               ; preds = %60
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.7, i32 noundef 149, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #13
  unreachable

67:                                               ; preds = %60
  %68 = load double, ptr getelementptr inbounds (i8, ptr @main.lambda_values, i64 8), align 8, !tbaa !13
  %69 = call double @PowerFourCycles(ptr noundef %49, double noundef %68) #10
  %70 = load ptr, ptr @stderr, align 8, !tbaa !7
  %71 = load double, ptr %52, align 8, !tbaa !13
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull @.str.9, double noundef %69, double noundef %71) #11
  %73 = load ptr, ptr @stderr, align 8, !tbaa !7
  %74 = load double, ptr %52, align 8, !tbaa !13
  %75 = fsub double %69, %74
  %76 = call double @llvm.fabs.f64(double %75)
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.10, double noundef %76) #11
  %78 = load double, ptr %52, align 8, !tbaa !13
  %79 = fsub double %69, %78
  %80 = call double @llvm.fabs.f64(double %79)
  %81 = fcmp ugt double %80, 0x3EB0C6F7A0B5ED8D
  br i1 %81, label %82, label %83

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

83:                                               ; preds = %67
  call void @free_graph(ptr noundef %49) #10
  call void @exit(i32 noundef 0) #13
  unreachable

84:                                               ; preds = %41, %31, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  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: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn
declare double @strtod(ptr noundef readonly, ptr nocapture noundef) local_unnamed_addr #3

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

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

; 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 i32 @get_num_vertices_from_arclist_file(ptr noundef) local_unnamed_addr #6

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

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

declare double @changePowerFourCycles(ptr 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 #4

declare i64 @FourCycles(ptr noundef) local_unnamed_addr #6

declare i64 @FourCycles_sum_by_node(ptr noundef) local_unnamed_addr #6

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

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

declare double @PowerFourCycles(ptr noundef, double noundef) local_unnamed_addr #6

declare void @free_graph(ptr noundef) local_unnamed_addr #6

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

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

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 = { mustprogress nofree nounwind willreturn "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 = { 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 = { 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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { nounwind }
attributes #11 = { cold nounwind }
attributes #12 = { nounwind willreturn memory(none) }
attributes #13 = { noreturn 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !9, i64 0}


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