; LLVM IR from libprima/prima :: c (prima)

; 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.prima_problem_t = type { i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, i32, double, ptr }
%struct.prima_options_t = type { double, double, i32, i32, double, i32, double, ptr, ptr }
%struct.prima_result_t = type { ptr, double, double, ptr, i32, i32, i8, ptr }

; Function Attrs: nounwind uwtable
declare dso_local i32 @prima_check_problem(ptr noundef byval(%struct.prima_problem_t) align 8, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @prima_init_result(ptr noundef, ptr noundef byval(%struct.prima_problem_t) align 8) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @prima_get_rc_string(i32 noundef) #0

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

15:                                               ; preds = %4
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = call i32 @prima_check_problem(ptr noundef byval(%struct.prima_problem_t) align 8 %1, i32 noundef %16)
  store i32 %17, ptr %8, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %15, %4
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %248

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %41, %21
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !11
  %26 = icmp slt i32 %23, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %44

28:                                               ; preds = %22
  %29 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds double, ptr %30, i64 %32
  %34 = load double, ptr %33, align 8, !tbaa !15
  %35 = load ptr, ptr %7, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.prima_result_t, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  store double %34, ptr %40, align 8, !tbaa !15
  br label %41

41:                                               ; preds = %28
  %42 = load i32, ptr %9, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %9, align 4, !tbaa !5
  br label %22, !llvm.loop !19

44:                                               ; preds = %27
  %45 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %45, label %246 [
    i32 2, label %46
    i32 4, label %81
    i32 3, label %137
    i32 1, label %186
    i32 0, label %217
  ]

46:                                               ; preds = %44
  %47 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !21
  %49 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 7
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  %51 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %7, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.prima_result_t, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = load ptr, ptr %7, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.prima_result_t, ptr %56, i32 0, i32 1
  %58 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  %60 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 5
  %61 = load ptr, ptr %60, align 8, !tbaa !25
  %62 = load ptr, ptr %7, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.prima_result_t, ptr %62, i32 0, i32 4
  %64 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 0
  %65 = load double, ptr %64, align 8, !tbaa !26
  %66 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 1
  %67 = load double, ptr %66, align 8, !tbaa !27
  %68 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 4
  %69 = load double, ptr %68, align 8, !tbaa !28
  %70 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 2
  %71 = load i32, ptr %70, align 8, !tbaa !29
  %72 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 5
  %73 = load i32, ptr %72, align 8, !tbaa !30
  %74 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 3
  %75 = load i32, ptr %74, align 4, !tbaa !31
  %76 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 8
  %77 = load ptr, ptr %76, align 8, !tbaa !32
  %78 = call i32 @bobyqa_c(ptr noundef %48, ptr noundef %50, i32 noundef %52, ptr noundef %55, ptr noundef %57, ptr noundef %59, ptr noundef %61, ptr noundef %63, double noundef %65, double noundef %67, double noundef %69, i32 noundef %71, i32 noundef %73, i32 noundef %75, ptr noundef %77, ptr noundef %8)
  %79 = load ptr, ptr %7, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.prima_result_t, ptr %79, i32 0, i32 2
  store double 0.000000e+00, ptr %80, align 8, !tbaa !33
  br label %247

81:                                               ; preds = %44
  %82 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 12
  %83 = load i32, ptr %82, align 8, !tbaa !34
  %84 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !35
  %86 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 7
  %87 = load ptr, ptr %86, align 8, !tbaa !22
  %88 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !11
  %90 = load ptr, ptr %7, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.prima_result_t, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !16
  %93 = load ptr, ptr %7, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.prima_result_t, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %7, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.prima_result_t, ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %7, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.prima_result_t, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !36
  %100 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 6
  %101 = load i32, ptr %100, align 8, !tbaa !37
  %102 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 7
  %103 = load ptr, ptr %102, align 8, !tbaa !38
  %104 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 8
  %105 = load ptr, ptr %104, align 8, !tbaa !39
  %106 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 9
  %107 = load i32, ptr %106, align 8, !tbaa !40
  %108 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 10
  %109 = load ptr, ptr %108, align 8, !tbaa !41
  %110 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 11
  %111 = load ptr, ptr %110, align 8, !tbaa !42
  %112 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !24
  %114 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 5
  %115 = load ptr, ptr %114, align 8, !tbaa !25
  %116 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 13
  %117 = load double, ptr %116, align 8, !tbaa !43
  %118 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 14
  %119 = load ptr, ptr %118, align 8, !tbaa !44
  %120 = load ptr, ptr %7, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.prima_result_t, ptr %120, i32 0, i32 4
  %122 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 0
  %123 = load double, ptr %122, align 8, !tbaa !26
  %124 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 1
  %125 = load double, ptr %124, align 8, !tbaa !27
  %126 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 4
  %127 = load double, ptr %126, align 8, !tbaa !28
  %128 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 2
  %129 = load i32, ptr %128, align 8, !tbaa !29
  %130 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 3
  %131 = load i32, ptr %130, align 4, !tbaa !31
  %132 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 6
  %133 = load double, ptr %132, align 8, !tbaa !45
  %134 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 8
  %135 = load ptr, ptr %134, align 8, !tbaa !32
  %136 = call i32 @cobyla_c(i32 noundef %83, ptr noundef %85, ptr noundef %87, i32 noundef %89, ptr noundef %92, ptr noundef %94, ptr noundef %96, ptr noundef %99, i32 noundef %101, ptr noundef %103, ptr noundef %105, i32 noundef %107, ptr noundef %109, ptr noundef %111, ptr noundef %113, ptr noundef %115, double noundef %117, ptr noundef %119, ptr noundef %121, double noundef %123, double noundef %125, double noundef %127, i32 noundef %129, i32 noundef %131, double noundef %133, ptr noundef %135, ptr noundef %8)
  br label %247

137:                                              ; preds = %44
  %138 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !21
  %140 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 7
  %141 = load ptr, ptr %140, align 8, !tbaa !22
  %142 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 0
  %143 = load i32, ptr %142, align 8, !tbaa !11
  %144 = load ptr, ptr %7, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.prima_result_t, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !16
  %147 = load ptr, ptr %7, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.prima_result_t, ptr %147, i32 0, i32 1
  %149 = load ptr, ptr %7, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.prima_result_t, ptr %149, i32 0, i32 2
  %151 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 6
  %152 = load i32, ptr %151, align 8, !tbaa !37
  %153 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 7
  %154 = load ptr, ptr %153, align 8, !tbaa !38
  %155 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 8
  %156 = load ptr, ptr %155, align 8, !tbaa !39
  %157 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 9
  %158 = load i32, ptr %157, align 8, !tbaa !40
  %159 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 10
  %160 = load ptr, ptr %159, align 8, !tbaa !41
  %161 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 11
  %162 = load ptr, ptr %161, align 8, !tbaa !42
  %163 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !24
  %165 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 5
  %166 = load ptr, ptr %165, align 8, !tbaa !25
  %167 = load ptr, ptr %7, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.prima_result_t, ptr %167, i32 0, i32 4
  %169 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 0
  %170 = load double, ptr %169, align 8, !tbaa !26
  %171 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 1
  %172 = load double, ptr %171, align 8, !tbaa !27
  %173 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 4
  %174 = load double, ptr %173, align 8, !tbaa !28
  %175 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 2
  %176 = load i32, ptr %175, align 8, !tbaa !29
  %177 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 5
  %178 = load i32, ptr %177, align 8, !tbaa !30
  %179 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 3
  %180 = load i32, ptr %179, align 4, !tbaa !31
  %181 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 6
  %182 = load double, ptr %181, align 8, !tbaa !45
  %183 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 8
  %184 = load ptr, ptr %183, align 8, !tbaa !32
  %185 = call i32 @lincoa_c(ptr noundef %139, ptr noundef %141, i32 noundef %143, ptr noundef %146, ptr noundef %148, ptr noundef %150, i32 noundef %152, ptr noundef %154, ptr noundef %156, i32 noundef %158, ptr noundef %160, ptr noundef %162, ptr noundef %164, ptr noundef %166, ptr noundef %168, double noundef %170, double noundef %172, double noundef %174, i32 noundef %176, i32 noundef %178, i32 noundef %180, double noundef %182, ptr noundef %184, ptr noundef %8)
  br label %247

186:                                              ; preds = %44
  %187 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 1
  %188 = load ptr, ptr %187, align 8, !tbaa !21
  %189 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 7
  %190 = load ptr, ptr %189, align 8, !tbaa !22
  %191 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 0
  %192 = load i32, ptr %191, align 8, !tbaa !11
  %193 = load ptr, ptr %7, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.prima_result_t, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !16
  %196 = load ptr, ptr %7, align 8, !tbaa !9
  %197 = getelementptr inbounds %struct.prima_result_t, ptr %196, i32 0, i32 1
  %198 = load ptr, ptr %7, align 8, !tbaa !9
  %199 = getelementptr inbounds %struct.prima_result_t, ptr %198, i32 0, i32 4
  %200 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 0
  %201 = load double, ptr %200, align 8, !tbaa !26
  %202 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 1
  %203 = load double, ptr %202, align 8, !tbaa !27
  %204 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 4
  %205 = load double, ptr %204, align 8, !tbaa !28
  %206 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 2
  %207 = load i32, ptr %206, align 8, !tbaa !29
  %208 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 5
  %209 = load i32, ptr %208, align 8, !tbaa !30
  %210 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 3
  %211 = load i32, ptr %210, align 4, !tbaa !31
  %212 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 8
  %213 = load ptr, ptr %212, align 8, !tbaa !32
  %214 = call i32 @newuoa_c(ptr noundef %188, ptr noundef %190, i32 noundef %192, ptr noundef %195, ptr noundef %197, ptr noundef %199, double noundef %201, double noundef %203, double noundef %205, i32 noundef %207, i32 noundef %209, i32 noundef %211, ptr noundef %213, ptr noundef %8)
  %215 = load ptr, ptr %7, align 8, !tbaa !9
  %216 = getelementptr inbounds %struct.prima_result_t, ptr %215, i32 0, i32 2
  store double 0.000000e+00, ptr %216, align 8, !tbaa !33
  br label %247

217:                                              ; preds = %44
  %218 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 1
  %219 = load ptr, ptr %218, align 8, !tbaa !21
  %220 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 7
  %221 = load ptr, ptr %220, align 8, !tbaa !22
  %222 = getelementptr inbounds %struct.prima_problem_t, ptr %1, i32 0, i32 0
  %223 = load i32, ptr %222, align 8, !tbaa !11
  %224 = load ptr, ptr %7, align 8, !tbaa !9
  %225 = getelementptr inbounds %struct.prima_result_t, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !16
  %227 = load ptr, ptr %7, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct.prima_result_t, ptr %227, i32 0, i32 1
  %229 = load ptr, ptr %7, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.prima_result_t, ptr %229, i32 0, i32 4
  %231 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 0
  %232 = load double, ptr %231, align 8, !tbaa !26
  %233 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 1
  %234 = load double, ptr %233, align 8, !tbaa !27
  %235 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 4
  %236 = load double, ptr %235, align 8, !tbaa !28
  %237 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 2
  %238 = load i32, ptr %237, align 8, !tbaa !29
  %239 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 3
  %240 = load i32, ptr %239, align 4, !tbaa !31
  %241 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 8
  %242 = load ptr, ptr %241, align 8, !tbaa !32
  %243 = call i32 @uobyqa_c(ptr noundef %219, ptr noundef %221, i32 noundef %223, ptr noundef %226, ptr noundef %228, ptr noundef %230, double noundef %232, double noundef %234, double noundef %236, i32 noundef %238, i32 noundef %240, ptr noundef %242, ptr noundef %8)
  %244 = load ptr, ptr %7, align 8, !tbaa !9
  %245 = getelementptr inbounds %struct.prima_result_t, ptr %244, i32 0, i32 2
  store double 0.000000e+00, ptr %245, align 8, !tbaa !33
  br label %247

246:                                              ; preds = %44
  store i32 100, ptr %5, align 4
  store i32 1, ptr %10, align 4
  br label %279

247:                                              ; preds = %217, %186, %137, %81, %46
  br label %250

248:                                              ; preds = %18
  %249 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %249, ptr %5, align 4
  store i32 1, ptr %10, align 4
  br label %279

250:                                              ; preds = %247
  %251 = load i32, ptr %8, align 4, !tbaa !5
  %252 = load ptr, ptr %7, align 8, !tbaa !9
  %253 = getelementptr inbounds %struct.prima_result_t, ptr %252, i32 0, i32 5
  store i32 %251, ptr %253, align 4, !tbaa !46
  %254 = load ptr, ptr %7, align 8, !tbaa !9
  %255 = getelementptr inbounds %struct.prima_result_t, ptr %254, i32 0, i32 5
  %256 = load i32, ptr %255, align 4, !tbaa !46
  %257 = icmp eq i32 %256, 0
  br i1 %257, label %258, label %265

258:                                              ; preds = %250
  %259 = load ptr, ptr %7, align 8, !tbaa !9
  %260 = getelementptr inbounds %struct.prima_result_t, ptr %259, i32 0, i32 2
  %261 = load double, ptr %260, align 8, !tbaa !33
  %262 = getelementptr inbounds %struct.prima_options_t, ptr %2, i32 0, i32 6
  %263 = load double, ptr %262, align 8, !tbaa !45
  %264 = fcmp ole double %261, %263
  br i1 %264, label %270, label %265

265:                                              ; preds = %258, %250
  %266 = load ptr, ptr %7, align 8, !tbaa !9
  %267 = getelementptr inbounds %struct.prima_result_t, ptr %266, i32 0, i32 5
  %268 = load i32, ptr %267, align 4, !tbaa !46
  %269 = icmp eq i32 %268, 1
  br label %270

270:                                              ; preds = %265, %258
  %271 = phi i1 [ true, %258 ], [ %269, %265 ]
  %272 = load ptr, ptr %7, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.prima_result_t, ptr %272, i32 0, i32 6
  %274 = zext i1 %271 to i8
  store i8 %274, ptr %273, align 8, !tbaa !47
  %275 = load i32, ptr %8, align 4, !tbaa !5
  %276 = call ptr @prima_get_rc_string(i32 noundef %275)
  %277 = load ptr, ptr %7, align 8, !tbaa !9
  %278 = getelementptr inbounds %struct.prima_result_t, ptr %277, i32 0, i32 7
  store ptr %276, ptr %278, align 8, !tbaa !48
  store i32 0, ptr %5, align 4
  store i32 1, ptr %10, align 4
  br label %279

279:                                              ; preds = %270, %248, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %280 = load i32, ptr %5, align 4
  ret i32 %280
}

declare i32 @bobyqa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i32 @cobyla_c(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef) #2

declare i32 @lincoa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef) #2

declare i32 @newuoa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i32 @uobyqa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !6, i64 48, !10, i64 56, !10, i64 64, !6, i64 72, !10, i64 80, !10, i64 88, !6, i64 96, !13, i64 104, !10, i64 112}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 24}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !13, i64 8, !13, i64 16, !10, i64 24, !6, i64 32, !6, i64 36, !18, i64 40, !10, i64 48}
!18 = !{!"_Bool", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !10, i64 8}
!22 = !{!23, !10, i64 48}
!23 = !{!"", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !13, i64 24, !6, i64 32, !13, i64 40, !10, i64 48, !10, i64 56}
!24 = !{!12, !10, i64 32}
!25 = !{!12, !10, i64 40}
!26 = !{!23, !13, i64 0}
!27 = !{!23, !13, i64 8}
!28 = !{!23, !13, i64 24}
!29 = !{!23, !6, i64 16}
!30 = !{!23, !6, i64 32}
!31 = !{!23, !6, i64 20}
!32 = !{!23, !10, i64 56}
!33 = !{!17, !13, i64 16}
!34 = !{!12, !6, i64 96}
!35 = !{!12, !10, i64 16}
!36 = !{!17, !10, i64 24}
!37 = !{!12, !6, i64 48}
!38 = !{!12, !10, i64 56}
!39 = !{!12, !10, i64 64}
!40 = !{!12, !6, i64 72}
!41 = !{!12, !10, i64 80}
!42 = !{!12, !10, i64 88}
!43 = !{!12, !13, i64 104}
!44 = !{!12, !10, i64 112}
!45 = !{!23, !13, i64 40}
!46 = !{!17, !6, i64 36}
!47 = !{!17, !18, i64 40}
!48 = !{!17, !10, i64 48}


; 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"

%struct.prima_problem_t = type { i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, ptr, ptr, i32, double, ptr }
%struct.prima_options_t = type { double, double, i32, i32, double, i32, double, ptr, ptr }

; Function Attrs: nounwind uwtable
declare dso_local i32 @prima_check_problem(ptr noundef byval(%struct.prima_problem_t) align 8, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @prima_init_result(ptr noundef, ptr noundef byval(%struct.prima_problem_t) align 8) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @prima_get_rc_string(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @prima_minimize(i32 noundef %0, ptr noundef byval(%struct.prima_problem_t) align 8 %1, ptr nocapture noundef readonly byval(%struct.prima_options_t) align 8 %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %6 = tail call i32 @prima_init_result(ptr noundef %3, ptr noundef nonnull byval(%struct.prima_problem_t) align 8 %1)
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %8, label %.thread

8:                                                ; preds = %4
  %9 = tail call i32 @prima_check_problem(ptr noundef nonnull byval(%struct.prima_problem_t) align 8 %1, i32 noundef %0)
  store i32 %9, ptr %5, align 4, !tbaa !5
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %.preheader, label %.thread

.preheader:                                       ; preds = %8
  %11 = load i32, ptr %1, align 8, !tbaa !9
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %13 = getelementptr inbounds i8, ptr %1, i64 24
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = load ptr, ptr %3, align 8, !tbaa !14
  %wide.trip.count = zext nneg i32 %11 to i64
  %min.iters.check = icmp ult i32 %11, 6
  %16 = ptrtoint ptr %15 to i64
  %17 = ptrtoint ptr %14 to i64
  %18 = sub i64 %16, %17
  %diff.check = icmp ult i64 %18, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %19 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.prol
  %20 = load double, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.prol
  store double %20, ptr %21, align 8, !tbaa !17
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !18

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %22 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %23 = icmp ugt i64 %22, -4
  br i1 %23, label %._crit_edge, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %24 = getelementptr inbounds double, ptr %14, i64 %index
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load = load <2 x double>, ptr %24, align 8, !tbaa !17
  %wide.load40 = load <2 x double>, ptr %25, align 8, !tbaa !17
  %26 = getelementptr inbounds double, ptr %15, i64 %index
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  store <2 x double> %wide.load, ptr %26, align 8, !tbaa !17
  store <2 x double> %wide.load40, ptr %27, align 8, !tbaa !17
  %index.next = add nuw i64 %index, 4
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.preheader
  switch i32 %0, label %.thread [
    i32 2, label %41
    i32 4, label %68
    i32 3, label %115
    i32 1, label %156
    i32 0, label %179
  ]

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %29 = getelementptr inbounds double, ptr %14, i64 %indvars.iv
  %30 = load double, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds double, ptr %15, i64 %indvars.iv
  store double %30, ptr %31, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next
  %33 = load double, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next
  store double %33, ptr %34, align 8, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %35 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next.1
  %36 = load double, ptr %35, align 8, !tbaa !17
  %37 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next.1
  store double %36, ptr %37, align 8, !tbaa !17
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %38 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next.2
  %39 = load double, ptr %38, align 8, !tbaa !17
  %40 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next.2
  store double %39, ptr %40, align 8, !tbaa !17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !24

41:                                               ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %1, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !25
  %44 = getelementptr inbounds i8, ptr %2, i64 48
  %45 = load ptr, ptr %44, align 8, !tbaa !26
  %46 = load ptr, ptr %3, align 8, !tbaa !14
  %47 = getelementptr inbounds i8, ptr %3, i64 8
  %48 = getelementptr inbounds i8, ptr %1, i64 32
  %49 = load ptr, ptr %48, align 8, !tbaa !28
  %50 = getelementptr inbounds i8, ptr %1, i64 40
  %51 = load ptr, ptr %50, align 8, !tbaa !29
  %52 = getelementptr inbounds i8, ptr %3, i64 32
  %53 = load double, ptr %2, align 8, !tbaa !30
  %54 = getelementptr inbounds i8, ptr %2, i64 8
  %55 = load double, ptr %54, align 8, !tbaa !31
  %56 = getelementptr inbounds i8, ptr %2, i64 24
  %57 = load double, ptr %56, align 8, !tbaa !32
  %58 = getelementptr inbounds i8, ptr %2, i64 16
  %59 = load i32, ptr %58, align 8, !tbaa !33
  %60 = getelementptr inbounds i8, ptr %2, i64 32
  %61 = load i32, ptr %60, align 8, !tbaa !34
  %62 = getelementptr inbounds i8, ptr %2, i64 20
  %63 = load i32, ptr %62, align 4, !tbaa !35
  %64 = getelementptr inbounds i8, ptr %2, i64 56
  %65 = load ptr, ptr %64, align 8, !tbaa !36
  %66 = call i32 @bobyqa_c(ptr noundef %43, ptr noundef %45, i32 noundef %11, ptr noundef %46, ptr noundef nonnull %47, ptr noundef %49, ptr noundef %51, ptr noundef nonnull %52, double noundef %53, double noundef %55, double noundef %57, i32 noundef %59, i32 noundef %61, i32 noundef %63, ptr noundef %65, ptr noundef nonnull %5) #3
  %67 = getelementptr inbounds i8, ptr %3, i64 16
  store double 0.000000e+00, ptr %67, align 8, !tbaa !37
  br label %200

68:                                               ; preds = %._crit_edge
  %69 = getelementptr inbounds i8, ptr %1, i64 96
  %70 = load i32, ptr %69, align 8, !tbaa !38
  %71 = getelementptr inbounds i8, ptr %1, i64 16
  %72 = load ptr, ptr %71, align 8, !tbaa !39
  %73 = getelementptr inbounds i8, ptr %2, i64 48
  %74 = load ptr, ptr %73, align 8, !tbaa !26
  %75 = load ptr, ptr %3, align 8, !tbaa !14
  %76 = getelementptr inbounds i8, ptr %3, i64 8
  %77 = getelementptr inbounds i8, ptr %3, i64 16
  %78 = getelementptr inbounds i8, ptr %3, i64 24
  %79 = load ptr, ptr %78, align 8, !tbaa !40
  %80 = getelementptr inbounds i8, ptr %1, i64 48
  %81 = load i32, ptr %80, align 8, !tbaa !41
  %82 = getelementptr inbounds i8, ptr %1, i64 56
  %83 = load ptr, ptr %82, align 8, !tbaa !42
  %84 = getelementptr inbounds i8, ptr %1, i64 64
  %85 = load ptr, ptr %84, align 8, !tbaa !43
  %86 = getelementptr inbounds i8, ptr %1, i64 72
  %87 = load i32, ptr %86, align 8, !tbaa !44
  %88 = getelementptr inbounds i8, ptr %1, i64 80
  %89 = load ptr, ptr %88, align 8, !tbaa !45
  %90 = getelementptr inbounds i8, ptr %1, i64 88
  %91 = load ptr, ptr %90, align 8, !tbaa !46
  %92 = getelementptr inbounds i8, ptr %1, i64 32
  %93 = load ptr, ptr %92, align 8, !tbaa !28
  %94 = getelementptr inbounds i8, ptr %1, i64 40
  %95 = load ptr, ptr %94, align 8, !tbaa !29
  %96 = getelementptr inbounds i8, ptr %1, i64 104
  %97 = load double, ptr %96, align 8, !tbaa !47
  %98 = getelementptr inbounds i8, ptr %1, i64 112
  %99 = load ptr, ptr %98, align 8, !tbaa !48
  %100 = getelementptr inbounds i8, ptr %3, i64 32
  %101 = load double, ptr %2, align 8, !tbaa !30
  %102 = getelementptr inbounds i8, ptr %2, i64 8
  %103 = load double, ptr %102, align 8, !tbaa !31
  %104 = getelementptr inbounds i8, ptr %2, i64 24
  %105 = load double, ptr %104, align 8, !tbaa !32
  %106 = getelementptr inbounds i8, ptr %2, i64 16
  %107 = load i32, ptr %106, align 8, !tbaa !33
  %108 = getelementptr inbounds i8, ptr %2, i64 20
  %109 = load i32, ptr %108, align 4, !tbaa !35
  %110 = getelementptr inbounds i8, ptr %2, i64 40
  %111 = load double, ptr %110, align 8, !tbaa !49
  %112 = getelementptr inbounds i8, ptr %2, i64 56
  %113 = load ptr, ptr %112, align 8, !tbaa !36
  %114 = call i32 @cobyla_c(i32 noundef %70, ptr noundef %72, ptr noundef %74, i32 noundef %11, ptr noundef %75, ptr noundef nonnull %76, ptr noundef nonnull %77, ptr noundef %79, i32 noundef %81, ptr noundef %83, ptr noundef %85, i32 noundef %87, ptr noundef %89, ptr noundef %91, ptr noundef %93, ptr noundef %95, double noundef %97, ptr noundef %99, ptr noundef nonnull %100, double noundef %101, double noundef %103, double noundef %105, i32 noundef %107, i32 noundef %109, double noundef %111, ptr noundef %113, ptr noundef nonnull %5) #3
  br label %200

115:                                              ; preds = %._crit_edge
  %116 = getelementptr inbounds i8, ptr %1, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !25
  %118 = getelementptr inbounds i8, ptr %2, i64 48
  %119 = load ptr, ptr %118, align 8, !tbaa !26
  %120 = load ptr, ptr %3, align 8, !tbaa !14
  %121 = getelementptr inbounds i8, ptr %3, i64 8
  %122 = getelementptr inbounds i8, ptr %3, i64 16
  %123 = getelementptr inbounds i8, ptr %1, i64 48
  %124 = load i32, ptr %123, align 8, !tbaa !41
  %125 = getelementptr inbounds i8, ptr %1, i64 56
  %126 = load ptr, ptr %125, align 8, !tbaa !42
  %127 = getelementptr inbounds i8, ptr %1, i64 64
  %128 = load ptr, ptr %127, align 8, !tbaa !43
  %129 = getelementptr inbounds i8, ptr %1, i64 72
  %130 = load i32, ptr %129, align 8, !tbaa !44
  %131 = getelementptr inbounds i8, ptr %1, i64 80
  %132 = load ptr, ptr %131, align 8, !tbaa !45
  %133 = getelementptr inbounds i8, ptr %1, i64 88
  %134 = load ptr, ptr %133, align 8, !tbaa !46
  %135 = getelementptr inbounds i8, ptr %1, i64 32
  %136 = load ptr, ptr %135, align 8, !tbaa !28
  %137 = getelementptr inbounds i8, ptr %1, i64 40
  %138 = load ptr, ptr %137, align 8, !tbaa !29
  %139 = getelementptr inbounds i8, ptr %3, i64 32
  %140 = load double, ptr %2, align 8, !tbaa !30
  %141 = getelementptr inbounds i8, ptr %2, i64 8
  %142 = load double, ptr %141, align 8, !tbaa !31
  %143 = getelementptr inbounds i8, ptr %2, i64 24
  %144 = load double, ptr %143, align 8, !tbaa !32
  %145 = getelementptr inbounds i8, ptr %2, i64 16
  %146 = load i32, ptr %145, align 8, !tbaa !33
  %147 = getelementptr inbounds i8, ptr %2, i64 32
  %148 = load i32, ptr %147, align 8, !tbaa !34
  %149 = getelementptr inbounds i8, ptr %2, i64 20
  %150 = load i32, ptr %149, align 4, !tbaa !35
  %151 = getelementptr inbounds i8, ptr %2, i64 40
  %152 = load double, ptr %151, align 8, !tbaa !49
  %153 = getelementptr inbounds i8, ptr %2, i64 56
  %154 = load ptr, ptr %153, align 8, !tbaa !36
  %155 = call i32 @lincoa_c(ptr noundef %117, ptr noundef %119, i32 noundef %11, ptr noundef %120, ptr noundef nonnull %121, ptr noundef nonnull %122, i32 noundef %124, ptr noundef %126, ptr noundef %128, i32 noundef %130, ptr noundef %132, ptr noundef %134, ptr noundef %136, ptr noundef %138, ptr noundef nonnull %139, double noundef %140, double noundef %142, double noundef %144, i32 noundef %146, i32 noundef %148, i32 noundef %150, double noundef %152, ptr noundef %154, ptr noundef nonnull %5) #3
  br label %200

156:                                              ; preds = %._crit_edge
  %157 = getelementptr inbounds i8, ptr %1, i64 8
  %158 = load ptr, ptr %157, align 8, !tbaa !25
  %159 = getelementptr inbounds i8, ptr %2, i64 48
  %160 = load ptr, ptr %159, align 8, !tbaa !26
  %161 = load ptr, ptr %3, align 8, !tbaa !14
  %162 = getelementptr inbounds i8, ptr %3, i64 8
  %163 = getelementptr inbounds i8, ptr %3, i64 32
  %164 = load double, ptr %2, align 8, !tbaa !30
  %165 = getelementptr inbounds i8, ptr %2, i64 8
  %166 = load double, ptr %165, align 8, !tbaa !31
  %167 = getelementptr inbounds i8, ptr %2, i64 24
  %168 = load double, ptr %167, align 8, !tbaa !32
  %169 = getelementptr inbounds i8, ptr %2, i64 16
  %170 = load i32, ptr %169, align 8, !tbaa !33
  %171 = getelementptr inbounds i8, ptr %2, i64 32
  %172 = load i32, ptr %171, align 8, !tbaa !34
  %173 = getelementptr inbounds i8, ptr %2, i64 20
  %174 = load i32, ptr %173, align 4, !tbaa !35
  %175 = getelementptr inbounds i8, ptr %2, i64 56
  %176 = load ptr, ptr %175, align 8, !tbaa !36
  %177 = call i32 @newuoa_c(ptr noundef %158, ptr noundef %160, i32 noundef %11, ptr noundef %161, ptr noundef nonnull %162, ptr noundef nonnull %163, double noundef %164, double noundef %166, double noundef %168, i32 noundef %170, i32 noundef %172, i32 noundef %174, ptr noundef %176, ptr noundef nonnull %5) #3
  %178 = getelementptr inbounds i8, ptr %3, i64 16
  store double 0.000000e+00, ptr %178, align 8, !tbaa !37
  br label %200

179:                                              ; preds = %._crit_edge
  %180 = getelementptr inbounds i8, ptr %1, i64 8
  %181 = load ptr, ptr %180, align 8, !tbaa !25
  %182 = getelementptr inbounds i8, ptr %2, i64 48
  %183 = load ptr, ptr %182, align 8, !tbaa !26
  %184 = load ptr, ptr %3, align 8, !tbaa !14
  %185 = getelementptr inbounds i8, ptr %3, i64 8
  %186 = getelementptr inbounds i8, ptr %3, i64 32
  %187 = load double, ptr %2, align 8, !tbaa !30
  %188 = getelementptr inbounds i8, ptr %2, i64 8
  %189 = load double, ptr %188, align 8, !tbaa !31
  %190 = getelementptr inbounds i8, ptr %2, i64 24
  %191 = load double, ptr %190, align 8, !tbaa !32
  %192 = getelementptr inbounds i8, ptr %2, i64 16
  %193 = load i32, ptr %192, align 8, !tbaa !33
  %194 = getelementptr inbounds i8, ptr %2, i64 20
  %195 = load i32, ptr %194, align 4, !tbaa !35
  %196 = getelementptr inbounds i8, ptr %2, i64 56
  %197 = load ptr, ptr %196, align 8, !tbaa !36
  %198 = call i32 @uobyqa_c(ptr noundef %181, ptr noundef %183, i32 noundef %11, ptr noundef %184, ptr noundef nonnull %185, ptr noundef nonnull %186, double noundef %187, double noundef %189, double noundef %191, i32 noundef %193, i32 noundef %195, ptr noundef %197, ptr noundef nonnull %5) #3
  %199 = getelementptr inbounds i8, ptr %3, i64 16
  store double 0.000000e+00, ptr %199, align 8, !tbaa !37
  br label %200

200:                                              ; preds = %41, %68, %115, %156, %179
  %201 = load i32, ptr %5, align 4, !tbaa !5
  %202 = getelementptr inbounds i8, ptr %3, i64 36
  store i32 %201, ptr %202, align 4, !tbaa !50
  %203 = icmp eq i32 %201, 0
  br i1 %203, label %204, label %210

204:                                              ; preds = %200
  %205 = getelementptr inbounds i8, ptr %3, i64 16
  %206 = load double, ptr %205, align 8, !tbaa !37
  %207 = getelementptr inbounds i8, ptr %2, i64 40
  %208 = load double, ptr %207, align 8, !tbaa !49
  %209 = fcmp ugt double %206, %208
  br i1 %209, label %210, label %213

210:                                              ; preds = %204, %200
  %211 = icmp eq i32 %201, 1
  %212 = zext i1 %211 to i8
  br label %213

213:                                              ; preds = %210, %204
  %214 = phi i8 [ 1, %204 ], [ %212, %210 ]
  %215 = getelementptr inbounds i8, ptr %3, i64 40
  store i8 %214, ptr %215, align 8, !tbaa !51
  %216 = call ptr @prima_get_rc_string(i32 noundef %201)
  %217 = getelementptr inbounds i8, ptr %3, i64 48
  store ptr %216, ptr %217, align 8, !tbaa !52
  br label %.thread

.thread:                                          ; preds = %4, %8, %._crit_edge, %213
  %.035 = phi i32 [ 0, %213 ], [ 100, %._crit_edge ], [ %9, %8 ], [ %6, %4 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  ret i32 %.035
}

declare i32 @bobyqa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @cobyla_c(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @lincoa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @newuoa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @uobyqa_c(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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 = { mustprogress 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !6, i64 48, !11, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !11, i64 88, !6, i64 96, !12, i64 104, !11, i64 112}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 24}
!14 = !{!15, !11, i64 0}
!15 = !{!"", !11, i64 0, !12, i64 8, !12, i64 16, !11, i64 24, !6, i64 32, !6, i64 36, !16, i64 40, !11, i64 48}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!12, !12, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !21, !22}
!25 = !{!10, !11, i64 8}
!26 = !{!27, !11, i64 48}
!27 = !{!"", !12, i64 0, !12, i64 8, !6, i64 16, !6, i64 20, !12, i64 24, !6, i64 32, !12, i64 40, !11, i64 48, !11, i64 56}
!28 = !{!10, !11, i64 32}
!29 = !{!10, !11, i64 40}
!30 = !{!27, !12, i64 0}
!31 = !{!27, !12, i64 8}
!32 = !{!27, !12, i64 24}
!33 = !{!27, !6, i64 16}
!34 = !{!27, !6, i64 32}
!35 = !{!27, !6, i64 20}
!36 = !{!27, !11, i64 56}
!37 = !{!15, !12, i64 16}
!38 = !{!10, !6, i64 96}
!39 = !{!10, !11, i64 16}
!40 = !{!15, !11, i64 24}
!41 = !{!10, !6, i64 48}
!42 = !{!10, !11, i64 56}
!43 = !{!10, !11, i64 64}
!44 = !{!10, !6, i64 72}
!45 = !{!10, !11, i64 80}
!46 = !{!10, !11, i64 88}
!47 = !{!10, !12, i64 104}
!48 = !{!10, !11, i64 112}
!49 = !{!27, !12, i64 40}
!50 = !{!15, !6, i64 36}
!51 = !{!15, !16, i64 40}
!52 = !{!15, !11, i64 48}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass