; LLVM IR from Kashery/fabrik-solver :: src (fabrik)

; 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.point2D = type { double, double, ptr, ptr }
%struct.point3D = type { double, double, double, ptr, ptr, i8, i8, i8 }

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @solve_fabrik(ptr noundef, ptr noundef byval(%struct.point2D) align 8, double noundef) #2

declare void @print_all3d(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local double @generate_mycobot280pi(double noundef %0, double noundef %1, double noundef %2) #2 {
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %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 = alloca %struct.point3D, align 8
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.point2D, align 8
  store double %0, ptr %4, align 8, !tbaa !5
  store double %1, ptr %5, align 8, !tbaa !5
  store double %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %19 = call noalias ptr @malloc(i64 noundef 48) #7
  store ptr %19, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %20 = call noalias ptr @malloc(i64 noundef 48) #7
  store ptr %20, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %21 = call noalias ptr @malloc(i64 noundef 48) #7
  store ptr %21, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %22 = call noalias ptr @malloc(i64 noundef 48) #7
  store ptr %22, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %23 = call noalias ptr @malloc(i64 noundef 48) #7
  store ptr %23, ptr %11, align 8, !tbaa !9
  %24 = load ptr, ptr %7, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.point3D, ptr %24, i32 0, i32 0
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  %26 = load ptr, ptr %7, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.point3D, ptr %26, i32 0, i32 1
  store double 0.000000e+00, ptr %27, align 8, !tbaa !14
  %28 = load ptr, ptr %7, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.point3D, ptr %28, i32 0, i32 2
  store double 0.000000e+00, ptr %29, align 8, !tbaa !15
  %30 = load ptr, ptr %8, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.point3D, ptr %31, i32 0, i32 3
  store ptr %30, ptr %32, align 8, !tbaa !16
  %33 = load ptr, ptr %7, align 8, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.point3D, ptr %34, i32 0, i32 4
  store ptr %33, ptr %35, align 8, !tbaa !17
  %36 = load ptr, ptr %8, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.point3D, ptr %36, i32 0, i32 0
  store double 0.000000e+00, ptr %37, align 8, !tbaa !11
  %38 = load ptr, ptr %8, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.point3D, ptr %38, i32 0, i32 1
  store double 0.000000e+00, ptr %39, align 8, !tbaa !14
  %40 = load ptr, ptr %8, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.point3D, ptr %40, i32 0, i32 2
  store double 1.315600e+02, ptr %41, align 8, !tbaa !15
  %42 = load ptr, ptr %9, align 8, !tbaa !9
  %43 = load ptr, ptr %8, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.point3D, ptr %43, i32 0, i32 3
  store ptr %42, ptr %44, align 8, !tbaa !16
  %45 = load ptr, ptr %8, align 8, !tbaa !9
  %46 = load ptr, ptr %9, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.point3D, ptr %46, i32 0, i32 4
  store ptr %45, ptr %47, align 8, !tbaa !17
  %48 = load ptr, ptr %9, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.point3D, ptr %48, i32 0, i32 0
  store double 0.000000e+00, ptr %49, align 8, !tbaa !11
  %50 = load ptr, ptr %9, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.point3D, ptr %50, i32 0, i32 1
  store double 0.000000e+00, ptr %51, align 8, !tbaa !14
  %52 = load ptr, ptr %9, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.point3D, ptr %52, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = getelementptr inbounds %struct.point3D, ptr %54, i32 0, i32 2
  %56 = load double, ptr %55, align 8, !tbaa !15
  %57 = fadd double %56, 1.104000e+02
  %58 = load ptr, ptr %9, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.point3D, ptr %58, i32 0, i32 2
  store double %57, ptr %59, align 8, !tbaa !15
  %60 = load ptr, ptr %10, align 8, !tbaa !9
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.point3D, ptr %61, i32 0, i32 3
  store ptr %60, ptr %62, align 8, !tbaa !16
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  %64 = load ptr, ptr %10, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.point3D, ptr %64, i32 0, i32 4
  store ptr %63, ptr %65, align 8, !tbaa !17
  %66 = load ptr, ptr %10, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.point3D, ptr %66, i32 0, i32 0
  store double 0.000000e+00, ptr %67, align 8, !tbaa !11
  %68 = load ptr, ptr %10, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.point3D, ptr %68, i32 0, i32 1
  store double 0.000000e+00, ptr %69, align 8, !tbaa !14
  %70 = load ptr, ptr %10, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.point3D, ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = getelementptr inbounds %struct.point3D, ptr %72, i32 0, i32 2
  %74 = load double, ptr %73, align 8, !tbaa !15
  %75 = fadd double %74, 9.600000e+01
  %76 = load ptr, ptr %10, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.point3D, ptr %76, i32 0, i32 2
  store double %75, ptr %77, align 8, !tbaa !15
  %78 = load ptr, ptr %11, align 8, !tbaa !9
  %79 = load ptr, ptr %10, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.point3D, ptr %79, i32 0, i32 3
  store ptr %78, ptr %80, align 8, !tbaa !16
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.point3D, ptr %82, i32 0, i32 4
  store ptr %81, ptr %83, align 8, !tbaa !17
  %84 = load ptr, ptr %11, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.point3D, ptr %84, i32 0, i32 0
  store double 0.000000e+00, ptr %85, align 8, !tbaa !11
  %86 = load ptr, ptr %11, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.point3D, ptr %86, i32 0, i32 1
  store double 0.000000e+00, ptr %87, align 8, !tbaa !14
  %88 = load ptr, ptr %11, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.point3D, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !17
  %91 = getelementptr inbounds %struct.point3D, ptr %90, i32 0, i32 2
  %92 = load double, ptr %91, align 8, !tbaa !15
  %93 = fadd double %92, 7.318000e+01
  %94 = load ptr, ptr %11, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.point3D, ptr %94, i32 0, i32 2
  store double %93, ptr %95, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #6
  %96 = load double, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 0
  store double %96, ptr %97, align 8, !tbaa !11
  %98 = load double, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 1
  store double %98, ptr %99, align 8, !tbaa !14
  %100 = load double, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 2
  store double %100, ptr %101, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %102 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 1
  %103 = load double, ptr %102, align 8, !tbaa !14
  %104 = fneg double %103
  %105 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 0
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = call double @atan2(double noundef %104, double noundef %106) #6
  store double %107, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %108 = call noalias ptr @malloc(i64 noundef 32) #7
  store ptr %108, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %109 = call noalias ptr @malloc(i64 noundef 32) #7
  store ptr %109, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %110 = call noalias ptr @malloc(i64 noundef 32) #7
  store ptr %110, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %111 = call noalias ptr @malloc(i64 noundef 32) #7
  store ptr %111, ptr %17, align 8, !tbaa !9
  %112 = load ptr, ptr %14, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.point2D, ptr %112, i32 0, i32 0
  store double 0.000000e+00, ptr %113, align 8, !tbaa !18
  %114 = load ptr, ptr %14, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.point2D, ptr %114, i32 0, i32 1
  store double 1.315600e+02, ptr %115, align 8, !tbaa !20
  %116 = load ptr, ptr %15, align 8, !tbaa !9
  %117 = load ptr, ptr %14, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.point2D, ptr %117, i32 0, i32 2
  store ptr %116, ptr %118, align 8, !tbaa !21
  %119 = load ptr, ptr %14, align 8, !tbaa !9
  %120 = load ptr, ptr %15, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.point2D, ptr %120, i32 0, i32 3
  store ptr %119, ptr %121, align 8, !tbaa !22
  %122 = load ptr, ptr %15, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.point2D, ptr %122, i32 0, i32 0
  store double 0.000000e+00, ptr %123, align 8, !tbaa !18
  %124 = load ptr, ptr %15, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.point2D, ptr %124, i32 0, i32 3
  %126 = load ptr, ptr %125, align 8, !tbaa !22
  %127 = getelementptr inbounds %struct.point2D, ptr %126, i32 0, i32 1
  %128 = load double, ptr %127, align 8, !tbaa !20
  %129 = fadd double %128, 1.104000e+02
  %130 = load ptr, ptr %15, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.point2D, ptr %130, i32 0, i32 1
  store double %129, ptr %131, align 8, !tbaa !20
  %132 = load ptr, ptr %16, align 8, !tbaa !9
  %133 = load ptr, ptr %15, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.point2D, ptr %133, i32 0, i32 2
  store ptr %132, ptr %134, align 8, !tbaa !21
  %135 = load ptr, ptr %15, align 8, !tbaa !9
  %136 = load ptr, ptr %16, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.point2D, ptr %136, i32 0, i32 3
  store ptr %135, ptr %137, align 8, !tbaa !22
  %138 = load ptr, ptr %16, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.point2D, ptr %138, i32 0, i32 0
  store double 0.000000e+00, ptr %139, align 8, !tbaa !18
  %140 = load ptr, ptr %16, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.point2D, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !22
  %143 = getelementptr inbounds %struct.point2D, ptr %142, i32 0, i32 1
  %144 = load double, ptr %143, align 8, !tbaa !20
  %145 = fadd double %144, 9.600000e+01
  %146 = load ptr, ptr %16, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.point2D, ptr %146, i32 0, i32 1
  store double %145, ptr %147, align 8, !tbaa !20
  %148 = load ptr, ptr %17, align 8, !tbaa !9
  %149 = load ptr, ptr %16, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.point2D, ptr %149, i32 0, i32 2
  store ptr %148, ptr %150, align 8, !tbaa !21
  %151 = load ptr, ptr %16, align 8, !tbaa !9
  %152 = load ptr, ptr %17, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.point2D, ptr %152, i32 0, i32 3
  store ptr %151, ptr %153, align 8, !tbaa !22
  %154 = load ptr, ptr %17, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.point2D, ptr %154, i32 0, i32 0
  store double 0.000000e+00, ptr %155, align 8, !tbaa !18
  %156 = load ptr, ptr %17, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.point2D, ptr %156, i32 0, i32 3
  %158 = load ptr, ptr %157, align 8, !tbaa !22
  %159 = getelementptr inbounds %struct.point2D, ptr %158, i32 0, i32 1
  %160 = load double, ptr %159, align 8, !tbaa !20
  %161 = fadd double %160, 7.318000e+01
  %162 = load ptr, ptr %17, align 8, !tbaa !9
  %163 = getelementptr inbounds %struct.point2D, ptr %162, i32 0, i32 1
  store double %161, ptr %163, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %164 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 0
  %165 = load double, ptr %164, align 8, !tbaa !11
  %166 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 0
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 1
  %169 = load double, ptr %168, align 8, !tbaa !14
  %170 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 1
  %171 = load double, ptr %170, align 8, !tbaa !14
  %172 = fmul double %169, %171
  %173 = call double @llvm.fmuladd.f64(double %165, double %167, double %172)
  %174 = call double @sqrt(double noundef %173) #6
  %175 = getelementptr inbounds %struct.point2D, ptr %18, i32 0, i32 0
  store double %174, ptr %175, align 8, !tbaa !18
  %176 = getelementptr inbounds %struct.point3D, ptr %12, i32 0, i32 2
  %177 = load double, ptr %176, align 8, !tbaa !15
  %178 = load ptr, ptr %8, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.point3D, ptr %178, i32 0, i32 2
  %180 = load double, ptr %179, align 8, !tbaa !15
  %181 = fsub double %177, %180
  %182 = getelementptr inbounds %struct.point2D, ptr %18, i32 0, i32 1
  store double %181, ptr %182, align 8, !tbaa !20
  %183 = load ptr, ptr %14, align 8, !tbaa !9
  call void @solve_fabrik(ptr noundef %183, ptr noundef byval(%struct.point2D) align 8 %18, double noundef 0x3CB0000000000000)
  %184 = load ptr, ptr %14, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.point2D, ptr %184, i32 0, i32 0
  %186 = load double, ptr %185, align 8, !tbaa !18
  %187 = load double, ptr %13, align 8, !tbaa !5
  %188 = fneg double %187
  %189 = call double @cos(double noundef %188) #6
  %190 = fmul double %186, %189
  %191 = load ptr, ptr %8, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.point3D, ptr %191, i32 0, i32 0
  store double %190, ptr %192, align 8, !tbaa !11
  %193 = load ptr, ptr %14, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.point2D, ptr %193, i32 0, i32 0
  %195 = load double, ptr %194, align 8, !tbaa !18
  %196 = load double, ptr %13, align 8, !tbaa !5
  %197 = fneg double %196
  %198 = call double @sin(double noundef %197) #6
  %199 = fmul double %195, %198
  %200 = load ptr, ptr %8, align 8, !tbaa !9
  %201 = getelementptr inbounds %struct.point3D, ptr %200, i32 0, i32 1
  store double %199, ptr %201, align 8, !tbaa !14
  %202 = load ptr, ptr %14, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.point2D, ptr %202, i32 0, i32 1
  %204 = load double, ptr %203, align 8, !tbaa !20
  %205 = load ptr, ptr %8, align 8, !tbaa !9
  %206 = getelementptr inbounds %struct.point3D, ptr %205, i32 0, i32 2
  %207 = load double, ptr %206, align 8, !tbaa !15
  %208 = fadd double %204, %207
  %209 = load ptr, ptr %8, align 8, !tbaa !9
  %210 = getelementptr inbounds %struct.point3D, ptr %209, i32 0, i32 2
  store double %208, ptr %210, align 8, !tbaa !15
  %211 = load ptr, ptr %15, align 8, !tbaa !9
  %212 = getelementptr inbounds %struct.point2D, ptr %211, i32 0, i32 0
  %213 = load double, ptr %212, align 8, !tbaa !18
  %214 = load double, ptr %13, align 8, !tbaa !5
  %215 = fneg double %214
  %216 = call double @cos(double noundef %215) #6
  %217 = fmul double %213, %216
  %218 = load ptr, ptr %9, align 8, !tbaa !9
  %219 = getelementptr inbounds %struct.point3D, ptr %218, i32 0, i32 0
  store double %217, ptr %219, align 8, !tbaa !11
  %220 = load ptr, ptr %15, align 8, !tbaa !9
  %221 = getelementptr inbounds %struct.point2D, ptr %220, i32 0, i32 0
  %222 = load double, ptr %221, align 8, !tbaa !18
  %223 = load double, ptr %13, align 8, !tbaa !5
  %224 = fneg double %223
  %225 = call double @sin(double noundef %224) #6
  %226 = fmul double %222, %225
  %227 = load ptr, ptr %9, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct.point3D, ptr %227, i32 0, i32 1
  store double %226, ptr %228, align 8, !tbaa !14
  %229 = load ptr, ptr %15, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.point2D, ptr %229, i32 0, i32 1
  %231 = load double, ptr %230, align 8, !tbaa !20
  %232 = load ptr, ptr %8, align 8, !tbaa !9
  %233 = getelementptr inbounds %struct.point3D, ptr %232, i32 0, i32 2
  %234 = load double, ptr %233, align 8, !tbaa !15
  %235 = fadd double %231, %234
  %236 = load ptr, ptr %9, align 8, !tbaa !9
  %237 = getelementptr inbounds %struct.point3D, ptr %236, i32 0, i32 2
  store double %235, ptr %237, align 8, !tbaa !15
  %238 = load ptr, ptr %16, align 8, !tbaa !9
  %239 = getelementptr inbounds %struct.point2D, ptr %238, i32 0, i32 0
  %240 = load double, ptr %239, align 8, !tbaa !18
  %241 = load double, ptr %13, align 8, !tbaa !5
  %242 = fneg double %241
  %243 = call double @cos(double noundef %242) #6
  %244 = fmul double %240, %243
  %245 = load ptr, ptr %10, align 8, !tbaa !9
  %246 = getelementptr inbounds %struct.point3D, ptr %245, i32 0, i32 0
  store double %244, ptr %246, align 8, !tbaa !11
  %247 = load ptr, ptr %16, align 8, !tbaa !9
  %248 = getelementptr inbounds %struct.point2D, ptr %247, i32 0, i32 0
  %249 = load double, ptr %248, align 8, !tbaa !18
  %250 = load double, ptr %13, align 8, !tbaa !5
  %251 = fneg double %250
  %252 = call double @sin(double noundef %251) #6
  %253 = fmul double %249, %252
  %254 = load ptr, ptr %10, align 8, !tbaa !9
  %255 = getelementptr inbounds %struct.point3D, ptr %254, i32 0, i32 1
  store double %253, ptr %255, align 8, !tbaa !14
  %256 = load ptr, ptr %16, align 8, !tbaa !9
  %257 = getelementptr inbounds %struct.point2D, ptr %256, i32 0, i32 1
  %258 = load double, ptr %257, align 8, !tbaa !20
  %259 = load ptr, ptr %8, align 8, !tbaa !9
  %260 = getelementptr inbounds %struct.point3D, ptr %259, i32 0, i32 2
  %261 = load double, ptr %260, align 8, !tbaa !15
  %262 = fadd double %258, %261
  %263 = load ptr, ptr %10, align 8, !tbaa !9
  %264 = getelementptr inbounds %struct.point3D, ptr %263, i32 0, i32 2
  store double %262, ptr %264, align 8, !tbaa !15
  %265 = load ptr, ptr %17, align 8, !tbaa !9
  %266 = getelementptr inbounds %struct.point2D, ptr %265, i32 0, i32 0
  %267 = load double, ptr %266, align 8, !tbaa !18
  %268 = load double, ptr %13, align 8, !tbaa !5
  %269 = fneg double %268
  %270 = call double @cos(double noundef %269) #6
  %271 = fmul double %267, %270
  %272 = load ptr, ptr %11, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.point3D, ptr %272, i32 0, i32 0
  store double %271, ptr %273, align 8, !tbaa !11
  %274 = load ptr, ptr %17, align 8, !tbaa !9
  %275 = getelementptr inbounds %struct.point2D, ptr %274, i32 0, i32 0
  %276 = load double, ptr %275, align 8, !tbaa !18
  %277 = load double, ptr %13, align 8, !tbaa !5
  %278 = fneg double %277
  %279 = call double @sin(double noundef %278) #6
  %280 = fmul double %276, %279
  %281 = load ptr, ptr %11, align 8, !tbaa !9
  %282 = getelementptr inbounds %struct.point3D, ptr %281, i32 0, i32 1
  store double %280, ptr %282, align 8, !tbaa !14
  %283 = load ptr, ptr %17, align 8, !tbaa !9
  %284 = getelementptr inbounds %struct.point2D, ptr %283, i32 0, i32 1
  %285 = load double, ptr %284, align 8, !tbaa !20
  %286 = load ptr, ptr %8, align 8, !tbaa !9
  %287 = getelementptr inbounds %struct.point3D, ptr %286, i32 0, i32 2
  %288 = load double, ptr %287, align 8, !tbaa !15
  %289 = fadd double %285, %288
  %290 = load ptr, ptr %11, align 8, !tbaa !9
  %291 = getelementptr inbounds %struct.point3D, ptr %290, i32 0, i32 2
  store double %289, ptr %291, align 8, !tbaa !15
  %292 = load ptr, ptr %7, align 8, !tbaa !9
  call void @print_all3d(ptr noundef %292)
  %293 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free_3d(ptr noundef %293)
  %294 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free_2d(ptr noundef %294)
  %295 = load double, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 32, 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 48, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret double %295
}

; Function Attrs: nounwind
declare double @atan2(double noundef, double noundef) #4

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

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

; Function Attrs: nounwind
declare double @cos(double noundef) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #4

declare void @free_3d(ptr noundef) #3

declare void @free_2d(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !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 = !{!"point3D", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !13, i64 40, !13, i64 41, !13, i64 42}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !10, i64 24}
!17 = !{!12, !10, i64 32}
!18 = !{!19, !6, i64 0}
!19 = !{!"point2D", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!20 = !{!19, !6, i64 8}
!21 = !{!19, !10, i64 16}
!22 = !{!19, !10, i64 24}


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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @solve_fabrik(ptr noundef, ptr noundef byval(%struct.point2D) align 8, double noundef) local_unnamed_addr #2

declare void @print_all3d(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local double @generate_mycobot280pi(double noundef %0, double noundef %1, double noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.point2D, align 8
  %5 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %6 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %7 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %8 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %9 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %10 = getelementptr inbounds i8, ptr %5, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  store ptr %6, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %5, ptr %11, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  %13 = getelementptr inbounds i8, ptr %6, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  store double 1.315600e+02, ptr %13, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %7, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %7, i64 32
  store ptr %6, ptr %15, align 8, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %7, i64 8
  %17 = getelementptr inbounds i8, ptr %7, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 0, i64 16, i1 false)
  store double 2.419600e+02, ptr %17, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %7, i64 24
  store ptr %8, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %8, i64 32
  store ptr %7, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  %21 = getelementptr inbounds i8, ptr %8, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  store double 0x40751F5C28F5C290, ptr %21, align 8, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %8, i64 24
  store ptr %9, ptr %22, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %9, i64 32
  store ptr %8, ptr %23, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %9, i64 8
  %25 = getelementptr inbounds i8, ptr %9, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  store double 0x4079B23D70A3D70B, ptr %25, align 8, !tbaa !13
  %26 = fneg double %1
  %27 = tail call double @atan2(double noundef %26, double noundef %0) #9
  %28 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
  %29 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
  %30 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
  %31 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
  %32 = getelementptr inbounds i8, ptr %28, i64 8
  store <2 x double> <double 0.000000e+00, double 1.315600e+02>, ptr %28, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %28, i64 16
  store ptr %29, ptr %33, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %29, i64 24
  store ptr %28, ptr %34, align 8, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %29, i64 8
  store <2 x double> <double 0.000000e+00, double 2.419600e+02>, ptr %29, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %29, i64 16
  store ptr %30, ptr %36, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %30, i64 24
  store ptr %29, ptr %37, align 8, !tbaa !17
  %38 = getelementptr inbounds i8, ptr %30, i64 8
  store <2 x double> <double 0.000000e+00, double 0x40751F5C28F5C290>, ptr %30, align 8, !tbaa !14
  %39 = getelementptr inbounds i8, ptr %30, i64 16
  store ptr %31, ptr %39, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %31, i64 24
  store ptr %30, ptr %40, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %31, i64 8
  store <2 x double> <double 0.000000e+00, double 0x4079B23D70A3D70B>, ptr %31, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  %42 = fmul double %1, %1
  %43 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %42)
  %sqrt = tail call double @llvm.sqrt.f64(double %43)
  store double %sqrt, ptr %4, align 8, !tbaa !18
  %44 = load double, ptr %13, align 8, !tbaa !13
  %45 = fsub double %2, %44
  %46 = getelementptr inbounds i8, ptr %4, i64 8
  store double %45, ptr %46, align 8, !tbaa !19
  tail call void @solve_fabrik(ptr noundef nonnull %28, ptr noundef nonnull byval(%struct.point2D) align 8 %4, double noundef 0x3CB0000000000000)
  %47 = load double, ptr %28, align 8, !tbaa !18
  %48 = fneg double %27
  %49 = tail call double @cos(double noundef %48) #9
  %50 = fmul double %47, %49
  store double %50, ptr %6, align 8, !tbaa !20
  %51 = load double, ptr %28, align 8, !tbaa !18
  %52 = tail call double @sin(double noundef %48) #9
  %53 = fmul double %51, %52
  store double %53, ptr %12, align 8, !tbaa !21
  %54 = load double, ptr %32, align 8, !tbaa !19
  %55 = load double, ptr %13, align 8, !tbaa !13
  %56 = fadd double %54, %55
  store double %56, ptr %13, align 8, !tbaa !13
  %57 = load double, ptr %29, align 8, !tbaa !18
  %58 = tail call double @cos(double noundef %48) #9
  %59 = fmul double %57, %58
  store double %59, ptr %7, align 8, !tbaa !20
  %60 = load double, ptr %29, align 8, !tbaa !18
  %61 = tail call double @sin(double noundef %48) #9
  %62 = fmul double %60, %61
  store double %62, ptr %16, align 8, !tbaa !21
  %63 = load double, ptr %35, align 8, !tbaa !19
  %64 = load double, ptr %13, align 8, !tbaa !13
  %65 = fadd double %63, %64
  store double %65, ptr %17, align 8, !tbaa !13
  %66 = load double, ptr %30, align 8, !tbaa !18
  %67 = tail call double @cos(double noundef %48) #9
  %68 = fmul double %66, %67
  store double %68, ptr %8, align 8, !tbaa !20
  %69 = load double, ptr %30, align 8, !tbaa !18
  %70 = tail call double @sin(double noundef %48) #9
  %71 = fmul double %69, %70
  store double %71, ptr %20, align 8, !tbaa !21
  %72 = load double, ptr %38, align 8, !tbaa !19
  %73 = load double, ptr %13, align 8, !tbaa !13
  %74 = fadd double %72, %73
  store double %74, ptr %21, align 8, !tbaa !13
  %75 = load double, ptr %31, align 8, !tbaa !18
  %76 = tail call double @cos(double noundef %48) #9
  %77 = fmul double %75, %76
  store double %77, ptr %9, align 8, !tbaa !20
  %78 = load double, ptr %31, align 8, !tbaa !18
  %79 = tail call double @sin(double noundef %48) #9
  %80 = fmul double %78, %79
  store double %80, ptr %24, align 8, !tbaa !21
  %81 = load double, ptr %41, align 8, !tbaa !19
  %82 = load double, ptr %13, align 8, !tbaa !13
  %83 = fadd double %81, %82
  store double %83, ptr %25, align 8, !tbaa !13
  tail call void @print_all3d(ptr noundef nonnull %5) #9
  tail call void @free_3d(ptr noundef nonnull %5) #9
  tail call void @free_2d(ptr noundef nonnull %28) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  ret double %27
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @atan2(double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #4

declare void @free_3d(ptr noundef) local_unnamed_addr #3

declare void @free_2d(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 24}
!6 = !{!"point3D", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !11, i64 40, !11, i64 41, !11, i64 42}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !10, i64 32}
!13 = !{!6, !7, i64 16}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !10, i64 16}
!16 = !{!"point2D", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24}
!17 = !{!16, !10, i64 24}
!18 = !{!16, !7, i64 0}
!19 = !{!16, !7, i64 8}
!20 = !{!6, !7, i64 0}
!21 = !{!6, !7, i64 8}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SLPVectorizerPass,SROAPass,TailCallElimPass