; LLVM IR from moarseniy/CudaFEMproject :: FEMproject/VTKfile/src (VTKfile)

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

%"class.std::basic_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.CSegyIn = type { %class.CSegyIO.base, [6 x i8] }
%class.CSegyIO.base = type <{ ptr, i32, i32, i32, float, i32, [71 x i32], [27 x i32], [4 x i8], ptr, ptr, i64, %"class.std::basic_ifstream", %"class.std::basic_ofstream", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", 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" }
%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.0 }
%union.anon.0 = 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 }
%"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.CSegyOut = type { %class.CSegyIO.base, i8, [5 x i8] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8testSEGYNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.CSegyIn, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %class.CSegyOut, align 8
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1552, ptr %5) #8
  call void @_ZN7CSegyInC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(1546) %5, ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext false)
  %23 = invoke noundef zeroext i1 @_ZN7CSegyIn4openEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %24 unwind label %28

24:                                               ; preds = %2
  br i1 %23, label %25, label %32

25:                                               ; preds = %24
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %27 unwind label %28

27:                                               ; preds = %25
  br label %32

28:                                               ; preds = %35, %32, %25, %2
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %6, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %7, align 4
  br label %188

32:                                               ; preds = %27, %24
  %33 = invoke noundef zeroext i1 @_ZN7CSegyIn4readEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %34 unwind label %28

34:                                               ; preds = %32
  br i1 %33, label %35, label %38

35:                                               ; preds = %34
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %37 unwind label %28

37:                                               ; preds = %35
  br label %38

38:                                               ; preds = %37, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %39 = invoke noundef i32 @_ZNK7CSegyIn13getSegyFormatEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %40 unwind label %95

40:                                               ; preds = %38
  store i32 %39, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %41 = invoke noundef i32 @_ZNK7CSegyIn9getSegyIDEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %42 unwind label %99

42:                                               ; preds = %40
  store i32 %41, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %43 = invoke noundef float @_ZNK7CSegyIn17getSampleIntervalEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %44 unwind label %103

44:                                               ; preds = %42
  store float %43, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %45 = invoke noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %46 unwind label %107

46:                                               ; preds = %44
  store i32 %45, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %47 = invoke noundef i32 @_ZNK7CSegyIn15getSampleNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %48 unwind label %111

48:                                               ; preds = %46
  store i32 %47, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = mul nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %52, i64 4)
  %54 = extractvalue { i64, i1 } %53, 1
  %55 = extractvalue { i64, i1 } %53, 0
  %56 = select i1 %54, i64 -1, i64 %55
  %57 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %56) #9
          to label %58 unwind label %115

58:                                               ; preds = %48
  store ptr %57, ptr %13, align 8, !tbaa !5
  invoke void @_ZNK7CSegyIn12getSegyTraceERKPf(ptr noundef nonnull align 8 dereferenceable(1546) %5, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %59 unwind label %115

59:                                               ; preds = %58
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %61 unwind label %115

61:                                               ; preds = %59
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %60, i32 noundef %62)
          to label %64 unwind label %115

64:                                               ; preds = %61
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef @.str.3)
          to label %66 unwind label %115

66:                                               ; preds = %64
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %65, i32 noundef %67)
          to label %69 unwind label %115

69:                                               ; preds = %66
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef @.str.4)
          to label %71 unwind label %115

71:                                               ; preds = %69
  %72 = load float, ptr %10, align 4, !tbaa !11
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %70, float noundef %72)
          to label %74 unwind label %115

74:                                               ; preds = %71
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef @.str.5)
          to label %76 unwind label %115

76:                                               ; preds = %74
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %75, i32 noundef %77)
          to label %79 unwind label %115

79:                                               ; preds = %76
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef @.str.6)
          to label %81 unwind label %115

81:                                               ; preds = %79
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %80, i32 noundef %82)
          to label %84 unwind label %115

84:                                               ; preds = %81
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str.7)
          to label %86 unwind label %115

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 1552, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %87 = invoke noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %88 unwind label %119

88:                                               ; preds = %86
  store i32 %87, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #8
  store i8 0, ptr %16, align 1, !tbaa !13
  invoke void @_ZN8CSegyOutC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKiRKb(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %89 unwind label %123

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  %90 = invoke noundef zeroext i1 @_ZN8CSegyOut4openEv(ptr noundef nonnull align 8 dereferenceable(1547) %14)
          to label %91 unwind label %128

91:                                               ; preds = %89
  br i1 %90, label %92, label %132

92:                                               ; preds = %91
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %94 unwind label %128

94:                                               ; preds = %92
  br label %132

95:                                               ; preds = %38
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  br label %187

99:                                               ; preds = %40
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  br label %186

103:                                              ; preds = %42
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %6, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %7, align 4
  br label %185

107:                                              ; preds = %44
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %6, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %7, align 4
  br label %184

111:                                              ; preds = %46
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %6, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %7, align 4
  br label %183

115:                                              ; preds = %84, %81, %79, %76, %74, %71, %69, %66, %64, %61, %59, %58, %48
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  br label %182

119:                                              ; preds = %86
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %6, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %7, align 4
  br label %127

123:                                              ; preds = %88
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #8
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %181

128:                                              ; preds = %178, %151, %148, %92, %89
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %6, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %7, align 4
  br label %180

132:                                              ; preds = %94, %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = mul nsw i32 %133, %134
  store i32 %135, ptr %17, align 4, !tbaa !9
  %136 = invoke noundef zeroext i1 @_ZN8CSegyOut12setSegyTraceERKPKfRKi(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %137 unwind label %154

137:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %138 = invoke noundef i32 @_ZNK7CSegyIn15getSampleNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %139 unwind label %158

139:                                              ; preds = %137
  store i32 %138, ptr %18, align 4, !tbaa !9
  invoke void @_ZN8CSegyOut15setSampleNumberERKi(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %140 unwind label %158

140:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %141 = invoke noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %142 unwind label %162

142:                                              ; preds = %140
  store i32 %141, ptr %19, align 4, !tbaa !9
  invoke void @_ZN8CSegyOut14setTraceNumberERKi(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %143 unwind label %162

143:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 5, ptr %20, align 4, !tbaa !9
  invoke void @_ZN8CSegyOut13setSegyFormatERKi(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %144 unwind label %166

144:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !9
  invoke void @_ZN8CSegyOut9setSegyIDERKi(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %145 unwind label %170

145:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %146 = invoke noundef float @_ZNK7CSegyIn17getSampleIntervalEv(ptr noundef nonnull align 8 dereferenceable(1546) %5)
          to label %147 unwind label %174

147:                                              ; preds = %145
  store float %146, ptr %22, align 4, !tbaa !11
  invoke void @_ZN8CSegyOut17setSampleIntervalERKf(ptr noundef nonnull align 8 dereferenceable(1547) %14, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %148 unwind label %174

148:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  %149 = invoke noundef zeroext i1 @_ZN8CSegyOut5writeEv(ptr noundef nonnull align 8 dereferenceable(1547) %14)
          to label %150 unwind label %128

150:                                              ; preds = %148
  br i1 %149, label %151, label %178

151:                                              ; preds = %150
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
          to label %153 unwind label %128

153:                                              ; preds = %151
  br label %178

154:                                              ; preds = %132
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %6, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %180

158:                                              ; preds = %139, %137
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %6, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %180

162:                                              ; preds = %142, %140
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %6, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %180

166:                                              ; preds = %143
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %6, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %180

170:                                              ; preds = %144
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %6, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %180

174:                                              ; preds = %147, %145
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %6, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %180

178:                                              ; preds = %153, %150
  invoke void @_ZN8CSegyOut5closeEv(ptr noundef nonnull align 8 dereferenceable(1547) %14)
          to label %179 unwind label %128

179:                                              ; preds = %178
  call void @_ZN8CSegyOutD1Ev(ptr noundef nonnull align 8 dereferenceable(1547) %14) #8
  call void @llvm.lifetime.end.p0(i64 1552, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @_ZN7CSegyInD1Ev(ptr noundef nonnull align 8 dereferenceable(1546) %5) #8
  call void @llvm.lifetime.end.p0(i64 1552, ptr %5) #8
  ret void

180:                                              ; preds = %174, %170, %166, %162, %158, %154, %128
  call void @_ZN8CSegyOutD1Ev(ptr noundef nonnull align 8 dereferenceable(1547) %14) #8
  br label %181

181:                                              ; preds = %180, %127
  call void @llvm.lifetime.end.p0(i64 1552, ptr %14) #8
  br label %182

182:                                              ; preds = %181, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %183

183:                                              ; preds = %182, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %184

184:                                              ; preds = %183, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %185

185:                                              ; preds = %184, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %186

186:                                              ; preds = %185, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %187

187:                                              ; preds = %186, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %188

188:                                              ; preds = %187, %28
  call void @_ZN7CSegyInD1Ev(ptr noundef nonnull align 8 dereferenceable(1546) %5) #8
  call void @llvm.lifetime.end.p0(i64 1552, ptr %5) #8
  br label %189

189:                                              ; preds = %188
  %190 = load ptr, ptr %6, align 8
  %191 = load i32, ptr %7, align 4
  %192 = insertvalue { ptr, i32 } poison, ptr %190, 0
  %193 = insertvalue { ptr, i32 } %192, i32 %191, 1
  resume { ptr, i32 } %193
}

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

declare void @_ZN7CSegyInC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(1546), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) unnamed_addr #2

declare noundef zeroext i1 @_ZN7CSegyIn4openEv(ptr noundef nonnull align 8 dereferenceable(1546)) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_ZN7CSegyIn4readEv(ptr noundef nonnull align 8 dereferenceable(1546)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn13getSegyFormatEv(ptr noundef nonnull align 8 dereferenceable(1546)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn9getSegyIDEv(ptr noundef nonnull align 8 dereferenceable(1546)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7CSegyIn17getSampleIntervalEv(ptr noundef nonnull align 8 dereferenceable(1546)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn15getSampleNumberEv(ptr noundef nonnull align 8 dereferenceable(1546)) #4 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #5

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #6

declare void @_ZNK7CSegyIn12getSegyTraceERKPf(ptr noundef nonnull align 8 dereferenceable(1546), ptr noundef nonnull align 8 dereferenceable(8)) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

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

declare void @_ZN8CSegyOutC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKiRKb(ptr noundef nonnull align 8 dereferenceable(1547), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2

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

declare noundef zeroext i1 @_ZN8CSegyOut4openEv(ptr noundef nonnull align 8 dereferenceable(1547)) unnamed_addr #2

declare noundef zeroext i1 @_ZN8CSegyOut12setSegyTraceERKPKfRKi(ptr noundef nonnull align 8 dereferenceable(1547), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

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

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

declare noundef zeroext i1 @_ZN8CSegyOut5writeEv(ptr noundef nonnull align 8 dereferenceable(1547)) #2

declare void @_ZN8CSegyOut5closeEv(ptr noundef nonnull align 8 dereferenceable(1547)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN8CSegyOutD1Ev(ptr noundef nonnull align 8 dereferenceable(1547)) unnamed_addr #7

; Function Attrs: nounwind
declare void @_ZN7CSegyInD1Ev(ptr noundef nonnull align 8 dereferenceable(1546)) unnamed_addr #7

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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nobuiltin allocsize(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 = { 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 = { builtin allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}


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

%"class.std::basic_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.CSegyIn = type { %class.CSegyIO.base, [6 x i8] }
%class.CSegyIO.base = type <{ ptr, i32, i32, i32, float, i32, [71 x i32], [27 x i32], [4 x i8], ptr, ptr, i64, %"class.std::basic_ifstream", %"class.std::basic_ofstream", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", 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" }
%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.0 }
%union.anon.0 = 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 }
%"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.CSegyOut = type { %class.CSegyIO.base, i8, [5 x i8] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8testSEGYNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef nonnull %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.CSegyIn, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.CSegyOut, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 1552, ptr nonnull %3) #7
  call void @_ZN7CSegyInC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(1546) %3, ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext false)
  %14 = invoke noundef zeroext i1 @_ZN7CSegyIn4openEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
          to label %15 unwind label %18

15:                                               ; preds = %2
  br i1 %14, label %16, label %20

16:                                               ; preds = %15
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %20 unwind label %18

18:                                               ; preds = %23, %20, %16, %2
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %90

20:                                               ; preds = %16, %15
  %21 = invoke noundef zeroext i1 @_ZN7CSegyIn4readEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
          to label %22 unwind label %18

22:                                               ; preds = %20
  br i1 %21, label %23, label %25

23:                                               ; preds = %22
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %25 unwind label %18

25:                                               ; preds = %23, %22
  %26 = call noundef i32 @_ZNK7CSegyIn13getSegyFormatEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  %27 = call noundef i32 @_ZNK7CSegyIn9getSegyIDEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  %28 = call noundef float @_ZNK7CSegyIn17getSampleIntervalEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  %29 = call noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  %30 = call noundef i32 @_ZNK7CSegyIn15getSampleNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %31 = mul nsw i32 %30, %29
  %32 = zext nneg i32 %31 to i64
  %33 = icmp slt i32 %31, 0
  %34 = shl nuw nsw i64 %32, 2
  %35 = select i1 %33, i64 -1, i64 %34
  %36 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %35) #8
          to label %37 unwind label %67

37:                                               ; preds = %25
  store ptr %36, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK7CSegyIn12getSegyTraceERKPf(ptr noundef nonnull align 8 dereferenceable(1546) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %38 unwind label %67

38:                                               ; preds = %37
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %40 unwind label %67

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %26)
          to label %42 unwind label %67

42:                                               ; preds = %40
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @.str.3)
          to label %44 unwind label %67

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %43, i32 noundef %27)
          to label %46 unwind label %67

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.4)
          to label %48 unwind label %67

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %47, float noundef %28)
          to label %50 unwind label %67

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @.str.5)
          to label %52 unwind label %67

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %51, i32 noundef %29)
          to label %54 unwind label %67

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @.str.6)
          to label %56 unwind label %67

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %55, i32 noundef %30)
          to label %58 unwind label %67

58:                                               ; preds = %56
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @.str.7)
          to label %60 unwind label %67

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 1552, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %61 = call noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  store i32 %61, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  store i8 0, ptr %7, align 1, !tbaa !11
  invoke void @_ZN8CSegyOutC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKiRKb(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %62 unwind label %69

62:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %63 = invoke noundef zeroext i1 @_ZN8CSegyOut4openEv(ptr noundef nonnull align 8 dereferenceable(1547) %5)
          to label %64 unwind label %71

64:                                               ; preds = %62
  br i1 %63, label %65, label %73

65:                                               ; preds = %64
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %73 unwind label %71

67:                                               ; preds = %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %37, %25
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %89

69:                                               ; preds = %60
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %88

71:                                               ; preds = %85, %81, %75, %65, %62
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %87

73:                                               ; preds = %65, %64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 %31, ptr %8, align 4, !tbaa !9
  %74 = invoke noundef zeroext i1 @_ZN8CSegyOut12setSegyTraceERKPKfRKi(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %75 unwind label %83

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %76 = call noundef i32 @_ZNK7CSegyIn15getSampleNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  store i32 %76, ptr %9, align 4, !tbaa !9
  call void @_ZN8CSegyOut15setSampleNumberERKi(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %77 = call noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  store i32 %77, ptr %10, align 4, !tbaa !9
  call void @_ZN8CSegyOut14setTraceNumberERKi(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 5, ptr %11, align 4, !tbaa !9
  call void @_ZN8CSegyOut13setSegyFormatERKi(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setSegyIDERKi(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %78 = call noundef float @_ZNK7CSegyIn17getSampleIntervalEv(ptr noundef nonnull align 8 dereferenceable(1546) %3)
  store float %78, ptr %13, align 4, !tbaa !13
  call void @_ZN8CSegyOut17setSampleIntervalERKf(ptr noundef nonnull align 8 dereferenceable(1547) %5, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  %79 = invoke noundef zeroext i1 @_ZN8CSegyOut5writeEv(ptr noundef nonnull align 8 dereferenceable(1547) %5)
          to label %80 unwind label %71

80:                                               ; preds = %75
  br i1 %79, label %81, label %85

81:                                               ; preds = %80
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
          to label %85 unwind label %71

83:                                               ; preds = %73
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %87

85:                                               ; preds = %81, %80
  invoke void @_ZN8CSegyOut5closeEv(ptr noundef nonnull align 8 dereferenceable(1547) %5)
          to label %86 unwind label %71

86:                                               ; preds = %85
  call void @_ZN8CSegyOutD1Ev(ptr noundef nonnull align 8 dereferenceable(1547) %5) #7
  call void @llvm.lifetime.end.p0(i64 1552, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @_ZN7CSegyInD1Ev(ptr noundef nonnull align 8 dereferenceable(1546) %3) #7
  call void @llvm.lifetime.end.p0(i64 1552, ptr nonnull %3) #7
  ret void

87:                                               ; preds = %83, %71
  %.pn = phi { ptr, i32 } [ %72, %71 ], [ %84, %83 ]
  call void @_ZN8CSegyOutD1Ev(ptr noundef nonnull align 8 dereferenceable(1547) %5) #7
  br label %88

88:                                               ; preds = %87, %69
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 1552, ptr nonnull %5) #7
  br label %89

89:                                               ; preds = %88, %67
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %88 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %90

90:                                               ; preds = %89, %18
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %89 ], [ %19, %18 ]
  call void @_ZN7CSegyInD1Ev(ptr noundef nonnull align 8 dereferenceable(1546) %3) #7
  call void @llvm.lifetime.end.p0(i64 1552, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

declare void @_ZN7CSegyInC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(1546), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) unnamed_addr #2

declare noundef zeroext i1 @_ZN7CSegyIn4openEv(ptr noundef nonnull align 8 dereferenceable(1546)) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; 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

declare noundef zeroext i1 @_ZN7CSegyIn4readEv(ptr noundef nonnull align 8 dereferenceable(1546)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn13getSegyFormatEv(ptr noundef nonnull align 8 dereferenceable(1546)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn9getSegyIDEv(ptr noundef nonnull align 8 dereferenceable(1546)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7CSegyIn17getSampleIntervalEv(ptr noundef nonnull align 8 dereferenceable(1546)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn14getTraceNumberEv(ptr noundef nonnull align 8 dereferenceable(1546)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7CSegyIn15getSampleNumberEv(ptr noundef nonnull align 8 dereferenceable(1546)) local_unnamed_addr #4 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #5

declare void @_ZNK7CSegyIn12getSegyTraceERKPf(ptr noundef nonnull align 8 dereferenceable(1546), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

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

declare void @_ZN8CSegyOutC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKiRKb(ptr noundef nonnull align 8 dereferenceable(1547), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2

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

declare noundef zeroext i1 @_ZN8CSegyOut4openEv(ptr noundef nonnull align 8 dereferenceable(1547)) unnamed_addr #2

declare noundef zeroext i1 @_ZN8CSegyOut12setSegyTraceERKPKfRKi(ptr noundef nonnull align 8 dereferenceable(1547), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

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

declare noundef zeroext i1 @_ZN8CSegyOut5writeEv(ptr noundef nonnull align 8 dereferenceable(1547)) local_unnamed_addr #2

declare void @_ZN8CSegyOut5closeEv(ptr noundef nonnull align 8 dereferenceable(1547)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN8CSegyOutD1Ev(ptr noundef nonnull align 8 dereferenceable(1547)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN7CSegyInD1Ev(ptr noundef nonnull align 8 dereferenceable(1546)) unnamed_addr #6

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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(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 = { 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 }
attributes #8 = { builtin allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass