; LLVM IR from josselinonduty/2022-numerical-methods-for-solving-differential-equations :: src/methods (adams_moulton)

; 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.__matrix_t = type { ptr, i64, i64 }

; Function Attrs: nounwind uwtable
define dso_local void @solve_adams_moulton(ptr dead_on_unwind noalias writable sret(%struct.__matrix_t) align 8 %0, x86_fp80 noundef %1, i64 noundef %2, ptr noundef %3, x86_fp80 noundef %4, i64 noundef %5) #0 {
  %7 = alloca x86_fp80, align 16
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca x86_fp80, align 16
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca x86_fp80, align 16
  %19 = alloca x86_fp80, align 16
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca x86_fp80, align 16
  %25 = alloca x86_fp80, align 16
  %26 = alloca i64, align 8
  store x86_fp80 %1, ptr %7, align 16, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !11
  store x86_fp80 %4, ptr %10, align 16, !tbaa !5
  store i64 %5, ptr %11, align 8, !tbaa !9
  %27 = load i64, ptr %8, align 8, !tbaa !9
  %28 = add nsw i64 %27, 1
  call void @matrix_create(ptr dead_on_unwind writable sret(%struct.__matrix_t) align 8 %0, i64 noundef %28)
  %29 = load ptr, ptr %9, align 8, !tbaa !11
  %30 = call ptr @vector_copy(ptr noundef %29)
  call void @matrix_append(ptr noundef %0, ptr noundef %30)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %31 = load ptr, ptr %9, align 8, !tbaa !11
  %32 = call ptr @vector_copy(ptr noundef %31)
  store ptr %32, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %33 = load ptr, ptr %9, align 8, !tbaa !11
  %34 = call ptr @vector_copy(ptr noundef %33)
  store ptr %34, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %35 = call noalias ptr @malloc(i64 noundef 64) #7
  store ptr %35, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %36 = load ptr, ptr %9, align 8, !tbaa !11
  %37 = call ptr @vector_copy(ptr noundef %36)
  store ptr %37, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %38 = load x86_fp80, ptr %7, align 16, !tbaa !5
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = sitofp i64 %39 to x86_fp80
  %41 = fdiv x86_fp80 %38, %40
  store x86_fp80 %41, ptr %18, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %42 = load x86_fp80, ptr %18, align 16, !tbaa !5
  %43 = fmul x86_fp80 0xK4001A000000000000000, %42
  %44 = fdiv x86_fp80 %43, 0xK4002C000000000000000
  store x86_fp80 %44, ptr %19, align 16, !tbaa !5
  %45 = load ptr, ptr %12, align 8, !tbaa !11
  %46 = call ptr @van_der_pol(x86_fp80 noundef 0xK00000000000000000000, ptr noundef %45)
  store ptr %46, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %287, %6
  %48 = load i64, ptr %20, align 8, !tbaa !9
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %290

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %53 = load i64, ptr %20, align 8, !tbaa !9
  %54 = sitofp i64 %53 to x86_fp80
  %55 = load x86_fp80, ptr %18, align 16, !tbaa !5
  %56 = fmul x86_fp80 %54, %55
  %57 = fptosi x86_fp80 %56 to i64
  store i64 %57, ptr %22, align 8, !tbaa !9
  %58 = load ptr, ptr %14, align 8, !tbaa !11
  store ptr %58, ptr %15, align 8, !tbaa !11
  %59 = load i64, ptr %22, align 8, !tbaa !9
  %60 = sitofp i64 %59 to x86_fp80
  %61 = load ptr, ptr %12, align 8, !tbaa !11
  %62 = call ptr @van_der_pol(x86_fp80 noundef %60, ptr noundef %61)
  store ptr %62, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store i64 0, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  store x86_fp80 0xK3FFF8000000000000000, ptr %24, align 16, !tbaa !5
  br label %63

63:                                               ; preds = %74, %52
  %64 = load x86_fp80, ptr %24, align 16, !tbaa !5
  %65 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %66 = fcmp ogt x86_fp80 %64, %65
  br i1 %66, label %67, label %72

