; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_mesh)

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

@.str = external hidden unnamed_addr constant [67 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.RcsMesh_add = external hidden unnamed_addr constant [12 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [28 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nounwind uwtable
define dso_local void @RcsMesh_add(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %15, label %12

12:                                               ; preds = %9
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef @.str.33, ptr noundef @.str, ptr noundef @__func__.RcsMesh_add, i32 noundef 1157, ptr noundef @.str.50) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

15:                                               ; preds = %9
  br label %16

16:                                               ; preds = %15
  br label %17

17:                                               ; preds = %16
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %23, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.33, ptr noundef @.str, ptr noundef @__func__.RcsMesh_add, i32 noundef 1158, ptr noundef @.str.51) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

23:                                               ; preds = %17
  br label %24

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.RcsMeshData, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.RcsMeshData, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = add i32 %27, %30
  %32 = mul i32 3, %31
  %33 = zext i32 %32 to i64
  %34 = mul i64 %33, 8
  store i64 %34, ptr %5, align 8, !tbaa !12
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.RcsMeshData, ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = load i64, ptr %5, align 8, !tbaa !12
  %39 = call ptr @realloc(ptr noundef %37, i64 noundef %38) #10
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.RcsMeshData, ptr %40, i32 0, i32 1
  store ptr %39, ptr %41, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.RcsMeshData, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !15
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.RcsMeshData, ptr %45, i32 0, i32 2
  %47 = load i32, ptr %46, align 8, !tbaa !15
  %48 = add i32 %44, %47
  %49 = mul i32 3, %48
  %50 = zext i32 %49 to i64
  %51 = mul i64 %50, 4
  store i64 %51, ptr %6, align 8, !tbaa !12
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.RcsMeshData, ptr %52, i32 0, i32 3
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = load i64, ptr %6, align 8, !tbaa !12
  %56 = call ptr @realloc(ptr noundef %54, i64 noundef %55) #10
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.RcsMeshData, ptr %57, i32 0, i32 3
  store ptr %56, ptr %58, align 8, !tbaa !16
  br label %59

59:                                               ; preds = %24
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.RcsMeshData, ptr %60, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = icmp ne ptr %62, null
  br i1 %63, label %72, label %64

64:                                               ; preds = %59
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.52, ptr noundef @.str, ptr noundef @__func__.RcsMesh_add, i32 noundef 1165, ptr noundef @.str.53) #8
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  %68 = load i64, ptr %6, align 8, !tbaa !12
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.54, i64 noundef %68) #8
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.3) #8
  call void @print_trace()
  call void @exit(i32 noundef 1) #9
  unreachable

72:                                               ; preds = %59
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.RcsMeshData, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !14
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.RcsMeshData, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !9
  %81 = mul i32 3, %80
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %77, i64 %82
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.RcsMeshData, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.RcsMeshData, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 8, !tbaa !9
  %90 = mul i32 3, %89
  %91 = zext i32 %90 to i64
  %92 = mul i64 %91, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %83, ptr align 8 %86, i64 %92, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = call i32 @getLargestFaceIdx(ptr noundef %93)
  store i32 %94, ptr %7, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !17
  br label %95

95:                                               ; preds = %125, %74
  %96 = load i32, ptr %8, align 4, !tbaa !17
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.RcsMeshData, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !15
  %100 = mul i32 3, %99
  %101 = icmp ult i32 %96, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %128

103:                                              ; preds = %95
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.RcsMeshData, ptr %104, i32 0, i32 3
  %106 = load ptr, ptr %105, align 8, !tbaa !16
  %107 = load i32, ptr %8, align 4, !tbaa !17
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !17
  %111 = load i32, ptr %7, align 4, !tbaa !17
  %112 = add i32 %110, %111
  %113 = add i32 %112, 1
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.RcsMeshData, ptr %114, i32 0, i32 3
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.RcsMeshData, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 8, !tbaa !15
  %120 = mul i32 3, %119
  %121 = load i32, ptr %8, align 4, !tbaa !17
  %122 = add i32 %120, %121
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %116, i64 %123
  store i32 %113, ptr %124, align 4, !tbaa !17
  br label %125

125:                                              ; preds = %103
  %126 = load i32, ptr %8, align 4, !tbaa !17
  %127 = add i32 %126, 1
  store i32 %127, ptr %8, align 4, !tbaa !17
  br label %95, !llvm.loop !18

128:                                              ; preds = %102
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.RcsMeshData, ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 8, !tbaa !9
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.RcsMeshData, ptr %132, i32 0, i32 0
  %134 = load i32, ptr %133, align 8, !tbaa !9
  %135 = add i32 %134, %131
  store i32 %135, ptr %133, align 8, !tbaa !9
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.RcsMeshData, ptr %136, i32 0, i32 2
  %138 = load i32, ptr %137, align 8, !tbaa !15
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.RcsMeshData, ptr %139, i32 0, i32 2
  %141 = load i32, ptr %140, align 8, !tbaa !15
  %142 = add i32 %141, %138
  store i32 %142, ptr %140, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @getLargestFaceIdx(ptr noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !6, i64 8}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !6, i64 24}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"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"

