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

; 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 [52 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
@.str.12 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @IDASetNonlinearSolverSensSim(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 %288

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 %288

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 %288

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 %288

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 %288

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, 1
  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 %288

61:                                               ; preds = %54
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.IDAMemRec, ptr %62, i32 0, i32 188
  %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 189
  %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 188
  %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 188
  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 189
  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 188
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = call i32 @SUNNonlinSolSetSysFn(ptr noundef %84, ptr noundef @idaNlsResidualSensSim)
  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 %288

90:                                               ; preds = %76
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.IDAMemRec, ptr %91, i32 0, i32 188
  %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 @idaNlsConvTestSensSim, 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 %288

100:                                              ; preds = %90
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.IDAMemRec, ptr %101, i32 0, i32 188
  %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 %288

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

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 = add nsw i32 %117, 1
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.IDAMemRec, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !26
  %122 = call ptr @N_VNewEmpty_SensWrapper(i32 noundef %118, ptr noundef %121)
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.IDAMemRec, ptr %123, i32 0, i32 192
  store ptr %122, ptr %124, align 8, !tbaa !27
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.IDAMemRec, ptr %125, i32 0, i32 192
  %127 = load ptr, ptr %126, align 8, !tbaa !27
  %128 = icmp eq ptr %127, null
  br i1 %128, label %129, label %131

129:                                              ; preds = %114
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %130, 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 %288

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

146:                                              ; preds = %131
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.IDAMemRec, ptr %147, i32 0, i32 192
  %149 = load ptr, ptr %148, align 8, !tbaa !27
  call void @N_VDestroy(ptr noundef %149)
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %150, 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 %288

151:                                              ; preds = %131
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.IDAMemRec, ptr %152, i32 0, i32 24
  %154 = load i32, ptr %153, align 8, !tbaa !25
  %155 = add nsw i32 %154, 1
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.IDAMemRec, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !26
  %159 = call ptr @N_VNewEmpty_SensWrapper(i32 noundef %155, ptr noundef %158)
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.IDAMemRec, ptr %160, i32 0, i32 194
  store ptr %159, ptr %161, align 8, !tbaa !29
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.IDAMemRec, ptr %162, i32 0, i32 194
  %164 = load ptr, ptr %163, align 8, !tbaa !29
  %165 = icmp eq ptr %164, null
  br i1 %165, label %166, label %174

166:                                              ; preds = %151
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.IDAMemRec, ptr %167, i32 0, i32 192
  %169 = load ptr, ptr %168, align 8, !tbaa !27
  call void @N_VDestroy(ptr noundef %169)
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.IDAMemRec, ptr %170, i32 0, i32 193
  %172 = load ptr, ptr %171, align 8, !tbaa !28
  call void @N_VDestroy(ptr noundef %172)
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %173, 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 %288

174:                                              ; preds = %151
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.IDAMemRec, ptr %175, i32 0, i32 198
  store i32 1, ptr %176, align 8, !tbaa !24
  br label %177

177:                                              ; preds = %174, %109
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.IDAMemRec, ptr %178, i32 0, i32 59
  %180 = load ptr, ptr %179, align 8, !tbaa !30
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.IDAMemRec, ptr %181, i32 0, i32 192
  %183 = load ptr, ptr %182, align 8, !tbaa !27
  %184 = getelementptr inbounds %struct._generic_N_Vector, ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !31
  %186 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !33
  %188 = getelementptr inbounds ptr, ptr %187, i64 0
  store ptr %180, ptr %188, align 8, !tbaa !5
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.IDAMemRec, ptr %189, i32 0, i32 65
  %191 = load ptr, ptr %190, align 8, !tbaa !35
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.IDAMemRec, ptr %192, i32 0, i32 193
  %194 = load ptr, ptr %193, align 8, !tbaa !28
  %195 = getelementptr inbounds %struct._generic_N_Vector, ptr %194, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8, !tbaa !31
  %197 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %196, i32 0, i32 0
  %198 = load ptr, ptr %197, align 8, !tbaa !33
  %199 = getelementptr inbounds ptr, ptr %198, i64 0
  store ptr %191, ptr %199, align 8, !tbaa !5
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.IDAMemRec, ptr %200, i32 0, i32 56
  %202 = load ptr, ptr %201, align 8, !tbaa !36
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.IDAMemRec, ptr %203, i32 0, i32 194
  %205 = load ptr, ptr %204, align 8, !tbaa !29
  %206 = getelementptr inbounds %struct._generic_N_Vector, ptr %205, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8, !tbaa !31
  %208 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !33
  %210 = getelementptr inbounds ptr, ptr %209, i64 0
  store ptr %202, ptr %210, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !23
  br label %211

211:                                              ; preds = %272, %177
  %212 = load i32, ptr %8, align 4, !tbaa !23
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.IDAMemRec, ptr %213, i32 0, i32 24
  %215 = load i32, ptr %214, align 8, !tbaa !25
  %216 = icmp slt i32 %212, %215
  br i1 %216, label %217, label %275

217:                                              ; preds = %211
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.IDAMemRec, ptr %218, i32 0, i32 83
  %220 = load ptr, ptr %219, align 8, !tbaa !37
  %221 = load i32, ptr %8, align 4, !tbaa !23
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds ptr, ptr %220, i64 %222
  %224 = load ptr, ptr %223, align 8, !tbaa !5
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.IDAMemRec, ptr %225, i32 0, i32 192
  %227 = load ptr, ptr %226, align 8, !tbaa !27
  %228 = getelementptr inbounds %struct._generic_N_Vector, ptr %227, i32 0, i32 0
  %229 = load ptr, ptr %228, align 8, !tbaa !31
  %230 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %229, i32 0, i32 0
  %231 = load ptr, ptr %230, align 8, !tbaa !33
  %232 = load i32, ptr %8, align 4, !tbaa !23
  %233 = add nsw i32 %232, 1
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds ptr, ptr %231, i64 %234
  store ptr %224, ptr %235, align 8, !tbaa !5
  %236 = load ptr, ptr %6, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.IDAMemRec, ptr %236, i32 0, i32 80
  %238 = load ptr, ptr %237, align 8, !tbaa !38
  %239 = load i32, ptr %8, align 4, !tbaa !23
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds ptr, ptr %238, i64 %240
  %242 = load ptr, ptr %241, align 8, !tbaa !5
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.IDAMemRec, ptr %243, i32 0, i32 193
  %245 = load ptr, ptr %244, align 8, !tbaa !28
  %246 = getelementptr inbounds %struct._generic_N_Vector, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !31
  %248 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %247, i32 0, i32 0
  %249 = load ptr, ptr %248, align 8, !tbaa !33
  %250 = load i32, ptr %8, align 4, !tbaa !23
  %251 = add nsw i32 %250, 1
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds ptr, ptr %249, i64 %252
  store ptr %242, ptr %253, align 8, !tbaa !5
  %254 = load ptr, ptr %6, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.IDAMemRec, ptr %254, i32 0, i32 79
  %256 = load ptr, ptr %255, align 8, !tbaa !39
  %257 = load i32, ptr %8, align 4, !tbaa !23
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds ptr, ptr %256, i64 %258
  %260 = load ptr, ptr %259, align 8, !tbaa !5
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.IDAMemRec, ptr %261, i32 0, i32 194
  %263 = load ptr, ptr %262, align 8, !tbaa !29
  %264 = getelementptr inbounds %struct._generic_N_Vector, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !31
  %266 = getelementptr inbounds %struct._N_VectorContent_SensWrapper, ptr %265, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8, !tbaa !33
  %268 = load i32, ptr %8, align 4, !tbaa !23
  %269 = add nsw i32 %268, 1
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds ptr, ptr %267, i64 %270
  store ptr %260, ptr %271, align 8, !tbaa !5
  br label %272

272:                                              ; preds = %217
  %273 = load i32, ptr %8, align 4, !tbaa !23
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %8, align 4, !tbaa !23
  br label %211, !llvm.loop !40

275:                                              ; preds = %211
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.IDAMemRec, ptr %276, i32 0, i32 2
  %278 = load ptr, ptr %277, align 8, !tbaa !42
  %279 = icmp ne ptr %278, null
  br i1 %279, label %282, label %280

280:                                              ; preds = %275
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %281, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.12)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %288

282:                                              ; preds = %275
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.IDAMemRec, ptr %283, i32 0, i32 2
  %285 = load ptr, ptr %284, align 8, !tbaa !42
  %286 = load ptr, ptr %6, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.IDAMemRec, ptr %286, i32 0, i32 200
  store ptr %285, ptr %287, align 8, !tbaa !43
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %288

288:                                              ; preds = %282, %280, %166, %146, %129, %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
  %289 = load i32, ptr %3, align 4
  ret i32 %289
}

; 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 @idaNlsResidualSensSim(ptr noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden i32 @idaNlsConvTestSensSim(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 1696}
!22 = !{!16, !18, i64 1704}
!23 = !{!18, !18, i64 0}
!24 = !{!16, !18, i64 1776}
!25 = !{!16, !18, i64 160}
!26 = !{!16, !6, i64 0}
!27 = !{!16, !6, i64 1728}
!28 = !{!16, !6, i64 1736}
!29 = !{!16, !6, i64 1744}
!30 = !{!16, !6, i64 656}
!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 704}
!36 = !{!16, !6, i64 632}
!37 = !{!16, !6, i64 928}
!38 = !{!16, !6, i64 904}
!39 = !{!16, !6, i64 896}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!16, !6, i64 16}
!43 = !{!16, !6, i64 1784}


; 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 [52 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
@.str.12 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -22, 1) i32 @IDASetNonlinearSolverSensSim(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 %138

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 %138

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 %138

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 %138

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 156
  %27 = load i32, ptr %26, align 4, !tbaa !14
  %.not79 = icmp eq i32 %27, 0
  br i1 %.not79, 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 %138

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %0, i64 164
  %31 = load i32, ptr %30, align 4, !tbaa !19
  %.not80 = icmp eq i32 %31, 1
  br i1 %.not80, 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 %138

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

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %0, i64 1704
  %38 = load i32, ptr %37, align 8, !tbaa !21
  %.not82 = icmp eq i32 %38, 0
  br i1 %.not82, 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 1704
  store i32 0, ptr %42, align 8, !tbaa !21
  %43 = tail call i32 @SUNNonlinSolSetSysFn(ptr noundef nonnull %1, ptr noundef nonnull @idaNlsResidualSensSim) #2
  %.not83 = icmp eq i32 %43, 0
  br i1 %.not83, 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 %138

45:                                               ; preds = %41
  %46 = load ptr, ptr %34, align 8, !tbaa !20
  %47 = tail call i32 @SUNNonlinSolSetConvTestFn(ptr noundef %46, ptr noundef nonnull @idaNlsConvTestSensSim, ptr noundef nonnull %0) #2
  %.not84 = icmp eq i32 %47, 0
  br i1 %.not84, 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 %138

49:                                               ; preds = %45
  %50 = load ptr, ptr %34, align 8, !tbaa !20
  %51 = tail call i32 @SUNNonlinSolSetMaxIters(ptr noundef %50, i32 noundef 4) #2
  %.not85 = icmp eq i32 %51, 0
  br i1 %.not85, 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 %138

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

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

65:                                               ; 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 %138

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

73:                                               ; preds = %66
  %74 = load ptr, ptr %63, align 8, !tbaa !25
  tail call void @N_VDestroy(ptr noundef %74) #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 %138

75:                                               ; preds = %66
  %76 = load i32, ptr %58, align 8, !tbaa !23
  %77 = add nsw i32 %76, 1
  %78 = load ptr, ptr %0, align 8, !tbaa !24
  %79 = tail call ptr @N_VNewEmpty_SensWrapper(i32 noundef %77, ptr noundef %78) #2
  %80 = getelementptr inbounds i8, ptr %0, i64 1744
  store ptr %79, ptr %80, align 8, !tbaa !27
  %81 = icmp eq ptr %79, null
  br i1 %81, label %82, label %85

82:                                               ; preds = %75
  %83 = load ptr, ptr %63, align 8, !tbaa !25
  tail call void @N_VDestroy(ptr noundef %83) #2
  %84 = load ptr, ptr %71, align 8, !tbaa !26
  tail call void @N_VDestroy(ptr noundef %84) #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 %138

85:                                               ; preds = %75
  store i32 1, ptr %54, align 8, !tbaa !22
  br label %86

86:                                               ; preds = %85, %53
  %87 = getelementptr inbounds i8, ptr %0, i64 656
  %88 = load ptr, ptr %87, align 8, !tbaa !28
  %89 = getelementptr inbounds i8, ptr %0, i64 1728
  %90 = load ptr, ptr %89, align 8, !tbaa !25
  %91 = load ptr, ptr %90, align 8, !tbaa !29
  %92 = load ptr, ptr %91, align 8, !tbaa !31
  store ptr %88, ptr %92, align 8, !tbaa !33
  %93 = getelementptr inbounds i8, ptr %0, i64 704
  %94 = load ptr, ptr %93, align 8, !tbaa !34
  %95 = getelementptr inbounds i8, ptr %0, i64 1736
  %96 = load ptr, ptr %95, align 8, !tbaa !26
  %97 = load ptr, ptr %96, align 8, !tbaa !29
  %98 = load ptr, ptr %97, align 8, !tbaa !31
  store ptr %94, ptr %98, align 8, !tbaa !33
  %99 = getelementptr inbounds i8, ptr %0, i64 632
  %100 = load ptr, ptr %99, align 8, !tbaa !35
  %101 = getelementptr inbounds i8, ptr %0, i64 1744
  %102 = load ptr, ptr %101, align 8, !tbaa !27
  %103 = load ptr, ptr %102, align 8, !tbaa !29
  %104 = load ptr, ptr %103, align 8, !tbaa !31
  store ptr %100, ptr %104, align 8, !tbaa !33
  %105 = getelementptr inbounds i8, ptr %0, i64 160
  %106 = load i32, ptr %105, align 8, !tbaa !23
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %86
  %108 = getelementptr inbounds i8, ptr %0, i64 928
  %109 = getelementptr inbounds i8, ptr %0, i64 904
  %110 = getelementptr inbounds i8, ptr %0, i64 896
  %wide.trip.count = zext nneg i32 %106 to i64
  br label %111

111:                                              ; preds = %.lr.ph, %111
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %111 ]
  %112 = load ptr, ptr %108, align 8, !tbaa !36
  %113 = getelementptr inbounds ptr, ptr %112, i64 %indvars.iv
  %114 = load ptr, ptr %113, align 8, !tbaa !33
  %115 = load ptr, ptr %89, align 8, !tbaa !25
  %116 = load ptr, ptr %115, align 8, !tbaa !29
  %117 = load ptr, ptr %116, align 8, !tbaa !31
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %118 = getelementptr inbounds ptr, ptr %117, i64 %indvars.iv.next
  store ptr %114, ptr %118, align 8, !tbaa !33
  %119 = load ptr, ptr %109, align 8, !tbaa !37
  %120 = getelementptr inbounds ptr, ptr %119, i64 %indvars.iv
  %121 = load ptr, ptr %120, align 8, !tbaa !33
  %122 = load ptr, ptr %95, align 8, !tbaa !26
  %123 = load ptr, ptr %122, align 8, !tbaa !29
  %124 = load ptr, ptr %123, align 8, !tbaa !31
  %125 = getelementptr inbounds ptr, ptr %124, i64 %indvars.iv.next
  store ptr %121, ptr %125, align 8, !tbaa !33
  %126 = load ptr, ptr %110, align 8, !tbaa !38
  %127 = getelementptr inbounds ptr, ptr %126, i64 %indvars.iv
  %128 = load ptr, ptr %127, align 8, !tbaa !33
  %129 = load ptr, ptr %101, align 8, !tbaa !27
  %130 = load ptr, ptr %129, align 8, !tbaa !29
  %131 = load ptr, ptr %130, align 8, !tbaa !31
  %132 = getelementptr inbounds ptr, ptr %131, i64 %indvars.iv.next
  store ptr %128, ptr %132, align 8, !tbaa !33
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %111, !llvm.loop !39

._crit_edge:                                      ; preds = %111, %86
  %133 = getelementptr inbounds i8, ptr %0, i64 16
  %134 = load ptr, ptr %133, align 8, !tbaa !41
  %.not86 = icmp eq ptr %134, null
  br i1 %.not86, label %135, label %136

135:                                              ; preds = %._crit_edge
  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.12) #2
  br label %138

136:                                              ; preds = %._crit_edge
  %137 = getelementptr inbounds i8, ptr %0, i64 1784
  store ptr %134, ptr %137, align 8, !tbaa !42
  br label %138

138:                                              ; preds = %136, %135, %82, %73, %65, %52, %48, %44, %32, %28, %24, %21, %7, %4
  %.074 = phi i32 [ -20, %4 ], [ -22, %7 ], [ -22, %21 ], [ -22, %24 ], [ -22, %32 ], [ -22, %44 ], [ -22, %48 ], [ -22, %52 ], [ -21, %65 ], [ -21, %73 ], [ -21, %82 ], [ 0, %136 ], [ -22, %135 ], [ -22, %28 ]
  ret i32 %.074
}

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 @idaNlsResidualSensSim(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 @idaNlsConvTestSensSim(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 1696}
!21 = !{!15, !17, i64 1704}
!22 = !{!15, !17, i64 1776}
!23 = !{!15, !17, i64 160}
!24 = !{!15, !7, i64 0}
!25 = !{!15, !7, i64 1728}
!26 = !{!15, !7, i64 1736}
!27 = !{!15, !7, i64 1744}
!28 = !{!15, !7, i64 656}
!29 = !{!30, !7, i64 0}
!30 = !{!"_generic_N_Vector", !7, i64 0, !7, i64 8, !7, i64 16}
!31 = !{!32, !7, i64 0}
!32 = !{!"_N_VectorContent_SensWrapper", !7, i64 0, !17, i64 8, !17, i64 12}
!33 = !{!7, !7, i64 0}
!34 = !{!15, !7, i64 704}
!35 = !{!15, !7, i64 632}
!36 = !{!15, !7, i64 928}
!37 = !{!15, !7, i64 904}
!38 = !{!15, !7, i64 896}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!15, !7, i64 16}
!42 = !{!15, !7, i64 1784}


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