; LLVM IR from yuikns/panther :: ann/sample/ann_sample.ll (Z7getArgsiPPc)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.std::locale" = type { ptr }
%"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" }
%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.16 }
%union.anon.16 = type { i32 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@__dso_handle = external hidden global i8
@k = external dso_local global i32, align 4
@dim = external dso_local global i32, align 4
@eps = external dso_local global double, align 8
@maxPts = external dso_local global i32, align 4
@dataIn = external dso_local global ptr, align 8
@queryIn = external dso_local global ptr, align 8
@_Z10query_fileB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z9dest_fileB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZZ7getArgsiPPcE10dataStream = external hidden global %"class.std::basic_ifstream", align 8
@_ZGVZ7getArgsiPPcE10dataStream = external hidden global i64, align 8
@_ZZ7getArgsiPPcE11queryStream = external hidden global %"class.std::basic_ifstream", align 8
@_ZGVZ7getArgsiPPcE11queryStream = external hidden global i64, align 8
@_ZZ7getArgsiPPcE11resultStrem = external hidden global %"class.std::basic_ofstream", align 8
@_ZGVZ7getArgsiPPcE11resultStrem = external hidden global i64, align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.25 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7getArgsiPPc(i32 noundef %0, ptr noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %8 = load atomic i8, ptr @_ZGVZ7getArgsiPPcE10dataStream acquire, align 8
  %9 = icmp eq i8 %8, 0
  br i1 %9, label %10, label %16, !prof !11

10:                                               ; preds = %2
  %11 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ7getArgsiPPcE10dataStream) #0
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %16

13:                                               ; preds = %10
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE10dataStream)
          to label %14 unwind label %52

14:                                               ; preds = %13
  %15 = call i32 @__cxa_atexit(ptr @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev, ptr @_ZZ7getArgsiPPcE10dataStream, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ7getArgsiPPcE10dataStream) #0
  br label %16

16:                                               ; preds = %14, %10, %2
  %17 = load atomic i8, ptr @_ZGVZ7getArgsiPPcE11queryStream acquire, align 8
  %18 = icmp eq i8 %17, 0
  br i1 %18, label %19, label %25, !prof !11

19:                                               ; preds = %16
  %20 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ7getArgsiPPcE11queryStream) #0
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %25

22:                                               ; preds = %19
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE11queryStream)
          to label %23 unwind label %56

23:                                               ; preds = %22
  %24 = call i32 @__cxa_atexit(ptr @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev, ptr @_ZZ7getArgsiPPcE11queryStream, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ7getArgsiPPcE11queryStream) #0
  br label %25

25:                                               ; preds = %23, %19, %16
  %26 = load atomic i8, ptr @_ZGVZ7getArgsiPPcE11resultStrem acquire, align 8
  %27 = icmp eq i8 %26, 0
  br i1 %27, label %28, label %34, !prof !11

28:                                               ; preds = %25
  %29 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ7getArgsiPPcE11resultStrem) #0
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %34

31:                                               ; preds = %28
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) @_ZZ7getArgsiPPcE11resultStrem)
          to label %32 unwind label %60

32:                                               ; preds = %31
  %33 = call i32 @__cxa_atexit(ptr @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev, ptr @_ZZ7getArgsiPPcE11resultStrem, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ7getArgsiPPcE11resultStrem) #0
  br label %34

34:                                               ; preds = %32, %28, %25
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = icmp sle i32 %35, 1
  br i1 %36, label %37, label %64

37:                                               ; preds = %34
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.25)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @.str.26)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef @.str.27)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @.str.28)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @.str.29)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @.str.30)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.31)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @.str.32)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.33)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef @.str.34)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @.str.35)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @.str.12)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @.str.36)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @.str.37)
  call void @exit(i32 noundef 0) #9
  unreachable

52:                                               ; preds = %13
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ7getArgsiPPcE10dataStream) #0
  br label %231

56:                                               ; preds = %22
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ7getArgsiPPcE11queryStream) #0
  br label %231

60:                                               ; preds = %31
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %5, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ7getArgsiPPcE11resultStrem) #0
  br label %231

64:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #0
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %219, %64
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %69, label %222

69:                                               ; preds = %65
  %70 = load ptr, ptr %4, align 8, !tbaa !9
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds ptr, ptr %70, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = call i32 @strcmp(ptr noundef %74, ptr noundef @.str.38) #10
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %85, label %77

77:                                               ; preds = %69
  %78 = load ptr, ptr %4, align 8, !tbaa !9
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds ptr, ptr %78, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = call i32 @atoi(ptr noundef %83) #10
  store i32 %84, ptr @dim, align 4, !tbaa !5
  br label %219

85:                                               ; preds = %69
  %86 = load ptr, ptr %4, align 8, !tbaa !9
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %86, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call i32 @strcmp(ptr noundef %90, ptr noundef @.str.39) #10
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %101, label %93

93:                                               ; preds = %85
  %94 = load ptr, ptr %4, align 8, !tbaa !9
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %94, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = call i32 @atoi(ptr noundef %99) #10
  store i32 %100, ptr @maxPts, align 4, !tbaa !5
  br label %218

101:                                              ; preds = %85
  %102 = load ptr, ptr %4, align 8, !tbaa !9
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds ptr, ptr %102, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = call i32 @strcmp(ptr noundef %106, ptr noundef @.str.40) #10
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %117, label %109

109:                                              ; preds = %101
  %110 = load ptr, ptr %4, align 8, !tbaa !9
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds ptr, ptr %110, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = call i32 @atoi(ptr noundef %115) #10
  store i32 %116, ptr @k, align 4, !tbaa !5
  br label %217

117:                                              ; preds = %101
  %118 = load ptr, ptr %4, align 8, !tbaa !9
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %118, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = call i32 @strcmp(ptr noundef %122, ptr noundef @.str.41) #10
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %133, label %125

125:                                              ; preds = %117
  %126 = load ptr, ptr %4, align 8, !tbaa !9
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %7, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds ptr, ptr %126, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  %132 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %131, ptr noundef @.str.42, ptr noundef @eps) #0
  br label %216

133:                                              ; preds = %117
  %134 = load ptr, ptr %4, align 8, !tbaa !9
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !9
  %139 = call i32 @strcmp(ptr noundef %138, ptr noundef @.str.43) #10
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %163, label %141

141:                                              ; preds = %133
  %142 = load ptr, ptr %4, align 8, !tbaa !9
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %7, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds ptr, ptr %142, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE10dataStream, ptr noundef %147, i32 noundef 8)
  %148 = load ptr, ptr @_ZZ7getArgsiPPcE10dataStream, align 8, !tbaa !12
  %149 = getelementptr i8, ptr %148, i64 -24
  %150 = load i64, ptr %149, align 8
  %151 = getelementptr inbounds i8, ptr @_ZZ7getArgsiPPcE10dataStream, i64 %150
  %152 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %151)
  br i1 %152, label %153, label %162

153:                                              ; preds = %141
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.44)
  %155 = load ptr, ptr %4, align 8, !tbaa !9
  %156 = load i32, ptr %7, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds ptr, ptr %155, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef %159)
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef @.str.45)
  call void @exit(i32 noundef 1) #9
  unreachable

162:                                              ; preds = %141
  store ptr @_ZZ7getArgsiPPcE10dataStream, ptr @dataIn, align 8, !tbaa !9
  br label %215

163:                                              ; preds = %133
  %164 = load ptr, ptr %4, align 8, !tbaa !9
  %165 = load i32, ptr %7, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds ptr, ptr %164, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = call i32 @strcmp(ptr noundef %168, ptr noundef @.str.46) #10
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %195, label %171

171:                                              ; preds = %163
  %172 = load ptr, ptr %4, align 8, !tbaa !9
  %173 = load i32, ptr %7, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %7, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds ptr, ptr %172, i64 %175
  %177 = load ptr, ptr %176, align 8, !tbaa !9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE11queryStream, ptr noundef %177, i32 noundef 8)
  %178 = load ptr, ptr %4, align 8, !tbaa !9
  %179 = load i32, ptr %7, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds ptr, ptr %178, i64 %180
  %182 = load ptr, ptr %181, align 8, !tbaa !9
  %183 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc(ptr noundef nonnull align 8 dereferenceable(32) @_Z10query_fileB5cxx11, ptr noundef %182)
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.47)
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef nonnull align 8 dereferenceable(32) @_Z10query_fileB5cxx11)
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %187 = load ptr, ptr @_ZZ7getArgsiPPcE11queryStream, align 8, !tbaa !12
  %188 = getelementptr i8, ptr %187, i64 -24
  %189 = load i64, ptr %188, align 8
  %190 = getelementptr inbounds i8, ptr @_ZZ7getArgsiPPcE11queryStream, i64 %189
  %191 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %190)
  br i1 %191, label %192, label %194

192:                                              ; preds = %171
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.48)
  call void @exit(i32 noundef 1) #9
  unreachable

194:                                              ; preds = %171
  store ptr @_ZZ7getArgsiPPcE11queryStream, ptr @queryIn, align 8, !tbaa !9
  br label %214

195:                                              ; preds = %163
  %196 = load ptr, ptr %4, align 8, !tbaa !9
  %197 = load i32, ptr %7, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds ptr, ptr %196, i64 %198
  %200 = load ptr, ptr %199, align 8, !tbaa !9
  %201 = call i32 @strcmp(ptr noundef %200, ptr noundef @.str.49) #10
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %211, label %203

203:                                              ; preds = %195
  %204 = load ptr, ptr %4, align 8, !tbaa !9
  %205 = load i32, ptr %7, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %7, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds ptr, ptr %204, i64 %207
  %209 = load ptr, ptr %208, align 8, !tbaa !9
  %210 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc(ptr noundef nonnull align 8 dereferenceable(32) @_Z9dest_fileB5cxx11, ptr noundef %209)
  br label %213

211:                                              ; preds = %195
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.50)
  call void @exit(i32 noundef 1) #9
  unreachable

213:                                              ; preds = %203
  br label %214

214:                                              ; preds = %213, %194
  br label %215

215:                                              ; preds = %214, %162
  br label %216

216:                                              ; preds = %215, %125
  br label %217

217:                                              ; preds = %216, %109
  br label %218

218:                                              ; preds = %217, %93
  br label %219

219:                                              ; preds = %218, %77
  %220 = load i32, ptr %7, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %7, align 4, !tbaa !5
  br label %65, !llvm.loop !14

222:                                              ; preds = %65
  %223 = load ptr, ptr @dataIn, align 8, !tbaa !9
  %224 = icmp eq ptr %223, null
  br i1 %224, label %228, label %225

225:                                              ; preds = %222
  %226 = load ptr, ptr @queryIn, align 8, !tbaa !9
  %227 = icmp eq ptr %226, null
  br i1 %227, label %228, label %230

228:                                              ; preds = %225, %222
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.51)
  call void @exit(i32 noundef 1) #9
  unreachable

230:                                              ; preds = %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #0
  ret void

231:                                              ; preds = %60, %56, %52
  %232 = load ptr, ptr %5, align 8
  %233 = load i32, ptr %6, align 4
  %234 = insertvalue { ptr, i32 } poison, ptr %232, 0
  %235 = insertvalue { ptr, i32 } %234, i32 %233, 1
  resume { ptr, i32 } %235
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

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

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #8

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3 align 2

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

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind willreturn memory(read) 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 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 = { 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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.std::locale" = type { ptr }
%"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" }
%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.16 }
%union.anon.16 = type { i32 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@__dso_handle = external hidden global i8
@k = external dso_local local_unnamed_addr global i32, align 4
@dim = external dso_local local_unnamed_addr global i32, align 4
@eps = external dso_local global double, align 8
@maxPts = external dso_local local_unnamed_addr global i32, align 4
@dataIn = external dso_local local_unnamed_addr global ptr, align 8
@queryIn = external dso_local local_unnamed_addr global ptr, align 8
@_Z10query_fileB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z9dest_fileB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZZ7getArgsiPPcE10dataStream = external hidden global %"class.std::basic_ifstream", align 8
@_ZGVZ7getArgsiPPcE10dataStream = external hidden global i64, align 8
@_ZZ7getArgsiPPcE11queryStream = external hidden global %"class.std::basic_ifstream", align 8
@_ZGVZ7getArgsiPPcE11queryStream = external hidden global i64, align 8
@_ZZ7getArgsiPPcE11resultStrem = external hidden global %"class.std::basic_ofstream", align 8
@_ZGVZ7getArgsiPPcE11resultStrem = external hidden global i64, align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.25 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7getArgsiPPc(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = load atomic i8, ptr @_ZGVZ7getArgsiPPcE10dataStream acquire, align 8
  %4 = icmp eq i8 %3, 0
  br i1 %4, label %5, label %10, !prof !5

5:                                                ; preds = %2
  %6 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ7getArgsiPPcE10dataStream) #8
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %10, label %7

7:                                                ; preds = %5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE10dataStream)
          to label %8 unwind label %43

8:                                                ; preds = %7
  %9 = tail call i32 @__cxa_atexit(ptr nonnull @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev, ptr nonnull @_ZZ7getArgsiPPcE10dataStream, ptr nonnull @__dso_handle) #8
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ7getArgsiPPcE10dataStream) #8
  br label %10

10:                                               ; preds = %8, %5, %2
  %11 = load atomic i8, ptr @_ZGVZ7getArgsiPPcE11queryStream acquire, align 8
  %12 = icmp eq i8 %11, 0
  br i1 %12, label %13, label %18, !prof !5

13:                                               ; preds = %10
  %14 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ7getArgsiPPcE11queryStream) #8
  %.not41 = icmp eq i32 %14, 0
  br i1 %.not41, label %18, label %15

15:                                               ; preds = %13
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE11queryStream)
          to label %16 unwind label %45

16:                                               ; preds = %15
  %17 = tail call i32 @__cxa_atexit(ptr nonnull @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev, ptr nonnull @_ZZ7getArgsiPPcE11queryStream, ptr nonnull @__dso_handle) #8
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ7getArgsiPPcE11queryStream) #8
  br label %18

18:                                               ; preds = %16, %13, %10
  %19 = load atomic i8, ptr @_ZGVZ7getArgsiPPcE11resultStrem acquire, align 8
  %20 = icmp eq i8 %19, 0
  br i1 %20, label %21, label %26, !prof !5

21:                                               ; preds = %18
  %22 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ7getArgsiPPcE11resultStrem) #8
  %.not42 = icmp eq i32 %22, 0
  br i1 %.not42, label %26, label %23

23:                                               ; preds = %21
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) @_ZZ7getArgsiPPcE11resultStrem)
          to label %24 unwind label %47

24:                                               ; preds = %23
  %25 = tail call i32 @__cxa_atexit(ptr nonnull @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev, ptr nonnull @_ZZ7getArgsiPPcE11resultStrem, ptr nonnull @__dso_handle) #8
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ7getArgsiPPcE11resultStrem) #8
  br label %26

26:                                               ; preds = %24, %21, %18
  %27 = icmp slt i32 %0, 2
  br i1 %27, label %28, label %.preheader

28:                                               ; preds = %26
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.25)
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @.str.26)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @.str.27)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.28)
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str.29)
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull @.str.30)
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str.31)
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @.str.32)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.33)
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @.str.34)
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.35)
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @.str.12)
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @.str.36)
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @.str.37)
  tail call void @exit(i32 noundef 0) #9
  unreachable

43:                                               ; preds = %7
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %143

45:                                               ; preds = %15
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %143

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %143

.preheader:                                       ; preds = %26, %132
  %.052 = phi i32 [ %133, %132 ], [ 1, %26 ]
  %49 = sext i32 %.052 to i64
  %50 = getelementptr inbounds ptr, ptr %1, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !6
  %52 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.38) #10
  %.not44 = icmp eq i32 %52, 0
  br i1 %.not44, label %53, label %59

53:                                               ; preds = %.preheader
  %54 = add nsw i32 %.052, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds ptr, ptr %1, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !6
  %58 = tail call i32 @atoi(ptr nocapture noundef %57) #10
  store i32 %58, ptr @dim, align 4, !tbaa !10
  br label %132

59:                                               ; preds = %.preheader
  %60 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.39) #10
  %.not45 = icmp eq i32 %60, 0
  br i1 %.not45, label %61, label %67

61:                                               ; preds = %59
  %62 = add nsw i32 %.052, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %1, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !6
  %66 = tail call i32 @atoi(ptr nocapture noundef %65) #10
  store i32 %66, ptr @maxPts, align 4, !tbaa !10
  br label %132

67:                                               ; preds = %59
  %68 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.40) #10
  %.not46 = icmp eq i32 %68, 0
  br i1 %.not46, label %69, label %75

69:                                               ; preds = %67
  %70 = add nsw i32 %.052, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds ptr, ptr %1, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !6
  %74 = tail call i32 @atoi(ptr nocapture noundef %73) #10
  store i32 %74, ptr @k, align 4, !tbaa !10
  br label %132

75:                                               ; preds = %67
  %76 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.41) #10
  %.not47 = icmp eq i32 %76, 0
  br i1 %.not47, label %77, label %83

77:                                               ; preds = %75
  %78 = add nsw i32 %.052, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %1, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !6
  %82 = tail call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %81, ptr noundef nonnull @.str.42, ptr noundef nonnull @eps) #8
  br label %132

83:                                               ; preds = %75
  %84 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.43) #10
  %.not48 = icmp eq i32 %84, 0
  br i1 %.not48, label %85, label %102

85:                                               ; preds = %83
  %86 = add nsw i32 %.052, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds ptr, ptr %1, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !6
  tail call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE10dataStream, ptr noundef %89, i32 noundef 8)
  %90 = load ptr, ptr @_ZZ7getArgsiPPcE10dataStream, align 8, !tbaa !12
  %91 = getelementptr i8, ptr %90, i64 -24
  %92 = load i64, ptr %91, align 8
  %93 = getelementptr inbounds i8, ptr @_ZZ7getArgsiPPcE10dataStream, i64 %92
  %94 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %93)
  br i1 %94, label %95, label %101

95:                                               ; preds = %85
  %96 = getelementptr inbounds ptr, ptr %1, i64 %87
  %97 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.44)
  %98 = load ptr, ptr %96, align 8, !tbaa !6
  %99 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef %98)
  %100 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @.str.45)
  tail call void @exit(i32 noundef 1) #9
  unreachable

101:                                              ; preds = %85
  store ptr @_ZZ7getArgsiPPcE10dataStream, ptr @dataIn, align 8, !tbaa !6
  br label %132

102:                                              ; preds = %83
  %103 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.46) #10
  %.not49 = icmp eq i32 %103, 0
  br i1 %.not49, label %104, label %122

104:                                              ; preds = %102
  %105 = add nsw i32 %.052, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %1, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !6
  tail call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) @_ZZ7getArgsiPPcE11queryStream, ptr noundef %108, i32 noundef 8)
  %109 = load ptr, ptr %107, align 8, !tbaa !6
  %110 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc(ptr noundef nonnull align 8 dereferenceable(32) @_Z10query_fileB5cxx11, ptr noundef %109)
  %111 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.47)
  %112 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull align 8 dereferenceable(32) @_Z10query_fileB5cxx11)
  %113 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %114 = load ptr, ptr @_ZZ7getArgsiPPcE11queryStream, align 8, !tbaa !12
  %115 = getelementptr i8, ptr %114, i64 -24
  %116 = load i64, ptr %115, align 8
  %117 = getelementptr inbounds i8, ptr @_ZZ7getArgsiPPcE11queryStream, i64 %116
  %118 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %117)
  br i1 %118, label %119, label %121

119:                                              ; preds = %104
  %120 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.48)
  tail call void @exit(i32 noundef 1) #9
  unreachable

121:                                              ; preds = %104
  store ptr @_ZZ7getArgsiPPcE11queryStream, ptr @queryIn, align 8, !tbaa !6
  br label %132

122:                                              ; preds = %102
  %123 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %51, ptr noundef nonnull dereferenceable(1) @.str.49) #10
  %.not50 = icmp eq i32 %123, 0
  br i1 %.not50, label %124, label %130

124:                                              ; preds = %122
  %125 = add nsw i32 %.052, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %1, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !6
  %129 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc(ptr noundef nonnull align 8 dereferenceable(32) @_Z9dest_fileB5cxx11, ptr noundef %128)
  br label %132

130:                                              ; preds = %122
  %131 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.50)
  tail call void @exit(i32 noundef 1) #9
  unreachable

132:                                              ; preds = %61, %77, %121, %124, %101, %69, %53
  %.1 = phi i32 [ %125, %124 ], [ %105, %121 ], [ %86, %101 ], [ %78, %77 ], [ %70, %69 ], [ %62, %61 ], [ %54, %53 ]
  %133 = add nsw i32 %.1, 1
  %134 = icmp slt i32 %133, %0
  br i1 %134, label %.preheader, label %135, !llvm.loop !14

135:                                              ; preds = %132
  %136 = load ptr, ptr @dataIn, align 8, !tbaa !6
  %137 = icmp eq ptr %136, null
  %138 = load ptr, ptr @queryIn, align 8
  %139 = icmp eq ptr %138, null
  %or.cond = select i1 %137, i1 true, i1 %139
  br i1 %or.cond, label %140, label %142

140:                                              ; preds = %135
  %141 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.51)
  tail call void @exit(i32 noundef 1) #9
  unreachable

142:                                              ; preds = %135
  ret void

143:                                              ; preds = %47, %45, %43
  %_ZGVZ7getArgsiPPcE11resultStrem.sink = phi ptr [ @_ZGVZ7getArgsiPPcE11resultStrem, %47 ], [ @_ZGVZ7getArgsiPPcE11queryStream, %45 ], [ @_ZGVZ7getArgsiPPcE10dataStream, %43 ]
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ], [ %44, %43 ]
  tail call void @__cxa_guard_abort(ptr nonnull %_ZGVZ7getArgsiPPcE11resultStrem.sink) #8
  resume { ptr, i32 } %.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

attributes #0 = { nofree nounwind }
attributes #1 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !9, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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