; LLVM IR from opensim-org/opensim-moco :: tropter/external/snopt-interface/src (snoptProblem)

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

%class.snoptProblem = type { [30 x i8], i32, i32, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr }
%class.snoptProblemABC = type { %class.snoptProblem, ptr, ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [112 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__._ZN13snoptProblemA5solveEiiidiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_S1_S1_S0_S1_S1_S0_S1_RiS5_Rd = external hidden unnamed_addr constant [179 x i8], align 1

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #0

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN13snoptProblemA10computeJacEiiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_RS0_S5_RS1_RiS5_S5_S7_(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13snoptProblemA5solveEiiidiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_S1_S1_S0_S1_S1_S0_S1_RiS5_Rd(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, double noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5 align 2 {
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  %51 = alloca ptr, align 8
  store ptr %0, ptr %21, align 8, !tbaa !5
  store i32 %1, ptr %22, align 4, !tbaa !9
  store i32 %2, ptr %23, align 4, !tbaa !9
  store i32 %3, ptr %24, align 4, !tbaa !9
  store double %4, ptr %25, align 8, !tbaa !11
  store i32 %5, ptr %26, align 4, !tbaa !9
  store ptr %6, ptr %27, align 8, !tbaa !5
  store ptr %7, ptr %28, align 8, !tbaa !5
  store ptr %8, ptr %29, align 8, !tbaa !5
  store ptr %9, ptr %30, align 8, !tbaa !5
  store ptr %10, ptr %31, align 8, !tbaa !5
  store ptr %11, ptr %32, align 8, !tbaa !5
  store ptr %12, ptr %33, align 8, !tbaa !5
  store ptr %13, ptr %34, align 8, !tbaa !5
  store ptr %14, ptr %35, align 8, !tbaa !5
  store ptr %15, ptr %36, align 8, !tbaa !5
  store ptr %16, ptr %37, align 8, !tbaa !5
  store ptr %17, ptr %38, align 8, !tbaa !5
  store ptr %18, ptr %39, align 8, !tbaa !5
  store ptr %19, ptr %40, align 8, !tbaa !5
  %52 = load ptr, ptr %21, align 8
  %53 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %20
  br label %59

57:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 355, ptr noundef @__PRETTY_FUNCTION__._ZN13snoptProblemA5solveEiiidiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_S1_S1_S0_S1_S1_S0_S1_RiS5_Rd) #7
  unreachable

58:                                               ; No predecessors!
  br label %59

59:                                               ; preds = %58, %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %60 = load i32, ptr %24, align 4, !tbaa !9
  %61 = load i32, ptr %23, align 4, !tbaa !9
  %62 = mul nsw i32 %60, %61
  %63 = sext i32 %62 to i64
  %64 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %63, i64 4)
  %65 = extractvalue { i64, i1 } %64, 1
  %66 = extractvalue { i64, i1 } %64, 0
  %67 = select i1 %65, i64 -1, i64 %66
  %68 = call noalias noundef nonnull ptr @_Znam(i64 noundef %67) #9
  store ptr %68, ptr %47, align 8, !tbaa !5
  %69 = load i32, ptr %24, align 4, !tbaa !9
  %70 = load i32, ptr %23, align 4, !tbaa !9
  %71 = mul nsw i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %72, i64 4)
  %74 = extractvalue { i64, i1 } %73, 1
  %75 = extractvalue { i64, i1 } %73, 0
  %76 = select i1 %74, i64 -1, i64 %75
  %77 = call noalias noundef nonnull ptr @_Znam(i64 noundef %76) #9
  store ptr %77, ptr %48, align 8, !tbaa !5
  %78 = load i32, ptr %24, align 4, !tbaa !9
  %79 = load i32, ptr %23, align 4, !tbaa !9
  %80 = mul nsw i32 %78, %79
  %81 = sext i32 %80 to i64
  %82 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %81, i64 8)
  %83 = extractvalue { i64, i1 } %82, 1
  %84 = extractvalue { i64, i1 } %82, 0
  %85 = select i1 %83, i64 -1, i64 %84
  %86 = call noalias noundef nonnull ptr @_Znam(i64 noundef %85) #9
  store ptr %86, ptr %51, align 8, !tbaa !5
  %87 = load i32, ptr %24, align 4, !tbaa !9
  %88 = load i32, ptr %23, align 4, !tbaa !9
  %89 = mul nsw i32 %87, %88
  %90 = sext i32 %89 to i64
  %91 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %90, i64 4)
  %92 = extractvalue { i64, i1 } %91, 1
  %93 = extractvalue { i64, i1 } %91, 0
  %94 = select i1 %92, i64 -1, i64 %93
  %95 = call noalias noundef nonnull ptr @_Znam(i64 noundef %94) #9
  store ptr %95, ptr %49, align 8, !tbaa !5
  %96 = load i32, ptr %24, align 4, !tbaa !9
  %97 = load i32, ptr %23, align 4, !tbaa !9
  %98 = mul nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %99, i64 4)
  %101 = extractvalue { i64, i1 } %100, 1
  %102 = extractvalue { i64, i1 } %100, 0
  %103 = select i1 %101, i64 -1, i64 %102
  %104 = call noalias noundef nonnull ptr @_Znam(i64 noundef %103) #9
  store ptr %104, ptr %50, align 8, !tbaa !5
  %105 = load i32, ptr %23, align 4, !tbaa !9
  %106 = load i32, ptr %24, align 4, !tbaa !9
  %107 = load ptr, ptr %27, align 8, !tbaa !5
  %108 = load ptr, ptr %32, align 8, !tbaa !5
  %109 = load ptr, ptr %28, align 8, !tbaa !5
  %110 = load ptr, ptr %29, align 8, !tbaa !5
  %111 = call noundef i32 @_ZN13snoptProblemA10computeJacEiiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_RS0_S5_RS1_RiS5_S5_S7_(ptr noundef nonnull align 8 dereferenceable(128) %52, i32 noundef %105, i32 noundef %106, ptr noundef %107, ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 4 dereferenceable(4) %45)
  %112 = load i32, ptr %26, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %46, align 4, !tbaa !9
  %114 = load i32, ptr %22, align 4, !tbaa !9
  %115 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 0
  %116 = getelementptr inbounds [30 x i8], ptr %115, i64 0, i64 0
  %117 = load i32, ptr %23, align 4, !tbaa !9
  %118 = load i32, ptr %24, align 4, !tbaa !9
  %119 = load double, ptr %25, align 8, !tbaa !11
  %120 = load i32, ptr %46, align 4, !tbaa !9
  %121 = load ptr, ptr %27, align 8, !tbaa !5
  %122 = getelementptr inbounds %class.snoptProblemABC, ptr %52, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !15
  %124 = getelementptr inbounds %class.snoptProblemABC, ptr %52, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = getelementptr inbounds %class.snoptProblemABC, ptr %52, i32 0, i32 3
  %127 = load ptr, ptr %126, align 8, !tbaa !18
  %128 = getelementptr inbounds %class.snoptProblemABC, ptr %52, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !19
  %130 = load ptr, ptr %47, align 8, !tbaa !5
  %131 = load ptr, ptr %48, align 8, !tbaa !5
  %132 = load i32, ptr %44, align 4, !tbaa !9
  %133 = load ptr, ptr %51, align 8, !tbaa !5
  %134 = load ptr, ptr %49, align 8, !tbaa !5
  %135 = load ptr, ptr %50, align 8, !tbaa !5
  %136 = load i32, ptr %45, align 4, !tbaa !9
  %137 = load ptr, ptr %28, align 8, !tbaa !5
  %138 = load ptr, ptr %29, align 8, !tbaa !5
  %139 = load ptr, ptr %30, align 8, !tbaa !5
  %140 = load ptr, ptr %31, align 8, !tbaa !5
  %141 = load ptr, ptr %32, align 8, !tbaa !5
  %142 = load ptr, ptr %33, align 8, !tbaa !5
  %143 = load ptr, ptr %34, align 8, !tbaa !5
  %144 = load ptr, ptr %35, align 8, !tbaa !5
  %145 = load ptr, ptr %36, align 8, !tbaa !5
  %146 = load ptr, ptr %37, align 8, !tbaa !5
  %147 = load ptr, ptr %38, align 8, !tbaa !5
  %148 = load ptr, ptr %39, align 8, !tbaa !5
  %149 = load ptr, ptr %40, align 8, !tbaa !5
  %150 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 11
  %151 = load ptr, ptr %150, align 8, !tbaa !20
  %152 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 9
  %153 = load i32, ptr %152, align 4, !tbaa !21
  %154 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 10
  %155 = load ptr, ptr %154, align 8, !tbaa !22
  %156 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 8
  %157 = load i32, ptr %156, align 8, !tbaa !23
  %158 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 7
  %159 = load ptr, ptr %158, align 8, !tbaa !24
  %160 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 4
  %161 = load i32, ptr %160, align 4, !tbaa !25
  %162 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 6
  %163 = load ptr, ptr %162, align 8, !tbaa !26
  %164 = getelementptr inbounds %class.snoptProblem, ptr %52, i32 0, i32 5
  %165 = load i32, ptr %164, align 8, !tbaa !27
  call void @f_snkera(i32 noundef %114, ptr noundef %116, i32 noundef %117, i32 noundef %118, double noundef %119, i32 noundef %120, ptr noundef %121, ptr noundef %123, ptr noundef %125, ptr noundef %127, ptr noundef %129, ptr noundef %130, ptr noundef %131, i32 noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %135, i32 noundef %136, ptr noundef %137, ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %143, ptr noundef %144, ptr noundef %145, ptr noundef %146, ptr noundef %41, ptr noundef %147, ptr noundef %148, ptr noundef %149, ptr noundef %42, ptr noundef %43, ptr noundef %151, i32 noundef %153, ptr noundef %155, i32 noundef %157, ptr noundef %159, i32 noundef %161, ptr noundef %163, i32 noundef %165)
  %166 = load ptr, ptr %47, align 8, !tbaa !5
  %167 = icmp eq ptr %166, null
  br i1 %167, label %169, label %168

168:                                              ; preds = %59
  call void @_ZdaPv(ptr noundef %166) #10
  br label %169

169:                                              ; preds = %168, %59
  %170 = load ptr, ptr %48, align 8, !tbaa !5
  %171 = icmp eq ptr %170, null
  br i1 %171, label %173, label %172

172:                                              ; preds = %169
  call void @_ZdaPv(ptr noundef %170) #10
  br label %173

173:                                              ; preds = %172, %169
  %174 = load ptr, ptr %51, align 8, !tbaa !5
  %175 = icmp eq ptr %174, null
  br i1 %175, label %177, label %176

176:                                              ; preds = %173
  call void @_ZdaPv(ptr noundef %174) #10
  br label %177

177:                                              ; preds = %176, %173
  %178 = load ptr, ptr %49, align 8, !tbaa !5
  %179 = icmp eq ptr %178, null
  br i1 %179, label %181, label %180

180:                                              ; preds = %177
  call void @_ZdaPv(ptr noundef %178) #10
  br label %181

181:                                              ; preds = %180, %177
  %182 = load ptr, ptr %50, align 8, !tbaa !5
  %183 = icmp eq ptr %182, null
  br i1 %183, label %185, label %184

184:                                              ; preds = %181
  call void @_ZdaPv(ptr noundef %182) #10
  br label %185

185:                                              ; preds = %184, %181
  %186 = load i32, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  ret i32 %186
}

declare void @f_snkera(i32 noundef, ptr noundef, i32 noundef, i32 noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #6

attributes #0 = { nobuiltin 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 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nobuiltin allocsize(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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress 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 = { "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 }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 32}
!14 = !{!"_ZTS12snoptProblem", !7, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !6, i64 80, !6, i64 88}
!15 = !{!16, !6, i64 96}
!16 = !{!"_ZTS15snoptProblemABC", !14, i64 0, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!17 = !{!16, !6, i64 104}
!18 = !{!16, !6, i64 112}
!19 = !{!16, !6, i64 120}
!20 = !{!14, !6, i64 88}
!21 = !{!14, !10, i64 76}
!22 = !{!14, !6, i64 80}
!23 = !{!14, !10, i64 72}
!24 = !{!14, !6, i64 64}
!25 = !{!14, !10, i64 44}
!26 = !{!14, !6, i64 56}
!27 = !{!14, !10, i64 48}


; 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.2 = external hidden unnamed_addr constant [112 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__._ZN13snoptProblemA5solveEiiidiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_S1_S1_S0_S1_S1_S0_S1_RiS5_Rd = external hidden unnamed_addr constant [179 x i8], align 1

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN13snoptProblemA10computeJacEiiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_RS0_S5_RS1_RiS5_S5_S7_(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13snoptProblemA5solveEiiidiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_S1_S1_S0_S1_S1_S0_S1_RiS5_Rd(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, double noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) local_unnamed_addr #4 align 2 {
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = getelementptr inbounds i8, ptr %0, i64 32
  %32 = load i32, ptr %31, align 8, !tbaa !5
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %35, label %34

34:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 355, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN13snoptProblemA5solveEiiidiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_S1_S1_S0_S1_S1_S0_S1_RiS5_Rd) #6
  unreachable

35:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #7
  %36 = mul nsw i32 %3, %2
  %37 = sext i32 %36 to i64
  %38 = icmp slt i32 %36, 0
  %39 = shl nsw i64 %37, 2
  %40 = select i1 %38, i64 -1, i64 %39
  %41 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %40) #8
  store ptr %41, ptr %26, align 8, !tbaa !11
  %42 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %40) #8
  store ptr %42, ptr %27, align 8, !tbaa !11
  %43 = shl nsw i64 %37, 3
  %44 = select i1 %38, i64 -1, i64 %43
  %45 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %44) #8
  store ptr %45, ptr %30, align 8, !tbaa !11
  %46 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %40) #8
  store ptr %46, ptr %28, align 8, !tbaa !11
  %47 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %40) #8
  store ptr %47, ptr %29, align 8, !tbaa !11
  %48 = call noundef i32 @_ZN13snoptProblemA10computeJacEiiPFvPiS0_PdS0_S0_S1_S0_S0_S1_PcS0_S0_S0_S1_S0_ES1_S1_S1_RS0_S5_RS1_RiS5_S5_S7_(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %2, i32 noundef %3, ptr noundef %6, ptr noundef %11, ptr noundef %7, ptr noundef %8, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %49 = add nsw i32 %5, 1
  %50 = getelementptr inbounds i8, ptr %0, i64 96
  %51 = load ptr, ptr %50, align 8, !tbaa !12
  %52 = getelementptr inbounds i8, ptr %0, i64 104
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = getelementptr inbounds i8, ptr %0, i64 112
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = getelementptr inbounds i8, ptr %0, i64 120
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = load ptr, ptr %26, align 8, !tbaa !11
  %59 = load ptr, ptr %27, align 8, !tbaa !11
  %60 = load i32, ptr %24, align 4, !tbaa !17
  %61 = load ptr, ptr %30, align 8, !tbaa !11
  %62 = load ptr, ptr %28, align 8, !tbaa !11
  %63 = load ptr, ptr %29, align 8, !tbaa !11
  %64 = load i32, ptr %25, align 4, !tbaa !17
  %65 = getelementptr inbounds i8, ptr %0, i64 88
  %66 = load ptr, ptr %65, align 8, !tbaa !18
  %67 = getelementptr inbounds i8, ptr %0, i64 76
  %68 = load i32, ptr %67, align 4, !tbaa !19
  %69 = getelementptr inbounds i8, ptr %0, i64 80
  %70 = load ptr, ptr %69, align 8, !tbaa !20
  %71 = getelementptr inbounds i8, ptr %0, i64 72
  %72 = load i32, ptr %71, align 8, !tbaa !21
  %73 = getelementptr inbounds i8, ptr %0, i64 64
  %74 = load ptr, ptr %73, align 8, !tbaa !22
  %75 = getelementptr inbounds i8, ptr %0, i64 44
  %76 = load i32, ptr %75, align 4, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %0, i64 56
  %78 = load ptr, ptr %77, align 8, !tbaa !24
  %79 = getelementptr inbounds i8, ptr %0, i64 48
  %80 = load i32, ptr %79, align 8, !tbaa !25
  call void @f_snkera(i32 noundef %1, ptr noundef nonnull %0, i32 noundef %2, i32 noundef %3, double noundef %4, i32 noundef %49, ptr noundef %6, ptr noundef %51, ptr noundef %53, ptr noundef %55, ptr noundef %57, ptr noundef %58, ptr noundef %59, i32 noundef %60, ptr noundef %61, ptr noundef %62, ptr noundef %63, i32 noundef %64, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef nonnull %21, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef %66, i32 noundef %68, ptr noundef %70, i32 noundef %72, ptr noundef %74, i32 noundef %76, ptr noundef %78, i32 noundef %80)
  %81 = load ptr, ptr %26, align 8, !tbaa !11
  %82 = icmp eq ptr %81, null
  br i1 %82, label %84, label %83

83:                                               ; preds = %35
  call void @_ZdaPv(ptr noundef nonnull %81) #9
  br label %84

84:                                               ; preds = %83, %35
  %85 = load ptr, ptr %27, align 8, !tbaa !11
  %86 = icmp eq ptr %85, null
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  call void @_ZdaPv(ptr noundef nonnull %85) #9
  br label %88

88:                                               ; preds = %87, %84
  %89 = load ptr, ptr %30, align 8, !tbaa !11
  %90 = icmp eq ptr %89, null
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void @_ZdaPv(ptr noundef nonnull %89) #9
  br label %92

92:                                               ; preds = %91, %88
  %93 = load ptr, ptr %28, align 8, !tbaa !11
  %94 = icmp eq ptr %93, null
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  call void @_ZdaPv(ptr noundef nonnull %93) #9
  br label %96

96:                                               ; preds = %95, %92
  %97 = load ptr, ptr %29, align 8, !tbaa !11
  %98 = icmp eq ptr %97, null
  br i1 %98, label %100, label %99

99:                                               ; preds = %96
  call void @_ZdaPv(ptr noundef nonnull %97) #9
  br label %100

100:                                              ; preds = %99, %96
  %101 = load i32, ptr %21, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  ret i32 %101
}

declare void @f_snkera(i32 noundef, ptr noundef, i32 noundef, i32 noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

attributes #0 = { nobuiltin 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 = { 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 #2 = { nobuiltin allocsize(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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 = { "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 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !9, i64 32}
!6 = !{!"_ZTS12snoptProblem", !7, i64 0, !9, i64 32, !9, i64 36, !9, i64 40, !9, i64 44, !9, i64 48, !10, i64 56, !10, i64 64, !9, i64 72, !9, i64 76, !10, i64 80, !10, i64 88}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !10, i64 96}
!13 = !{!"_ZTS15snoptProblemABC", !6, i64 0, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!14 = !{!13, !10, i64 104}
!15 = !{!13, !10, i64 112}
!16 = !{!13, !10, i64 120}
!17 = !{!9, !9, i64 0}
!18 = !{!6, !10, i64 88}
!19 = !{!6, !9, i64 76}
!20 = !{!6, !10, i64 80}
!21 = !{!6, !9, i64 72}
!22 = !{!6, !10, i64 64}
!23 = !{!6, !9, i64 44}
!24 = !{!6, !10, i64 56}
!25 = !{!6, !9, i64 48}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass