; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/idas (idas_nls_stg)

; 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._generic_SUNNonlinearSolver = type { ptr, ptr, ptr }
%struct._generic_SUNNonlinearSolver_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.IDAMemRec = type { ptr, double, ptr, ptr, i32, double, double, ptr, i32, i32, ptr, ptr, i32, i32, i32, ptr, ptr, i32, i32, double, double, ptr, i32, i32, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, double, i32, i32, double, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, double, ptr, ptr, ptr, [6 x ptr], [6 x double], [6 x double], [6 x double], [6 x double], [6 x double], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, double, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i64, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, ptr, double, double, double, ptr, ptr, ptr, double, double, i32, i32, i64, ptr, i32, ptr, [5 x double], ptr, ptr, i32, ptr, i32 }
%struct._generic_N_Vector = type { ptr, ptr, ptr }
%struct._N_VectorContent_SensWrapper = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @IDASetNonlinearSolverSensStg(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %13

12:                                               ; preds = %2
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef null, i32 noundef -20, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2)
  store i32 -20, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

13:                                               ; preds = %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %14, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef null, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

18:                                               ; preds = %13
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = icmp eq ptr %23, null
  br i1 %24, label %39, label %25

25:                                               ; preds = %18
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %28, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = icmp eq ptr %30, null
  br i1 %31, label %39, label %32

32:                                               ; preds = %25
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %35, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %41

39:                                               ; preds = %32, %25, %18
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %40, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

41:                                               ; preds = %32
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call i32 @SUNNonlinSolGetType(ptr noundef %42)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %41
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %46, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.5)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

47:                                               ; preds = %41
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IDAMemRec, ptr %48, i32 0, i32 23
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %54, label %52

52:                                               ; preds = %47
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %53, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.6)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

54:                                               ; preds = %47
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.IDAMemRec, ptr %55, i32 0, i32 25
  %57 = load i32, ptr %56, align 4, !tbaa !20
  %58 = icmp ne i32 %57, 2
  br i1 %58, label %59, label %61

59:                                               ; preds = %54
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %60, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.7)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

61:                                               ; preds = %54
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.IDAMemRec, ptr %62, i32 0, i32 190
  %64 = load ptr, ptr %63, align 8, !tbaa !21
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %76

66:                                               ; preds = %61
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.IDAMemRec, ptr %67, i32 0, i32 191
  %69 = load i32, ptr %68, align 8, !tbaa !22
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %76

71:                                               ; preds = %66
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.IDAMemRec, ptr %72, i32 0, i32 190
  %74 = load ptr, ptr %73, align 8, !tbaa !21
  %75 = call i32 @SUNNonlinSolFree(ptr noundef %74)
  store i32 %75, ptr %7, align 4, !tbaa !23
  br label %76

76:                                               ; preds = %71, %66, %61
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.IDAMemRec, ptr %78, i32 0, i32 190
  store ptr %77, ptr %79, align 8, !tbaa !21
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.IDAMemRec, ptr %80, i32 0, i32 191
  store i32 0, ptr %81, align 8, !tbaa !22
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.IDAMemRec, ptr %82, i32 0, i32 190
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = call i32 @SUNNonlinSolSetSysFn(ptr noundef %84, ptr noundef @idaNlsResidualSensStg)
  store i32 %85, ptr %7, align 4, !tbaa !23
  %86 = load i32, ptr %7, align 4, !tbaa !23
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %76
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %89, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.8)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

90:                                               ; preds = %76
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.IDAMemRec, ptr %91, i32 0, i32 190
  %93 = load ptr, ptr %92, align 8, !tbaa !21
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = call i32 @SUNNonlinSolSetConvTestFn(ptr noundef %93, ptr noundef @idaNlsConvTestSensStg, ptr noundef %94)
  store i32 %95, ptr %7, align 4, !tbaa !23
  %96 = load i32, ptr %7, align 4, !tbaa !23
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %90
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %99, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.9)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

100:                                              ; preds = %90
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.IDAMemRec, ptr %101, i32 0, i32 190
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = call i32 @SUNNonlinSolSetMaxIters(ptr noundef %103, i32 noundef 4)
  store i32 %104, ptr %7, align 4, !tbaa !23
  %105 = load i32, ptr %7, align 4, !tbaa !23
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %109

107:                                              ; preds = %100
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %108, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.10)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

109:                                              ; preds = %100
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.IDAMemRec, ptr %110, i32 0, i32 199
  %112 = load i32, ptr %111, align 4, !tbaa !24
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %174

114:                                              ; preds = %109
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.IDAMemRec, ptr %115, i32 0, i32 24
  %117 = load i32, ptr %116, align 8, !tbaa !25
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.IDAMemRec, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !26
  %121 = call ptr @N_VNewEmpty_SensWrapper(i32 noundef %117, ptr noundef %120)
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.IDAMemRec, ptr %122, i32 0, i32 195
  store ptr %121, ptr %123, align 8, !tbaa !27
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.IDAMemRec, ptr %124, i32 0, i32 195
  %126 = load ptr, ptr %125, align 8, !tbaa !27
  %127 = icmp eq ptr %126, null
  br i1 %127, label %128, label %130

128:                                              ; preds = %114
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %129, i32 noundef -21, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.11)
  store i32 -21, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

130:                                              ; preds = %114
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.IDAMemRec, ptr %131, i32 0, i32 24
  %133 = load i32, ptr %132, align 8, !tbaa !25
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.IDAMemRec, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !26
  %137 = call ptr @N_VNewEmpty_SensWrapper(i32 noundef %133, ptr noundef %136)
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.IDAMemRec, ptr %138, i32 0, i32 196
  store ptr %137, ptr %139, align 8, !tbaa !28
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.IDAMemRec, ptr %140, i32 0, i32 196
  %142 = load ptr, ptr %141, align 8, !tbaa !28
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %149

144:                                              ; preds = %130
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.IDAMemRec, ptr %145, i32 0, i32 195
  %147 = load ptr, ptr %146, align 8, !tbaa !27
  call void @N_VDestroy(ptr noundef %147)
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %148, i32 noundef -21, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.11)
  store i32 -21, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

149:                                              ; preds = %130
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.IDAMemRec, ptr %150, i32 0, i32 24
  %152 = load i32, ptr %151, align 8, !tbaa !25
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.IDAMemRec, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !26
  %156 = call ptr @N_VNewEmpty_SensWrapper(i32 noundef %152, ptr noundef %155)
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.IDAMemRec, ptr %157, i32 0, i32 197
  store ptr %156, ptr %158, align 8, !tbaa !29
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.IDAMemRec, ptr %159, i32 0, i32 197
  %161 = load ptr, ptr %160, align 8, !tbaa !29
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %171

163:                                              ; preds = %149
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.IDAMemRec, ptr %164, i32 0, i32 195
  %166 = load ptr, ptr %165, align 8, !tbaa !27
  call void @N_VDestroy(ptr noundef %166)
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.IDAMemRec, ptr %167, i32 0, i32 196
  %169 = load ptr, ptr %168, align 8, !tbaa !28
  call void @N_VDestroy(ptr noundef %169)
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %170, i32 noundef -21, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.11)
  store i32 -21, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

171:                                              ; preds = %149
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.IDAMemRec, ptr %172, i32 0, i32 199
  store i32 1, ptr %173, align 4, !tbaa !24
  br label %174

174:                                              ; preds = %171, %109
  store i32 0, ptr %8, align 4, !tbaa !23
  br label %175

175:                                              ; preds = %233, %174
  %176 = load i32, ptr %8, align 4, !tbaa !23
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.IDAMemRec, ptr %177, i32 0, i32 24
  %179 = load i32, ptr %178, align 8, !tbaa !25
  %180 = icmp slt i32 %176, %179
  br i1 %180, label %181, label %236

181:                                              ; preds = %175
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.IDAMemRec, ptr %182, i32 0, i32 83
  %184 = load ptr, ptr %183, align 8, !tbaa !30
  %185 = load i32, ptr %8, align 4, !tbaa !23
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds ptr, ptr %184, i64 %186
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.IDAMemRec, ptr %189, i32 0, i32 195
  %191 = load ptr, ptr %190, align 8, !tbaa !27
  %192 = getelementptr inbounds %struct._generic_N_Vector, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !31
  %194 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !33
  %196 = load i32, ptr %8, align 4, !tbaa !23
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %195, i64 %197
  store ptr %188, ptr %198, align 8, !tbaa !5
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.IDAMemRec, ptr %199, i32 0, i32 80
  %201 = load ptr, ptr %200, align 8, !tbaa !35
  %202 = load i32, ptr %8, align 4, !tbaa !23
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds ptr, ptr %201, i64 %203
  %205 = load ptr, ptr %204, align 8, !tbaa !5
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.IDAMemRec, ptr %206, i32 0, i32 196
  %208 = load ptr, ptr %207, align 8, !tbaa !28
  %209 = getelementptr inbounds %struct._generic_N_Vector, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !31
  %211 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %210, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8, !tbaa !33
  %213 = load i32, ptr %8, align 4, !tbaa !23
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds ptr, ptr %212, i64 %214
  store ptr %205, ptr %215, align 8, !tbaa !5
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.IDAMemRec, ptr %216, i32 0, i32 79
  %218 = load ptr, ptr %217, align 8, !tbaa !36
  %219 = load i32, ptr %8, align 4, !tbaa !23
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds ptr, ptr %218, i64 %220
  %222 = load ptr, ptr %221, align 8, !tbaa !5
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.IDAMemRec, ptr %223, i32 0, i32 197
  %225 = load ptr, ptr %224, align 8, !tbaa !29
  %226 = getelementptr inbounds %struct._generic_N_Vector, ptr %225, i32 0, i32 0
  %227 = load ptr, ptr %226, align 8, !tbaa !31
  %228 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %227, i32 0, i32 0
  %229 = load ptr, ptr %228, align 8, !tbaa !33
  %230 = load i32, ptr %8, align 4, !tbaa !23
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds ptr, ptr %229, i64 %231
  store ptr %222, ptr %232, align 8, !tbaa !5
  br label %233

233:                                              ; preds = %181
  %234 = load i32, ptr %8, align 4, !tbaa !23
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %8, align 4, !tbaa !23
  br label %175, !llvm.loop !37

236:                                              ; preds = %175
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %237

237:                                              ; preds = %236, %163, %144, %128, %107, %98, %88, %59, %52, %45, %39, %17, %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %238 = load i32, ptr %3, align 4
  ret i32 %238
}

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

declare void @IDAProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) #2

declare i32 @SUNNonlinSolGetType(ptr noundef) #2

declare i32 @SUNNonlinSolFree(ptr noundef) #2

declare i32 @SUNNonlinSolSetSysFn(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @idaNlsResidualSensStg(ptr noundef, ptr noundef, ptr noundef) #0

declare i32 @SUNNonlinSolSetConvTestFn(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @idaNlsConvTestSensStg(ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) #0

declare i32 @SUNNonlinSolSetMaxIters(ptr noundef, i32 noundef) #2

declare ptr @N_VNewEmpty_SensWrapper(i32 noundef, ptr noundef) #2

declare void @N_VDestroy(ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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, !6, i64 8}
!10 = !{!"_generic_SUNNonlinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!12, !6, i64 0}
!12 = !{!"_generic_SUNNonlinearSolver_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!13 = !{!12, !6, i64 24}
!14 = !{!12, !6, i64 40}
!15 = !{!16, !18, i64 156}
!16 = !{!"IDAMemRec", !6, i64 0, !17, i64 8, !6, i64 16, !6, i64 24, !18, i64 32, !17, i64 40, !17, i64 48, !6, i64 56, !18, i64 64, !18, i64 68, !6, i64 72, !6, i64 80, !18, i64 88, !18, i64 92, !18, i64 96, !6, i64 104, !6, i64 112, !18, i64 120, !18, i64 124, !17, i64 128, !17, i64 136, !6, i64 144, !18, i64 152, !18, i64 156, !18, i64 160, !18, i64 164, !6, i64 168, !6, i64 176, !18, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !18, i64 216, !17, i64 224, !18, i64 232, !18, i64 236, !17, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !18, i64 272, !6, i64 280, !6, i64 288, !18, i64 296, !18, i64 300, !18, i64 304, !17, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !7, i64 344, !7, i64 392, !7, i64 440, !7, i64 488, !7, i64 536, !7, i64 584, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !6, i64 760, !7, i64 768, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !7, i64 848, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !7, i64 1024, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !6, i64 1104, !17, i64 1112, !6, i64 1120, !6, i64 1128, !18, i64 1136, !18, i64 1140, !18, i64 1144, !18, i64 1148, !18, i64 1152, !18, i64 1156, !18, i64 1160, !18, i64 1164, !17, i64 1168, !17, i64 1176, !17, i64 1184, !18, i64 1192, !17, i64 1200, !18, i64 1208, !18, i64 1212, !18, i64 1216, !18, i64 1220, !18, i64 1224, !17, i64 1232, !17, i64 1240, !17, i64 1248, !17, i64 1256, !17, i64 1264, !17, i64 1272, !17, i64 1280, !17, i64 1288, !17, i64 1296, !17, i64 1304, !17, i64 1312, !17, i64 1320, !17, i64 1328, !17, i64 1336, !17, i64 1344, !17, i64 1352, !17, i64 1360, !18, i64 1368, !18, i64 1372, !18, i64 1376, !18, i64 1380, !19, i64 1384, !17, i64 1392, !19, i64 1400, !19, i64 1408, !19, i64 1416, !19, i64 1424, !19, i64 1432, !19, i64 1440, !19, i64 1448, !19, i64 1456, !19, i64 1464, !19, i64 1472, !19, i64 1480, !19, i64 1488, !19, i64 1496, !19, i64 1504, !19, i64 1512, !19, i64 1520, !19, i64 1528, !19, i64 1536, !19, i64 1544, !19, i64 1552, !19, i64 1560, !19, i64 1568, !19, i64 1576, !19, i64 1584, !17, i64 1592, !6, i64 1600, !6, i64 1608, !6, i64 1616, !18, i64 1624, !18, i64 1628, !18, i64 1632, !18, i64 1636, !18, i64 1640, !18, i64 1644, !18, i64 1648, !18, i64 1652, !18, i64 1656, !18, i64 1660, !18, i64 1664, !18, i64 1668, !18, i64 1672, !6, i64 1680, !18, i64 1688, !6, i64 1696, !18, i64 1704, !6, i64 1712, !18, i64 1720, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !18, i64 1776, !18, i64 1780, !6, i64 1784, !6, i64 1792, !6, i64 1800, !6, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !18, i64 1840, !18, i64 1844, !6, i64 1848, !18, i64 1856, !6, i64 1864, !6, i64 1872, !17, i64 1880, !17, i64 1888, !17, i64 1896, !6, i64 1904, !6, i64 1912, !6, i64 1920, !17, i64 1928, !17, i64 1936, !18, i64 1944, !18, i64 1948, !19, i64 1952, !6, i64 1960, !18, i64 1968, !6, i64 1976, !7, i64 1984, !6, i64 2024, !6, i64 2032, !18, i64 2040, !6, i64 2048, !18, i64 2056}
!17 = !{!"double", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!16, !18, i64 164}
!21 = !{!16, !6, i64 1712}
!22 = !{!16, !18, i64 1720}
!23 = !{!18, !18, i64 0}
!24 = !{!16, !18, i64 1780}
!25 = !{!16, !18, i64 160}
!26 = !{!16, !6, i64 0}
!27 = !{!16, !6, i64 1752}
!28 = !{!16, !6, i64 1760}
!29 = !{!16, !6, i64 1768}
!30 = !{!16, !6, i64 928}
!31 = !{!32, !6, i64 0}
!32 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!34, !6, i64 0}
!34 = !{!"_N_VectorContent_SensWrapper", !6, i64 0, !18, i64 8, !18, i64 12}
!35 = !{!16, !6, i64 904}
!36 = !{!16, !6, i64 896}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


; 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 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -22, 1) i32 @IDASetNonlinearSolverSensStg(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %5

4:                                                ; preds = %2
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef null, i32 noundef -20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2) #2
  br label %.loopexit

5:                                                ; preds = %2
  %6 = icmp eq ptr %1, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %5
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef null, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #2
  br label %.loopexit

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = load ptr, ptr %10, align 8, !tbaa !10
  %12 = icmp eq ptr %11, null
  br i1 %12, label %21, label %13

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %10, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !12
  %16 = icmp eq ptr %15, null
  br i1 %16, label %21, label %17

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %10, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %17, %13, %8
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #2
  br label %.loopexit

22:                                               ; preds = %17
  %23 = tail call i32 @SUNNonlinSolGetType(ptr noundef nonnull %1) #2
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %25, label %24

24:                                               ; preds = %22
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.5) #2
  br label %.loopexit

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 156
  %27 = load i32, ptr %26, align 4, !tbaa !14
  %.not68 = icmp eq i32 %27, 0
  br i1 %.not68, label %28, label %29

28:                                               ; preds = %25
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.6) #2
  br label %.loopexit

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %0, i64 164
  %31 = load i32, ptr %30, align 4, !tbaa !19
  %.not69 = icmp eq i32 %31, 2
  br i1 %.not69, label %33, label %32

32:                                               ; preds = %29
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.7) #2
  br label %.loopexit

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %0, i64 1712
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %.not70 = icmp eq ptr %35, null
  br i1 %.not70, label %41, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %0, i64 1720
  %38 = load i32, ptr %37, align 8, !tbaa !21
  %.not71 = icmp eq i32 %38, 0
  br i1 %.not71, label %41, label %39

39:                                               ; preds = %36
  %40 = tail call i32 @SUNNonlinSolFree(ptr noundef nonnull %35) #2
  br label %41

41:                                               ; preds = %39, %36, %33
  store ptr %1, ptr %34, align 8, !tbaa !20
  %42 = getelementptr inbounds i8, ptr %0, i64 1720
  store i32 0, ptr %42, align 8, !tbaa !21
  %43 = tail call i32 @SUNNonlinSolSetSysFn(ptr noundef nonnull %1, ptr noundef nonnull @idaNlsResidualSensStg) #2
  %.not72 = icmp eq i32 %43, 0
  br i1 %.not72, label %45, label %44

44:                                               ; preds = %41
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.8) #2
  br label %.loopexit

45:                                               ; preds = %41
  %46 = load ptr, ptr %34, align 8, !tbaa !20
  %47 = tail call i32 @SUNNonlinSolSetConvTestFn(ptr noundef %46, ptr noundef nonnull @idaNlsConvTestSensStg, ptr noundef nonnull %0) #2
  %.not73 = icmp eq i32 %47, 0
  br i1 %.not73, label %49, label %48

48:                                               ; preds = %45
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.9) #2
  br label %.loopexit

49:                                               ; preds = %45
  %50 = load ptr, ptr %34, align 8, !tbaa !20
  %51 = tail call i32 @SUNNonlinSolSetMaxIters(ptr noundef %50, i32 noundef 4) #2
  %.not74 = icmp eq i32 %51, 0
  br i1 %.not74, label %53, label %52

52:                                               ; preds = %49
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.10) #2
  br label %.loopexit

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %0, i64 1780
  %55 = load i32, ptr %54, align 4, !tbaa !22
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %83

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %0, i64 160
  %59 = load i32, ptr %58, align 8, !tbaa !23
  %60 = load ptr, ptr %0, align 8, !tbaa !24
  %61 = tail call ptr @N_VNewEmpty_SensWrapper(i32 noundef %59, ptr noundef %60) #2
  %62 = getelementptr inbounds i8, ptr %0, i64 1752
  store ptr %61, ptr %62, align 8, !tbaa !25
  %63 = icmp eq ptr %61, null
  br i1 %63, label %64, label %65

64:                                               ; preds = %57
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -21, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.11) #2
  br label %.loopexit

65:                                               ; preds = %57
  %66 = load i32, ptr %58, align 8, !tbaa !23
  %67 = load ptr, ptr %0, align 8, !tbaa !24
  %68 = tail call ptr @N_VNewEmpty_SensWrapper(i32 noundef %66, ptr noundef %67) #2
  %69 = getelementptr inbounds i8, ptr %0, i64 1760
  store ptr %68, ptr %69, align 8, !tbaa !26
  %70 = icmp eq ptr %68, null
  br i1 %70, label %71, label %73

71:                                               ; preds = %65
  %72 = load ptr, ptr %62, align 8, !tbaa !25
  tail call void @N_VDestroy(ptr noundef %72) #2
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -21, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.11) #2
  br label %.loopexit

73:                                               ; preds = %65
  %74 = load i32, ptr %58, align 8, !tbaa !23
  %75 = load ptr, ptr %0, align 8, !tbaa !24
  %76 = tail call ptr @N_VNewEmpty_SensWrapper(i32 noundef %74, ptr noundef %75) #2
  %77 = getelementptr inbounds i8, ptr %0, i64 1768
  store ptr %76, ptr %77, align 8, !tbaa !27
  %78 = icmp eq ptr %76, null
  br i1 %78, label %79, label %82

79:                                               ; preds = %73
  %80 = load ptr, ptr %62, align 8, !tbaa !25
  tail call void @N_VDestroy(ptr noundef %80) #2
  %81 = load ptr, ptr %69, align 8, !tbaa !26
  tail call void @N_VDestroy(ptr noundef %81) #2
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -21, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.11) #2
  br label %.loopexit

82:                                               ; preds = %73
  store i32 1, ptr %54, align 4, !tbaa !22
  br label %83

83:                                               ; preds = %82, %53
  %84 = getelementptr inbounds i8, ptr %0, i64 160
  %85 = load i32, ptr %84, align 8, !tbaa !23
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %83
  %87 = getelementptr inbounds i8, ptr %0, i64 928
  %88 = getelementptr inbounds i8, ptr %0, i64 1752
  %89 = getelementptr inbounds i8, ptr %0, i64 904
  %90 = getelementptr inbounds i8, ptr %0, i64 1760
  %91 = getelementptr inbounds i8, ptr %0, i64 896
  %92 = getelementptr inbounds i8, ptr %0, i64 1768
  %wide.trip.count = zext nneg i32 %85 to i64
  br label %93

93:                                               ; preds = %.lr.ph, %93
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %93 ]
  %94 = load ptr, ptr %87, align 8, !tbaa !28
  %95 = getelementptr inbounds ptr, ptr %94, i64 %indvars.iv
  %96 = load ptr, ptr %95, align 8, !tbaa !29
  %97 = load ptr, ptr %88, align 8, !tbaa !25
  %98 = load ptr, ptr %97, align 8, !tbaa !30
  %99 = load ptr, ptr %98, align 8, !tbaa !32
  %100 = getelementptr inbounds ptr, ptr %99, i64 %indvars.iv
  store ptr %96, ptr %100, align 8, !tbaa !29
  %101 = load ptr, ptr %89, align 8, !tbaa !34
  %102 = getelementptr inbounds ptr, ptr %101, i64 %indvars.iv
  %103 = load ptr, ptr %102, align 8, !tbaa !29
  %104 = load ptr, ptr %90, align 8, !tbaa !26
  %105 = load ptr, ptr %104, align 8, !tbaa !30
  %106 = load ptr, ptr %105, align 8, !tbaa !32
  %107 = getelementptr inbounds ptr, ptr %106, i64 %indvars.iv
  store ptr %103, ptr %107, align 8, !tbaa !29
  %108 = load ptr, ptr %91, align 8, !tbaa !35
  %109 = getelementptr inbounds ptr, ptr %108, i64 %indvars.iv
  %110 = load ptr, ptr %109, align 8, !tbaa !29
  %111 = load ptr, ptr %92, align 8, !tbaa !27
  %112 = load ptr, ptr %111, align 8, !tbaa !30
  %113 = load ptr, ptr %112, align 8, !tbaa !32
  %114 = getelementptr inbounds ptr, ptr %113, i64 %indvars.iv
  store ptr %110, ptr %114, align 8, !tbaa !29
  %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 %.loopexit, label %93, !llvm.loop !36

.loopexit:                                        ; preds = %93, %83, %79, %71, %64, %52, %48, %44, %32, %28, %24, %21, %7, %4
  %.064 = phi i32 [ -20, %4 ], [ -22, %7 ], [ -22, %21 ], [ -22, %24 ], [ -22, %32 ], [ -22, %44 ], [ -22, %48 ], [ -22, %52 ], [ -21, %64 ], [ -21, %71 ], [ -21, %79 ], [ -22, %28 ], [ 0, %83 ], [ 0, %93 ]
  ret i32 %.064
}

declare void @IDAProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

declare i32 @SUNNonlinSolGetType(ptr noundef) local_unnamed_addr #1

declare i32 @SUNNonlinSolFree(ptr noundef) local_unnamed_addr #1

declare i32 @SUNNonlinSolSetSysFn(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @idaNlsResidualSensStg(ptr noundef, ptr noundef, ptr noundef) #0

declare i32 @SUNNonlinSolSetConvTestFn(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @idaNlsConvTestSensStg(ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) #0

declare i32 @SUNNonlinSolSetMaxIters(ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @N_VNewEmpty_SensWrapper(i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @N_VDestroy(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "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 }

!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, !7, i64 8}
!6 = !{!"_generic_SUNNonlinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"_generic_SUNNonlinearSolver_Ops", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!12 = !{!11, !7, i64 24}
!13 = !{!11, !7, i64 40}
!14 = !{!15, !17, i64 156}
!15 = !{!"IDAMemRec", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 24, !17, i64 32, !16, i64 40, !16, i64 48, !7, i64 56, !17, i64 64, !17, i64 68, !7, i64 72, !7, i64 80, !17, i64 88, !17, i64 92, !17, i64 96, !7, i64 104, !7, i64 112, !17, i64 120, !17, i64 124, !16, i64 128, !16, i64 136, !7, i64 144, !17, i64 152, !17, i64 156, !17, i64 160, !17, i64 164, !7, i64 168, !7, i64 176, !17, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !17, i64 216, !16, i64 224, !17, i64 232, !17, i64 236, !16, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !17, i64 272, !7, i64 280, !7, i64 288, !17, i64 296, !17, i64 300, !17, i64 304, !16, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !8, i64 344, !8, i64 392, !8, i64 440, !8, i64 488, !8, i64 536, !8, i64 584, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !8, i64 768, !7, i64 816, !7, i64 824, !7, i64 832, !7, i64 840, !8, i64 848, !7, i64 896, !7, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !7, i64 944, !7, i64 952, !7, i64 960, !7, i64 968, !7, i64 976, !7, i64 984, !7, i64 992, !7, i64 1000, !7, i64 1008, !7, i64 1016, !8, i64 1024, !7, i64 1072, !7, i64 1080, !7, i64 1088, !7, i64 1096, !7, i64 1104, !16, i64 1112, !7, i64 1120, !7, i64 1128, !17, i64 1136, !17, i64 1140, !17, i64 1144, !17, i64 1148, !17, i64 1152, !17, i64 1156, !17, i64 1160, !17, i64 1164, !16, i64 1168, !16, i64 1176, !16, i64 1184, !17, i64 1192, !16, i64 1200, !17, i64 1208, !17, i64 1212, !17, i64 1216, !17, i64 1220, !17, i64 1224, !16, i64 1232, !16, i64 1240, !16, i64 1248, !16, i64 1256, !16, i64 1264, !16, i64 1272, !16, i64 1280, !16, i64 1288, !16, i64 1296, !16, i64 1304, !16, i64 1312, !16, i64 1320, !16, i64 1328, !16, i64 1336, !16, i64 1344, !16, i64 1352, !16, i64 1360, !17, i64 1368, !17, i64 1372, !17, i64 1376, !17, i64 1380, !18, i64 1384, !16, i64 1392, !18, i64 1400, !18, i64 1408, !18, i64 1416, !18, i64 1424, !18, i64 1432, !18, i64 1440, !18, i64 1448, !18, i64 1456, !18, i64 1464, !18, i64 1472, !18, i64 1480, !18, i64 1488, !18, i64 1496, !18, i64 1504, !18, i64 1512, !18, i64 1520, !18, i64 1528, !18, i64 1536, !18, i64 1544, !18, i64 1552, !18, i64 1560, !18, i64 1568, !18, i64 1576, !18, i64 1584, !16, i64 1592, !7, i64 1600, !7, i64 1608, !7, i64 1616, !17, i64 1624, !17, i64 1628, !17, i64 1632, !17, i64 1636, !17, i64 1640, !17, i64 1644, !17, i64 1648, !17, i64 1652, !17, i64 1656, !17, i64 1660, !17, i64 1664, !17, i64 1668, !17, i64 1672, !7, i64 1680, !17, i64 1688, !7, i64 1696, !17, i64 1704, !7, i64 1712, !17, i64 1720, !7, i64 1728, !7, i64 1736, !7, i64 1744, !7, i64 1752, !7, i64 1760, !7, i64 1768, !17, i64 1776, !17, i64 1780, !7, i64 1784, !7, i64 1792, !7, i64 1800, !7, i64 1808, !7, i64 1816, !7, i64 1824, !7, i64 1832, !17, i64 1840, !17, i64 1844, !7, i64 1848, !17, i64 1856, !7, i64 1864, !7, i64 1872, !16, i64 1880, !16, i64 1888, !16, i64 1896, !7, i64 1904, !7, i64 1912, !7, i64 1920, !16, i64 1928, !16, i64 1936, !17, i64 1944, !17, i64 1948, !18, i64 1952, !7, i64 1960, !17, i64 1968, !7, i64 1976, !8, i64 1984, !7, i64 2024, !7, i64 2032, !17, i64 2040, !7, i64 2048, !17, i64 2056}
!16 = !{!"double", !8, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!"long", !8, i64 0}
!19 = !{!15, !17, i64 164}
!20 = !{!15, !7, i64 1712}
!21 = !{!15, !17, i64 1720}
!22 = !{!15, !17, i64 1780}
!23 = !{!15, !17, i64 160}
!24 = !{!15, !7, i64 0}
!25 = !{!15, !7, i64 1752}
!26 = !{!15, !7, i64 1760}
!27 = !{!15, !7, i64 1768}
!28 = !{!15, !7, i64 928}
!29 = !{!7, !7, i64 0}
!30 = !{!31, !7, i64 0}
!31 = !{!"_generic_N_Vector", !7, i64 0, !7, i64 8, !7, i64 16}
!32 = !{!33, !7, i64 0}
!33 = !{!"_N_VectorContent_SensWrapper", !7, i64 0, !17, i64 8, !17, i64 12}
!34 = !{!15, !7, i64 904}
!35 = !{!15, !7, i64 896}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass