; LLVM IR from ekoontz/graphlab :: src/graphlab/extern/metis/libmetis (cmetis)

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

@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.23 = 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

declare ptr @libmetis__idxsmalloc(i64 noundef, i64 noundef, ptr noundef) #1

declare ptr @libmetis__idxmalloc(i64 noundef, ptr noundef) #1

declare i32 @mprintf(ptr noundef, ...) #1

; 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) #2

declare void @gk_free(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 @errexit(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local void @METIS_FindContacts(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %23, ptr %22, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load i64, ptr %24, align 8, !tbaa !9
  %26 = mul nsw i64 6, %25
  store i64 %26, ptr %16, align 8, !tbaa !9
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = add nsw i64 %28, 1
  %30 = call ptr @libmetis__idxsmalloc(i64 noundef %29, i64 noundef 0, ptr noundef @.str.17)
  store ptr %30, ptr %17, align 8, !tbaa !5
  %31 = load i64, ptr %16, align 8, !tbaa !9
  %32 = call ptr @libmetis__idxmalloc(i64 noundef %31, ptr noundef @.str.18)
  store ptr %32, ptr %18, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = call ptr @libmetis__idxmalloc(i64 noundef %34, ptr noundef @.str.19)
  store ptr %35, ptr %19, align 8, !tbaa !5
  %36 = load ptr, ptr %22, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ContactInfoType, ptr %36, i32 0, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = call ptr @libmetis__idxmalloc(i64 noundef %38, ptr noundef @.str.20)
  store ptr %39, ptr %20, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = call ptr @libmetis__idxsmalloc(i64 noundef %41, i64 noundef 0, ptr noundef @.str.21)
  store ptr %42, ptr %21, align 8, !tbaa !5
  store i64 0, ptr %15, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %103, %6
  %44 = load i64, ptr %13, align 8, !tbaa !9
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = icmp slt i64 %44, %46
  br i1 %47, label %48, label %106

48:                                               ; preds = %43
  %49 = load ptr, ptr %22, align 8, !tbaa !5
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i64, ptr %13, align 8, !tbaa !9
  %52 = mul nsw i64 %51, 6
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load ptr, ptr %20, align 8, !tbaa !5
  %55 = load ptr, ptr %19, align 8, !tbaa !5
  %56 = load ptr, ptr %21, align 8, !tbaa !5
  %57 = call i64 @FindBoxContacts(ptr noundef %49, ptr noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef %56)
  store i64 %57, ptr %14, align 8, !tbaa !9
  %58 = load i64, ptr %14, align 8, !tbaa !9
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %48
  %61 = call i32 (ptr, ...) @mprintf(ptr noundef @.str.22)
  br label %62

62:                                               ; preds = %60, %48
  %63 = load i64, ptr %14, align 8, !tbaa !9
  %64 = load i64, ptr %15, align 8, !tbaa !9
  %65 = add nsw i64 %63, %64
  %66 = load i64, ptr %16, align 8, !tbaa !9
  %67 = icmp sge i64 %65, %66
  br i1 %67, label %68, label %89

68:                                               ; preds = %62
  %69 = load i64, ptr %15, align 8, !tbaa !9
  %70 = load i64, ptr %14, align 8, !tbaa !9
  %71 = add nsw i64 %69, %70
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = load i64, ptr %13, align 8, !tbaa !9
  %75 = sub nsw i64 %73, %74
  %76 = mul nsw i64 %71, %75
  %77 = load i64, ptr %13, align 8, !tbaa !9
  %78 = sdiv i64 %76, %77
  %79 = load i64, ptr %16, align 8, !tbaa !9
  %80 = add nsw i64 %79, %78
  store i64 %80, ptr %16, align 8, !tbaa !9
  %81 = load ptr, ptr %18, align 8, !tbaa !5
  %82 = load i64, ptr %16, align 8, !tbaa !9
  %83 = mul i64 %82, 8
  %84 = call ptr @realloc(ptr noundef %81, i64 noundef %83) #6
  store ptr %84, ptr %18, align 8, !tbaa !5
  %85 = icmp eq ptr %84, null
  br i1 %85, label %86, label %88

86:                                               ; preds = %68
  %87 = load i64, ptr %16, align 8, !tbaa !9
  call void (ptr, ...) @errexit(ptr noundef @.str.23, i64 noundef %87)
  br label %88

88:                                               ; preds = %86, %68
  br label %89

89:                                               ; preds = %88, %62
  %90 = load i64, ptr %14, align 8, !tbaa !9
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  %92 = load i64, ptr %13, align 8, !tbaa !9
  %93 = getelementptr inbounds i64, ptr %91, i64 %92
  store i64 %90, ptr %93, align 8, !tbaa !9
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = load i64, ptr %15, align 8, !tbaa !9
  %96 = getelementptr inbounds i64, ptr %94, i64 %95
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = load i64, ptr %14, align 8, !tbaa !9
  %99 = mul i64 8, %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %96, ptr align 1 %97, i64 %99, i1 false)
  %100 = load i64, ptr %14, align 8, !tbaa !9
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = add nsw i64 %101, %100
  store i64 %102, ptr %15, align 8, !tbaa !9
  br label %103

103:                                              ; preds = %89
  %104 = load i64, ptr %13, align 8, !tbaa !9
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %13, align 8, !tbaa !9
  br label %43, !llvm.loop !13

106:                                              ; preds = %43
  br label %107

107:                                              ; preds = %106
  store i64 1, ptr %13, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %124, %107
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = icmp slt i64 %109, %111
  br i1 %112, label %113, label %127

113:                                              ; preds = %108
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  %115 = load i64, ptr %13, align 8, !tbaa !9
  %116 = sub nsw i64 %115, 1
  %117 = getelementptr inbounds i64, ptr %114, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !9
  %119 = load ptr, ptr %17, align 8, !tbaa !5
  %120 = load i64, ptr %13, align 8, !tbaa !9
  %121 = getelementptr inbounds i64, ptr %119, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = add nsw i64 %122, %118
  store i64 %123, ptr %121, align 8, !tbaa !9
  br label %124

124:                                              ; preds = %113
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %13, align 8, !tbaa !9
  br label %108, !llvm.loop !15

127:                                              ; preds = %108
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i64, ptr %128, align 8, !tbaa !9
  store i64 %129, ptr %13, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %142, %127
  %131 = load i64, ptr %13, align 8, !tbaa !9
  %132 = icmp sgt i64 %131, 0
  br i1 %132, label %133, label %145

133:                                              ; preds = %130
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = load i64, ptr %13, align 8, !tbaa !9
  %136 = sub nsw i64 %135, 1
  %137 = getelementptr inbounds i64, ptr %134, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  %140 = load i64, ptr %13, align 8, !tbaa !9
  %141 = getelementptr inbounds i64, ptr %139, i64 %140
  store i64 %138, ptr %141, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %133
  %143 = load i64, ptr %13, align 8, !tbaa !9
  %144 = add nsw i64 %143, -1
  store i64 %144, ptr %13, align 8, !tbaa !9
  br label %130, !llvm.loop !16

145:                                              ; preds = %130
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  %147 = getelementptr inbounds i64, ptr %146, i64 0
  store i64 0, ptr %147, align 8, !tbaa !9
  br label %148

148:                                              ; preds = %145
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %150, ptr %151, align 8, !tbaa !5
  %152 = load ptr, ptr %18, align 8, !tbaa !5
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %152, ptr %153, align 8, !tbaa !5
  call void (ptr, ...) @gk_free(ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @FindBoxContacts(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { nounwind }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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.17 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [30 x i8], align 1

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

declare ptr @libmetis__idxsmalloc(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @libmetis__idxmalloc(i64 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mprintf(ptr noundef, ...) local_unnamed_addr #1

; 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) #2

declare void @gk_free(ptr noundef, ...) local_unnamed_addr #1

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

declare void @errexit(ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @METIS_FindContacts(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = mul nsw i64 %10, 6
  %12 = add nsw i64 %10, 1
  %13 = tail call ptr @libmetis__idxsmalloc(i64 noundef %12, i64 noundef 0, ptr noundef nonnull @.str.17) #6
  %14 = tail call ptr @libmetis__idxmalloc(i64 noundef %11, ptr noundef nonnull @.str.18) #6
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = tail call ptr @libmetis__idxmalloc(i64 noundef %15, ptr noundef nonnull @.str.19) #6
  store ptr %16, ptr %7, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !11
  %19 = tail call ptr @libmetis__idxmalloc(i64 noundef %18, ptr noundef nonnull @.str.20) #6
  store ptr %19, ptr %8, align 8, !tbaa !9
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = tail call ptr @libmetis__idxsmalloc(i64 noundef %20, i64 noundef 0, ptr noundef nonnull @.str.21) #6
  store ptr %21, ptr %9, align 8, !tbaa !9
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

.preheader61:                                     ; preds = %42
  %24 = icmp sgt i64 %47, 1
  br i1 %24, label %.lr.ph67, label %.preheader

.lr.ph:                                           ; preds = %6, %42
  %.065 = phi i64 [ %46, %42 ], [ 0, %6 ]
  %.05264 = phi ptr [ %.153, %42 ], [ %14, %6 ]
  %.05463 = phi i64 [ %31, %42 ], [ 0, %6 ]
  %.05562 = phi i64 [ %.156, %42 ], [ %11, %6 ]
  %.idx = mul i64 %.065, 48
  %25 = getelementptr inbounds i8, ptr %2, i64 %.idx
  %26 = tail call i64 @FindBoxContacts(ptr noundef %0, ptr noundef %25, ptr noundef %19, ptr noundef %16, ptr noundef %21)
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %28, label %30

28:                                               ; preds = %.lr.ph
  %29 = tail call i32 (ptr, ...) @mprintf(ptr noundef nonnull @.str.22) #6
  br label %30

30:                                               ; preds = %28, %.lr.ph
  %31 = add nsw i64 %26, %.05463
  %.not = icmp slt i64 %31, %.05562
  br i1 %.not, label %42, label %32

32:                                               ; preds = %30
  %33 = load i64, ptr %1, align 8, !tbaa !5
  %34 = sub nsw i64 %33, %.065
  %35 = mul nsw i64 %34, %31
  %36 = sdiv i64 %35, %.065
  %37 = add nsw i64 %36, %.05562
  %38 = shl i64 %37, 3
  %39 = tail call ptr @realloc(ptr noundef %.05264, i64 noundef %38) #7
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %42

41:                                               ; preds = %32
  tail call void (ptr, ...) @errexit(ptr noundef nonnull @.str.23, i64 noundef %37) #6
  br label %42

42:                                               ; preds = %32, %41, %30
  %.156 = phi i64 [ %37, %41 ], [ %37, %32 ], [ %.05562, %30 ]
  %.153 = phi ptr [ null, %41 ], [ %39, %32 ], [ %.05264, %30 ]
  %43 = getelementptr inbounds i64, ptr %13, i64 %.065
  store i64 %26, ptr %43, align 8, !tbaa !5
  %44 = getelementptr inbounds i64, ptr %.153, i64 %.05463
  %45 = shl i64 %26, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %44, ptr align 1 %16, i64 %45, i1 false)
  %46 = add nuw nsw i64 %.065, 1
  %47 = load i64, ptr %1, align 8, !tbaa !5
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %.lr.ph, label %.preheader61, !llvm.loop !13

.preheader:                                       ; preds = %.lr.ph67, %.preheader61
  %.lcssa = phi i64 [ %47, %.preheader61 ], [ %57, %.lr.ph67 ]
  %49 = icmp sgt i64 %.lcssa, 0
  br i1 %49, label %.lr.ph70.preheader, label %._crit_edge

.lr.ph70.preheader:                               ; preds = %.preheader
  %scevgep = getelementptr i8, ptr %13, i64 8
  %50 = shl nuw i64 %.lcssa, 3
  tail call void @llvm.memmove.p0.p0.i64(ptr align 8 %scevgep, ptr nonnull align 8 %13, i64 %50, i1 false), !tbaa !5
  br label %._crit_edge

.lr.ph67:                                         ; preds = %.preheader61, %.lr.ph67
  %.166 = phi i64 [ %56, %.lr.ph67 ], [ 1, %.preheader61 ]
  %51 = getelementptr i64, ptr %13, i64 %.166
  %52 = getelementptr i8, ptr %51, i64 -8
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = load i64, ptr %51, align 8, !tbaa !5
  %55 = add nsw i64 %54, %53
  store i64 %55, ptr %51, align 8, !tbaa !5
  %56 = add nuw nsw i64 %.166, 1
  %57 = load i64, ptr %1, align 8, !tbaa !5
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %.lr.ph67, label %.preheader, !llvm.loop !15

._crit_edge:                                      ; preds = %6, %.lr.ph70.preheader, %.preheader
  %.052.lcssa7376 = phi ptr [ %.153, %.lr.ph70.preheader ], [ %.153, %.preheader ], [ %14, %6 ]
  store i64 0, ptr %13, align 8, !tbaa !5
  store ptr %13, ptr %4, align 8, !tbaa !9
  store ptr %.052.lcssa7376, ptr %5, align 8, !tbaa !9
  call void (ptr, ...) @gk_free(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef null) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @FindBoxContacts(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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