67:                                               ; preds = %63
  %68 = load i64, ptr %23, align 8, !tbaa !9
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %23, align 8, !tbaa !9
  %70 = load i64, ptr %11, align 8, !tbaa !9
  %71 = icmp slt i64 %68, %70
  br label %72

72:                                               ; preds = %67, %63
  %73 = phi i1 [ false, %63 ], [ %71, %67 ]
  br i1 %73, label %74, label %268

74:                                               ; preds = %72
  %75 = load x86_fp80, ptr %19, align 16, !tbaa !5
  %76 = load ptr, ptr %12, align 8, !tbaa !11
  %77 = getelementptr inbounds x86_fp80, ptr %76, i64 1
  %78 = load x86_fp80, ptr %77, align 16, !tbaa !5
  %79 = load ptr, ptr %12, align 8, !tbaa !11
  %80 = getelementptr inbounds x86_fp80, ptr %79, i64 0
  %81 = load x86_fp80, ptr %80, align 16, !tbaa !5
  %82 = fneg x86_fp80 %81
  %83 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %75, x86_fp80 %78, x86_fp80 %82)
  %84 = load ptr, ptr %12, align 8, !tbaa !11
  %85 = getelementptr inbounds x86_fp80, ptr %84, i64 0
  %86 = load x86_fp80, ptr %85, align 16, !tbaa !5
  %87 = load x86_fp80, ptr %18, align 16, !tbaa !5
  %88 = fdiv x86_fp80 %87, 0xK4002C000000000000000
  %89 = load ptr, ptr %14, align 8, !tbaa !11
  %90 = getelementptr inbounds x86_fp80, ptr %89, i64 0
  %91 = load x86_fp80, ptr %90, align 16, !tbaa !5
  %92 = load ptr, ptr %15, align 8, !tbaa !11
  %93 = getelementptr inbounds x86_fp80, ptr %92, i64 0
  %94 = load x86_fp80, ptr %93, align 16, !tbaa !5
  %95 = fneg x86_fp80 %94
  %96 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40028000000000000000, x86_fp80 %91, x86_fp80 %95)
  %97 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %88, x86_fp80 %96, x86_fp80 %86)
  %98 = fadd x86_fp80 %83, %97
  %99 = load ptr, ptr %17, align 8, !tbaa !11
  %100 = getelementptr inbounds x86_fp80, ptr %99, i64 0
  store x86_fp80 %98, ptr %100, align 16, !tbaa !5
  %101 = load x86_fp80, ptr %19, align 16, !tbaa !5
  %102 = load ptr, ptr %12, align 8, !tbaa !11
  %103 = getelementptr inbounds x86_fp80, ptr %102, i64 0
  %104 = load x86_fp80, ptr %103, align 16, !tbaa !5
  %105 = load ptr, ptr %12, align 8, !tbaa !11
  %106 = getelementptr inbounds x86_fp80, ptr %105, i64 0
  %107 = load x86_fp80, ptr %106, align 16, !tbaa !5
  %108 = fneg x86_fp80 %104
  %109 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %108, x86_fp80 %107, x86_fp80 0xK3FFF8000000000000000)
  %110 = fmul x86_fp80 0xK3FFDCCCCCCCCCCCCD000, %109
  %111 = load ptr, ptr %12, align 8, !tbaa !11
  %112 = getelementptr inbounds x86_fp80, ptr %111, i64 1
  %113 = load x86_fp80, ptr %112, align 16, !tbaa !5
  %114 = load ptr, ptr %12, align 8, !tbaa !11
  %115 = getelementptr inbounds x86_fp80, ptr %114, i64 0
  %116 = load x86_fp80, ptr %115, align 16, !tbaa !5
  %117 = fneg x86_fp80 %116
  %118 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %110, x86_fp80 %113, x86_fp80 %117)
  %119 = load ptr, ptr %12, align 8, !tbaa !11
  %120 = getelementptr inbounds x86_fp80, ptr %119, i64 1
  %121 = load x86_fp80, ptr %120, align 16, !tbaa !5
  %122 = fneg x86_fp80 %121
  %123 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %101, x86_fp80 %118, x86_fp80 %122)
  %124 = load ptr, ptr %12, align 8, !tbaa !11
  %125 = getelementptr inbounds x86_fp80, ptr %124, i64 1
  %126 = load x86_fp80, ptr %125, align 16, !tbaa !5
  %127 = load x86_fp80, ptr %18, align 16, !tbaa !5
  %128 = fdiv x86_fp80 %127, 0xK4002C000000000000000
  %129 = load ptr, ptr %14, align 8, !tbaa !11
  %130 = getelementptr inbounds x86_fp80, ptr %129, i64 1
  %131 = load x86_fp80, ptr %130, align 16, !tbaa !5
  %132 = load ptr, ptr %15, align 8, !tbaa !11
  %133 = getelementptr inbounds x86_fp80, ptr %132, i64 1
  %134 = load x86_fp80, ptr %133, align 16, !tbaa !5
  %135 = fneg x86_fp80 %134
  %136 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40028000000000000000, x86_fp80 %131, x86_fp80 %135)
  %137 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %128, x86_fp80 %136, x86_fp80 %126)
  %138 = fadd x86_fp80 %123, %137
  %139 = load ptr, ptr %17, align 8, !tbaa !11
  %140 = getelementptr inbounds x86_fp80, ptr %139, i64 1
  store x86_fp80 %138, ptr %140, align 16, !tbaa !5
  %141 = load ptr, ptr %16, align 8, !tbaa !11
  %142 = getelementptr inbounds x86_fp80, ptr %141, i64 0
  store x86_fp80 0xKBFFF8000000000000000, ptr %142, align 16, !tbaa !5
  %143 = load x86_fp80, ptr %19, align 16, !tbaa !5
  %144 = load ptr, ptr %16, align 8, !tbaa !11
  %145 = getelementptr inbounds x86_fp80, ptr %144, i64 1
  store x86_fp80 %143, ptr %145, align 16, !tbaa !5
  %146 = load x86_fp80, ptr %19, align 16, !tbaa !5
  %147 = fneg x86_fp80 %146
  %148 = load ptr, ptr %12, align 8, !tbaa !11
  %149 = getelementptr inbounds x86_fp80, ptr %148, i64 0
  %150 = load x86_fp80, ptr %149, align 16, !tbaa !5
  %151 = fmul x86_fp80 0xK3FFECCCCCCCCCCCCD000, %150
  %152 = load ptr, ptr %12, align 8, !tbaa !11
  %153 = getelementptr inbounds x86_fp80, ptr %152, i64 1
  %154 = load x86_fp80, ptr %153, align 16, !tbaa !5
  %155 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %151, x86_fp80 %154, x86_fp80 0xK3FFF8000000000000000)
  %156 = fmul x86_fp80 %147, %155
  %157 = load ptr, ptr %16, align 8, !tbaa !11
  %158 = getelementptr inbounds x86_fp80, ptr %157, i64 2
  store x86_fp80 %156, ptr %158, align 16, !tbaa !5
  %159 = load x86_fp80, ptr %19, align 16, !tbaa !5
  %160 = fmul x86_fp80 %159, 0xK3FFDCCCCCCCCCCCCD000
  %161 = load ptr, ptr %12, align 8, !tbaa !11
  %162 = getelementptr inbounds x86_fp80, ptr %161, i64 0
  %163 = load x86_fp80, ptr %162, align 16, !tbaa !5
  %164 = load ptr, ptr %12, align 8, !tbaa !11
  %165 = getelementptr inbounds x86_fp80, ptr %164, i64 0
  %166 = load x86_fp80, ptr %165, align 16, !tbaa !5
  %167 = fneg x86_fp80 %163
  %168 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %167, x86_fp80 %166, x86_fp80 0xK3FFF8000000000000000)
  %169 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %160, x86_fp80 %168, x86_fp80 0xKBFFF8000000000000000)
  %170 = load ptr, ptr %16, align 8, !tbaa !11
  %171 = getelementptr inbounds x86_fp80, ptr %170, i64 3
  store x86_fp80 %169, ptr %171, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  %172 = load ptr, ptr %16, align 8, !tbaa !11
  %173 = getelementptr inbounds x86_fp80, ptr %172, i64 0
  %174 = load x86_fp80, ptr %173, align 16, !tbaa !5
  %175 = load ptr, ptr %16, align 8, !tbaa !11
  %176 = getelementptr inbounds x86_fp80, ptr %175, i64 3
  %177 = load x86_fp80, ptr %176, align 16, !tbaa !5
  %178 = load ptr, ptr %16, align 8, !tbaa !11
  %179 = getelementptr inbounds x86_fp80, ptr %178, i64 2
  %180 = load x86_fp80, ptr %179, align 16, !tbaa !5
  %181 = load ptr, ptr %16, align 8, !tbaa !11
  %182 = getelementptr inbounds x86_fp80, ptr %181, i64 1
  %183 = load x86_fp80, ptr %182, align 16, !tbaa !5
  %184 = fmul x86_fp80 %180, %183
  %185 = fneg x86_fp80 %184
  %186 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %174, x86_fp80 %177, x86_fp80 %185)
  store x86_fp80 %186, ptr %25, align 16, !tbaa !5
  %187 = load ptr, ptr %12, align 8, !tbaa !11
  %188 = getelementptr inbounds x86_fp80, ptr %187, i64 0
  %189 = load x86_fp80, ptr %188, align 16, !tbaa !5
  %190 = load ptr, ptr %16, align 8, !tbaa !11
  %191 = getelementptr inbounds x86_fp80, ptr %190, i64 3
  %192 = load x86_fp80, ptr %191, align 16, !tbaa !5
  %193 = load ptr, ptr %17, align 8, !tbaa !11
  %194 = getelementptr inbounds x86_fp80, ptr %193, i64 0
  %195 = load x86_fp80, ptr %194, align 16, !tbaa !5
  %196 = load ptr, ptr %16, align 8, !tbaa !11
  %197 = getelementptr inbounds x86_fp80, ptr %196, i64 1
  %198 = load x86_fp80, ptr %197, align 16, !tbaa !5
  %199 = load ptr, ptr %17, align 8, !tbaa !11
  %200 = getelementptr inbounds x86_fp80, ptr %199, i64 1
  %201 = load x86_fp80, ptr %200, align 16, !tbaa !5
  %202 = fmul x86_fp80 %198, %201
  %203 = fneg x86_fp80 %202
  %204 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %192, x86_fp80 %195, x86_fp80 %203)
  %205 = load x86_fp80, ptr %25, align 16, !tbaa !5
  %206 = fdiv x86_fp80 %204, %205
  %207 = fsub x86_fp80 %189, %206
  %208 = load ptr, ptr %13, align 8, !tbaa !11
  %209 = getelementptr inbounds x86_fp80, ptr %208, i64 0
  store x86_fp80 %207, ptr %209, align 16, !tbaa !5
  %210 = load ptr, ptr %12, align 8, !tbaa !11
  %211 = getelementptr inbounds x86_fp80, ptr %210, i64 1
  %212 = load x86_fp80, ptr %211, align 16, !tbaa !5
  %213 = load ptr, ptr %16, align 8, !tbaa !11
  %214 = getelementptr inbounds x86_fp80, ptr %213, i64 2
  %215 = load x86_fp80, ptr %214, align 16, !tbaa !5
  %216 = fneg x86_fp80 %215
  %217 = load ptr, ptr %17, align 8, !tbaa !11
  %218 = getelementptr inbounds x86_fp80, ptr %217, i64 0
  %219 = load x86_fp80, ptr %218, align 16, !tbaa !5
  %220 = load ptr, ptr %16, align 8, !tbaa !11
  %221 = getelementptr inbounds x86_fp80, ptr %220, i64 0
  %222 = load x86_fp80, ptr %221, align 16, !tbaa !5
  %223 = load ptr, ptr %17, align 8, !tbaa !11
  %224 = getelementptr inbounds x86_fp80, ptr %223, i64 1
  %225 = load x86_fp80, ptr %224, align 16, !tbaa !5
  %226 = fmul x86_fp80 %222, %225
  %227 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %216, x86_fp80 %219, x86_fp80 %226)
  %228 = load x86_fp80, ptr %25, align 16, !tbaa !5
  %229 = fdiv x86_fp80 %227, %228
  %230 = fsub x86_fp80 %212, %229
  %231 = load ptr, ptr %13, align 8, !tbaa !11
  %232 = getelementptr inbounds x86_fp80, ptr %231, i64 1
  store x86_fp80 %230, ptr %232, align 16, !tbaa !5
  %233 = load ptr, ptr %13, align 8, !tbaa !11
  %234 = getelementptr inbounds x86_fp80, ptr %233, i64 0
  %235 = load x86_fp80, ptr %234, align 16, !tbaa !5
  %236 = load ptr, ptr %13, align 8, !tbaa !11
  %237 = getelementptr inbounds x86_fp80, ptr %236, i64 0
  %238 = load x86_fp80, ptr %237, align 16, !tbaa !5
  %239 = load ptr, ptr %13, align 8, !tbaa !11
  %240 = getelementptr inbounds x86_fp80, ptr %239, i64 1
  %241 = load x86_fp80, ptr %240, align 16, !tbaa !5
  %242 = load ptr, ptr %13, align 8, !tbaa !11
  %243 = getelementptr inbounds x86_fp80, ptr %242, i64 1
  %244 = load x86_fp80, ptr %243, align 16, !tbaa !5
  %245 = fmul x86_fp80 %241, %244
  %246 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %235, x86_fp80 %238, x86_fp80 %245)
  %247 = fptrunc x86_fp80 %246 to double
  %248 = call double @sqrt(double noundef %247) #6
  %249 = fpext double %248 to x86_fp80
  %250 = load ptr, ptr %12, align 8, !tbaa !11
  %251 = getelementptr inbounds x86_fp80, ptr %250, i64 0
  %252 = load x86_fp80, ptr %251, align 16, !tbaa !5
  %253 = load ptr, ptr %12, align 8, !tbaa !11
  %254 = getelementptr inbounds x86_fp80, ptr %253, i64 0
  %255 = load x86_fp80, ptr %254, align 16, !tbaa !5
  %256 = fneg x86_fp80 %252
  %257 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %256, x86_fp80 %255, x86_fp80 %249)
  %258 = load ptr, ptr %12, align 8, !tbaa !11
  %259 = getelementptr inbounds x86_fp80, ptr %258, i64 1
  %260 = load x86_fp80, ptr %259, align 16, !tbaa !5
  %261 = load ptr, ptr %12, align 8, !tbaa !11
  %262 = getelementptr inbounds x86_fp80, ptr %261, i64 1
  %263 = load x86_fp80, ptr %262, align 16, !tbaa !5
  %264 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %260, x86_fp80 %263, x86_fp80 %257)
  %265 = fptosi x86_fp80 %264 to i32
  %266 = call i32 @llvm.abs.i32(i32 %265, i1 true)
  %267 = sitofp i32 %266 to x86_fp80
  store x86_fp80 %267, ptr %24, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  br label %63, !llvm.loop !13

268:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %269

269:                                              ; preds = %281, %268
  %270 = load i64, ptr %26, align 8, !tbaa !9
  %271 = icmp ult i64 %270, 2
  br i1 %271, label %273, label %272

272:                                              ; preds = %269
  store i32 7, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %284

273:                                              ; preds = %269
  %274 = load ptr, ptr %13, align 8, !tbaa !11
  %275 = load i64, ptr %26, align 8, !tbaa !9
  %276 = getelementptr inbounds x86_fp80, ptr %274, i64 %275
  %277 = load x86_fp80, ptr %276, align 16, !tbaa !5
  %278 = load ptr, ptr %12, align 8, !tbaa !11
  %279 = load i64, ptr %26, align 8, !tbaa !9
  %280 = getelementptr inbounds x86_fp80, ptr %278, i64 %279
  store x86_fp80 %277, ptr %280, align 16, !tbaa !5
  br label %281

281:                                              ; preds = %273
  %282 = load i64, ptr %26, align 8, !tbaa !9
  %283 = add nsw i64 %282, 1
  store i64 %283, ptr %26, align 8, !tbaa !9
  br label %269, !llvm.loop !15

284:                                              ; preds = %272
  %285 = load ptr, ptr %13, align 8, !tbaa !11
  %286 = call ptr @vector_copy(ptr noundef %285)
  call void @matrix_append(ptr noundef %0, ptr noundef %286)
  call void @vector_free(ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %287

287:                                              ; preds = %284
  %288 = load i64, ptr %20, align 8, !tbaa !9
  %289 = add nsw i64 %288, 1
  store i64 %289, ptr %20, align 8, !tbaa !9
  br label %47, !llvm.loop !16

290:                                              ; preds = %51
  call void @vector_free(ptr noundef %12)
  call void @vector_free(ptr noundef %13)
  call void @vector_free(ptr noundef %14)
  call void @vector_free(ptr noundef %15)
  %291 = load ptr, ptr %16, align 8, !tbaa !11
  call void @free(ptr noundef %291) #6
  call void @vector_free(ptr noundef %17)
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  ret void
}

declare void @matrix_create(ptr dead_on_unwind writable sret(%struct.__matrix_t) align 8, i64 noundef) #1

declare void @matrix_append(ptr noundef, ptr noundef) #1

declare ptr @vector_copy(ptr noundef) #1

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare ptr @van_der_pol(x86_fp80 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #4

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

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

declare void @vector_free(ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!"long double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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.__matrix_t = type { ptr, i64, i64 }

; Function Attrs: nounwind uwtable
define dso_local void @solve_adams_moulton(ptr dead_on_unwind noalias writable sret(%struct.__matrix_t) align 8 %0, x86_fp80 noundef %1, i64 noundef %2, ptr noundef %3, x86_fp80 noundef %4, i64 noundef %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = add nsw i64 %2, 1
  tail call void @matrix_create(ptr dead_on_unwind writable sret(%struct.__matrix_t) align 8 %0, i64 noundef %12) #5
  %13 = tail call ptr @vector_copy(ptr noundef %3) #5
  tail call void @matrix_append(ptr noundef %0, ptr noundef %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %14 = tail call ptr @vector_copy(ptr noundef %3) #5
  store ptr %14, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %15 = tail call ptr @vector_copy(ptr noundef %3) #5
  store ptr %15, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %16 = tail call ptr @vector_copy(ptr noundef %3) #5
  store ptr %16, ptr %11, align 8, !tbaa !5
  %17 = sitofp i64 %2 to x86_fp80
  %18 = fdiv x86_fp80 %1, %17
  %19 = fmul x86_fp80 %18, 0xK4001A000000000000000
  %20 = fdiv x86_fp80 %19, 0xK4002C000000000000000
  %21 = tail call ptr @van_der_pol(x86_fp80 noundef 0xK00000000000000000000, ptr noundef %14) #5
  store ptr %21, ptr %9, align 8, !tbaa !5
  %22 = icmp sgt i64 %2, 1
  br i1 %22, label %.lr.ph51, label %._crit_edge

.lr.ph51:                                         ; preds = %6
  %23 = fcmp olt x86_fp80 %4, 0xK3FFF8000000000000000
  %24 = icmp sgt i64 %5, 0
  %or.cond47 = and i1 %23, %24
  %25 = fdiv x86_fp80 %18, 0xK4002C000000000000000
  %26 = fneg x86_fp80 %20
  %27 = fmul x86_fp80 %20, 0xK3FFDCCCCCCCCCCCCD000
  br i1 %or.cond47, label %.lr.ph.us.preheader, label %.critedge.preheader.preheader

.critedge.preheader.preheader:                    ; preds = %.lr.ph51
  %28 = getelementptr inbounds i8, ptr %15, i64 16
  %29 = getelementptr inbounds i8, ptr %14, i64 16
  br label %.critedge.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph51
  %30 = getelementptr inbounds i8, ptr %14, i64 16
  %31 = getelementptr inbounds i8, ptr %16, i64 16
  %32 = getelementptr inbounds i8, ptr %15, i64 16
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %..critedge.preheader_crit_edge.us
  %33 = phi ptr [ %38, %..critedge.preheader_crit_edge.us ], [ %21, %.lr.ph.us.preheader ]
  %.04450.us = phi i64 [ %105, %..critedge.preheader_crit_edge.us ], [ 1, %.lr.ph.us.preheader ]
  %34 = uitofp nneg i64 %.04450.us to x86_fp80
  %35 = fmul x86_fp80 %18, %34
  %36 = fptosi x86_fp80 %35 to i64
  store ptr %33, ptr %10, align 8, !tbaa !5
  %37 = sitofp i64 %36 to x86_fp80
  %38 = call ptr @van_der_pol(x86_fp80 noundef %37, ptr noundef %14) #5
  store ptr %38, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %38, i64 16
  %41 = getelementptr inbounds i8, ptr %39, i64 16
  %.pre = load x86_fp80, ptr %30, align 16, !tbaa !9
  %.pre54 = load x86_fp80, ptr %14, align 16, !tbaa !9
  br label %42

42:                                               ; preds = %.lr.ph.us, %42
  %43 = phi x86_fp80 [ %.pre54, %.lr.ph.us ], [ %93, %42 ]
  %44 = phi x86_fp80 [ %.pre, %.lr.ph.us ], [ %96, %42 ]
  %.04648.us = phi i64 [ 0, %.lr.ph.us ], [ %45, %42 ]
  %45 = add nuw nsw i64 %.04648.us, 1
  %46 = fneg x86_fp80 %43
  %47 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %20, x86_fp80 %44, x86_fp80 %46)
  %48 = load x86_fp80, ptr %38, align 16, !tbaa !9
  %49 = load x86_fp80, ptr %39, align 16, !tbaa !9
  %50 = fneg x86_fp80 %49
  %51 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %48, x86_fp80 0xK40028000000000000000, x86_fp80 %50)
  %52 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %25, x86_fp80 %51, x86_fp80 %43)
  %53 = fadd x86_fp80 %47, %52
  store x86_fp80 %53, ptr %16, align 16, !tbaa !9
  %54 = load x86_fp80, ptr %14, align 16, !tbaa !9
  %55 = fneg x86_fp80 %54
  %56 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %55, x86_fp80 %54, x86_fp80 0xK3FFF8000000000000000)
  %57 = fmul x86_fp80 %56, 0xK3FFDCCCCCCCCCCCCD000
  %58 = load x86_fp80, ptr %30, align 16, !tbaa !9
  %59 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %57, x86_fp80 %58, x86_fp80 %55)
  %60 = fneg x86_fp80 %58
  %61 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %20, x86_fp80 %59, x86_fp80 %60)
  %62 = load x86_fp80, ptr %40, align 16, !tbaa !9
  %63 = load x86_fp80, ptr %41, align 16, !tbaa !9
  %64 = fneg x86_fp80 %63
  %65 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %62, x86_fp80 0xK40028000000000000000, x86_fp80 %64)
  %66 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %25, x86_fp80 %65, x86_fp80 %58)
  %67 = fadd x86_fp80 %61, %66
  store x86_fp80 %67, ptr %31, align 16, !tbaa !9
  %68 = load x86_fp80, ptr %14, align 16, !tbaa !9
  %69 = fmul x86_fp80 %68, 0xK3FFECCCCCCCCCCCCD000
  %70 = load x86_fp80, ptr %30, align 16, !tbaa !9
  %71 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %69, x86_fp80 %70, x86_fp80 0xK3FFF8000000000000000)
  %72 = fneg x86_fp80 %68
  %73 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %72, x86_fp80 %68, x86_fp80 0xK3FFF8000000000000000)
  %74 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %27, x86_fp80 %73, x86_fp80 0xKBFFF8000000000000000)
  %75 = fmul x86_fp80 %20, %71
  %76 = fmul x86_fp80 %20, %75
  %77 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %74, x86_fp80 0xKBFFF8000000000000000, x86_fp80 %76)
  %78 = fmul x86_fp80 %67, %26
  %79 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %74, x86_fp80 %53, x86_fp80 %78)
  %80 = fdiv x86_fp80 %79, %77
  %81 = fsub x86_fp80 %68, %80
  store x86_fp80 %81, ptr %15, align 16, !tbaa !9
  %82 = load x86_fp80, ptr %30, align 16, !tbaa !9
  %83 = load x86_fp80, ptr %16, align 16, !tbaa !9
  %84 = load x86_fp80, ptr %31, align 16, !tbaa !9
  %85 = fneg x86_fp80 %84
  %86 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %75, x86_fp80 %83, x86_fp80 %85)
  %87 = fdiv x86_fp80 %86, %77
  %88 = fsub x86_fp80 %82, %87
  store x86_fp80 %88, ptr %32, align 16, !tbaa !9
  %89 = fmul x86_fp80 %88, %88
  %90 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %81, x86_fp80 %81, x86_fp80 %89)
  %91 = fptrunc x86_fp80 %90 to double
  %sqrt.us = call double @llvm.sqrt.f64(double %91)
  %92 = fpext double %sqrt.us to x86_fp80
  %93 = load x86_fp80, ptr %14, align 16, !tbaa !9
  %94 = fneg x86_fp80 %93
  %95 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %94, x86_fp80 %93, x86_fp80 %92)
  %96 = load x86_fp80, ptr %30, align 16, !tbaa !9
  %97 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %96, x86_fp80 %96, x86_fp80 %95)
  %98 = fptosi x86_fp80 %97 to i32
  %99 = call i32 @llvm.abs.i32(i32 %98, i1 true)
  %100 = uitofp nneg i32 %99 to x86_fp80
  %101 = fcmp ogt x86_fp80 %100, %4
  %102 = icmp slt i64 %45, %5
  %or.cond.us = select i1 %101, i1 %102, i1 false
  br i1 %or.cond.us, label %42, label %..critedge.preheader_crit_edge.us, !llvm.loop !11

..critedge.preheader_crit_edge.us:                ; preds = %42
  store x86_fp80 %81, ptr %14, align 16, !tbaa !9
  %103 = load x86_fp80, ptr %32, align 16, !tbaa !9
  store x86_fp80 %103, ptr %30, align 16, !tbaa !9
  %104 = call ptr @vector_copy(ptr noundef nonnull %15) #5
  call void @matrix_append(ptr noundef %0, ptr noundef %104) #5
  call void @vector_free(ptr noundef nonnull %10) #5
  %105 = add nuw nsw i64 %.04450.us, 1
  %exitcond53.not = icmp eq i64 %105, %2
  br i1 %exitcond53.not, label %._crit_edge, label %.lr.ph.us, !llvm.loop !13

._crit_edge:                                      ; preds = %.critedge.preheader, %..critedge.preheader_crit_edge.us, %6
  call void @vector_free(ptr noundef nonnull %7) #5
  call void @vector_free(ptr noundef nonnull %8) #5
  call void @vector_free(ptr noundef nonnull %9) #5
  call void @vector_free(ptr noundef nonnull %10) #5
  call void @vector_free(ptr noundef nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  ret void

.critedge.preheader:                              ; preds = %.critedge.preheader.preheader, %.critedge.preheader
  %106 = phi ptr [ %111, %.critedge.preheader ], [ %21, %.critedge.preheader.preheader ]
  %.04450 = phi i64 [ %115, %.critedge.preheader ], [ 1, %.critedge.preheader.preheader ]
  %107 = uitofp nneg i64 %.04450 to x86_fp80
  %108 = fmul x86_fp80 %18, %107
  %109 = fptosi x86_fp80 %108 to i64
  store ptr %106, ptr %10, align 8, !tbaa !5
  %110 = sitofp i64 %109 to x86_fp80
  %111 = call ptr @van_der_pol(x86_fp80 noundef %110, ptr noundef %14) #5
  store ptr %111, ptr %9, align 8, !tbaa !5
  %112 = load x86_fp80, ptr %15, align 16, !tbaa !9
  store x86_fp80 %112, ptr %14, align 16, !tbaa !9
  %113 = load x86_fp80, ptr %28, align 16, !tbaa !9
  store x86_fp80 %113, ptr %29, align 16, !tbaa !9
  %114 = call ptr @vector_copy(ptr noundef nonnull %15) #5
  call void @matrix_append(ptr noundef %0, ptr noundef %114) #5
  call void @vector_free(ptr noundef nonnull %10) #5
  %115 = add nuw nsw i64 %.04450, 1
  %exitcond.not = icmp eq i64 %115, %2
  br i1 %exitcond.not, label %._crit_edge, label %.critedge.preheader, !llvm.loop !13
}

declare void @matrix_create(ptr dead_on_unwind writable sret(%struct.__matrix_t) align 8, i64 noundef) local_unnamed_addr #1

declare void @matrix_append(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @vector_copy(ptr noundef) local_unnamed_addr #1

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

declare ptr @van_der_pol(x86_fp80 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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

declare void @vector_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #4

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass