; 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.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.225 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1078 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1079 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1080 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1081 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1082 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1083 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1084 = external hidden unnamed_addr constant [8 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local void @triexit(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @traversalinit(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @vertextraverse(ptr noundef) #1

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local void @writenodes(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = 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 i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.behavior, ptr %16, i32 0, i32 9
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %30

20:                                               ; preds = %5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.mesh, ptr %21, i32 0, i32 2
  %23 = getelementptr inbounds %struct.memorypool, ptr %22, i32 0, i32 10
  %24 = load i64, ptr %23, align 8, !tbaa !14
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.mesh, ptr %25, i32 0, i32 23
  %27 = load i32, ptr %26, align 4, !tbaa !19
  %28 = sext i32 %27 to i64
  %29 = sub nsw i64 %24, %28
  store i64 %29, ptr %13, align 8, !tbaa !20
  br label %35

30:                                               ; preds = %5
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.mesh, ptr %31, i32 0, i32 2
  %33 = getelementptr inbounds %struct.memorypool, ptr %32, i32 0, i32 10
  %34 = load i64, ptr %33, align 8, !tbaa !14
  store i64 %34, ptr %13, align 8, !tbaa !20
  br label %35

35:                                               ; preds = %30, %20
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.behavior, ptr %36, i32 0, i32 28
  %38 = load i32, ptr %37, align 8, !tbaa !21
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %43, label %40

40:                                               ; preds = %35
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.1078, ptr noundef %41)
  br label %43

43:                                               ; preds = %40, %35
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call noalias ptr @fopen(ptr noundef %44, ptr noundef @.str.1079)
  store ptr %45, ptr %11, align 8, !tbaa !5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %51

48:                                               ; preds = %43
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.1080, ptr noundef %49)
  call void @triexit(i32 noundef 1)
  br label %51

51:                                               ; preds = %48, %43
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = load i64, ptr %13, align 8, !tbaa !20
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.mesh, ptr %54, i32 0, i32 25
  %56 = load i32, ptr %55, align 8, !tbaa !22
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.mesh, ptr %57, i32 0, i32 26
  %59 = load i32, ptr %58, align 4, !tbaa !23
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.behavior, ptr %60, i32 0, i32 15
  %62 = load i32, ptr %61, align 4, !tbaa !24
  %63 = sub nsw i32 1, %62
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.1081, i64 noundef %53, i32 noundef %56, i32 noundef %59, i32 noundef %63) #4
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.mesh, ptr %65, i32 0, i32 2
  call void @traversalinit(ptr noundef %66)
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.behavior, ptr %67, i32 0, i32 10
  %69 = load i32, ptr %68, align 8, !tbaa !25
  store i32 %69, ptr %14, align 4, !tbaa !9
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call ptr @vertextraverse(ptr noundef %70)
  store ptr %71, ptr %12, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %146, %51
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %149

75:                                               ; preds = %72
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.behavior, ptr %76, i32 0, i32 9
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %90

80:                                               ; preds = %75
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.mesh, ptr %82, i32 0, i32 30
  %84 = load i32, ptr %83, align 4, !tbaa !26
  %85 = add nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %81, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = icmp ne i32 %88, -32767
  br i1 %89, label %90, label %146

90:                                               ; preds = %80, %75
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds double, ptr %93, i64 0
  %95 = load double, ptr %94, align 8, !tbaa !27
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds double, ptr %96, i64 1
  %98 = load double, ptr %97, align 8, !tbaa !27
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.1082, i32 noundef %92, double noundef %95, double noundef %98) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %115, %90
  %101 = load i32, ptr %15, align 4, !tbaa !9
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.mesh, ptr %102, i32 0, i32 26
  %104 = load i32, ptr %103, align 4, !tbaa !23
  %105 = icmp slt i32 %101, %104
  br i1 %105, label %106, label %118

106:                                              ; preds = %100
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = load i32, ptr %15, align 4, !tbaa !9
  %110 = add nsw i32 %109, 2
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %108, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !27
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.1083, double noundef %113) #4
  br label %115

115:                                              ; preds = %106
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %15, align 4, !tbaa !9
  br label %100, !llvm.loop !28

118:                                              ; preds = %100
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.behavior, ptr %119, i32 0, i32 15
  %121 = load i32, ptr %120, align 4, !tbaa !24
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %126

123:                                              ; preds = %118
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.225) #4
  br label %136

126:                                              ; preds = %118
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.mesh, ptr %129, i32 0, i32 30
  %131 = load i32, ptr %130, align 4, !tbaa !26
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %128, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.1084, i32 noundef %134) #4
  br label %136

136:                                              ; preds = %126, %123
  %137 = load i32, ptr %14, align 4, !tbaa !9
  %138 = load ptr, ptr %12, align 8, !tbaa !5
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.mesh, ptr %139, i32 0, i32 30
  %141 = load i32, ptr %140, align 4, !tbaa !26
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %138, i64 %142
  store i32 %137, ptr %143, align 4, !tbaa !9
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %14, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %136, %80
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = call ptr @vertextraverse(ptr noundef %147)
  store ptr %148, ptr %12, align 8, !tbaa !5
  br label %72, !llvm.loop !30

149:                                              ; preds = %72
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = load i32, ptr %9, align 4, !tbaa !9
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  call void @finishfile(ptr noundef %150, i32 noundef %151, ptr noundef %152)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 "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 36}
!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 144, !13, i64 152, !13, 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}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !17, i64 240}
!15 = !{!"mesh", !16, i64 0, !16, i64 88, !16, i64 176, !16, i64 264, !16, i64 352, !16, i64 440, !16, i64 528, !16, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !10, i64 82624, !6, i64 82632, !13, i64 82640, !13, i64 82648, !13, i64 82656, !13, i64 82664, !13, i64 82672, !10, i64 82680, !10, i64 82684, !10, i64 82688, !10, i64 82692, !10, i64 82696, !10, i64 82700, !17, i64 82704, !10, i64 82712, !10, i64 82716, !10, i64 82720, !17, i64 82728, !10, i64 82736, !10, i64 82740, !10, i64 82744, !10, i64 82748, !10, i64 82752, !10, i64 82756, !10, i64 82760, !10, i64 82764, !10, i64 82768, !17, i64 82776, !17, i64 82784, !17, i64 82792, !17, i64 82800, !17, i64 82808, !17, i64 82816, !17, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !6, i64 82872, !6, i64 82880, !18, i64 82888}
!16 = !{!"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, !17, i64 64, !17, i64 72, !10, i64 80, !10, i64 84}
!17 = !{!"long", !7, i64 0}
!18 = !{!"otri", !6, i64 0, !10, i64 8}
!19 = !{!15, !10, i64 82700}
!20 = !{!17, !17, i64 0}
!21 = !{!12, !10, i64 112}
!22 = !{!15, !10, i64 82712}
!23 = !{!15, !10, i64 82716}
!24 = !{!12, !10, i64 60}
!25 = !{!12, !10, i64 40}
!26 = !{!15, !10, i64 82740}
!27 = !{!13, !13, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


; 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.225 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1078 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1079 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1080 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1081 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1082 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1083 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1084 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @writenodes(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %1, i64 36
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %.not = icmp eq i32 %7, 0
  %8 = getelementptr inbounds i8, ptr %0, i64 240
  %9 = load i64, ptr %8, align 8, !tbaa !11
  br i1 %.not, label %15, label %10

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %0, i64 82700
  %12 = load i32, ptr %11, align 4, !tbaa !17
  %13 = sext i32 %12 to i64
  %14 = sub nsw i64 %9, %13
  br label %15

15:                                               ; preds = %5, %10
  %.044 = phi i64 [ %14, %10 ], [ %9, %5 ]
  %16 = getelementptr inbounds i8, ptr %1, i64 112
  %17 = load i32, ptr %16, align 8, !tbaa !18
  %.not46 = icmp eq i32 %17, 0
  br i1 %.not46, label %18, label %20

18:                                               ; preds = %15
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1078, ptr noundef %2)
  br label %20

20:                                               ; preds = %18, %15
  %21 = tail call noalias ptr @fopen(ptr noundef %2, ptr noundef nonnull @.str.1079)
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %25

23:                                               ; preds = %20
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1080, ptr noundef %2)
  tail call void @triexit(i32 noundef 1)
  br label %25

25:                                               ; preds = %23, %20
  %26 = getelementptr inbounds i8, ptr %0, i64 82712
  %27 = load i32, ptr %26, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %0, i64 82716
  %29 = load i32, ptr %28, align 4, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %1, i64 60
  %31 = load i32, ptr %30, align 4, !tbaa !21
  %32 = sub nsw i32 1, %31
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1081, i64 noundef %.044, i32 noundef %27, i32 noundef %29, i32 noundef %32) #2
  %34 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @traversalinit(ptr noundef nonnull %34)
  %35 = getelementptr inbounds i8, ptr %1, i64 40
  %36 = load i32, ptr %35, align 8, !tbaa !22
  %37 = tail call ptr @vertextraverse(ptr noundef nonnull %0)
  %.not4752 = icmp eq ptr %37, null
  br i1 %.not4752, label %._crit_edge57, label %.lr.ph56

.lr.ph56:                                         ; preds = %25
  %38 = getelementptr inbounds i8, ptr %0, i64 82740
  br label %39

39:                                               ; preds = %.lr.ph56, %75
  %.04354 = phi i32 [ %36, %.lr.ph56 ], [ %.1, %75 ]
  %.04553 = phi ptr [ %37, %.lr.ph56 ], [ %76, %75 ]
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %.not48 = icmp eq i32 %40, 0
  br i1 %.not48, label %47, label %41

41:                                               ; preds = %39
  %42 = load i32, ptr %38, align 4, !tbaa !23
  %43 = add nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %.04553, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !24
  %.not49 = icmp eq i32 %46, -32767
  br i1 %.not49, label %75, label %47

47:                                               ; preds = %41, %39
  %48 = load double, ptr %.04553, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %.04553, i64 8
  %50 = load double, ptr %49, align 8, !tbaa !25
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1082, i32 noundef %.04354, double noundef %48, double noundef %50) #2
  %52 = load i32, ptr %28, align 4, !tbaa !20
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %47, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %47 ]
  %54 = add nuw nsw i64 %indvars.iv, 2
  %55 = getelementptr inbounds double, ptr %.04553, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !25
  %57 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1083, double noundef %56) #2
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = load i32, ptr %28, align 4, !tbaa !20
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next, %59
  br i1 %60, label %.lr.ph, label %._crit_edge, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph, %47
  %61 = load i32, ptr %30, align 4, !tbaa !21
  %.not50 = icmp eq i32 %61, 0
  br i1 %.not50, label %64, label %62

62:                                               ; preds = %._crit_edge
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.225) #2
  br label %70

64:                                               ; preds = %._crit_edge
  %65 = load i32, ptr %38, align 4, !tbaa !23
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %.04553, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !24
  %69 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1084, i32 noundef %68) #2
  br label %70

70:                                               ; preds = %64, %62
  %71 = load i32, ptr %38, align 4, !tbaa !23
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %.04553, i64 %72
  store i32 %.04354, ptr %73, align 4, !tbaa !24
  %74 = add nsw i32 %.04354, 1
  br label %75

75:                                               ; preds = %70, %41
  %.1 = phi i32 [ %74, %70 ], [ %.04354, %41 ]
  %76 = tail call ptr @vertextraverse(ptr noundef nonnull %0)
  %.not47 = icmp eq ptr %76, null
  br i1 %.not47, label %._crit_edge57, label %39, !llvm.loop !28

._crit_edge57:                                    ; preds = %75, %25
  tail call void @finishfile(ptr noundef %21, i32 noundef %3, ptr noundef %4)
  ret void
}

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 = { 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 }

!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 36}
!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, !15, i64 240}
!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, !7, i64 82700}
!18 = !{!6, !7, i64 112}
!19 = !{!12, !7, i64 82712}
!20 = !{!12, !7, i64 82716}
!21 = !{!6, !7, i64 60}
!22 = !{!6, !7, i64 40}
!23 = !{!12, !7, i64 82740}
!24 = !{!7, !7, i64 0}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


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