; LLVM IR from yuikns/panther :: ann/ann2fig/ann2fig.ll (Z11recReadTreeR11ANNorthRect)

; 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"

%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%class.ANNorthRect = type { ptr, ptr }
%class.ANNorthHalfSpace = type <{ i32, [4 x i8], double, i32, [4 x i8] }>

@ifile = external dso_local global %"class.std::basic_ifstream", align 8
@dim_x = external dso_local global i32, align 4
@dim_y = external dso_local global i32, align 4
@dim = external dso_local global i32, align 4
@pts = external dso_local global ptr, align 8
@.str.37 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10writePointPd(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8writeBoxRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9writeLinePdS_(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca [500 x i8], align 16
  %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 double, align 8
  %15 = alloca double, align 8
  %16 = alloca %class.ANNorthRect, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %class.ANNorthHalfSpace, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 500, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %21 = getelementptr inbounds [500 x i8], ptr %3, i64 0, i64 0
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef %21)
  %23 = getelementptr inbounds [500 x i8], ptr %3, i64 0, i64 0
  %24 = call i32 @strcmp(ptr noundef %23, ptr noundef @.str.37) #7
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %64

26:                                               ; preds = %1
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %28 = load i32, ptr @dim, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 2
  br i1 %29, label %34, label %30

30:                                               ; preds = %26
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = call noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %31)
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %51

34:                                               ; preds = %30, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %47, %34
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %50

40:                                               ; preds = %35
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %42 = load ptr, ptr @pts, align 8, !tbaa !5
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  call void @_Z10writePointPd(ptr noundef %46)
  br label %47

47:                                               ; preds = %40
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %12, align 4, !tbaa !9
  br label %35, !llvm.loop !11

50:                                               ; preds = %39
  br label %63

51:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %59, %51
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = load i32, ptr %4, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %62

57:                                               ; preds = %52
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %59

59:                                               ; preds = %57
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %13, align 4, !tbaa !9
  br label %52, !llvm.loop !13

62:                                               ; preds = %56
  br label %63

63:                                               ; preds = %62, %50
  br label %222

64:                                               ; preds = %1
  %65 = getelementptr inbounds [500 x i8], ptr %3, i64 0, i64 0
  %66 = call i32 @strcmp(ptr noundef %65, ptr noundef @.str.38) #7
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %161

68:                                               ; preds = %64
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %73 = load double, ptr %8, align 8, !tbaa !14
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %class.ANNorthRect, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %76, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !14
  %81 = fcmp une double %73, %80
  br i1 %81, label %92, label %82

82:                                               ; preds = %68
  %83 = load double, ptr %9, align 8, !tbaa !14
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.ANNorthRect, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !18
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %86, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !14
  %91 = fcmp une double %83, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %82, %68
  call void @_Z5ErrorPKc6ANNerr(ptr noundef @.str.39, i32 noundef 0)
  br label %93

93:                                               ; preds = %92, %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.ANNorthRect, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !14
  store double %100, ptr %14, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %class.ANNorthRect, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !18
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !14
  store double %107, ptr %15, align 8, !tbaa !14
  %108 = load double, ptr %7, align 8, !tbaa !14
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %class.ANNorthRect, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = load i32, ptr %6, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  store double %108, ptr %114, align 8, !tbaa !14
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %115)
  %116 = load double, ptr %7, align 8, !tbaa !14
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.ANNorthRect, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !16
  %120 = load i32, ptr %6, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  store double %116, ptr %122, align 8, !tbaa !14
  %123 = load i32, ptr @dim, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 2
  br i1 %124, label %129, label %125

125:                                              ; preds = %93
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = call noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %126)
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %145

129:                                              ; preds = %125, %93
  %130 = load i32, ptr %6, align 4, !tbaa !9
  %131 = load i32, ptr @dim_x, align 4, !tbaa !9
  %132 = icmp eq i32 %130, %131
  br i1 %132, label %137, label %133

133:                                              ; preds = %129
  %134 = load i32, ptr %6, align 4, !tbaa !9
  %135 = load i32, ptr @dim_y, align 4, !tbaa !9
  %136 = icmp eq i32 %134, %135
  br i1 %136, label %137, label %144

137:                                              ; preds = %133, %129
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = getelementptr inbounds %class.ANNorthRect, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !16
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %class.ANNorthRect, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 8, !tbaa !18
  call void @_Z9writeLinePdS_(ptr noundef %140, ptr noundef %143)
  br label %144

144:                                              ; preds = %137, %133
  br label %145

145:                                              ; preds = %144, %125
  %146 = load double, ptr %15, align 8, !tbaa !14
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %class.ANNorthRect, ptr %147, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load i32, ptr %6, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  store double %146, ptr %152, align 8, !tbaa !14
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %153)
  %154 = load double, ptr %14, align 8, !tbaa !14
  %155 = load ptr, ptr %2, align 8, !tbaa !5
  %156 = getelementptr inbounds %class.ANNorthRect, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !16
  %158 = load i32, ptr %6, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %157, i64 %159
  store double %154, ptr %160, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %221

161:                                              ; preds = %64
  %162 = getelementptr inbounds [500 x i8], ptr %3, i64 0, i64 0
  %163 = call i32 @strcmp(ptr noundef %162, ptr noundef @.str.40) #7
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %219

165:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %166 = load i32, ptr @dim, align 4, !tbaa !9
  %167 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN11ANNorthRectC2EiRKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, i32 noundef %166, ptr noundef nonnull align 8 dereferenceable(16) %167)
  %168 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %169 unwind label %175

169:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %194, %169
  %171 = load i32, ptr %19, align 4, !tbaa !9
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %179, label %174

174:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %206

175:                                              ; preds = %215, %214, %212, %165
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %17, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %18, align 4
  br label %218

179:                                              ; preds = %170
  %180 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %181 unwind label %197

181:                                              ; preds = %179
  %182 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %180, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %183 unwind label %197

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %182, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %185 unwind label %197

185:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %186 = load i32, ptr %6, align 4, !tbaa !9
  %187 = load double, ptr %7, align 8, !tbaa !14
  %188 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_ZN16ANNorthHalfSpaceC2Eidi(ptr noundef nonnull align 8 dereferenceable(20) %20, i32 noundef %186, double noundef %187, i32 noundef %188)
          to label %189 unwind label %201

189:                                              ; preds = %185
  %190 = getelementptr inbounds %class.ANNorthRect, ptr %16, i32 0, i32 0
  invoke void @_ZN16ANNorthHalfSpace7projectERPd(ptr noundef nonnull align 8 dereferenceable(20) %20, ptr noundef nonnull align 8 dereferenceable(8) %190)
          to label %191 unwind label %201

191:                                              ; preds = %189
  %192 = getelementptr inbounds %class.ANNorthRect, ptr %16, i32 0, i32 1
  invoke void @_ZN16ANNorthHalfSpace7projectERPd(ptr noundef nonnull align 8 dereferenceable(20) %20, ptr noundef nonnull align 8 dereferenceable(8) %192)
          to label %193 unwind label %201

193:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %19, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %19, align 4, !tbaa !9
  br label %170, !llvm.loop !19

197:                                              ; preds = %183, %181, %179
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %17, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %18, align 4
  br label %205

201:                                              ; preds = %191, %189, %185
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %17, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %205

205:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %218

206:                                              ; preds = %174
  %207 = load i32, ptr @dim, align 4, !tbaa !9
  %208 = icmp eq i32 %207, 2
  br i1 %208, label %212, label %209

209:                                              ; preds = %206
  %210 = call noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %214

212:                                              ; preds = %209, %206
  invoke void @_Z8writeBoxRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %213 unwind label %175

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213, %209
  invoke void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %215 unwind label %175

215:                                              ; preds = %214
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %216)
          to label %217 unwind label %175

217:                                              ; preds = %215
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %220

218:                                              ; preds = %205, %175
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 500, ptr %3) #6
  br label %223

219:                                              ; preds = %161
  call void @_Z5ErrorPKc6ANNerr(ptr noundef @.str.41, i32 noundef 1)
  br label %220

220:                                              ; preds = %219, %217
  br label %221

221:                                              ; preds = %220, %145
  br label %222

222:                                              ; preds = %221, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 500, ptr %3) #6
  ret void

