; 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__.snoptB = external hidden unnamed_addr constant [203 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 @snoptB(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, ptr noundef %24) #2 {
  %26 = alloca ptr, align 8
  %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 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 i32 %2, ptr %28, align 4, !tbaa !9
  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.snProblem, 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 709, ptr noundef @__PRETTY_FUNCTION__.snoptB) #5
  unreachable

62:                                               ; preds = %60
  %63 = load ptr, ptr %26, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.snProblem, 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 %75

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

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

76:                                               ; preds = %87, %75
  %77 = load i32, ptr %51, align 4, !tbaa !9
  %78 = load i32, ptr %30, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %90

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

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

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

91:                                               ; preds = %102, %90
  %92 = load i32, ptr %51, align 4, !tbaa !9
  %93 = load i32, ptr %29, align 4, !tbaa !9
  %94 = icmp sle i32 %92, %93
  br i1 %94, label %95, label %105

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

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

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

171:                                              ; preds = %182, %105
  %172 = load i32, ptr %51, align 4, !tbaa !9
  %173 = load i32, ptr %30, align 4, !tbaa !9
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %175, label %185

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

182:                                              ; preds = %175
  %183 = load i32, ptr %51, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %51, align 4, !tbaa !9
  br label %171, !llvm.loop !32

185:                                              ; preds = %171
  store i32 0, ptr %51, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %197, %185
  %187 = load i32, ptr %51, align 4, !tbaa !9
  %188 = load i32, ptr %29, align 4, !tbaa !9
  %189 = icmp sle i32 %187, %188
  br i1 %189, label %190, label %200

190:                                              ; preds = %186
  %191 = load ptr, ptr %40, align 8, !tbaa !5
  %192 = load i32, ptr %51, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %191, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !9
  %196 = add nsw i32 %195, -1
  store i32 %196, ptr %194, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %190
  %198 = load i32, ptr %51, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %51, align 4, !tbaa !9
  br label %186, !llvm.loop !33

200:                                              ; preds = %186
  %201 = 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 %201
}

declare void @f_snkerb(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, 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__.snoptB = external hidden unnamed_addr constant [203 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 @snoptB(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, 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 709, ptr noundef nonnull @__PRETTY_FUNCTION__.snoptB) #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 @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 %38

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

.lr.ph.preheader:                                 ; preds = %38
  %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.preheader140, label %vector.ph

.lr.ph.preheader140:                              ; 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 %13, i64 %index
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load = load <4 x i32>, ptr %40, align 4, !tbaa !12
  %wide.load97 = 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.load97, <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 %.preheader69, label %.lr.ph.preheader140

.preheader69:                                     ; preds = %.lr.ph, %middle.block, %38
  %.not71 = icmp slt i32 %3, 0
  br i1 %.not71, label %._crit_edge, label %.lr.ph73.preheader

.lr.ph73.preheader:                               ; preds = %.preheader69
  %45 = add nuw i32 %3, 1
  %wide.trip.count85 = zext i32 %45 to i64
  %min.iters.check100 = icmp ult i32 %3, 7
  br i1 %min.iters.check100, label %.lr.ph73.preheader139, label %vector.ph101

.lr.ph73.preheader139:                            ; preds = %middle.block98, %.lr.ph73.preheader
  %indvars.iv82.ph = phi i64 [ 0, %.lr.ph73.preheader ], [ %n.vec103, %middle.block98 ]
  br label %.lr.ph73

vector.ph101:                                     ; preds = %.lr.ph73.preheader
  %n.vec103 = and i64 %wide.trip.count85, 4294967288
  br label %vector.body105

vector.body105:                                   ; preds = %vector.body105, %vector.ph101
  %index106 = phi i64 [ 0, %vector.ph101 ], [ %index.next109, %vector.body105 ]
  %46 = getelementptr inbounds i32, ptr %14, i64 %index106
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %wide.load107 = load <4 x i32>, ptr %46, align 4, !tbaa !12
  %wide.load108 = load <4 x i32>, ptr %47, align 4, !tbaa !12
  %48 = add nsw <4 x i32> %wide.load107, <i32 1, i32 1, i32 1, i32 1>
  %49 = add nsw <4 x i32> %wide.load108, <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.next109 = add nuw i64 %index106, 8
  %50 = icmp eq i64 %index.next109, %n.vec103
  br i1 %50, label %middle.block98, label %vector.body105, !llvm.loop !17

middle.block98:                                   ; preds = %vector.body105
  %cmp.n110 = icmp eq i64 %n.vec103, %wide.trip.count85
  br i1 %cmp.n110, label %._crit_edge, label %.lr.ph73.preheader139

.lr.ph:                                           ; preds = %.lr.ph.preheader140, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader140 ]
  %51 = getelementptr inbounds i32, ptr %13, 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 %.preheader69, label %.lr.ph, !llvm.loop !18

.lr.ph73:                                         ; preds = %.lr.ph73.preheader139, %.lr.ph73
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %.lr.ph73 ], [ %indvars.iv82.ph, %.lr.ph73.preheader139 ]
  %54 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv82
  %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.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond86.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count85
  br i1 %exitcond86.not, label %._crit_edge, label %.lr.ph73, !llvm.loop !19

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

.lr.ph76.preheader:                               ; preds = %._crit_edge
  %wide.trip.count90 = zext nneg i32 %4 to i64
  %min.iters.check113 = icmp ult i32 %4, 8
  br i1 %min.iters.check113, label %.lr.ph76.preheader138, label %vector.ph114

.lr.ph76.preheader138:                            ; preds = %middle.block111, %.lr.ph76.preheader
  %indvars.iv87.ph = phi i64 [ 0, %.lr.ph76.preheader ], [ %n.vec116, %middle.block111 ]
  br label %.lr.ph76

vector.ph114:                                     ; preds = %.lr.ph76.preheader
  %n.vec116 = and i64 %wide.trip.count90, 2147483640
  br label %vector.body118

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

middle.block111:                                  ; preds = %vector.body118
  %cmp.n123 = icmp eq i64 %n.vec116, %wide.trip.count90
  br i1 %cmp.n123, label %.preheader, label %.lr.ph76.preheader138

.preheader:                                       ; preds = %.lr.ph76, %middle.block111, %._crit_edge
  br i1 %.not71, label %._crit_edge80, label %.lr.ph79.preheader

.lr.ph79.preheader:                               ; preds = %.preheader
  %88 = add nuw i32 %3, 1
  %wide.trip.count95 = zext i32 %88 to i64
  %min.iters.check126 = icmp ult i32 %3, 7
  br i1 %min.iters.check126, label %.lr.ph79.preheader137, label %vector.ph127

.lr.ph79.preheader137:                            ; preds = %middle.block124, %.lr.ph79.preheader
  %indvars.iv92.ph = phi i64 [ 0, %.lr.ph79.preheader ], [ %n.vec129, %middle.block124 ]
  br label %.lr.ph79

vector.ph127:                                     ; preds = %.lr.ph79.preheader
  %n.vec129 = and i64 %wide.trip.count95, 4294967288
  br label %vector.body131

vector.body131:                                   ; preds = %vector.body131, %vector.ph127
  %index132 = phi i64 [ 0, %vector.ph127 ], [ %index.next135, %vector.body131 ]
  %89 = getelementptr inbounds i32, ptr %14, i64 %index132
  %90 = getelementptr inbounds i8, ptr %89, i64 16
  %wide.load133 = load <4 x i32>, ptr %89, align 4, !tbaa !12
  %wide.load134 = load <4 x i32>, ptr %90, align 4, !tbaa !12
  %91 = add nsw <4 x i32> %wide.load133, <i32 -1, i32 -1, i32 -1, i32 -1>
  %92 = add nsw <4 x i32> %wide.load134, <i32 -1, i32 -1, i32 -1, i32 -1>
  store <4 x i32> %91, ptr %89, align 4, !tbaa !12
  store <4 x i32> %92, ptr %90, align 4, !tbaa !12
  %index.next135 = add nuw i64 %index132, 8
  %93 = icmp eq i64 %index.next135, %n.vec129
  br i1 %93, label %middle.block124, label %vector.body131, !llvm.loop !34

middle.block124:                                  ; preds = %vector.body131
  %cmp.n136 = icmp eq i64 %n.vec129, %wide.trip.count95
  br i1 %cmp.n136, label %._crit_edge80, label %.lr.ph79.preheader137

.lr.ph76:                                         ; preds = %.lr.ph76.preheader138, %.lr.ph76
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.lr.ph76 ], [ %indvars.iv87.ph, %.lr.ph76.preheader138 ]
  %94 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv87
  %95 = load i32, ptr %94, align 4, !tbaa !12
  %96 = add nsw i32 %95, -1
  store i32 %96, ptr %94, align 4, !tbaa !12
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond91.not = icmp eq i64 %indvars.iv.next88, %wide.trip.count90
  br i1 %exitcond91.not, label %.preheader, label %.lr.ph76, !llvm.loop !35

.lr.ph79:                                         ; preds = %.lr.ph79.preheader137, %.lr.ph79
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph79 ], [ %indvars.iv92.ph, %.lr.ph79.preheader137 ]
  %97 = getelementptr inbounds i32, ptr %14, i64 %indvars.iv92
  %98 = load i32, ptr %97, align 4, !tbaa !12
  %99 = add nsw i32 %98, -1
  store i32 %99, ptr %97, align 4, !tbaa !12
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95
  br i1 %exitcond96.not, label %._crit_edge80, label %.lr.ph79, !llvm.loop !36

._crit_edge80:                                    ; preds = %.lr.ph79, %middle.block124, %.preheader
  %100 = 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 %100
}

declare void @f_snkerb(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, 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