; LLVM IR from p4lang/p4c :: backends/tofino/bf-asm (bfdumpbin)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.anon = type { i8, i8, i8 }
%"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.std::fpos" = type { i64, %struct.__mbstate_t }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.9 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.9 = type { i64, [8 x i8] }
%"class.std::allocator.6" = type { i8 }
%class.fdstream = type { %"class.std::basic_iostream.base", %"struct.fdstream::buffer_t", %"class.std::function", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_ostream.base" = type { ptr }
%"struct.fdstream::buffer_t" = type <{ %"class.std::basic_streambuf", i32, [4 x i8] }>
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@options = external hidden global %struct.anon, align 1
@stderr = external global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [18 x i8], align 1

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::basic_ifstream", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca [4 x i8], align 1
  %14 = alloca %"class.std::fpos", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.6", align 1
  %19 = alloca %class.fdstream, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %203, %2
  %21 = load i32, ptr %7, align 4, !tbaa !5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %206

25:                                               ; preds = %20
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = load i32, ptr %7, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds ptr, ptr %26, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 45
  br i1 %33, label %34, label %62

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %35 = load ptr, ptr %5, align 8, !tbaa !9
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds ptr, ptr %35, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %39, i64 1
  store ptr %40, ptr %9, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %60, %34
  %42 = load ptr, ptr %9, align 8, !tbaa !9
  %43 = load i8, ptr %42, align 1, !tbaa !11
  %44 = icmp ne i8 %43, 0
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %61

46:                                               ; preds = %41
  %47 = load ptr, ptr %9, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %47, i32 1
  store ptr %48, ptr %9, align 8, !tbaa !9
  %49 = load i8, ptr %47, align 1, !tbaa !11
  %50 = sext i8 %49 to i32
  switch i32 %50, label %54 [
    i32 67, label %51
    i32 72, label %52
    i32 76, label %53
  ]

51:                                               ; preds = %46
  store i8 1, ptr getelementptr inbounds (%struct.anon, ptr @options, i32 0, i32 2), align 1, !tbaa !12
  br label %60

52:                                               ; preds = %46
  store i8 1, ptr getelementptr inbounds (%struct.anon, ptr @options, i32 0, i32 1), align 1, !tbaa !15
  br label %60

53:                                               ; preds = %46
  store i8 1, ptr @options, align 1, !tbaa !16
  br label %60

54:                                               ; preds = %46
  %55 = load ptr, ptr @stderr, align 8, !tbaa !9
  %56 = load ptr, ptr %9, align 8, !tbaa !9
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i32
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.17, i32 noundef %58) #9
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %54, %53, %52, %51
  br label %41, !llvm.loop !17

61:                                               ; preds = %45
  br label %202

62:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 520, ptr %10) #9
  %63 = load ptr, ptr %5, align 8, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %10, ptr noundef %67, i32 noundef 4)
  %68 = load ptr, ptr %10, align 8, !tbaa !19
  %69 = getelementptr i8, ptr %68, i64 -24
  %70 = load i64, ptr %69, align 8
  %71 = getelementptr inbounds i8, ptr %10, i64 %70
  %72 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %71)
          to label %73 unwind label %82

73:                                               ; preds = %62
  br i1 %72, label %74, label %86

74:                                               ; preds = %73
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.18, ptr noundef %80) #9
  store i32 1, ptr %6, align 4, !tbaa !5
  store i32 4, ptr %8, align 4
  br label %197

82:                                               ; preds = %62
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  br label %201

86:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  call void @llvm.memset.p0.i64(ptr align 1 %13, i8 0, i64 4, i1 false)
  %87 = getelementptr inbounds [4 x i8], ptr %13, i64 0, i64 0
  %88 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %87, i64 noundef 4)
          to label %89 unwind label %116

89:                                               ; preds = %86
  %90 = getelementptr inbounds [4 x i8], ptr %13, i64 0, i64 0
  %91 = load i8, ptr %90, align 1, !tbaa !11
  %92 = zext i8 %91 to i32
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %120

