; 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.sqoptProblem = type { %class.snoptProblem, 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__._ZN12sqoptProblem5solveEiPFvPiPdS1_S0_PcS0_S0_S0_S1_S0_EiiiiiidS1_S0_S0_S1_S1_S1_S0_S0_S1_S1_S1_RiS5_RdS6_ = external hidden unnamed_addr constant [208 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12sqoptProblem12setWorkspaceEiiiii(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2 align 2

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

63:                                               ; preds = %25
  br label %66

64:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 670, ptr noundef @__PRETTY_FUNCTION__._ZN12sqoptProblem5solveEiPFvPiPdS1_S0_PcS0_S0_S0_S1_S0_EiiiiiidS1_S0_S0_S1_S1_S1_S0_S0_S1_S1_S1_RiS5_RdS6_) #4
  unreachable

65:                                               ; No predecessors!
  br label %66

66:                                               ; preds = %65, %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #5
  %67 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 2
  %68 = load i32, ptr %67, align 4, !tbaa !15
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %76

70:                                               ; preds = %66
  %71 = load i32, ptr %29, align 4, !tbaa !9
  %72 = load i32, ptr %30, align 4, !tbaa !9
  %73 = load i32, ptr %31, align 4, !tbaa !9
  %74 = load i32, ptr %32, align 4, !tbaa !9
  %75 = load i32, ptr %33, align 4, !tbaa !9
  call void @_ZN12sqoptProblem12setWorkspaceEiiiii(ptr noundef nonnull align 8 dereferenceable(104) %59, i32 noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74, i32 noundef %75)
  br label %76

76:                                               ; preds = %70, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #5
  store i32 0, ptr %55, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %89, %76
  %78 = load i32, ptr %55, align 4, !tbaa !9
  %79 = load i32, ptr %31, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #5
  br label %92

82:                                               ; preds = %77
  %83 = load ptr, ptr %37, align 8, !tbaa !5
  %84 = load i32, ptr %55, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %82
  %90 = load i32, ptr %55, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %55, align 4, !tbaa !9
  br label %77, !llvm.loop !16

92:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #5
  store i32 0, ptr %56, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %105, %92
  %94 = load i32, ptr %56, align 4, !tbaa !9
  %95 = load i32, ptr %30, align 4, !tbaa !9
  %96 = icmp sle i32 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #5
  br label %108

98:                                               ; preds = %93
  %99 = load ptr, ptr %38, align 8, !tbaa !5
  %100 = load i32, ptr %56, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %98
  %106 = load i32, ptr %56, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %56, align 4, !tbaa !9
  br label %93, !llvm.loop !18

108:                                              ; preds = %97
  %109 = load i32, ptr %34, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %52, align 4, !tbaa !9
  %111 = load i32, ptr %27, align 4, !tbaa !9
  %112 = load ptr, ptr %28, align 8, !tbaa !5
  %113 = getelementptr inbounds %class.sqoptProblem, ptr %59, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !19
  %115 = load i32, ptr %29, align 4, !tbaa !9
  %116 = load i32, ptr %30, align 4, !tbaa !9
  %117 = load i32, ptr %31, align 4, !tbaa !9
  %118 = load i32, ptr %32, align 4, !tbaa !9
  %119 = load i32, ptr %33, align 4, !tbaa !9
  %120 = load i32, ptr %52, align 4, !tbaa !9
  %121 = load double, ptr %35, align 8, !tbaa !11
  %122 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 0
  %123 = getelementptr inbounds [30 x i8], ptr %122, i64 0, i64 0
  %124 = load ptr, ptr %36, align 8, !tbaa !5
  %125 = load ptr, ptr %37, align 8, !tbaa !5
  %126 = load ptr, ptr %38, align 8, !tbaa !5
  %127 = load ptr, ptr %39, align 8, !tbaa !5
  %128 = load ptr, ptr %40, align 8, !tbaa !5
  %129 = load ptr, ptr %41, align 8, !tbaa !5
  %130 = load ptr, ptr %42, align 8, !tbaa !5
  %131 = load ptr, ptr %43, align 8, !tbaa !5
  %132 = load ptr, ptr %44, align 8, !tbaa !5
  %133 = load ptr, ptr %45, align 8, !tbaa !5
  %134 = load ptr, ptr %46, align 8, !tbaa !5
  %135 = load ptr, ptr %47, align 8, !tbaa !5
  %136 = load ptr, ptr %48, align 8, !tbaa !5
  %137 = load ptr, ptr %49, align 8, !tbaa !5
  %138 = load ptr, ptr %50, align 8, !tbaa !5
  %139 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 11
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 9
  %142 = load i32, ptr %141, align 4, !tbaa !22
  %143 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 10
  %144 = load ptr, ptr %143, align 8, !tbaa !23
  %145 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 8
  %146 = load i32, ptr %145, align 8, !tbaa !24
  %147 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 7
  %148 = load ptr, ptr %147, align 8, !tbaa !25
  %149 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 4
  %150 = load i32, ptr %149, align 4, !tbaa !26
  %151 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 6
  %152 = load ptr, ptr %151, align 8, !tbaa !27
  %153 = getelementptr inbounds %class.snoptProblem, ptr %59, i32 0, i32 5
  %154 = load i32, ptr %153, align 8, !tbaa !28
  call void @f_snkerq(i32 noundef %111, ptr noundef %112, ptr noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef %117, i32 noundef %118, i32 noundef %119, i32 noundef %120, double noundef %121, ptr noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127, ptr noundef %128, ptr noundef %129, ptr noundef %130, ptr noundef %131, ptr noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %51, ptr noundef %135, ptr noundef %136, ptr noundef %137, ptr noundef %138, ptr noundef %53, ptr noundef %54, ptr noundef %140, i32 noundef %142, ptr noundef %144, i32 noundef %146, ptr noundef %148, i32 noundef %150, ptr noundef %152, i32 noundef %154)
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #5
  store i32 0, ptr %57, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %167, %108
  %156 = load i32, ptr %57, align 4, !tbaa !9
  %157 = load i32, ptr %31, align 4, !tbaa !9
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #5
  br label %170

160:                                              ; preds = %155
  %161 = load ptr, ptr %37, align 8, !tbaa !5
  %162 = load i32, ptr %57, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds i32, ptr %161, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !9
  %166 = add nsw i32 %165, -1
  store i32 %166, ptr %164, align 4, !tbaa !9
  br label %167

167:                                              ; preds = %160
  %168 = load i32, ptr %57, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %57, align 4, !tbaa !9
  br label %155, !llvm.loop !29

170:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #5
  store i32 0, ptr %58, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %183, %170
  %172 = load i32, ptr %58, align 4, !tbaa !9
  %173 = load i32, ptr %30, align 4, !tbaa !9
  %174 = icmp sle i32 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #5
  br label %186

176:                                              ; preds = %171
  %177 = load ptr, ptr %38, align 8, !tbaa !5
  %178 = load i32, ptr %58, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i32, ptr %177, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = add nsw i32 %181, -1
  store i32 %182, ptr %180, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %176
  %184 = load i32, ptr %58, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %58, align 4, !tbaa !9
  br label %171, !llvm.loop !30

186:                                              ; preds = %175
  %187 = load i32, ptr %51, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #5
  ret i32 %187
}

declare void @f_snkerq(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, double 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, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { noreturn nounwind }
attributes #5 = { 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 = !{!14, !10, i64 36}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !6, i64 96}
!20 = !{!"_ZTS12sqoptProblem", !14, i64 0, !6, i64 96}
!21 = !{!14, !6, i64 88}
!22 = !{!14, !10, i64 76}
!23 = !{!14, !6, i64 80}
!24 = !{!14, !10, i64 72}
!25 = !{!14, !6, i64 64}
!26 = !{!14, !10, i64 44}
!27 = !{!14, !6, i64 56}
!28 = !{!14, !10, i64 48}
!29 = distinct !{!29, !17}
!30 = distinct !{!30, !17}


; 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__._ZN12sqoptProblem5solveEiPFvPiPdS1_S0_PcS0_S0_S0_S1_S0_EiiiiiidS1_S0_S0_S1_S1_S1_S0_S0_S1_S1_S1_RiS5_RdS6_ = external hidden unnamed_addr constant [208 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12sqoptProblem12setWorkspaceEiiiii(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN12sqoptProblem5solveEiPFvPiPdS1_S0_PcS0_S0_S0_S1_S0_EiiiiiidS1_S0_S0_S1_S1_S1_S0_S0_S1_S1_S1_RiS5_RdS6_(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, double 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 %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) local_unnamed_addr #2 align 2 {
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = load i32, ptr %29, align 8, !tbaa !5
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %33, label %32

32:                                               ; preds = %25
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 670, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12sqoptProblem5solveEiPFvPiPdS1_S0_PcS0_S0_S0_S1_S0_EiiiiiidS1_S0_S0_S1_S1_S1_S0_S0_S1_S1_S1_RiS5_RdS6_) #4
  unreachable

33:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #5
  %34 = getelementptr inbounds i8, ptr %0, i64 36
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %33
  tail call void @_ZN12sqoptProblem12setWorkspaceEiiiii(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7)
  br label %38

38:                                               ; preds = %37, %33
  %39 = icmp sgt i32 %5, 0
  br i1 %39, label %.lr.ph.preheader, label %.preheader56

.lr.ph.preheader:                                 ; preds = %38
  %wide.trip.count = zext nneg i32 %5 to i64
  %min.iters.check = icmp ult i32 %5, 8
  br i1 %min.iters.check, label %.lr.ph.preheader127, label %vector.ph

.lr.ph.preheader127:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %40 = getelementptr inbounds i32, ptr %11, i64 %index
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load = load <4 x i32>, ptr %40, align 4, !tbaa !12
  %wide.load84 = load <4 x i32>, ptr %41, align 4, !tbaa !12
  %42 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %43 = add nsw <4 x i32> %wide.load84, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %42, ptr %40, align 4, !tbaa !12
  store <4 x i32> %43, ptr %41, align 4, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader56, label %.lr.ph.preheader127

.preheader56:                                     ; preds = %.lr.ph, %middle.block, %38
  %.not58 = icmp slt i32 %4, 0
  br i1 %.not58, label %._crit_edge, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %.preheader56
  %45 = add nuw i32 %4, 1
  %wide.trip.count72 = zext i32 %45 to i64
  %min.iters.check87 = icmp ult i32 %4, 7
  br i1 %min.iters.check87, label %.lr.ph60.preheader126, label %vector.ph88

.lr.ph60.preheader126:                            ; preds = %middle.block85, %.lr.ph60.preheader
  %indvars.iv69.ph = phi i64 [ 0, %.lr.ph60.preheader ], [ %n.vec90, %middle.block85 ]
  br label %.lr.ph60

vector.ph88:                                      ; preds = %.lr.ph60.preheader
  %n.vec90 = and i64 %wide.trip.count72, 4294967288
  br label %vector.body92

vector.body92:                                    ; preds = %vector.body92, %vector.ph88
  %index93 = phi i64 [ 0, %vector.ph88 ], [ %index.next96, %vector.body92 ]
  %46 = getelementptr inbounds i32, ptr %12, i64 %index93
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %wide.load94 = load <4 x i32>, ptr %46, align 4, !tbaa !12
  %wide.load95 = load <4 x i32>, ptr %47, align 4, !tbaa !12
  %48 = add nsw <4 x i32> %wide.load94, <i32 1, i32 1, i32 1, i32 1>
  %49 = add nsw <4 x i32> %wide.load95, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %48, ptr %46, align 4, !tbaa !12
  store <4 x i32> %49, ptr %47, align 4, !tbaa !12
  %index.next96 = add nuw i64 %index93, 8
  %50 = icmp eq i64 %index.next96, %n.vec90
  br i1 %50, label %middle.block85, label %vector.body92, !llvm.loop !17

middle.block85:                                   ; preds = %vector.body92
  %cmp.n97 = icmp eq i64 %n.vec90, %wide.trip.count72
  br i1 %cmp.n97, label %._crit_edge, label %.lr.ph60.preheader126

.lr.ph:                                           ; preds = %.lr.ph.preheader127, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader127 ]
  %51 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv
  %52 = load i32, ptr %51, align 4, !tbaa !12
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader56, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph60, %middle.block85, %.preheader56
  %54 = add nsw i32 %8, 1
  %55 = getelementptr inbounds i8, ptr %0, i64 96
  %56 = load ptr, ptr %55, align 8, !tbaa !19
  %57 = getelementptr inbounds i8, ptr %0, i64 88
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = getelementptr inbounds i8, ptr %0, i64 76
  %60 = load i32, ptr %59, align 4, !tbaa !22
  %61 = getelementptr inbounds i8, ptr %0, i64 80
  %62 = load ptr, ptr %61, align 8, !tbaa !23
  %63 = getelementptr inbounds i8, ptr %0, i64 72
  %64 = load i32, ptr %63, align 8, !tbaa !24
  %65 = getelementptr inbounds i8, ptr %0, i64 64
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  %67 = getelementptr inbounds i8, ptr %0, i64 44
  %68 = load i32, ptr %67, align 4, !tbaa !26
  %69 = getelementptr inbounds i8, ptr %0, i64 56
  %70 = load ptr, ptr %69, align 8, !tbaa !27
  %71 = getelementptr inbounds i8, ptr %0, i64 48
  %72 = load i32, ptr %71, align 8, !tbaa !28
  call void @f_snkerq(i32 noundef %1, ptr noundef %2, ptr noundef %56, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %54, double noundef %9, ptr noundef nonnull %0, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull %26, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %58, i32 noundef %60, ptr noundef %62, i32 noundef %64, ptr noundef %66, i32 noundef %68, ptr noundef %70, i32 noundef %72)
  br i1 %39, label %.lr.ph63.preheader, label %.preheader

.lr.ph63.preheader:                               ; preds = %._crit_edge
  %wide.trip.count77 = zext nneg i32 %5 to i64
  %min.iters.check100 = icmp ult i32 %5, 8
  br i1 %min.iters.check100, label %.lr.ph63.preheader125, label %vector.ph101

.lr.ph63.preheader125:                            ; preds = %middle.block98, %.lr.ph63.preheader
  %indvars.iv74.ph = phi i64 [ 0, %.lr.ph63.preheader ], [ %n.vec103, %middle.block98 ]
  br label %.lr.ph63

vector.ph101:                                     ; preds = %.lr.ph63.preheader
  %n.vec103 = and i64 %wide.trip.count77, 2147483640
  br label %vector.body105

vector.body105:                                   ; preds = %vector.body105, %vector.ph101
  %index106 = phi i64 [ 0, %vector.ph101 ], [ %index.next109, %vector.body105 ]
  %73 = getelementptr inbounds i32, ptr %11, i64 %index106
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  %wide.load107 = load <4 x i32>, ptr %73, align 4, !tbaa !12
  %wide.load108 = load <4 x i32>, ptr %74, align 4, !tbaa !12
  %75 = add nsw <4 x i32> %wide.load107, <i32 -1, i32 -1, i32 -1, i32 -1>
  %76 = add nsw <4 x i32> %wide.load108, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %75, ptr %73, align 4, !tbaa !12
  store <4 x i32> %76, ptr %74, align 4, !tbaa !12
  %index.next109 = add nuw i64 %index106, 8
  %77 = icmp eq i64 %index.next109, %n.vec103
  br i1 %77, label %middle.block98, label %vector.body105, !llvm.loop !29

middle.block98:                                   ; preds = %vector.body105
  %cmp.n110 = icmp eq i64 %n.vec103, %wide.trip.count77
  br i1 %cmp.n110, label %.preheader, label %.lr.ph63.preheader125

.lr.ph60:                                         ; preds = %.lr.ph60.preheader126, %.lr.ph60
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph60 ], [ %indvars.iv69.ph, %.lr.ph60.preheader126 ]
  %78 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv69
  %79 = load i32, ptr %78, align 4, !tbaa !12
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %78, align 4, !tbaa !12
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72
  br i1 %exitcond73.not, label %._crit_edge, label %.lr.ph60, !llvm.loop !30

.preheader:                                       ; preds = %.lr.ph63, %middle.block98, %._crit_edge
  br i1 %.not58, label %._crit_edge67, label %.lr.ph66.preheader

.lr.ph66.preheader:                               ; preds = %.preheader
  %81 = add nuw i32 %4, 1
  %wide.trip.count82 = zext i32 %81 to i64
  %min.iters.check113 = icmp ult i32 %4, 7
  br i1 %min.iters.check113, label %.lr.ph66.preheader124, label %vector.ph114

.lr.ph66.preheader124:                            ; preds = %middle.block111, %.lr.ph66.preheader
  %indvars.iv79.ph = phi i64 [ 0, %.lr.ph66.preheader ], [ %n.vec116, %middle.block111 ]
  br label %.lr.ph66

vector.ph114:                                     ; preds = %.lr.ph66.preheader
  %n.vec116 = and i64 %wide.trip.count82, 4294967288
  br label %vector.body118

vector.body118:                                   ; preds = %vector.body118, %vector.ph114
  %index119 = phi i64 [ 0, %vector.ph114 ], [ %index.next122, %vector.body118 ]
  %82 = getelementptr inbounds i32, ptr %12, i64 %index119
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  %wide.load120 = load <4 x i32>, ptr %82, align 4, !tbaa !12
  %wide.load121 = load <4 x i32>, ptr %83, align 4, !tbaa !12
  %84 = add nsw <4 x i32> %wide.load120, <i32 -1, i32 -1, i32 -1, i32 -1>
  %85 = add nsw <4 x i32> %wide.load121, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %84, ptr %82, align 4, !tbaa !12
  store <4 x i32> %85, ptr %83, align 4, !tbaa !12
  %index.next122 = add nuw i64 %index119, 8
  %86 = icmp eq i64 %index.next122, %n.vec116
  br i1 %86, label %middle.block111, label %vector.body118, !llvm.loop !31

middle.block111:                                  ; preds = %vector.body118
  %cmp.n123 = icmp eq i64 %n.vec116, %wide.trip.count82
  br i1 %cmp.n123, label %._crit_edge67, label %.lr.ph66.preheader124

.lr.ph63:                                         ; preds = %.lr.ph63.preheader125, %.lr.ph63
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph63 ], [ %indvars.iv74.ph, %.lr.ph63.preheader125 ]
  %87 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv74
  %88 = load i32, ptr %87, align 4, !tbaa !12
  %89 = add nsw i32 %88, -1
  store i32 %89, ptr %87, align 4, !tbaa !12
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count77
  br i1 %exitcond78.not, label %.preheader, label %.lr.ph63, !llvm.loop !32

._crit_edge67:                                    ; preds = %.lr.ph66, %middle.block111, %.preheader
  %90 = load i32, ptr %26, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  ret i32 %90

.lr.ph66:                                         ; preds = %.lr.ph66.preheader124, %.lr.ph66
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph66 ], [ %indvars.iv79.ph, %.lr.ph66.preheader124 ]
  %91 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv79
  %92 = load i32, ptr %91, align 4, !tbaa !12
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr %91, align 4, !tbaa !12
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge67, label %.lr.ph66, !llvm.loop !33
}

declare void @f_snkerq(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, double 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, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { noreturn nounwind }
attributes #5 = { 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 = !{!6, !9, i64 36}
!12 = !{!9, !9, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14, !15, !16}
!18 = distinct !{!18, !14, !16, !15}
!19 = !{!20, !10, i64 96}
!20 = !{!"_ZTS12sqoptProblem", !6, i64 0, !10, i64 96}
!21 = !{!6, !10, i64 88}
!22 = !{!6, !9, i64 76}
!23 = !{!6, !10, i64 80}
!24 = !{!6, !9, i64 72}
!25 = !{!6, !10, i64 64}
!26 = !{!6, !9, i64 44}
!27 = !{!6, !10, i64 56}
!28 = !{!6, !9, i64 48}
!29 = distinct !{!29, !14, !15, !16}
!30 = distinct !{!30, !14, !16, !15}
!31 = distinct !{!31, !14, !15, !16}
!32 = distinct !{!32, !14, !16, !15}
!33 = distinct !{!33, !14, !16, !15}


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