; LLVM IR from ETH3D/dataset-pipeline :: thirdparty/cork/cork/isct (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.otri = type { ptr, i32 }
%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, double, double, double, double, [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8] }
%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, double, double, double, double, double, 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 }

@plus1mod3 = external dso_local global [3 x i32], align 4
@minus1mod3 = external dso_local global [3 x i32], align 4
@.str.973 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.979 = external hidden unnamed_addr constant [37 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #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 @trimalloc(i32 noundef) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @boundingbox(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.otri, align 8
  %6 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.behavior, ptr %7, i32 0, i32 29
  %9 = load i32, ptr %8, align 4, !tbaa !9
  %10 = icmp ne i32 %9, 0
  br i1 %10, label %11, label %13

11:                                               ; preds = %2
  %12 = call i32 (ptr, ...) @printf(ptr noundef @.str.979)
  br label %13

13:                                               ; preds = %11, %2
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.mesh, ptr %14, i32 0, i32 14
  %16 = load double, ptr %15, align 8, !tbaa !13
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.mesh, ptr %17, i32 0, i32 13
  %19 = load double, ptr %18, align 8, !tbaa !18
  %20 = fsub double %16, %19
  store double %20, ptr %6, align 8, !tbaa !19
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.mesh, ptr %21, i32 0, i32 16
  %23 = load double, ptr %22, align 8, !tbaa !20
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mesh, ptr %24, i32 0, i32 15
  %26 = load double, ptr %25, align 8, !tbaa !21
  %27 = fsub double %23, %26
  %28 = load double, ptr %6, align 8, !tbaa !19
  %29 = fcmp ogt double %27, %28
  br i1 %29, label %30, label %38

30:                                               ; preds = %13
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.mesh, ptr %31, i32 0, i32 16
  %33 = load double, ptr %32, align 8, !tbaa !20
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.mesh, ptr %34, i32 0, i32 15
  %36 = load double, ptr %35, align 8, !tbaa !21
  %37 = fsub double %33, %36
  store double %37, ptr %6, align 8, !tbaa !19
  br label %38

38:                                               ; preds = %30, %13
  %39 = load double, ptr %6, align 8, !tbaa !19
  %40 = fcmp oeq double %39, 0.000000e+00
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  store double 1.000000e+00, ptr %6, align 8, !tbaa !19
  br label %42

42:                                               ; preds = %41, %38
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.mesh, ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds %struct.memorypool, ptr %44, i32 0, i32 7
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %47 = call ptr @trimalloc(i32 noundef %46)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.mesh, ptr %48, i32 0, i32 45
  store ptr %47, ptr %49, align 8, !tbaa !23
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.mesh, ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds %struct.memorypool, ptr %51, i32 0, i32 7
  %53 = load i32, ptr %52, align 4, !tbaa !22
  %54 = call ptr @trimalloc(i32 noundef %53)
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.mesh, ptr %55, i32 0, i32 46
  store ptr %54, ptr %56, align 8, !tbaa !24
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.mesh, ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds %struct.memorypool, ptr %58, i32 0, i32 7
  %60 = load i32, ptr %59, align 4, !tbaa !22
  %61 = call ptr @trimalloc(i32 noundef %60)
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.mesh, ptr %62, i32 0, i32 47
  store ptr %61, ptr %63, align 8, !tbaa !25
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.mesh, ptr %64, i32 0, i32 13
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = load double, ptr %6, align 8, !tbaa !19
  %68 = call double @llvm.fmuladd.f64(double -5.000000e+01, double %67, double %66)
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.mesh, ptr %69, i32 0, i32 45
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = getelementptr inbounds double, ptr %71, i64 0
  store double %68, ptr %72, align 8, !tbaa !19
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.mesh, ptr %73, i32 0, i32 15
  %75 = load double, ptr %74, align 8, !tbaa !21
  %76 = load double, ptr %6, align 8, !tbaa !19
  %77 = call double @llvm.fmuladd.f64(double -4.000000e+01, double %76, double %75)
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.mesh, ptr %78, i32 0, i32 45
  %80 = load ptr, ptr %79, align 8, !tbaa !23
  %81 = getelementptr inbounds double, ptr %80, i64 1
  store double %77, ptr %81, align 8, !tbaa !19
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.mesh, ptr %82, i32 0, i32 14
  %84 = load double, ptr %83, align 8, !tbaa !13
  %85 = load double, ptr %6, align 8, !tbaa !19
  %86 = call double @llvm.fmuladd.f64(double 5.000000e+01, double %85, double %84)
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.mesh, ptr %87, i32 0, i32 46
  %89 = load ptr, ptr %88, align 8, !tbaa !24
  %90 = getelementptr inbounds double, ptr %89, i64 0
  store double %86, ptr %90, align 8, !tbaa !19
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.mesh, ptr %91, i32 0, i32 15
  %93 = load double, ptr %92, align 8, !tbaa !21
  %94 = load double, ptr %6, align 8, !tbaa !19
  %95 = call double @llvm.fmuladd.f64(double -4.000000e+01, double %94, double %93)
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.mesh, ptr %96, i32 0, i32 46
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = getelementptr inbounds double, ptr %98, i64 1
  store double %95, ptr %99, align 8, !tbaa !19
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mesh, ptr %100, i32 0, i32 13
  %102 = load double, ptr %101, align 8, !tbaa !18
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.mesh, ptr %103, i32 0, i32 14
  %105 = load double, ptr %104, align 8, !tbaa !13
  %106 = fadd double %102, %105
  %107 = fmul double 5.000000e-01, %106
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.mesh, ptr %108, i32 0, i32 47
  %110 = load ptr, ptr %109, align 8, !tbaa !25
  %111 = getelementptr inbounds double, ptr %110, i64 0
  store double %107, ptr %111, align 8, !tbaa !19
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.mesh, ptr %112, i32 0, i32 16
  %114 = load double, ptr %113, align 8, !tbaa !20
  %115 = load double, ptr %6, align 8, !tbaa !19
  %116 = call double @llvm.fmuladd.f64(double 6.000000e+01, double %115, double %114)
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.mesh, ptr %117, i32 0, i32 47
  %119 = load ptr, ptr %118, align 8, !tbaa !25
  %120 = getelementptr inbounds double, ptr %119, i64 1
  store double %116, ptr %120, align 8, !tbaa !19
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  call void @maketriangle(ptr noundef %121, ptr noundef %122, ptr noundef %5)
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.mesh, ptr %123, i32 0, i32 45
  %125 = load ptr, ptr %124, align 8, !tbaa !23
  %126 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !26
  %128 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %129 = load i32, ptr %128, align 8, !tbaa !27
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !28
  %133 = add nsw i32 %132, 3
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds ptr, ptr %127, i64 %134
  store ptr %125, ptr %135, align 8, !tbaa !5
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.mesh, ptr %136, i32 0, i32 46
  %138 = load ptr, ptr %137, align 8, !tbaa !24
  %139 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !26
  %141 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %142 = load i32, ptr %141, align 8, !tbaa !27
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !28
  %146 = add nsw i32 %145, 3
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %140, i64 %147
  store ptr %138, ptr %148, align 8, !tbaa !5
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.mesh, ptr %149, i32 0, i32 47
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !26
  %154 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %155 = load i32, ptr %154, align 8, !tbaa !27
  %156 = add nsw i32 %155, 3
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds ptr, ptr %153, i64 %157
  store ptr %151, ptr %158, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !26
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.mesh, ptr %161, i32 0, i32 48
  %163 = load ptr, ptr %162, align 8, !tbaa !29
  %164 = getelementptr inbounds ptr, ptr %163, i64 0
  store ptr %160, ptr %164, align 8, !tbaa !5
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.behavior, ptr %165, i32 0, i32 29
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = icmp sgt i32 %167, 2
  br i1 %168, label %169, label %173

169:                                              ; preds = %42
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.973)
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  call void @printtriangle(ptr noundef %171, ptr noundef %172, ptr noundef %5)
  br label %173

173:                                              ; preds = %169, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  ret void
}

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

!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, !11, i64 116}
!10 = !{!"behavior", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !7, i64 168, !7, i64 2216, !7, i64 4264, !7, i64 6312, !7, i64 8360, !7, i64 10408, !7, i64 12456, !7, i64 14504, !7, i64 16552, !7, i64 18600, !7, i64 20648, !7, i64 22696}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 82648}
!14 = !{!"mesh", !15, i64 0, !15, i64 88, !15, i64 176, !15, i64 264, !15, i64 352, !15, i64 440, !15, i64 528, !15, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !11, i64 82624, !6, i64 82632, !12, i64 82640, !12, i64 82648, !12, i64 82656, !12, i64 82664, !12, i64 82672, !11, i64 82680, !11, i64 82684, !11, i64 82688, !11, i64 82692, !11, i64 82696, !11, i64 82700, !16, i64 82704, !11, i64 82712, !11, i64 82716, !11, i64 82720, !16, i64 82728, !11, i64 82736, !11, i64 82740, !11, i64 82744, !11, i64 82748, !11, i64 82752, !11, i64 82756, !11, i64 82760, !11, i64 82764, !11, i64 82768, !16, i64 82776, !16, i64 82784, !16, i64 82792, !16, i64 82800, !16, i64 82808, !16, i64 82816, !16, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !6, i64 82872, !6, i64 82880, !17, i64 82888}
!15 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !16, i64 64, !16, i64 72, !11, i64 80, !11, i64 84}
!16 = !{!"long", !7, i64 0}
!17 = !{!"otri", !6, i64 0, !11, i64 8}
!18 = !{!14, !12, i64 82640}
!19 = !{!12, !12, i64 0}
!20 = !{!14, !12, i64 82664}
!21 = !{!14, !12, i64 82656}
!22 = !{!14, !11, i64 228}
!23 = !{!14, !6, i64 82832}
!24 = !{!14, !6, i64 82840}
!25 = !{!14, !6, i64 82848}
!26 = !{!17, !6, i64 0}
!27 = !{!17, !11, i64 8}
!28 = !{!11, !11, i64 0}
!29 = !{!14, !6, i64 82856}


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

