; LLVM IR from ESPboy-edu/ESPboy_tinyphysicsengine :: programs (test)

; 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.TPE_Joint = type { %struct.TPE_Vec3, [3 x i16], i8 }
%struct.TPE_Vec3 = type { i32, i32, i32 }
%struct.TPE_Connection = type { i8, i8, i16 }
%struct.TPE_Body = type { ptr, i8, ptr, i8, i16, i16, i16, i8, i8 }
%struct.TPE_World = type { ptr, i16, ptr, ptr }

@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_joint(ptr dead_on_unwind noalias writable sret(%struct.TPE_Joint) align 4, i64, i32, i32 noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_vec3(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @TPE_vec3Len(i64, i32) #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_bodyInit(ptr noundef, ptr noundef, i8 noundef zeroext, ptr noundef, i8 noundef zeroext, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_worldInit(ptr noundef, ptr noundef, i16 noundef zeroext, ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_worldStep(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_bodyMoveBy(ptr noundef, i64, i32) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @TPE_abs(i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_bodyGetCenterOfMass(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_bodyAccelerate(ptr noundef, i64, i32) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_vec3Normalized(i64, i32) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @TPE_vec2Angle(i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_castEnvironmentRay(i64, i32, i64, i32, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_castBodyRay(i64, i32, i64, i32, i16 noundef signext, ptr noundef, ptr noundef, ptr noundef) #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @TPE_testClosestPointFunction(ptr noundef, i64, i32, i64, i32, i8 noundef zeroext, i16 noundef signext, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFunc(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFunc2(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFuncBad(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFuncBad2(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envSimple(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFuncHeightmap(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.TPE_Vec3, align 4
  %4 = alloca %struct.TPE_Vec3, align 4
  %5 = alloca { i64, i32 }, align 8
  %6 = alloca { i64, i32 }, align 4
  %7 = alloca { i64, i32 }, align 8
  %8 = alloca { i64, i32 }, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.TPE_Vec3, align 4
  %11 = alloca %struct.TPE_Vec3, align 4
  %12 = alloca { i64, i32 }, align 8
  %13 = alloca { i64, i32 }, align 4
  %14 = alloca { i64, i32 }, align 8
  %15 = alloca { i64, i32 }, align 4
  %16 = alloca %struct.TPE_Vec3, align 4
  %17 = alloca %struct.TPE_Vec3, align 4
  %18 = alloca { i64, i32 }, align 8
  %19 = alloca { i64, i32 }, align 4
  %20 = alloca { i64, i32 }, align 8
  %21 = alloca { i64, i32 }, align 4
  %22 = alloca %struct.TPE_Vec3, align 4
  %23 = alloca %struct.TPE_Vec3, align 4
  %24 = alloca { i64, i32 }, align 8
  %25 = alloca { i64, i32 }, align 4
  %26 = alloca { i64, i32 }, align 8
  %27 = alloca { i64, i32 }, align 4
  %28 = alloca [16 x %struct.TPE_Joint], align 16
  %29 = alloca [16 x %struct.TPE_Connection], align 16
  %30 = alloca %struct.TPE_Joint, align 4
  %31 = alloca %struct.TPE_Vec3, align 4
  %32 = alloca { i64, i32 }, align 8
  %33 = alloca { i64, i32 }, align 4
  %34 = alloca %struct.TPE_Joint, align 4
  %35 = alloca %struct.TPE_Vec3, align 4
  %36 = alloca { i64, i32 }, align 8
  %37 = alloca { i64, i32 }, align 4
  %38 = alloca %struct.TPE_Joint, align 4
  %39 = alloca %struct.TPE_Vec3, align 4
  %40 = alloca { i64, i32 }, align 8
  %41 = alloca { i64, i32 }, align 4
  %42 = alloca %struct.TPE_Joint, align 4
  %43 = alloca %struct.TPE_Vec3, align 4
  %44 = alloca { i64, i32 }, align 8
  %45 = alloca { i64, i32 }, align 4
  %46 = alloca [4 x i32], align 16
  %47 = alloca [4 x i32], align 16
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca [8 x %struct.TPE_Body], align 16
  %52 = alloca [4 x i32], align 16
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca %struct.TPE_World, align 8
  %57 = alloca [4 x i32], align 16
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca %struct.TPE_Vec3, align 4
  %61 = alloca { i64, i32 }, align 8
  %62 = alloca %struct.TPE_Vec3, align 4
  %63 = alloca { i64, i32 }, align 8
  %64 = alloca { i64, i32 }, align 4
  %65 = alloca { i64, i32 }, align 4
  %66 = alloca %struct.TPE_Vec3, align 4
  %67 = alloca { i64, i32 }, align 8
  %68 = alloca %struct.TPE_Vec3, align 4
  %69 = alloca { i64, i32 }, align 8
  %70 = alloca { i64, i32 }, align 4
  %71 = alloca { i64, i32 }, align 4
  %72 = alloca %struct.TPE_Vec3, align 4
  %73 = alloca { i64, i32 }, align 8
  %74 = alloca %struct.TPE_Vec3, align 4
  %75 = alloca { i64, i32 }, align 8
  %76 = alloca { i64, i32 }, align 4
  %77 = alloca { i64, i32 }, align 4
  %78 = alloca %struct.TPE_Vec3, align 4
  %79 = alloca { i64, i32 }, align 8
  %80 = alloca %struct.TPE_Vec3, align 4
  %81 = alloca { i64, i32 }, align 8
  %82 = alloca { i64, i32 }, align 4
  %83 = alloca { i64, i32 }, align 4
  %84 = alloca %struct.TPE_Vec3, align 4
  %85 = alloca { i64, i32 }, align 8
  %86 = alloca %struct.TPE_Vec3, align 4
  %87 = alloca { i64, i32 }, align 8
  %88 = alloca { i64, i32 }, align 4
  %89 = alloca { i64, i32 }, align 4
  %90 = alloca %struct.TPE_World, align 8
  %91 = alloca [64 x %struct.TPE_Joint], align 16
  %92 = alloca [128 x %struct.TPE_Connection], align 16
  %93 = alloca [4 x %struct.TPE_Body], align 16
  %94 = alloca %struct.TPE_Joint, align 4
  %95 = alloca %struct.TPE_Vec3, align 4
  %96 = alloca { i64, i32 }, align 8
  %97 = alloca { i64, i32 }, align 4
  %98 = alloca %struct.TPE_Vec3, align 4
  %99 = alloca { i64, i32 }, align 8
  %100 = alloca { i64, i32 }, align 4
  %101 = alloca %struct.TPE_Vec3, align 4
  %102 = alloca { i64, i32 }, align 8
  %103 = alloca { i64, i32 }, align 4
  %104 = alloca %struct.TPE_Vec3, align 4
  %105 = alloca { i64, i32 }, align 8
  %106 = alloca { i64, i32 }, align 4
  %107 = alloca %struct.TPE_Vec3, align 4
  %108 = alloca { i64, i32 }, align 8
  %109 = alloca { i64, i32 }, align 4
  %110 = alloca i16, align 2
  %111 = alloca %struct.TPE_Vec3, align 4
  %112 = alloca { i64, i32 }, align 8
  %113 = alloca %struct.TPE_Vec3, align 4
  %114 = alloca { i64, i32 }, align 8
  %115 = alloca { i64, i32 }, align 4
  %116 = alloca { i64, i32 }, align 4
  %117 = alloca %struct.TPE_Vec3, align 4
  %118 = alloca { i64, i32 }, align 8
  %119 = alloca i32, align 4
  %120 = alloca i8, align 1
  %121 = alloca i32, align 4
  %122 = alloca i32, align 4
  %123 = alloca %struct.TPE_Vec3, align 4
  %124 = alloca { i64, i32 }, align 8
  %125 = alloca %struct.TPE_Vec3, align 4
  %126 = alloca { i64, i32 }, align 8
  %127 = alloca { i64, i32 }, align 4
  %128 = alloca %struct.TPE_Vec3, align 4
  %129 = alloca { i64, i32 }, align 8
  %130 = alloca { i64, i32 }, align 4
  %131 = alloca %struct.TPE_Vec3, align 4
  %132 = alloca { i64, i32 }, align 8
  %133 = alloca { i64, i32 }, align 4
  %134 = alloca %struct.TPE_Vec3, align 4
  %135 = alloca { i64, i32 }, align 8
  %136 = alloca { i64, i32 }, align 4
  %137 = alloca i32, align 4
  %138 = alloca i8, align 1
  %139 = alloca i32, align 4
  %140 = alloca %struct.TPE_Vec3, align 4
  %141 = alloca { i64, i32 }, align 8
  %142 = alloca i32, align 4
  %143 = alloca i32, align 4
  %144 = alloca i32, align 4
  %145 = alloca i32, align 4
  %146 = alloca %struct.TPE_Vec3, align 4
  %147 = alloca { i64, i32 }, align 8
  %148 = alloca %struct.TPE_Vec3, align 4
  %149 = alloca { i64, i32 }, align 4
  %150 = alloca { i64, i32 }, align 8
  %151 = alloca i8, align 1
  %152 = alloca %struct.TPE_Vec3, align 4
  %153 = alloca %struct.TPE_Vec3, align 4
  %154 = alloca { i64, i32 }, align 8
  %155 = alloca { i64, i32 }, align 4
  %156 = alloca { i64, i32 }, align 4
  %157 = alloca { i64, i32 }, align 8
  %158 = alloca %struct.TPE_Vec3, align 4
  %159 = alloca { i64, i32 }, align 4
  %160 = alloca { i64, i32 }, align 8
  %161 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  %162 = call i32 @puts(ptr noundef @.str)
  %163 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %164 = call i32 @TPE_vec2Angle(i32 noundef -100, i32 noundef 0)
  %165 = icmp eq i32 %164, 256
  br i1 %165, label %168, label %166

166:                                              ; preds = %0
  %167 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  br label %1048

168:                                              ; preds = %0
  %169 = call i32 @puts(ptr noundef @.str.3)
  br label %170

170:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %171 = call { i64, i32 } @TPE_vec3(i32 noundef 100, i32 noundef 0, i32 noundef 0)
  store { i64, i32 } %171, ptr %5, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 8 %5, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %4, i64 12, i1 false)
  %172 = getelementptr inbounds { i64, i32 }, ptr %6, i32 0, i32 0
  %173 = load i64, ptr %172, align 4
  %174 = getelementptr inbounds { i64, i32 }, ptr %6, i32 0, i32 1
  %175 = load i32, ptr %174, align 4
  %176 = call { i64, i32 } @TPE_vec3Normalized(i64 %173, i32 %175)
  store { i64, i32 } %176, ptr %7, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 8 %7, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %3, i64 12, i1 false)
  %177 = getelementptr inbounds { i64, i32 }, ptr %8, i32 0, i32 0
  %178 = load i64, ptr %177, align 4
  %179 = getelementptr inbounds { i64, i32 }, ptr %8, i32 0, i32 1
  %180 = load i32, ptr %179, align 4
  %181 = call i32 @TPE_vec3Len(i64 %178, i32 %180)
  store i32 %181, ptr %2, align 4, !tbaa !5
  %182 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %183 = load i32, ptr %2, align 4, !tbaa !5
  %184 = sub nsw i32 %183, 512
  %185 = call i32 @TPE_abs(i32 noundef %184)
  %186 = icmp slt i32 %185, 5
  br i1 %186, label %189, label %187

187:                                              ; preds = %170
  %188 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

189:                                              ; preds = %170
  %190 = call i32 @puts(ptr noundef @.str.3)
  br label %191

191:                                              ; preds = %189
  %192 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store { i64, i32 } %192, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %11, i64 12, i1 false)
  %193 = getelementptr inbounds { i64, i32 }, ptr %13, i32 0, i32 0
  %194 = load i64, ptr %193, align 4
  %195 = getelementptr inbounds { i64, i32 }, ptr %13, i32 0, i32 1
  %196 = load i32, ptr %195, align 4
  %197 = call { i64, i32 } @TPE_vec3Normalized(i64 %194, i32 %196)
  store { i64, i32 } %197, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %14, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %10, i64 12, i1 false)
  %198 = getelementptr inbounds { i64, i32 }, ptr %15, i32 0, i32 0
  %199 = load i64, ptr %198, align 4
  %200 = getelementptr inbounds { i64, i32 }, ptr %15, i32 0, i32 1
  %201 = load i32, ptr %200, align 4
  %202 = call i32 @TPE_vec3Len(i64 %199, i32 %201)
  store i32 %202, ptr %2, align 4, !tbaa !5
  %203 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %204 = load i32, ptr %2, align 4, !tbaa !5
  %205 = sub nsw i32 %204, 512
  %206 = call i32 @TPE_abs(i32 noundef %205)
  %207 = icmp slt i32 %206, 5
  br i1 %207, label %210, label %208

208:                                              ; preds = %191
  %209 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

210:                                              ; preds = %191
  %211 = call i32 @puts(ptr noundef @.str.3)
  br label %212

212:                                              ; preds = %210
  %213 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef -1, i32 noundef 0)
  store { i64, i32 } %213, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %18, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %17, i64 12, i1 false)
  %214 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 0
  %215 = load i64, ptr %214, align 4
  %216 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 1
  %217 = load i32, ptr %216, align 4
  %218 = call { i64, i32 } @TPE_vec3Normalized(i64 %215, i32 %217)
  store { i64, i32 } %218, ptr %20, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %20, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %16, i64 12, i1 false)
  %219 = getelementptr inbounds { i64, i32 }, ptr %21, i32 0, i32 0
  %220 = load i64, ptr %219, align 4
  %221 = getelementptr inbounds { i64, i32 }, ptr %21, i32 0, i32 1
  %222 = load i32, ptr %221, align 4
  %223 = call i32 @TPE_vec3Len(i64 %220, i32 %222)
  store i32 %223, ptr %2, align 4, !tbaa !5
  %224 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %225 = load i32, ptr %2, align 4, !tbaa !5
  %226 = sub nsw i32 %225, 512
  %227 = call i32 @TPE_abs(i32 noundef %226)
  %228 = icmp slt i32 %227, 5
  br i1 %228, label %231, label %229

229:                                              ; preds = %212
  %230 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

231:                                              ; preds = %212
  %232 = call i32 @puts(ptr noundef @.str.3)
  br label %233

233:                                              ; preds = %231
  %234 = call { i64, i32 } @TPE_vec3(i32 noundef 500000, i32 noundef 300000, i32 noundef -700000)
  store { i64, i32 } %234, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 8 %24, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %23, i64 12, i1 false)
  %235 = getelementptr inbounds { i64, i32 }, ptr %25, i32 0, i32 0
  %236 = load i64, ptr %235, align 4
  %237 = getelementptr inbounds { i64, i32 }, ptr %25, i32 0, i32 1
  %238 = load i32, ptr %237, align 4
  %239 = call { i64, i32 } @TPE_vec3Normalized(i64 %236, i32 %238)
  store { i64, i32 } %239, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %26, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %22, i64 12, i1 false)
  %240 = getelementptr inbounds { i64, i32 }, ptr %27, i32 0, i32 0
  %241 = load i64, ptr %240, align 4
  %242 = getelementptr inbounds { i64, i32 }, ptr %27, i32 0, i32 1
  %243 = load i32, ptr %242, align 4
  %244 = call i32 @TPE_vec3Len(i64 %241, i32 %243)
  store i32 %244, ptr %2, align 4, !tbaa !5
  %245 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %246 = load i32, ptr %2, align 4, !tbaa !5
  %247 = sub nsw i32 %246, 512
  %248 = call i32 @TPE_abs(i32 noundef %247)
  %249 = icmp slt i32 %248, 5
  br i1 %249, label %252, label %250

250:                                              ; preds = %233
  %251 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %255

252:                                              ; preds = %233
  %253 = call i32 @puts(ptr noundef @.str.3)
  br label %254

254:                                              ; preds = %252
  store i32 0, ptr %9, align 4
  br label %255

255:                                              ; preds = %254, %250, %229, %208, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %256 = load i32, ptr %9, align 4
  switch i32 %256, label %1050 [
    i32 0, label %257
    i32 1, label %1048
  ]

257:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 320, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #5
  %258 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 20, ptr %30) #5
  %259 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef 100, i32 noundef -400)
  store { i64, i32 } %259, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 8 %32, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %31, i64 12, i1 false)
  %260 = getelementptr inbounds { i64, i32 }, ptr %33, i32 0, i32 0
  %261 = load i64, ptr %260, align 4
  %262 = getelementptr inbounds { i64, i32 }, ptr %33, i32 0, i32 1
  %263 = load i32, ptr %262, align 4
  call void @TPE_joint(ptr dead_on_unwind writable sret(%struct.TPE_Joint) align 4 %30, i64 %261, i32 %263, i32 noundef 300)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %258, ptr align 4 %30, i64 20, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 20, ptr %30) #5
  %264 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 1
  call void @llvm.lifetime.start.p0(i64 20, ptr %34) #5
  %265 = call { i64, i32 } @TPE_vec3(i32 noundef 100, i32 noundef 200, i32 noundef -400)
  store { i64, i32 } %265, ptr %36, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %36, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %35, i64 12, i1 false)
  %266 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 0
  %267 = load i64, ptr %266, align 4
  %268 = getelementptr inbounds { i64, i32 }, ptr %37, i32 0, i32 1
  %269 = load i32, ptr %268, align 4
  call void @TPE_joint(ptr dead_on_unwind writable sret(%struct.TPE_Joint) align 4 %34, i64 %267, i32 %269, i32 noundef 300)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %264, ptr align 4 %34, i64 20, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 20, ptr %34) #5
  %270 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 2
  call void @llvm.lifetime.start.p0(i64 20, ptr %38) #5
  %271 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef -400, i32 noundef 200)
  store { i64, i32 } %271, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 8 %40, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %39, i64 12, i1 false)
  %272 = getelementptr inbounds { i64, i32 }, ptr %41, i32 0, i32 0
  %273 = load i64, ptr %272, align 4
  %274 = getelementptr inbounds { i64, i32 }, ptr %41, i32 0, i32 1
  %275 = load i32, ptr %274, align 4
  call void @TPE_joint(ptr dead_on_unwind writable sret(%struct.TPE_Joint) align 4 %38, i64 %273, i32 %275, i32 noundef 300)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %270, ptr align 4 %38, i64 20, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 20, ptr %38) #5
  %276 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 3
  call void @llvm.lifetime.start.p0(i64 20, ptr %42) #5
  %277 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef 100, i32 noundef -400)
  store { i64, i32 } %277, ptr %44, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 8 %44, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %43, i64 12, i1 false)
  %278 = getelementptr inbounds { i64, i32 }, ptr %45, i32 0, i32 0
  %279 = load i64, ptr %278, align 4
  %280 = getelementptr inbounds { i64, i32 }, ptr %45, i32 0, i32 1
  %281 = load i32, ptr %280, align 4
  call void @TPE_joint(ptr dead_on_unwind writable sret(%struct.TPE_Joint) align 4 %42, i64 %279, i32 %281, i32 noundef 400)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %276, ptr align 4 %42, i64 20, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 20, ptr %42) #5
  %282 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  %283 = getelementptr inbounds %struct.TPE_Connection, ptr %282, i32 0, i32 0
  store i8 0, ptr %283, align 16, !tbaa !11
  %284 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  %285 = getelementptr inbounds %struct.TPE_Connection, ptr %284, i32 0, i32 1
  store i8 1, ptr %285, align 1, !tbaa !14
  %286 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  %287 = getelementptr inbounds %struct.TPE_Connection, ptr %286, i32 0, i32 2
  store i16 1000, ptr %287, align 2, !tbaa !15
  %288 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 1
  %289 = getelementptr inbounds %struct.TPE_Connection, ptr %288, i32 0, i32 0
  store i8 1, ptr %289, align 4, !tbaa !11
  %290 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 1
  %291 = getelementptr inbounds %struct.TPE_Connection, ptr %290, i32 0, i32 1
  store i8 0, ptr %291, align 1, !tbaa !14
  %292 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 1
  %293 = getelementptr inbounds %struct.TPE_Connection, ptr %292, i32 0, i32 2
  store i16 1000, ptr %293, align 2, !tbaa !15
  %294 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 2
  %295 = getelementptr inbounds %struct.TPE_Connection, ptr %294, i32 0, i32 0
  store i8 0, ptr %295, align 8, !tbaa !11
  %296 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 2
  %297 = getelementptr inbounds %struct.TPE_Connection, ptr %296, i32 0, i32 1
  store i8 1, ptr %297, align 1, !tbaa !14
  %298 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 2
  %299 = getelementptr inbounds %struct.TPE_Connection, ptr %298, i32 0, i32 2
  store i16 1100, ptr %299, align 2, !tbaa !15
  %300 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 3
  %301 = getelementptr inbounds %struct.TPE_Connection, ptr %300, i32 0, i32 0
  store i8 2, ptr %301, align 4, !tbaa !11
  %302 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 3
  %303 = getelementptr inbounds %struct.TPE_Connection, ptr %302, i32 0, i32 1
  store i8 3, ptr %303, align 1, !tbaa !14
  %304 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 3
  %305 = getelementptr inbounds %struct.TPE_Connection, ptr %304, i32 0, i32 2
  store i16 100, ptr %305, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #5
  store i32 0, ptr %48, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %325, %257
  %307 = load i32, ptr %48, align 4, !tbaa !5
  %308 = icmp slt i32 %307, 4
  br i1 %308, label %310, label %309

309:                                              ; preds = %306
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #5
  br label %328

310:                                              ; preds = %306
  %311 = load i32, ptr %48, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 %312
  %314 = call i32 @TPE_jointHash(ptr noundef %313)
  %315 = load i32, ptr %48, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [4 x i32], ptr %46, i64 0, i64 %316
  store i32 %314, ptr %317, align 4, !tbaa !5
  %318 = load i32, ptr %48, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 %319
  %321 = call i32 @TPE_connectionHash(ptr noundef %320)
  %322 = load i32, ptr %48, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [4 x i32], ptr %47, i64 0, i64 %323
  store i32 %321, ptr %324, align 4, !tbaa !5
  br label %325

325:                                              ; preds = %310
  %326 = load i32, ptr %48, align 4, !tbaa !5
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %48, align 4, !tbaa !5
  br label %306, !llvm.loop !16

328:                                              ; preds = %309
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #5
  store i32 0, ptr %49, align 4, !tbaa !5
  br label %329

329:                                              ; preds = %372, %328
  %330 = load i32, ptr %49, align 4, !tbaa !5
  %331 = icmp slt i32 %330, 4
  br i1 %331, label %333, label %332

332:                                              ; preds = %329
  store i32 5, ptr %9, align 4
  br label %375

333:                                              ; preds = %329
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #5
  %334 = load i32, ptr %49, align 4, !tbaa !5
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %50, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %366, %333
  %337 = load i32, ptr %50, align 4, !tbaa !5
  %338 = icmp slt i32 %337, 4
  br i1 %338, label %340, label %339

339:                                              ; preds = %336
  store i32 8, ptr %9, align 4
  br label %369

340:                                              ; preds = %336
  %341 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %342 = load i32, ptr %49, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [4 x i32], ptr %46, i64 0, i64 %343
  %345 = load i32, ptr %344, align 4, !tbaa !5
  %346 = load i32, ptr %50, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [4 x i32], ptr %46, i64 0, i64 %347
  %349 = load i32, ptr %348, align 4, !tbaa !5
  %350 = icmp ne i32 %345, %349
  br i1 %350, label %351, label %361

351:                                              ; preds = %340
  %352 = load i32, ptr %49, align 4, !tbaa !5
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [4 x i32], ptr %47, i64 0, i64 %353
  %355 = load i32, ptr %354, align 4, !tbaa !5
  %356 = load i32, ptr %50, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [4 x i32], ptr %47, i64 0, i64 %357
  %359 = load i32, ptr %358, align 4, !tbaa !5
  %360 = icmp ne i32 %355, %359
  br i1 %360, label %363, label %361

361:                                              ; preds = %351, %340
  %362 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %369

363:                                              ; preds = %351
  %364 = call i32 @puts(ptr noundef @.str.3)
  br label %365

365:                                              ; preds = %363
  br label %366

366:                                              ; preds = %365
  %367 = load i32, ptr %50, align 4, !tbaa !5
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %50, align 4, !tbaa !5
  br label %336, !llvm.loop !18

369:                                              ; preds = %361, %339
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #5
  %370 = load i32, ptr %9, align 4
  switch i32 %370, label %375 [
    i32 8, label %371
  ]

371:                                              ; preds = %369
  br label %372

372:                                              ; preds = %371
  %373 = load i32, ptr %49, align 4, !tbaa !5
  %374 = add nsw i32 %373, 1
  store i32 %374, ptr %49, align 4, !tbaa !5
  br label %329, !llvm.loop !19

375:                                              ; preds = %369, %332
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #5
  %376 = load i32, ptr %9, align 4
  switch i32 %376, label %515 [
    i32 5, label %377
  ]

377:                                              ; preds = %375
  call void @llvm.lifetime.start.p0(i64 320, ptr %51) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #5
  %378 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 0
  %379 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 0
  %380 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  call void @TPE_bodyInit(ptr noundef %378, ptr noundef %379, i8 noundef zeroext 4, ptr noundef %380, i8 noundef zeroext 4, i32 noundef 300)
  %381 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 1
  %382 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 0
  %383 = getelementptr inbounds %struct.TPE_Joint, ptr %382, i64 1
  %384 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  call void @TPE_bodyInit(ptr noundef %381, ptr noundef %383, i8 noundef zeroext 3, ptr noundef %384, i8 noundef zeroext 4, i32 noundef 300)
  %385 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 2
  %386 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 0
  %387 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  call void @TPE_bodyInit(ptr noundef %385, ptr noundef %386, i8 noundef zeroext 4, ptr noundef %387, i8 noundef zeroext 4, i32 noundef 300)
  %388 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 2
  %389 = getelementptr inbounds %struct.TPE_Body, ptr %388, i32 0, i32 7
  %390 = load i8, ptr %389, align 16, !tbaa !20
  %391 = zext i8 %390 to i32
  %392 = or i32 %391, 10
  %393 = trunc i32 %392 to i8
  store i8 %393, ptr %389, align 16, !tbaa !20
  %394 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 3
  %395 = getelementptr inbounds [16 x %struct.TPE_Joint], ptr %28, i64 0, i64 0
  %396 = getelementptr inbounds [16 x %struct.TPE_Connection], ptr %29, i64 0, i64 0
  call void @TPE_bodyInit(ptr noundef %394, ptr noundef %395, i8 noundef zeroext 4, ptr noundef %396, i8 noundef zeroext 4, i32 noundef 200)
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #5
  store i32 0, ptr %53, align 4, !tbaa !5
  br label %397

397:                                              ; preds = %409, %377
  %398 = load i32, ptr %53, align 4, !tbaa !5
  %399 = icmp slt i32 %398, 4
  br i1 %399, label %401, label %400

400:                                              ; preds = %397
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #5
  br label %412

401:                                              ; preds = %397
  %402 = load i32, ptr %53, align 4, !tbaa !5
  %403 = sext i32 %402 to i64
  %404 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 %403
  %405 = call i32 @TPE_bodyHash(ptr noundef %404)
  %406 = load i32, ptr %53, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds [4 x i32], ptr %52, i64 0, i64 %407
  store i32 %405, ptr %408, align 4, !tbaa !5
  br label %409

409:                                              ; preds = %401
  %410 = load i32, ptr %53, align 4, !tbaa !5
  %411 = add nsw i32 %410, 1
  store i32 %411, ptr %53, align 4, !tbaa !5
  br label %397, !llvm.loop !23

412:                                              ; preds = %400
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #5
  store i32 0, ptr %54, align 4, !tbaa !5
  br label %413

413:                                              ; preds = %446, %412
  %414 = load i32, ptr %54, align 4, !tbaa !5
  %415 = icmp slt i32 %414, 4
  br i1 %415, label %417, label %416

416:                                              ; preds = %413
  store i32 14, ptr %9, align 4
  br label %449

417:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #5
  %418 = load i32, ptr %54, align 4, !tbaa !5
  %419 = add nsw i32 %418, 1
  store i32 %419, ptr %55, align 4, !tbaa !5
  br label %420

420:                                              ; preds = %440, %417
  %421 = load i32, ptr %55, align 4, !tbaa !5
  %422 = icmp slt i32 %421, 4
  br i1 %422, label %424, label %423

423:                                              ; preds = %420
  store i32 17, ptr %9, align 4
  br label %443

424:                                              ; preds = %420
  %425 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %426 = load i32, ptr %54, align 4, !tbaa !5
  %427 = sext i32 %426 to i64
  %428 = getelementptr inbounds [4 x i32], ptr %52, i64 0, i64 %427
  %429 = load i32, ptr %428, align 4, !tbaa !5
  %430 = load i32, ptr %55, align 4, !tbaa !5
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds [4 x i32], ptr %52, i64 0, i64 %431
  %433 = load i32, ptr %432, align 4, !tbaa !5
  %434 = icmp ne i32 %429, %433
  br i1 %434, label %437, label %435

435:                                              ; preds = %424
  %436 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %443

437:                                              ; preds = %424
  %438 = call i32 @puts(ptr noundef @.str.3)
  br label %439

439:                                              ; preds = %437
  br label %440

440:                                              ; preds = %439
  %441 = load i32, ptr %55, align 4, !tbaa !5
  %442 = add nsw i32 %441, 1
  store i32 %442, ptr %55, align 4, !tbaa !5
  br label %420, !llvm.loop !24

443:                                              ; preds = %435, %423
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #5
  %444 = load i32, ptr %9, align 4
  switch i32 %444, label %449 [
    i32 17, label %445
  ]

445:                                              ; preds = %443
  br label %446

446:                                              ; preds = %445
  %447 = load i32, ptr %54, align 4, !tbaa !5
  %448 = add nsw i32 %447, 1
  store i32 %448, ptr %54, align 4, !tbaa !5
  br label %413, !llvm.loop !25

449:                                              ; preds = %443, %416
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #5
  %450 = load i32, ptr %9, align 4
  switch i32 %450, label %514 [
    i32 14, label %451
  ]

451:                                              ; preds = %449
  call void @llvm.lifetime.start.p0(i64 32, ptr %56) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #5
  %452 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 0
  call void @TPE_worldInit(ptr noundef %56, ptr noundef %452, i16 noundef zeroext 4, ptr noundef null)
  %453 = call i32 @TPE_worldHash(ptr noundef %56)
  %454 = getelementptr inbounds [4 x i32], ptr %57, i64 0, i64 0
  store i32 %453, ptr %454, align 16, !tbaa !5
  %455 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 0
  %456 = getelementptr inbounds %struct.TPE_Body, ptr %455, i32 0, i32 1
  %457 = load i8, ptr %456, align 8, !tbaa !26
  %458 = add i8 %457, -1
  store i8 %458, ptr %456, align 8, !tbaa !26
  %459 = call i32 @TPE_worldHash(ptr noundef %56)
  %460 = getelementptr inbounds [4 x i32], ptr %57, i64 0, i64 1
  store i32 %459, ptr %460, align 4, !tbaa !5
  %461 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 4
  %462 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %461, ptr align 16 %462, i64 40, i1 false), !tbaa.struct !27
  %463 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 0
  %464 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %463, ptr align 8 %464, i64 40, i1 false), !tbaa.struct !27
  %465 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 3
  %466 = getelementptr inbounds [8 x %struct.TPE_Body], ptr %51, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %465, ptr align 16 %466, i64 40, i1 false), !tbaa.struct !27
  %467 = call i32 @TPE_worldHash(ptr noundef %56)
  %468 = getelementptr inbounds [4 x i32], ptr %57, i64 0, i64 2
  store i32 %467, ptr %468, align 8, !tbaa !5
  %469 = getelementptr inbounds %struct.TPE_World, ptr %56, i32 0, i32 1
  %470 = load i16, ptr %469, align 8, !tbaa !30
  %471 = add i16 %470, -1
  store i16 %471, ptr %469, align 8, !tbaa !30
  %472 = call i32 @TPE_worldHash(ptr noundef %56)
  %473 = getelementptr inbounds [4 x i32], ptr %57, i64 0, i64 3
  store i32 %472, ptr %473, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #5
  store i32 0, ptr %58, align 4, !tbaa !5
  br label %474

474:                                              ; preds = %507, %451
  %475 = load i32, ptr %58, align 4, !tbaa !5
  %476 = icmp slt i32 %475, 4
  br i1 %476, label %478, label %477

477:                                              ; preds = %474
  store i32 20, ptr %9, align 4
  br label %510

478:                                              ; preds = %474
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #5
  %479 = load i32, ptr %58, align 4, !tbaa !5
  %480 = add nsw i32 %479, 1
  store i32 %480, ptr %59, align 4, !tbaa !5
  br label %481

481:                                              ; preds = %501, %478
  %482 = load i32, ptr %59, align 4, !tbaa !5
  %483 = icmp slt i32 %482, 4
  br i1 %483, label %485, label %484

484:                                              ; preds = %481
  store i32 23, ptr %9, align 4
  br label %504

485:                                              ; preds = %481
  %486 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %487 = load i32, ptr %58, align 4, !tbaa !5
  %488 = sext i32 %487 to i64
  %489 = getelementptr inbounds [4 x i32], ptr %57, i64 0, i64 %488
  %490 = load i32, ptr %489, align 4, !tbaa !5
  %491 = load i32, ptr %59, align 4, !tbaa !5
  %492 = sext i32 %491 to i64
  %493 = getelementptr inbounds [4 x i32], ptr %57, i64 0, i64 %492
  %494 = load i32, ptr %493, align 4, !tbaa !5
  %495 = icmp ne i32 %490, %494
  br i1 %495, label %498, label %496

496:                                              ; preds = %485
  %497 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %504

498:                                              ; preds = %485
  %499 = call i32 @puts(ptr noundef @.str.3)
  br label %500

500:                                              ; preds = %498
  br label %501

501:                                              ; preds = %500
  %502 = load i32, ptr %59, align 4, !tbaa !5
  %503 = add nsw i32 %502, 1
  store i32 %503, ptr %59, align 4, !tbaa !5
  br label %481, !llvm.loop !32

504:                                              ; preds = %496, %484
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #5
  %505 = load i32, ptr %9, align 4
  switch i32 %505, label %510 [
    i32 23, label %506
  ]

506:                                              ; preds = %504
  br label %507

507:                                              ; preds = %506
  %508 = load i32, ptr %58, align 4, !tbaa !5
  %509 = add nsw i32 %508, 1
  store i32 %509, ptr %58, align 4, !tbaa !5
  br label %474, !llvm.loop !33

510:                                              ; preds = %504, %477
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #5
  %511 = load i32, ptr %9, align 4
  switch i32 %511, label %513 [
    i32 20, label %512
  ]

512:                                              ; preds = %510
  store i32 0, ptr %9, align 4
  br label %513

513:                                              ; preds = %512, %510
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %56) #5
  br label %514

514:                                              ; preds = %513, %449
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr %51) #5
  br label %515

515:                                              ; preds = %514, %375
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr %28) #5
  %516 = load i32, ptr %9, align 4
  switch i32 %516, label %1050 [
    i32 0, label %517
    i32 1, label %1048
  ]

517:                                              ; preds = %515
  %518 = call i32 @puts(ptr noundef @.str.11)
  %519 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  %520 = call { i64, i32 } @TPE_vec3(i32 noundef -3000, i32 noundef -3000, i32 noundef -3000)
  store { i64, i32 } %520, ptr %61, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 8 %61, i64 12, i1 false)
  %521 = call { i64, i32 } @TPE_vec3(i32 noundef 3000, i32 noundef 3000, i32 noundef 3000)
  store { i64, i32 } %521, ptr %63, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 8 %63, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 4 %60, i64 12, i1 false)
  %522 = getelementptr inbounds { i64, i32 }, ptr %64, i32 0, i32 0
  %523 = load i64, ptr %522, align 4
  %524 = getelementptr inbounds { i64, i32 }, ptr %64, i32 0, i32 1
  %525 = load i32, ptr %524, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %62, i64 12, i1 false)
  %526 = getelementptr inbounds { i64, i32 }, ptr %65, i32 0, i32 0
  %527 = load i64, ptr %526, align 4
  %528 = getelementptr inbounds { i64, i32 }, ptr %65, i32 0, i32 1
  %529 = load i32, ptr %528, align 4
  %530 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef @envFunc, i64 %523, i32 %525, i64 %527, i32 %529, i8 noundef zeroext 32, i16 noundef signext 40, ptr noundef null)
  %531 = icmp ne i8 %530, 0
  br i1 %531, label %534, label %532

532:                                              ; preds = %517
  %533 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  br label %1048

534:                                              ; preds = %517
  %535 = call i32 @puts(ptr noundef @.str.3)
  br label %536

536:                                              ; preds = %534
  %537 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  %538 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef -1000, i32 noundef -5000)
  store { i64, i32 } %538, ptr %67, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %66, ptr align 8 %67, i64 12, i1 false)
  %539 = call { i64, i32 } @TPE_vec3(i32 noundef 5000, i32 noundef 6000, i32 noundef 7000)
  store { i64, i32 } %539, ptr %69, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 8 %69, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 4 %66, i64 12, i1 false)
  %540 = getelementptr inbounds { i64, i32 }, ptr %70, i32 0, i32 0
  %541 = load i64, ptr %540, align 4
  %542 = getelementptr inbounds { i64, i32 }, ptr %70, i32 0, i32 1
  %543 = load i32, ptr %542, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %68, i64 12, i1 false)
  %544 = getelementptr inbounds { i64, i32 }, ptr %71, i32 0, i32 0
  %545 = load i64, ptr %544, align 4
  %546 = getelementptr inbounds { i64, i32 }, ptr %71, i32 0, i32 1
  %547 = load i32, ptr %546, align 4
  %548 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef @envFunc2, i64 %541, i32 %543, i64 %545, i32 %547, i8 noundef zeroext 32, i16 noundef signext 30, ptr noundef null)
  %549 = icmp ne i8 %548, 0
  br i1 %549, label %552, label %550

550:                                              ; preds = %536
  %551 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  br label %1048

552:                                              ; preds = %536
  %553 = call i32 @puts(ptr noundef @.str.3)
  br label %554

554:                                              ; preds = %552
  %555 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %556 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef -1000, i32 noundef -5000)
  store { i64, i32 } %556, ptr %73, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %72, ptr align 8 %73, i64 12, i1 false)
  %557 = call { i64, i32 } @TPE_vec3(i32 noundef 4000, i32 noundef 6000, i32 noundef 7000)
  store { i64, i32 } %557, ptr %75, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %74, ptr align 8 %75, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 4 %72, i64 12, i1 false)
  %558 = getelementptr inbounds { i64, i32 }, ptr %76, i32 0, i32 0
  %559 = load i64, ptr %558, align 4
  %560 = getelementptr inbounds { i64, i32 }, ptr %76, i32 0, i32 1
  %561 = load i32, ptr %560, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %74, i64 12, i1 false)
  %562 = getelementptr inbounds { i64, i32 }, ptr %77, i32 0, i32 0
  %563 = load i64, ptr %562, align 4
  %564 = getelementptr inbounds { i64, i32 }, ptr %77, i32 0, i32 1
  %565 = load i32, ptr %564, align 4
  %566 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef @envFuncHeightmap, i64 %559, i32 %561, i64 %563, i32 %565, i8 noundef zeroext 6, i16 noundef signext 50, ptr noundef null)
  %567 = icmp ne i8 %566, 0
  br i1 %567, label %570, label %568

568:                                              ; preds = %554
  %569 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  br label %1048

570:                                              ; preds = %554
  %571 = call i32 @puts(ptr noundef @.str.3)
  br label %572

572:                                              ; preds = %570
  %573 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %574 = call { i64, i32 } @TPE_vec3(i32 noundef -1000, i32 noundef -1000, i32 noundef -1000)
  store { i64, i32 } %574, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 8 %79, i64 12, i1 false)
  %575 = call { i64, i32 } @TPE_vec3(i32 noundef 2000, i32 noundef 3000, i32 noundef 100)
  store { i64, i32 } %575, ptr %81, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %80, ptr align 8 %81, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %78, i64 12, i1 false)
  %576 = getelementptr inbounds { i64, i32 }, ptr %82, i32 0, i32 0
  %577 = load i64, ptr %576, align 4
  %578 = getelementptr inbounds { i64, i32 }, ptr %82, i32 0, i32 1
  %579 = load i32, ptr %578, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %83, ptr align 4 %80, i64 12, i1 false)
  %580 = getelementptr inbounds { i64, i32 }, ptr %83, i32 0, i32 0
  %581 = load i64, ptr %580, align 4
  %582 = getelementptr inbounds { i64, i32 }, ptr %83, i32 0, i32 1
  %583 = load i32, ptr %582, align 4
  %584 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef @envFuncBad, i64 %577, i32 %579, i64 %581, i32 %583, i8 noundef zeroext 32, i16 noundef signext 40, ptr noundef null)
  %585 = icmp ne i8 %584, 0
  br i1 %585, label %586, label %588

586:                                              ; preds = %572
  %587 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  br label %1048

588:                                              ; preds = %572
  %589 = call i32 @puts(ptr noundef @.str.3)
  br label %590

590:                                              ; preds = %588
  %591 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %592 = call { i64, i32 } @TPE_vec3(i32 noundef -1000, i32 noundef -2000, i32 noundef -200)
  store { i64, i32 } %592, ptr %85, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %84, ptr align 8 %85, i64 12, i1 false)
  %593 = call { i64, i32 } @TPE_vec3(i32 noundef 1000, i32 noundef 1000, i32 noundef 2000)
  store { i64, i32 } %593, ptr %87, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %86, ptr align 8 %87, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %84, i64 12, i1 false)
  %594 = getelementptr inbounds { i64, i32 }, ptr %88, i32 0, i32 0
  %595 = load i64, ptr %594, align 4
  %596 = getelementptr inbounds { i64, i32 }, ptr %88, i32 0, i32 1
  %597 = load i32, ptr %596, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 4 %86, i64 12, i1 false)
  %598 = getelementptr inbounds { i64, i32 }, ptr %89, i32 0, i32 0
  %599 = load i64, ptr %598, align 4
  %600 = getelementptr inbounds { i64, i32 }, ptr %89, i32 0, i32 1
  %601 = load i32, ptr %600, align 4
  %602 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef @envFuncBad2, i64 %595, i32 %597, i64 %599, i32 %601, i8 noundef zeroext 32, i16 noundef signext 40, ptr noundef null)
  %603 = icmp ne i8 %602, 0
  br i1 %603, label %604, label %606

604:                                              ; preds = %590
  %605 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  br label %1048

606:                                              ; preds = %590
  %607 = call i32 @puts(ptr noundef @.str.3)
  br label %608

608:                                              ; preds = %606
  %609 = call i32 @puts(ptr noundef @.str.15)
  call void @llvm.lifetime.start.p0(i64 32, ptr %90) #5
  call void @llvm.lifetime.start.p0(i64 1280, ptr %91) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %92) #5
  call void @llvm.lifetime.start.p0(i64 160, ptr %93) #5
  %610 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 20, ptr %94) #5
  %611 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store { i64, i32 } %611, ptr %96, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 8 %96, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 4 %95, i64 12, i1 false)
  %612 = getelementptr inbounds { i64, i32 }, ptr %97, i32 0, i32 0
  %613 = load i64, ptr %612, align 4
  %614 = getelementptr inbounds { i64, i32 }, ptr %97, i32 0, i32 1
  %615 = load i32, ptr %614, align 4
  call void @TPE_joint(ptr dead_on_unwind writable sret(%struct.TPE_Joint) align 4 %94, i64 %613, i32 %615, i32 noundef 320)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %610, ptr align 4 %94, i64 20, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 20, ptr %94) #5
  %616 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 0
  %617 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  call void @TPE_bodyInit(ptr noundef %616, ptr noundef %617, i8 noundef zeroext 1, ptr noundef null, i8 noundef zeroext 0, i32 noundef 2124)
  %618 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 0
  %619 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef 3000, i32 noundef 3000)
  store { i64, i32 } %619, ptr %99, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 8 %99, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %100, ptr align 4 %98, i64 12, i1 false)
  %620 = getelementptr inbounds { i64, i32 }, ptr %100, i32 0, i32 0
  %621 = load i64, ptr %620, align 4
  %622 = getelementptr inbounds { i64, i32 }, ptr %100, i32 0, i32 1
  %623 = load i32, ptr %622, align 4
  call void @TPE_bodyMoveBy(ptr noundef %618, i64 %621, i32 %623)
  %624 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  %625 = getelementptr inbounds %struct.TPE_Joint, ptr %624, i64 1
  %626 = getelementptr inbounds [128 x %struct.TPE_Connection], ptr %92, i64 0, i64 0
  call void @TPE_makeBox(ptr noundef %625, ptr noundef %626, i32 noundef 800, i32 noundef 900, i32 noundef 850, i32 noundef 320)
  %627 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 1
  %628 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  %629 = getelementptr inbounds %struct.TPE_Joint, ptr %628, i64 1
  %630 = getelementptr inbounds [128 x %struct.TPE_Connection], ptr %92, i64 0, i64 0
  call void @TPE_bodyInit(ptr noundef %627, ptr noundef %629, i8 noundef zeroext 8, ptr noundef %630, i8 noundef zeroext 16, i32 noundef 1300)
  %631 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 1
  %632 = getelementptr inbounds %struct.TPE_Body, ptr %631, i32 0, i32 5
  store i16 400, ptr %632, align 4, !tbaa !34
  %633 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 1
  %634 = getelementptr inbounds %struct.TPE_Body, ptr %633, i32 0, i32 6
  store i16 350, ptr %634, align 2, !tbaa !35
  %635 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 1
  %636 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef 3800, i32 noundef 1500)
  store { i64, i32 } %636, ptr %102, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %101, ptr align 8 %102, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %103, ptr align 4 %101, i64 12, i1 false)
  %637 = getelementptr inbounds { i64, i32 }, ptr %103, i32 0, i32 0
  %638 = load i64, ptr %637, align 4
  %639 = getelementptr inbounds { i64, i32 }, ptr %103, i32 0, i32 1
  %640 = load i32, ptr %639, align 4
  call void @TPE_bodyMoveBy(ptr noundef %635, i64 %638, i32 %640)
  %641 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  %642 = getelementptr inbounds %struct.TPE_Joint, ptr %641, i64 20
  %643 = getelementptr inbounds [128 x %struct.TPE_Connection], ptr %92, i64 0, i64 0
  %644 = getelementptr inbounds %struct.TPE_Connection, ptr %643, i64 32
  call void @TPE_make2Line(ptr noundef %642, ptr noundef %644, i32 noundef 1000, i32 noundef 300)
  %645 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 2
  %646 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  %647 = getelementptr inbounds %struct.TPE_Joint, ptr %646, i64 20
  %648 = getelementptr inbounds [128 x %struct.TPE_Connection], ptr %92, i64 0, i64 0
  %649 = getelementptr inbounds %struct.TPE_Connection, ptr %648, i64 32
  call void @TPE_bodyInit(ptr noundef %645, ptr noundef %647, i8 noundef zeroext 2, ptr noundef %649, i8 noundef zeroext 1, i32 noundef 1300)
  %650 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 2
  %651 = getelementptr inbounds %struct.TPE_Body, ptr %650, i32 0, i32 7
  %652 = load i8, ptr %651, align 16, !tbaa !20
  %653 = zext i8 %652 to i32
  %654 = or i32 %653, 2
  %655 = trunc i32 %654 to i8
  store i8 %655, ptr %651, align 16, !tbaa !20
  %656 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 2
  %657 = call { i64, i32 } @TPE_vec3(i32 noundef -3000, i32 noundef 4100, i32 noundef -1500)
  store { i64, i32 } %657, ptr %105, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %104, ptr align 8 %105, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %106, ptr align 4 %104, i64 12, i1 false)
  %658 = getelementptr inbounds { i64, i32 }, ptr %106, i32 0, i32 0
  %659 = load i64, ptr %658, align 4
  %660 = getelementptr inbounds { i64, i32 }, ptr %106, i32 0, i32 1
  %661 = load i32, ptr %660, align 4
  call void @TPE_bodyMoveBy(ptr noundef %656, i64 %659, i32 %661)
  %662 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  %663 = getelementptr inbounds %struct.TPE_Joint, ptr %662, i64 32
  %664 = getelementptr inbounds [128 x %struct.TPE_Connection], ptr %92, i64 0, i64 0
  %665 = getelementptr inbounds %struct.TPE_Connection, ptr %664, i64 64
  call void @TPE_makeCenterBox(ptr noundef %663, ptr noundef %665, i32 noundef 600, i32 noundef 500, i32 noundef 510, i32 noundef 300)
  %666 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 3
  %667 = getelementptr inbounds [64 x %struct.TPE_Joint], ptr %91, i64 0, i64 0
  %668 = getelementptr inbounds %struct.TPE_Joint, ptr %667, i64 32
  %669 = getelementptr inbounds [128 x %struct.TPE_Connection], ptr %92, i64 0, i64 0
  %670 = getelementptr inbounds %struct.TPE_Connection, ptr %669, i64 64
  call void @TPE_bodyInit(ptr noundef %666, ptr noundef %668, i8 noundef zeroext 9, ptr noundef %670, i8 noundef zeroext 18, i32 noundef 1200)
  %671 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 3
  %672 = getelementptr inbounds %struct.TPE_Body, ptr %671, i32 0, i32 7
  %673 = load i8, ptr %672, align 8, !tbaa !20
  %674 = zext i8 %673 to i32
  %675 = or i32 %674, 8
  %676 = trunc i32 %675 to i8
  store i8 %676, ptr %672, align 8, !tbaa !20
  %677 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 3
  %678 = call { i64, i32 } @TPE_vec3(i32 noundef -1500, i32 noundef 3500, i32 noundef -3000)
  store { i64, i32 } %678, ptr %108, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 8 %108, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %109, ptr align 4 %107, i64 12, i1 false)
  %679 = getelementptr inbounds { i64, i32 }, ptr %109, i32 0, i32 0
  %680 = load i64, ptr %679, align 4
  %681 = getelementptr inbounds { i64, i32 }, ptr %109, i32 0, i32 1
  %682 = load i32, ptr %681, align 4
  call void @TPE_bodyMoveBy(ptr noundef %677, i64 %680, i32 %682)
  %683 = getelementptr inbounds [4 x %struct.TPE_Body], ptr %93, i64 0, i64 0
  call void @TPE_worldInit(ptr noundef %90, ptr noundef %683, i16 noundef zeroext 4, ptr noundef @envSimple)
  call void @llvm.lifetime.start.p0(i64 2, ptr %110) #5
  %684 = call { i64, i32 } @TPE_vec3(i32 noundef -1857, i32 noundef 3743, i32 noundef -4800)
  store { i64, i32 } %684, ptr %112, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %111, ptr align 8 %112, i64 12, i1 false)
  %685 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 0, i32 noundef 100)
  store { i64, i32 } %685, ptr %114, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 8 %114, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %115, ptr align 4 %111, i64 12, i1 false)
  %686 = getelementptr inbounds { i64, i32 }, ptr %115, i32 0, i32 0
  %687 = load i64, ptr %686, align 4
  %688 = getelementptr inbounds { i64, i32 }, ptr %115, i32 0, i32 1
  %689 = load i32, ptr %688, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %116, ptr align 4 %113, i64 12, i1 false)
  %690 = getelementptr inbounds { i64, i32 }, ptr %116, i32 0, i32 0
  %691 = load i64, ptr %690, align 4
  %692 = getelementptr inbounds { i64, i32 }, ptr %116, i32 0, i32 1
  %693 = load i32, ptr %692, align 4
  %694 = call { i64, i32 } @TPE_castBodyRay(i64 %687, i32 %689, i64 %691, i32 %693, i16 noundef signext -1, ptr noundef %90, ptr noundef %110, ptr noundef null)
  store { i64, i32 } %694, ptr %118, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %117, ptr align 8 %118, i64 12, i1 false)
  %695 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %696 = load i16, ptr %110, align 2, !tbaa !29
  %697 = sext i16 %696 to i32
  %698 = icmp sge i32 %697, 0
  br i1 %698, label %701, label %699

699:                                              ; preds = %608
  %700 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %925

701:                                              ; preds = %608
  %702 = call i32 @puts(ptr noundef @.str.3)
  br label %703

703:                                              ; preds = %701
  %704 = call i32 @puts(ptr noundef @.str.17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %119) #5
  store i32 0, ptr %119, align 4, !tbaa !5
  br label %705

705:                                              ; preds = %740, %703
  %706 = load i32, ptr %119, align 4, !tbaa !5
  %707 = icmp slt i32 %706, 300
  br i1 %707, label %709, label %708

708:                                              ; preds = %705
  store i32 26, ptr %9, align 4
  br label %743

709:                                              ; preds = %705
  call void @llvm.lifetime.start.p0(i64 1, ptr %120) #5
  store i8 0, ptr %120, align 1, !tbaa !10
  br label %710

710:                                              ; preds = %724, %709
  %711 = load i8, ptr %120, align 1, !tbaa !10
  %712 = zext i8 %711 to i32
  %713 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 1
  %714 = load i16, ptr %713, align 8, !tbaa !30
  %715 = zext i16 %714 to i32
  %716 = icmp slt i32 %712, %715
  br i1 %716, label %718, label %717

717:                                              ; preds = %710
  store i32 29, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %120) #5
  br label %727

718:                                              ; preds = %710
  %719 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %720 = load ptr, ptr %719, align 8, !tbaa !36
  %721 = load i8, ptr %120, align 1, !tbaa !10
  %722 = zext i8 %721 to i64
  %723 = getelementptr inbounds %struct.TPE_Body, ptr %720, i64 %722
  call void @TPE_bodyApplyGravity(ptr noundef %723, i32 noundef 8)
  br label %724

724:                                              ; preds = %718
  %725 = load i8, ptr %120, align 1, !tbaa !10
  %726 = add i8 %725, 1
  store i8 %726, ptr %120, align 1, !tbaa !10
  br label %710, !llvm.loop !37

727:                                              ; preds = %717
  %728 = load i32, ptr %119, align 4, !tbaa !5
  %729 = icmp eq i32 %728, 100
  br i1 %729, label %730, label %739

730:                                              ; preds = %727
  %731 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %732 = call i32 @TPE_worldGetNetSpeed(ptr noundef %90)
  %733 = icmp sgt i32 %732, 100
  br i1 %733, label %736, label %734

734:                                              ; preds = %730
  %735 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %743

736:                                              ; preds = %730
  %737 = call i32 @puts(ptr noundef @.str.3)
  br label %738

738:                                              ; preds = %736
  br label %739

739:                                              ; preds = %738, %727
  call void @TPE_worldStep(ptr noundef %90)
  br label %740

740:                                              ; preds = %739
  %741 = load i32, ptr %119, align 4, !tbaa !5
  %742 = add nsw i32 %741, 1
  store i32 %742, ptr %119, align 4, !tbaa !5
  br label %705, !llvm.loop !38

743:                                              ; preds = %734, %708
  call void @llvm.lifetime.end.p0(i64 4, ptr %119) #5
  %744 = load i32, ptr %9, align 4
  switch i32 %744, label %925 [
    i32 26, label %745
  ]

745:                                              ; preds = %743
  %746 = call i32 @puts(ptr noundef @.str.19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %121) #5
  %747 = call i32 @TPE_worldHash(ptr noundef %90)
  store i32 %747, ptr %121, align 4, !tbaa !5
  %748 = load i32, ptr %121, align 4, !tbaa !5
  %749 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, i32 noundef %748)
  %750 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %751 = load i32, ptr %121, align 4, !tbaa !5
  %752 = zext i32 %751 to i64
  %753 = icmp eq i64 %752, 3411004027
  br i1 %753, label %756, label %754

754:                                              ; preds = %745
  %755 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %924

756:                                              ; preds = %745
  %757 = call i32 @puts(ptr noundef @.str.3)
  br label %758

758:                                              ; preds = %756
  call void @llvm.lifetime.start.p0(i64 4, ptr %122) #5
  store i32 0, ptr %122, align 4, !tbaa !5
  br label %759

759:                                              ; preds = %798, %758
  %760 = load i32, ptr %122, align 4, !tbaa !5
  %761 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 1
  %762 = load i16, ptr %761, align 8, !tbaa !30
  %763 = zext i16 %762 to i32
  %764 = icmp slt i32 %760, %763
  br i1 %764, label %766, label %765

765:                                              ; preds = %759
  store i32 32, ptr %9, align 4
  br label %801

766:                                              ; preds = %759
  %767 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  %768 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %769 = load ptr, ptr %768, align 8, !tbaa !36
  %770 = load i32, ptr %122, align 4, !tbaa !5
  %771 = sext i32 %770 to i64
  %772 = getelementptr inbounds %struct.TPE_Body, ptr %769, i64 %771
  %773 = call { i64, i32 } @TPE_bodyGetCenterOfMass(ptr noundef %772)
  store { i64, i32 } %773, ptr %124, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %123, ptr align 8 %124, i64 12, i1 false)
  %774 = getelementptr inbounds %struct.TPE_Vec3, ptr %123, i32 0, i32 0
  %775 = load i32, ptr %774, align 4, !tbaa !39
  %776 = icmp sgt i32 %775, 0
  br i1 %776, label %779, label %777

777:                                              ; preds = %766
  %778 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %801

779:                                              ; preds = %766
  %780 = call i32 @puts(ptr noundef @.str.3)
  br label %781

781:                                              ; preds = %779
  %782 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  %783 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %784 = load ptr, ptr %783, align 8, !tbaa !36
  %785 = load i32, ptr %122, align 4, !tbaa !5
  %786 = sext i32 %785 to i64
  %787 = getelementptr inbounds %struct.TPE_Body, ptr %784, i64 %786
  %788 = getelementptr inbounds %struct.TPE_Body, ptr %787, i32 0, i32 7
  %789 = load i8, ptr %788, align 8, !tbaa !20
  %790 = zext i8 %789 to i32
  %791 = and i32 %790, 1
  %792 = icmp ne i32 %791, 0
  br i1 %792, label %795, label %793

793:                                              ; preds = %781
  %794 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %801

795:                                              ; preds = %781
  %796 = call i32 @puts(ptr noundef @.str.3)
  br label %797

797:                                              ; preds = %795
  br label %798

798:                                              ; preds = %797
  %799 = load i32, ptr %122, align 4, !tbaa !5
  %800 = add nsw i32 %799, 1
  store i32 %800, ptr %122, align 4, !tbaa !5
  br label %759, !llvm.loop !41

801:                                              ; preds = %793, %777, %765
  call void @llvm.lifetime.end.p0(i64 4, ptr %122) #5
  %802 = load i32, ptr %9, align 4
  switch i32 %802, label %924 [
    i32 32, label %803
  ]

803:                                              ; preds = %801
  %804 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %805 = call i32 @TPE_worldGetNetSpeed(ptr noundef %90)
  %806 = icmp slt i32 %805, 100
  br i1 %806, label %809, label %807

807:                                              ; preds = %803
  %808 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %924

809:                                              ; preds = %803
  %810 = call i32 @puts(ptr noundef @.str.3)
  br label %811

811:                                              ; preds = %809
  %812 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %813 = load ptr, ptr %812, align 8, !tbaa !36
  %814 = getelementptr inbounds %struct.TPE_Body, ptr %813, i64 0
  %815 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef 300, i32 noundef -20)
  store { i64, i32 } %815, ptr %126, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %125, ptr align 8 %126, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %127, ptr align 4 %125, i64 12, i1 false)
  %816 = getelementptr inbounds { i64, i32 }, ptr %127, i32 0, i32 0
  %817 = load i64, ptr %816, align 4
  %818 = getelementptr inbounds { i64, i32 }, ptr %127, i32 0, i32 1
  %819 = load i32, ptr %818, align 4
  call void @TPE_bodyAccelerate(ptr noundef %814, i64 %817, i32 %819)
  %820 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %821 = load ptr, ptr %820, align 8, !tbaa !36
  %822 = getelementptr inbounds %struct.TPE_Body, ptr %821, i64 1
  %823 = call { i64, i32 } @TPE_vec3(i32 noundef -700, i32 noundef 400, i32 noundef 0)
  store { i64, i32 } %823, ptr %129, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %128, ptr align 8 %129, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %130, ptr align 4 %128, i64 12, i1 false)
  %824 = getelementptr inbounds { i64, i32 }, ptr %130, i32 0, i32 0
  %825 = load i64, ptr %824, align 4
  %826 = getelementptr inbounds { i64, i32 }, ptr %130, i32 0, i32 1
  %827 = load i32, ptr %826, align 4
  call void @TPE_bodyAccelerate(ptr noundef %822, i64 %825, i32 %827)
  %828 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %829 = load ptr, ptr %828, align 8, !tbaa !36
  %830 = getelementptr inbounds %struct.TPE_Body, ptr %829, i64 2
  %831 = call { i64, i32 } @TPE_vec3(i32 noundef 20, i32 noundef -300, i32 noundef -100)
  store { i64, i32 } %831, ptr %132, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %131, ptr align 8 %132, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %133, ptr align 4 %131, i64 12, i1 false)
  %832 = getelementptr inbounds { i64, i32 }, ptr %133, i32 0, i32 0
  %833 = load i64, ptr %832, align 4
  %834 = getelementptr inbounds { i64, i32 }, ptr %133, i32 0, i32 1
  %835 = load i32, ptr %834, align 4
  call void @TPE_bodyAccelerate(ptr noundef %830, i64 %833, i32 %835)
  %836 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %837 = load ptr, ptr %836, align 8, !tbaa !36
  %838 = getelementptr inbounds %struct.TPE_Body, ptr %837, i64 3
  %839 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 30, i32 noundef -900)
  store { i64, i32 } %839, ptr %135, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 8 %135, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %136, ptr align 4 %134, i64 12, i1 false)
  %840 = getelementptr inbounds { i64, i32 }, ptr %136, i32 0, i32 0
  %841 = load i64, ptr %840, align 4
  %842 = getelementptr inbounds { i64, i32 }, ptr %136, i32 0, i32 1
  %843 = load i32, ptr %842, align 4
  call void @TPE_bodyAccelerate(ptr noundef %838, i64 %841, i32 %843)
  %844 = call i32 @puts(ptr noundef @.str.23)
  call void @llvm.lifetime.start.p0(i64 4, ptr %137) #5
  store i32 0, ptr %137, align 4, !tbaa !5
  br label %845

845:                                              ; preds = %868, %811
  %846 = load i32, ptr %137, align 4, !tbaa !5
  %847 = icmp slt i32 %846, 100
  br i1 %847, label %849, label %848

848:                                              ; preds = %845
  store i32 35, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %137) #5
  br label %871

849:                                              ; preds = %845
  call void @llvm.lifetime.start.p0(i64 1, ptr %138) #5
  store i8 0, ptr %138, align 1, !tbaa !10
  br label %850

850:                                              ; preds = %864, %849
  %851 = load i8, ptr %138, align 1, !tbaa !10
  %852 = zext i8 %851 to i32
  %853 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 1
  %854 = load i16, ptr %853, align 8, !tbaa !30
  %855 = zext i16 %854 to i32
  %856 = icmp slt i32 %852, %855
  br i1 %856, label %858, label %857

857:                                              ; preds = %850
  store i32 38, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %138) #5
  br label %867

858:                                              ; preds = %850
  %859 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %860 = load ptr, ptr %859, align 8, !tbaa !36
  %861 = load i8, ptr %138, align 1, !tbaa !10
  %862 = zext i8 %861 to i64
  %863 = getelementptr inbounds %struct.TPE_Body, ptr %860, i64 %862
  call void @TPE_bodyApplyGravity(ptr noundef %863, i32 noundef 8)
  br label %864

864:                                              ; preds = %858
  %865 = load i8, ptr %138, align 1, !tbaa !10
  %866 = add i8 %865, 1
  store i8 %866, ptr %138, align 1, !tbaa !10
  br label %850, !llvm.loop !42

867:                                              ; preds = %857
  call void @TPE_worldStep(ptr noundef %90)
  br label %868

868:                                              ; preds = %867
  %869 = load i32, ptr %137, align 4, !tbaa !5
  %870 = add nsw i32 %869, 1
  store i32 %870, ptr %137, align 4, !tbaa !5
  br label %845, !llvm.loop !43

871:                                              ; preds = %848
  call void @llvm.lifetime.start.p0(i64 4, ptr %139) #5
  store i32 0, ptr %139, align 4, !tbaa !5
  br label %872

872:                                              ; preds = %918, %871
  %873 = load i32, ptr %139, align 4, !tbaa !5
  %874 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 1
  %875 = load i16, ptr %874, align 8, !tbaa !30
  %876 = zext i16 %875 to i32
  %877 = icmp slt i32 %873, %876
  br i1 %877, label %879, label %878

878:                                              ; preds = %872
  store i32 41, ptr %9, align 4
  br label %921

879:                                              ; preds = %872
  call void @llvm.lifetime.start.p0(i64 12, ptr %140) #5
  %880 = getelementptr inbounds %struct.TPE_World, ptr %90, i32 0, i32 0
  %881 = load ptr, ptr %880, align 8, !tbaa !36
  %882 = load i32, ptr %139, align 4, !tbaa !5
  %883 = sext i32 %882 to i64
  %884 = getelementptr inbounds %struct.TPE_Body, ptr %881, i64 %883
  %885 = call { i64, i32 } @TPE_bodyGetCenterOfMass(ptr noundef %884)
  store { i64, i32 } %885, ptr %141, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %140, ptr align 8 %141, i64 12, i1 false)
  %886 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %887 = getelementptr inbounds %struct.TPE_Vec3, ptr %140, i32 0, i32 0
  %888 = load i32, ptr %887, align 4, !tbaa !39
  %889 = icmp slt i32 %888, 5000
  br i1 %889, label %890, label %910

890:                                              ; preds = %879
  %891 = getelementptr inbounds %struct.TPE_Vec3, ptr %140, i32 0, i32 0
  %892 = load i32, ptr %891, align 4, !tbaa !39
  %893 = icmp sgt i32 %892, -5000
  br i1 %893, label %894, label %910

894:                                              ; preds = %890
  %895 = getelementptr inbounds %struct.TPE_Vec3, ptr %140, i32 0, i32 1
  %896 = load i32, ptr %895, align 4, !tbaa !44
  %897 = icmp slt i32 %896, 5000
  br i1 %897, label %898, label %910

898:                                              ; preds = %894
  %899 = getelementptr inbounds %struct.TPE_Vec3, ptr %140, i32 0, i32 1
  %900 = load i32, ptr %899, align 4, !tbaa !44
  %901 = icmp sgt i32 %900, -5000
  br i1 %901, label %902, label %910

902:                                              ; preds = %898
  %903 = getelementptr inbounds %struct.TPE_Vec3, ptr %140, i32 0, i32 2
  %904 = load i32, ptr %903, align 4, !tbaa !45
  %905 = icmp slt i32 %904, 5000
  br i1 %905, label %906, label %910

906:                                              ; preds = %902
  %907 = getelementptr inbounds %struct.TPE_Vec3, ptr %140, i32 0, i32 2
  %908 = load i32, ptr %907, align 4, !tbaa !45
  %909 = icmp sgt i32 %908, -5000
  br i1 %909, label %912, label %910

910:                                              ; preds = %906, %902, %898, %894, %890, %879
  %911 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %915

912:                                              ; preds = %906
  %913 = call i32 @puts(ptr noundef @.str.3)
  br label %914

914:                                              ; preds = %912
  store i32 0, ptr %9, align 4
  br label %915

915:                                              ; preds = %914, %910
  call void @llvm.lifetime.end.p0(i64 12, ptr %140) #5
  %916 = load i32, ptr %9, align 4
  switch i32 %916, label %921 [
    i32 0, label %917
  ]

917:                                              ; preds = %915
  br label %918

918:                                              ; preds = %917
  %919 = load i32, ptr %139, align 4, !tbaa !5
  %920 = add nsw i32 %919, 1
  store i32 %920, ptr %139, align 4, !tbaa !5
  br label %872, !llvm.loop !46

921:                                              ; preds = %915, %878
  call void @llvm.lifetime.end.p0(i64 4, ptr %139) #5
  %922 = load i32, ptr %9, align 4
  switch i32 %922, label %924 [
    i32 41, label %923
  ]

923:                                              ; preds = %921
  store i32 0, ptr %9, align 4
  br label %924

924:                                              ; preds = %923, %921, %807, %801, %754
  call void @llvm.lifetime.end.p0(i64 4, ptr %121) #5
  br label %925

925:                                              ; preds = %924, %743, %699
  call void @llvm.lifetime.end.p0(i64 2, ptr %110) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %93) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %92) #5
  call void @llvm.lifetime.end.p0(i64 1280, ptr %91) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %90) #5
  %926 = load i32, ptr %9, align 4
  switch i32 %926, label %1050 [
    i32 0, label %927
    i32 1, label %1048
  ]

927:                                              ; preds = %925
  call void @llvm.lifetime.start.p0(i64 4, ptr %142) #5
  store i32 0, ptr %142, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %143) #5
  store i32 0, ptr %143, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %144) #5
  store i32 -3200, ptr %144, align 4, !tbaa !5
  br label %928

928:                                              ; preds = %1027, %927
  %929 = load i32, ptr %144, align 4, !tbaa !5
  %930 = icmp slt i32 %929, 1000
  br i1 %930, label %932, label %931

931:                                              ; preds = %928
  store i32 44, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %144) #5
  br label %1030

932:                                              ; preds = %928
  call void @llvm.lifetime.start.p0(i64 4, ptr %145) #5
  store i32 -4000, ptr %145, align 4, !tbaa !5
  br label %933

933:                                              ; preds = %1023, %932
  %934 = load i32, ptr %145, align 4, !tbaa !5
  %935 = icmp slt i32 %934, 3000
  br i1 %935, label %937, label %936

936:                                              ; preds = %933
  store i32 47, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %145) #5
  br label %1026

937:                                              ; preds = %933
  call void @llvm.lifetime.start.p0(i64 12, ptr %146) #5
  %938 = load i32, ptr %145, align 4, !tbaa !5
  %939 = load i32, ptr %144, align 4, !tbaa !5
  %940 = load i32, ptr %145, align 4, !tbaa !5
  %941 = sdiv i32 %940, 16
  %942 = call { i64, i32 } @TPE_vec3(i32 noundef %938, i32 noundef %939, i32 noundef %941)
  store { i64, i32 } %942, ptr %147, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %146, ptr align 8 %147, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %148) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %149, ptr align 4 %146, i64 12, i1 false)
  %943 = getelementptr inbounds { i64, i32 }, ptr %149, i32 0, i32 0
  %944 = load i64, ptr %943, align 4
  %945 = getelementptr inbounds { i64, i32 }, ptr %149, i32 0, i32 1
  %946 = load i32, ptr %945, align 4
  %947 = call { i64, i32 } @envFunc(i64 %944, i32 %946, i32 noundef 300)
  store { i64, i32 } %947, ptr %150, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 8 %150, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %151) #5
  %948 = getelementptr inbounds %struct.TPE_Vec3, ptr %146, i32 0, i32 0
  %949 = load i32, ptr %948, align 4, !tbaa !39
  %950 = getelementptr inbounds %struct.TPE_Vec3, ptr %148, i32 0, i32 0
  %951 = load i32, ptr %950, align 4, !tbaa !39
  %952 = icmp eq i32 %949, %951
  br i1 %952, label %953, label %965

953:                                              ; preds = %937
  %954 = getelementptr inbounds %struct.TPE_Vec3, ptr %146, i32 0, i32 1
  %955 = load i32, ptr %954, align 4, !tbaa !44
  %956 = getelementptr inbounds %struct.TPE_Vec3, ptr %148, i32 0, i32 1
  %957 = load i32, ptr %956, align 4, !tbaa !44
  %958 = icmp eq i32 %955, %957
  br i1 %958, label %959, label %965

959:                                              ; preds = %953
  %960 = getelementptr inbounds %struct.TPE_Vec3, ptr %146, i32 0, i32 2
  %961 = load i32, ptr %960, align 4, !tbaa !45
  %962 = getelementptr inbounds %struct.TPE_Vec3, ptr %148, i32 0, i32 2
  %963 = load i32, ptr %962, align 4, !tbaa !45
  %964 = icmp eq i32 %961, %963
  br label %965

965:                                              ; preds = %959, %953, %937
  %966 = phi i1 [ false, %953 ], [ false, %937 ], [ %964, %959 ]
  %967 = zext i1 %966 to i32
  %968 = trunc i32 %967 to i8
  store i8 %968, ptr %151, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 12, ptr %152) #5
  %969 = load i32, ptr %145, align 4, !tbaa !5
  %970 = sdiv i32 %969, 64
  %971 = add nsw i32 %970, 1
  %972 = load i32, ptr %144, align 4, !tbaa !5
  %973 = sdiv i32 %972, 32
  %974 = sub nsw i32 %973, 2
  %975 = call { i64, i32 } @TPE_vec3(i32 noundef %971, i32 noundef %974, i32 noundef 3)
  store { i64, i32 } %975, ptr %154, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %153, ptr align 8 %154, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %155, ptr align 4 %146, i64 12, i1 false)
  %976 = getelementptr inbounds { i64, i32 }, ptr %155, i32 0, i32 0
  %977 = load i64, ptr %976, align 4
  %978 = getelementptr inbounds { i64, i32 }, ptr %155, i32 0, i32 1
  %979 = load i32, ptr %978, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %156, ptr align 4 %153, i64 12, i1 false)
  %980 = getelementptr inbounds { i64, i32 }, ptr %156, i32 0, i32 0
  %981 = load i64, ptr %980, align 4
  %982 = getelementptr inbounds { i64, i32 }, ptr %156, i32 0, i32 1
  %983 = load i32, ptr %982, align 4
  %984 = call { i64, i32 } @TPE_castEnvironmentRay(i64 %977, i32 %979, i64 %981, i32 %983, ptr noundef @envFunc, i32 noundef 30, i32 noundef 100, i32 noundef 32)
  store { i64, i32 } %984, ptr %157, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %152, ptr align 8 %157, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %158) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %159, ptr align 4 %152, i64 12, i1 false)
  %985 = getelementptr inbounds { i64, i32 }, ptr %159, i32 0, i32 0
  %986 = load i64, ptr %985, align 4
  %987 = getelementptr inbounds { i64, i32 }, ptr %159, i32 0, i32 1
  %988 = load i32, ptr %987, align 4
  %989 = call { i64, i32 } @envFunc(i64 %986, i32 %988, i32 noundef 300)
  store { i64, i32 } %989, ptr %160, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %158, ptr align 8 %160, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 4 %158, i64 12, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 12, ptr %158) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %161) #5
  %990 = getelementptr inbounds %struct.TPE_Vec3, ptr %152, i32 0, i32 0
  %991 = load i32, ptr %990, align 4, !tbaa !39
  %992 = getelementptr inbounds %struct.TPE_Vec3, ptr %148, i32 0, i32 0
  %993 = load i32, ptr %992, align 4, !tbaa !39
  %994 = icmp eq i32 %991, %993
  br i1 %994, label %995, label %1007

995:                                              ; preds = %965
  %996 = getelementptr inbounds %struct.TPE_Vec3, ptr %152, i32 0, i32 1
  %997 = load i32, ptr %996, align 4, !tbaa !44
  %998 = getelementptr inbounds %struct.TPE_Vec3, ptr %148, i32 0, i32 1
  %999 = load i32, ptr %998, align 4, !tbaa !44
  %1000 = icmp eq i32 %997, %999
  br i1 %1000, label %1001, label %1007

1001:                                             ; preds = %995
  %1002 = getelementptr inbounds %struct.TPE_Vec3, ptr %152, i32 0, i32 2
  %1003 = load i32, ptr %1002, align 4, !tbaa !45
  %1004 = getelementptr inbounds %struct.TPE_Vec3, ptr %148, i32 0, i32 2
  %1005 = load i32, ptr %1004, align 4, !tbaa !45
  %1006 = icmp eq i32 %1003, %1005
  br label %1007

1007:                                             ; preds = %1001, %995, %965
  %1008 = phi i1 [ false, %995 ], [ false, %965 ], [ %1006, %1001 ]
  %1009 = zext i1 %1008 to i32
  %1010 = trunc i32 %1009 to i8
  store i8 %1010, ptr %161, align 1, !tbaa !10
  %1011 = load i8, ptr %151, align 1, !tbaa !10
  %1012 = zext i8 %1011 to i32
  %1013 = load i8, ptr %161, align 1, !tbaa !10
  %1014 = zext i8 %1013 to i32
  %1015 = icmp ne i32 %1012, %1014
  br i1 %1015, label %1016, label %1019

1016:                                             ; preds = %1007
  %1017 = load i32, ptr %143, align 4, !tbaa !5
  %1018 = add nsw i32 %1017, 1
  store i32 %1018, ptr %143, align 4, !tbaa !5
  br label %1022

1019:                                             ; preds = %1007
  %1020 = load i32, ptr %142, align 4, !tbaa !5
  %1021 = add nsw i32 %1020, 1
  store i32 %1021, ptr %142, align 4, !tbaa !5
  br label %1022

1022:                                             ; preds = %1019, %1016
  call void @llvm.lifetime.end.p0(i64 1, ptr %161) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %152) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %151) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %148) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %146) #5
  br label %1023

1023:                                             ; preds = %1022
  %1024 = load i32, ptr %145, align 4, !tbaa !5
  %1025 = add nsw i32 %1024, 40
  store i32 %1025, ptr %145, align 4, !tbaa !5
  br label %933, !llvm.loop !48

1026:                                             ; preds = %936
  br label %1027

1027:                                             ; preds = %1026
  %1028 = load i32, ptr %144, align 4, !tbaa !5
  %1029 = add nsw i32 %1028, 52
  store i32 %1029, ptr %144, align 4, !tbaa !5
  br label %928, !llvm.loop !49

1030:                                             ; preds = %931
  %1031 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %1032 = load i32, ptr %142, align 4, !tbaa !5
  %1033 = load i32, ptr %143, align 4, !tbaa !5
  %1034 = mul nsw i32 %1033, 5
  %1035 = icmp sgt i32 %1032, %1034
  br i1 %1035, label %1038, label %1036

1036:                                             ; preds = %1030
  %1037 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %1044

1038:                                             ; preds = %1030
  %1039 = call i32 @puts(ptr noundef @.str.3)
  br label %1040

1040:                                             ; preds = %1038
  %1041 = load i32, ptr %142, align 4, !tbaa !5
  %1042 = load i32, ptr %143, align 4, !tbaa !5
  %1043 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i32 noundef %1041, i32 noundef %1042)
  store i32 0, ptr %9, align 4
  br label %1044

1044:                                             ; preds = %1040, %1036
  call void @llvm.lifetime.end.p0(i64 4, ptr %143) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %142) #5
  %1045 = load i32, ptr %9, align 4
  switch i32 %1045, label %1050 [
    i32 0, label %1046
    i32 1, label %1048
  ]

1046:                                             ; preds = %1044
  %1047 = call i32 @puts(ptr noundef @.str.27)
  store i32 0, ptr %1, align 4
  br label %1048

1048:                                             ; preds = %1046, %1044, %925, %604, %586, %568, %550, %532, %515, %255, %166
  %1049 = load i32, ptr %1, align 4
  ret i32 %1049

1050:                                             ; preds = %1044, %925, %515, %255
  unreachable
}

declare i32 @puts(ptr noundef) #4

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { "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 = { 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 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 6, !10, i64 18, i64 1, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 1, !13, i64 2}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !7, i64 1}
!15 = !{!12, !13, i64 2}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!21, !7, i64 32}
!21 = !{!"", !22, i64 0, !7, i64 8, !22, i64 16, !7, i64 24, !13, i64 26, !13, i64 28, !13, i64 30, !7, i64 32, !7, i64 33}
!22 = !{!"any pointer", !7, i64 0}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17}
!26 = !{!21, !7, i64 8}
!27 = !{i64 0, i64 8, !28, i64 8, i64 1, !10, i64 16, i64 8, !28, i64 24, i64 1, !10, i64 26, i64 2, !29, i64 28, i64 2, !29, i64 30, i64 2, !29, i64 32, i64 1, !10, i64 33, i64 1, !10}
!28 = !{!22, !22, i64 0}
!29 = !{!13, !13, i64 0}
!30 = !{!31, !13, i64 8}
!31 = !{!"", !22, i64 0, !13, i64 8, !22, i64 16, !22, i64 24}
!32 = distinct !{!32, !17}
!33 = distinct !{!33, !17}
!34 = !{!21, !13, i64 28}
!35 = !{!21, !13, i64 30}
!36 = !{!31, !22, i64 0}
!37 = distinct !{!37, !17}
!38 = distinct !{!38, !17}
!39 = !{!40, !6, i64 0}
!40 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8}
!41 = distinct !{!41, !17}
!42 = distinct !{!42, !17}
!43 = distinct !{!43, !17}
!44 = !{!40, !6, i64 4}
!45 = !{!40, !6, i64 8}
!46 = distinct !{!46, !17}
!47 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!48 = distinct !{!48, !17}
!49 = distinct !{!49, !17}


; 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.TPE_Joint = type { %struct.TPE_Vec3, [3 x i16], i8 }
%struct.TPE_Vec3 = type { i32, i32, i32 }
%struct.TPE_Connection = type { i8, i8, i16 }
%struct.TPE_Body = type { ptr, i8, ptr, i8, i16, i16, i16, i8, i8 }
%struct.TPE_World = type { ptr, i16, ptr, ptr }

@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_joint(ptr dead_on_unwind noalias writable sret(%struct.TPE_Joint) align 4, i64, i32, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_vec3(i32 noundef, i32 noundef, i32 noundef) 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) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @TPE_vec3Len(i64, i32) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_bodyInit(ptr noundef, ptr noundef, i8 noundef zeroext, ptr noundef, i8 noundef zeroext, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_worldInit(ptr noundef, ptr noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_bodyMoveBy(ptr noundef, i64, i32) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @TPE_abs(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_bodyGetCenterOfMass(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_bodyAccelerate(ptr noundef, i64, i32) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_vec3Normalized(i64, i32) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_castEnvironmentRay(i64, i32, i64, i32, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @TPE_castBodyRay(i64, i32, i64, i32, i16 noundef signext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @TPE_testClosestPointFunction(ptr noundef, i64, i32, i64, i32, i8 noundef zeroext, i16 noundef signext, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFunc(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFunc2(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFuncBad(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFuncBad2(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envSimple(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i32 } @envFuncHeightmap(i64, i32, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main() local_unnamed_addr #0 {
  %1 = alloca [16 x %struct.TPE_Joint], align 16
  %2 = alloca [16 x %struct.TPE_Connection], align 16
  %3 = alloca %struct.TPE_Joint, align 4
  %4 = alloca %struct.TPE_Joint, align 4
  %5 = alloca %struct.TPE_Joint, align 4
  %6 = alloca %struct.TPE_Joint, align 4
  %7 = alloca [8 x %struct.TPE_Body], align 16
  %8 = alloca %struct.TPE_World, align 8
  %9 = alloca %struct.TPE_World, align 8
  %10 = alloca [64 x %struct.TPE_Joint], align 16
  %11 = alloca [128 x %struct.TPE_Connection], align 16
  %12 = alloca [4 x %struct.TPE_Body], align 16
  %13 = alloca %struct.TPE_Joint, align 4
  %14 = alloca i16, align 2
  %15 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %17 = tail call i32 @TPE_vec2Angle(i32 noundef -100, i32 noundef 0)
  %18 = icmp eq i32 %17, 256
  br i1 %18, label %21, label %19

19:                                               ; preds = %0
  %20 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

21:                                               ; preds = %0
  %22 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %23 = tail call { i64, i32 } @TPE_vec3(i32 noundef 100, i32 noundef 0, i32 noundef 0)
  %.fca.0.extract429 = extractvalue { i64, i32 } %23, 0
  %.fca.1.extract430 = extractvalue { i64, i32 } %23, 1
  %24 = tail call { i64, i32 } @TPE_vec3Normalized(i64 %.fca.0.extract429, i32 %.fca.1.extract430)
  %.fca.0.extract423 = extractvalue { i64, i32 } %24, 0
  %.fca.1.extract424 = extractvalue { i64, i32 } %24, 1
  %25 = tail call i32 @TPE_vec3Len(i64 %.fca.0.extract423, i32 %.fca.1.extract424)
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %27 = add nsw i32 %25, -512
  %28 = tail call i32 @TPE_abs(i32 noundef %27)
  %29 = icmp slt i32 %28, 5
  br i1 %29, label %32, label %30

30:                                               ; preds = %21
  %31 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

32:                                               ; preds = %21
  %33 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %34 = tail call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %.fca.0.extract399 = extractvalue { i64, i32 } %34, 0
  %.fca.1.extract400 = extractvalue { i64, i32 } %34, 1
  %35 = tail call { i64, i32 } @TPE_vec3Normalized(i64 %.fca.0.extract399, i32 %.fca.1.extract400)
  %.fca.0.extract393 = extractvalue { i64, i32 } %35, 0
  %.fca.1.extract394 = extractvalue { i64, i32 } %35, 1
  %36 = tail call i32 @TPE_vec3Len(i64 %.fca.0.extract393, i32 %.fca.1.extract394)
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %38 = add nsw i32 %36, -512
  %39 = tail call i32 @TPE_abs(i32 noundef %38)
  %40 = icmp slt i32 %39, 5
  br i1 %40, label %43, label %41

41:                                               ; preds = %32
  %42 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

43:                                               ; preds = %32
  %44 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %45 = tail call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef -1, i32 noundef 0)
  %.fca.0.extract383 = extractvalue { i64, i32 } %45, 0
  %.fca.1.extract384 = extractvalue { i64, i32 } %45, 1
  %46 = tail call { i64, i32 } @TPE_vec3Normalized(i64 %.fca.0.extract383, i32 %.fca.1.extract384)
  %.fca.0.extract377 = extractvalue { i64, i32 } %46, 0
  %.fca.1.extract378 = extractvalue { i64, i32 } %46, 1
  %47 = tail call i32 @TPE_vec3Len(i64 %.fca.0.extract377, i32 %.fca.1.extract378)
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %49 = add nsw i32 %47, -512
  %50 = tail call i32 @TPE_abs(i32 noundef %49)
  %51 = icmp slt i32 %50, 5
  br i1 %51, label %54, label %52

52:                                               ; preds = %43
  %53 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

54:                                               ; preds = %43
  %55 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %56 = tail call { i64, i32 } @TPE_vec3(i32 noundef 500000, i32 noundef 300000, i32 noundef -700000)
  %.fca.0.extract367 = extractvalue { i64, i32 } %56, 0
  %.fca.1.extract368 = extractvalue { i64, i32 } %56, 1
  %57 = tail call { i64, i32 } @TPE_vec3Normalized(i64 %.fca.0.extract367, i32 %.fca.1.extract368)
  %.fca.0.extract361 = extractvalue { i64, i32 } %57, 0
  %.fca.1.extract362 = extractvalue { i64, i32 } %57, 1
  %58 = tail call i32 @TPE_vec3Len(i64 %.fca.0.extract361, i32 %.fca.1.extract362)
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %60 = add nsw i32 %58, -512
  %61 = tail call i32 @TPE_abs(i32 noundef %60)
  %62 = icmp slt i32 %61, 5
  br i1 %62, label %.lr.ph, label %63

63:                                               ; preds = %54
  %64 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

.lr.ph.1:                                         ; preds = %103
  %65 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.not.1 = icmp eq i32 %93, %95
  %.not480.1 = icmp eq i32 %94, %96
  %or.cond689 = select i1 %.not.1, i1 true, i1 %.not480.1
  br i1 %or.cond689, label %.thread530, label %67

67:                                               ; preds = %.lr.ph.1
  %68 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.not.1.1 = icmp eq i32 %93, %97
  %.not480.1.1 = icmp eq i32 %94, %98
  %or.cond690 = select i1 %.not.1.1, i1 true, i1 %.not480.1.1
  br i1 %or.cond690, label %.thread530, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %67
  %70 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.not.2 = icmp eq i32 %95, %97
  %.not480.2 = icmp eq i32 %96, %98
  %or.cond691 = select i1 %.not.2, i1 true, i1 %.not480.2
  br i1 %or.cond691, label %.thread530, label %.lr.ph576

.lr.ph:                                           ; preds = %54
  %72 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @llvm.lifetime.start.p0(i64 320, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %3) #5
  %73 = tail call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef 100, i32 noundef -400)
  %.fca.0.extract353 = extractvalue { i64, i32 } %73, 0
  %.fca.1.extract354 = extractvalue { i64, i32 } %73, 1
  call void @TPE_joint(ptr dead_on_unwind nonnull writable sret(%struct.TPE_Joint) align 4 %3, i64 %.fca.0.extract353, i32 %.fca.1.extract354, i32 noundef 300)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %1, ptr noundef nonnull align 4 dereferenceable(20) %3, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %3) #5
  %74 = getelementptr inbounds i8, ptr %1, i64 20
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #5
  %75 = call { i64, i32 } @TPE_vec3(i32 noundef 100, i32 noundef 200, i32 noundef -400)
  %.fca.0.extract345 = extractvalue { i64, i32 } %75, 0
  %.fca.1.extract346 = extractvalue { i64, i32 } %75, 1
  call void @TPE_joint(ptr dead_on_unwind nonnull writable sret(%struct.TPE_Joint) align 4 %4, i64 %.fca.0.extract345, i32 %.fca.1.extract346, i32 noundef 300)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %74, ptr noundef nonnull align 4 dereferenceable(20) %4, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #5
  %76 = getelementptr inbounds i8, ptr %1, i64 40
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %5) #5
  %77 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef -400, i32 noundef 200)
  %.fca.0.extract337 = extractvalue { i64, i32 } %77, 0
  %.fca.1.extract338 = extractvalue { i64, i32 } %77, 1
  call void @TPE_joint(ptr dead_on_unwind nonnull writable sret(%struct.TPE_Joint) align 4 %5, i64 %.fca.0.extract337, i32 %.fca.1.extract338, i32 noundef 300)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %76, ptr noundef nonnull align 4 dereferenceable(20) %5, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %5) #5
  %78 = getelementptr inbounds i8, ptr %1, i64 60
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %6) #5
  %79 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef 100, i32 noundef -400)
  %.fca.0.extract329 = extractvalue { i64, i32 } %79, 0
  %.fca.1.extract330 = extractvalue { i64, i32 } %79, 1
  call void @TPE_joint(ptr dead_on_unwind nonnull writable sret(%struct.TPE_Joint) align 4 %6, i64 %.fca.0.extract329, i32 %.fca.1.extract330, i32 noundef 400)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %78, ptr noundef nonnull align 4 dereferenceable(20) %6, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %6) #5
  store i8 0, ptr %2, align 16, !tbaa !11
  %80 = getelementptr inbounds i8, ptr %2, i64 1
  store i8 1, ptr %80, align 1, !tbaa !14
  %81 = getelementptr inbounds i8, ptr %2, i64 2
  store i16 1000, ptr %81, align 2, !tbaa !15
  %82 = getelementptr inbounds i8, ptr %2, i64 4
  store i8 1, ptr %82, align 4, !tbaa !11
  %83 = getelementptr inbounds i8, ptr %2, i64 5
  store i8 0, ptr %83, align 1, !tbaa !14
  %84 = getelementptr inbounds i8, ptr %2, i64 6
  store i16 1000, ptr %84, align 2, !tbaa !15
  %85 = getelementptr inbounds i8, ptr %2, i64 8
  store i8 0, ptr %85, align 8, !tbaa !11
  %86 = getelementptr inbounds i8, ptr %2, i64 9
  store i8 1, ptr %86, align 1, !tbaa !14
  %87 = getelementptr inbounds i8, ptr %2, i64 10
  store i16 1100, ptr %87, align 2, !tbaa !15
  %88 = getelementptr inbounds i8, ptr %2, i64 12
  store i8 2, ptr %88, align 4, !tbaa !11
  %89 = getelementptr inbounds i8, ptr %2, i64 13
  store i8 3, ptr %89, align 1, !tbaa !14
  %90 = getelementptr inbounds i8, ptr %2, i64 14
  store i16 100, ptr %90, align 2, !tbaa !15
  %91 = call i32 @TPE_jointHash(ptr noundef nonnull %1)
  %92 = call i32 @TPE_connectionHash(ptr noundef nonnull %2)
  %93 = call i32 @TPE_jointHash(ptr noundef nonnull %74)
  %94 = call i32 @TPE_connectionHash(ptr noundef nonnull %82)
  %95 = call i32 @TPE_jointHash(ptr noundef nonnull %76)
  %96 = call i32 @TPE_connectionHash(ptr noundef nonnull %85)
  %97 = call i32 @TPE_jointHash(ptr noundef nonnull %78)
  %98 = call i32 @TPE_connectionHash(ptr noundef nonnull %88)
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.not = icmp eq i32 %91, %93
  %.not480 = icmp eq i32 %92, %94
  %or.cond692 = select i1 %.not, i1 true, i1 %.not480
  br i1 %or.cond692, label %.thread530, label %100

100:                                              ; preds = %.lr.ph
  %101 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.not.1616 = icmp eq i32 %91, %95
  %.not480.1617 = icmp eq i32 %92, %96
  %or.cond693 = select i1 %.not.1616, i1 true, i1 %.not480.1617
  br i1 %or.cond693, label %.thread530, label %103

103:                                              ; preds = %100
  %104 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %.not.2618 = icmp eq i32 %91, %97
  %.not480.2619 = icmp eq i32 %92, %98
  %or.cond694 = select i1 %.not.2618, i1 true, i1 %.not480.2619
  br i1 %or.cond694, label %.thread530, label %.lr.ph.1

.thread530:                                       ; preds = %.lr.ph.2, %.lr.ph.1, %67, %.lr.ph, %100, %103
  %106 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %1) #5
  br label %.thread

.lr.ph576.1:                                      ; preds = %129
  %107 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.not481.1 = icmp eq i32 %122, %123
  br i1 %.not481.1, label %.thread534, label %109

109:                                              ; preds = %.lr.ph576.1
  %110 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.not481.1.1 = icmp eq i32 %122, %124
  br i1 %.not481.1.1, label %.thread534, label %.lr.ph576.2

.lr.ph576.2:                                      ; preds = %109
  %112 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.not481.2 = icmp eq i32 %123, %124
  br i1 %.not481.2, label %.thread534, label %.lr.ph579

.lr.ph576:                                        ; preds = %.lr.ph.2
  %114 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @llvm.lifetime.start.p0(i64 320, ptr nonnull %7) #5
  call void @TPE_bodyInit(ptr noundef nonnull %7, ptr noundef nonnull %1, i8 noundef zeroext 4, ptr noundef nonnull %2, i8 noundef zeroext 4, i32 noundef 300)
  %115 = getelementptr inbounds i8, ptr %7, i64 40
  call void @TPE_bodyInit(ptr noundef nonnull %115, ptr noundef nonnull %74, i8 noundef zeroext 3, ptr noundef nonnull %2, i8 noundef zeroext 4, i32 noundef 300)
  %116 = getelementptr inbounds i8, ptr %7, i64 80
  call void @TPE_bodyInit(ptr noundef nonnull %116, ptr noundef nonnull %1, i8 noundef zeroext 4, ptr noundef nonnull %2, i8 noundef zeroext 4, i32 noundef 300)
  %117 = getelementptr inbounds i8, ptr %7, i64 112
  %118 = load i8, ptr %117, align 16, !tbaa !16
  %119 = or i8 %118, 10
  store i8 %119, ptr %117, align 16, !tbaa !16
  %120 = getelementptr inbounds i8, ptr %7, i64 120
  call void @TPE_bodyInit(ptr noundef nonnull %120, ptr noundef nonnull %1, i8 noundef zeroext 4, ptr noundef nonnull %2, i8 noundef zeroext 4, i32 noundef 200)
  %121 = call i32 @TPE_bodyHash(ptr noundef nonnull %7)
  %122 = call i32 @TPE_bodyHash(ptr noundef nonnull %115)
  %123 = call i32 @TPE_bodyHash(ptr noundef nonnull %116)
  %124 = call i32 @TPE_bodyHash(ptr noundef nonnull %120)
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.not481 = icmp eq i32 %121, %122
  br i1 %.not481, label %.thread534, label %126

126:                                              ; preds = %.lr.ph576
  %127 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.not481.1631 = icmp eq i32 %121, %123
  br i1 %.not481.1631, label %.thread534, label %129

129:                                              ; preds = %126
  %130 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %131 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.not481.2632 = icmp eq i32 %121, %124
  br i1 %.not481.2632, label %.thread534, label %.lr.ph576.1

.thread534:                                       ; preds = %.lr.ph576.2, %.lr.ph576.1, %109, %.lr.ph576, %126, %129
  %132 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %1) #5
  br label %.thread

.lr.ph579.1:                                      ; preds = %162
  %133 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.not482.1 = icmp eq i32 %151, %153
  br i1 %.not482.1, label %.loopexit640, label %135

135:                                              ; preds = %.lr.ph579.1
  %136 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %137 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.not482.1.1 = icmp eq i32 %151, %157
  br i1 %.not482.1.1, label %.loopexit640, label %.lr.ph579.2

.lr.ph579.2:                                      ; preds = %135
  %138 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.not482.2 = icmp eq i32 %153, %157
  br i1 %.not482.2, label %.loopexit640, label %.loopexit.3

.loopexit.3:                                      ; preds = %.lr.ph579.2
  %140 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %1) #5
  %141 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %143 = call { i64, i32 } @TPE_vec3(i32 noundef -3000, i32 noundef -3000, i32 noundef -3000)
  %.fca.0.extract288 = extractvalue { i64, i32 } %143, 0
  %.fca.1.extract289 = extractvalue { i64, i32 } %143, 1
  %144 = call { i64, i32 } @TPE_vec3(i32 noundef 3000, i32 noundef 3000, i32 noundef 3000)
  %.fca.0.extract282 = extractvalue { i64, i32 } %144, 0
  %.fca.1.extract283 = extractvalue { i64, i32 } %144, 1
  %145 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef nonnull @envFunc, i64 %.fca.0.extract288, i32 %.fca.1.extract289, i64 %.fca.0.extract282, i32 %.fca.1.extract283, i8 noundef zeroext 32, i16 noundef signext 40, ptr noundef null)
  %.not483 = icmp eq i8 %145, 0
  br i1 %.not483, label %166, label %168

.lr.ph579:                                        ; preds = %.lr.ph576.2
  %146 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @TPE_worldInit(ptr noundef nonnull %8, ptr noundef nonnull %7, i16 noundef zeroext 4, ptr noundef null)
  %147 = call i32 @TPE_worldHash(ptr noundef nonnull %8)
  %148 = getelementptr inbounds i8, ptr %7, i64 8
  %149 = load i8, ptr %148, align 8, !tbaa !19
  %150 = add i8 %149, -1
  store i8 %150, ptr %148, align 8, !tbaa !19
  %151 = call i32 @TPE_worldHash(ptr noundef nonnull %8)
  %152 = getelementptr inbounds i8, ptr %7, i64 160
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %152, ptr noundef nonnull align 16 dereferenceable(40) %7, i64 40, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %120, i64 40, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %120, ptr noundef nonnull align 16 dereferenceable(40) %152, i64 40, i1 false), !tbaa.struct !20
  %153 = call i32 @TPE_worldHash(ptr noundef nonnull %8)
  %154 = getelementptr inbounds i8, ptr %8, i64 8
  %155 = load i16, ptr %154, align 8, !tbaa !23
  %156 = add i16 %155, -1
  store i16 %156, ptr %154, align 8, !tbaa !23
  %157 = call i32 @TPE_worldHash(ptr noundef nonnull %8)
  %158 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.not482 = icmp eq i32 %147, %151
  br i1 %.not482, label %.loopexit640, label %159

159:                                              ; preds = %.lr.ph579
  %160 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %161 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.not482.1644 = icmp eq i32 %147, %153
  br i1 %.not482.1644, label %.loopexit640, label %162

162:                                              ; preds = %159
  %163 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %164 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %.not482.2645 = icmp eq i32 %147, %157
  br i1 %.not482.2645, label %.loopexit640, label %.lr.ph579.1

.loopexit640:                                     ; preds = %.lr.ph579.2, %.lr.ph579.1, %135, %.lr.ph579, %159, %162
  %165 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %1) #5
  br label %.thread

166:                                              ; preds = %.loopexit.3
  %167 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

168:                                              ; preds = %.loopexit.3
  %169 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %170 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %171 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef -1000, i32 noundef -5000)
  %.fca.0.extract272 = extractvalue { i64, i32 } %171, 0
  %.fca.1.extract273 = extractvalue { i64, i32 } %171, 1
  %172 = call { i64, i32 } @TPE_vec3(i32 noundef 5000, i32 noundef 6000, i32 noundef 7000)
  %.fca.0.extract266 = extractvalue { i64, i32 } %172, 0
  %.fca.1.extract267 = extractvalue { i64, i32 } %172, 1
  %173 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef nonnull @envFunc2, i64 %.fca.0.extract272, i32 %.fca.1.extract273, i64 %.fca.0.extract266, i32 %.fca.1.extract267, i8 noundef zeroext 32, i16 noundef signext 30, ptr noundef null)
  %.not484 = icmp eq i8 %173, 0
  br i1 %.not484, label %174, label %176

174:                                              ; preds = %168
  %175 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

176:                                              ; preds = %168
  %177 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %178 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %179 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef -1000, i32 noundef -5000)
  %.fca.0.extract256 = extractvalue { i64, i32 } %179, 0
  %.fca.1.extract257 = extractvalue { i64, i32 } %179, 1
  %180 = call { i64, i32 } @TPE_vec3(i32 noundef 4000, i32 noundef 6000, i32 noundef 7000)
  %.fca.0.extract250 = extractvalue { i64, i32 } %180, 0
  %.fca.1.extract251 = extractvalue { i64, i32 } %180, 1
  %181 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef nonnull @envFuncHeightmap, i64 %.fca.0.extract256, i32 %.fca.1.extract257, i64 %.fca.0.extract250, i32 %.fca.1.extract251, i8 noundef zeroext 6, i16 noundef signext 50, ptr noundef null)
  %.not485 = icmp eq i8 %181, 0
  br i1 %.not485, label %182, label %184

182:                                              ; preds = %176
  %183 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

184:                                              ; preds = %176
  %185 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %186 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %187 = call { i64, i32 } @TPE_vec3(i32 noundef -1000, i32 noundef -1000, i32 noundef -1000)
  %.fca.0.extract240 = extractvalue { i64, i32 } %187, 0
  %.fca.1.extract241 = extractvalue { i64, i32 } %187, 1
  %188 = call { i64, i32 } @TPE_vec3(i32 noundef 2000, i32 noundef 3000, i32 noundef 100)
  %.fca.0.extract234 = extractvalue { i64, i32 } %188, 0
  %.fca.1.extract235 = extractvalue { i64, i32 } %188, 1
  %189 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef nonnull @envFuncBad, i64 %.fca.0.extract240, i32 %.fca.1.extract241, i64 %.fca.0.extract234, i32 %.fca.1.extract235, i8 noundef zeroext 32, i16 noundef signext 40, ptr noundef null)
  %.not486 = icmp eq i8 %189, 0
  br i1 %.not486, label %192, label %190

190:                                              ; preds = %184
  %191 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

192:                                              ; preds = %184
  %193 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %194 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %195 = call { i64, i32 } @TPE_vec3(i32 noundef -1000, i32 noundef -2000, i32 noundef -200)
  %.fca.0.extract224 = extractvalue { i64, i32 } %195, 0
  %.fca.1.extract225 = extractvalue { i64, i32 } %195, 1
  %196 = call { i64, i32 } @TPE_vec3(i32 noundef 1000, i32 noundef 1000, i32 noundef 2000)
  %.fca.0.extract218 = extractvalue { i64, i32 } %196, 0
  %.fca.1.extract219 = extractvalue { i64, i32 } %196, 1
  %197 = call zeroext i8 @TPE_testClosestPointFunction(ptr noundef nonnull @envFuncBad2, i64 %.fca.0.extract224, i32 %.fca.1.extract225, i64 %.fca.0.extract218, i32 %.fca.1.extract219, i8 noundef zeroext 32, i16 noundef signext 40, ptr noundef null)
  %.not487 = icmp eq i8 %197, 0
  br i1 %.not487, label %200, label %198

198:                                              ; preds = %192
  %199 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

200:                                              ; preds = %192
  %201 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %202 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.15)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 1280, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %13) #5
  %203 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %.fca.0.extract208 = extractvalue { i64, i32 } %203, 0
  %.fca.1.extract209 = extractvalue { i64, i32 } %203, 1
  call void @TPE_joint(ptr dead_on_unwind nonnull writable sret(%struct.TPE_Joint) align 4 %13, i64 %.fca.0.extract208, i32 %.fca.1.extract209, i32 noundef 320)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %10, ptr noundef nonnull align 4 dereferenceable(20) %13, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %13) #5
  call void @TPE_bodyInit(ptr noundef nonnull %12, ptr noundef nonnull %10, i8 noundef zeroext 1, ptr noundef null, i8 noundef zeroext 0, i32 noundef 2124)
  %204 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef 3000, i32 noundef 3000)
  %.fca.0.extract200 = extractvalue { i64, i32 } %204, 0
  %.fca.1.extract201 = extractvalue { i64, i32 } %204, 1
  call void @TPE_bodyMoveBy(ptr noundef nonnull %12, i64 %.fca.0.extract200, i32 %.fca.1.extract201)
  %205 = getelementptr inbounds i8, ptr %10, i64 20
  call void @TPE_makeBox(ptr noundef nonnull %205, ptr noundef nonnull %11, i32 noundef 800, i32 noundef 900, i32 noundef 850, i32 noundef 320)
  %206 = getelementptr inbounds i8, ptr %12, i64 40
  call void @TPE_bodyInit(ptr noundef nonnull %206, ptr noundef nonnull %205, i8 noundef zeroext 8, ptr noundef nonnull %11, i8 noundef zeroext 16, i32 noundef 1300)
  %207 = getelementptr inbounds i8, ptr %12, i64 68
  store i16 400, ptr %207, align 4, !tbaa !25
  %208 = getelementptr inbounds i8, ptr %12, i64 70
  store i16 350, ptr %208, align 2, !tbaa !26
  %209 = call { i64, i32 } @TPE_vec3(i32 noundef -2000, i32 noundef 3800, i32 noundef 1500)
  %.fca.0.extract192 = extractvalue { i64, i32 } %209, 0
  %.fca.1.extract193 = extractvalue { i64, i32 } %209, 1
  call void @TPE_bodyMoveBy(ptr noundef nonnull %206, i64 %.fca.0.extract192, i32 %.fca.1.extract193)
  %210 = getelementptr inbounds i8, ptr %10, i64 400
  %211 = getelementptr inbounds i8, ptr %11, i64 128
  call void @TPE_make2Line(ptr noundef nonnull %210, ptr noundef nonnull %211, i32 noundef 1000, i32 noundef 300)
  %212 = getelementptr inbounds i8, ptr %12, i64 80
  call void @TPE_bodyInit(ptr noundef nonnull %212, ptr noundef nonnull %210, i8 noundef zeroext 2, ptr noundef nonnull %211, i8 noundef zeroext 1, i32 noundef 1300)
  %213 = getelementptr inbounds i8, ptr %12, i64 112
  %214 = load i8, ptr %213, align 16, !tbaa !16
  %215 = or i8 %214, 2
  store i8 %215, ptr %213, align 16, !tbaa !16
  %216 = call { i64, i32 } @TPE_vec3(i32 noundef -3000, i32 noundef 4100, i32 noundef -1500)
  %.fca.0.extract184 = extractvalue { i64, i32 } %216, 0
  %.fca.1.extract185 = extractvalue { i64, i32 } %216, 1
  call void @TPE_bodyMoveBy(ptr noundef nonnull %212, i64 %.fca.0.extract184, i32 %.fca.1.extract185)
  %217 = getelementptr inbounds i8, ptr %10, i64 640
  %218 = getelementptr inbounds i8, ptr %11, i64 256
  call void @TPE_makeCenterBox(ptr noundef nonnull %217, ptr noundef nonnull %218, i32 noundef 600, i32 noundef 500, i32 noundef 510, i32 noundef 300)
  %219 = getelementptr inbounds i8, ptr %12, i64 120
  call void @TPE_bodyInit(ptr noundef nonnull %219, ptr noundef nonnull %217, i8 noundef zeroext 9, ptr noundef nonnull %218, i8 noundef zeroext 18, i32 noundef 1200)
  %220 = getelementptr inbounds i8, ptr %12, i64 152
  %221 = load i8, ptr %220, align 8, !tbaa !16
  %222 = or i8 %221, 8
  store i8 %222, ptr %220, align 8, !tbaa !16
  %223 = call { i64, i32 } @TPE_vec3(i32 noundef -1500, i32 noundef 3500, i32 noundef -3000)
  %.fca.0.extract176 = extractvalue { i64, i32 } %223, 0
  %.fca.1.extract177 = extractvalue { i64, i32 } %223, 1
  call void @TPE_bodyMoveBy(ptr noundef nonnull %219, i64 %.fca.0.extract176, i32 %.fca.1.extract177)
  call void @TPE_worldInit(ptr noundef nonnull %9, ptr noundef nonnull %12, i16 noundef zeroext 4, ptr noundef nonnull @envSimple)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %14) #5
  %224 = call { i64, i32 } @TPE_vec3(i32 noundef -1857, i32 noundef 3743, i32 noundef -4800)
  %.fca.0.extract168 = extractvalue { i64, i32 } %224, 0
  %.fca.1.extract169 = extractvalue { i64, i32 } %224, 1
  %225 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 0, i32 noundef 100)
  %.fca.0.extract162 = extractvalue { i64, i32 } %225, 0
  %.fca.1.extract163 = extractvalue { i64, i32 } %225, 1
  %226 = call { i64, i32 } @TPE_castBodyRay(i64 %.fca.0.extract168, i32 %.fca.1.extract169, i64 %.fca.0.extract162, i32 %.fca.1.extract163, i16 noundef signext -1, ptr noundef nonnull %9, ptr noundef nonnull %14, ptr noundef null)
  %227 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %228 = load i16, ptr %14, align 2, !tbaa !22
  %229 = icmp sgt i16 %228, -1
  br i1 %229, label %230, label %.thread554

230:                                              ; preds = %200
  %231 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %232 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.17)
  %233 = getelementptr inbounds i8, ptr %9, i64 8
  br label %.preheader564

.preheader564:                                    ; preds = %230, %249
  %.0466583 = phi i32 [ 0, %230 ], [ %250, %249 ]
  %234 = load i16, ptr %233, align 8, !tbaa !23
  %.not603 = icmp eq i16 %234, 0
  br i1 %.not603, label %._crit_edge, label %.lr.ph582

._crit_edge:                                      ; preds = %.lr.ph582, %.preheader564
  %235 = icmp eq i32 %.0466583, 100
  br i1 %235, label %243, label %249

.lr.ph582:                                        ; preds = %.preheader564, %.lr.ph582
  %.0467581 = phi i8 [ %239, %.lr.ph582 ], [ 0, %.preheader564 ]
  %236 = load ptr, ptr %9, align 8, !tbaa !27
  %237 = zext i8 %.0467581 to i64
  %238 = getelementptr inbounds %struct.TPE_Body, ptr %236, i64 %237
  call void @TPE_bodyApplyGravity(ptr noundef %238, i32 noundef 8)
  %239 = add i8 %.0467581, 1
  %240 = load i16, ptr %233, align 8, !tbaa !23
  %241 = zext i8 %239 to i16
  %242 = icmp ugt i16 %240, %241
  br i1 %242, label %.lr.ph582, label %._crit_edge, !llvm.loop !28

243:                                              ; preds = %._crit_edge
  %244 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %245 = call i32 @TPE_worldGetNetSpeed(ptr noundef nonnull %9)
  %246 = icmp sgt i32 %245, 100
  br i1 %246, label %247, label %.thread554

247:                                              ; preds = %243
  %248 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %249

249:                                              ; preds = %247, %._crit_edge
  call void @TPE_worldStep(ptr noundef nonnull %9)
  %250 = add nuw nsw i32 %.0466583, 1
  %exitcond = icmp eq i32 %250, 300
  br i1 %exitcond, label %251, label %.preheader564, !llvm.loop !30

251:                                              ; preds = %249
  %252 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.19)
  %253 = call i32 @TPE_worldHash(ptr noundef nonnull %9)
  %254 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, i32 noundef %253)
  %255 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %256 = icmp eq i32 %253, -883963269
  br i1 %256, label %257, label %.thread554

257:                                              ; preds = %251
  %258 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %259 = load i16, ptr %233, align 8, !tbaa !23
  %.not489584.not = icmp eq i16 %259, 0
  br i1 %.not489584.not, label %._crit_edge588, label %.lr.ph587

.lr.ph587:                                        ; preds = %257, %272
  %indvars.iv = phi i64 [ %indvars.iv.next, %272 ], [ 0, %257 ]
  %260 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  %261 = load ptr, ptr %9, align 8, !tbaa !27
  %262 = getelementptr inbounds %struct.TPE_Body, ptr %261, i64 %indvars.iv
  %263 = call { i64, i32 } @TPE_bodyGetCenterOfMass(ptr noundef %262)
  %.fca.0.extract135 = extractvalue { i64, i32 } %263, 0
  %.sroa.0139.0.extract.trunc = trunc i64 %.fca.0.extract135 to i32
  %264 = icmp sgt i32 %.sroa.0139.0.extract.trunc, 0
  br i1 %264, label %265, label %.thread554

265:                                              ; preds = %.lr.ph587
  %266 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %267 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  %268 = load ptr, ptr %9, align 8, !tbaa !27
  %269 = getelementptr inbounds %struct.TPE_Body, ptr %268, i64 %indvars.iv, i32 7
  %270 = load i8, ptr %269, align 8, !tbaa !16
  %271 = and i8 %270, 1
  %.not488 = icmp eq i8 %271, 0
  br i1 %.not488, label %.thread554, label %272

272:                                              ; preds = %265
  %273 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %274 = load i16, ptr %233, align 8, !tbaa !23
  %275 = zext i16 %274 to i64
  %.not489 = icmp ult i64 %indvars.iv.next, %275
  br i1 %.not489, label %.lr.ph587, label %._crit_edge588, !llvm.loop !31

._crit_edge588:                                   ; preds = %272, %257
  %276 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %277 = call i32 @TPE_worldGetNetSpeed(ptr noundef nonnull %9)
  %278 = icmp slt i32 %277, 100
  br i1 %278, label %279, label %.thread554

279:                                              ; preds = %._crit_edge588
  %280 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %281 = load ptr, ptr %9, align 8, !tbaa !27
  %282 = call { i64, i32 } @TPE_vec3(i32 noundef 200, i32 noundef 300, i32 noundef -20)
  %.fca.0.extract129 = extractvalue { i64, i32 } %282, 0
  %.fca.1.extract130 = extractvalue { i64, i32 } %282, 1
  call void @TPE_bodyAccelerate(ptr noundef %281, i64 %.fca.0.extract129, i32 %.fca.1.extract130)
  %283 = load ptr, ptr %9, align 8, !tbaa !27
  %284 = getelementptr inbounds i8, ptr %283, i64 40
  %285 = call { i64, i32 } @TPE_vec3(i32 noundef -700, i32 noundef 400, i32 noundef 0)
  %.fca.0.extract121 = extractvalue { i64, i32 } %285, 0
  %.fca.1.extract122 = extractvalue { i64, i32 } %285, 1
  call void @TPE_bodyAccelerate(ptr noundef nonnull %284, i64 %.fca.0.extract121, i32 %.fca.1.extract122)
  %286 = load ptr, ptr %9, align 8, !tbaa !27
  %287 = getelementptr inbounds i8, ptr %286, i64 80
  %288 = call { i64, i32 } @TPE_vec3(i32 noundef 20, i32 noundef -300, i32 noundef -100)
  %.fca.0.extract113 = extractvalue { i64, i32 } %288, 0
  %.fca.1.extract114 = extractvalue { i64, i32 } %288, 1
  call void @TPE_bodyAccelerate(ptr noundef nonnull %287, i64 %.fca.0.extract113, i32 %.fca.1.extract114)
  %289 = load ptr, ptr %9, align 8, !tbaa !27
  %290 = getelementptr inbounds i8, ptr %289, i64 120
  %291 = call { i64, i32 } @TPE_vec3(i32 noundef 0, i32 noundef 30, i32 noundef -900)
  %.fca.0.extract105 = extractvalue { i64, i32 } %291, 0
  %.fca.1.extract106 = extractvalue { i64, i32 } %291, 1
  call void @TPE_bodyAccelerate(ptr noundef nonnull %290, i64 %.fca.0.extract105, i32 %.fca.1.extract106)
  %292 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.23)
  br label %.preheader563

.preheader563:                                    ; preds = %279, %._crit_edge591
  %.0469592 = phi i32 [ 0, %279 ], [ %295, %._crit_edge591 ]
  %293 = load i16, ptr %233, align 8, !tbaa !23
  %.not604 = icmp eq i16 %293, 0
  br i1 %.not604, label %._crit_edge591, label %.lr.ph590

.preheader562:                                    ; preds = %._crit_edge591
  %294 = load i16, ptr %233, align 8, !tbaa !23
  %.not490593.not = icmp eq i16 %294, 0
  br i1 %.not490593.not, label %._crit_edge596, label %.lr.ph595

._crit_edge591:                                   ; preds = %.lr.ph590, %.preheader563
  call void @TPE_worldStep(ptr noundef nonnull %9)
  %295 = add nuw nsw i32 %.0469592, 1
  %exitcond647.not = icmp eq i32 %295, 100
  br i1 %exitcond647.not, label %.preheader562, label %.preheader563, !llvm.loop !32

.lr.ph590:                                        ; preds = %.preheader563, %.lr.ph590
  %.0470589 = phi i8 [ %299, %.lr.ph590 ], [ 0, %.preheader563 ]
  %296 = load ptr, ptr %9, align 8, !tbaa !27
  %297 = zext i8 %.0470589 to i64
  %298 = getelementptr inbounds %struct.TPE_Body, ptr %296, i64 %297
  call void @TPE_bodyApplyGravity(ptr noundef %298, i32 noundef 8)
  %299 = add i8 %.0470589, 1
  %300 = load i16, ptr %233, align 8, !tbaa !23
  %301 = zext i8 %299 to i16
  %302 = icmp ugt i16 %300, %301
  br i1 %302, label %.lr.ph590, label %._crit_edge591, !llvm.loop !33

.lr.ph595:                                        ; preds = %.preheader562, %312
  %indvars.iv648 = phi i64 [ %indvars.iv.next649, %312 ], [ 0, %.preheader562 ]
  %303 = load ptr, ptr %9, align 8, !tbaa !27
  %304 = getelementptr inbounds %struct.TPE_Body, ptr %303, i64 %indvars.iv648
  %305 = call { i64, i32 } @TPE_bodyGetCenterOfMass(ptr noundef %304)
  %.fca.0.extract83 = extractvalue { i64, i32 } %305, 0
  %.fca.1.extract84 = extractvalue { i64, i32 } %305, 1
  %306 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  %.sroa.087.0.extract.trunc = trunc i64 %.fca.0.extract83 to i32
  %307 = add i32 %.sroa.087.0.extract.trunc, 4999
  %or.cond = icmp ult i32 %307, 9999
  %.sroa.087.4.extract.shift = lshr i64 %.fca.0.extract83, 32
  %.sroa.087.4.extract.trunc = trunc nuw i64 %.sroa.087.4.extract.shift to i32
  %308 = add i32 %.sroa.087.4.extract.trunc, 4999
  %309 = icmp ult i32 %308, 9999
  %or.cond17 = select i1 %or.cond, i1 %309, i1 false
  %310 = add i32 %.fca.1.extract84, 4999
  %311 = icmp ult i32 %310, 9999
  %or.cond23 = select i1 %or.cond17, i1 %311, i1 false
  br i1 %or.cond23, label %312, label %.thread554

312:                                              ; preds = %.lr.ph595
  %313 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %indvars.iv.next649 = add nuw nsw i64 %indvars.iv648, 1
  %314 = load i16, ptr %233, align 8, !tbaa !23
  %315 = zext i16 %314 to i64
  %.not490 = icmp ult i64 %indvars.iv.next649, %315
  br i1 %.not490, label %.lr.ph595, label %._crit_edge596, !llvm.loop !34

.thread554:                                       ; preds = %243, %265, %.lr.ph587, %.lr.ph595, %._crit_edge588, %251, %200
  %316 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 1280, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %.thread

._crit_edge596:                                   ; preds = %312, %.preheader562
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 1280, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %.preheader

.preheader:                                       ; preds = %._crit_edge596, %322
  %.0472602 = phi i32 [ 0, %._crit_edge596 ], [ %.2474, %322 ]
  %.0475601 = phi i32 [ 0, %._crit_edge596 ], [ %.2477, %322 ]
  %.0478600 = phi i32 [ -3200, %._crit_edge596 ], [ %323, %322 ]
  %317 = sdiv i32 %.0478600, 32
  %318 = add nsw i32 %317, -2
  br label %325

319:                                              ; preds = %322
  %320 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %321 = mul nsw i32 %.2477, 5
  %.not561 = icmp sgt i32 %.2474, %321
  br i1 %.not561, label %345, label %343

322:                                              ; preds = %325
  %323 = add nsw i32 %.0478600, 52
  %324 = icmp slt i32 %.0478600, 948
  br i1 %324, label %.preheader, label %319, !llvm.loop !35

325:                                              ; preds = %.preheader, %325
  %.1473599 = phi i32 [ %.0472602, %.preheader ], [ %.2474, %325 ]
  %.1476598 = phi i32 [ %.0475601, %.preheader ], [ %.2477, %325 ]
  %.0479597 = phi i32 [ -4000, %.preheader ], [ %341, %325 ]
  %326 = sdiv i32 %.0479597, 16
  %327 = call { i64, i32 } @TPE_vec3(i32 noundef %.0479597, i32 noundef %.0478600, i32 noundef %326)
  %.fca.0.extract59 = extractvalue { i64, i32 } %327, 0
  %.fca.1.extract60 = extractvalue { i64, i32 } %327, 1
  %328 = call { i64, i32 } @envFunc(i64 %.fca.0.extract59, i32 %.fca.1.extract60, i32 noundef 300)
  %.fca.0.extract46 = extractvalue { i64, i32 } %328, 0
  %or.cond498 = icmp eq i64 %.fca.0.extract59, %.fca.0.extract46
  %.fca.1.extract47 = extractvalue { i64, i32 } %328, 1
  %329 = icmp eq i32 %.fca.1.extract60, %.fca.1.extract47
  %330 = select i1 %or.cond498, i1 %329, i1 false
  %331 = sdiv i32 %.0479597, 64
  %332 = add nsw i32 %331, 1
  %333 = call { i64, i32 } @TPE_vec3(i32 noundef %332, i32 noundef %318, i32 noundef 3)
  %.fca.0.extract36 = extractvalue { i64, i32 } %333, 0
  %.fca.1.extract37 = extractvalue { i64, i32 } %333, 1
  %334 = call { i64, i32 } @TPE_castEnvironmentRay(i64 %.fca.0.extract59, i32 %.fca.1.extract60, i64 %.fca.0.extract36, i32 %.fca.1.extract37, ptr noundef nonnull @envFunc, i32 noundef 30, i32 noundef 100, i32 noundef 32)
  %.fca.0.extract28 = extractvalue { i64, i32 } %334, 0
  %.fca.1.extract29 = extractvalue { i64, i32 } %334, 1
  %335 = call { i64, i32 } @envFunc(i64 %.fca.0.extract28, i32 %.fca.1.extract29, i32 noundef 300)
  %.fca.0.extract = extractvalue { i64, i32 } %335, 0
  %or.cond499 = icmp eq i64 %.fca.0.extract28, %.fca.0.extract
  %.fca.1.extract = extractvalue { i64, i32 } %335, 1
  %336 = icmp eq i32 %.fca.1.extract29, %.fca.1.extract
  %337 = select i1 %or.cond499, i1 %336, i1 false
  %338 = xor i1 %330, %337
  %339 = zext i1 %338 to i32
  %.2477 = add nsw i32 %.1476598, %339
  %not. = xor i1 %338, true
  %340 = zext i1 %not. to i32
  %.2474 = add nsw i32 %.1473599, %340
  %341 = add nsw i32 %.0479597, 40
  %342 = icmp slt i32 %.0479597, 2960
  br i1 %342, label %325, label %322, !llvm.loop !36

343:                                              ; preds = %319
  %344 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.thread

345:                                              ; preds = %319
  %346 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %347 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i32 noundef %.2474, i32 noundef %.2477)
  %348 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.27)
  br label %.thread

.thread:                                          ; preds = %30, %41, %52, %63, %343, %.thread554, %.loopexit640, %.thread534, %.thread530, %345, %198, %190, %182, %174, %166, %19
  %.20 = phi i32 [ 1, %.loopexit640 ], [ 1, %190 ], [ 1, %198 ], [ 1, %343 ], [ 0, %345 ], [ 1, %182 ], [ 1, %174 ], [ 1, %166 ], [ 1, %19 ], [ 1, %.thread530 ], [ 1, %.thread534 ], [ 1, %.thread554 ], [ 1, %63 ], [ 1, %52 ], [ 1, %41 ], [ 1, %30 ]
  ret i32 %.20
}

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { nofree 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 = { 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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 6, !10, i64 18, i64 1, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!12, !8, i64 0}
!12 = !{!"", !8, i64 0, !8, i64 1, !13, i64 2}
!13 = !{!"short", !8, i64 0}
!14 = !{!12, !8, i64 1}
!15 = !{!12, !13, i64 2}
!16 = !{!17, !8, i64 32}
!17 = !{!"", !18, i64 0, !8, i64 8, !18, i64 16, !8, i64 24, !13, i64 26, !13, i64 28, !13, i64 30, !8, i64 32, !8, i64 33}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!17, !8, i64 8}
!20 = !{i64 0, i64 8, !21, i64 8, i64 1, !10, i64 16, i64 8, !21, i64 24, i64 1, !10, i64 26, i64 2, !22, i64 28, i64 2, !22, i64 30, i64 2, !22, i64 32, i64 1, !10, i64 33, i64 1, !10}
!21 = !{!18, !18, i64 0}
!22 = !{!13, !13, i64 0}
!23 = !{!24, !13, i64 8}
!24 = !{!"", !18, i64 0, !13, i64 8, !18, i64 16, !18, i64 24}
!25 = !{!17, !13, i64 28}
!26 = !{!17, !13, i64 30}
!27 = !{!24, !18, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}
!34 = distinct !{!34, !29}
!35 = distinct !{!35, !29}
!36 = distinct !{!36, !29}


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