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

@.str.943 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.944 = external hidden unnamed_addr constant [50 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

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

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

18:                                               ; preds = %3
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str.943)
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.badtriang, ptr %20, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = getelementptr inbounds double, ptr %22, i64 0
  %24 = load double, ptr %23, align 8, !tbaa !15
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.badtriang, ptr %25, i32 0, i32 2
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds double, ptr %27, i64 1
  %29 = load double, ptr %28, align 8, !tbaa !15
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.badtriang, ptr %30, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = getelementptr inbounds double, ptr %32, i64 0
  %34 = load double, ptr %33, align 8, !tbaa !15
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.badtriang, ptr %35, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = getelementptr inbounds double, ptr %37, i64 1
  %39 = load double, ptr %38, align 8, !tbaa !15
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.badtriang, ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = getelementptr inbounds double, ptr %42, i64 0
  %44 = load double, ptr %43, align 8, !tbaa !15
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.badtriang, ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !17
  %48 = getelementptr inbounds double, ptr %47, i64 1
  %49 = load double, ptr %48, align 8, !tbaa !15
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.944, double noundef %24, double noundef %29, double noundef %34, double noundef %39, double noundef %44, double noundef %49)
  br label %51

51:                                               ; preds = %18, %3
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.badtriang, ptr %52, i32 0, i32 1
  %54 = load double, ptr %53, align 8, !tbaa !18
  %55 = fcmp oge double %54, 1.000000e+00
  br i1 %55, label %56, label %60

56:                                               ; preds = %51
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.badtriang, ptr %57, i32 0, i32 1
  %59 = load double, ptr %58, align 8, !tbaa !18
  store double %59, ptr %7, align 8, !tbaa !15
  store i32 1, ptr %12, align 4, !tbaa !19
  br label %65

60:                                               ; preds = %51
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.badtriang, ptr %61, i32 0, i32 1
  %63 = load double, ptr %62, align 8, !tbaa !18
  %64 = fdiv double 1.000000e+00, %63
  store double %64, ptr %7, align 8, !tbaa !15
  store i32 0, ptr %12, align 4, !tbaa !19
  br label %65

65:                                               ; preds = %60, %56
  store i32 0, ptr %9, align 4, !tbaa !19
  br label %66

66:                                               ; preds = %83, %65
  %67 = load double, ptr %7, align 8, !tbaa !15
  %68 = fcmp ogt double %67, 2.000000e+00
  br i1 %68, label %69, label %90

69:                                               ; preds = %66
  store i32 1, ptr %10, align 4, !tbaa !19
  store double 5.000000e-01, ptr %8, align 8, !tbaa !15
  br label %70

70:                                               ; preds = %77, %69
  %71 = load double, ptr %7, align 8, !tbaa !15
  %72 = load double, ptr %8, align 8, !tbaa !15
  %73 = fmul double %71, %72
  %74 = load double, ptr %8, align 8, !tbaa !15
  %75 = fmul double %73, %74
  %76 = fcmp ogt double %75, 1.000000e+00
  br i1 %76, label %77, label %83

77:                                               ; preds = %70
  %78 = load i32, ptr %10, align 4, !tbaa !19
  %79 = mul nsw i32 %78, 2
  store i32 %79, ptr %10, align 4, !tbaa !19
  %80 = load double, ptr %8, align 8, !tbaa !15
  %81 = load double, ptr %8, align 8, !tbaa !15
  %82 = fmul double %81, %80
  store double %82, ptr %8, align 8, !tbaa !15
  br label %70, !llvm.loop !20

83:                                               ; preds = %70
  %84 = load i32, ptr %10, align 4, !tbaa !19
  %85 = load i32, ptr %9, align 4, !tbaa !19
  %86 = add nsw i32 %85, %84
  store i32 %86, ptr %9, align 4, !tbaa !19
  %87 = load double, ptr %8, align 8, !tbaa !15
  %88 = load double, ptr %7, align 8, !tbaa !15
  %89 = fmul double %88, %87
  store double %89, ptr %7, align 8, !tbaa !15
  br label %66, !llvm.loop !22

90:                                               ; preds = %66
  %91 = load i32, ptr %9, align 4, !tbaa !19
  %92 = sitofp i32 %91 to double
  %93 = load double, ptr %7, align 8, !tbaa !15
  %94 = fcmp ogt double %93, 0x3FF6A09E667F3BCD
  %95 = zext i1 %94 to i32
  %96 = sitofp i32 %95 to double
  %97 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %92, double %96)
  %98 = fptosi double %97 to i32
  store i32 %98, ptr %9, align 4, !tbaa !19
  %99 = load i32, ptr %12, align 4, !tbaa !19
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %104

101:                                              ; preds = %90
  %102 = load i32, ptr %9, align 4, !tbaa !19
  %103 = sub nsw i32 2047, %102
  store i32 %103, ptr %11, align 4, !tbaa !19
  br label %107

104:                                              ; preds = %90
  %105 = load i32, ptr %9, align 4, !tbaa !19
  %106 = add nsw i32 2048, %105
  store i32 %106, ptr %11, align 4, !tbaa !19
  br label %107

107:                                              ; preds = %104, %101
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.mesh, ptr %108, i32 0, i32 8
  %110 = load i32, ptr %11, align 4, !tbaa !19
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [4096 x ptr], ptr %109, i64 0, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = icmp eq ptr %113, null
  br i1 %114, label %115, label %172

115:                                              ; preds = %107
  %116 = load i32, ptr %11, align 4, !tbaa !19
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.mesh, ptr %117, i32 0, i32 11
  %119 = load i32, ptr %118, align 8, !tbaa !23
  %120 = icmp sgt i32 %116, %119
  br i1 %120, label %121, label %133

121:                                              ; preds = %115
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.mesh, ptr %122, i32 0, i32 11
  %124 = load i32, ptr %123, align 8, !tbaa !23
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.mesh, ptr %125, i32 0, i32 10
  %127 = load i32, ptr %11, align 4, !tbaa !19
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [4096 x i32], ptr %126, i64 0, i64 %128
  store i32 %124, ptr %129, align 4, !tbaa !19
  %130 = load i32, ptr %11, align 4, !tbaa !19
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.mesh, ptr %131, i32 0, i32 11
  store i32 %130, ptr %132, align 8, !tbaa !23
  br label %165

133:                                              ; preds = %115
  %134 = load i32, ptr %11, align 4, !tbaa !19
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %13, align 4, !tbaa !19
  br label %136

136:                                              ; preds = %144, %133
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.mesh, ptr %137, i32 0, i32 8
  %139 = load i32, ptr %13, align 4, !tbaa !19
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [4096 x ptr], ptr %138, i64 0, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %147

144:                                              ; preds = %136
  %145 = load i32, ptr %13, align 4, !tbaa !19
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %13, align 4, !tbaa !19
  br label %136, !llvm.loop !28

147:                                              ; preds = %136
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.mesh, ptr %148, i32 0, i32 10
  %150 = load i32, ptr %13, align 4, !tbaa !19
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [4096 x i32], ptr %149, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !19
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.mesh, ptr %154, i32 0, i32 10
  %156 = load i32, ptr %11, align 4, !tbaa !19
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [4096 x i32], ptr %155, i64 0, i64 %157
  store i32 %153, ptr %158, align 4, !tbaa !19
  %159 = load i32, ptr %11, align 4, !tbaa !19
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.mesh, ptr %160, i32 0, i32 10
  %162 = load i32, ptr %13, align 4, !tbaa !19
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [4096 x i32], ptr %161, i64 0, i64 %163
  store i32 %159, ptr %164, align 4, !tbaa !19
  br label %165

165:                                              ; preds = %147, %121
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.mesh, ptr %167, i32 0, i32 8
  %169 = load i32, ptr %11, align 4, !tbaa !19
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [4096 x ptr], ptr %168, i64 0, i64 %170
  store ptr %166, ptr %171, align 8, !tbaa !5
  br label %181

172:                                              ; preds = %107
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.mesh, ptr %174, i32 0, i32 9
  %176 = load i32, ptr %11, align 4, !tbaa !19
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [4096 x ptr], ptr %175, i64 0, i64 %177
  %179 = load ptr, ptr %178, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.badtriang, ptr %179, i32 0, i32 5
  store ptr %173, ptr %180, align 8, !tbaa !29
  br label %181

181:                                              ; preds = %172, %165
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.mesh, ptr %183, i32 0, i32 9
  %185 = load i32, ptr %11, align 4, !tbaa !19
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [4096 x ptr], ptr %184, i64 0, i64 %186
  store ptr %182, ptr %187, align 8, !tbaa !5
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.badtriang, ptr %188, i32 0, i32 5
  store ptr null, ptr %189, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #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 = { "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 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 = { 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, !6, i64 16}
!14 = !{!"badtriang", !6, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!15 = !{!12, !12, i64 0}
!16 = !{!14, !6, i64 24}
!17 = !{!14, !6, i64 32}
!18 = !{!14, !12, i64 8}
!19 = !{!11, !11, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!24, !11, i64 82624}
!24 = !{!"mesh", !25, i64 0, !25, i64 88, !25, i64 176, !25, i64 264, !25, i64 352, !25, i64 440, !25, i64 528, !25, 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, !26, i64 82704, !11, i64 82712, !11, i64 82716, !11, i64 82720, !26, 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, !26, i64 82776, !26, i64 82784, !26, i64 82792, !26, i64 82800, !26, i64 82808, !26, i64 82816, !26, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !6, i64 82872, !6, i64 82880, !27, i64 82888}
!25 = !{!"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, !26, i64 64, !26, i64 72, !11, i64 80, !11, i64 84}
!26 = !{!"long", !7, i64 0}
!27 = !{!"otri", !6, i64 0, !11, i64 8}
!28 = distinct !{!28, !21}
!29 = !{!14, !6, i64 40}


; 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.943 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.944 = external hidden unnamed_addr constant [50 x i8], align 1

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

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @enqueuebadtriang(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %1, i64 116
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 2
  br i1 %6, label %7, label %25

7:                                                ; preds = %3
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.943)
  %9 = getelementptr inbounds i8, ptr %2, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = load double, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %10, i64 8
  %13 = load double, ptr %12, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %2, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = load double, ptr %15, align 8, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %15, i64 8
  %18 = load double, ptr %17, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %2, i64 32
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = load double, ptr %20, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %20, i64 8
  %23 = load double, ptr %22, align 8, !tbaa !14
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.944, double noundef %11, double noundef %13, double noundef %16, double noundef %18, double noundef %21, double noundef %23)
  br label %25

25:                                               ; preds = %7, %3
  %26 = getelementptr inbounds i8, ptr %2, i64 8
  %27 = load double, ptr %26, align 8, !tbaa !17
  %28 = fcmp ult double %27, 1.000000e+00
  %29 = fdiv double 1.000000e+00, %27
  %.060 = select i1 %28, double %29, double %27
  %30 = fcmp ogt double %.060, 2.000000e+00
  br i1 %30, label %.preheader64, label %._crit_edge71

.preheader64:                                     ; preds = %25, %._crit_edge
  %.05870 = phi i32 [ %39, %._crit_edge ], [ 0, %25 ]
  %.169 = phi double [ %.lcssa65, %._crit_edge ], [ %.060, %25 ]
  %31 = fmul double %.169, 5.000000e-01
  %32 = fmul double %31, 5.000000e-01
  %33 = fcmp ogt double %32, 1.000000e+00
  br i1 %33, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader64, %.lr.ph
  %.05767 = phi i32 [ %34, %.lr.ph ], [ 1, %.preheader64 ]
  %.05966 = phi double [ %35, %.lr.ph ], [ 5.000000e-01, %.preheader64 ]
  %34 = shl nsw i32 %.05767, 1
  %35 = fmul double %.05966, %.05966
  %36 = fmul double %.169, %35
  %37 = fmul double %35, %36
  %38 = fcmp ogt double %37, 1.000000e+00
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %.preheader64
  %.057.lcssa = phi i32 [ 1, %.preheader64 ], [ %34, %.lr.ph ]
  %.lcssa65 = phi double [ %31, %.preheader64 ], [ %36, %.lr.ph ]
  %39 = add nuw nsw i32 %.057.lcssa, %.05870
  %40 = fcmp ogt double %.lcssa65, 2.000000e+00
  br i1 %40, label %.preheader64, label %._crit_edge71.loopexit, !llvm.loop !20

._crit_edge71.loopexit:                           ; preds = %._crit_edge
  %41 = uitofp nneg i32 %39 to double
  br label %._crit_edge71

._crit_edge71:                                    ; preds = %._crit_edge71.loopexit, %25
  %.1.lcssa = phi double [ %.060, %25 ], [ %.lcssa65, %._crit_edge71.loopexit ]
  %.058.lcssa = phi double [ 0.000000e+00, %25 ], [ %41, %._crit_edge71.loopexit ]
  %42 = fcmp ogt double %.1.lcssa, 0x3FF6A09E667F3BCD
  %43 = uitofp i1 %42 to double
  %44 = tail call double @llvm.fmuladd.f64(double %.058.lcssa, double 2.000000e+00, double %43)
  %45 = fptosi double %44 to i32
  %46 = sub nsw i32 2047, %45
  %47 = add nsw i32 %45, 2048
  %.056 = select i1 %28, i32 %47, i32 %46
  %48 = getelementptr inbounds i8, ptr %0, i64 704
  %49 = sext i32 %.056 to i64
  %50 = getelementptr inbounds [4096 x ptr], ptr %48, i64 0, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %68

53:                                               ; preds = %._crit_edge71
  %54 = getelementptr inbounds i8, ptr %0, i64 82624
  %55 = load i32, ptr %54, align 8, !tbaa !22
  %56 = icmp sgt i32 %.056, %55
  br i1 %56, label %57, label %.preheader

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %0, i64 66240
  %59 = getelementptr inbounds [4096 x i32], ptr %58, i64 0, i64 %49
  store i32 %55, ptr %59, align 4, !tbaa !27
  store i32 %.056, ptr %54, align 8, !tbaa !22
  br label %73

.preheader:                                       ; preds = %53, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ %49, %53 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %60 = getelementptr inbounds [4096 x ptr], ptr %48, i64 0, i64 %indvars.iv.next
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  %62 = icmp eq ptr %61, null
  br i1 %62, label %.preheader, label %63, !llvm.loop !28

63:                                               ; preds = %.preheader
  %64 = getelementptr inbounds i8, ptr %0, i64 66240
  %65 = getelementptr inbounds [4096 x i32], ptr %64, i64 0, i64 %indvars.iv.next
  %66 = load i32, ptr %65, align 4, !tbaa !27
  %67 = getelementptr inbounds [4096 x i32], ptr %64, i64 0, i64 %49
  store i32 %66, ptr %67, align 4, !tbaa !27
  store i32 %.056, ptr %65, align 4, !tbaa !27
  br label %73

68:                                               ; preds = %._crit_edge71
  %69 = getelementptr inbounds i8, ptr %0, i64 33472
  %70 = getelementptr inbounds [4096 x ptr], ptr %69, i64 0, i64 %49
  %71 = load ptr, ptr %70, align 8, !tbaa !21
  %72 = getelementptr inbounds i8, ptr %71, i64 40
  br label %73

73:                                               ; preds = %57, %63, %68
  %.sink = phi ptr [ %72, %68 ], [ %50, %63 ], [ %50, %57 ]
  store ptr %2, ptr %.sink, align 8, !tbaa !21
  %74 = getelementptr inbounds i8, ptr %0, i64 33472
  %75 = getelementptr inbounds [4096 x ptr], ptr %74, i64 0, i64 %49
  store ptr %2, ptr %75, align 8, !tbaa !21
  %76 = getelementptr inbounds i8, ptr %2, i64 40
  store ptr null, ptr %76, align 8, !tbaa !29
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nofree 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" }

!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, !13, i64 16}
!12 = !{!"badtriang", !13, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!10, !10, i64 0}
!15 = !{!12, !13, i64 24}
!16 = !{!12, !13, i64 32}
!17 = !{!12, !10, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!13, !13, i64 0}
!22 = !{!23, !7, i64 82624}
!23 = !{!"mesh", !24, i64 0, !24, i64 88, !24, i64 176, !24, i64 264, !24, i64 352, !24, i64 440, !24, i64 528, !24, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !7, i64 82624, !13, 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, !25, i64 82704, !7, i64 82712, !7, i64 82716, !7, i64 82720, !25, 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, !25, i64 82776, !25, i64 82784, !25, i64 82792, !25, i64 82800, !25, i64 82808, !25, i64 82816, !25, i64 82824, !13, i64 82832, !13, i64 82840, !13, i64 82848, !13, i64 82856, !13, i64 82864, !13, i64 82872, !13, i64 82880, !26, i64 82888}
!24 = !{!"memorypool", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !25, i64 64, !25, i64 72, !7, i64 80, !7, i64 84}
!25 = !{!"long", !8, i64 0}
!26 = !{!"otri", !13, i64 0, !7, i64 8}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !19}
!29 = !{!12, !13, i64 40}


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