@plus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@minus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@.str.973 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.979 = external hidden unnamed_addr constant [37 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #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 @trimalloc(i32 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @boundingbox(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.otri, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %4 = getelementptr inbounds i8, ptr %1, i64 116
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %8, label %6

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.979)
  br label %8

8:                                                ; preds = %6, %2
  %9 = getelementptr inbounds i8, ptr %0, i64 82648
  %10 = load double, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %0, i64 82640
  %12 = load double, ptr %11, align 8, !tbaa !17
  %13 = fsub double %10, %12
  %14 = getelementptr inbounds i8, ptr %0, i64 82664
  %15 = load double, ptr %14, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %0, i64 82656
  %17 = load double, ptr %16, align 8, !tbaa !19
  %18 = fsub double %15, %17
  %19 = fcmp ogt double %18, %13
  %.0 = select i1 %19, double %18, double %13
  %20 = fcmp oeq double %.0, 0.000000e+00
  %.1 = select i1 %20, double 1.000000e+00, double %.0
  %21 = getelementptr inbounds i8, ptr %0, i64 228
  %22 = load i32, ptr %21, align 4, !tbaa !20
  %23 = tail call ptr @trimalloc(i32 noundef %22)
  %24 = getelementptr inbounds i8, ptr %0, i64 82832
  store ptr %23, ptr %24, align 8, !tbaa !21
  %25 = load i32, ptr %21, align 4, !tbaa !20
  %26 = tail call ptr @trimalloc(i32 noundef %25)
  %27 = getelementptr inbounds i8, ptr %0, i64 82840
  store ptr %26, ptr %27, align 8, !tbaa !22
  %28 = load i32, ptr %21, align 4, !tbaa !20
  %29 = tail call ptr @trimalloc(i32 noundef %28)
  %30 = getelementptr inbounds i8, ptr %0, i64 82848
  store ptr %29, ptr %30, align 8, !tbaa !23
  %31 = load double, ptr %11, align 8, !tbaa !17
  %32 = tail call double @llvm.fmuladd.f64(double %.1, double -5.000000e+01, double %31)
  %33 = load ptr, ptr %24, align 8, !tbaa !21
  store double %32, ptr %33, align 8, !tbaa !24
  %34 = load double, ptr %16, align 8, !tbaa !19
  %35 = tail call double @llvm.fmuladd.f64(double %.1, double -4.000000e+01, double %34)
  %36 = getelementptr inbounds i8, ptr %33, i64 8
  store double %35, ptr %36, align 8, !tbaa !24
  %37 = load double, ptr %9, align 8, !tbaa !11
  %38 = tail call double @llvm.fmuladd.f64(double %.1, double 5.000000e+01, double %37)
  %39 = load ptr, ptr %27, align 8, !tbaa !22
  store double %38, ptr %39, align 8, !tbaa !24
  %40 = load double, ptr %16, align 8, !tbaa !19
  %41 = tail call double @llvm.fmuladd.f64(double %.1, double -4.000000e+01, double %40)
  %42 = getelementptr inbounds i8, ptr %39, i64 8
  store double %41, ptr %42, align 8, !tbaa !24
  %43 = load double, ptr %11, align 8, !tbaa !17
  %44 = load double, ptr %9, align 8, !tbaa !11
  %45 = fadd double %43, %44
  %46 = fmul double %45, 5.000000e-01
  store double %46, ptr %29, align 8, !tbaa !24
  %47 = load double, ptr %14, align 8, !tbaa !18
  %48 = tail call double @llvm.fmuladd.f64(double %.1, double 6.000000e+01, double %47)
  %49 = getelementptr inbounds i8, ptr %29, i64 8
  store double %48, ptr %49, align 8, !tbaa !24
  call void @maketriangle(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %3)
  %50 = load ptr, ptr %24, align 8, !tbaa !21
  %51 = load ptr, ptr %3, align 8, !tbaa !25
  %52 = getelementptr inbounds i8, ptr %3, i64 8
  %53 = load i32, ptr %52, align 8, !tbaa !26
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !27
  %57 = sext i32 %56 to i64
  %58 = getelementptr ptr, ptr %51, i64 %57
  %59 = getelementptr i8, ptr %58, i64 24
  store ptr %50, ptr %59, align 8, !tbaa !28
  %60 = load ptr, ptr %27, align 8, !tbaa !22
  %61 = load ptr, ptr %3, align 8, !tbaa !25
  %62 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %54
  %63 = load i32, ptr %62, align 4, !tbaa !27
  %64 = sext i32 %63 to i64
  %65 = getelementptr ptr, ptr %61, i64 %64
  %66 = getelementptr i8, ptr %65, i64 24
  store ptr %60, ptr %66, align 8, !tbaa !28
  %67 = load ptr, ptr %30, align 8, !tbaa !23
  %68 = load ptr, ptr %3, align 8, !tbaa !25
  %69 = getelementptr ptr, ptr %68, i64 %54
  %70 = getelementptr i8, ptr %69, i64 24
  store ptr %67, ptr %70, align 8, !tbaa !28
  %71 = load ptr, ptr %3, align 8, !tbaa !25
  %72 = getelementptr inbounds i8, ptr %0, i64 82856
  %73 = load ptr, ptr %72, align 8, !tbaa !29
  store ptr %71, ptr %73, align 8, !tbaa !28
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 2
  br i1 %75, label %76, label %78

76:                                               ; preds = %8
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.973)
  call void @printtriangle(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %3)
  br label %78

78:                                               ; preds = %76, %8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #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 116}
!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 144, !10, i64 152, !10, i64 160, !8, i64 168, !8, i64 2216, !8, i64 4264, !8, i64 6312, !8, i64 8360, !8, i64 10408, !8, i64 12456, !8, i64 14504, !8, i64 16552, !8, i64 18600, !8, i64 20648, !8, i64 22696}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!12, !10, i64 82648}
!12 = !{!"mesh", !13, i64 0, !13, i64 88, !13, i64 176, !13, i64 264, !13, i64 352, !13, i64 440, !13, i64 528, !13, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !7, i64 82624, !14, i64 82632, !10, i64 82640, !10, i64 82648, !10, i64 82656, !10, i64 82664, !10, i64 82672, !7, i64 82680, !7, i64 82684, !7, i64 82688, !7, i64 82692, !7, i64 82696, !7, i64 82700, !15, i64 82704, !7, i64 82712, !7, i64 82716, !7, i64 82720, !15, i64 82728, !7, i64 82736, !7, i64 82740, !7, i64 82744, !7, i64 82748, !7, i64 82752, !7, i64 82756, !7, i64 82760, !7, i64 82764, !7, i64 82768, !15, i64 82776, !15, i64 82784, !15, i64 82792, !15, i64 82800, !15, i64 82808, !15, i64 82816, !15, i64 82824, !14, i64 82832, !14, i64 82840, !14, i64 82848, !14, i64 82856, !14, i64 82864, !14, i64 82872, !14, i64 82880, !16, i64 82888}
!13 = !{!"memorypool", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !15, i64 64, !15, i64 72, !7, i64 80, !7, i64 84}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"otri", !14, i64 0, !7, i64 8}
!17 = !{!12, !10, i64 82640}
!18 = !{!12, !10, i64 82664}
!19 = !{!12, !10, i64 82656}
!20 = !{!12, !7, i64 228}
!21 = !{!12, !14, i64 82832}
!22 = !{!12, !14, i64 82840}
!23 = !{!12, !14, i64 82848}
!24 = !{!10, !10, i64 0}
!25 = !{!16, !14, i64 0}
!26 = !{!16, !7, i64 8}
!27 = !{!7, !7, i64 0}
!28 = !{!14, !14, i64 0}
!29 = !{!12, !14, i64 82856}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass