; LLVM IR from siconos/siconos :: externals/lbl/example (example)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.LBL_Data = type { ptr, ptr, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %12 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %12, ptr %8, align 8, !tbaa !9
  %13 = call noalias ptr @fopen(ptr noundef @.str.2, ptr noundef @.str.3)
  store ptr %13, ptr %9, align 8, !tbaa !9
  %14 = load ptr, ptr %9, align 8, !tbaa !9
  %15 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %14, ptr noundef @.str.4, ptr noundef %4, ptr noundef %5)
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !9
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = call ptr @LBL_Initialize(i32 noundef %16, i32 noundef %17, ptr noundef %18, i32 noundef %19)
  store ptr %20, ptr %2, align 8, !tbaa !9
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = call ptr @LBL_Calloc(i32 noundef %21, i64 noundef 8)
  store ptr %22, ptr %6, align 8, !tbaa !9
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = call ptr @LBL_Calloc(i32 noundef %23, i64 noundef 8)
  store ptr %24, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %48, %0
  %26 = load i32, ptr %10, align 4, !tbaa !5
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %29, label %51

29:                                               ; preds = %25
  %30 = load ptr, ptr %9, align 8, !tbaa !9
  %31 = load ptr, ptr %2, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.LBL_Data, ptr %31, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = load i32, ptr %10, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %33, i64 %35
  %37 = load ptr, ptr %2, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.LBL_Data, ptr %37, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %39, i64 %41
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds double, ptr %43, i64 %45
  %47 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %30, ptr noundef @.str.5, ptr noundef %36, ptr noundef %42, ptr noundef %46)
  br label %48

48:                                               ; preds = %29
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %10, align 4, !tbaa !5
  br label %25, !llvm.loop !14

51:                                               ; preds = %25
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %63, %51
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %66

56:                                               ; preds = %52
  %57 = load ptr, ptr %9, align 8, !tbaa !9
  %58 = load ptr, ptr %7, align 8, !tbaa !9
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %58, i64 %60
  %62 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %57, ptr noundef @.str.6, ptr noundef %61)
  br label %63

63:                                               ; preds = %56
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %10, align 4, !tbaa !5
  br label %52, !llvm.loop !16

66:                                               ; preds = %52
  %67 = load ptr, ptr %9, align 8, !tbaa !9
  %68 = call i32 @fclose(ptr noundef %67)
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %95, %66
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %98

74:                                               ; preds = %70
  %75 = load ptr, ptr %2, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.LBL_Data, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = load ptr, ptr %2, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.LBL_Data, ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !13
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !9
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !17
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %81, i32 noundef %88, double noundef %93)
  br label %95

95:                                               ; preds = %74
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %10, align 4, !tbaa !5
  br label %70, !llvm.loop !19

98:                                               ; preds = %70
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %111, %98
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %104, label %114

104:                                              ; preds = %100
  %105 = load ptr, ptr %7, align 8, !tbaa !9
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !17
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %109)
  br label %111

111:                                              ; preds = %104
  %112 = load i32, ptr %10, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %10, align 4, !tbaa !5
  br label %100, !llvm.loop !20

114:                                              ; preds = %100
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %116 = load ptr, ptr %2, align 8, !tbaa !9
  call void @LBL_set_int_parm(ptr noundef %116, i32 noundef 3, i32 noundef 0)
  %117 = load ptr, ptr %2, align 8, !tbaa !9
  call void @LBL_set_int_parm(ptr noundef %117, i32 noundef 2, i32 noundef 1)
  %118 = load ptr, ptr %2, align 8, !tbaa !9
  call void @LBL_set_real_parm(ptr noundef %118, i32 noundef 4, double noundef 5.000000e-01)
  %119 = load ptr, ptr %2, align 8, !tbaa !9
  %120 = call i32 @LBL_Analyze(ptr noundef %119, i32 noundef 0)
  store i32 %120, ptr %11, align 4, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %127

123:                                              ; preds = %114
  %124 = load ptr, ptr @stderr, align 8, !tbaa !9
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.12, i32 noundef %125) #4
  br label %165

127:                                              ; preds = %114
  %128 = load ptr, ptr %2, align 8, !tbaa !9
  %129 = load ptr, ptr %6, align 8, !tbaa !9
  %130 = call i32 @LBL_Factorize(ptr noundef %128, ptr noundef %129)
  store i32 %130, ptr %11, align 4, !tbaa !5
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %137

133:                                              ; preds = %127
  %134 = load ptr, ptr @stderr, align 8, !tbaa !9
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.13, i32 noundef %135) #4
  br label %165

137:                                              ; preds = %127
  %138 = load ptr, ptr %2, align 8, !tbaa !9
  %139 = load ptr, ptr %7, align 8, !tbaa !9
  %140 = call i32 @LBL_Solve(ptr noundef %138, ptr noundef %139)
  store i32 %140, ptr %11, align 4, !tbaa !5
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %147

143:                                              ; preds = %137
  %144 = load ptr, ptr @stderr, align 8, !tbaa !9
  %145 = load i32, ptr %11, align 4, !tbaa !5
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.14, i32 noundef %145) #4
  br label %165

147:                                              ; preds = %137
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %160, %147
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = load i32, ptr %4, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %153, label %163

153:                                              ; preds = %149
  %154 = load ptr, ptr %7, align 8, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds double, ptr %154, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !17
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %158)
  br label %160

160:                                              ; preds = %153
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %10, align 4, !tbaa !5
  br label %149, !llvm.loop !21

163:                                              ; preds = %149
  %164 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  br label %165

165:                                              ; preds = %163, %143, %133, %123
  %166 = load ptr, ptr %2, align 8, !tbaa !9
  call void @LBL_Finalize(ptr noundef %166)
  %167 = load ptr, ptr %8, align 8, !tbaa !9
  %168 = call i32 @fclose(ptr noundef %167)
  call void @LBL_Free_Object(ptr noundef %6)
  call void @LBL_Free_Object(ptr noundef %7)
  %169 = load i32, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #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

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

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

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

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

declare i32 @fclose(ptr noundef) #2

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

declare void @LBL_set_int_parm(ptr noundef, i32 noundef, i32 noundef) #2

declare void @LBL_set_real_parm(ptr noundef, i32 noundef, double noundef) #2

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

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

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

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

declare void @LBL_Finalize(ptr noundef) #2

declare void @LBL_Free_Object(ptr noundef) #2

; 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"LBL_Data", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!12, !10, i64 32}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}


; 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 [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %5 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %6 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3)
  %7 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %6, ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %2) #4
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = call ptr @LBL_Initialize(i32 noundef %8, i32 noundef %9, ptr noundef %5, i32 noundef 1) #4
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = call ptr @LBL_Calloc(i32 noundef %11, i64 noundef 8) #4
  store ptr %12, ptr %3, align 8, !tbaa !9
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = call ptr @LBL_Calloc(i32 noundef %13, i64 noundef 8) #4
  store ptr %14, ptr %4, align 8, !tbaa !9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %0
  %17 = getelementptr inbounds i8, ptr %10, i64 24
  %18 = getelementptr inbounds i8, ptr %10, i64 32
  br label %21

.preheader:                                       ; preds = %21, %0
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph52, label %._crit_edge

21:                                               ; preds = %.lr.ph, %21
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %21 ]
  %22 = load ptr, ptr %17, align 8, !tbaa !11
  %23 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv
  %24 = load ptr, ptr %18, align 8, !tbaa !13
  %25 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv
  %26 = getelementptr inbounds double, ptr %12, i64 %indvars.iv
  %27 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %6, ptr noundef nonnull @.str.5, ptr noundef %23, ptr noundef %25, ptr noundef %26) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %21, label %.preheader, !llvm.loop !14

.lr.ph52:                                         ; preds = %.preheader, %.lr.ph52
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %.lr.ph52 ], [ 0, %.preheader ]
  %31 = getelementptr inbounds double, ptr %14, i64 %indvars.iv66
  %32 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %6, ptr noundef nonnull @.str.6, ptr noundef %31) #4
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %indvars.iv.next67, %34
  br i1 %35, label %.lr.ph52, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph52, %.preheader
  %36 = call i32 @fclose(ptr noundef %6)
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph55, label %._crit_edge56

.lr.ph55:                                         ; preds = %._crit_edge
  %40 = getelementptr inbounds i8, ptr %10, i64 24
  %41 = getelementptr inbounds i8, ptr %10, i64 32
  br label %42

42:                                               ; preds = %.lr.ph55, %42
  %indvars.iv69 = phi i64 [ 0, %.lr.ph55 ], [ %indvars.iv.next70, %42 ]
  %43 = load ptr, ptr %40, align 8, !tbaa !11
  %44 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv69
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load ptr, ptr %41, align 8, !tbaa !13
  %47 = getelementptr inbounds i32, ptr %46, i64 %indvars.iv69
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = getelementptr inbounds double, ptr %12, i64 %indvars.iv69
  %50 = load double, ptr %49, align 8, !tbaa !17
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %45, i32 noundef %48, double noundef %50)
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next70, %53
  br i1 %54, label %42, label %._crit_edge56, !llvm.loop !19

._crit_edge56:                                    ; preds = %42, %._crit_edge
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph59, label %._crit_edge60

.lr.ph59:                                         ; preds = %._crit_edge56, %.lr.ph59
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %.lr.ph59 ], [ 0, %._crit_edge56 ]
  %58 = getelementptr inbounds double, ptr %14, i64 %indvars.iv72
  %59 = load double, ptr %58, align 8, !tbaa !17
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %59)
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next73, %62
  br i1 %63, label %.lr.ph59, label %._crit_edge60, !llvm.loop !20

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge56
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  call void @LBL_set_int_parm(ptr noundef %10, i32 noundef 3, i32 noundef 0) #4
  call void @LBL_set_int_parm(ptr noundef %10, i32 noundef 2, i32 noundef 1) #4
  call void @LBL_set_real_parm(ptr noundef %10, i32 noundef 4, double noundef 5.000000e-01) #4
  %65 = call i32 @LBL_Analyze(ptr noundef %10, i32 noundef 0) #4
  %.not = icmp eq i32 %65, 0
  br i1 %.not, label %69, label %66

66:                                               ; preds = %._crit_edge60
  %67 = load ptr, ptr @stderr, align 8, !tbaa !9
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.12, i32 noundef %65) #5
  br label %90

69:                                               ; preds = %._crit_edge60
  %70 = call i32 @LBL_Factorize(ptr noundef %10, ptr noundef %12) #4
  %.not48 = icmp eq i32 %70, 0
  br i1 %.not48, label %74, label %71

71:                                               ; preds = %69
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.13, i32 noundef %70) #5
  br label %90

74:                                               ; preds = %69
  %75 = call i32 @LBL_Solve(ptr noundef %10, ptr noundef %14) #4
  %.not49 = icmp eq i32 %75, 0
  br i1 %.not49, label %79, label %76

76:                                               ; preds = %74
  %77 = load ptr, ptr @stderr, align 8, !tbaa !9
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.14, i32 noundef %75) #5
  br label %90

79:                                               ; preds = %74
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.lr.ph63, label %._crit_edge64

.lr.ph63:                                         ; preds = %79, %.lr.ph63
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.lr.ph63 ], [ 0, %79 ]
  %83 = getelementptr inbounds double, ptr %14, i64 %indvars.iv75
  %84 = load double, ptr %83, align 8, !tbaa !17
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %84)
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %86 = load i32, ptr %1, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = icmp slt i64 %indvars.iv.next76, %87
  br i1 %88, label %.lr.ph63, label %._crit_edge64, !llvm.loop !21

._crit_edge64:                                    ; preds = %.lr.ph63, %79
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %90

90:                                               ; preds = %._crit_edge64, %76, %71, %66
  %.0 = phi i32 [ %65, %66 ], [ %70, %71 ], [ %75, %76 ], [ 0, %._crit_edge64 ]
  call void @LBL_Finalize(ptr noundef %10) #4
  %91 = call i32 @fclose(ptr noundef %5)
  call void @LBL_Free_Object(ptr noundef nonnull %3) #4
  call void @LBL_Free_Object(ptr noundef nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 %.0
}

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

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

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

declare ptr @LBL_Calloc(i32 noundef, i64 noundef) local_unnamed_addr #3

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

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

declare void @LBL_set_int_parm(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @LBL_set_real_parm(ptr noundef, i32 noundef, double noundef) local_unnamed_addr #3

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

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

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

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

declare void @LBL_Finalize(ptr noundef) local_unnamed_addr #3

declare void @LBL_Free_Object(ptr noundef) local_unnamed_addr #3

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 }
attributes #5 = { cold nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"LBL_Data", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!12, !10, i64 32}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}


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