; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes (ply)

; 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.PlyFile = type { ptr, i32, float, i32, ptr, i32, ptr, i32, ptr, ptr, ptr }
%struct.PlyOtherElems = type { i32, ptr }
%struct.OtherElem = type { ptr, i32, ptr, ptr }
%struct.PlyElement = type { ptr, i32, i32, i32, ptr, ptr, i32, i32 }

@.str.9 = external hidden unnamed_addr constant [85 x i8], align 1
@stderr = external global ptr, align 8
@.str.45 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [30 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z8my_allociiPc(i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #2

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @ply_describe_other_properties(ptr noundef, ptr noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @ply_describe_other_elements(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  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 4, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  store i32 1, ptr %8, align 4
  br label %166

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.PlyFile, ptr %14, i32 0, i32 10
  store ptr %13, ptr %15, align 8, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.PlyFile, ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 8, !tbaa !13
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %40

20:                                               ; preds = %12
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.PlyFile, ptr %21, i32 0, i32 3
  %23 = load i32, ptr %22, align 8, !tbaa !13
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.PlyOtherElems, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 8, !tbaa !14
  %27 = add nsw i32 %23, %26
  %28 = zext i32 %27 to i64
  %29 = call noalias ptr @calloc(i64 noundef %28, i64 noundef 8) #9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.PlyFile, ptr %30, i32 0, i32 4
  store ptr %29, ptr %31, align 8, !tbaa !16
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.PlyFile, ptr %32, i32 0, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %39

36:                                               ; preds = %20
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.45, i32 noundef 1337, ptr noundef @.str.9) #8
  call void @exit(i32 noundef -1) #10
  unreachable

39:                                               ; preds = %20
  br label %120

40:                                               ; preds = %12
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.PlyFile, ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.PlyFile, ptr %44, i32 0, i32 3
  %46 = load i32, ptr %45, align 8, !tbaa !13
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.PlyOtherElems, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !14
  %50 = add nsw i32 %46, %49
  %51 = sext i32 %50 to i64
  %52 = mul i64 %51, 8
  %53 = call ptr @realloc(ptr noundef %43, i64 noundef %52) #11
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.PlyFile, ptr %54, i32 0, i32 4
  store ptr %53, ptr %55, align 8, !tbaa !16
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.PlyFile, ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %84

60:                                               ; preds = %40
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.PlyFile, ptr %61, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !13
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.PlyOtherElems, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !14
  %67 = add nsw i32 %63, %66
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %84

69:                                               ; preds = %60
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.46, i32 noundef 1337, ptr noundef @.str.9) #8
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.PlyFile, ptr %73, i32 0, i32 3
  %75 = load i32, ptr %74, align 8, !tbaa !13
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.PlyFile, ptr %76, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !13
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.PlyOtherElems, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !14
  %82 = add nsw i32 %78, %81
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.47, i32 noundef %75, i32 noundef %82) #8
  call void @exit(i32 noundef -1) #10
  unreachable

84:                                               ; preds = %60, %40
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.PlyFile, ptr %85, i32 0, i32 3
  %87 = load i32, ptr %86, align 8, !tbaa !13
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.PlyOtherElems, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !14
  %91 = add nsw i32 %87, %90
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.PlyFile, ptr %92, i32 0, i32 3
  %94 = load i32, ptr %93, align 8, !tbaa !13
  %95 = icmp sgt i32 %91, %94
  br i1 %95, label %96, label %119

96:                                               ; preds = %84
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.PlyFile, ptr %97, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.PlyFile, ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 8, !tbaa !13
  %103 = sext i32 %102 to i64
  %104 = mul i64 %103, 8
  %105 = getelementptr inbounds i8, ptr %99, i64 %104
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.PlyFile, ptr %106, i32 0, i32 3
  %108 = load i32, ptr %107, align 8, !tbaa !13
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.PlyOtherElems, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !14
  %112 = add nsw i32 %108, %111
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.PlyFile, ptr %113, i32 0, i32 3
  %115 = load i32, ptr %114, align 8, !tbaa !13
  %116 = sub nsw i32 %112, %115
  %117 = sext i32 %116 to i64
  %118 = mul i64 %117, 8
  call void @llvm.memset.p0.i64(ptr align 1 %105, i8 0, i64 %118, i1 false)
  br label %119

119:                                              ; preds = %96, %84
  br label %120

120:                                              ; preds = %119, %39
  store i32 0, ptr %5, align 4, !tbaa !17
  br label %121

121:                                              ; preds = %162, %120
  %122 = load i32, ptr %5, align 4, !tbaa !17
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.PlyOtherElems, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 8, !tbaa !14
  %126 = icmp slt i32 %122, %125
  br i1 %126, label %127, label %165

127:                                              ; preds = %121
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.PlyOtherElems, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !18
  %131 = load i32, ptr %5, align 4, !tbaa !17
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.OtherElem, ptr %130, i64 %132
  store ptr %133, ptr %6, align 8, !tbaa !5
  %134 = call noundef ptr @_Z8my_allociiPc(i32 noundef 48, i32 noundef 1340, ptr noundef @.str.9)
  store ptr %134, ptr %7, align 8, !tbaa !5
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.PlyFile, ptr %136, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !16
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.PlyFile, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 8, !tbaa !13
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %140, align 8, !tbaa !13
  %143 = sext i32 %141 to i64
  %144 = getelementptr inbounds ptr, ptr %138, i64 %143
  store ptr %135, ptr %144, align 8, !tbaa !5
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.OtherElem, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !19
  %148 = call noalias ptr @strdup(ptr noundef %147) #8
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.PlyElement, ptr %149, i32 0, i32 0
  store ptr %148, ptr %150, align 8, !tbaa !21
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.OtherElem, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 8, !tbaa !23
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.PlyElement, ptr %154, i32 0, i32 1
  store i32 %153, ptr %155, align 8, !tbaa !24
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.PlyElement, ptr %156, i32 0, i32 3
  store i32 0, ptr %157, align 8, !tbaa !25
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.OtherElem, ptr %159, i32 0, i32 3
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  call void @ply_describe_other_properties(ptr noundef %158, ptr noundef %161, i32 noundef 0)
  br label %162

162:                                              ; preds = %127
  %163 = load i32, ptr %5, align 4, !tbaa !17
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %5, align 4, !tbaa !17
  br label %121, !llvm.loop !27

165:                                              ; preds = %121
  store i32 0, ptr %8, align 4
  br label %166

166:                                              ; preds = %165, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  %167 = load i32, ptr %8, align 4
  switch i32 %167, label %169 [
    i32 0, label %168
    i32 1, label %168
  ]

168:                                              ; preds = %166, %166
  ret void

169:                                              ; preds = %166
  unreachable
}

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { 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 #3 = { noreturn 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 allocsize(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 #5 = { mustprogress 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 #6 = { nounwind allocsize(0,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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(1) }

!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++ TBAA"}
!9 = !{!10, !6, i64 72}
!10 = !{!"_ZTS7PlyFile", !6, i64 0, !11, i64 8, !12, i64 12, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !11, i64 16}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS13PlyOtherElems", !11, i64 0, !6, i64 8}
!16 = !{!10, !6, i64 24}
!17 = !{!11, !11, i64 0}
!18 = !{!15, !6, i64 8}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTS9OtherElem", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS10PlyElement", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44}
!23 = !{!20, !11, i64 8}
!24 = !{!22, !11, i64 8}
!25 = !{!22, !11, i64 16}
!26 = !{!20, !6, i64 24}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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

@.str.9 = external hidden unnamed_addr constant [85 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.45 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @ply_describe_other_properties(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @ply_describe_other_elements(ptr noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = icmp eq ptr %1, null
  br i1 %3, label %.loopexit, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %1, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load i32, ptr %6, align 8, !tbaa !12
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %18

9:                                                ; preds = %4
  %10 = load i32, ptr %1, align 8, !tbaa !13
  %11 = zext i32 %10 to i64
  %12 = tail call noalias ptr @calloc(i64 noundef %11, i64 noundef 8) #8
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %12, ptr %13, align 8, !tbaa !15
  %14 = icmp eq ptr %12, null
  br i1 %14, label %15, label %48

15:                                               ; preds = %9
  %16 = load ptr, ptr @stderr, align 8, !tbaa !16
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.45, i32 noundef 1337, ptr noundef nonnull @.str.9) #9
  tail call void @exit(i32 noundef -1) #10
  unreachable

18:                                               ; preds = %4
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = load i32, ptr %1, align 8, !tbaa !13
  %22 = add nsw i32 %21, %7
  %23 = sext i32 %22 to i64
  %24 = shl nsw i64 %23, 3
  %25 = tail call ptr @realloc(ptr noundef %20, i64 noundef %24) #11
  store ptr %25, ptr %19, align 8, !tbaa !15
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %thread-pre-split

27:                                               ; preds = %18
  %28 = load i32, ptr %6, align 8, !tbaa !12
  %29 = load i32, ptr %1, align 8, !tbaa !13
  %30 = sub i32 0, %29
  %.not = icmp eq i32 %28, %30
  br i1 %.not, label %39, label %31

31:                                               ; preds = %27
  %32 = load ptr, ptr @stderr, align 8, !tbaa !16
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.46, i32 noundef 1337, ptr noundef nonnull @.str.9) #9
  %34 = load ptr, ptr @stderr, align 8, !tbaa !16
  %35 = load i32, ptr %6, align 8, !tbaa !12
  %36 = load i32, ptr %1, align 8, !tbaa !13
  %37 = add nsw i32 %36, %35
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.47, i32 noundef %35, i32 noundef %37) #9
  tail call void @exit(i32 noundef -1) #10
  unreachable

thread-pre-split:                                 ; preds = %18
  %.pr = load i32, ptr %1, align 8, !tbaa !13
  br label %39

39:                                               ; preds = %thread-pre-split, %27
  %40 = phi i32 [ %.pr, %thread-pre-split ], [ %29, %27 ]
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.thread, label %.loopexit

.thread:                                          ; preds = %39
  %42 = load i32, ptr %6, align 8, !tbaa !12
  %43 = sext i32 %42 to i64
  %44 = shl nsw i64 %43, 3
  %45 = getelementptr inbounds i8, ptr %25, i64 %44
  %46 = zext nneg i32 %40 to i64
  %47 = shl nuw nsw i64 %46, 3
  tail call void @llvm.memset.p0.i64(ptr align 1 %45, i8 0, i64 %47, i1 false)
  br label %.lr.ph

48:                                               ; preds = %9
  %49 = icmp sgt i32 %10, 0
  br i1 %49, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.thread, %48
  %50 = getelementptr inbounds i8, ptr %1, i64 8
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  br label %52

52:                                               ; preds = %.lr.ph, %52
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %52 ]
  %53 = load ptr, ptr %50, align 8, !tbaa !17
  %54 = getelementptr inbounds %struct.OtherElem, ptr %53, i64 %indvars.iv
  %55 = tail call noundef ptr @_Z8my_allociiPc(i32 noundef 48, i32 noundef 1340, ptr noundef nonnull @.str.9)
  %56 = load ptr, ptr %51, align 8, !tbaa !15
  %57 = load i32, ptr %6, align 8, !tbaa !12
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %6, align 8, !tbaa !12
  %59 = sext i32 %57 to i64
  %60 = getelementptr inbounds ptr, ptr %56, i64 %59
  store ptr %55, ptr %60, align 8, !tbaa !16
  %61 = load ptr, ptr %54, align 8, !tbaa !18
  %62 = tail call noalias ptr @strdup(ptr noundef %61) #12
  store ptr %62, ptr %55, align 8, !tbaa !20
  %63 = getelementptr inbounds i8, ptr %54, i64 8
  %64 = load i32, ptr %63, align 8, !tbaa !22
  %65 = getelementptr inbounds i8, ptr %55, i64 8
  store i32 %64, ptr %65, align 8, !tbaa !23
  %66 = getelementptr inbounds i8, ptr %55, i64 16
  store i32 0, ptr %66, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %54, i64 24
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  tail call void @ply_describe_other_properties(ptr noundef nonnull %0, ptr noundef %68, i32 noundef 0)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %69 = load i32, ptr %1, align 8, !tbaa !13
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next, %70
  br i1 %71, label %52, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %52, %39, %48, %2
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 "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 = { noreturn 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 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 #6 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { cold nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(1) }
attributes #12 = { 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 72}
!6 = !{!"_ZTS7PlyFile", !7, i64 0, !10, i64 8, !11, i64 12, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS13PlyOtherElems", !10, i64 0, !7, i64 8}
!15 = !{!6, !7, i64 24}
!16 = !{!7, !7, i64 0}
!17 = !{!14, !7, i64 8}
!18 = !{!19, !7, i64 0}
!19 = !{!"_ZTS9OtherElem", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS10PlyElement", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44}
!22 = !{!19, !10, i64 8}
!23 = !{!21, !10, i64 8}
!24 = !{!21, !10, i64 16}
!25 = !{!19, !7, i64 24}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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