223:                                              ; preds = %218
  %224 = load ptr, ptr %17, align 8
  %225 = load i32, ptr %18, align 4
  %226 = insertvalue { ptr, i32 } poison, ptr %224, 0
  %227 = insertvalue { ptr, i32 } %226, i32 %225, 1
  resume { ptr, i32 } %227
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) #4

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11ANNorthRectC2EiRKS_(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16ANNorthHalfSpaceC2Eidi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef, double noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16ANNorthHalfSpace7projectERPd(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

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 = { nounwind willreturn memory(read) "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 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 = { inlinehint 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 #5 = { "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 }
attributes #7 = { nounwind willreturn memory(read) }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS11ANNorthRect", !6, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !12}


; 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"

%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%class.ANNorthRect = type { ptr, ptr }
%class.ANNorthHalfSpace = type <{ i32, [4 x i8], double, i32, [4 x i8] }>

@ifile = external dso_local global %"class.std::basic_ifstream", align 8
@dim_x = external dso_local local_unnamed_addr global i32, align 4
@dim_y = external dso_local local_unnamed_addr global i32, align 4
@dim = external dso_local local_unnamed_addr global i32, align 4
@pts = external dso_local local_unnamed_addr global ptr, align 8
@.str.37 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1

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

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

; 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 nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8writeBoxRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9writeLinePdS_(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca [500 x i8], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %class.ANNorthRect, align 8
  %12 = alloca %class.ANNorthHalfSpace, align 8
  call void @llvm.lifetime.start.p0(i64 500, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  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 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef %2)
  %14 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.37) #7
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %40

16:                                               ; preds = %1
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %18 = load i32, ptr @dim, align 4, !tbaa !5
  %19 = icmp eq i32 %18, 2
  br i1 %19, label %24, label %20

20:                                               ; preds = %16
  %21 = call noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %.not34 = icmp eq i32 %21, 0
  br i1 %.not34, label %.preheader, label %24

.preheader:                                       ; preds = %20
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph40, label %.loopexit

24:                                               ; preds = %20, %16
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph43, label %.loopexit

.lr.ph43:                                         ; preds = %24, %.lr.ph43
  %.02841 = phi i32 [ %33, %.lr.ph43 ], [ 0, %24 ]
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %28 = load ptr, ptr @pts, align 8, !tbaa !9
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds ptr, ptr %28, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  call void @_Z10writePointPd(ptr noundef %32)
  %33 = add nuw nsw i32 %.02841, 1
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %.lr.ph43, label %.loopexit, !llvm.loop !11

.lr.ph40:                                         ; preds = %.preheader, %.lr.ph40
  %.02939 = phi i32 [ %37, %.lr.ph40 ], [ 0, %.preheader ]
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %37 = add nuw nsw i32 %.02939, 1
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %.lr.ph40, label %.loopexit, !llvm.loop !13

40:                                               ; preds = %1
  %41 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.38) #7
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %96

43:                                               ; preds = %40
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %48 = load double, ptr %7, align 8, !tbaa !14
  %49 = load ptr, ptr %0, align 8, !tbaa !16
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %49, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !14
  %54 = fcmp une double %48, %53
  br i1 %54, label %62, label %55

55:                                               ; preds = %43
  %56 = load double, ptr %8, align 8, !tbaa !14
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds double, ptr %58, i64 %51
  %60 = load double, ptr %59, align 8, !tbaa !14
  %61 = fcmp une double %56, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %55, %43
  call void @_Z5ErrorPKc6ANNerr(ptr noundef nonnull @.str.39, i32 noundef 0)
  %.pre = load ptr, ptr %0, align 8, !tbaa !16
  %.pre45 = load i32, ptr %5, align 4, !tbaa !5
  %.phi.trans.insert = sext i32 %.pre45 to i64
  %.phi.trans.insert46 = getelementptr inbounds double, ptr %.pre, i64 %.phi.trans.insert
  %.pre47 = load double, ptr %.phi.trans.insert46, align 8, !tbaa !14
  %.phi.trans.insert48 = getelementptr inbounds i8, ptr %0, i64 8
  %.pre49 = load ptr, ptr %.phi.trans.insert48, align 8, !tbaa !18
  %.phi.trans.insert50 = getelementptr inbounds double, ptr %.pre49, i64 %.phi.trans.insert
  %.pre51 = load double, ptr %.phi.trans.insert50, align 8, !tbaa !14
  br label %63

63:                                               ; preds = %62, %55
  %.pre-phi = phi i64 [ %.phi.trans.insert, %62 ], [ %51, %55 ]
  %64 = phi double [ %.pre51, %62 ], [ %60, %55 ]
  %65 = phi ptr [ %.pre49, %62 ], [ %58, %55 ]
  %66 = phi double [ %.pre47, %62 ], [ %53, %55 ]
  %67 = getelementptr inbounds i8, ptr %0, i64 8
  %68 = getelementptr inbounds double, ptr %65, i64 %.pre-phi
  %69 = load double, ptr %6, align 8, !tbaa !14
  store double %69, ptr %68, align 8, !tbaa !14
  call void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %70 = load double, ptr %6, align 8, !tbaa !14
  %71 = load ptr, ptr %0, align 8, !tbaa !16
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  store double %70, ptr %74, align 8, !tbaa !14
  %75 = load i32, ptr @dim, align 4, !tbaa !5
  %76 = icmp eq i32 %75, 2
  br i1 %76, label %._crit_edge52, label %77

77:                                               ; preds = %63
  %78 = call noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %.not33 = icmp eq i32 %78, 0
  %.pre55 = load i32, ptr %5, align 4, !tbaa !5
  br i1 %.not33, label %87, label %._crit_edge52

._crit_edge52:                                    ; preds = %77, %63
  %79 = phi i32 [ %72, %63 ], [ %.pre55, %77 ]
  %80 = load i32, ptr @dim_x, align 4, !tbaa !5
  %81 = icmp eq i32 %79, %80
  %82 = load i32, ptr @dim_y, align 4
  %83 = icmp eq i32 %79, %82
  %or.cond = select i1 %81, i1 true, i1 %83
  br i1 %or.cond, label %84, label %87

84:                                               ; preds = %._crit_edge52
  %85 = load ptr, ptr %0, align 8, !tbaa !16
  %86 = load ptr, ptr %67, align 8, !tbaa !18
  call void @_Z9writeLinePdS_(ptr noundef %85, ptr noundef %86)
  %.pre54 = load i32, ptr %5, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %._crit_edge52, %84, %77
  %88 = phi i32 [ %79, %._crit_edge52 ], [ %.pre54, %84 ], [ %.pre55, %77 ]
  %89 = load ptr, ptr %67, align 8, !tbaa !18
  %90 = sext i32 %88 to i64
  %91 = getelementptr inbounds double, ptr %89, i64 %90
  store double %64, ptr %91, align 8, !tbaa !14
  call void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %92 = load ptr, ptr %0, align 8, !tbaa !16
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %92, i64 %94
  store double %66, ptr %95, align 8, !tbaa !14
  br label %.loopexit

96:                                               ; preds = %40
  %97 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.40) #7
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %135

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %100 = load i32, ptr @dim, align 4, !tbaa !5
  call void @_ZN11ANNorthRectC2EiRKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef %100, ptr noundef nonnull align 8 dereferenceable(16) %0)
  %101 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %.preheader37 unwind label %107

.preheader37:                                     ; preds = %99
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader37
  %104 = getelementptr inbounds i8, ptr %11, i64 8
  br label %109

._crit_edge:                                      ; preds = %120, %.preheader37
  %105 = load i32, ptr @dim, align 4, !tbaa !5
  %106 = icmp eq i32 %105, 2
  br i1 %106, label %130, label %128

107:                                              ; preds = %132, %131, %130, %99
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %134

109:                                              ; preds = %.lr.ph, %120
  %.038 = phi i32 [ 0, %.lr.ph ], [ %121, %120 ]
  %110 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @ifile, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %111 unwind label %124

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %113 unwind label %124

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %112, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %115 unwind label %124

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = load double, ptr %6, align 8, !tbaa !14
  %118 = load i32, ptr %10, align 4, !tbaa !5
  call void @_ZN16ANNorthHalfSpaceC2Eidi(ptr noundef nonnull align 8 dereferenceable(20) %12, i32 noundef %116, double noundef %117, i32 noundef %118)
  invoke void @_ZN16ANNorthHalfSpace7projectERPd(ptr noundef nonnull align 8 dereferenceable(20) %12, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %119 unwind label %126

119:                                              ; preds = %115
  invoke void @_ZN16ANNorthHalfSpace7projectERPd(ptr noundef nonnull align 8 dereferenceable(20) %12, ptr noundef nonnull align 8 dereferenceable(8) %104)
          to label %120 unwind label %126

120:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  %121 = add nuw nsw i32 %.038, 1
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %109, label %._crit_edge, !llvm.loop !19

124:                                              ; preds = %113, %111, %109
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %134

126:                                              ; preds = %119, %115
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %134

128:                                              ; preds = %._crit_edge
  %129 = call noundef i32 @_Z7overlapRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %.not = icmp eq i32 %129, 0
  br i1 %.not, label %131, label %130

130:                                              ; preds = %128, %._crit_edge
  invoke void @_Z8writeBoxRK11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %131 unwind label %107

131:                                              ; preds = %130, %128
  invoke void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %132 unwind label %107

132:                                              ; preds = %131
  invoke void @_Z11recReadTreeR11ANNorthRect(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %133 unwind label %107

133:                                              ; preds = %132
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br label %.loopexit

134:                                              ; preds = %124, %126, %107
  %.pn.pn = phi { ptr, i32 } [ %108, %107 ], [ %127, %126 ], [ %125, %124 ]
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 500, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn

135:                                              ; preds = %96
  call void @_Z5ErrorPKc6ANNerr(ptr noundef nonnull @.str.41, i32 noundef 1)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph40, %.lr.ph43, %.preheader, %24, %87, %135, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 500, ptr nonnull %2) #6
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11ANNorthRectC2EiRKS_(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16ANNorthHalfSpaceC2Eidi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef, double noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16ANNorthHalfSpace7projectERPd(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 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 = { inlinehint 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 #5 = { "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 }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTS11ANNorthRect", !10, i64 0, !10, i64 8}
!18 = !{!17, !10, i64 8}
!19 = distinct !{!19, !12}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass