; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_MatNd)

; 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._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [59 x i8], align 1
@__func__.MatNd_lineSearchArmijo = external hidden unnamed_addr constant [23 x i8], align 1
@.str.191 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.192 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare void @print_trace() #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) #5

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_copy(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_constMulAndAdd(ptr noundef, ptr noundef, ptr noundef, double noundef) #5

; Function Attrs: nounwind uwtable
define dso_local double @MatNd_lineSearchArmijo(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #5 {
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store double 1.000000e-04, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store double 9.000000e-01, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %20 = load ptr, ptr %11, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %5
  br label %26

23:                                               ; preds = %5
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = load double, ptr %24, align 8, !tbaa !9
  br label %26

26:                                               ; preds = %23, %22
  %27 = phi double [ 9.000000e-01, %22 ], [ %25, %23 ]
  store double %27, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._MatNd, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !11
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._MatNd, ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 4, !tbaa !15
  %34 = mul i32 %30, %33
  %35 = icmp ugt i32 %34, 1296
  br i1 %35, label %36, label %44

36:                                               ; preds = %26
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._MatNd, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 8, !tbaa !11
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._MatNd, ptr %40, i32 0, i32 2
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = call ptr @MatNd_create(i32 noundef %39, i32 noundef %42)
  store ptr %43, ptr %15, align 8, !tbaa !5
  br label %94

44:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._MatNd, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._MatNd, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = mul i32 %47, %50
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %44
  br label %62

54:                                               ; preds = %44
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._MatNd, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 8, !tbaa !11
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._MatNd, ptr %58, i32 0, i32 2
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = mul i32 %57, %60
  br label %62

62:                                               ; preds = %54, %53
  %63 = phi i32 [ 1, %53 ], [ %61, %54 ]
  store i32 %63, ptr %16, align 4, !tbaa !16
  %64 = load i32, ptr %16, align 4, !tbaa !16
  %65 = zext i32 %64 to i64
  %66 = mul i64 %65, 8
  %67 = add i64 24, %66
  %68 = alloca i8, i64 %67, align 16
  store ptr %68, ptr %15, align 8, !tbaa !5
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._MatNd, ptr %69, i64 1
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._MatNd, ptr %71, i32 0, i32 0
  store ptr %70, ptr %72, align 8, !tbaa !17
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._MatNd, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !11
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 1
  store i32 %75, ptr %77, align 8, !tbaa !11
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._MatNd, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 4, !tbaa !15
  %81 = load ptr, ptr %15, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._MatNd, ptr %81, i32 0, i32 2
  store i32 %80, ptr %82, align 4, !tbaa !15
  %83 = load i32, ptr %16, align 4, !tbaa !16
  %84 = load ptr, ptr %15, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._MatNd, ptr %84, i32 0, i32 3
  store i32 %83, ptr %85, align 8, !tbaa !18
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._MatNd, ptr %86, i32 0, i32 4
  store i8 1, ptr %87, align 4, !tbaa !19
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._MatNd, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !17
  %91 = load i32, ptr %16, align 4, !tbaa !16
  %92 = zext i32 %91 to i64
  %93 = mul i64 %92, 8
  call void @llvm.memset.p0.i64(ptr align 8 %90, i8 0, i64 %93, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %94

94:                                               ; preds = %62, %36
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = load double, ptr %14, align 8, !tbaa !9
  %99 = fneg double %98
  call void @MatNd_constMulAndAdd(ptr noundef %95, ptr noundef %96, ptr noundef %97, double noundef %99)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._MatNd, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = call double %100(ptr noundef %103, ptr noundef %104)
  store double %105, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._MatNd, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !17
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = call double %106(ptr noundef %109, ptr noundef %110)
  store double %111, ptr %18, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %155, %94
  %113 = load double, ptr %17, align 8, !tbaa !9
  %114 = load double, ptr %18, align 8, !tbaa !9
  %115 = load double, ptr %14, align 8, !tbaa !9
  %116 = call double @llvm.fmuladd.f64(double %115, double 1.000000e-04, double %114)
  %117 = fcmp ogt double %113, %116
  br i1 %117, label %118, label %156

118:                                              ; preds = %112
  %119 = load double, ptr %14, align 8, !tbaa !9
  %120 = fmul double %119, 9.000000e-01
  store double %120, ptr %14, align 8, !tbaa !9
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = load double, ptr %14, align 8, !tbaa !9
  %125 = fneg double %124
  call void @MatNd_constMulAndAdd(ptr noundef %121, ptr noundef %122, ptr noundef %123, double noundef %125)
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._MatNd, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !17
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = call double %126(ptr noundef %129, ptr noundef %130)
  store double %131, ptr %17, align 8, !tbaa !9
  %132 = load double, ptr %14, align 8, !tbaa !9
  %133 = fcmp olt double %132, 0x3EB0C6F7A0B5ED8D
  br i1 %133, label %134, label %155

134:                                              ; preds = %118
  %135 = load ptr, ptr %15, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %135)
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._MatNd, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !17
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = call double %136(ptr noundef %139, ptr noundef %140)
  store double %141, ptr %17, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %134
  %143 = load double, ptr %17, align 8, !tbaa !9
  %144 = load double, ptr %18, align 8, !tbaa !9
  %145 = fcmp une double %143, %144
  br i1 %145, label %146, label %151

146:                                              ; preds = %142
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = load double, ptr %17, align 8, !tbaa !9
  %149 = load double, ptr %18, align 8, !tbaa !9
  %150 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str.155, ptr noundef @.str.1, ptr noundef @__func__.MatNd_lineSearchArmijo, i32 noundef 3284, ptr noundef @.str.191, double noundef %148, ptr noundef @.str.192, double noundef %149) #7
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

151:                                              ; preds = %142
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152
  %154 = load double, ptr %17, align 8, !tbaa !9
  store double %154, ptr %6, align 8
  store i32 1, ptr %19, align 4
  br label %173

155:                                              ; preds = %118
  br label %112, !llvm.loop !20

156:                                              ; preds = %112
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  call void @MatNd_copy(ptr noundef %157, ptr noundef %158)
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct._MatNd, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !17
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  %164 = call double %159(ptr noundef %162, ptr noundef %163)
  store double %164, ptr %17, align 8, !tbaa !9
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  %166 = icmp ne ptr %165, null
  br i1 %166, label %167, label %170

167:                                              ; preds = %156
  %168 = load double, ptr %14, align 8, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  store double %168, ptr %169, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %167, %156
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %171)
  %172 = load double, ptr %17, align 8, !tbaa !9
  store double %172, ptr %6, align 8
  store i32 1, ptr %19, align 4
  br label %173

173:                                              ; preds = %170, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #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
  %174 = load double, ptr %6, align 8
  ret double %174
}

attributes #0 = { 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 #1 = { "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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_MatNd", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !14, i64 20}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!12, !13, i64 12}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !6, i64 0}
!18 = !{!12, !13, i64 16}
!19 = !{!12, !14, i64 20}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [59 x i8], align 1
@__func__.MatNd_lineSearchArmijo = external hidden unnamed_addr constant [23 x i8], align 1
@.str.191 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.192 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare void @print_trace() local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_copy(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_constMulAndAdd(ptr noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local double @MatNd_lineSearchArmijo(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #4 {
  %6 = icmp eq ptr %4, null
  br i1 %6, label %9, label %7

7:                                                ; preds = %5
  %8 = load double, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %5, %7
  %10 = phi double [ %8, %7 ], [ 9.000000e-01, %5 ]
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  %14 = load i32, ptr %13, align 4, !tbaa !14
  %15 = mul i32 %14, %12
  %16 = icmp ugt i32 %15, 1296
  br i1 %16, label %17, label %19

17:                                               ; preds = %9
  %18 = tail call ptr @MatNd_create(i32 noundef %12, i32 noundef %14)
  br label %29

19:                                               ; preds = %9
  %spec.select = tail call i32 @llvm.umax.i32(i32 %15, i32 1)
  %20 = shl nuw nsw i32 %spec.select, 3
  %21 = zext nneg i32 %20 to i64
  %22 = add nuw nsw i64 %21, 24
  %23 = alloca i8, i64 %22, align 16
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  store ptr %24, ptr %23, align 16, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  store i32 %12, ptr %25, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %23, i64 12
  store i32 %14, ptr %26, align 4, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %23, i64 16
  store i32 %spec.select, ptr %27, align 16, !tbaa !16
  %28 = getelementptr inbounds i8, ptr %23, i64 20
  store i8 1, ptr %28, align 4, !tbaa !17
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %24, i8 0, i64 %21, i1 false)
  br label %29

29:                                               ; preds = %19, %17
  %.065 = phi ptr [ %18, %17 ], [ %23, %19 ]
  %30 = fneg double %10
  call void @MatNd_constMulAndAdd(ptr noundef %.065, ptr noundef nonnull %0, ptr noundef %1, double noundef %30)
  %31 = load ptr, ptr %.065, align 8, !tbaa !15
  %32 = call double %2(ptr noundef %31, ptr noundef %3) #7
  %33 = load ptr, ptr %0, align 8, !tbaa !15
  %34 = call double %2(ptr noundef %33, ptr noundef %3) #7
  br label %35

35:                                               ; preds = %38, %29
  %.064 = phi double [ %10, %29 ], [ %39, %38 ]
  %.063 = phi double [ %32, %29 ], [ %42, %38 ]
  %36 = call double @llvm.fmuladd.f64(double %.064, double 1.000000e-04, double %34)
  %37 = fcmp ogt double %.063, %36
  br i1 %37, label %38, label %51

38:                                               ; preds = %35
  %39 = fmul double %.064, 9.000000e-01
  %40 = fneg double %39
  call void @MatNd_constMulAndAdd(ptr noundef nonnull %.065, ptr noundef nonnull %0, ptr noundef %1, double noundef %40)
  %41 = load ptr, ptr %.065, align 8, !tbaa !15
  %42 = call double %2(ptr noundef %41, ptr noundef %3) #7
  %43 = fcmp olt double %39, 0x3EB0C6F7A0B5ED8D
  br i1 %43, label %44, label %35, !llvm.loop !18

44:                                               ; preds = %38
  call void @MatNd_destroy(ptr noundef nonnull %.065)
  %45 = load ptr, ptr %0, align 8, !tbaa !15
  %46 = call double %2(ptr noundef %45, ptr noundef %3) #7
  %47 = fcmp une double %46, %34
  br i1 %47, label %48, label %56

48:                                               ; preds = %44
  %49 = load ptr, ptr @stderr, align 8, !tbaa !20
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.155, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_lineSearchArmijo, i32 noundef 3284, ptr noundef nonnull @.str.191, double noundef %46, ptr noundef nonnull @.str.192, double noundef %34) #8
  call void @print_trace() #7
  call void @exit(i32 noundef 1) #9
  unreachable

51:                                               ; preds = %35
  call void @MatNd_copy(ptr noundef nonnull %0, ptr noundef nonnull %.065)
  %52 = load ptr, ptr %0, align 8, !tbaa !15
  %53 = call double %2(ptr noundef %52, ptr noundef %3) #7
  br i1 %6, label %55, label %54

54:                                               ; preds = %51
  store double %.064, ptr %4, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %54, %51
  call void @MatNd_destroy(ptr noundef nonnull %.065)
  br label %56

56:                                               ; preds = %44, %55
  %.0 = phi double [ %53, %55 ], [ %46, %44 ]
  ret double %.0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #6

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass