; LLVM IR from opensim-org/opensim-moco :: tropter/external/snopt-interface/src (snopt_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.snProblem = type { ptr, i32, i32, i32, ptr, ptr, ptr, 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__.snoptC = external hidden unnamed_addr constant [195 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 @setWorkspace(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @snoptC(ptr noundef %0, i32 noundef %1, i32 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) #2 {
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %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 double, 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 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 i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  store ptr %0, ptr %25, align 8, !tbaa !5
  store i32 %1, ptr %26, align 4, !tbaa !9
  store i32 %2, ptr %27, align 4, !tbaa !9
  store i32 %3, ptr %28, align 4, !tbaa !9
  store i32 %4, ptr %29, align 4, !tbaa !9
  store i32 %5, ptr %30, align 4, !tbaa !9
  store i32 %6, ptr %31, align 4, !tbaa !9
  store i32 %7, ptr %32, align 4, !tbaa !9
  store i32 %8, ptr %33, align 4, !tbaa !9
  store double %9, ptr %34, align 8, !tbaa !11
  store ptr %10, ptr %35, align 8, !tbaa !5
  store ptr %11, ptr %36, align 8, !tbaa !5
  store ptr %12, ptr %37, align 8, !tbaa !5
  store ptr %13, ptr %38, align 8, !tbaa !5
  store ptr %14, ptr %39, align 8, !tbaa !5
  store ptr %15, ptr %40, align 8, !tbaa !5
  store ptr %16, ptr %41, align 8, !tbaa !5
  store ptr %17, ptr %42, align 8, !tbaa !5
  store ptr %18, ptr %43, align 8, !tbaa !5
  store ptr %19, ptr %44, align 8, !tbaa !5
  store ptr %20, ptr %45, align 8, !tbaa !5
  store ptr %21, ptr %46, align 8, !tbaa !5
  store ptr %22, ptr %47, align 8, !tbaa !5
  store ptr %23, ptr %48, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #4
  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
  %54 = load ptr, ptr %25, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.snProblem, ptr %54, i32 0, i32 2
  %56 = load i32, ptr %55, align 4, !tbaa !13
  %57 = icmp eq i32 %56, 1
  br i1 %57, label %58, label %59

58:                                               ; preds = %24
  br label %60

59:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 763, ptr noundef @__PRETTY_FUNCTION__.snoptC) #5
  unreachable

60:                                               ; preds = %58
  %61 = load ptr, ptr %25, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.snProblem, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !15
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %73

65:                                               ; preds = %60
  %66 = load ptr, ptr %25, align 8, !tbaa !5
  %67 = load i32, ptr %27, align 4, !tbaa !9
  %68 = load i32, ptr %28, align 4, !tbaa !9
  %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
  call void @setWorkspace(ptr noundef %66, i32 noundef %67, i32 noundef %68, i32 noundef %69, i32 noundef -1, i32 noundef %70, i32 noundef %71, i32 noundef %72)
  br label %73

73:                                               ; preds = %65, %60
  store i32 0, ptr %49, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %85, %73
  %75 = load i32, ptr %49, align 4, !tbaa !9
  %76 = load i32, ptr %29, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %88

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

85:                                               ; preds = %78
  %86 = load i32, ptr %49, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %49, align 4, !tbaa !9
  br label %74, !llvm.loop !16

88:                                               ; preds = %74
  store i32 0, ptr %49, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %100, %88
  %90 = load i32, ptr %49, align 4, !tbaa !9
  %91 = load i32, ptr %28, align 4, !tbaa !9
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %93, label %103

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

100:                                              ; preds = %93
  %101 = load i32, ptr %49, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %49, align 4, !tbaa !9
  br label %89, !llvm.loop !18

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

168:                                              ; preds = %179, %103
  %169 = load i32, ptr %49, align 4, !tbaa !9
  %170 = load i32, ptr %29, align 4, !tbaa !9
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %172, label %182

172:                                              ; preds = %168
  %173 = load ptr, ptr %37, align 8, !tbaa !5
  %174 = load i32, ptr %49, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i32, ptr %173, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = add nsw i32 %177, -1
  store i32 %178, ptr %176, align 4, !tbaa !9
  br label %179

179:                                              ; preds = %172
  %180 = load i32, ptr %49, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %49, align 4, !tbaa !9
  br label %168, !llvm.loop !32

182:                                              ; preds = %168
  store i32 0, ptr %49, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %194, %182
  %184 = load i32, ptr %49, align 4, !tbaa !9
  %185 = load i32, ptr %28, align 4, !tbaa !9
  %186 = icmp sle i32 %184, %185
  br i1 %186, label %187, label %197

187:                                              ; preds = %183
  %188 = load ptr, ptr %38, align 8, !tbaa !5
  %189 = load i32, ptr %49, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds i32, ptr %188, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !9
  %193 = add nsw i32 %192, -1
  store i32 %193, ptr %191, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %187
  %195 = load i32, ptr %49, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %49, align 4, !tbaa !9
  br label %183, !llvm.loop !33

197:                                              ; preds = %183
  %198 = load i32, ptr %50, align 4, !tbaa !9
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #4
  ret i32 %198
}

declare void @f_snkerc(i32 noundef, ptr noundef, i32 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, 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, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !6, i64 64, !6, i64 72, !10, i64 80, !10, i64 84, !6, i64 88, !6, i64 96}
!15 = !{!14, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!14, !6, i64 0}
!20 = !{!14, !6, i64 32}
!21 = !{!14, !6, i64 40}
!22 = !{!14, !6, i64 48}
!23 = !{!14, !6, i64 24}
!24 = !{!14, !6, i64 88}
!25 = !{!14, !10, i64 84}
!26 = !{!14, !6, i64 96}
!27 = !{!14, !10, i64 80}
!28 = !{!14, !6, i64 64}
!29 = !{!14, !10, i64 60}
!30 = !{!14, !6, i64 72}
!31 = !{!14, !10, i64 56}
!32 = distinct !{!32, !17}
!33 = distinct !{!33, !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__.snoptC = external hidden unnamed_addr constant [195 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 @setWorkspace(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @snoptC(ptr noundef %0, i32 noundef %1, i32 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) local_unnamed_addr #2 {
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #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
  %28 = getelementptr inbounds i8, ptr %0, i64 12
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %32, label %31

31:                                               ; preds = %24
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 763, ptr noundef nonnull @__PRETTY_FUNCTION__.snoptC) #5
  unreachable

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

36:                                               ; preds = %32
  tail call void @setWorkspace(ptr noundef nonnull %0, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef -1, i32 noundef %5, i32 noundef %6, i32 noundef %7)
  br label %37

37:                                               ; preds = %36, %32
  %38 = icmp sgt i32 %4, 0
  br i1 %38, label %.lr.ph.preheader, label %.preheader68

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

.lr.ph.preheader139:                              ; 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 ]
  %39 = getelementptr inbounds i32, ptr %12, i64 %index
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %wide.load = load <4 x i32>, ptr %39, align 4, !tbaa !12
  %wide.load96 = load <4 x i32>, ptr %40, align 4, !tbaa !12
  %41 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %42 = add nsw <4 x i32> %wide.load96, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %41, ptr %39, align 4, !tbaa !12
  store <4 x i32> %42, ptr %40, align 4, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, 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 %.preheader68, label %.lr.ph.preheader139

.preheader68:                                     ; preds = %.lr.ph, %middle.block, %37
  %.not70 = icmp slt i32 %3, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph72.preheader

.lr.ph72.preheader:                               ; preds = %.preheader68
  %44 = add nuw i32 %3, 1
  %wide.trip.count84 = zext i32 %44 to i64
  %min.iters.check99 = icmp ult i32 %3, 7
  br i1 %min.iters.check99, label %.lr.ph72.preheader138, label %vector.ph100

.lr.ph72.preheader138:                            ; preds = %middle.block97, %.lr.ph72.preheader
  %indvars.iv81.ph = phi i64 [ 0, %.lr.ph72.preheader ], [ %n.vec102, %middle.block97 ]
  br label %.lr.ph72

vector.ph100:                                     ; preds = %.lr.ph72.preheader
  %n.vec102 = and i64 %wide.trip.count84, 4294967288
  br label %vector.body104

vector.body104:                                   ; preds = %vector.body104, %vector.ph100
  %index105 = phi i64 [ 0, %vector.ph100 ], [ %index.next108, %vector.body104 ]
  %45 = getelementptr inbounds i32, ptr %13, i64 %index105
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %wide.load106 = load <4 x i32>, ptr %45, align 4, !tbaa !12
  %wide.load107 = load <4 x i32>, ptr %46, align 4, !tbaa !12
  %47 = add nsw <4 x i32> %wide.load106, <i32 1, i32 1, i32 1, i32 1>
  %48 = add nsw <4 x i32> %wide.load107, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %47, ptr %45, align 4, !tbaa !12
  store <4 x i32> %48, ptr %46, align 4, !tbaa !12
  %index.next108 = add nuw i64 %index105, 8
  %49 = icmp eq i64 %index.next108, %n.vec102
  br i1 %49, label %middle.block97, label %vector.body104, !llvm.loop !17

middle.block97:                                   ; preds = %vector.body104
  %cmp.n109 = icmp eq i64 %n.vec102, %wide.trip.count84
  br i1 %cmp.n109, label %._crit_edge, label %.lr.ph72.preheader138

.lr.ph:                                           ; preds = %.lr.ph.preheader139, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader139 ]
  %50 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv
  %51 = load i32, ptr %50, align 4, !tbaa !12
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, 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 %.preheader68, label %.lr.ph, !llvm.loop !18

.lr.ph72:                                         ; preds = %.lr.ph72.preheader138, %.lr.ph72
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.lr.ph72 ], [ %indvars.iv81.ph, %.lr.ph72.preheader138 ]
  %53 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv81
  %54 = load i32, ptr %53, align 4, !tbaa !12
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %53, align 4, !tbaa !12
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %._crit_edge, label %.lr.ph72, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph72, %middle.block97, %.preheader68
  %56 = add nsw i32 %8, 1
  %57 = load ptr, ptr %0, align 8, !tbaa !20
  %58 = getelementptr inbounds i8, ptr %0, i64 32
  %59 = load ptr, ptr %58, align 8, !tbaa !21
  %60 = getelementptr inbounds i8, ptr %0, i64 40
  %61 = load ptr, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds i8, ptr %0, i64 48
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = getelementptr inbounds i8, ptr %0, i64 24
  %65 = load ptr, ptr %64, align 8, !tbaa !24
  %66 = getelementptr inbounds i8, ptr %0, i64 88
  %67 = load ptr, ptr %66, align 8, !tbaa !25
  %68 = getelementptr inbounds i8, ptr %0, i64 84
  %69 = load i32, ptr %68, align 4, !tbaa !26
  %70 = getelementptr inbounds i8, ptr %0, i64 96
  %71 = load ptr, ptr %70, align 8, !tbaa !27
  %72 = getelementptr inbounds i8, ptr %0, i64 80
  %73 = load i32, ptr %72, align 8, !tbaa !28
  %74 = getelementptr inbounds i8, ptr %0, i64 64
  %75 = load ptr, ptr %74, align 8, !tbaa !29
  %76 = getelementptr inbounds i8, ptr %0, i64 60
  %77 = load i32, ptr %76, align 4, !tbaa !30
  %78 = getelementptr inbounds i8, ptr %0, i64 72
  %79 = load ptr, ptr %78, align 8, !tbaa !31
  %80 = getelementptr inbounds i8, ptr %0, i64 56
  %81 = load i32, ptr %80, align 8, !tbaa !32
  call void @f_snkerc(i32 noundef %1, ptr noundef %57, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %56, double noundef %9, ptr noundef %10, ptr noundef %59, ptr noundef %61, ptr noundef %63, ptr noundef %65, 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 nonnull %25, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %20, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef %67, i32 noundef %69, ptr noundef %71, i32 noundef %73, ptr noundef %75, i32 noundef %77, ptr noundef %79, i32 noundef %81) #4
  br i1 %38, label %.lr.ph75.preheader, label %.preheader

.lr.ph75.preheader:                               ; preds = %._crit_edge
  %wide.trip.count89 = zext nneg i32 %4 to i64
  %min.iters.check112 = icmp ult i32 %4, 8
  br i1 %min.iters.check112, label %.lr.ph75.preheader137, label %vector.ph113

.lr.ph75.preheader137:                            ; preds = %middle.block110, %.lr.ph75.preheader
  %indvars.iv86.ph = phi i64 [ 0, %.lr.ph75.preheader ], [ %n.vec115, %middle.block110 ]
  br label %.lr.ph75

vector.ph113:                                     ; preds = %.lr.ph75.preheader
  %n.vec115 = and i64 %wide.trip.count89, 2147483640
  br label %vector.body117

vector.body117:                                   ; preds = %vector.body117, %vector.ph113
  %index118 = phi i64 [ 0, %vector.ph113 ], [ %index.next121, %vector.body117 ]
  %82 = getelementptr inbounds i32, ptr %12, i64 %index118
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  %wide.load119 = load <4 x i32>, ptr %82, align 4, !tbaa !12
  %wide.load120 = load <4 x i32>, ptr %83, align 4, !tbaa !12
  %84 = add nsw <4 x i32> %wide.load119, <i32 -1, i32 -1, i32 -1, i32 -1>
  %85 = add nsw <4 x i32> %wide.load120, <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.next121 = add nuw i64 %index118, 8
  %86 = icmp eq i64 %index.next121, %n.vec115
  br i1 %86, label %middle.block110, label %vector.body117, !llvm.loop !33

middle.block110:                                  ; preds = %vector.body117
  %cmp.n122 = icmp eq i64 %n.vec115, %wide.trip.count89
  br i1 %cmp.n122, label %.preheader, label %.lr.ph75.preheader137

.preheader:                                       ; preds = %.lr.ph75, %middle.block110, %._crit_edge
  br i1 %.not70, label %._crit_edge79, label %.lr.ph78.preheader

.lr.ph78.preheader:                               ; preds = %.preheader
  %87 = add nuw i32 %3, 1
  %wide.trip.count94 = zext i32 %87 to i64
  %min.iters.check125 = icmp ult i32 %3, 7
  br i1 %min.iters.check125, label %.lr.ph78.preheader136, label %vector.ph126

.lr.ph78.preheader136:                            ; preds = %middle.block123, %.lr.ph78.preheader
  %indvars.iv91.ph = phi i64 [ 0, %.lr.ph78.preheader ], [ %n.vec128, %middle.block123 ]
  br label %.lr.ph78

vector.ph126:                                     ; preds = %.lr.ph78.preheader
  %n.vec128 = and i64 %wide.trip.count94, 4294967288
  br label %vector.body130

vector.body130:                                   ; preds = %vector.body130, %vector.ph126
  %index131 = phi i64 [ 0, %vector.ph126 ], [ %index.next134, %vector.body130 ]
  %88 = getelementptr inbounds i32, ptr %13, i64 %index131
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  %wide.load132 = load <4 x i32>, ptr %88, align 4, !tbaa !12
  %wide.load133 = load <4 x i32>, ptr %89, align 4, !tbaa !12
  %90 = add nsw <4 x i32> %wide.load132, <i32 -1, i32 -1, i32 -1, i32 -1>
  %91 = add nsw <4 x i32> %wide.load133, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %90, ptr %88, align 4, !tbaa !12
  store <4 x i32> %91, ptr %89, align 4, !tbaa !12
  %index.next134 = add nuw i64 %index131, 8
  %92 = icmp eq i64 %index.next134, %n.vec128
  br i1 %92, label %middle.block123, label %vector.body130, !llvm.loop !34

middle.block123:                                  ; preds = %vector.body130
  %cmp.n135 = icmp eq i64 %n.vec128, %wide.trip.count94
  br i1 %cmp.n135, label %._crit_edge79, label %.lr.ph78.preheader136

.lr.ph75:                                         ; preds = %.lr.ph75.preheader137, %.lr.ph75
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.lr.ph75 ], [ %indvars.iv86.ph, %.lr.ph75.preheader137 ]
  %93 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv86
  %94 = load i32, ptr %93, align 4, !tbaa !12
  %95 = add nsw i32 %94, -1
  store i32 %95, ptr %93, align 4, !tbaa !12
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %.preheader, label %.lr.ph75, !llvm.loop !35

.lr.ph78:                                         ; preds = %.lr.ph78.preheader136, %.lr.ph78
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %.lr.ph78 ], [ %indvars.iv91.ph, %.lr.ph78.preheader136 ]
  %96 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv91
  %97 = load i32, ptr %96, align 4, !tbaa !12
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %96, align 4, !tbaa !12
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count94
  br i1 %exitcond95.not, label %._crit_edge79, label %.lr.ph78, !llvm.loop !36

._crit_edge79:                                    ; preds = %.lr.ph78, %middle.block123, %.preheader
  %99 = load i32, ptr %25, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #4
  ret i32 %99
}

declare void @f_snkerc(i32 noundef, ptr noundef, i32 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, 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, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !10, i64 60, !7, i64 64, !7, i64 72, !10, i64 80, !10, i64 84, !7, i64 88, !7, i64 96}
!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 0}
!21 = !{!6, !7, i64 32}
!22 = !{!6, !7, i64 40}
!23 = !{!6, !7, i64 48}
!24 = !{!6, !7, i64 24}
!25 = !{!6, !7, i64 88}
!26 = !{!6, !10, i64 84}
!27 = !{!6, !7, i64 96}
!28 = !{!6, !10, i64 80}
!29 = !{!6, !7, i64 64}
!30 = !{!6, !10, i64 60}
!31 = !{!6, !7, i64 72}
!32 = !{!6, !10, i64 56}
!33 = distinct !{!33, !14, !15, !16}
!34 = distinct !{!34, !14, !15, !16}
!35 = distinct !{!35, !14, !16, !15}
!36 = distinct !{!36, !14, !16, !15}


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