@.str = external hidden unnamed_addr constant [67 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.RcsMesh_add = external hidden unnamed_addr constant [12 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [28 x i8], align 1

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

declare void @print_trace() local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @RcsMesh_add(ptr noundef %0, ptr noundef readonly %1) local_unnamed_addr #4 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %3, label %6

3:                                                ; preds = %2
  %4 = load ptr, ptr @stderr, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %4, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_add, i32 noundef 1157, ptr noundef nonnull @.str.50) #7
  tail call void @print_trace() #8
  tail call void @abort() #9
  unreachable

6:                                                ; preds = %2
  %.not33 = icmp eq ptr %1, null
  br i1 %.not33, label %7, label %10

7:                                                ; preds = %6
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_add, i32 noundef 1158, ptr noundef nonnull @.str.51) #7
  tail call void @print_trace() #8
  tail call void @abort() #9
  unreachable

10:                                               ; preds = %6
  %11 = load i32, ptr %0, align 8, !tbaa !9
  %12 = load i32, ptr %1, align 8, !tbaa !9
  %13 = add i32 %12, %11
  %14 = mul i32 %13, 3
  %15 = zext i32 %14 to i64
  %16 = shl nuw nsw i64 %15, 3
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = tail call ptr @realloc(ptr noundef %18, i64 noundef %16) #10
  store ptr %19, ptr %17, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = load i32, ptr %20, align 8, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %1, i64 16
  %23 = load i32, ptr %22, align 8, !tbaa !13
  %24 = add i32 %23, %21
  %25 = mul i32 %24, 3
  %26 = zext i32 %25 to i64
  %27 = shl nuw nsw i64 %26, 2
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = tail call ptr @realloc(ptr noundef %29, i64 noundef %27) #10
  store ptr %30, ptr %28, align 8, !tbaa !14
  %.not34 = icmp eq ptr %30, null
  br i1 %.not34, label %31, label %38

31:                                               ; preds = %10
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.52, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.RcsMesh_add, i32 noundef 1165, ptr noundef nonnull @.str.53) #7
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.54, i64 noundef %27) #7
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.3) #7
  tail call void @print_trace() #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

38:                                               ; preds = %10
  %39 = load ptr, ptr %17, align 8, !tbaa !12
  %40 = load i32, ptr %0, align 8, !tbaa !9
  %41 = mul i32 %40, 3
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds double, ptr %39, i64 %42
  %44 = getelementptr inbounds i8, ptr %1, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !12
  %46 = load i32, ptr %1, align 8, !tbaa !9
  %47 = mul i32 %46, 3
  %48 = zext i32 %47 to i64
  %49 = shl nuw nsw i64 %48, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %45, i64 %49, i1 false)
  %50 = tail call i32 @getLargestFaceIdx(ptr noundef nonnull %0)
  %51 = load i32, ptr %22, align 8, !tbaa !13
  %.not36 = icmp eq i32 %51, 0
  br i1 %.not36, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %38
  %52 = getelementptr inbounds i8, ptr %1, i64 24
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = add i32 %50, 1
  %55 = load ptr, ptr %28, align 8, !tbaa !14
  br label %61

._crit_edge:                                      ; preds = %61, %38
  %.lcssa = phi i32 [ 0, %38 ], [ %71, %61 ]
  %56 = load i32, ptr %1, align 8, !tbaa !9
  %57 = load i32, ptr %0, align 8, !tbaa !9
  %58 = add i32 %57, %56
  store i32 %58, ptr %0, align 8, !tbaa !9
  %59 = load i32, ptr %20, align 8, !tbaa !13
  %60 = add i32 %59, %.lcssa
  store i32 %60, ptr %20, align 8, !tbaa !13
  ret void

61:                                               ; preds = %.lr.ph, %61
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %61 ]
  %62 = getelementptr inbounds i32, ptr %53, i64 %indvars.iv
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = add i32 %54, %63
  %65 = load i32, ptr %20, align 8, !tbaa !13
  %66 = mul i32 %65, 3
  %67 = trunc nuw i64 %indvars.iv to i32
  %68 = add i32 %66, %67
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %55, i64 %69
  store i32 %64, ptr %70, align 4, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %71 = load i32, ptr %22, align 8, !tbaa !13
  %72 = mul i32 %71, 3
  %73 = zext i32 %72 to i64
  %74 = icmp ult i64 %indvars.iv.next, %73
  br i1 %74, label %61, label %._crit_edge, !llvm.loop !16
}

; 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 #5

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @getLargestFaceIdx(ptr noundef) local_unnamed_addr #6

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint 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 #7 = { cold nounwind }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !6, i64 24}
!15 = !{!11, !11, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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