94:                                               ; preds = %89
  %95 = getelementptr inbounds [4 x i8], ptr %13, i64 0, i64 3
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = icmp ne i8 %96, 0
  br i1 %97, label %98, label %120

98:                                               ; preds = %94
  %99 = getelementptr inbounds [4 x i8], ptr %13, i64 0, i64 3
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = zext i8 %100 to i32
  %102 = call noundef ptr @strchr(ptr noundef @.str.19, i32 noundef %101) #10
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %120

104:                                              ; preds = %98
  invoke void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef 0)
          to label %105 unwind label %116

105:                                              ; preds = %104
  %106 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %107 = load i64, ptr %106, align 8
  %108 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %109 = load i64, ptr %108, align 8
  %110 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 %107, i64 %109)
          to label %111 unwind label %116

111:                                              ; preds = %105
  %112 = invoke noundef i32 @_Z8dump_binRSi(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %113 unwind label %116

113:                                              ; preds = %111
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = or i32 %114, %112
  store i32 %115, ptr %6, align 4, !tbaa !5
  br label %196

116:                                              ; preds = %111, %105, %104, %86
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %200

120:                                              ; preds = %98, %94, %89
  %121 = getelementptr inbounds [4 x i8], ptr %13, i64 0, i64 0
  %122 = load i8, ptr %121, align 1, !tbaa !11
  %123 = zext i8 %122 to i32
  %124 = icmp eq i32 %123, 31
  br i1 %124, label %125, label %187

125:                                              ; preds = %120
  %126 = getelementptr inbounds [4 x i8], ptr %13, i64 0, i64 1
  %127 = load i8, ptr %126, align 1, !tbaa !11
  %128 = zext i8 %127 to i32
  %129 = icmp eq i32 %128, 139
  br i1 %129, label %130, label %187

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %131 unwind label %154

131:                                              ; preds = %130
  %132 = load ptr, ptr %5, align 8, !tbaa !9
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds ptr, ptr %132, i64 %134
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef %136)
          to label %137 unwind label %158

137:                                              ; preds = %131
  %138 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  %139 = invoke noalias ptr @popen(ptr noundef %138, ptr noundef @.str.21)
          to label %140 unwind label %162

140:                                              ; preds = %137
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #9
  store ptr %139, ptr %15, align 8, !tbaa !9
  %141 = load ptr, ptr %15, align 8, !tbaa !9
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %177

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 392, ptr %19) #9
  %144 = load ptr, ptr %15, align 8, !tbaa !9
  %145 = call i32 @fileno(ptr noundef %144) #9
  invoke void @_ZN8fdstreamC1Ei(ptr noundef nonnull align 8 dereferenceable(128) %19, i32 noundef %145)
          to label %146 unwind label %168

146:                                              ; preds = %143
  %147 = invoke noundef i32 @_Z8dump_binRSi(ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %148 unwind label %172

148:                                              ; preds = %146
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = or i32 %149, %147
  store i32 %150, ptr %6, align 4, !tbaa !5
  %151 = load ptr, ptr %15, align 8, !tbaa !9
  %152 = invoke i32 @pclose(ptr noundef %151)
          to label %153 unwind label %172

153:                                              ; preds = %148
  call void @_ZN8fdstreamD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19) #9
  call void @llvm.lifetime.end.p0(i64 392, ptr %19) #9
  br label %185

154:                                              ; preds = %130
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %11, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %12, align 4
  br label %167

158:                                              ; preds = %131
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %11, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %12, align 4
  br label %166

162:                                              ; preds = %137
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %11, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #9
  br label %166

166:                                              ; preds = %162, %158
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %167

167:                                              ; preds = %166, %154
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #9
  br label %186

168:                                              ; preds = %143
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %11, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %12, align 4
  br label %176

172:                                              ; preds = %148, %146
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %11, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %12, align 4
  call void @_ZN8fdstreamD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19) #9
  br label %176

176:                                              ; preds = %172, %168
  call void @llvm.lifetime.end.p0(i64 392, ptr %19) #9
  br label %186

177:                                              ; preds = %140
  %178 = load ptr, ptr @stderr, align 8, !tbaa !9
  %179 = load ptr, ptr %5, align 8, !tbaa !9
  %180 = load i32, ptr %7, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef @.str.22, ptr noundef %183) #9
  br label %185

185:                                              ; preds = %177, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %195

186:                                              ; preds = %176, %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %200

187:                                              ; preds = %125, %120
  %188 = load ptr, ptr @stderr, align 8, !tbaa !9
  %189 = load ptr, ptr %5, align 8, !tbaa !9
  %190 = load i32, ptr %7, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds ptr, ptr %189, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !9
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.23, ptr noundef %193) #9
  br label %195

195:                                              ; preds = %187, %185
  br label %196

196:                                              ; preds = %195, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  store i32 0, ptr %8, align 4
  br label %197

197:                                              ; preds = %196, %74
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %10) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr %10) #9
  %198 = load i32, ptr %8, align 4
  switch i32 %198, label %223 [
    i32 0, label %199
    i32 4, label %203
  ]

199:                                              ; preds = %197
  br label %202

200:                                              ; preds = %186, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %201

201:                                              ; preds = %200, %82
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %10) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %218

202:                                              ; preds = %199, %61
  br label %203

203:                                              ; preds = %202, %197
  %204 = load i32, ptr %7, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %7, align 4, !tbaa !5
  br label %20, !llvm.loop !21

206:                                              ; preds = %24
  %207 = load i32, ptr %6, align 4, !tbaa !5
  %208 = icmp eq i32 %207, 1
  br i1 %208, label %209, label %215

209:                                              ; preds = %206
  %210 = load ptr, ptr @stderr, align 8, !tbaa !9
  %211 = load ptr, ptr %5, align 8, !tbaa !9
  %212 = getelementptr inbounds ptr, ptr %211, i64 0
  %213 = load ptr, ptr %212, align 8, !tbaa !9
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.24, ptr noundef %213) #9
  br label %215

215:                                              ; preds = %209, %206
  %216 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %216, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  %217 = load i32, ptr %3, align 4
  ret i32 %217

218:                                              ; preds = %201
  %219 = load ptr, ptr %11, align 8
  %220 = load i32, ptr %12, align 4
  %221 = insertvalue { ptr, i32 } poison, ptr %219, 0
  %222 = insertvalue { ptr, i32 } %221, i32 %220, 1
  resume { ptr, i32 } %222

223:                                              ; preds = %197
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16), i64, i64) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #7 align 2

declare noalias ptr @popen(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 2

; Function Attrs: nounwind
declare i32 @fileno(ptr noundef) #3

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

declare i32 @pclose(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8fdstreamD1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 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 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress norecurse 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 #8 = { 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 #9 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 2}
!13 = !{!"_ZTS3$_0", !14, i64 0, !14, i64 1, !14, i64 2}
!14 = !{!"bool", !7, i64 0}
!15 = !{!13, !14, i64 1}
!16 = !{!13, !14, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = distinct !{!21, !18}


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

%struct.anon = type { i8, i8, i8 }
%"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.std::fpos" = type { i64, %struct.__mbstate_t }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.9 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.9 = type { i64, [8 x i8] }
%"class.std::allocator.6" = type { i8 }
%class.fdstream = type { %"class.std::basic_iostream.base", %"struct.fdstream::buffer_t", %"class.std::function", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_ostream.base" = type { ptr }
%"struct.fdstream::buffer_t" = type <{ %"class.std::basic_streambuf", i32, [4 x i8] }>
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@options = external hidden local_unnamed_addr global %struct.anon, align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8dump_binRSi(ptr noundef nonnull align 8 dereferenceable(16)) 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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_ifstream", align 8
  %4 = alloca [4 x i8], align 4
  %5 = alloca %"class.std::fpos", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.6", align 1
  %9 = alloca %class.fdstream, align 8
  %10 = icmp sgt i32 %0, 1
  br i1 %10, label %.lr.ph72, label %._crit_edge.thread

.lr.ph72:                                         ; preds = %2
  %11 = getelementptr inbounds i8, ptr %4, i64 3
  %12 = getelementptr inbounds i8, ptr %4, i64 1
  %13 = getelementptr inbounds i8, ptr %5, i64 8
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %15

._crit_edge:                                      ; preds = %.loopexit
  %14 = icmp eq i32 %.6, 1
  br i1 %14, label %106, label %._crit_edge.thread

15:                                               ; preds = %.lr.ph72, %.loopexit
  %indvars.iv = phi i64 [ 1, %.lr.ph72 ], [ %indvars.iv.next, %.loopexit ]
  %.04370 = phi i32 [ 0, %.lr.ph72 ], [ %.6, %.loopexit ]
  %16 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = load i8, ptr %17, align 1, !tbaa !9
  %19 = icmp eq i8 %18, 45
  br i1 %19, label %20, label %35

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %17, i64 1
  %22 = load i8, ptr %21, align 1, !tbaa !9
  %.not5967 = icmp eq i8 %22, 0
  br i1 %.not5967, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %20, %33
  %23 = phi i8 [ %34, %33 ], [ %22, %20 ]
  %.04169 = phi ptr [ %24, %33 ], [ %21, %20 ]
  %.14468 = phi i32 [ %.245, %33 ], [ %.04370, %20 ]
  %24 = getelementptr inbounds i8, ptr %.04169, i64 1
  switch i8 %23, label %28 [
    i8 67, label %25
    i8 72, label %26
    i8 76, label %27
  ]

25:                                               ; preds = %.lr.ph
  store i8 1, ptr getelementptr inbounds (i8, ptr @options, i64 2), align 1, !tbaa !10
  br label %33

26:                                               ; preds = %.lr.ph
  store i8 1, ptr getelementptr inbounds (i8, ptr @options, i64 1), align 1, !tbaa !13
  br label %33

27:                                               ; preds = %.lr.ph
  store i8 1, ptr @options, align 1, !tbaa !14
  br label %33

28:                                               ; preds = %.lr.ph
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = load i8, ptr %24, align 1, !tbaa !9
  %31 = sext i8 %30 to i32
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.17, i32 noundef %31) #8
  br label %33

33:                                               ; preds = %28, %27, %26, %25
  %.245 = phi i32 [ 1, %28 ], [ %.14468, %27 ], [ %.14468, %26 ], [ %.14468, %25 ]
  %34 = load i8, ptr %24, align 1, !tbaa !9
  %.not59 = icmp eq i8 %34, 0
  br i1 %.not59, label %.loopexit, label %.lr.ph, !llvm.loop !15

35:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %3) #9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %3, ptr noundef nonnull %17, i32 noundef 4)
  %36 = load ptr, ptr %3, align 8, !tbaa !17
  %37 = getelementptr i8, ptr %36, i64 -24
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds i8, ptr %3, i64 %38
  %40 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %39)
          to label %41 unwind label %46

41:                                               ; preds = %35
  br i1 %40, label %42, label %48

42:                                               ; preds = %41
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.18, ptr noundef %44) #8
  br label %103

46:                                               ; preds = %35
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %105

48:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 0, ptr %4, align 4
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %4, i64 noundef 4)
          to label %50 unwind label %66

50:                                               ; preds = %48
  %51 = load i8, ptr %4, align 4, !tbaa !9
  %52 = icmp eq i8 %51, 0
  %53 = load i8, ptr %11, align 1
  %54 = icmp ne i8 %53, 0
  %or.cond = select i1 %52, i1 %54, i1 false
  br i1 %or.cond, label %55, label %68

55:                                               ; preds = %50
  %56 = zext i8 %53 to i32
  %57 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %56) #10
  %.not = icmp eq ptr %57, null
  br i1 %.not, label %.thread, label %58

58:                                               ; preds = %55
  call void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 0)
  %59 = load i64, ptr %5, align 8
  %60 = load i64, ptr %13, align 8
  %61 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 %59, i64 %60)
          to label %62 unwind label %66

62:                                               ; preds = %58
  %63 = invoke noundef i32 @_Z8dump_binRSi(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %64 unwind label %66

64:                                               ; preds = %62
  %65 = or i32 %63, %.04370
  br label %102

66:                                               ; preds = %62, %58, %48
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %104

68:                                               ; preds = %50
  %69 = icmp eq i8 %51, 31
  %70 = load i8, ptr %12, align 1
  %71 = icmp eq i8 %70, -117
  %or.cond6 = select i1 %69, i1 %71, i1 false
  br i1 %or.cond6, label %72, label %.thread

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %73 unwind label %85

73:                                               ; preds = %72
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %74)
          to label %75 unwind label %87

75:                                               ; preds = %73
  %76 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  %77 = call noalias ptr @popen(ptr noundef %76, ptr noundef nonnull @.str.21)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  %.not52 = icmp eq ptr %77, null
  br i1 %.not52, label %95, label %78

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #9
  %79 = call i32 @fileno(ptr noundef nonnull %77) #9
  invoke void @_ZN8fdstreamC1Ei(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef %79)
          to label %80 unwind label %90

80:                                               ; preds = %78
  %81 = invoke noundef i32 @_Z8dump_binRSi(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %82 unwind label %92

82:                                               ; preds = %80
  %83 = or i32 %81, %.04370
  %84 = call i32 @pclose(ptr noundef nonnull %77)
  call void @_ZN8fdstreamD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #9
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #9
  br label %102

85:                                               ; preds = %72
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %89

87:                                               ; preds = %73
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %89

89:                                               ; preds = %87, %85
  %.pn = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #9
  br label %104

90:                                               ; preds = %78
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %94

92:                                               ; preds = %80
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8fdstreamD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #9
  br label %94

94:                                               ; preds = %92, %90
  %.pn53 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #9
  br label %104

95:                                               ; preds = %75
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef nonnull @.str.22, ptr noundef %97) #8
  br label %102

.thread:                                          ; preds = %55, %68
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef nonnull @.str.23, ptr noundef %100) #8
  br label %102

102:                                              ; preds = %82, %95, %.thread, %64
  %.447 = phi i32 [ %65, %64 ], [ %.04370, %.thread ], [ %83, %82 ], [ %.04370, %95 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br label %103

103:                                              ; preds = %102, %42
  %.5 = phi i32 [ 1, %42 ], [ %.447, %102 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %3) #9
  br label %.loopexit

104:                                              ; preds = %89, %94, %66
  %.pn56 = phi { ptr, i32 } [ %67, %66 ], [ %.pn53, %94 ], [ %.pn, %89 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br label %105

105:                                              ; preds = %104, %46
  %.pn56.pn = phi { ptr, i32 } [ %.pn56, %104 ], [ %47, %46 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn56.pn

.loopexit:                                        ; preds = %33, %20, %103
  %.6 = phi i32 [ %.5, %103 ], [ %.04370, %20 ], [ %.245, %33 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %15, !llvm.loop !19

106:                                              ; preds = %._crit_edge
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = load ptr, ptr %1, align 8, !tbaa !5
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.24, ptr noundef %108) #8
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %2, %106, %._crit_edge
  %.043.lcssa76 = phi i32 [ 1, %106 ], [ %.6, %._crit_edge ], [ 0, %2 ]
  ret i32 %.043.lcssa76
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgESt4fposI11__mbstate_tE(ptr noundef nonnull align 8 dereferenceable(16), i64, i64) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4fposI11__mbstate_tEC2El(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #6 align 2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @popen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @fileno(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @pclose(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8fdstreamD1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 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 = { "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 = { 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 #4 = { mustprogress norecurse 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 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 #6 = { 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 #7 = { 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 #8 = { cold nounwind }
attributes #9 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 2}
!11 = !{!"_ZTS3$_0", !12, i64 0, !12, i64 1, !12, i64 2}
!12 = !{!"bool", !7, i64 0}
!13 = !{!11, !12, i64 1}
!14 = !{!11, !12, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = distinct !{!19, !16}


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