; LLVM IR from MIT-SPARK/Kimera-VIO :: third_party/triangle/src (triangle)

; 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.behavior = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float }
%struct.mesh = type { %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, [4096 x ptr], [4096 x ptr], [4096 x i32], i32, ptr, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.otri }
%struct.memorypool = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i64, i64, i32, i32 }
%struct.otri = type { ptr, i32 }

@.str.82 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [40 x i8], align 1

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

declare i32 @printf(ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @getvertex(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @makevertexmap(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @markhull(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @formskeleton(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca [6 x i8], align 1
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 6, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.behavior, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %201

25:                                               ; preds = %5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.behavior, ptr %26, i32 0, i32 28
  %28 = load i32, ptr %27, align 4, !tbaa !14
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %32, label %30

30:                                               ; preds = %25
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.82)
  br label %32

32:                                               ; preds = %30, %25
  %33 = getelementptr inbounds [6 x i8], ptr %11, i64 0, i64 0
  %34 = call ptr @strcpy(ptr noundef %33, ptr noundef @.str.83) #4
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.mesh, ptr %36, i32 0, i32 20
  store i32 %35, ptr %37, align 4, !tbaa !15
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  %40 = zext i1 %39 to i32
  store i32 %40, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.mesh, ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds %struct.memorypool, ptr %42, i32 0, i32 10
  %44 = load i64, ptr %43, align 8, !tbaa !20
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %32
  store i32 1, ptr %20, align 4
  br label %225

47:                                               ; preds = %32
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.mesh, ptr %48, i32 0, i32 20
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %52, label %62

52:                                               ; preds = %47
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  call void @makevertexmap(ptr noundef %53, ptr noundef %54)
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.behavior, ptr %55, i32 0, i32 29
  %57 = load i32, ptr %56, align 4, !tbaa !21
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %52
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.84)
  br label %61

61:                                               ; preds = %59, %52
  br label %62

62:                                               ; preds = %61, %47
  store i32 0, ptr %18, align 4, !tbaa !9
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %197, %62
  %64 = load i32, ptr %19, align 4, !tbaa !9
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.mesh, ptr %65, i32 0, i32 20
  %67 = load i32, ptr %66, align 4, !tbaa !15
  %68 = icmp slt i32 %64, %67
  br i1 %68, label %69, label %200

69:                                               ; preds = %63
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %12, align 4, !tbaa !9
  %73 = sext i32 %71 to i64
  %74 = getelementptr inbounds i32, ptr %70, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !9
  store i32 %75, ptr %16, align 4, !tbaa !9
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %12, align 4, !tbaa !9
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds i32, ptr %76, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !9
  store i32 %81, ptr %17, align 4, !tbaa !9
  %82 = load i32, ptr %15, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %90

84:                                               ; preds = %69
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = load i32, ptr %19, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %85, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  store i32 %89, ptr %18, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %84, %69
  %91 = load i32, ptr %16, align 4, !tbaa !9
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.behavior, ptr %92, i32 0, i32 10
  %94 = load i32, ptr %93, align 4, !tbaa !22
  %95 = icmp slt i32 %91, %94
  br i1 %95, label %106, label %96

96:                                               ; preds = %90
  %97 = load i32, ptr %16, align 4, !tbaa !9
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.behavior, ptr %98, i32 0, i32 10
  %100 = load i32, ptr %99, align 4, !tbaa !22
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.mesh, ptr %101, i32 0, i32 18
  %103 = load i32, ptr %102, align 4, !tbaa !23
  %104 = add nsw i32 %100, %103
  %105 = icmp sge i32 %97, %104
  br i1 %105, label %106, label %120

106:                                              ; preds = %96, %90
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.behavior, ptr %107, i32 0, i32 28
  %109 = load i32, ptr %108, align 4, !tbaa !14
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %119, label %111

111:                                              ; preds = %106
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.behavior, ptr %112, i32 0, i32 10
  %114 = load i32, ptr %113, align 4, !tbaa !22
  %115 = load i32, ptr %19, align 4, !tbaa !9
  %116 = add nsw i32 %114, %115
  %117 = getelementptr inbounds [6 x i8], ptr %11, i64 0, i64 0
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.85, i32 noundef %116, ptr noundef %117)
  br label %119

119:                                              ; preds = %111, %106
  br label %196

120:                                              ; preds = %96
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.behavior, ptr %122, i32 0, i32 10
  %124 = load i32, ptr %123, align 4, !tbaa !22
  %125 = icmp slt i32 %121, %124
  br i1 %125, label %136, label %126

126:                                              ; preds = %120
  %127 = load i32, ptr %17, align 4, !tbaa !9
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.behavior, ptr %128, i32 0, i32 10
  %130 = load i32, ptr %129, align 4, !tbaa !22
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.mesh, ptr %131, i32 0, i32 18
  %133 = load i32, ptr %132, align 4, !tbaa !23
  %134 = add nsw i32 %130, %133
  %135 = icmp sge i32 %127, %134
  br i1 %135, label %136, label %150

136:                                              ; preds = %126, %120
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.behavior, ptr %137, i32 0, i32 28
  %139 = load i32, ptr %138, align 4, !tbaa !14
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %149, label %141

141:                                              ; preds = %136
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.behavior, ptr %142, i32 0, i32 10
  %144 = load i32, ptr %143, align 4, !tbaa !22
  %145 = load i32, ptr %19, align 4, !tbaa !9
  %146 = add nsw i32 %144, %145
  %147 = getelementptr inbounds [6 x i8], ptr %11, i64 0, i64 0
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.86, i32 noundef %146, ptr noundef %147)
  br label %149

149:                                              ; preds = %141, %136
  br label %195

150:                                              ; preds = %126
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load i32, ptr %16, align 4, !tbaa !9
  %154 = call ptr @getvertex(ptr noundef %151, ptr noundef %152, i32 noundef %153)
  store ptr %154, ptr %13, align 8, !tbaa !5
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = call ptr @getvertex(ptr noundef %155, ptr noundef %156, i32 noundef %157)
  store ptr %158, ptr %14, align 8, !tbaa !5
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = getelementptr inbounds float, ptr %159, i64 0
  %161 = load float, ptr %160, align 4, !tbaa !24
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  %163 = getelementptr inbounds float, ptr %162, i64 0
  %164 = load float, ptr %163, align 4, !tbaa !24
  %165 = fcmp oeq float %161, %164
  br i1 %165, label %166, label %188

166:                                              ; preds = %150
  %167 = load ptr, ptr %13, align 8, !tbaa !5
  %168 = getelementptr inbounds float, ptr %167, i64 1
  %169 = load float, ptr %168, align 4, !tbaa !24
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  %171 = getelementptr inbounds float, ptr %170, i64 1
  %172 = load float, ptr %171, align 4, !tbaa !24
  %173 = fcmp oeq float %169, %172
  br i1 %173, label %174, label %188

174:                                              ; preds = %166
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.behavior, ptr %175, i32 0, i32 28
  %177 = load i32, ptr %176, align 4, !tbaa !14
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %187, label %179

179:                                              ; preds = %174
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.behavior, ptr %180, i32 0, i32 10
  %182 = load i32, ptr %181, align 4, !tbaa !22
  %183 = load i32, ptr %19, align 4, !tbaa !9
  %184 = add nsw i32 %182, %183
  %185 = getelementptr inbounds [6 x i8], ptr %11, i64 0, i64 0
  %186 = call i32 (ptr, ...) @printf(ptr noundef @.str.87, i32 noundef %184, ptr noundef %185)
  br label %187

187:                                              ; preds = %179, %174
  br label %194

188:                                              ; preds = %166, %150
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = load ptr, ptr %13, align 8, !tbaa !5
  %192 = load ptr, ptr %14, align 8, !tbaa !5
  %193 = load i32, ptr %18, align 4, !tbaa !9
  call void @insertsegment(ptr noundef %189, ptr noundef %190, ptr noundef %191, ptr noundef %192, i32 noundef %193)
  br label %194

194:                                              ; preds = %188, %187
  br label %195

195:                                              ; preds = %194, %149
  br label %196

196:                                              ; preds = %195, %119
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %19, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %19, align 4, !tbaa !9
  br label %63, !llvm.loop !25

200:                                              ; preds = %63
  br label %204

201:                                              ; preds = %5
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.mesh, ptr %202, i32 0, i32 20
  store i32 0, ptr %203, align 4, !tbaa !15
  br label %204

204:                                              ; preds = %201, %200
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.behavior, ptr %205, i32 0, i32 7
  %207 = load i32, ptr %206, align 4, !tbaa !27
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %214, label %209

209:                                              ; preds = %204
  %210 = load ptr, ptr %7, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.behavior, ptr %210, i32 0, i32 0
  %212 = load i32, ptr %211, align 4, !tbaa !11
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %224, label %214

214:                                              ; preds = %209, %204
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.behavior, ptr %215, i32 0, i32 29
  %217 = load i32, ptr %216, align 4, !tbaa !21
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %219, label %221

219:                                              ; preds = %214
  %220 = call i32 (ptr, ...) @printf(ptr noundef @.str.88)
  br label %221

221:                                              ; preds = %219, %214
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  call void @markhull(ptr noundef %222, ptr noundef %223)
  br label %224

224:                                              ; preds = %221, %209
  store i32 0, ptr %20, align 4
  br label %225

225:                                              ; preds = %224, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 6, ptr %11) #4
  %226 = load i32, ptr %20, align 4
  switch i32 %226, label %228 [
    i32 0, label %227
    i32 1, label %227
  ]

227:                                              ; preds = %225, %225
  ret void

228:                                              ; preds = %225
  unreachable
}

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"behavior", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !10, i64 112}
!15 = !{!16, !10, i64 82668}
!16 = !{!"mesh", !17, i64 0, !17, i64 88, !17, i64 176, !17, i64 264, !17, i64 352, !17, i64 440, !17, i64 528, !17, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !10, i64 82624, !6, i64 82632, !13, i64 82640, !13, i64 82644, !13, i64 82648, !13, i64 82652, !13, i64 82656, !10, i64 82660, !10, i64 82664, !10, i64 82668, !10, i64 82672, !10, i64 82676, !10, i64 82680, !18, i64 82688, !10, i64 82696, !10, i64 82700, !10, i64 82704, !18, i64 82712, !10, i64 82720, !10, i64 82724, !10, i64 82728, !10, i64 82732, !10, i64 82736, !10, i64 82740, !10, i64 82744, !10, i64 82748, !10, i64 82752, !18, i64 82760, !18, i64 82768, !18, i64 82776, !18, i64 82784, !18, i64 82792, !18, i64 82800, !18, i64 82808, !6, i64 82816, !6, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !19, i64 82872}
!17 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !18, i64 64, !18, i64 72, !10, i64 80, !10, i64 84}
!18 = !{!"long", !7, i64 0}
!19 = !{!"otri", !6, i64 0, !10, i64 8}
!20 = !{!16, !18, i64 64}
!21 = !{!12, !10, i64 116}
!22 = !{!12, !10, i64 40}
!23 = !{!16, !10, i64 82660}
!24 = !{!13, !13, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !10, i64 28}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.82 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [40 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @getvertex(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @makevertexmap(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @markhull(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @formskeleton(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef readonly %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = alloca [6 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %6) #4
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %84, label %8

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %1, i64 112
  %10 = load i32, ptr %9, align 4, !tbaa !11
  %.not66 = icmp eq i32 %10, 0
  br i1 %.not66, label %11, label %13

11:                                               ; preds = %8
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.82)
  br label %13

13:                                               ; preds = %11, %8
  %14 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.83) #4
  %15 = getelementptr inbounds i8, ptr %0, i64 82668
  store i32 %4, ptr %15, align 4, !tbaa !12
  %.not67 = icmp eq ptr %3, null
  %16 = getelementptr inbounds i8, ptr %0, i64 64
  %17 = load i64, ptr %16, align 8, !tbaa !18
  %18 = icmp eq i64 %17, 0
  br i1 %18, label %96, label %19

19:                                               ; preds = %13
  %20 = icmp sgt i32 %4, 0
  br i1 %20, label %21, label %26

21:                                               ; preds = %19
  call void @makevertexmap(ptr noundef nonnull %0, ptr noundef nonnull %1)
  %22 = getelementptr inbounds i8, ptr %1, i64 116
  %23 = load i32, ptr %22, align 4, !tbaa !19
  %.not68 = icmp eq i32 %23, 0
  br i1 %.not68, label %26, label %24

24:                                               ; preds = %21
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.84)
  br label %26

26:                                               ; preds = %21, %24, %19
  %27 = load i32, ptr %15, align 4, !tbaa !12
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %26
  %29 = getelementptr inbounds i8, ptr %1, i64 40
  %30 = getelementptr inbounds i8, ptr %0, i64 82660
  br label %31

31:                                               ; preds = %.lr.ph, %80
  %indvars.iv80 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next81, %80 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %80 ]
  %.05978 = phi i32 [ 0, %.lr.ph ], [ %.1, %80 ]
  %32 = or disjoint i64 %indvars.iv80, 1
  %33 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv80
  %34 = load i32, ptr %33, align 4, !tbaa !20
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 2
  %35 = getelementptr inbounds i32, ptr %2, i64 %32
  %36 = load i32, ptr %35, align 4, !tbaa !20
  br i1 %.not67, label %40, label %37

37:                                               ; preds = %31
  %38 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv
  %39 = load i32, ptr %38, align 4, !tbaa !20
  br label %40

40:                                               ; preds = %37, %31
  %.1 = phi i32 [ %39, %37 ], [ %.05978, %31 ]
  %41 = load i32, ptr %29, align 4, !tbaa !21
  %42 = icmp slt i32 %34, %41
  br i1 %42, label %46, label %43

43:                                               ; preds = %40
  %44 = load i32, ptr %30, align 4, !tbaa !22
  %45 = add nsw i32 %44, %41
  %.not72 = icmp slt i32 %34, %45
  br i1 %.not72, label %52, label %46

46:                                               ; preds = %43, %40
  %47 = load i32, ptr %9, align 4, !tbaa !11
  %.not76 = icmp eq i32 %47, 0
  br i1 %.not76, label %48, label %80

48:                                               ; preds = %46
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  %50 = add nsw i32 %41, %49
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.85, i32 noundef %50, ptr noundef nonnull %6)
  br label %80

52:                                               ; preds = %43
  %53 = icmp sge i32 %36, %41
  %.not73 = icmp slt i32 %36, %45
  %or.cond = and i1 %53, %.not73
  br i1 %or.cond, label %60, label %54

54:                                               ; preds = %52
  %55 = load i32, ptr %9, align 4, !tbaa !11
  %.not75 = icmp eq i32 %55, 0
  br i1 %.not75, label %56, label %80

56:                                               ; preds = %54
  %57 = trunc nuw nsw i64 %indvars.iv to i32
  %58 = add nsw i32 %41, %57
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.86, i32 noundef %58, ptr noundef nonnull %6)
  br label %80

60:                                               ; preds = %52
  %61 = call ptr @getvertex(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %34)
  %62 = call ptr @getvertex(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %36)
  %63 = load float, ptr %61, align 4, !tbaa !23
  %64 = load float, ptr %62, align 4, !tbaa !23
  %65 = fcmp oeq float %63, %64
  br i1 %65, label %66, label %79

66:                                               ; preds = %60
  %67 = getelementptr inbounds i8, ptr %61, i64 4
  %68 = load float, ptr %67, align 4, !tbaa !23
  %69 = getelementptr inbounds i8, ptr %62, i64 4
  %70 = load float, ptr %69, align 4, !tbaa !23
  %71 = fcmp oeq float %68, %70
  br i1 %71, label %72, label %79

72:                                               ; preds = %66
  %73 = load i32, ptr %9, align 4, !tbaa !11
  %.not74 = icmp eq i32 %73, 0
  br i1 %.not74, label %74, label %80

74:                                               ; preds = %72
  %75 = load i32, ptr %29, align 4, !tbaa !21
  %76 = trunc nuw nsw i64 %indvars.iv to i32
  %77 = add nsw i32 %75, %76
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.87, i32 noundef %77, ptr noundef nonnull %6)
  br label %80

79:                                               ; preds = %66, %60
  call void @insertsegment(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %61, ptr noundef nonnull %62, i32 noundef %.1)
  br label %80

80:                                               ; preds = %48, %46, %79, %74, %72, %54, %56
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %81 = load i32, ptr %15, align 4, !tbaa !12
  %82 = sext i32 %81 to i64
  %83 = icmp slt i64 %indvars.iv.next, %82
  br i1 %83, label %31, label %.loopexit, !llvm.loop !24

84:                                               ; preds = %5
  %85 = getelementptr inbounds i8, ptr %0, i64 82668
  store i32 0, ptr %85, align 4, !tbaa !12
  br label %.loopexit

.loopexit:                                        ; preds = %80, %26, %84
  %86 = getelementptr inbounds i8, ptr %1, i64 28
  %87 = load i32, ptr %86, align 4, !tbaa !26
  %.not69 = icmp eq i32 %87, 0
  br i1 %.not69, label %88, label %90

88:                                               ; preds = %.loopexit
  %89 = load i32, ptr %1, align 4, !tbaa !5
  %.not70 = icmp eq i32 %89, 0
  br i1 %.not70, label %90, label %96

90:                                               ; preds = %88, %.loopexit
  %91 = getelementptr inbounds i8, ptr %1, i64 116
  %92 = load i32, ptr %91, align 4, !tbaa !19
  %.not71 = icmp eq i32 %92, 0
  br i1 %.not71, label %95, label %93

93:                                               ; preds = %90
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.88)
  br label %95

95:                                               ; preds = %93, %90
  call void @markhull(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %96

96:                                               ; preds = %88, %95, %13
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %6) #4
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"behavior", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!6, !7, i64 112}
!12 = !{!13, !7, i64 82668}
!13 = !{!"mesh", !14, i64 0, !14, i64 88, !14, i64 176, !14, i64 264, !14, i64 352, !14, i64 440, !14, i64 528, !14, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !7, i64 82624, !15, i64 82632, !10, i64 82640, !10, i64 82644, !10, i64 82648, !10, i64 82652, !10, i64 82656, !7, i64 82660, !7, i64 82664, !7, i64 82668, !7, i64 82672, !7, i64 82676, !7, i64 82680, !16, i64 82688, !7, i64 82696, !7, i64 82700, !7, i64 82704, !16, i64 82712, !7, i64 82720, !7, i64 82724, !7, i64 82728, !7, i64 82732, !7, i64 82736, !7, i64 82740, !7, i64 82744, !7, i64 82748, !7, i64 82752, !16, i64 82760, !16, i64 82768, !16, i64 82776, !16, i64 82784, !16, i64 82792, !16, i64 82800, !16, i64 82808, !15, i64 82816, !15, i64 82824, !15, i64 82832, !15, i64 82840, !15, i64 82848, !15, i64 82856, !15, i64 82864, !17, i64 82872}
!14 = !{!"memorypool", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !16, i64 64, !16, i64 72, !7, i64 80, !7, i64 84}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!"otri", !15, i64 0, !7, i64 8}
!18 = !{!13, !16, i64 64}
!19 = !{!6, !7, i64 116}
!20 = !{!7, !7, i64 0}
!21 = !{!6, !7, i64 40}
!22 = !{!13, !7, i64 82660}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!6, !7, i64 28}


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