; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x08-总结与练习/119. 袭击.ll (Z3dfsii)

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

@point = external dso_local global [200010 x %struct.Point], align 16
@tmp = external dso_local global [200010 x %struct.Point], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z3disR5PointS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z3dfsii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = icmp sge i32 %19, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %2
  store double 1.000000e+10, ptr %3, align 8
  br label %212

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = add nsw i32 %24, %25
  %27 = ashr i32 %26, 1
  store i32 %27, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = call noundef double @_Z3dfsii(i32 noundef %28, i32 noundef %29)
  store double %30, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = call noundef double @_Z3dfsii(i32 noundef %32, i32 noundef %33)
  store double %34, ptr %9, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %36 = load double, ptr %35, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  store double %36, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %37 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %37, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %40 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %40, ptr %12, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %81, %23
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %45, label %49

45:                                               ; preds = %41
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br label %49

49:                                               ; preds = %45, %41
  %50 = phi i1 [ false, %41 ], [ %48, %45 ]
  br i1 %50, label %51, label %82

51:                                               ; preds = %49
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.Point, ptr %54, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !11
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.Point, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !11
  %62 = icmp sle i32 %56, %61
  br i1 %62, label %63, label %72

63:                                               ; preds = %51
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %10, align 4, !tbaa !5
  %66 = sext i32 %64 to i64
  %67 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %66
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %12, align 4, !tbaa !5
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %70
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %67, i64 12, i1 false), !tbaa.struct !13
  br label %81

72:                                               ; preds = %51
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %11, align 4, !tbaa !5
  %75 = sext i32 %73 to i64
  %76 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %75
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %12, align 4, !tbaa !5
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %79
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %80, ptr align 4 %76, i64 12, i1 false), !tbaa.struct !13
  br label %81

81:                                               ; preds = %72, %63
  br label %41, !llvm.loop !14

82:                                               ; preds = %49
  br label %83

83:                                               ; preds = %87, %82
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %87, label %96

87:                                               ; preds = %83
  %88 = load i32, ptr %10, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %10, align 4, !tbaa !5
  %90 = sext i32 %88 to i64
  %91 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %90
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %12, align 4, !tbaa !5
  %94 = sext i32 %92 to i64
  %95 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %91, i64 12, i1 false), !tbaa.struct !13
  br label %83, !llvm.loop !16

96:                                               ; preds = %83
  br label %97

97:                                               ; preds = %101, %96
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = icmp sle i32 %98, %99
  br i1 %100, label %101, label %110

101:                                              ; preds = %97
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %11, align 4, !tbaa !5
  %104 = sext i32 %102 to i64
  %105 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %104
  %106 = load i32, ptr %12, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %12, align 4, !tbaa !5
  %108 = sext i32 %106 to i64
  %109 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %108
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %109, ptr align 4 %105, i64 12, i1 false), !tbaa.struct !13
  br label %97, !llvm.loop !17

110:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %111 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %111, ptr %13, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %124, %110
  %113 = load i32, ptr %13, align 4, !tbaa !5
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %127

117:                                              ; preds = %112
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %119
  %121 = load i32, ptr %13, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %122
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %123, ptr align 4 %120, i64 12, i1 false), !tbaa.struct !13
  br label %124

124:                                              ; preds = %117
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %13, align 4, !tbaa !5
  br label %112, !llvm.loop !18

127:                                              ; preds = %116
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %128 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %128, ptr %14, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %159, %127
  %130 = load i32, ptr %14, align 4, !tbaa !5
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = icmp sle i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %162

134:                                              ; preds = %129
  %135 = load i32, ptr %14, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.Point, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 4, !tbaa !19
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.Point, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %143, align 4, !tbaa !19
  %145 = sub nsw i32 %139, %144
  %146 = call i32 @llvm.abs.i32(i32 %145, i1 true)
  %147 = sitofp i32 %146 to double
  %148 = load double, ptr %7, align 8, !tbaa !9
  %149 = fcmp olt double %147, %148
  br i1 %149, label %150, label %158

150:                                              ; preds = %134
  %151 = load i32, ptr %14, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %152
  %154 = load i32, ptr %12, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %12, align 4, !tbaa !5
  %156 = sext i32 %154 to i64
  %157 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %156
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %157, ptr align 4 %153, i64 12, i1 false), !tbaa.struct !13
  br label %158

158:                                              ; preds = %150, %134
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %14, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %14, align 4, !tbaa !5
  br label %129, !llvm.loop !20

162:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %207, %162
  %164 = load i32, ptr %15, align 4, !tbaa !5
  %165 = load i32, ptr %12, align 4, !tbaa !5
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %163
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %210

168:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %169 = load i32, ptr %15, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %17, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %203, %168
  %172 = load i32, ptr %17, align 4, !tbaa !5
  %173 = load i32, ptr %12, align 4, !tbaa !5
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %175, label %190

175:                                              ; preds = %171
  %176 = load i32, ptr %17, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %177
  %179 = getelementptr inbounds %struct.Point, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !11
  %181 = load i32, ptr %15, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %182
  %184 = getelementptr inbounds %struct.Point, ptr %183, i32 0, i32 1
  %185 = load i32, ptr %184, align 4, !tbaa !11
  %186 = sub nsw i32 %180, %185
  %187 = sitofp i32 %186 to double
  %188 = load double, ptr %7, align 8, !tbaa !9
  %189 = fcmp olt double %187, %188
  br label %190

190:                                              ; preds = %175, %171
  %191 = phi i1 [ false, %171 ], [ %189, %175 ]
  br i1 %191, label %193, label %192

192:                                              ; preds = %190
  store i32 17, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %206

193:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %194 = load i32, ptr %15, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %195
  %197 = load i32, ptr %17, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %198
  %200 = call noundef double @_Z3disR5PointS0_(ptr noundef nonnull align 4 dereferenceable(12) %196, ptr noundef nonnull align 4 dereferenceable(12) %199)
  store double %200, ptr %18, align 8, !tbaa !9
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %202 = load double, ptr %201, align 8, !tbaa !9
  store double %202, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %203

203:                                              ; preds = %193
  %204 = load i32, ptr %17, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %17, align 4, !tbaa !5
  br label %171, !llvm.loop !21

206:                                              ; preds = %192
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %15, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %15, align 4, !tbaa !5
  br label %163, !llvm.loop !22

210:                                              ; preds = %167
  %211 = load double, ptr %7, align 8, !tbaa !9
  store double %211, ptr %3, align 8
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %212

212:                                              ; preds = %210, %22
  %213 = load double, ptr %3, align 8
  ret double %213
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTS5Point", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = !{!12, !6, i64 0}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


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

@point = external dso_local local_unnamed_addr global [200010 x %struct.Point], align 16
@tmp = external dso_local global [200010 x %struct.Point], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z3disR5PointS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z3dfsii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %.not = icmp slt i32 %0, %1
  br i1 %.not, label %7, label %96

7:                                                ; preds = %2
  %8 = add nsw i32 %1, %0
  %9 = ashr i32 %8, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %10 = tail call noundef double @_Z3dfsii(i32 noundef %0, i32 noundef %9)
  store double %10, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %11 = add nsw i32 %9, 1
  %12 = tail call noundef double @_Z3dfsii(i32 noundef %11, i32 noundef %1)
  store double %12, ptr %5, align 8, !tbaa !5
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %14 = load double, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  store double %14, ptr %3, align 8, !tbaa !5
  %15 = icmp sge i32 %9, %0
  %16 = icmp slt i32 %9, %1
  %17 = and i1 %15, %16
  br i1 %17, label %.lr.ph.preheader, label %.preheader75

.lr.ph.preheader:                                 ; preds = %7
  %18 = sext i32 %0 to i64
  br label %.lr.ph

.preheader75.loopexit:                            ; preds = %.lr.ph
  %19 = trunc nsw i64 %indvars.iv.next to i32
  br label %.preheader75

.preheader75:                                     ; preds = %.preheader75.loopexit, %7
  %.061.lcssa = phi i32 [ %0, %7 ], [ %.162, %.preheader75.loopexit ]
  %.058.lcssa = phi i32 [ %11, %7 ], [ %.159, %.preheader75.loopexit ]
  %.057.lcssa = phi i32 [ %0, %7 ], [ %19, %.preheader75.loopexit ]
  %.not6781 = icmp sgt i32 %.061.lcssa, %9
  br i1 %.not6781, label %.preheader74, label %.lr.ph84.preheader

.lr.ph84.preheader:                               ; preds = %.preheader75
  %20 = sext i32 %.057.lcssa to i64
  %21 = mul nsw i64 %20, 12
  %scevgep = getelementptr i8, ptr @tmp, i64 %21
  %22 = sext i32 %.061.lcssa to i64
  %23 = mul nsw i64 %22, 12
  %scevgep104 = getelementptr i8, ptr @point, i64 %23
  %24 = sub i32 %9, %.061.lcssa
  %25 = zext i32 %24 to i64
  %26 = mul nuw nsw i64 %25, 12
  %27 = add nuw nsw i64 %26, 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, ptr noundef nonnull align 4 dereferenceable(1) %scevgep104, i64 %27, i1 false)
  %28 = add i32 %.057.lcssa, %24
  %29 = add i32 %28, 1
  br label %.preheader74

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %18, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.05877 = phi i32 [ %11, %.lr.ph.preheader ], [ %.159, %.lr.ph ]
  %.06176 = phi i32 [ %0, %.lr.ph.preheader ], [ %.162, %.lr.ph ]
  %30 = sext i32 %.06176 to i64
  %31 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %30
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = sext i32 %.05877 to i64
  %35 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %34
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %.not71 = icmp sle i32 %33, %37
  %38 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %indvars.iv
  %.sink = select i1 %.not71, ptr %31, ptr %35
  %39 = zext i1 %.not71 to i32
  %.162 = add nsw i32 %.06176, %39
  %not..not71 = xor i1 %.not71, true
  %40 = zext i1 %not..not71 to i32
  %.159 = add nsw i32 %.05877, %40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %.sink, i64 12, i1 false)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %41 = icmp sle i32 %.162, %9
  %42 = icmp sle i32 %.159, %1
  %43 = select i1 %41, i1 %42, i1 false
  br i1 %43, label %.lr.ph, label %.preheader75.loopexit, !llvm.loop !12

.preheader74:                                     ; preds = %.lr.ph84.preheader, %.preheader75
  %.2.lcssa = phi i32 [ %.057.lcssa, %.preheader75 ], [ %29, %.lr.ph84.preheader ]
  %.not6886 = icmp sgt i32 %.058.lcssa, %1
  br i1 %.not6886, label %.preheader73, label %.lr.ph89.preheader

.lr.ph89.preheader:                               ; preds = %.preheader74
  %44 = sext i32 %.2.lcssa to i64
  %45 = mul nsw i64 %44, 12
  %scevgep112 = getelementptr i8, ptr @tmp, i64 %45
  %46 = sext i32 %.058.lcssa to i64
  %47 = mul nsw i64 %46, 12
  %scevgep113 = getelementptr i8, ptr @point, i64 %47
  %48 = sub i32 %1, %.058.lcssa
  %49 = zext i32 %48 to i64
  %50 = mul nuw nsw i64 %49, 12
  %51 = add nuw nsw i64 %50, 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep112, ptr noundef nonnull align 4 dereferenceable(1) %scevgep113, i64 %51, i1 false)
  br label %.preheader73

.preheader73:                                     ; preds = %.lr.ph89.preheader, %.preheader74
  %.not6990 = icmp sgt i32 %0, %1
  br i1 %.not6990, label %._crit_edge, label %.lr.ph96

.lr.ph96:                                         ; preds = %.preheader73
  %52 = sext i32 %0 to i64
  %53 = mul nsw i64 %52, 12
  %scevgep121 = getelementptr i8, ptr @point, i64 %53
  %scevgep122 = getelementptr i8, ptr @tmp, i64 %53
  %54 = sub i32 %1, %0
  %55 = zext i32 %54 to i64
  %56 = mul nuw nsw i64 %55, 12
  %57 = add nuw nsw i64 %56, 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep121, ptr noundef nonnull align 4 dereferenceable(1) %scevgep122, i64 %57, i1 false)
  %58 = sext i32 %9 to i64
  %59 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !14
  %61 = sext i32 %0 to i64
  %62 = add i32 %1, 1
  br label %65

.preheader:                                       ; preds = %76
  %63 = icmp sgt i32 %.5, 0
  br i1 %63, label %.lr.ph102.preheader, label %._crit_edge

.lr.ph102.preheader:                              ; preds = %.preheader
  %64 = zext nneg i32 %.5 to i64
  %wide.trip.count138 = zext nneg i32 %.5 to i64
  br label %.lr.ph102

65:                                               ; preds = %.lr.ph96, %76
  %indvars.iv126 = phi i64 [ %61, %.lr.ph96 ], [ %indvars.iv.next127, %76 ]
  %.494 = phi i32 [ 0, %.lr.ph96 ], [ %.5, %76 ]
  %66 = getelementptr inbounds [200010 x %struct.Point], ptr @point, i64 0, i64 %indvars.iv126
  %67 = load i32, ptr %66, align 4, !tbaa !14
  %68 = sub nsw i32 %67, %60
  %69 = call i32 @llvm.abs.i32(i32 %68, i1 true)
  %70 = uitofp nneg i32 %69 to double
  %71 = fcmp ogt double %14, %70
  br i1 %71, label %72, label %76

72:                                               ; preds = %65
  %73 = add nsw i32 %.494, 1
  %74 = sext i32 %.494 to i64
  %75 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %74
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %75, ptr noundef nonnull align 4 dereferenceable(12) %66, i64 12, i1 false), !tbaa.struct !15
  br label %76

76:                                               ; preds = %65, %72
  %.5 = phi i32 [ %73, %72 ], [ %.494, %65 ]
  %indvars.iv.next127 = add nsw i64 %indvars.iv126, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next127 to i32
  %exitcond.not = icmp eq i32 %62, %lftr.wideiv
  br i1 %exitcond.not, label %.preheader, label %65, !llvm.loop !17

._crit_edge:                                      ; preds = %.critedge, %.preheader73, %.preheader
  %77 = phi double [ %14, %.preheader ], [ %14, %.preheader73 ], [ %91, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %96

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %.critedge
  %78 = phi double [ %14, %.lr.ph102.preheader ], [ %91, %.critedge ]
  %indvars.iv135 = phi i64 [ 0, %.lr.ph102.preheader ], [ %indvars.iv.next136, %.critedge ]
  %indvars.iv129 = phi i64 [ 1, %.lr.ph102.preheader ], [ %indvars.iv.next130, %.critedge ]
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %79 = icmp ult i64 %indvars.iv.next136, %64
  br i1 %79, label %.lr.ph99, label %.critedge

.lr.ph99:                                         ; preds = %.lr.ph102
  %80 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %indvars.iv135
  %81 = getelementptr inbounds i8, ptr %80, i64 4
  br label %82

82:                                               ; preds = %.lr.ph99, %92
  %83 = phi double [ %78, %.lr.ph99 ], [ %95, %92 ]
  %indvars.iv131 = phi i64 [ %indvars.iv129, %.lr.ph99 ], [ %indvars.iv.next132, %92 ]
  %84 = getelementptr inbounds [200010 x %struct.Point], ptr @tmp, i64 0, i64 %indvars.iv131
  %85 = getelementptr inbounds i8, ptr %84, i64 4
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = load i32, ptr %81, align 4, !tbaa !9
  %88 = sub nsw i32 %86, %87
  %89 = sitofp i32 %88 to double
  %90 = fcmp ogt double %83, %89
  br i1 %90, label %92, label %.critedge

.critedge:                                        ; preds = %82, %92, %.lr.ph102
  %91 = phi double [ %78, %.lr.ph102 ], [ %83, %82 ], [ %95, %92 ]
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count138
  br i1 %exitcond139.not, label %._crit_edge, label %.lr.ph102, !llvm.loop !18

92:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %93 = call noundef double @_Z3disR5PointS0_(ptr noundef nonnull align 4 dereferenceable(12) %80, ptr noundef nonnull align 4 dereferenceable(12) %84)
  store double %93, ptr %6, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %95 = load double, ptr %94, align 8, !tbaa !5
  store double %95, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count138
  br i1 %exitcond134.not, label %.critedge, label %82, !llvm.loop !19

96:                                               ; preds = %2, %._crit_edge
  %.064 = phi double [ %77, %._crit_edge ], [ 1.000000e+10, %2 ]
  ret double %.064
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS5Point", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!10, !11, i64 0}
!15 = !{i64 0, i64 4, !16, i64 4, i64 4, !16, i64 8, i64 4, !16}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}


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