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

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

@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [109 x i8], align 1
@__PRETTY_FUNCTION__.solveQ = external hidden unnamed_addr constant [208 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqWorkspace(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @solveQ(ptr noundef %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 %21, ptr noundef %22, ptr noundef %23, ptr noundef %24) #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
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #4
  %56 = load ptr, ptr %26, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.sqProblem, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !13
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %61

60:                                               ; preds = %25
  br label %62

61:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 392, ptr noundef @__PRETTY_FUNCTION__.solveQ) #5
  unreachable

62:                                               ; preds = %60
  %63 = load ptr, ptr %26, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.sqProblem, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 8, !tbaa !15
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %74

67:                                               ; preds = %62
  %68 = load ptr, ptr %26, align 8, !tbaa !5
  %69 = load i32, ptr %29, align 4, !tbaa !9
  %70 = load i32, ptr %30, align 4, !tbaa !9
  %71 = load i32, ptr %31, align 4, !tbaa !9
  %72 = load i32, ptr %32, align 4, !tbaa !9
  %73 = load i32, ptr %33, align 4, !tbaa !9
  call void @sqWorkspace(ptr noundef %68, i32 noundef %69, i32 noundef %70, i32 noundef %71, i32 noundef %72, i32 noundef %73)
  br label %74

74:                                               ; preds = %67, %62
  store i32 0, ptr %51, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %86, %74
  %76 = load i32, ptr %51, align 4, !tbaa !9
  %77 = load i32, ptr %31, align 4, !tbaa !9
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %79, label %89

79:                                               ; preds = %75
  %80 = load ptr, ptr %37, align 8, !tbaa !5
  %81 = load i32, ptr %51, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %80, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %79
  %87 = load i32, ptr %51, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %51, align 4, !tbaa !9
  br label %75, !llvm.loop !16

89:                                               ; preds = %75
  store i32 0, ptr %51, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %101, %89
  %91 = load i32, ptr %51, align 4, !tbaa !9
  %92 = load i32, ptr %30, align 4, !tbaa !9
  %93 = icmp sle i32 %91, %92
  br i1 %93, label %94, label %104

94:                                               ; preds = %90
  %95 = load ptr, ptr %38, align 8, !tbaa !5
  %96 = load i32, ptr %51, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr %95, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %98, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %94
  %102 = load i32, ptr %51, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %51, align 4, !tbaa !9
  br label %90, !llvm.loop !18

104:                                              ; preds = %90
  %105 = load i32, ptr %34, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %53, align 4, !tbaa !9
  %107 = load i32, ptr %27, align 4, !tbaa !9
  %108 = load ptr, ptr %28, align 8, !tbaa !5
  %109 = load ptr, ptr %26, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.sqProblem, ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !19
  %112 = load i32, ptr %29, align 4, !tbaa !9
  %113 = load i32, ptr %30, align 4, !tbaa !9
  %114 = load i32, ptr %31, align 4, !tbaa !9
  %115 = load i32, ptr %32, align 4, !tbaa !9
  %116 = load i32, ptr %33, align 4, !tbaa !9
  %117 = load i32, ptr %53, align 4, !tbaa !9
  %118 = load double, ptr %35, align 8, !tbaa !11
  %119 = load ptr, ptr %26, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.sqProblem, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !20
  %122 = load ptr, ptr %36, align 8, !tbaa !5
  %123 = load ptr, ptr %37, align 8, !tbaa !5
  %124 = load ptr, ptr %38, align 8, !tbaa !5
  %125 = load ptr, ptr %39, align 8, !tbaa !5
  %126 = load ptr, ptr %40, align 8, !tbaa !5
  %127 = load ptr, ptr %41, align 8, !tbaa !5
  %128 = load ptr, ptr %42, align 8, !tbaa !5
  %129 = load ptr, ptr %43, align 8, !tbaa !5
  %130 = load ptr, ptr %44, align 8, !tbaa !5
  %131 = load ptr, ptr %45, align 8, !tbaa !5
  %132 = load ptr, ptr %46, align 8, !tbaa !5
  %133 = load ptr, ptr %48, align 8, !tbaa !5
  %134 = load ptr, ptr %49, align 8, !tbaa !5
  %135 = load ptr, ptr %50, align 8, !tbaa !5
  %136 = load ptr, ptr %47, align 8, !tbaa !5
  %137 = load ptr, ptr %26, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.sqProblem, ptr %137, i32 0, i32 11
  %139 = load ptr, ptr %138, align 8, !tbaa !21
  %140 = load ptr, ptr %26, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.sqProblem, ptr %140, i32 0, i32 10
  %142 = load i32, ptr %141, align 4, !tbaa !22
  %143 = load ptr, ptr %26, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.sqProblem, ptr %143, i32 0, i32 12
  %145 = load ptr, ptr %144, align 8, !tbaa !23
  %146 = load ptr, ptr %26, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.sqProblem, ptr %146, i32 0, i32 9
  %148 = load i32, ptr %147, align 8, !tbaa !24
  %149 = load ptr, ptr %26, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.sqProblem, ptr %149, i32 0, i32 7
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = load ptr, ptr %26, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.sqProblem, ptr %152, i32 0, i32 6
  %154 = load i32, ptr %153, align 4, !tbaa !26
  %155 = load ptr, ptr %26, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.sqProblem, ptr %155, i32 0, i32 8
  %157 = load ptr, ptr %156, align 8, !tbaa !27
  %158 = load ptr, ptr %26, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.sqProblem, ptr %158, i32 0, i32 5
  %160 = load i32, ptr %159, align 8, !tbaa !28
  call void @f_snkerq(i32 noundef %107, ptr noundef %108, ptr noundef %111, i32 noundef %112, i32 noundef %113, i32 noundef %114, i32 noundef %115, i32 noundef %116, i32 noundef %117, double noundef %118, ptr noundef %121, ptr noundef %122, 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 %52, ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136, ptr noundef %54, ptr noundef %55, ptr noundef %139, i32 noundef %142, ptr noundef %145, i32 noundef %148, ptr noundef %151, i32 noundef %154, ptr noundef %157, i32 noundef %160)
  store i32 0, ptr %51, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %172, %104
  %162 = load i32, ptr %51, align 4, !tbaa !9
  %163 = load i32, ptr %31, align 4, !tbaa !9
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %165, label %175

165:                                              ; preds = %161
  %166 = load ptr, ptr %37, align 8, !tbaa !5
  %167 = load i32, ptr %51, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = add nsw i32 %170, -1
  store i32 %171, ptr %169, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %165
  %173 = load i32, ptr %51, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %51, align 4, !tbaa !9
  br label %161, !llvm.loop !29

175:                                              ; preds = %161
  store i32 0, ptr %51, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %187, %175
  %177 = load i32, ptr %51, align 4, !tbaa !9
  %178 = load i32, ptr %30, align 4, !tbaa !9
  %179 = icmp sle i32 %177, %178
  br i1 %179, label %180, label %190

180:                                              ; preds = %176
  %181 = load ptr, ptr %38, align 8, !tbaa !5
  %182 = load i32, ptr %51, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %181, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !9
  %186 = add nsw i32 %185, -1
  store i32 %186, ptr %184, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %180
  %188 = load i32, ptr %51, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %51, align 4, !tbaa !9
  br label %176, !llvm.loop !30

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 12}
!14 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !6, i64 64, !6, i64 72}
!15 = !{!14, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!14, !6, i64 24}
!20 = !{!14, !6, i64 0}
!21 = !{!14, !6, i64 64}
!22 = !{!14, !10, i64 60}
!23 = !{!14, !6, i64 72}
!24 = !{!14, !10, i64 56}
!25 = !{!14, !6, i64 40}
!26 = !{!14, !10, i64 36}
!27 = !{!14, !6, i64 48}
!28 = !{!14, !10, i64 32}
!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.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [109 x i8], align 1
@__PRETTY_FUNCTION__.solveQ = external hidden unnamed_addr constant [208 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqWorkspace(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @solveQ(ptr noundef %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 %21, ptr noundef %22, ptr noundef %23, ptr noundef %24) local_unnamed_addr #2 {
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #4
  %29 = getelementptr inbounds i8, ptr %0, i64 12
  %30 = load i32, ptr %29, align 4, !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.3, ptr noundef nonnull @.str.4, i32 noundef 392, ptr noundef nonnull @__PRETTY_FUNCTION__.solveQ) #5
  unreachable

33:                                               ; preds = %25
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %33
  tail call void @sqWorkspace(ptr noundef nonnull %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 %.preheader65

.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.preheader136, label %vector.ph

.lr.ph.preheader136:                              ; 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.load93 = 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.load93, <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 %.preheader65, label %.lr.ph.preheader136

.preheader65:                                     ; preds = %.lr.ph, %middle.block, %38
  %.not67 = icmp slt i32 %4, 0
  br i1 %.not67, label %._crit_edge, label %.lr.ph69.preheader

.lr.ph69.preheader:                               ; preds = %.preheader65
  %45 = add nuw i32 %4, 1
  %wide.trip.count81 = zext i32 %45 to i64
  %min.iters.check96 = icmp ult i32 %4, 7
  br i1 %min.iters.check96, label %.lr.ph69.preheader135, label %vector.ph97

.lr.ph69.preheader135:                            ; preds = %middle.block94, %.lr.ph69.preheader
  %indvars.iv78.ph = phi i64 [ 0, %.lr.ph69.preheader ], [ %n.vec99, %middle.block94 ]
  br label %.lr.ph69

vector.ph97:                                      ; preds = %.lr.ph69.preheader
  %n.vec99 = and i64 %wide.trip.count81, 4294967288
  br label %vector.body101

vector.body101:                                   ; preds = %vector.body101, %vector.ph97
  %index102 = phi i64 [ 0, %vector.ph97 ], [ %index.next105, %vector.body101 ]
  %46 = getelementptr inbounds i32, ptr %12, i64 %index102
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %wide.load103 = load <4 x i32>, ptr %46, align 4, !tbaa !12
  %wide.load104 = load <4 x i32>, ptr %47, align 4, !tbaa !12
  %48 = add nsw <4 x i32> %wide.load103, <i32 1, i32 1, i32 1, i32 1>
  %49 = add nsw <4 x i32> %wide.load104, <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.next105 = add nuw i64 %index102, 8
  %50 = icmp eq i64 %index.next105, %n.vec99
  br i1 %50, label %middle.block94, label %vector.body101, !llvm.loop !17

middle.block94:                                   ; preds = %vector.body101
  %cmp.n106 = icmp eq i64 %n.vec99, %wide.trip.count81
  br i1 %cmp.n106, label %._crit_edge, label %.lr.ph69.preheader135

.lr.ph:                                           ; preds = %.lr.ph.preheader136, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader136 ]
  %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 %.preheader65, label %.lr.ph, !llvm.loop !18

.lr.ph69:                                         ; preds = %.lr.ph69.preheader135, %.lr.ph69
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %.lr.ph69 ], [ %indvars.iv78.ph, %.lr.ph69.preheader135 ]
  %54 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv78
  %55 = load i32, ptr %54, align 4, !tbaa !12
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %54, align 4, !tbaa !12
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge, label %.lr.ph69, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph69, %middle.block94, %.preheader65
  %57 = add nsw i32 %8, 1
  %58 = getelementptr inbounds i8, ptr %0, i64 24
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = load ptr, ptr %0, align 8, !tbaa !21
  %61 = getelementptr inbounds i8, ptr %0, i64 64
  %62 = load ptr, ptr %61, align 8, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %0, i64 60
  %64 = load i32, ptr %63, align 4, !tbaa !23
  %65 = getelementptr inbounds i8, ptr %0, i64 72
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %0, i64 56
  %68 = load i32, ptr %67, align 8, !tbaa !25
  %69 = getelementptr inbounds i8, ptr %0, i64 40
  %70 = load ptr, ptr %69, align 8, !tbaa !26
  %71 = getelementptr inbounds i8, ptr %0, i64 36
  %72 = load i32, ptr %71, align 4, !tbaa !27
  %73 = getelementptr inbounds i8, ptr %0, i64 48
  %74 = load ptr, ptr %73, align 8, !tbaa !28
  %75 = getelementptr inbounds i8, ptr %0, i64 32
  %76 = load i32, ptr %75, align 8, !tbaa !29
  call void @f_snkerq(i32 noundef %1, ptr noundef %2, ptr noundef %59, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %57, double noundef %9, ptr noundef %60, 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 %22, ptr noundef %23, ptr noundef %24, ptr noundef %21, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %62, i32 noundef %64, ptr noundef %66, i32 noundef %68, ptr noundef %70, i32 noundef %72, ptr noundef %74, i32 noundef %76) #4
  br i1 %39, label %.lr.ph72.preheader, label %.preheader

.lr.ph72.preheader:                               ; preds = %._crit_edge
  %wide.trip.count86 = zext nneg i32 %5 to i64
  %min.iters.check109 = icmp ult i32 %5, 8
  br i1 %min.iters.check109, label %.lr.ph72.preheader134, label %vector.ph110

.lr.ph72.preheader134:                            ; preds = %middle.block107, %.lr.ph72.preheader
  %indvars.iv83.ph = phi i64 [ 0, %.lr.ph72.preheader ], [ %n.vec112, %middle.block107 ]
  br label %.lr.ph72

vector.ph110:                                     ; preds = %.lr.ph72.preheader
  %n.vec112 = and i64 %wide.trip.count86, 2147483640
  br label %vector.body114

vector.body114:                                   ; preds = %vector.body114, %vector.ph110
  %index115 = phi i64 [ 0, %vector.ph110 ], [ %index.next118, %vector.body114 ]
  %77 = getelementptr inbounds i32, ptr %11, i64 %index115
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %wide.load116 = load <4 x i32>, ptr %77, align 4, !tbaa !12
  %wide.load117 = load <4 x i32>, ptr %78, align 4, !tbaa !12
  %79 = add nsw <4 x i32> %wide.load116, <i32 -1, i32 -1, i32 -1, i32 -1>
  %80 = add nsw <4 x i32> %wide.load117, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %79, ptr %77, align 4, !tbaa !12
  store <4 x i32> %80, ptr %78, align 4, !tbaa !12
  %index.next118 = add nuw i64 %index115, 8
  %81 = icmp eq i64 %index.next118, %n.vec112
  br i1 %81, label %middle.block107, label %vector.body114, !llvm.loop !30

middle.block107:                                  ; preds = %vector.body114
  %cmp.n119 = icmp eq i64 %n.vec112, %wide.trip.count86
  br i1 %cmp.n119, label %.preheader, label %.lr.ph72.preheader134

.preheader:                                       ; preds = %.lr.ph72, %middle.block107, %._crit_edge
  br i1 %.not67, label %._crit_edge76, label %.lr.ph75.preheader

.lr.ph75.preheader:                               ; preds = %.preheader
  %82 = add nuw i32 %4, 1
  %wide.trip.count91 = zext i32 %82 to i64
  %min.iters.check122 = icmp ult i32 %4, 7
  br i1 %min.iters.check122, label %.lr.ph75.preheader133, label %vector.ph123

.lr.ph75.preheader133:                            ; preds = %middle.block120, %.lr.ph75.preheader
  %indvars.iv88.ph = phi i64 [ 0, %.lr.ph75.preheader ], [ %n.vec125, %middle.block120 ]
  br label %.lr.ph75

vector.ph123:                                     ; preds = %.lr.ph75.preheader
  %n.vec125 = and i64 %wide.trip.count91, 4294967288
  br label %vector.body127

vector.body127:                                   ; preds = %vector.body127, %vector.ph123
  %index128 = phi i64 [ 0, %vector.ph123 ], [ %index.next131, %vector.body127 ]
  %83 = getelementptr inbounds i32, ptr %12, i64 %index128
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  %wide.load129 = load <4 x i32>, ptr %83, align 4, !tbaa !12
  %wide.load130 = load <4 x i32>, ptr %84, align 4, !tbaa !12
  %85 = add nsw <4 x i32> %wide.load129, <i32 -1, i32 -1, i32 -1, i32 -1>
  %86 = add nsw <4 x i32> %wide.load130, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %85, ptr %83, align 4, !tbaa !12
  store <4 x i32> %86, ptr %84, align 4, !tbaa !12
  %index.next131 = add nuw i64 %index128, 8
  %87 = icmp eq i64 %index.next131, %n.vec125
  br i1 %87, label %middle.block120, label %vector.body127, !llvm.loop !31

middle.block120:                                  ; preds = %vector.body127
  %cmp.n132 = icmp eq i64 %n.vec125, %wide.trip.count91
  br i1 %cmp.n132, label %._crit_edge76, label %.lr.ph75.preheader133

.lr.ph72:                                         ; preds = %.lr.ph72.preheader134, %.lr.ph72
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph72 ], [ %indvars.iv83.ph, %.lr.ph72.preheader134 ]
  %88 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv83
  %89 = load i32, ptr %88, align 4, !tbaa !12
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr %88, align 4, !tbaa !12
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %.preheader, label %.lr.ph72, !llvm.loop !32

.lr.ph75:                                         ; preds = %.lr.ph75.preheader133, %.lr.ph75
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph75 ], [ %indvars.iv88.ph, %.lr.ph75.preheader133 ]
  %91 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv88
  %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.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge76, label %.lr.ph75, !llvm.loop !33

._crit_edge76:                                    ; preds = %.lr.ph75, %middle.block120, %.preheader
  %94 = load i32, ptr %26, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #4
  ret i32 %94
}

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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, !10, i64 12}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !10, i64 56, !10, i64 60, !7, i64 64, !7, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!10, !10, 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 = distinct !{!19, !14, !16, !15}
!20 = !{!6, !7, i64 24}
!21 = !{!6, !7, i64 0}
!22 = !{!6, !7, i64 64}
!23 = !{!6, !10, i64 60}
!24 = !{!6, !7, i64 72}
!25 = !{!6, !10, i64 56}
!26 = !{!6, !7, i64 40}
!27 = !{!6, !10, i64 36}
!28 = !{!6, !7, i64 48}
!29 = !{!6, !10, i64 32}
!30 = distinct !{!30, !14, !15, !16}
!31 = distinct !{!31, !14, !15, !16}
!32 = distinct !{!32, !14, !16, !15}
!33 = distinct !{!33, !14, !16, !15}


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